[nautilus] desktop-window: implement the right method for setting window title



commit 48ac967bff48e7e4a38c96859ebfd2f522179fa3
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Jan 11 17:25:42 2011 +0100

    desktop-window: implement the right method for setting window title
    
    https://bugzilla.gnome.org/show_bug.cgi?id=555425

 src/nautilus-desktop-window.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/nautilus-desktop-window.c b/src/nautilus-desktop-window.c
index 56a3d0e..e27534a 100644
--- a/src/nautilus-desktop-window.c
+++ b/src/nautilus-desktop-window.c
@@ -248,12 +248,6 @@ realize (GtkWidget *widget)
 				  G_CALLBACK (nautilus_desktop_window_screen_size_changed), window);
 }
 
-static char *
-real_get_title (NautilusWindow *window)
-{
-	return g_strdup (_("Desktop"));
-}
-
 static NautilusIconInfo *
 real_get_icon (NautilusWindow *window,
 	       NautilusWindowSlot *slot)
@@ -262,6 +256,14 @@ real_get_icon (NautilusWindow *window,
 }
 
 static void
+real_sync_title (NautilusWindow *window,
+		 NautilusWindowSlot *slot)
+{
+	/* hardcode "Desktop" */
+	gtk_window_set_title (GTK_WINDOW (window), _("Desktop"));
+}
+
+static void
 nautilus_desktop_window_class_init (NautilusDesktopWindowClass *klass)
 {
 	GtkWidgetClass *wclass = GTK_WIDGET_CLASS (klass);
@@ -272,7 +274,7 @@ nautilus_desktop_window_class_init (NautilusDesktopWindowClass *klass)
 	wclass->map = map;
 
 	nclass->window_type = NAUTILUS_WINDOW_DESKTOP;
-	nclass->get_title = real_get_title;
+	nclass->sync_title = real_sync_title;
 	nclass->get_icon = real_get_icon;
 
 	g_type_class_add_private (klass, sizeof (NautilusDesktopWindowDetails));



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