[Xfce4-commits] <orage:master> 4.8.2.6 Fixed bug 7350: Problems with menu entries / desktop files

Juha Kautto noreply at xfce.org
Mon Nov 28 13:42:02 CET 2011


Updating branch refs/heads/master
         to d928933b82119be5a8780acd5ab4cb4a4bb752c7 (commit)
       from 523d6346960ede917212f26642206fcae9d0f75a (commit)

commit d928933b82119be5a8780acd5ab4cb4a4bb752c7
Author: Juha Kautto <juha at xfce.org>
Date:   Mon Nov 28 14:39:46 2011 +0200

    4.8.2.6 Fixed bug 7350: Problems with menu entries / desktop files
    
    New trial fix for missing icon in globaltime. Hopefully it now works.

 globaltime/globaltime.c          |   15 ++++++++++++++-
 globaltime/globaltime.desktop.in |    2 +-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/globaltime/globaltime.c b/globaltime/globaltime.c
index 130fbc2..cc8516a 100644
--- a/globaltime/globaltime.c
+++ b/globaltime/globaltime.c
@@ -508,6 +508,19 @@ static gboolean clean_up(GtkObject *obj, GdkEvent *event, gint g)
     return(FALSE);
 }
 
+static void create_icon(void)
+{
+    GdkPixbuf *clock_logo;
+    GtkIconTheme *icon_theme;
+
+    icon_theme = gtk_icon_theme_get_default();
+    clock_logo = gtk_icon_theme_load_icon(icon_theme, "orage_globaltime", 0
+            , GTK_ICON_LOOKUP_USE_BUILTIN, NULL);
+    gtk_window_set_default_icon(clock_logo);
+    gtk_window_set_icon(GTK_WINDOW(clocks.window), clock_logo);
+    g_object_unref(clock_logo);
+}
+
 static void initialize_clocks(void)
 {
     GtkWidget *button;
@@ -591,7 +604,7 @@ static void create_global_time(void)
     }
 
     initialize_clocks();
-
+    create_icon();
     read_file(); /* fills clock_list non GTK members */
 
     if (g_list_length(clocks.clock_list) == 0)
diff --git a/globaltime/globaltime.desktop.in b/globaltime/globaltime.desktop.in
index 385d506..ac12676 100644
--- a/globaltime/globaltime.desktop.in
+++ b/globaltime/globaltime.desktop.in
@@ -3,7 +3,7 @@ Version=1.0
 _Name=Orage Globaltime
 _Comment=Show clocks from different countries
 Exec=globaltime
-Icon=clock
+Icon=orage_globaltime
 StartupNotify=true
 Terminal=false
 Type=Application


More information about the Xfce4-commits mailing list