[gnome-control-center/wip/animated-notebook] shell: Print name correctly in test



commit 7db2d983d6c550a3d411122c1c261ac617513e6a
Author: Bastien Nocera <hadess hadess net>
Date:   Fri May 4 15:41:45 2012 +0100

    shell: Print name correctly in test

 shell/test-notebook.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/shell/test-notebook.c b/shell/test-notebook.c
index 7697de0..a488a8a 100644
--- a/shell/test-notebook.c
+++ b/shell/test-notebook.c
@@ -43,11 +43,11 @@ create_page_contents (int page_num)
 		    G_CALLBACK (goto_page), GINT_TO_POINTER (page_num + 1));
 
   GtkWidget *label = gtk_label_new (text);
-  gtk_widget_set_name (label, text);
 
   gtk_box_pack_end (GTK_BOX (vbox), label, TRUE, TRUE, 0);
 
   gtk_widget_show_all (vbox);
+  g_object_set_data_full (G_OBJECT (vbox), "display-name", text, g_free);
 
   g_hash_table_insert (pages, GINT_TO_POINTER (page_num), vbox);
 
@@ -58,7 +58,7 @@ static void
 on_page_change (CcNotebook *notebook)
 {
   g_print (G_STRLOC ": Currently selected page: %s\n",
-           gtk_widget_get_name (cc_notebook_get_selected_page (notebook)));
+           (char *) g_object_get_data (G_OBJECT (cc_notebook_get_selected_page (notebook)), "display-name"));
 }
 
 int



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]