summaryrefslogtreecommitdiff
path: root/src/capplet
diff options
context:
space:
mode:
Diffstat (limited to 'src/capplet')
-rw-r--r--src/capplet/Makefile.am26
-rw-r--r--src/capplet/Makefile.in669
-rw-r--r--src/capplet/mate-notification-properties.c477
-rw-r--r--src/capplet/mate-notification-properties.desktop.in11
-rw-r--r--src/capplet/mate-notification-properties.ui261
5 files changed, 1444 insertions, 0 deletions
diff --git a/src/capplet/Makefile.am b/src/capplet/Makefile.am
new file mode 100644
index 0000000..c053d80
--- /dev/null
+++ b/src/capplet/Makefile.am
@@ -0,0 +1,26 @@
+bin_PROGRAMS = mate-notification-properties
+
+@INTLTOOL_DESKTOP_RULE@
+
+mate_notification_properties_LDADD = $(NOTIFICATION_CAPPLET_LIBS)
+mate_notification_properties_SOURCES = mate-notification-properties.c
+
+uidir = $(datadir)/mate-notification-daemon
+ui_DATA = mate-notification-properties.ui
+
+desktopdir = $(datadir)/applications
+desktop_in_files = mate-notification-properties.desktop.in
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src/daemon \
+ $(NOTIFICATION_CAPPLET_CFLAGS) \
+ -DENGINES_DIR=\"$(libdir)/mate-notification-daemon/engines\" \
+ -DNOTIFICATION_LOCALEDIR=\"$(datadir)/locale\" \
+ -DNOTIFICATION_UIDIR=\"$(datadir)/mate-notification-daemon\"
+
+CLEANFILES = $(desktop_DATA)
+EXTRA_DIST = $(ui_DATA) $(pixmap_DATA) $(desktop_in_files)
+
+-include $(top_srcdir)/git.mk
diff --git a/src/capplet/Makefile.in b/src/capplet/Makefile.in
new file mode 100644
index 0000000..6f77c4c
--- /dev/null
+++ b/src/capplet/Makefile.in
@@ -0,0 +1,669 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = mate-notification-properties$(EXEEXT)
+subdir = src/capplet
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/macros/intltool.m4 \
+ $(top_srcdir)/macros/libtool.m4 \
+ $(top_srcdir)/macros/ltoptions.m4 \
+ $(top_srcdir)/macros/ltsugar.m4 \
+ $(top_srcdir)/macros/ltversion.m4 \
+ $(top_srcdir)/macros/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(desktopdir)" \
+ "$(DESTDIR)$(uidir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_mate_notification_properties_OBJECTS = \
+ mate-notification-properties.$(OBJEXT)
+mate_notification_properties_OBJECTS = \
+ $(am_mate_notification_properties_OBJECTS)
+am__DEPENDENCIES_1 =
+mate_notification_properties_DEPENDENCIES = $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(mate_notification_properties_SOURCES)
+DIST_SOURCES = $(mate_notification_properties_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(desktop_DATA) $(ui_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_CFLAGS = @AM_CFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DATADIRNAME = @DATADIRNAME@
+DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_LIBS = @GDK_LIBS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBDIR = @LIBDIR@
+LIBEXECDIR = @LIBEXECDIR@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MATECONFTOOL = @MATECONFTOOL@
+MATECONF_SCHEMA_CONFIG_SOURCE = @MATECONF_SCHEMA_CONFIG_SOURCE@
+MATECONF_SCHEMA_FILE_DIR = @MATECONF_SCHEMA_FILE_DIR@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NOTIFICATION_CAPPLET_CFLAGS = @NOTIFICATION_CAPPLET_CFLAGS@
+NOTIFICATION_CAPPLET_LIBS = @NOTIFICATION_CAPPLET_LIBS@
+NOTIFICATION_DAEMON_CFLAGS = @NOTIFICATION_DAEMON_CFLAGS@
+NOTIFICATION_DAEMON_LIBS = @NOTIFICATION_DAEMON_LIBS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SYSCONFDIR = @SYSCONFDIR@
+THEME_CFLAGS = @THEME_CFLAGS@
+THEME_LIBS = @THEME_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CXXFLAGS = @WARN_CXXFLAGS@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+mate_notification_properties_LDADD = $(NOTIFICATION_CAPPLET_LIBS)
+mate_notification_properties_SOURCES = mate-notification-properties.c
+uidir = $(datadir)/mate-notification-daemon
+ui_DATA = mate-notification-properties.ui
+desktopdir = $(datadir)/applications
+desktop_in_files = mate-notification-properties.desktop.in
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src/daemon \
+ $(NOTIFICATION_CAPPLET_CFLAGS) \
+ -DENGINES_DIR=\"$(libdir)/mate-notification-daemon/engines\" \
+ -DNOTIFICATION_LOCALEDIR=\"$(datadir)/locale\" \
+ -DNOTIFICATION_UIDIR=\"$(datadir)/mate-notification-daemon\"
+
+CLEANFILES = $(desktop_DATA)
+EXTRA_DIST = $(ui_DATA) $(pixmap_DATA) $(desktop_in_files)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/capplet/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/capplet/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+mate-notification-properties$(EXEEXT): $(mate_notification_properties_OBJECTS) $(mate_notification_properties_DEPENDENCIES)
+ @rm -f mate-notification-properties$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(mate_notification_properties_OBJECTS) $(mate_notification_properties_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mate-notification-properties.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-desktopDATA: $(desktop_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)"
+ @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \
+ done
+
+uninstall-desktopDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(desktopdir)" && rm -f $$files
+install-uiDATA: $(ui_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(uidir)" || $(MKDIR_P) "$(DESTDIR)$(uidir)"
+ @list='$(ui_DATA)'; test -n "$(uidir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(uidir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(uidir)" || exit $$?; \
+ done
+
+uninstall-uiDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(ui_DATA)'; test -n "$(uidir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(uidir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(uidir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(uidir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-desktopDATA install-uiDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-desktopDATA \
+ uninstall-uiDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libtool ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am \
+ install-desktopDATA install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip install-uiDATA \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-binPROGRAMS \
+ uninstall-desktopDATA uninstall-uiDATA
+
+
+@INTLTOOL_DESKTOP_RULE@
+
+-include $(top_srcdir)/git.mk
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/capplet/mate-notification-properties.c b/src/capplet/mate-notification-properties.c
new file mode 100644
index 0000000..006fdf2
--- /dev/null
+++ b/src/capplet/mate-notification-properties.c
@@ -0,0 +1,477 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * Copyright (C) 2007 Jonh Wendell <[email protected]>
+ * Copyright (C) 2011 Perberos <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <glib/gi18n.h>
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <mateconf/mateconf-client.h>
+#include <string.h>
+#include <libmatenotify/notify.h>
+
+#include "stack.h"
+
+#define MATECONF_KEY_DAEMON "/apps/mate-notification-daemon"
+#define MATECONF_KEY_THEME MATECONF_KEY_DAEMON "/theme"
+#define MATECONF_KEY_POPUP_LOCATION MATECONF_KEY_DAEMON "/popup_location"
+
+#define N_LISTENERS 2
+
+#define NOTIFICATION_UI_FILE "mate-notification-properties.ui"
+
+typedef struct {
+ MateConfClient* client;
+
+ GtkWidget* dialog;
+ GtkWidget* position_combo;
+ GtkWidget* theme_combo;
+ GtkWidget* preview_button;
+
+ NotifyNotification* preview;
+
+ guint listeners[N_LISTENERS];
+ int n_listeners;
+ int expected_listeners;
+} NotificationAppletDialog;
+
+enum {
+ NOTIFY_POSITION_LABEL,
+ NOTIFY_POSITION_NAME,
+ N_COLUMNS_POSITION
+};
+
+enum {
+ NOTIFY_THEME_LABEL,
+ NOTIFY_THEME_NAME,
+ NOTIFY_THEME_FILENAME,
+ N_COLUMNS_THEME
+};
+
+static void notification_properties_location_notify(MateConfClient* client, guint cnx_id, MateConfEntry* entry, NotificationAppletDialog* dialog)
+{
+ GtkTreeModel* model;
+ GtkTreeIter iter;
+ const char* location;
+ gboolean valid;
+
+ if (!entry->value || entry->value->type != MATECONF_VALUE_STRING)
+ {
+ return;
+ }
+
+ location = mateconf_value_get_string(entry->value);
+
+ model = gtk_combo_box_get_model(GTK_COMBO_BOX(dialog->position_combo));
+ valid = gtk_tree_model_get_iter_first(model, &iter);
+
+ for (valid = gtk_tree_model_get_iter_first(model, &iter); valid; valid = gtk_tree_model_iter_next(model, &iter))
+ {
+ gchar* key;
+
+ gtk_tree_model_get(model, &iter, NOTIFY_POSITION_NAME, &key, -1);
+
+ if (g_str_equal(key, location))
+ {
+ gtk_combo_box_set_active_iter(GTK_COMBO_BOX(dialog->position_combo), &iter);
+ g_free(key);
+ break;
+ }
+
+ g_free(key);
+ }
+}
+
+static void notification_properties_location_changed(GtkComboBox* widget, NotificationAppletDialog* dialog)
+{
+ char* location;
+ GtkTreeIter iter;
+
+ GtkTreeModel* model = gtk_combo_box_get_model(GTK_COMBO_BOX(dialog->position_combo));
+
+ if (!gtk_combo_box_get_active_iter(GTK_COMBO_BOX(dialog->position_combo), &iter))
+ {
+ return;
+ }
+
+ gtk_tree_model_get(model, &iter, NOTIFY_POSITION_NAME, &location, -1);
+
+ mateconf_client_set_string(dialog->client, MATECONF_KEY_POPUP_LOCATION, location, NULL);
+ g_free(location);
+}
+
+static void notification_properties_dialog_setup_positions(NotificationAppletDialog* dialog)
+{
+ char* location;
+ gboolean valid;
+ GtkTreeModel* model;
+ GtkTreeIter iter;
+
+ model = gtk_combo_box_get_model(GTK_COMBO_BOX(dialog->position_combo));
+ g_signal_connect(dialog->position_combo, "changed", G_CALLBACK(notification_properties_location_changed), dialog);
+
+ location = mateconf_client_get_string(dialog->client, MATECONF_KEY_POPUP_LOCATION, NULL);
+
+ for (valid = gtk_tree_model_get_iter_first(model, &iter); valid; valid = gtk_tree_model_iter_next(model, &iter))
+ {
+ gchar* key;
+
+ gtk_tree_model_get(model, &iter, NOTIFY_POSITION_NAME, &key, -1);
+
+ if (g_str_equal(key, location))
+ {
+ gtk_combo_box_set_active_iter(GTK_COMBO_BOX(dialog->position_combo), &iter);
+ g_free(key);
+ break;
+ }
+
+ g_free(key);
+ }
+
+ dialog->listeners[dialog->n_listeners] = mateconf_client_notify_add(dialog->client, MATECONF_KEY_POPUP_LOCATION, (MateConfClientNotifyFunc) notification_properties_location_notify, dialog, NULL, NULL);
+ dialog->n_listeners++;
+ g_free(location);
+}
+
+static void notification_properties_theme_notify(MateConfClient* client, guint cnx_id, MateConfEntry* entry, NotificationAppletDialog* dialog)
+{
+ if (!entry->value || entry->value->type != MATECONF_VALUE_STRING)
+ {
+ return;
+ }
+
+ const char* theme = mateconf_value_get_string(entry->value);
+
+ GtkTreeModel* model = gtk_combo_box_get_model(GTK_COMBO_BOX(dialog->theme_combo));
+
+ GtkTreeIter iter;
+ gboolean valid;
+
+ for (valid = gtk_tree_model_get_iter_first(model, &iter); valid; valid = gtk_tree_model_iter_next(model, &iter))
+ {
+ gchar* theme_name;
+
+ gtk_tree_model_get(model, &iter, NOTIFY_THEME_NAME, &theme_name, -1);
+
+ if (g_str_equal(theme_name, theme))
+ {
+ gtk_combo_box_set_active_iter(GTK_COMBO_BOX(dialog->theme_combo), &iter);
+ g_free(theme_name);
+ break;
+ }
+
+ g_free(theme_name);
+ }
+}
+
+static void notification_properties_theme_changed(GtkComboBox* widget, NotificationAppletDialog* dialog)
+{
+ char* theme;
+ GtkTreeIter iter;
+
+ GtkTreeModel* model = gtk_combo_box_get_model(GTK_COMBO_BOX(dialog->theme_combo));
+
+ if (!gtk_combo_box_get_active_iter(GTK_COMBO_BOX(dialog->theme_combo), &iter))
+ {
+ return;
+ }
+
+ gtk_tree_model_get(model, &iter, NOTIFY_THEME_NAME, &theme, -1);
+ mateconf_client_set_string(dialog->client, MATECONF_KEY_THEME, theme, NULL);
+ g_free(theme);
+}
+
+static gchar* get_theme_name(const gchar* filename)
+{
+ /* TODO: Remove magic numbers. Strip "lib" and ".so" */
+ gchar* result = g_strdup(filename + 3);
+ result[strlen(result) - 3] = '\0';
+ return result;
+}
+
+static void notification_properties_dialog_setup_themes(NotificationAppletDialog* dialog)
+{
+ GDir* dir;
+ const gchar* filename;
+ char* theme;
+ char* theme_name;
+ char* theme_label;
+ gboolean valid;
+ GtkListStore* store;
+ GtkTreeIter iter;
+
+ store = gtk_list_store_new(N_COLUMNS_THEME, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
+
+ gtk_combo_box_set_model(GTK_COMBO_BOX(dialog->theme_combo), GTK_TREE_MODEL(store));
+ g_signal_connect(dialog->theme_combo, "changed", G_CALLBACK(notification_properties_theme_changed), dialog);
+
+ if ((dir = g_dir_open(ENGINES_DIR, 0, NULL)))
+ {
+ while ((filename = g_dir_read_name(dir)))
+ {
+ if (g_str_has_prefix(filename, "lib") && g_str_has_suffix(filename, ".so"))
+ {
+ theme_name = get_theme_name(filename);
+
+ /* FIXME: other solution than hardcode? */
+ if (g_str_equal(theme_name, "slider"))
+ {
+ theme_label = g_strdup(_("Slider"));
+ }
+ else if (g_str_equal(theme_name, "standard"))
+ {
+ theme_label = g_strdup(_("Standard theme"));
+ }
+ else
+ {
+ theme_label = g_strdup(theme_name);
+ }
+
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter, NOTIFY_THEME_LABEL, theme_label, NOTIFY_THEME_NAME, theme_name, NOTIFY_THEME_FILENAME, filename, -1);
+ g_free(theme_name);
+ g_free(theme_label);
+ }
+ }
+
+ g_dir_close(dir);
+ }
+ else
+ {
+ g_warning("Error opening themes dir");
+ }
+
+
+ theme = mateconf_client_get_string(dialog->client, MATECONF_KEY_THEME, NULL);
+
+ for (valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter); valid; valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter))
+ {
+ gchar* key;
+
+ gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, NOTIFY_THEME_NAME, &key, -1);
+
+ if (g_str_equal(key, theme))
+ {
+ gtk_combo_box_set_active_iter(GTK_COMBO_BOX(dialog->theme_combo), &iter);
+ g_free(key);
+ break;
+ }
+
+ g_free(key);
+ }
+
+ dialog->listeners[dialog->n_listeners] = mateconf_client_notify_add(dialog->client, MATECONF_KEY_THEME, (MateConfClientNotifyFunc) notification_properties_theme_notify, dialog, NULL, NULL);
+ dialog->n_listeners++;
+ g_free(theme);
+}
+
+static void notification_properties_dialog_help(void)
+{
+ /* Do nothing */
+}
+
+static void show_message(NotificationAppletDialog* dialog, const gchar* message)
+{
+ GtkWidget* d = gtk_message_dialog_new(GTK_WINDOW(dialog->dialog), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", message);
+ gtk_dialog_run(GTK_DIALOG(d));
+ gtk_widget_destroy(d);
+}
+
+static void notification_properties_dialog_preview_closed(NotifyNotification* preview, NotificationAppletDialog* dialog)
+{
+ if (preview == dialog->preview)
+ {
+ dialog->preview = NULL;
+ }
+
+ g_object_unref(preview);
+}
+
+static void notification_properties_dialog_preview(NotificationAppletDialog* dialog)
+{
+ if (!notify_is_initted() && !notify_init("n-d"))
+ {
+ show_message(dialog, _("Error initializing libmatenotify"));
+ return;
+ }
+
+ GError* error = NULL;
+
+ if (dialog->preview)
+ {
+ notify_notification_close(dialog->preview, NULL);
+ g_object_unref(dialog->preview);
+ dialog->preview = NULL;
+ }
+
+ dialog->preview = notify_notification_new(_("Notification Test"), _("Just a test"), "mate-util", NULL);
+
+ if (!notify_notification_show(dialog->preview, &error))
+ {
+ char* message = g_strdup_printf(_("Error while displaying notification: %s"), error->message);
+ show_message(dialog, message);
+ g_error_free(error);
+ g_free(message);
+ }
+
+ g_signal_connect(dialog->preview, "closed", G_CALLBACK(notification_properties_dialog_preview_closed), dialog);
+}
+
+static void notification_properties_dialog_response(GtkWidget* widget, int response, NotificationAppletDialog* dialog)
+{
+ switch (response)
+ {
+ case GTK_RESPONSE_HELP:
+ notification_properties_dialog_help();
+ break;
+
+ case GTK_RESPONSE_ACCEPT:
+ notification_properties_dialog_preview(dialog);
+ break;
+
+ case GTK_RESPONSE_CLOSE:
+ default:
+ gtk_widget_destroy(widget);
+ break;
+ }
+}
+
+static void notification_properties_dialog_destroyed(GtkWidget* widget, NotificationAppletDialog* dialog)
+{
+ dialog->dialog = NULL;
+
+ gtk_main_quit();
+}
+
+static gboolean notification_properties_dialog_init(NotificationAppletDialog* dialog)
+{
+ const char* ui_file;
+
+ if (g_file_test(NOTIFICATION_UI_FILE, G_FILE_TEST_EXISTS))
+ {
+ ui_file = NOTIFICATION_UI_FILE;
+ }
+ else
+ {
+ ui_file = NOTIFICATION_UIDIR "/" NOTIFICATION_UI_FILE;
+ }
+
+ GtkBuilder* builder = gtk_builder_new();
+ GError* error = NULL;
+
+ gtk_builder_add_from_file(builder, ui_file, &error);
+
+ if (error != NULL)
+ {
+ g_warning(_("Could not load user interface file: %s"), error->message);
+ g_error_free(error);
+ return FALSE;
+ }
+
+ dialog->dialog = GTK_WIDGET(gtk_builder_get_object(builder, "dialog"));
+ g_assert(dialog->dialog != NULL);
+
+ dialog->position_combo = GTK_WIDGET(gtk_builder_get_object(builder, "position_combo"));
+ g_assert(dialog->position_combo != NULL);
+
+ dialog->theme_combo = GTK_WIDGET(gtk_builder_get_object(builder, "theme_combo"));
+ g_assert(dialog->theme_combo != NULL);
+
+ g_object_unref(builder);
+
+ g_signal_connect(dialog->dialog, "response", G_CALLBACK(notification_properties_dialog_response), dialog);
+ g_signal_connect(dialog->dialog, "destroy", G_CALLBACK(notification_properties_dialog_destroyed), dialog);
+
+ dialog->client = mateconf_client_get_default();
+ mateconf_client_add_dir(dialog->client, MATECONF_KEY_DAEMON, MATECONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+
+ dialog->expected_listeners = N_LISTENERS;
+ dialog->n_listeners = 0;
+
+ notification_properties_dialog_setup_themes(dialog);
+ notification_properties_dialog_setup_positions(dialog);
+
+ g_assert(dialog->n_listeners == dialog->expected_listeners);
+ gtk_widget_show(dialog->dialog);
+
+ dialog->preview = NULL;
+
+ return TRUE;
+}
+
+static void notification_properties_dialog_finalize(NotificationAppletDialog* dialog)
+{
+ if (dialog->dialog != NULL)
+ {
+ gtk_widget_destroy(dialog->dialog);
+ dialog->dialog = NULL;
+ }
+
+ if (dialog->client != NULL)
+ {
+ int i;
+
+ for (i = 0; i < dialog->n_listeners; i++)
+ {
+ if (dialog->listeners[i])
+ {
+ mateconf_client_notify_remove(dialog->client, dialog->listeners[i]);
+ dialog->listeners[i] = 0;
+ }
+ }
+
+ dialog->n_listeners = 0;
+ mateconf_client_remove_dir(dialog->client, MATECONF_KEY_DAEMON, NULL);
+ g_object_unref(dialog->client);
+ dialog->client = NULL;
+ }
+
+ if (dialog->preview)
+ {
+ notify_notification_close(dialog->preview, NULL);
+ dialog->preview = NULL;
+ }
+}
+
+int main(int argc, char** argv)
+{
+ NotificationAppletDialog dialog = {NULL, }; /* <- ? */
+
+ bindtextdomain(GETTEXT_PACKAGE, NOTIFICATION_LOCALEDIR);
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+ textdomain(GETTEXT_PACKAGE);
+
+ gtk_init(&argc, &argv);
+
+ notify_init("mate-notification-properties");
+
+ if (!notification_properties_dialog_init(&dialog))
+ {
+ notification_properties_dialog_finalize(&dialog);
+ return 1;
+ }
+
+ gtk_main();
+
+ notification_properties_dialog_finalize(&dialog);
+
+ return 0;
+}
diff --git a/src/capplet/mate-notification-properties.desktop.in b/src/capplet/mate-notification-properties.desktop.in
new file mode 100644
index 0000000..4694c99
--- /dev/null
+++ b/src/capplet/mate-notification-properties.desktop.in
@@ -0,0 +1,11 @@
+[Desktop Entry]
+_Name=Pop-Up Notifications
+_Comment=Set your pop-up notification preferences
+Exec=mate-notification-properties
+Icon=mate-notification-properties
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=MATE;GTK;Settings;DesktopSettings;
+OnlyShowIn=MATE;
+
diff --git a/src/capplet/mate-notification-properties.ui b/src/capplet/mate-notification-properties.ui
new file mode 100644
index 0000000..8d56f21
--- /dev/null
+++ b/src/capplet/mate-notification-properties.ui
@@ -0,0 +1,261 @@
+<?xml version="1.0"?>
+<interface>
+ <!-- interface-requires gtk+ 2.12 -->
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkDialog" id="dialog">
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Notification Settings</property>
+ <property name="resizable">False</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="icon_name">mate-notification-properties</property>
+ <property name="type_hint">dialog</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <property name="border_width">5</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;General Options&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"> </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="table3">
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkComboBox" id="theme_combo">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkCellRendererText" id="theme_cellrenderertext"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="position_combo">
+ <property name="visible">True</property>
+ <property name="model">position_liststore</property>
+ <child>
+ <object class="GtkCellRendererText" id="position_cellrenderertext"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">P_osition:</property>
+ <property name="use_markup">True</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">position_combo</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Theme:</property>
+ <property name="use_markup">True</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">theme_combo</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="button3">
+ <property name="label">gtk-help</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <property name="focus_on_click">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button4">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <child>
+ <object class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="icon_name">mate-notification-properties</property>
+ <property name="icon-size">3</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Preview</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button5">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-11">button3</action-widget>
+ <action-widget response="-3">button4</action-widget>
+ <action-widget response="-7">button5</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkListStore" id="position_liststore">
+ <columns>
+ <!-- column-name label -->
+ <column type="gchararray"/>
+ <!-- column-name name -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Top Left</col>
+ <col id="1">top_left</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Top Right</col>
+ <col id="1">top_right</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Bottom Left</col>
+ <col id="1">bottom_left</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Bottom Right</col>
+ <col id="1">bottom_right</col>
+ </row>
+ </data>
+ </object>
+</interface>