[Xfce4-commits] r26488 - xfce4-appfinder/trunk/src

Jean-François Wauthy pollux at xfce.org
Sun Dec 16 21:42:10 CET 2007


Author: pollux
Date: 2007-12-16 20:42:10 +0000 (Sun, 16 Dec 2007)
New Revision: 26488

Modified:
   xfce4-appfinder/trunk/src/main.c
Log:
use XfceTitledDialog instead of xfce_create_header

Modified: xfce4-appfinder/trunk/src/main.c
===================================================================
--- xfce4-appfinder/trunk/src/main.c	2007-12-16 17:12:38 UTC (rev 26487)
+++ xfce4-appfinder/trunk/src/main.c	2007-12-16 20:42:10 UTC (rev 26488)
@@ -176,7 +176,6 @@
 callbackInformationMenuActivate (GtkMenuItem *menuitem, gpointer menu)
 {
     GtkWidget *dialog;
-    GtkWidget *header;
     GtkWidget *vbox;
     GtkWidget *hbox;
     GtkWidget *frame;
@@ -200,24 +199,24 @@
     
     if (path && XFCE_IS_DESKTOP_ENTRY(dentry = xfce_desktop_entry_new (path, keys, 7)))
     {
-        dialog = gtk_dialog_new_with_buttons (_("Xfce 4 Appfinder"), NULL, 
-                                              GTK_DIALOG_NO_SEPARATOR,
-                                              GTK_STOCK_CLOSE, GTK_RESPONSE_OK,
-                                              NULL);
-		icon = xfce_themed_icon_load("xfce4-appfinder", 48);
-        gtk_window_set_icon_name (GTK_WINDOW (dialog), "xfce4-appfinder");
-		gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+        dialog = xfce_titled_dialog_new_with_buttons (_("Xfce 4 Appfinder"), NULL, 
+                                                     GTK_DIALOG_NO_SEPARATOR,
+                                                     GTK_STOCK_CLOSE, GTK_RESPONSE_OK,
+                                                     NULL);
+	icon = xfce_themed_icon_load ("xfce4-appfinder", 48);
+	if (G_LIKELY (G_IS_OBJECT (icon))) {
+	  gtk_window_set_icon (GTK_WINDOW (dialog), icon);
+	  g_object_unref (icon);
+	}
 
+	gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+
+	xfce_desktop_entry_get_string (dentry, "Name", TRUE, &name);
+	xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (dialog), name);
+
         vbox = GTK_DIALOG (dialog)->vbox;
         gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
 
-        xfce_desktop_entry_get_string (dentry, "Name", TRUE, &name);
-        header = xfce_create_header (icon, name);
-        gtk_container_set_border_width (GTK_CONTAINER (header), BORDER - 2);
-        gtk_widget_show (header);
-        gtk_box_pack_start (GTK_BOX (vbox), header, FALSE, TRUE, 0);
-        g_object_unref(icon);
-
         hbox = gtk_hbox_new(FALSE, BORDER);
         gtk_container_set_border_width (GTK_CONTAINER (hbox), BORDER - 2);
         gtk_widget_show(hbox);



More information about the Xfce4-commits mailing list