Use PACKAGE_DATA_DIR as $(datadir)/lxpanel, not equal to $(datadir)
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Fri, 21 Feb 2014 23:13:45 +0000 (01:13 +0200)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Fri, 21 Feb 2014 23:13:45 +0000 (01:13 +0200)
The name suggests it's package's data directory, not system common one.

15 files changed:
src/Makefile.am
src/configurator.c
src/panel.c
src/plugins/Makefile.am
src/plugins/cpufreq/Makefile.am
src/plugins/cpufreq/cpufreq.c
src/plugins/dclock.c
src/plugins/kbled/Makefile.am
src/plugins/kbled/kbled.c
src/plugins/menu.c
src/plugins/netstat/Makefile.am
src/plugins/netstat/nsconfig.h
src/plugins/netstatus/Makefile.am
src/plugins/volumealsa/Makefile.am
src/plugins/volumealsa/volumealsa.c

index 5226fb1..2941ab5 100644 (file)
@@ -9,7 +9,7 @@ lxpanel_CFLAGS = \
        -I$(top_srcdir)/include \
        -I$(top_srcdir)/src/plugins \
        -DPACKAGE_LIB_DIR=\""$(libdir)"\" \
-       -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+       -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\" \
        -DPACKAGE_UI_DIR=\""$(datadir)/lxpanel/ui"\" \
        -DPACKAGE_BIN_DIR=\""$(bindir)"\" \
        -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
index bfacd7e..58c8d6b 100644 (file)
@@ -1511,7 +1511,7 @@ char* get_config_file( const char* profile, const char* file_name, gboolean is_g
     char* path;
     if( is_global )
     {
-        path = g_build_filename( PACKAGE_DATA_DIR, "lxpanel/profile", profile, file_name, NULL );
+        path = g_build_filename( PACKAGE_DATA_DIR "/profile", profile, file_name, NULL );
     }
     else
     {
index 3d25116..0d61df8 100644 (file)
@@ -737,7 +737,7 @@ static void panel_popupmenu_about( GtkMenuItem* item, Panel* panel )
     else 
     {
         gtk_about_dialog_set_logo(  GTK_ABOUT_DIALOG(about),
-                                    gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR "/lxpanel/images/my-computer.png", NULL));
+                                    gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR "/images/my-computer.png", NULL));
     }
 
     gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about), _("Copyright (C) 2008-2013"));
@@ -764,7 +764,7 @@ void panel_apply_icon( GtkWindow *w )
        }
     else
     {
-               window_icon = gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR "/lxpanel/images/my-computer.png", NULL);
+               window_icon = gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR "/images/my-computer.png", NULL);
        }
     gtk_window_set_icon(w, window_icon);
 }
@@ -1622,7 +1622,7 @@ int main(int argc, char *argv[], char *env[])
     }
 
     /* Add our own icons to the search path of icon theme */
-    gtk_icon_theme_append_search_path( gtk_icon_theme_get_default(), PACKAGE_DATA_DIR "/lxpanel/images" );
+    gtk_icon_theme_append_search_path( gtk_icon_theme_get_default(), PACKAGE_DATA_DIR "/images" );
 
     fbev = fb_ev_new();
     win_grp = gtk_window_group_new();
index 25ebf65..f8113fc 100644 (file)
@@ -16,7 +16,7 @@ libbuiltin_plugins_a_CFLAGS = \
        -I$(top_srcdir)/include \
        -I$(top_srcdir)/src \
        -I$(top_srcdir)/src/plugins \
-       -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+       -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\" \
        -DPACKAGE_UI_DIR=\""$(datadir)/lxpanel/ui"\" \
        -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
        $(PACKAGE_CFLAGS) \
index d7eab4e..593c69b 100644 (file)
@@ -2,7 +2,7 @@ cpufreq_la_CFLAGS = \
        -I. \
        -I$(top_srcdir)/src \
        $(PACKAGE_CFLAGS) \
-       -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+       -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\" \
        $(G_CAST_CHECKS)
 
 module_LTLIBRARIES = cpufreq.la
index 9d1532b..dd68ddb 100644 (file)
@@ -33,7 +33,7 @@
 
 #include "dbg.h"
 
-#define PROC_ICON            PACKAGE_DATA_DIR "/lxpanel/images/cpufreq-icon.png"
+#define PROC_ICON            PACKAGE_DATA_DIR "/images/cpufreq-icon.png"
 #define SYSFS_CPU_DIRECTORY "/sys/devices/system/cpu"
 #define SCALING_GOV         "scaling_governor"
 #define SCALING_AGOV        "scaling_available_governors"
