summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'xfce-extra/xfce4-linelight-plugin/files/xfce4-linelight-plugin-0.1.7-port-to-xfcerc.patch')
-rw-r--r--xfce-extra/xfce4-linelight-plugin/files/xfce4-linelight-plugin-0.1.7-port-to-xfcerc.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/xfce-extra/xfce4-linelight-plugin/files/xfce4-linelight-plugin-0.1.7-port-to-xfcerc.patch b/xfce-extra/xfce4-linelight-plugin/files/xfce4-linelight-plugin-0.1.7-port-to-xfcerc.patch
new file mode 100644
index 000000000000..2c7bb4795248
--- /dev/null
+++ b/xfce-extra/xfce4-linelight-plugin/files/xfce4-linelight-plugin-0.1.7-port-to-xfcerc.patch
@@ -0,0 +1,61 @@
+http://bugs.gentoo.org/411949
+http://bugs.ganymede.ch/
+http://lionel.lefolgoc.net/misc/01_port-to-xfcerc.patch
+
+--- panel-plugin/linelight.c
++++ panel-plugin/linelight.c
+@@ -207,7 +207,7 @@ void linelight_add_list_entry(LineLightD
+ remove_newline(entry);
+
+ GtkTreeIter iter;
+- char *icon;
++ const gchar *icon = NULL;
+ GdkPixbuf *pixbuf;
+
+ gtk_list_store_insert(data->list, &iter, data->listPointer[sec]);
+@@ -218,13 +218,15 @@ void linelight_add_list_entry(LineLightD
+ //icon
+ if (g_file_query_exists (file, NULL) && sec == BIN_SECTION )
+ {
+- XfceDesktopEntry* app = xfce_desktop_entry_new(entry,categories,3);
++ XfceRc* app = xfce_rc_simple_open(entry, TRUE);
+
+- if (app != NULL && xfce_desktop_entry_get_string(app, "Icon", TRUE, &icon) && NULL != (pixbuf= load_icon(icon)))
++ if (app != NULL)
+ {
+- gtk_list_store_set(data->list, &iter, ICON_COL, pixbuf, -1);
+- g_object_unref(app);
+- free(icon);
++ xfce_rc_set_group(app, G_KEY_FILE_DESKTOP_GROUP);
++ icon = xfce_rc_read_entry(app, G_KEY_FILE_DESKTOP_KEY_ICON, NULL);
++ if (icon != NULL && NULL != (pixbuf= load_icon(icon)))
++ gtk_list_store_set(data->list, &iter, ICON_COL, pixbuf, -1);
++ xfce_rc_close(app);
+ }
+ }
+ else if (file != NULL)
+--- panel-plugin/main.c
++++ panel-plugin/main.c
+@@ -155,14 +155,15 @@ static void cell_renderer(GtkTreeViewCol
+ }
+ else if (strstr(name,".desktop") != NULL) //Application names based on .desktop files
+ {
+- XfceDesktopEntry *application = xfce_desktop_entry_new(path,categories,3);
+- if (XFCE_IS_DESKTOP_ENTRY(application))
++ XfceRc *application = xfce_rc_simple_open(path, TRUE);
++ if (application != NULL)
+ {
+- char* app_name;
+- xfce_desktop_entry_get_string(application, "Name", TRUE, &app_name);
+- g_object_unref(application);
+- g_object_set(cell,"text", app_name,NULL);
+- free(app_name);
++ const gchar* app_name = NULL;
++ xfce_rc_set_group(application, G_KEY_FILE_DESKTOP_GROUP);
++ app_name = xfce_rc_read_entry(application, G_KEY_FILE_DESKTOP_KEY_NAME, NULL);
++ if (app_name != NULL)
++ g_object_set(cell,"text", app_name, NULL);
++ xfce_rc_close(application);
+ }
+ }
+ else