[gnome-control-center/single-window-shell] [shell] set the new title on the window after the notebook has switched
- From: Thomas Wood <thos src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-control-center/single-window-shell] [shell] set the new title on the window after the notebook has switched
- Date: Thu, 14 Jan 2010 15:35:51 +0000 (UTC)
commit d4f3cb183d57648c79f132ce243a44ec44a9bd4c
Author: Thomas Wood <thomas wood intel com>
Date: Thu Jan 14 12:08:44 2010 +0000
[shell] set the new title on the window after the notebook has switched
Prevent the window title being set until the capplet has loaded and been
shown. This also prevents a window title being set if the capplet does not
support embedding.
shell/control-center.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/shell/control-center.c b/shell/control-center.c
index 305a752..c9bbc0e 100644
--- a/shell/control-center.c
+++ b/shell/control-center.c
@@ -32,6 +32,8 @@ typedef struct
GtkWidget *window;
GSList *icon_views;
+
+ gchar *current_title;
} ShellData;
void item_activated_cb (GtkIconView *icon_view, GtkTreePath *path, ShellData *data);
@@ -192,6 +194,8 @@ switch_after_delay (ShellData *data)
gtk_widget_show (W (data->builder, "home-button"));
+ gtk_window_set_title (GTK_WINDOW (data->window), data->current_title);
+
return FALSE;
}
@@ -247,14 +251,14 @@ item_activated_cb (GtkIconView *icon_view,
gtk_tree_model_get (model, &iter, 0, &name, 1, &exec, -1);
- gtk_window_set_title (GTK_WINDOW (data->window), name);
+ g_free (data->current_title);
+ data->current_title = name;
/* start app */
command = g_strdup_printf ("%s --socket=%u", exec, socket_id);
g_spawn_command_line_async (command, NULL);
g_free (command);
- g_free (name);
g_free (exec);
}
@@ -306,6 +310,7 @@ main (int argc, char **argv)
gtk_main ();
+ g_free (data->current_title);
g_free (data);
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]