summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-12-20 16:22:03 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2007-12-20 16:25:50 +0000
commitd8a4f8c23d23f62ca81cc47f8284ec29adb7050a (patch)
tree1aa06c4d9067e88d7aa3309b912b615a423d1262
parent394b673c3b7703e0f12e7a1d813a8e5689ef9673 (diff)
Drop the '[lwp]' from the title string.
-rw-r--r--src/app.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/app.c b/src/app.c
index 2b18978..b607aff 100644
--- a/src/app.c
+++ b/src/app.c
@@ -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);