New API lxpanel_image_new_for_fm_icon() similar to lxpanel_image_new_for_icon().
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Sat, 22 Nov 2014 01:17:47 +0000 (03:17 +0200)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Sat, 22 Nov 2014 01:17:47 +0000 (03:17 +0200)
src/misc.c
src/misc.h

index ca6c791..cd4b33b 100644 (file)
@@ -1092,6 +1092,12 @@ GtkWidget *lxpanel_image_new_for_icon(LXPanel *panel, const gchar *name,
     return _gtk_image_new_for_icon(panel, fm_icon_from_name(name), height, fallback);
 }
 
+GtkWidget *lxpanel_image_new_for_fm_icon(LXPanel *panel, FmIcon *icon,
+                                         gint height, const char *fallback)
+{
+    return _gtk_image_new_for_icon(panel, g_object_ref(icon), height, fallback);
+}
+
 gboolean lxpanel_image_change_icon(GtkWidget *img, const gchar *name, const char *fallback)
 {
     ImgData * data = (ImgData *) g_object_get_qdata(G_OBJECT(img), img_data_id);
index d0468dc..0339367 100644 (file)
@@ -192,6 +192,8 @@ void lxpanel_button_update_icon(GtkWidget* btn, FmIcon *icon, gint size);
  */
 GtkWidget *lxpanel_image_new_for_icon(LXPanel *panel, const gchar *name,
                                       gint height, const gchar *fallback);
+GtkWidget *lxpanel_image_new_for_fm_icon(LXPanel *panel, FmIcon *icon,
+                                         gint height, const gchar *fallback);
 
 /**
  * lxpanel_image_change_icon