summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/capplet/Makefile.am41
-rw-r--r--src/capplet/mate-notification-applet.c7
2 files changed, 40 insertions, 8 deletions
diff --git a/src/capplet/Makefile.am b/src/capplet/Makefile.am
index bf2ad40..af7569a 100644
--- a/src/capplet/Makefile.am
+++ b/src/capplet/Makefile.am
@@ -3,8 +3,12 @@ define generate_resources_deps
endef
bin_PROGRAMS = mate-notification-properties
-libexec_PROGRAMS = mate-notification-applet
+if ENABLE_IN_PROCESS
+pkglib_LTLIBRARIES = libmate-notification-applet.la
+else
+libexec_PROGRAMS = mate-notification-applet
+endif
NULL =
mate_notification_properties_CFLAGS = \
@@ -35,6 +39,33 @@ mate_notification_properties_SOURCES = \
man_MANS = mate-notification-properties.1
+if ENABLE_IN_PROCESS
+
+libmate_notification_applet_la_SOURCES = \
+ $(mate_notification_applet_resources_files) \
+ ../common/constants.h \
+ mate-notification-applet.c \
+ $(NULL)
+
+libmate_notification_applet_la_CFLAGS = \
+ -I$(top_srcdir)/src/common \
+ $(NOTIFICATION_APPLET_CFLAGS) \
+ -DMATELOCALEDIR=\"$(datadir)/locale\" \
+ -DRESOURCE_PATH=\""/org/mate/panel/applet/notifications/"\" \
+ $(WARN_CFLAGS) \
+ $(NULL)
+
+libmate_notification_applet_la_LIBADD = \
+ $(NOTIFICATION_APPLET_LIBS) \
+ $(NULL)
+
+else
+mate_notification_applet_SOURCES = \
+ $(mate_notification_applet_resources_files) \
+ ../common/constants.h \
+ mate-notification-applet.c \
+ $(NULL)
+
mate_notification_applet_CFLAGS = \
-I$(top_srcdir)/src/common \
$(NOTIFICATION_APPLET_CFLAGS) \
@@ -47,17 +78,15 @@ mate_notification_applet_LDADD = \
$(NOTIFICATION_APPLET_LIBS) \
$(NULL)
+endif
+
mate_notification_applet_resources_xml = org.mate.panel.applet.notifications.gresource.xml
mate_notification_applet_resources_deps = $(call generate_resources_deps $(mate_notification_applet_resources_xml))
mate_notification_applet_resources_files = mate-notification-applet-resources.h mate-notification-applet-resources.c
$(mate_notification_applet_resources_files): $(mate_notification_applet_resources_xml) Makefile $(mate_notification_applet_resources_deps)
$(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) $< \
--target $@ --sourcedir $(srcdir) --generate --c-name notification_applet
-mate_notification_applet_SOURCES = \
- $(mate_notification_applet_resources_files) \
- ../common/constants.h \
- mate-notification-applet.c \
- $(NULL)
+
BUILT_SOURCES = \
$(mate_notification_properties_resources_files) \
diff --git a/src/capplet/mate-notification-applet.c b/src/capplet/mate-notification-applet.c
index 95aef37..b76cf29 100644
--- a/src/capplet/mate-notification-applet.c
+++ b/src/capplet/mate-notification-applet.c
@@ -173,16 +173,19 @@ applet_main (MatePanelApplet *applet_widget)
textdomain (GETTEXT_PACKAGE);
#endif /* ENABLE_NLS */
+#ifndef ENABLE_IN_PROCESS
g_set_application_name (_("Do Not Disturb"));
+#endif
gtk_window_set_default_icon_name ("mate-notification-properties");
applet = g_new (MateNotificationApplet, 1);
applet->applet = applet_widget;
applet->settings = g_settings_new (GSETTINGS_SCHEMA);
+#ifndef ENABLE_IN_PROCESS
/* needed to clamp ourselves to the panel size */
mate_panel_applet_set_flags (MATE_PANEL_APPLET (applet), MATE_PANEL_APPLET_EXPAND_MINOR);
-
+#endif
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
applet->image_on = gtk_image_new ();
@@ -257,7 +260,7 @@ applet_factory (MatePanelApplet *applet_widget,
return FALSE;
}
-MATE_PANEL_APPLET_OUT_PROCESS_FACTORY ("MateNotificationAppletFactory",
+PANEL_APPLET_FACTORY ("MateNotificationAppletFactory",
PANEL_TYPE_APPLET,
"Do Not Disturb Applet",
applet_factory,