index ff7cfb4..1ff0cb0 100644 (file)
@@ -370,7 +370,7 @@ static gboolean dclock_apply_configuration(gpointer user_data)
     if (dc->icon_only)
     {
         if(panel_image_set_icon_theme(dc->panel, dc->clock_icon, "clock") != FALSE) {
-            panel_image_set_from_file(dc->panel, dc->clock_icon, PACKAGE_DATA_DIR "/lxpanel/images/clock.png");
+            panel_image_set_from_file(dc->panel, dc->clock_icon, PACKAGE_DATA_DIR "/images/clock.png");
         }
         gtk_widget_show(dc->clock_icon);
         gtk_widget_hide(dc->clock_label);
index 3f7d7cb..c752cf7 100644 (file)
@@ -1,7 +1,7 @@
 kbled_la_CFLAGS = \
     -I. \
     -I$(top_srcdir)/src \
-    -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+    -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\" \
     $(PACKAGE_CFLAGS) \
     $(G_CAST_CHECKS)
 
index 640596f..3e11e3f 100644 (file)
@@ -98,7 +98,7 @@ static void kbled_update_image(KeyboardLEDPlugin * kl, int i, unsigned int state
 {
        if(panel_image_set_icon_theme(kl->plugin->panel, kl->indicator_image[i], (state ? on_icons_theme[i] : off_icons_theme[i])) != TRUE) {
                char * file = g_build_filename(
-                       PACKAGE_DATA_DIR "/lxpanel/images",
+                       PACKAGE_DATA_DIR "/images",
                        ((state) ? on_icons[i] : off_icons[i]),
                        NULL);
                panel_image_set_from_file(kl->plugin->panel, kl->indicator_image[i], file);
index 072f6bd..c68841a 100644 (file)
@@ -37,7 +37,7 @@
 
 #include "dbg.h"
 
-#define DEFAULT_MENU_ICON PACKAGE_DATA_DIR "/lxpanel/images/my-computer.png"
+#define DEFAULT_MENU_ICON PACKAGE_DATA_DIR "/images/my-computer.png"
 /*
  * SuxPanel version 0.1
  * Copyright (c) 2003 Leandro Pereira <leandro@linuxmag.com.br>
index 5a82c60..739460e 100644 (file)
@@ -1,7 +1,7 @@
 netstat_la_CFLAGS = \
     -I. \
     -I$(top_srcdir)/src \
-    -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+    -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\" \
     $(PACKAGE_CFLAGS) \
     $(G_CAST_CHECKS)
 
index 29f1cf3..4c9b13f 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef HAVE_NSCONFIG_H
 #define HAVE_NSCONFIG_H
 
-#define RESOURCE_DIR PACKAGE_DATA_DIR "/lxpanel/images"
+#define RESOURCE_DIR PACKAGE_DATA_DIR "/images"
 #define ICONS_CONNECTED                RESOURCE_DIR "/ns-connected.png"
 #define ICONS_DISCONNECT       RESOURCE_DIR "/ns-disconnect.png"
 #define ICONS_PROBLEM          RESOURCE_DIR "/ns-problem.png"
index 5a95e7e..fc5bddb 100644 (file)
@@ -1,7 +1,7 @@
 netstatus_la_CFLAGS = \
        -I. \
        -I$(top_srcdir)/src \
-       -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+       -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\" \
        -DPACKAGE_UI_DIR=\""$(datadir)/lxpanel/ui"\" \
        $(PACKAGE_CFLAGS) \
        $(G_CAST_CHECKS)
index 6acf588..c3c0d9b 100644 (file)
@@ -3,7 +3,7 @@ if BUILD_ALSA_PLUGINS
 volumealsa_la_CFLAGS = \
        -I. \
        -I$(top_srcdir)/src \
-       -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+       -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\" \
        $(PACKAGE_CFLAGS) \
        $(G_CAST_CHECKS)
 
index d619e78..55fe45e 100644 (file)
 #include "private.h"
 #include "dbg.h"
 
-#define ICONS_VOLUME_HIGH   PACKAGE_DATA_DIR "/lxpanel/images/volume-high.png"
-#define ICONS_VOLUME_MEDIUM PACKAGE_DATA_DIR "/lxpanel/images/volume-medium.png"
-#define ICONS_VOLUME_LOW    PACKAGE_DATA_DIR "/lxpanel/images/volume-low.png"
-#define ICONS_MUTE          PACKAGE_DATA_DIR "/lxpanel/images/mute.png"
+#define ICONS_VOLUME_HIGH   PACKAGE_DATA_DIR "/images/volume-high.png"
+#define ICONS_VOLUME_MEDIUM PACKAGE_DATA_DIR "/images/volume-medium.png"
+#define ICONS_VOLUME_LOW    PACKAGE_DATA_DIR "/images/volume-low.png"
+#define ICONS_MUTE          PACKAGE_DATA_DIR "/images/mute.png"
 
 typedef struct {