1
Description: Port to XfceRc
2
XfceDesktopEntry was deprecated in libxfce4util 4.8.x and has been removed in
4
Author: Lionel Le Folgoc <mrpouit@ubuntu.com>
6
Last-Update: 2012-04-19
8
--- xfce4-linelight-plugin-0.1.7.orig/panel-plugin/linelight.c
9
+++ xfce4-linelight-plugin-0.1.7/panel-plugin/linelight.c
10
@@ -207,7 +207,7 @@ void linelight_add_list_entry(LineLightD
11
remove_newline(entry);
15
+ const gchar *icon = NULL;
18
gtk_list_store_insert(data->list, &iter, data->listPointer[sec]);
19
@@ -218,13 +218,15 @@ void linelight_add_list_entry(LineLightD
21
if (g_file_query_exists (file, NULL) && sec == BIN_SECTION )
23
- XfceDesktopEntry* app = xfce_desktop_entry_new(entry,categories,3);
24
+ XfceRc* app = xfce_rc_simple_open(entry, TRUE);
26
- if (app != NULL && xfce_desktop_entry_get_string(app, "Icon", TRUE, &icon) && NULL != (pixbuf= load_icon(icon)))
29
- gtk_list_store_set(data->list, &iter, ICON_COL, pixbuf, -1);
30
- g_object_unref(app);
32
+ xfce_rc_set_group(app, G_KEY_FILE_DESKTOP_GROUP);
33
+ icon = xfce_rc_read_entry(app, G_KEY_FILE_DESKTOP_KEY_ICON, NULL);
34
+ if (icon != NULL && NULL != (pixbuf= load_icon(icon)))
35
+ gtk_list_store_set(data->list, &iter, ICON_COL, pixbuf, -1);
39
else if (file != NULL)
40
--- xfce4-linelight-plugin-0.1.7.orig/panel-plugin/main.c
41
+++ xfce4-linelight-plugin-0.1.7/panel-plugin/main.c
42
@@ -155,14 +155,15 @@ static void cell_renderer(GtkTreeViewCol
44
else if (strstr(name,".desktop") != NULL) //Application names based on .desktop files
46
- XfceDesktopEntry *application = xfce_desktop_entry_new(path,categories,3);
47
- if (XFCE_IS_DESKTOP_ENTRY(application))
48
+ XfceRc *application = xfce_rc_simple_open(path, TRUE);
49
+ if (application != NULL)
52
- xfce_desktop_entry_get_string(application, "Name", TRUE, &app_name);
53
- g_object_unref(application);
54
- g_object_set(cell,"text", app_name,NULL);
56
+ const gchar* app_name = NULL;
57
+ xfce_rc_set_group(application, G_KEY_FILE_DESKTOP_GROUP);
58
+ app_name = xfce_rc_read_entry(application, G_KEY_FILE_DESKTOP_KEY_NAME, NULL);
59
+ if (app_name != NULL)
60
+ g_object_set(cell,"text", app_name, NULL);
61
+ xfce_rc_close(application);