r3254 - in trunk/src/target/OM-2007.2/libraries/libmokopanelui2: . libmokopanelui

mickey at sita.openmoko.org mickey at sita.openmoko.org
Tue Oct 23 12:21:04 CEST 2007


Author: mickey
Date: 2007-10-23 12:21:01 +0200 (Tue, 23 Oct 2007)
New Revision: 3254

Modified:
   trunk/src/target/OM-2007.2/libraries/libmokopanelui2/ChangeLog
   trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c
Log:
libmokopanelui2: strdup the string that gets passed from outside the
glib mainloop to the inside. should fix recent icon breakage in gsm panel


Modified: trunk/src/target/OM-2007.2/libraries/libmokopanelui2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokopanelui2/ChangeLog	2007-10-23 10:02:46 UTC (rev 3253)
+++ trunk/src/target/OM-2007.2/libraries/libmokopanelui2/ChangeLog	2007-10-23 10:21:01 UTC (rev 3254)
@@ -1,6 +1,12 @@
+2007-10-23	Michael Lauer  <mickey at openmoko.org>
+
+	* libmokopanelui/moko-panel-applet.c:
+	Strdup the string that will be passed from outside the
+	mainloop to inside it. Fixes recent breakage of gsm panel icons.
+
 2007-10-19	Michael Lauer  <mickey at openmoko.org>
 
-	* libmokopanelui/moko-panel-appet.c:
+	* libmokopanelui/moko-panel-applet.c:
 	Try to workaround size-calculation bug in MBScaledPanelImage by
 	setting the actual icon @ mainloop idle time (and hopefully
 	after the enclosing widget has already been realized and we have

Modified: trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c	2007-10-23 10:02:46 UTC (rev 3253)
+++ trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c	2007-10-23 10:21:01 UTC (rev 3254)
@@ -40,7 +40,7 @@
 {
     gboolean is_initialized;
     gboolean hold_timeout_triggered;
-    const char* filename_for_icon;
+    char* filename_for_icon;
 } MokoPanelAppletPrivate;
 
 enum {
@@ -205,6 +205,7 @@
     {
         g_debug( "moko_panel_applet_iconadd_cb:'%s' (%p)", priv->filename_for_icon, priv->filename_for_icon );
         mb_panel_scaling_image_set_icon( MB_PANEL_SCALING_IMAGE(self->icon), priv->filename_for_icon );
+        g_free( priv->filename_for_icon );
         priv->filename_for_icon = 0;
     }
     return FALSE;
@@ -225,8 +226,8 @@
         gtk_event_box_set_visible_window( GTK_EVENT_BOX(self->eventbox), FALSE );
         gtk_widget_show_all( self->eventbox );
     }
-    priv->filename_for_icon = filename;
-    g_idle_add( G_CALLBACK(moko_panel_applet_iconadd_cb), self );
+    priv->filename_for_icon = g_strdup( filename );
+    g_idle_add( (GSourceFunc) moko_panel_applet_iconadd_cb, self );
 }
 
 void moko_panel_applet_set_pixbuf(MokoPanelApplet* self, GdkPixbuf* pixbuf)





More information about the commitlog mailing list