summaryrefslogtreecommitdiff
path: root/stickynotes
diff options
context:
space:
mode:
Diffstat (limited to 'stickynotes')
-rw-r--r--stickynotes/Makefile.am43
-rw-r--r--stickynotes/org.mate.applets.StickyNotesApplet.mate-panel-applet.desktop.in.in2
-rw-r--r--stickynotes/org.mate.panel.applet.StickyNotesAppletFactory.service.in3
-rw-r--r--stickynotes/stickynotes.c6
-rw-r--r--stickynotes/stickynotes_applet.c13
5 files changed, 50 insertions, 17 deletions
diff --git a/stickynotes/Makefile.am b/stickynotes/Makefile.am
index 2057f587..6f51c130 100644
--- a/stickynotes/Makefile.am
+++ b/stickynotes/Makefile.am
@@ -1,11 +1,7 @@
NULL =
-APPLET_LOCATION = $(libdir)/mate-applets/libmate-stickynotes-applet.so
-
SUBDIRS = pixmaps docs
-mate_stickynotes_applet_libdir= $(pkglibdir)
-mate_stickynotes_applet_lib_LTLIBRARIES=libmate-stickynotes-applet.la
applet_in_files = org.mate.applets.StickyNotesApplet.mate-panel-applet.desktop.in
service_in_files = org.mate.panel.applet.StickyNotesAppletFactory.service.in
schemas_in_files = stickynotes.schemas.in
@@ -22,7 +18,11 @@ AM_CPPFLAGS = \
${WARN_CFLAGS} \
$(NULL)
-libmate_stickynotes_applet_la_SOURCES = \
+BUILT_SOURCES = \
+ sticky-notes-resources.c \
+ sticky-notes-resources.h \
+ $(NULL)
+APPLET_SOURCES = \
util.h \
util.c \
stickynotes.h \
@@ -33,11 +33,9 @@ libmate_stickynotes_applet_la_SOURCES = \
stickynotes_callbacks.c \
stickynotes_applet.c \
stickynotes_applet_callbacks.c \
- sticky-notes-resources.c \
- sticky-notes-resources.h \
$(NULL)
-libmate_stickynotes_applet_la_LIBADD = \
+APPLET_LIBS = \
$(STICKYNOTES_LIBS) \
$(MATE_APPLETS4_LIBS) \
$(LIBWNCK_LIBS) \
@@ -45,6 +43,31 @@ libmate_stickynotes_applet_la_LIBADD = \
-lX11 \
$(NULL)
+if ENABLE_IN_PROCESS
+APPLET_LOCATION = $(pkglibdir)/libmate-stickynotes-applet.so
+pkglib_LTLIBRARIES = libmate-stickynotes-applet.la
+nodist_libmate_stickynotes_applet_la_SOURCES = $(BUILT_SOURCES)
+libmate_stickynotes_applet_la_SOURCES = $(APPLET_SOURCES)
+libmate_stickynotes_applet_la_CFLAGS = $(AM_CFLAGS)
+libmate_stickynotes_applet_la_LDFLAGS = -module -avoid-version
+libmate_stickynotes_applet_la_LIBADD = $(APPLET_LIBS)
+else !ENABLE_IN_PROCESS
+APPLET_LOCATION = $(libexecdir)/stickynotes-applet
+libexec_PROGRAMS = stickynotes-applet
+nodist_stickynotes_applet_SOURCES = $(BUILT_SOURCES)
+stickynotes_applet_SOURCES = $(APPLET_SOURCES)
+stickynotes_applet_CFLAGS = $(AM_CFLAGS)
+stickynotes_applet_LDADD = $(APPLET_LIBS)
+
+servicedir = $(datadir)/dbus-1/services
+service_DATA = $(service_in_files:.service.in=.service)
+
+$(service_DATA): $(service_in_files) Makefile
+ $(AM_V_GEN)sed \
+ -e "s|\@APPLET_LOCATION\@|$(APPLET_LOCATION)|" \
+ $< > $@
+endif !ENABLE_IN_PROCESS
+
stickynotes_gschema_in_files = org.mate.stickynotes.gschema.xml.in
gsettings_SCHEMAS = $(stickynotes_gschema_in_files:.xml.in=.xml)
@GSETTINGS_RULES@
@@ -61,6 +84,7 @@ applet_DATA = $(applet_in_files:.mate-panel-applet.desktop.in=.mate-panel-applet
$(applet_in_files): $(applet_in_files:=.in) Makefile
$(AM_V_GEN)sed \
-e "s|\@APPLET_LOCATION\@|$(APPLET_LOCATION)|" \
+ -e "s|\@APPLET_IN_PROCESS\@|$(APPLET_IN_PROCESS)|" \
-e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
$< > $@
@@ -70,16 +94,19 @@ $(applet_DATA): $(applet_in_files) Makefile
CLEANFILES = \
$(applet_DATA) \
$(applet_in_files) \
+ $(service_DATA) \
$(gsettings_SCHEMAS) \
sticky-notes-resources.c \
sticky-notes-resources.h \
*.gschema.valid \
+ $(BUILT_SOURCES) \
$(NULL)
endif
EXTRA_DIST = \
$(stickynotes_gschema_in_files) \
+ $(service_in_files) \
$(applet_in_files:=.in) \
sticky-notes-delete.ui \
sticky-notes-delete-all.ui \
diff --git a/stickynotes/org.mate.applets.StickyNotesApplet.mate-panel-applet.desktop.in.in b/stickynotes/org.mate.applets.StickyNotesApplet.mate-panel-applet.desktop.in.in
index 097a8fdd..44a1e460 100644
--- a/stickynotes/org.mate.applets.StickyNotesApplet.mate-panel-applet.desktop.in.in
+++ b/stickynotes/org.mate.applets.StickyNotesApplet.mate-panel-applet.desktop.in.in
@@ -1,7 +1,7 @@
[Applet Factory]
Id=StickyNotesAppletFactory
Location=@APPLET_LOCATION@
-InProcess=true
+InProcess=@APPLET_IN_PROCESS@
Name=Sticky Notes Applet Factory
Description=Sticky Notes Applet Factory
diff --git a/stickynotes/org.mate.panel.applet.StickyNotesAppletFactory.service.in b/stickynotes/org.mate.panel.applet.StickyNotesAppletFactory.service.in
new file mode 100644
index 00000000..bde79ac3
--- /dev/null
+++ b/stickynotes/org.mate.panel.applet.StickyNotesAppletFactory.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.mate.panel.applet.StickyNotesAppletFactory
+Exec=@APPLET_LOCATION@
diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c
index 3f5c7985..85afdc3d 100644
--- a/stickynotes/stickynotes.c
+++ b/stickynotes/stickynotes.c
@@ -822,8 +822,8 @@ stickynotes_save_now (void)
xmlDocSetRootElement (doc, root);
xmlNewProp (root, XML_CHAR ("version"), XML_CHAR (VERSION));
#ifdef GDK_WINDOWING_X11
- GdkDisplay *display = gdk_screen_get_display(gdk_screen_get_default());
- if (GDK_IS_X11_DISPLAY(display))
+ GdkDisplay *display = gdk_screen_get_display (gdk_screen_get_default());
+ if (GDK_IS_X11_DISPLAY (display))
{
WnckScreen *wnck_screen = wnck_screen_get_default ();
wnck_screen_force_update (wnck_screen);
@@ -955,7 +955,7 @@ stickynotes_load (GdkScreen *screen)
GList *new_nodes; /* Lists of xmlNodePtr's */
int x, y, w, h;
#ifdef GDK_WINDOWING_X11
- GdkDisplay *display = gdk_screen_get_display(gdk_screen_get_default());
+ GdkDisplay *display = gdk_screen_get_display (gdk_screen_get_default());
#endif
/* The XML file is $HOME/.config/mate/stickynotes-applet, most probably */
diff --git a/stickynotes/stickynotes_applet.c b/stickynotes/stickynotes_applet.c
index 88785fb3..d88709da 100644
--- a/stickynotes/stickynotes_applet.c
+++ b/stickynotes/stickynotes_applet.c
@@ -84,11 +84,11 @@ stickynotes_applet_factory (MatePanelApplet *mate_panel_applet,
}
/* Sticky Notes applet factory */
-MATE_PANEL_APPLET_IN_PROCESS_FACTORY ("StickyNotesAppletFactory",
- PANEL_TYPE_APPLET,
- "stickynotes_applet",
- stickynotes_applet_factory,
- NULL)
+PANEL_APPLET_FACTORY ("StickyNotesAppletFactory",
+ PANEL_TYPE_APPLET,
+ "stickynotes_applet",
+ stickynotes_applet_factory,
+ NULL)
/* colorshift a surface */
static void
@@ -178,6 +178,9 @@ stickynotes_applet_init (MatePanelApplet *mate_panel_applet)
size = mate_panel_applet_get_size (mate_panel_applet);
scale = gtk_widget_get_scale_factor (GTK_WIDGET (mate_panel_applet));
+#ifndef ENABLE_IN_PROCESS
+ g_set_application_name (_("Sticky Notes"));
+#endif
gtk_window_set_default_icon_name ("mate-sticky-notes-applet");
stickynotes->icon_normal =