summaryrefslogtreecommitdiff
path: root/applets/notification_area
diff options
context:
space:
mode:
Diffstat (limited to 'applets/notification_area')
-rw-r--r--applets/notification_area/Makefile.am23
-rw-r--r--applets/notification_area/main.c7
-rw-r--r--applets/notification_area/main.h2
-rw-r--r--applets/notification_area/na.gresource.xml6
4 files changed, 29 insertions, 9 deletions
diff --git a/applets/notification_area/Makefile.am b/applets/notification_area/Makefile.am
index 4e7272e5..083b4524 100644
--- a/applets/notification_area/Makefile.am
+++ b/applets/notification_area/Makefile.am
@@ -14,7 +14,6 @@ AM_CPPFLAGS = \
-I$(top_builddir)/libmate-panel-applet \
-DMATELOCALEDIR=\""$(datadir)/locale"\" \
-DG_LOG_DOMAIN=\""notification-area-applet"\" \
- -DNOTIFICATION_AREA_MENU_UI_DIR=\""$(uidir)"\" \
-DPROVIDE_WATCHER_SERVICE=1 \
$(DISABLE_DEPRECATED_CFLAGS)
@@ -33,7 +32,10 @@ libtray_la_LIBADD = \
status-notifier/libstatus-notifier.la \
system-tray/libsystem-tray.la
-NOTIFICATION_AREA_SOURCES = main.c main.h
+NOTIFICATION_AREA_SOURCES = \
+ main.c \
+ main.h \
+ $(BUILT_SOURCES)
NOTIFICATION_AREA_LDADD = \
../../libmate-panel-applet/libmate-panel-applet-4.la \
@@ -91,12 +93,23 @@ org.mate.panel.applet.NotificationAreaAppletFactory.service: $(service_in_files)
$< > $@
endif
-uidir = $(datadir)/mate-panel/ui
-ui_DATA = notification-area-menu.xml
+ui_FILES = \
+ notification-area-menu.xml
+
+na-resources.c: na.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/na.gresource.xml)
+ $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate --c-name na $<
+
+na-resources.h: na.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/na.gresource.xml)
+ $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate --c-name na $<
+
+BUILT_SOURCES = \
+ na-resources.c \
+ na-resources.h
EXTRA_DIST = \
org.mate.panel.NotificationAreaApplet.mate-panel-applet.in.in \
- $(ui_DATA) \
+ $(ui_FILES) \
+ na.gresource.xml \
$(service_in_files)
CLEANFILES = \
diff --git a/applets/notification_area/main.c b/applets/notification_area/main.c
index 069a74b3..f656d029 100644
--- a/applets/notification_area/main.c
+++ b/applets/notification_area/main.c
@@ -196,13 +196,12 @@ na_tray_applet_realize (GtkWidget *widget)
parent_class_realize (widget);
GtkActionGroup* action_group;
- gchar* ui_path;
action_group = gtk_action_group_new("NA Applet Menu Actions");
gtk_action_group_set_translation_domain(action_group, GETTEXT_PACKAGE);
gtk_action_group_add_actions(action_group, menu_actions, G_N_ELEMENTS(menu_actions), applet);
- ui_path = g_build_filename(NOTIFICATION_AREA_MENU_UI_DIR, "notification-area-menu.xml", NULL);
- mate_panel_applet_setup_menu_from_file(MATE_PANEL_APPLET(applet), ui_path, action_group);
- g_free(ui_path);
+ mate_panel_applet_setup_menu_from_resource (MATE_PANEL_APPLET (applet),
+ NA_RESOURCE_PATH "notification-area-menu.xml",
+ action_group);
g_object_unref(action_group);
}
diff --git a/applets/notification_area/main.h b/applets/notification_area/main.h
index 9c0ad87b..3b8f11f1 100644
--- a/applets/notification_area/main.h
+++ b/applets/notification_area/main.h
@@ -24,6 +24,8 @@
#include <mate-panel-applet.h>
+#define NA_RESOURCE_PATH "/org/mate/panel/applet/na/"
+
G_BEGIN_DECLS
#define NA_TYPE_TRAY_APPLET (na_tray_applet_get_type ())
diff --git a/applets/notification_area/na.gresource.xml b/applets/notification_area/na.gresource.xml
new file mode 100644
index 00000000..1b20172a
--- /dev/null
+++ b/applets/notification_area/na.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/mate/panel/applet/na">
+ <file compressed="true">notification-area-menu.xml</file>
+ </gresource>
+</gresources>