diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2007-12-20 16:22:03 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2007-12-20 16:25:50 +0000 |
commit | d8a4f8c23d23f62ca81cc47f8284ec29adb7050a (patch) | |
tree | 1aa06c4d9067e88d7aa3309b912b615a423d1262 | |
parent | 394b673c3b7703e0f12e7a1d813a8e5689ef9673 (diff) |
Drop the '[lwp]' from the title string.
-rw-r--r-- | src/app.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -463,8 +463,17 @@ client_type_to_string (Client *client) static void _app_set_client_name (App *app, const gchar *client) { - const char *type = client_type_to_string (&app->client); - char *str = g_strconcat (client, " - Óðinn [", type, "]", NULL); + char *str; + + if (app->client.name != NULL && strcmp (client, app->client.name) == 0) + return; + + if (app->client.type != LWP) { + const char *type = client_type_to_string (&app->client); + str = g_strconcat (client, " - Óðinn [", type, "]", NULL); + } else { + str = g_strconcat (client, " - Óðinn", NULL); + } gtk_window_set_title (GTK_WINDOW (app->window), str); g_free (str); |