summaryrefslogtreecommitdiff
path: root/applets/wncklet
diff options
context:
space:
mode:
Diffstat (limited to 'applets/wncklet')
-rw-r--r--applets/wncklet/Makefile.am115
-rw-r--r--applets/wncklet/Makefile.in1075
-rw-r--r--applets/wncklet/org.mate.panel.Wncklet.mate-panel-applet.in.in50
-rw-r--r--applets/wncklet/org.mate.panel.applet.WnckletFactory.service.in3
-rw-r--r--applets/wncklet/showdesktop-menu.xml3
-rw-r--r--applets/wncklet/showdesktop.c533
-rw-r--r--applets/wncklet/showdesktop.h42
-rw-r--r--applets/wncklet/window-list-menu.xml4
-rw-r--r--applets/wncklet/window-list.c749
-rw-r--r--applets/wncklet/window-list.h25
-rw-r--r--applets/wncklet/window-list.schemas.in77
-rw-r--r--applets/wncklet/window-list.ui443
-rw-r--r--applets/wncklet/window-menu-menu.xml3
-rw-r--r--applets/wncklet/window-menu.c269
-rw-r--r--applets/wncklet/window-menu.h45
-rw-r--r--applets/wncklet/wncklet.c144
-rw-r--r--applets/wncklet/wncklet.h48
-rw-r--r--applets/wncklet/workspace-switcher-menu.xml6
-rw-r--r--applets/wncklet/workspace-switcher.c932
-rw-r--r--applets/wncklet/workspace-switcher.h25
-rw-r--r--applets/wncklet/workspace-switcher.schemas.in52
-rw-r--r--applets/wncklet/workspace-switcher.ui323
22 files changed, 4966 insertions, 0 deletions
diff --git a/applets/wncklet/Makefile.am b/applets/wncklet/Makefile.am
new file mode 100644
index 00000000..b5ccdfbc
--- /dev/null
+++ b/applets/wncklet/Makefile.am
@@ -0,0 +1,115 @@
+AM_CPPFLAGS = \
+ $(LIBMATE_PANEL_APPLET_CFLAGS) \
+ $(WNCKLET_CFLAGS) \
+ -I$(top_builddir) \
+ -I$(top_builddir)/applets/wncklet \
+ -I$(top_srcdir)/libmate-panel-applet \
+ -I$(top_builddir)/libmate-panel-applet \
+ -DMATELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+ -DPAGER_BUILDERDIR=\""$(uidir)"\" \
+ -DTASKLIST_BUILDERDIR=\""$(uidir)"\" \
+ -DWNCK_MENU_UI_DIR=\""$(xmluidir)"\" \
+ $(DISABLE_DEPRECATED_CFLAGS)
+
+AM_CFLAGS = $(WARN_CFLAGS)
+
+WNCKLET_SOURCES = \
+ wncklet.c \
+ wncklet.h \
+ window-menu.c \
+ window-menu.h \
+ window-list.c \
+ window-list.h \
+ workspace-switcher.c \
+ workspace-switcher.h \
+ showdesktop.c \
+ showdesktop.h
+
+WNCKLET_LDADD = \
+ ../../libmate-panel-applet/libmate-panel-applet-3.la \
+ $(WNCKLET_LIBS) \
+ $(LIBMATE_PANEL_APPLET_LIBS)
+
+if WNCKLET_INPROCESS
+APPLET_IN_PROCESS = true
+APPLET_LOCATION = $(pkglibdir)/libwnck-applet.so
+
+wnck_appletlibdir = $(pkglibdir)
+wnck_appletlib_LTLIBRARIES = libwnck-applet.la
+libwnck_applet_la_SOURCES = $(WNCKLET_SOURCES)
+libwnck_applet_la_LIBADD = $(WNCKLET_LDADD)
+libwnck_applet_la_LDFLAGS = -module -avoid-version
+libwnck_applet_la_CFLAGS = $(AM_CFLAGS)
+else
+APPLET_IN_PROCESS = false
+APPLET_LOCATION = $(libexecdir)/wnck-applet
+
+libexec_PROGRAMS = wnck-applet
+wnck_applet_SOURCES = $(WNCKLET_SOURCES)
+wnck_applet_LDADD = $(WNCKLET_LDADD)
+wnck_applet_CFLAGS = $(AM_CFLAGS)
+endif
+
+appletdir = $(datadir)/mate-panel/applets
+applet_in_files = org.mate.panel.Wncklet.mate-panel-applet.in
+applet_DATA = $(applet_in_files:.mate-panel-applet.in=.mate-panel-applet)
+
+$(applet_in_files): $(applet_in_files).in Makefile
+ $(AM_V_GEN)sed \
+ -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
+ -e "s|\@IN_PROCESS\@|$(APPLET_IN_PROCESS)|" \
+ -e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
+ $< > $@
+
+@PANEL_INTLTOOL_MATE_PANEL_APPLET_RULE@
+
+if !WNCKLET_INPROCESS
+servicedir = $(datadir)/dbus-1/services
+service_in_files = org.mate.panel.applet.WnckletFactory.service.in
+service_DATA = $(service_in_files:.service.in=.service)
+
+org.mate.panel.applet.WnckletFactory.service: $(service_in_files)
+ $(AM_V_GEN)sed \
+ -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
+ $< > $@
+endif
+
+uidir = $(datadir)/mate-panel/ui
+ui_DATA = workspace-switcher.ui window-list.ui
+
+xmluidir = $(datadir)/mate-panel/ui
+xmlui_DATA = \
+ window-menu-menu.xml \
+ workspace-switcher-menu.xml \
+ showdesktop-menu.xml \
+ window-list-menu.xml
+
+schemasdir = $(MATECONF_SCHEMA_FILE_DIR)
+schemas_in_files = workspace-switcher.schemas.in window-list.schemas.in
+schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
+
+@INTLTOOL_SCHEMAS_RULE@
+
+if MATECONF_SCHEMAS_INSTALL
+install-data-local:
+ if test -z "$(DESTDIR)" ; then \
+ for p in $(schemas_DATA) ; do \
+ MATECONF_CONFIG_SOURCE=$(MATECONF_SCHEMA_CONFIG_SOURCE) $(MATECONFTOOL) --makefile-install-rule $(top_builddir)/applets/wncklet/$$p ; \
+ done \
+ fi
+uninstall-local:
+ for p in $(schema_DATA) ; do \
+ MATECONF_CONFIG_SOURCE=$(MATECONF_SCHEMA_CONFIG_SOURCE) $(MATECONFTOOL) --makefile-uninstall-rule $(top_builddir)/applets/wncklet/$$p ; \
+ done
+endif
+
+EXTRA_DIST = \
+ org.mate.panel.Wncklet.mate-panel-applet.in.in \
+ $(service_in_files) \
+ $(xmlui_DATA) \
+ $(schemas_in_files) \
+ $(ui_DATA)
+
+CLEANFILES = $(schemas_DATA) $(applet_DATA) $(applet_DATA).in $(service_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/applets/wncklet/Makefile.in b/applets/wncklet/Makefile.in
new file mode 100644
index 00000000..f034a466
--- /dev/null
+++ b/applets/wncklet/Makefile.in
@@ -0,0 +1,1075 @@
+# 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@
+@WNCKLET_INPROCESS_FALSE@libexec_PROGRAMS = wnck-applet$(EXEEXT)
+subdir = applets/wncklet
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/d-type.m4 \
+ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/intltool.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/mate-doc-utils.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__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'
+am__installdirs = "$(DESTDIR)$(wnck_appletlibdir)" \
+ "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(appletdir)" \
+ "$(DESTDIR)$(schemasdir)" "$(DESTDIR)$(servicedir)" \
+ "$(DESTDIR)$(uidir)" "$(DESTDIR)$(xmluidir)"
+LTLIBRARIES = $(wnck_appletlib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = \
+ ../../libmate-panel-applet/libmate-panel-applet-3.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+@WNCKLET_INPROCESS_TRUE@libwnck_applet_la_DEPENDENCIES = \
+@WNCKLET_INPROCESS_TRUE@ $(am__DEPENDENCIES_2)
+am__libwnck_applet_la_SOURCES_DIST = wncklet.c wncklet.h window-menu.c \
+ window-menu.h window-list.c window-list.h workspace-switcher.c \
+ workspace-switcher.h showdesktop.c showdesktop.h
+am__objects_1 = libwnck_applet_la-wncklet.lo \
+ libwnck_applet_la-window-menu.lo \
+ libwnck_applet_la-window-list.lo \
+ libwnck_applet_la-workspace-switcher.lo \
+ libwnck_applet_la-showdesktop.lo
+@WNCKLET_INPROCESS_TRUE@am_libwnck_applet_la_OBJECTS = \
+@WNCKLET_INPROCESS_TRUE@ $(am__objects_1)
+libwnck_applet_la_OBJECTS = $(am_libwnck_applet_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+libwnck_applet_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(libwnck_applet_la_CFLAGS) $(CFLAGS) \
+ $(libwnck_applet_la_LDFLAGS) $(LDFLAGS) -o $@
+@WNCKLET_INPROCESS_TRUE@am_libwnck_applet_la_rpath = -rpath \
+@WNCKLET_INPROCESS_TRUE@ $(wnck_appletlibdir)
+PROGRAMS = $(libexec_PROGRAMS)
+am__wnck_applet_SOURCES_DIST = wncklet.c wncklet.h window-menu.c \
+ window-menu.h window-list.c window-list.h workspace-switcher.c \
+ workspace-switcher.h showdesktop.c showdesktop.h
+am__objects_2 = wnck_applet-wncklet.$(OBJEXT) \
+ wnck_applet-window-menu.$(OBJEXT) \
+ wnck_applet-window-list.$(OBJEXT) \
+ wnck_applet-workspace-switcher.$(OBJEXT) \
+ wnck_applet-showdesktop.$(OBJEXT)
+@WNCKLET_INPROCESS_FALSE@am_wnck_applet_OBJECTS = $(am__objects_2)
+wnck_applet_OBJECTS = $(am_wnck_applet_OBJECTS)
+@WNCKLET_INPROCESS_FALSE@wnck_applet_DEPENDENCIES = \
+@WNCKLET_INPROCESS_FALSE@ $(am__DEPENDENCIES_2)
+wnck_applet_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(wnck_applet_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+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 = $(libwnck_applet_la_SOURCES) $(wnck_applet_SOURCES)
+DIST_SOURCES = $(am__libwnck_applet_la_SOURCES_DIST) \
+ $(am__wnck_applet_SOURCES_DIST)
+DATA = $(applet_DATA) $(schemas_DATA) $(service_DATA) $(ui_DATA) \
+ $(xmlui_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CLOCK_CFLAGS = @CLOCK_CFLAGS@
+CLOCK_EDS_ICONDIR = @CLOCK_EDS_ICONDIR@
+CLOCK_LIBS = @CLOCK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
+DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
+DLLTOOL = @DLLTOOL@
+DOC_USER_FORMATS = @DOC_USER_FORMATS@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGG_SMCLIENT_CFLAGS = @EGG_SMCLIENT_CFLAGS@
+EGG_SMCLIENT_LIBS = @EGG_SMCLIENT_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FISH_CFLAGS = @FISH_CFLAGS@
+FISH_LIBS = @FISH_LIBS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_QUERYMODULES = @GIO_QUERYMODULES@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+HELP_DIR = @HELP_DIR@
+HTML_DIR = @HTML_DIR@
+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@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBMATE_PANEL_APPLET_CFLAGS = @LIBMATE_PANEL_APPLET_CFLAGS@
+LIBMATE_PANEL_APPLET_LIBS = @LIBMATE_PANEL_APPLET_LIBS@
+LIBMATE_PANEL_APPLET_MATECOMPONENT_CFLAGS = @LIBMATE_PANEL_APPLET_MATECOMPONENT_CFLAGS@
+LIBMATE_PANEL_APPLET_MATECOMPONENT_LIBS = @LIBMATE_PANEL_APPLET_MATECOMPONENT_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIB_MATE_PANEL_APPLET_LT_VERSION = @LIB_MATE_PANEL_APPLET_LT_VERSION@
+LIB_MATE_PANEL_APPLET_MATECOMPONENT_LT_VERSION = @LIB_MATE_PANEL_APPLET_MATECOMPONENT_LT_VERSION@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MATECOMPONENT_ACT_IDLDIR = @MATECOMPONENT_ACT_IDLDIR@
+MATECOMPONENT_CFLAGS = @MATECOMPONENT_CFLAGS@
+MATECOMPONENT_IDLDIR = @MATECOMPONENT_IDLDIR@
+MATECOMPONENT_LIBS = @MATECOMPONENT_LIBS@
+MATECONFTOOL = @MATECONFTOOL@
+MATECONF_SCHEMA_CONFIG_SOURCE = @MATECONF_SCHEMA_CONFIG_SOURCE@
+MATECONF_SCHEMA_FILE_DIR = @MATECONF_SCHEMA_FILE_DIR@
+MATECORBA_IDL = @MATECORBA_IDL@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NETWORK_MANAGER_CFLAGS = @NETWORK_MANAGER_CFLAGS@
+NETWORK_MANAGER_LIBS = @NETWORK_MANAGER_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NOTIFICATION_AREA_CFLAGS = @NOTIFICATION_AREA_CFLAGS@
+NOTIFICATION_AREA_LIBS = @NOTIFICATION_AREA_LIBS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OMF_DIR = @OMF_DIR@
+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@
+PANEL_CFLAGS = @PANEL_CFLAGS@
+PANEL_INTLTOOL_MATE_PANEL_APPLET_RULE = @PANEL_INTLTOOL_MATE_PANEL_APPLET_RULE@
+PANEL_LIBS = @PANEL_LIBS@
+PANEL_MODULE_MATECOMPONENT_CFLAGS = @PANEL_MODULE_MATECOMPONENT_CFLAGS@
+PANEL_MODULE_MATECOMPONENT_LIBS = @PANEL_MODULE_MATECOMPONENT_LIBS@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+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@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+REBUILD = @REBUILD@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TZ_CFLAGS = @TZ_CFLAGS@
+TZ_LIBS = @TZ_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+WNCKLET_CFLAGS = @WNCKLET_CFLAGS@
+WNCKLET_LIBS = @WNCKLET_LIBS@
+XGETTEXT = @XGETTEXT@
+XMKMF = @XMKMF@
+XRANDR_CFLAGS = @XRANDR_CFLAGS@
+XRANDR_LIBS = @XRANDR_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+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@
+appletsdir = @appletsdir@
+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@
+modulesdir = @modulesdir@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+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@
+AM_CPPFLAGS = \
+ $(LIBMATE_PANEL_APPLET_CFLAGS) \
+ $(WNCKLET_CFLAGS) \
+ -I$(top_builddir) \
+ -I$(top_builddir)/applets/wncklet \
+ -I$(top_srcdir)/libmate-panel-applet \
+ -I$(top_builddir)/libmate-panel-applet \
+ -DMATELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+ -DPAGER_BUILDERDIR=\""$(uidir)"\" \
+ -DTASKLIST_BUILDERDIR=\""$(uidir)"\" \
+ -DWNCK_MENU_UI_DIR=\""$(xmluidir)"\" \
+ $(DISABLE_DEPRECATED_CFLAGS)
+
+AM_CFLAGS = $(WARN_CFLAGS)
+WNCKLET_SOURCES = \
+ wncklet.c \
+ wncklet.h \
+ window-menu.c \
+ window-menu.h \
+ window-list.c \
+ window-list.h \
+ workspace-switcher.c \
+ workspace-switcher.h \
+ showdesktop.c \
+ showdesktop.h
+
+WNCKLET_LDADD = \
+ ../../libmate-panel-applet/libmate-panel-applet-3.la \
+ $(WNCKLET_LIBS) \
+ $(LIBMATE_PANEL_APPLET_LIBS)
+
+@WNCKLET_INPROCESS_FALSE@APPLET_IN_PROCESS = false
+@WNCKLET_INPROCESS_TRUE@APPLET_IN_PROCESS = true
+@WNCKLET_INPROCESS_FALSE@APPLET_LOCATION = $(libexecdir)/wnck-applet
+@WNCKLET_INPROCESS_TRUE@APPLET_LOCATION = $(pkglibdir)/libwnck-applet.so
+@WNCKLET_INPROCESS_TRUE@wnck_appletlibdir = $(pkglibdir)
+@WNCKLET_INPROCESS_TRUE@wnck_appletlib_LTLIBRARIES = libwnck-applet.la
+@WNCKLET_INPROCESS_TRUE@libwnck_applet_la_SOURCES = $(WNCKLET_SOURCES)
+@WNCKLET_INPROCESS_TRUE@libwnck_applet_la_LIBADD = $(WNCKLET_LDADD)
+@WNCKLET_INPROCESS_TRUE@libwnck_applet_la_LDFLAGS = -module -avoid-version
+@WNCKLET_INPROCESS_TRUE@libwnck_applet_la_CFLAGS = $(AM_CFLAGS)
+@WNCKLET_INPROCESS_FALSE@wnck_applet_SOURCES = $(WNCKLET_SOURCES)
+@WNCKLET_INPROCESS_FALSE@wnck_applet_LDADD = $(WNCKLET_LDADD)
+@WNCKLET_INPROCESS_FALSE@wnck_applet_CFLAGS = $(AM_CFLAGS)
+appletdir = $(datadir)/mate-panel/applets
+applet_in_files = org.mate.panel.Wncklet.mate-panel-applet.in
+applet_DATA = $(applet_in_files:.mate-panel-applet.in=.mate-panel-applet)
+@WNCKLET_INPROCESS_FALSE@servicedir = $(datadir)/dbus-1/services
+@WNCKLET_INPROCESS_FALSE@service_in_files = org.mate.panel.applet.WnckletFactory.service.in
+@WNCKLET_INPROCESS_FALSE@service_DATA = $(service_in_files:.service.in=.service)
+uidir = $(datadir)/mate-panel/ui
+ui_DATA = workspace-switcher.ui window-list.ui
+xmluidir = $(datadir)/mate-panel/ui
+xmlui_DATA = \
+ window-menu-menu.xml \
+ workspace-switcher-menu.xml \
+ showdesktop-menu.xml \
+ window-list-menu.xml
+
+schemasdir = $(MATECONF_SCHEMA_FILE_DIR)
+schemas_in_files = workspace-switcher.schemas.in window-list.schemas.in
+schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
+EXTRA_DIST = \
+ org.mate.panel.Wncklet.mate-panel-applet.in.in \
+ $(service_in_files) \
+ $(xmlui_DATA) \
+ $(schemas_in_files) \
+ $(ui_DATA)
+
+CLEANFILES = $(schemas_DATA) $(applet_DATA) $(applet_DATA).in $(service_DATA)
+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 applets/wncklet/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu applets/wncklet/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-wnck_appletlibLTLIBRARIES: $(wnck_appletlib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(wnck_appletlibdir)" || $(MKDIR_P) "$(DESTDIR)$(wnck_appletlibdir)"
+ @list='$(wnck_appletlib_LTLIBRARIES)'; test -n "$(wnck_appletlibdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(wnck_appletlibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(wnck_appletlibdir)"; \
+ }
+
+uninstall-wnck_appletlibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(wnck_appletlib_LTLIBRARIES)'; test -n "$(wnck_appletlibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(wnck_appletlibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(wnck_appletlibdir)/$$f"; \
+ done
+
+clean-wnck_appletlibLTLIBRARIES:
+ -test -z "$(wnck_appletlib_LTLIBRARIES)" || rm -f $(wnck_appletlib_LTLIBRARIES)
+ @list='$(wnck_appletlib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libwnck-applet.la: $(libwnck_applet_la_OBJECTS) $(libwnck_applet_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libwnck_applet_la_LINK) $(am_libwnck_applet_la_rpath) $(libwnck_applet_la_OBJECTS) $(libwnck_applet_la_LIBADD) $(LIBS)
+install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || 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)$(libexecdir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || 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)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+
+clean-libexecPROGRAMS:
+ @list='$(libexec_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
+wnck-applet$(EXEEXT): $(wnck_applet_OBJECTS) $(wnck_applet_DEPENDENCIES)
+ @rm -f wnck-applet$(EXEEXT)
+ $(AM_V_CCLD)$(wnck_applet_LINK) $(wnck_applet_OBJECTS) $(wnck_applet_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwnck_applet_la-showdesktop.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwnck_applet_la-window-list.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwnck_applet_la-window-menu.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwnck_applet_la-wncklet.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwnck_applet_la-workspace-switcher.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wnck_applet-showdesktop.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wnck_applet-window-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wnck_applet-window-menu.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wnck_applet-wncklet.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wnck_applet-workspace-switcher.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 $@ $<
+
+libwnck_applet_la-wncklet.lo: wncklet.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwnck_applet_la_CFLAGS) $(CFLAGS) -MT libwnck_applet_la-wncklet.lo -MD -MP -MF $(DEPDIR)/libwnck_applet_la-wncklet.Tpo -c -o libwnck_applet_la-wncklet.lo `test -f 'wncklet.c' || echo '$(srcdir)/'`wncklet.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwnck_applet_la-wncklet.Tpo $(DEPDIR)/libwnck_applet_la-wncklet.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wncklet.c' object='libwnck_applet_la-wncklet.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwnck_applet_la_CFLAGS) $(CFLAGS) -c -o libwnck_applet_la-wncklet.lo `test -f 'wncklet.c' || echo '$(srcdir)/'`wncklet.c
+
+libwnck_applet_la-window-menu.lo: window-menu.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwnck_applet_la_CFLAGS) $(CFLAGS) -MT libwnck_applet_la-window-menu.lo -MD -MP -MF $(DEPDIR)/libwnck_applet_la-window-menu.Tpo -c -o libwnck_applet_la-window-menu.lo `test -f 'window-menu.c' || echo '$(srcdir)/'`window-menu.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwnck_applet_la-window-menu.Tpo $(DEPDIR)/libwnck_applet_la-window-menu.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='window-menu.c' object='libwnck_applet_la-window-menu.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwnck_applet_la_CFLAGS) $(CFLAGS) -c -o libwnck_applet_la-window-menu.lo `test -f 'window-menu.c' || echo '$(srcdir)/'`window-menu.c
+
+libwnck_applet_la-window-list.lo: window-list.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwnck_applet_la_CFLAGS) $(CFLAGS) -MT libwnck_applet_la-window-list.lo -MD -MP -MF $(DEPDIR)/libwnck_applet_la-window-list.Tpo -c -o libwnck_applet_la-window-list.lo `test -f 'window-list.c' || echo '$(srcdir)/'`window-list.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwnck_applet_la-window-list.Tpo $(DEPDIR)/libwnck_applet_la-window-list.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='window-list.c' object='libwnck_applet_la-window-list.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwnck_applet_la_CFLAGS) $(CFLAGS) -c -o libwnck_applet_la-window-list.lo `test -f 'window-list.c' || echo '$(srcdir)/'`window-list.c
+
+libwnck_applet_la-workspace-switcher.lo: workspace-switcher.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwnck_applet_la_CFLAGS) $(CFLAGS) -MT libwnck_applet_la-workspace-switcher.lo -MD -MP -MF $(DEPDIR)/libwnck_applet_la-workspace-switcher.Tpo -c -o libwnck_applet_la-workspace-switcher.lo `test -f 'workspace-switcher.c' || echo '$(srcdir)/'`workspace-switcher.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwnck_applet_la-workspace-switcher.Tpo $(DEPDIR)/libwnck_applet_la-workspace-switcher.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='workspace-switcher.c' object='libwnck_applet_la-workspace-switcher.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwnck_applet_la_CFLAGS) $(CFLAGS) -c -o libwnck_applet_la-workspace-switcher.lo `test -f 'workspace-switcher.c' || echo '$(srcdir)/'`workspace-switcher.c
+
+libwnck_applet_la-showdesktop.lo: showdesktop.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwnck_applet_la_CFLAGS) $(CFLAGS) -MT libwnck_applet_la-showdesktop.lo -MD -MP -MF $(DEPDIR)/libwnck_applet_la-showdesktop.Tpo -c -o libwnck_applet_la-showdesktop.lo `test -f 'showdesktop.c' || echo '$(srcdir)/'`showdesktop.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwnck_applet_la-showdesktop.Tpo $(DEPDIR)/libwnck_applet_la-showdesktop.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='showdesktop.c' object='libwnck_applet_la-showdesktop.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwnck_applet_la_CFLAGS) $(CFLAGS) -c -o libwnck_applet_la-showdesktop.lo `test -f 'showdesktop.c' || echo '$(srcdir)/'`showdesktop.c
+
+wnck_applet-wncklet.o: wncklet.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -MT wnck_applet-wncklet.o -MD -MP -MF $(DEPDIR)/wnck_applet-wncklet.Tpo -c -o wnck_applet-wncklet.o `test -f 'wncklet.c' || echo '$(srcdir)/'`wncklet.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wnck_applet-wncklet.Tpo $(DEPDIR)/wnck_applet-wncklet.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wncklet.c' object='wnck_applet-wncklet.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -c -o wnck_applet-wncklet.o `test -f 'wncklet.c' || echo '$(srcdir)/'`wncklet.c
+
+wnck_applet-wncklet.obj: wncklet.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -MT wnck_applet-wncklet.obj -MD -MP -MF $(DEPDIR)/wnck_applet-wncklet.Tpo -c -o wnck_applet-wncklet.obj `if test -f 'wncklet.c'; then $(CYGPATH_W) 'wncklet.c'; else $(CYGPATH_W) '$(srcdir)/wncklet.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wnck_applet-wncklet.Tpo $(DEPDIR)/wnck_applet-wncklet.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wncklet.c' object='wnck_applet-wncklet.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -c -o wnck_applet-wncklet.obj `if test -f 'wncklet.c'; then $(CYGPATH_W) 'wncklet.c'; else $(CYGPATH_W) '$(srcdir)/wncklet.c'; fi`
+
+wnck_applet-window-menu.o: window-menu.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -MT wnck_applet-window-menu.o -MD -MP -MF $(DEPDIR)/wnck_applet-window-menu.Tpo -c -o wnck_applet-window-menu.o `test -f 'window-menu.c' || echo '$(srcdir)/'`window-menu.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wnck_applet-window-menu.Tpo $(DEPDIR)/wnck_applet-window-menu.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='window-menu.c' object='wnck_applet-window-menu.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -c -o wnck_applet-window-menu.o `test -f 'window-menu.c' || echo '$(srcdir)/'`window-menu.c
+
+wnck_applet-window-menu.obj: window-menu.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -MT wnck_applet-window-menu.obj -MD -MP -MF $(DEPDIR)/wnck_applet-window-menu.Tpo -c -o wnck_applet-window-menu.obj `if test -f 'window-menu.c'; then $(CYGPATH_W) 'window-menu.c'; else $(CYGPATH_W) '$(srcdir)/window-menu.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wnck_applet-window-menu.Tpo $(DEPDIR)/wnck_applet-window-menu.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='window-menu.c' object='wnck_applet-window-menu.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -c -o wnck_applet-window-menu.obj `if test -f 'window-menu.c'; then $(CYGPATH_W) 'window-menu.c'; else $(CYGPATH_W) '$(srcdir)/window-menu.c'; fi`
+
+wnck_applet-window-list.o: window-list.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -MT wnck_applet-window-list.o -MD -MP -MF $(DEPDIR)/wnck_applet-window-list.Tpo -c -o wnck_applet-window-list.o `test -f 'window-list.c' || echo '$(srcdir)/'`window-list.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wnck_applet-window-list.Tpo $(DEPDIR)/wnck_applet-window-list.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='window-list.c' object='wnck_applet-window-list.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -c -o wnck_applet-window-list.o `test -f 'window-list.c' || echo '$(srcdir)/'`window-list.c
+
+wnck_applet-window-list.obj: window-list.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -MT wnck_applet-window-list.obj -MD -MP -MF $(DEPDIR)/wnck_applet-window-list.Tpo -c -o wnck_applet-window-list.obj `if test -f 'window-list.c'; then $(CYGPATH_W) 'window-list.c'; else $(CYGPATH_W) '$(srcdir)/window-list.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wnck_applet-window-list.Tpo $(DEPDIR)/wnck_applet-window-list.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='window-list.c' object='wnck_applet-window-list.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -c -o wnck_applet-window-list.obj `if test -f 'window-list.c'; then $(CYGPATH_W) 'window-list.c'; else $(CYGPATH_W) '$(srcdir)/window-list.c'; fi`
+
+wnck_applet-workspace-switcher.o: workspace-switcher.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -MT wnck_applet-workspace-switcher.o -MD -MP -MF $(DEPDIR)/wnck_applet-workspace-switcher.Tpo -c -o wnck_applet-workspace-switcher.o `test -f 'workspace-switcher.c' || echo '$(srcdir)/'`workspace-switcher.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wnck_applet-workspace-switcher.Tpo $(DEPDIR)/wnck_applet-workspace-switcher.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='workspace-switcher.c' object='wnck_applet-workspace-switcher.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -c -o wnck_applet-workspace-switcher.o `test -f 'workspace-switcher.c' || echo '$(srcdir)/'`workspace-switcher.c
+
+wnck_applet-workspace-switcher.obj: workspace-switcher.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -MT wnck_applet-workspace-switcher.obj -MD -MP -MF $(DEPDIR)/wnck_applet-workspace-switcher.Tpo -c -o wnck_applet-workspace-switcher.obj `if test -f 'workspace-switcher.c'; then $(CYGPATH_W) 'workspace-switcher.c'; else $(CYGPATH_W) '$(srcdir)/workspace-switcher.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wnck_applet-workspace-switcher.Tpo $(DEPDIR)/wnck_applet-workspace-switcher.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='workspace-switcher.c' object='wnck_applet-workspace-switcher.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -c -o wnck_applet-workspace-switcher.obj `if test -f 'workspace-switcher.c'; then $(CYGPATH_W) 'workspace-switcher.c'; else $(CYGPATH_W) '$(srcdir)/workspace-switcher.c'; fi`
+
+wnck_applet-showdesktop.o: showdesktop.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -MT wnck_applet-showdesktop.o -MD -MP -MF $(DEPDIR)/wnck_applet-showdesktop.Tpo -c -o wnck_applet-showdesktop.o `test -f 'showdesktop.c' || echo '$(srcdir)/'`showdesktop.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wnck_applet-showdesktop.Tpo $(DEPDIR)/wnck_applet-showdesktop.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='showdesktop.c' object='wnck_applet-showdesktop.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -c -o wnck_applet-showdesktop.o `test -f 'showdesktop.c' || echo '$(srcdir)/'`showdesktop.c
+
+wnck_applet-showdesktop.obj: showdesktop.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -MT wnck_applet-showdesktop.obj -MD -MP -MF $(DEPDIR)/wnck_applet-showdesktop.Tpo -c -o wnck_applet-showdesktop.obj `if test -f 'showdesktop.c'; then $(CYGPATH_W) 'showdesktop.c'; else $(CYGPATH_W) '$(srcdir)/showdesktop.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wnck_applet-showdesktop.Tpo $(DEPDIR)/wnck_applet-showdesktop.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='showdesktop.c' object='wnck_applet-showdesktop.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wnck_applet_CFLAGS) $(CFLAGS) -c -o wnck_applet-showdesktop.obj `if test -f 'showdesktop.c'; then $(CYGPATH_W) 'showdesktop.c'; else $(CYGPATH_W) '$(srcdir)/showdesktop.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-appletDATA: $(applet_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(appletdir)" || $(MKDIR_P) "$(DESTDIR)$(appletdir)"
+ @list='$(applet_DATA)'; test -n "$(appletdir)" || 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)$(appletdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(appletdir)" || exit $$?; \
+ done
+
+uninstall-appletDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(applet_DATA)'; test -n "$(appletdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(appletdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(appletdir)" && rm -f $$files
+install-schemasDATA: $(schemas_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(schemasdir)" || $(MKDIR_P) "$(DESTDIR)$(schemasdir)"
+ @list='$(schemas_DATA)'; test -n "$(schemasdir)" || 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)$(schemasdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(schemasdir)" || exit $$?; \
+ done
+
+uninstall-schemasDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(schemas_DATA)'; test -n "$(schemasdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(schemasdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(schemasdir)" && rm -f $$files
+install-serviceDATA: $(service_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(servicedir)" || $(MKDIR_P) "$(DESTDIR)$(servicedir)"
+ @list='$(service_DATA)'; test -n "$(servicedir)" || 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)$(servicedir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(servicedir)" || exit $$?; \
+ done
+
+uninstall-serviceDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(service_DATA)'; test -n "$(servicedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(servicedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(servicedir)" && 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
+install-xmluiDATA: $(xmlui_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(xmluidir)" || $(MKDIR_P) "$(DESTDIR)$(xmluidir)"
+ @list='$(xmlui_DATA)'; test -n "$(xmluidir)" || 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)$(xmluidir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(xmluidir)" || exit $$?; \
+ done
+
+uninstall-xmluiDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(xmlui_DATA)'; test -n "$(xmluidir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(xmluidir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(xmluidir)" && 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 $(LTLIBRARIES) $(PROGRAMS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(wnck_appletlibdir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(appletdir)" "$(DESTDIR)$(schemasdir)" "$(DESTDIR)$(servicedir)" "$(DESTDIR)$(uidir)" "$(DESTDIR)$(xmluidir)"; 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."
+@MATECONF_SCHEMAS_INSTALL_FALSE@uninstall-local:
+@MATECONF_SCHEMAS_INSTALL_FALSE@install-data-local:
+clean: clean-am
+
+clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \
+ clean-wnck_appletlibLTLIBRARIES 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-appletDATA install-data-local \
+ install-schemasDATA install-serviceDATA install-uiDATA \
+ install-wnck_appletlibLTLIBRARIES install-xmluiDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libexecPROGRAMS
+
+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-appletDATA uninstall-libexecPROGRAMS \
+ uninstall-local uninstall-schemasDATA uninstall-serviceDATA \
+ uninstall-uiDATA uninstall-wnck_appletlibLTLIBRARIES \
+ uninstall-xmluiDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libexecPROGRAMS clean-libtool \
+ clean-wnck_appletlibLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-appletDATA install-data \
+ install-data-am install-data-local install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-libexecPROGRAMS \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-schemasDATA install-serviceDATA \
+ install-strip install-uiDATA install-wnck_appletlibLTLIBRARIES \
+ install-xmluiDATA 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-appletDATA uninstall-libexecPROGRAMS uninstall-local \
+ uninstall-schemasDATA uninstall-serviceDATA uninstall-uiDATA \
+ uninstall-wnck_appletlibLTLIBRARIES uninstall-xmluiDATA
+
+
+$(applet_in_files): $(applet_in_files).in Makefile
+ $(AM_V_GEN)sed \
+ -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
+ -e "s|\@IN_PROCESS\@|$(APPLET_IN_PROCESS)|" \
+ -e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
+ $< > $@
+
+@PANEL_INTLTOOL_MATE_PANEL_APPLET_RULE@
+
+@WNCKLET_INPROCESS_FALSE@org.mate.panel.applet.WnckletFactory.service: $(service_in_files)
+@WNCKLET_INPROCESS_FALSE@ $(AM_V_GEN)sed \
+@WNCKLET_INPROCESS_FALSE@ -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
+@WNCKLET_INPROCESS_FALSE@ $< > $@
+
+@INTLTOOL_SCHEMAS_RULE@
+
+@MATECONF_SCHEMAS_INSTALL_TRUE@install-data-local:
+@MATECONF_SCHEMAS_INSTALL_TRUE@ if test -z "$(DESTDIR)" ; then \
+@MATECONF_SCHEMAS_INSTALL_TRUE@ for p in $(schemas_DATA) ; do \
+@MATECONF_SCHEMAS_INSTALL_TRUE@ MATECONF_CONFIG_SOURCE=$(MATECONF_SCHEMA_CONFIG_SOURCE) $(MATECONFTOOL) --makefile-install-rule $(top_builddir)/applets/wncklet/$$p ; \
+@MATECONF_SCHEMAS_INSTALL_TRUE@ done \
+@MATECONF_SCHEMAS_INSTALL_TRUE@ fi
+@MATECONF_SCHEMAS_INSTALL_TRUE@uninstall-local:
+@MATECONF_SCHEMAS_INSTALL_TRUE@ for p in $(schema_DATA) ; do \
+@MATECONF_SCHEMAS_INSTALL_TRUE@ MATECONF_CONFIG_SOURCE=$(MATECONF_SCHEMA_CONFIG_SOURCE) $(MATECONFTOOL) --makefile-uninstall-rule $(top_builddir)/applets/wncklet/$$p ; \
+@MATECONF_SCHEMAS_INSTALL_TRUE@ done
+
+-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/applets/wncklet/org.mate.panel.Wncklet.mate-panel-applet.in.in b/applets/wncklet/org.mate.panel.Wncklet.mate-panel-applet.in.in
new file mode 100644
index 00000000..4003305b
--- /dev/null
+++ b/applets/wncklet/org.mate.panel.Wncklet.mate-panel-applet.in.in
@@ -0,0 +1,50 @@
+[Applet Factory]
+Id=WnckletFactory
+InProcess=@IN_PROCESS@
+Location=@LOCATION@
+_Name=Window Navigation Applet Factory
+_Description=Factory for the window navigation related applets
+
+[WindowMenuApplet]
+_Name=Window Selector
+_Description=Switch between open windows using a menu
+Icon=mate-panel-window-menu
+MateComponentId=OAFIID:MATE_WindowMenuApplet;
+X-MATE-Bugzilla-Bugzilla=MATE
+X-MATE-Bugzilla-Product=mate-panel
+X-MATE-Bugzilla-Component=window selector
+X-MATE-Bugzilla-Version=@VERSION@
+X-MATE-Bugzilla-OtherBinaries=wnck-applet
+
+[WorkspaceSwitcherApplet]
+_Name=Workspace Switcher
+_Description=Switch between workspaces
+Icon=mate-panel-workspace-switcher
+MateComponentId=OAFIID:MATE_WorkspaceSwitcherApplet;OAFIID:MATE_PagerApplet;
+X-MATE-Bugzilla-Bugzilla=MATE
+X-MATE-Bugzilla-Product=mate-panel
+X-MATE-Bugzilla-Component=workspace switcher
+X-MATE-Bugzilla-Version=@VERSION@
+X-MATE-Bugzilla-OtherBinaries=wnck-applet
+
+[WindowListApplet]
+_Name=Window List
+_Description=Switch between open windows using buttons
+Icon=mate-panel-window-list
+MateComponentId=OAFIID:MATE_TasklistApplet;OAFIID:MATE_WindowListApplet;
+X-MATE-Bugzilla-Bugzilla=MATE
+X-MATE-Bugzilla-Product=mate-panel
+X-MATE-Bugzilla-Component=window list
+X-MATE-Bugzilla-Version=@VERSION@
+X-MATE-Bugzilla-OtherBinaries=wnck-applet
+
+[ShowDesktopApplet]
+_Name=Show Desktop
+_Description=Hide application windows and show the desktop
+Icon=user-desktop
+MateComponentId=OAFIID:MATE_ShowDesktopApplet;
+X-MATE-Bugzilla-Bugzilla=MATE
+X-MATE-Bugzilla-Product=mate-panel
+X-MATE-Bugzilla-Component=Show Desktop Button
+X-MATE-Bugzilla-Version=@VERSION@
+X-MATE-Bugzilla-OtherBinaries=wnck-applet
diff --git a/applets/wncklet/org.mate.panel.applet.WnckletFactory.service.in b/applets/wncklet/org.mate.panel.applet.WnckletFactory.service.in
new file mode 100644
index 00000000..b6c6a98b
--- /dev/null
+++ b/applets/wncklet/org.mate.panel.applet.WnckletFactory.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.mate.panel.applet.WnckletFactory
+Exec=@LOCATION@
diff --git a/applets/wncklet/showdesktop-menu.xml b/applets/wncklet/showdesktop-menu.xml
new file mode 100644
index 00000000..3770f275
--- /dev/null
+++ b/applets/wncklet/showdesktop-menu.xml
@@ -0,0 +1,3 @@
+<menuitem name="Show Desktop Help Item" action="ShowDesktopHelp"/>
+<menuitem name="Show Desktop About Item" action="ShowDesktopAbout"/>
+
diff --git a/applets/wncklet/showdesktop.c b/applets/wncklet/showdesktop.c
new file mode 100644
index 00000000..7cfcb88d
--- /dev/null
+++ b/applets/wncklet/showdesktop.c
@@ -0,0 +1,533 @@
+/* -*- mode: C; c-file-style: "linux" -*- */
+/* "Show desktop" panel applet */
+
+/*
+ * Copyright (C) 2002 Red Hat, Inc.
+ * Developed by Havoc Pennington
+ *
+ * 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 of the
+ * License, 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.
+ */
+
+#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1
+
+#ifdef HAVE_CONFIG_H
+ #include <config.h>
+#endif
+
+#include <glib/gi18n.h>
+
+#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
+
+#include <libwnck/screen.h>
+
+#include "wncklet.h"
+#include "showdesktop.h"
+
+#include <string.h>
+
+#define TIMEOUT_ACTIVATE_SECONDS 1
+#define SHOW_DESKTOP_ICON "user-desktop"
+
+
+typedef struct {
+ /* widgets */
+ GtkWidget* applet;
+ GtkWidget* button;
+ GtkWidget* image;
+
+ GtkOrientation orient;
+ int size;
+
+ WnckScreen* wnck_screen;
+
+ guint showing_desktop: 1;
+ guint button_activate;
+
+ GtkIconTheme* icon_theme;
+} ShowDesktopData;
+
+static void display_help_dialog(GtkAction* action, ShowDesktopData* sdd);
+static void display_about_dialog(GtkAction* action, ShowDesktopData* sdd);
+
+static void update_icon(ShowDesktopData* sdd);
+static void update_button_state(ShowDesktopData* sdd);
+static void update_button_display(ShowDesktopData* sdd);
+
+static void theme_changed_callback(GtkIconTheme* icon_theme, ShowDesktopData* sdd);
+
+static void button_toggled_callback(GtkWidget* button, ShowDesktopData* sdd);
+static void show_desktop_changed_callback(WnckScreen* screen, ShowDesktopData* sdd);
+
+/* this is when the panel orientation changes */
+
+static void applet_change_orient(MatePanelApplet* applet, MatePanelAppletOrient orient, ShowDesktopData* sdd)
+{
+ GtkOrientation new_orient;
+
+ switch (orient)
+ {
+ case MATE_PANEL_APPLET_ORIENT_LEFT:
+ case MATE_PANEL_APPLET_ORIENT_RIGHT:
+ new_orient = GTK_ORIENTATION_VERTICAL;
+ break;
+ case MATE_PANEL_APPLET_ORIENT_UP:
+ case MATE_PANEL_APPLET_ORIENT_DOWN:
+ default:
+ new_orient = GTK_ORIENTATION_HORIZONTAL;
+ break;
+ }
+
+ if (new_orient == sdd->orient)
+ return;
+
+ sdd->orient = new_orient;
+
+ update_icon (sdd);
+}
+
+/* this is when the panel size changes */
+static void button_size_allocated(GtkWidget* button, GtkAllocation* allocation, ShowDesktopData* sdd)
+{
+ /*
+ if ((sdd->orient == GTK_ORIENTATION_HORIZONTAL) && (sdd->size == allocation->height))
+ {
+ return;
+ }
+ else if ((sdd->orient == GTK_ORIENTATION_VERTICAL) && (sdd->size == allocation->width))
+ {
+ return;
+ }
+ */
+
+ if (((sdd->orient == GTK_ORIENTATION_HORIZONTAL) && (sdd->size == allocation->height)) || ((sdd->orient == GTK_ORIENTATION_VERTICAL) && (sdd->size == allocation->width)))
+ return;
+
+ switch (sdd->orient)
+ {
+ case GTK_ORIENTATION_HORIZONTAL:
+ sdd->size = allocation->height;
+ break;
+ case GTK_ORIENTATION_VERTICAL:
+ sdd->size = allocation->width;
+ break;
+ }
+
+ update_icon(sdd);
+}
+
+static void update_icon(ShowDesktopData* sdd)
+{
+ GtkStyle* style;
+ int width, height;
+ GdkPixbuf* icon;
+ GdkPixbuf* scaled;
+ int icon_size;
+ GError* error;
+ int focus_width = 0;
+ int focus_pad = 0;
+ int thickness = 0;
+
+ if (!sdd->icon_theme)
+ return;
+
+ gtk_widget_style_get (sdd->button, "focus-line-width", &focus_width, "focus-padding", &focus_pad, NULL);
+
+ style = gtk_widget_get_style(sdd->button);
+
+ switch (sdd->orient)
+ {
+ case GTK_ORIENTATION_HORIZONTAL:
+ thickness = style->ythickness;
+ break;
+ case GTK_ORIENTATION_VERTICAL:
+ thickness = style->xthickness;
+ break;
+ }
+
+ icon_size = sdd->size - 2 * (focus_width + focus_pad + thickness);
+
+ if (icon_size < 22)
+ icon_size = 16;
+ else if (icon_size < 32)
+ icon_size = 22;
+ else if (icon_size < 48)
+ icon_size = 32;
+
+ error = NULL;
+ icon = gtk_icon_theme_load_icon (sdd->icon_theme, SHOW_DESKTOP_ICON, icon_size, 0, &error);
+
+ if (icon == NULL)
+ {
+ g_printerr(_("Failed to load %s: %s\n"), SHOW_DESKTOP_ICON, error ? error->message : _("Icon not found"));
+
+ if (error)
+ {
+ g_error_free(error);
+ error = NULL;
+ }
+
+ gtk_image_set_from_stock(GTK_IMAGE (sdd->image), GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ return;
+ }
+
+ width = gdk_pixbuf_get_width(icon);
+ height = gdk_pixbuf_get_height(icon);
+
+ scaled = NULL;
+
+ /* Make it fit on the given panel */
+ switch (sdd->orient)
+ {
+ case GTK_ORIENTATION_HORIZONTAL:
+ width = (icon_size * width) / height;
+ height = icon_size;
+ break;
+ case GTK_ORIENTATION_VERTICAL:
+ height = (icon_size * height) / width;
+ width = icon_size;
+ break;
+ }
+
+ scaled = gdk_pixbuf_scale_simple(icon, width, height, GDK_INTERP_BILINEAR);
+
+ if (scaled != NULL)
+ {
+ gtk_image_set_from_pixbuf(GTK_IMAGE(sdd->image), scaled);
+ g_object_unref(scaled);
+ }
+ else
+ {
+ gtk_image_set_from_pixbuf (GTK_IMAGE (sdd->image), icon);
+ }
+
+ g_object_unref (icon);
+}
+
+static const GtkActionEntry show_desktop_menu_actions[] = {
+ {
+ "ShowDesktopHelp",
+ GTK_STOCK_HELP,
+ N_("_Help"),
+ NULL,
+ NULL,
+ G_CALLBACK(display_help_dialog)
+ },
+ {
+ "ShowDesktopAbout",
+ GTK_STOCK_ABOUT,
+ N_("_About"),
+ NULL,
+ NULL,
+ G_CALLBACK(display_about_dialog)
+ }
+};
+
+/* This updates things that should be consistent with the button's appearance,
+ * and update_button_state updates the button appearance itself
+ */
+static void update_button_display(ShowDesktopData* sdd)
+{
+ const char* tip;
+
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sdd->button)))
+ {
+ tip = _("Click here to restore hidden windows.");
+ }
+ else
+ {
+ tip = _("Click here to hide all windows and show the desktop.");
+ }
+
+ gtk_widget_set_tooltip_text(sdd->button, tip);
+}
+
+static void update_button_state(ShowDesktopData* sdd)
+{
+ if (sdd->showing_desktop)
+ {
+ g_signal_handlers_block_by_func(G_OBJECT(sdd->button), G_CALLBACK(button_toggled_callback), sdd);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sdd->button), TRUE);
+ g_signal_handlers_unblock_by_func(G_OBJECT(sdd->button), G_CALLBACK(button_toggled_callback), sdd);
+ }
+ else
+ {
+ g_signal_handlers_block_by_func(G_OBJECT(sdd->button), G_CALLBACK(button_toggled_callback), sdd);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sdd->button), FALSE);
+ g_signal_handlers_unblock_by_func(G_OBJECT(sdd->button), G_CALLBACK(button_toggled_callback), sdd);
+ }
+
+ update_button_display (sdd);
+}
+
+static void applet_destroyed(GtkWidget* applet, ShowDesktopData* sdd)
+{
+ if (sdd->button_activate != 0)
+ {
+ g_source_remove(sdd->button_activate);
+ sdd->button_activate = 0;
+ }
+
+ if (sdd->wnck_screen != NULL)
+ {
+ g_signal_handlers_disconnect_by_func(sdd->wnck_screen, show_desktop_changed_callback, sdd);
+ sdd->wnck_screen = NULL;
+ }
+
+ if (sdd->icon_theme != NULL)
+ {
+ g_signal_handlers_disconnect_by_func(sdd->icon_theme, theme_changed_callback, sdd);
+ sdd->icon_theme = NULL;
+ }
+
+ g_free (sdd);
+}
+
+static gboolean do_not_eat_button_press(GtkWidget* widget, GdkEventButton* event)
+{
+ if (event->button != 1)
+ {
+ g_signal_stop_emission_by_name(widget, "button_press_event");
+ }
+
+ return FALSE;
+}
+
+static gboolean button_motion_timeout(gpointer data)
+{
+ ShowDesktopData* sdd = (ShowDesktopData*) data;
+
+ sdd->button_activate = 0;
+
+ g_signal_emit_by_name(G_OBJECT(sdd->button), "clicked", sdd);
+
+ return FALSE;
+}
+
+static void button_drag_leave(GtkWidget* widget, GdkDragContext* context, guint time, ShowDesktopData* sdd)
+{
+ if (sdd->button_activate != 0)
+ {
+ g_source_remove(sdd->button_activate);
+ sdd->button_activate = 0;
+ }
+}
+
+static gboolean button_drag_motion(GtkWidget* widget, GdkDragContext* context, gint x, gint y, guint time, ShowDesktopData* sdd)
+{
+ if (sdd->button_activate == 0)
+ sdd->button_activate = g_timeout_add_seconds (TIMEOUT_ACTIVATE_SECONDS, button_motion_timeout, sdd);
+
+ gdk_drag_status(context, 0, time);
+
+ return TRUE;
+}
+
+static void show_desktop_applet_realized(MatePanelApplet* applet, gpointer data)
+{
+ ShowDesktopData* sdd;
+ GdkScreen* screen;
+
+ sdd = (ShowDesktopData*) data;
+
+ if (sdd->wnck_screen != NULL)
+ g_signal_handlers_disconnect_by_func(sdd->wnck_screen, show_desktop_changed_callback, sdd);
+
+ if (sdd->icon_theme != NULL)
+ g_signal_handlers_disconnect_by_func(sdd->icon_theme, theme_changed_callback, sdd);
+
+ screen = gtk_widget_get_screen(sdd->applet);
+ sdd->wnck_screen = wnck_screen_get(gdk_screen_get_number (screen));
+
+ if (sdd->wnck_screen != NULL)
+ wncklet_connect_while_alive(sdd->wnck_screen, "showing_desktop_changed", G_CALLBACK(show_desktop_changed_callback), sdd, sdd->applet);
+ else
+ g_warning("Could not get WnckScreen!");
+
+ show_desktop_changed_callback(sdd->wnck_screen, sdd);
+
+ sdd->icon_theme = gtk_icon_theme_get_for_screen (screen);
+ wncklet_connect_while_alive(sdd->icon_theme, "changed", G_CALLBACK(theme_changed_callback), sdd, sdd->applet);
+
+ update_icon (sdd);
+}
+
+static void theme_changed_callback(GtkIconTheme* icon_theme, ShowDesktopData* sdd)
+{
+ update_icon (sdd);
+}
+
+gboolean show_desktop_applet_fill(MatePanelApplet* applet)
+{
+ ShowDesktopData* sdd;
+ GtkActionGroup* action_group;
+ gchar* ui_path;
+ AtkObject* atk_obj;
+
+ mate_panel_applet_set_flags(applet, MATE_PANEL_APPLET_EXPAND_MINOR);
+
+ sdd = g_new0(ShowDesktopData, 1);
+
+ sdd->applet = GTK_WIDGET(applet);
+
+ sdd->image = gtk_image_new();
+
+ switch (mate_panel_applet_get_orient(applet))
+ {
+ case MATE_PANEL_APPLET_ORIENT_LEFT:
+ case MATE_PANEL_APPLET_ORIENT_RIGHT:
+ sdd->orient = GTK_ORIENTATION_VERTICAL;
+ break;
+ case MATE_PANEL_APPLET_ORIENT_UP:
+ case MATE_PANEL_APPLET_ORIENT_DOWN:
+ default:
+ sdd->orient = GTK_ORIENTATION_HORIZONTAL;
+ break;
+ }
+
+ sdd->size = mate_panel_applet_get_size(MATE_PANEL_APPLET(sdd->applet));
+
+ g_signal_connect(G_OBJECT(sdd->applet), "realize", G_CALLBACK(show_desktop_applet_realized), sdd);
+
+ sdd->button = gtk_toggle_button_new ();
+
+ gtk_widget_set_name (sdd->button, "showdesktop-button");
+ gtk_rc_parse_string ("\n"
+ " style \"showdesktop-button-style\"\n"
+ " {\n"
+ " GtkWidget::focus-line-width=0\n"
+ " GtkWidget::focus-padding=0\n"
+ " }\n"
+ "\n"
+ " widget \"*.showdesktop-button\" style \"showdesktop-button-style\"\n"
+ "\n");
+
+ atk_obj = gtk_widget_get_accessible(sdd->button);
+ atk_object_set_name (atk_obj, _("Show Desktop Button"));
+ g_signal_connect(G_OBJECT(sdd->button), "button_press_event", G_CALLBACK(do_not_eat_button_press), NULL);
+
+ g_signal_connect(G_OBJECT(sdd->button), "toggled", G_CALLBACK(button_toggled_callback), sdd);
+
+ gtk_container_set_border_width(GTK_CONTAINER(sdd->button), 0);
+ gtk_container_add(GTK_CONTAINER(sdd->button), sdd->image);
+ gtk_container_add(GTK_CONTAINER(sdd->applet), sdd->button);
+
+ g_signal_connect (G_OBJECT(sdd->button), "size_allocate", G_CALLBACK(button_size_allocated), sdd);
+
+ /* FIXME: Update this comment. */
+ /* we have to bind change_orient before we do applet_widget_add
+ since we need to get an initial change_orient signal to set our
+ initial oriantation, and we get that during the _add call */
+ g_signal_connect(G_OBJECT (sdd->applet), "change_orient", G_CALLBACK (applet_change_orient), sdd);
+
+ mate_panel_applet_set_background_widget(MATE_PANEL_APPLET (sdd->applet), GTK_WIDGET(sdd->applet));
+
+ action_group = gtk_action_group_new("ShowDesktop Applet Actions");
+ gtk_action_group_set_translation_domain(action_group, GETTEXT_PACKAGE);
+ gtk_action_group_add_actions(action_group, show_desktop_menu_actions, G_N_ELEMENTS (show_desktop_menu_actions), sdd);
+ ui_path = g_build_filename(WNCK_MENU_UI_DIR, "showdesktop-menu.xml", NULL);
+ mate_panel_applet_setup_menu_from_file(MATE_PANEL_APPLET(sdd->applet), ui_path, action_group);
+ g_free(ui_path);
+ g_object_unref(action_group);
+
+ g_signal_connect(G_OBJECT(sdd->applet), "destroy", G_CALLBACK(applet_destroyed), sdd);
+
+ gtk_drag_dest_set(GTK_WIDGET(sdd->button), 0, NULL, 0, 0);
+
+ g_signal_connect(G_OBJECT(sdd->button), "drag_motion", G_CALLBACK (button_drag_motion), sdd);
+ g_signal_connect(G_OBJECT(sdd->button), "drag_leave", G_CALLBACK (button_drag_leave), sdd);
+
+ gtk_widget_show_all(sdd->applet);
+
+ return TRUE;
+}
+
+static void display_help_dialog(GtkAction* action, ShowDesktopData* sdd)
+{
+ wncklet_display_help(sdd->applet, "user-guide", "gospanel-564", SHOW_DESKTOP_ICON);
+}
+
+static void display_about_dialog(GtkAction* action, ShowDesktopData* sdd)
+{
+ static const gchar* authors[] = {
+ "Havoc Pennington <hp@redhat.com>",
+ NULL
+ };
+ static const char* documenters[] = {
+ "Sun MATE Documentation Team <gdocteam@sun.com>",
+ NULL
+ };
+
+ /* Translator credits */
+ //const char* translator_credits = _("translator-credits");
+ char copyright[] = \
+ "Copyright \xc2\xa9 2002 Red Hat, Inc.";
+
+ gtk_show_about_dialog(GTK_WINDOW(sdd->applet),
+ "program-name", _("Show Desktop Button"),
+ "authors", authors,
+ "comments", _("This button lets you hide all windows and show the desktop."),
+ "copyright", copyright,
+ "documenters", documenters,
+ "icon-name", SHOW_DESKTOP_ICON,
+ "logo-icon-name", SHOW_DESKTOP_ICON,
+ "translator-credits", _("translator-credits"),
+ "version", VERSION,
+ "website", "http://matsusoft.com.ar/projects/mate/",
+ NULL);
+}
+
+static void button_toggled_callback(GtkWidget* button, ShowDesktopData* sdd)
+{
+ if (!gdk_x11_screen_supports_net_wm_hint(gtk_widget_get_screen(button), gdk_atom_intern("_NET_SHOWING_DESKTOP", FALSE)))
+ {
+ static GtkWidget* dialog = NULL;
+
+ if (dialog && gtk_widget_get_screen(dialog) != gtk_widget_get_screen(button))
+ gtk_widget_destroy (dialog);
+
+ if (dialog)
+ {
+ gtk_window_present(GTK_WINDOW(dialog));
+ return;
+ }
+
+ dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Your window manager does not support the show desktop button, or you are not running a window manager."));
+
+ g_object_add_weak_pointer(G_OBJECT(dialog), (gpointer) &dialog);
+
+ g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(gtk_widget_destroy), NULL);
+
+ gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
+ gtk_window_set_screen(GTK_WINDOW(dialog), gtk_widget_get_screen(button));
+ gtk_widget_show(dialog);
+
+ return;
+ }
+
+ if (sdd->wnck_screen != NULL)
+ wnck_screen_toggle_showing_desktop(sdd->wnck_screen, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)));
+
+ update_button_display (sdd);
+}
+
+static void show_desktop_changed_callback(WnckScreen* screen, ShowDesktopData* sdd)
+{
+ if (sdd->wnck_screen != NULL)
+ sdd->showing_desktop = wnck_screen_get_showing_desktop(sdd->wnck_screen);
+
+ update_button_state (sdd);
+}
diff --git a/applets/wncklet/showdesktop.h b/applets/wncklet/showdesktop.h
new file mode 100644
index 00000000..d52e2cae
--- /dev/null
+++ b/applets/wncklet/showdesktop.h
@@ -0,0 +1,42 @@
+/* -*- mode: C; c-file-style: "linux" -*- */
+/* "Show desktop" panel applet */
+
+/*
+ * Copyright (C) 2002 Red Hat, Inc.
+ * Developed by Havoc Pennington
+ *
+ * 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 of the
+ * License, 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.
+ */
+
+#ifndef _SHOWDESKTOP_H_
+#define _SHOWDESKTOP_H_
+
+#include <glib.h>
+#include <mate-panel-applet.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+gboolean show_desktop_applet_fill(MatePanelApplet* applet);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
diff --git a/applets/wncklet/window-list-menu.xml b/applets/wncklet/window-list-menu.xml
new file mode 100644
index 00000000..008d382d
--- /dev/null
+++ b/applets/wncklet/window-list-menu.xml
@@ -0,0 +1,4 @@
+<menuitem name="Tasklist Preferences Item" action="TasklistPreferences" />
+<menuitem name="Tasklist Help Item" action="TasklistHelp" />
+<menuitem name="Tasklist About Item" action="TasklistAbout" />
+
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
new file mode 100644
index 00000000..edde537d
--- /dev/null
+++ b/applets/wncklet/window-list.c
@@ -0,0 +1,749 @@
+/* -*- mode: C; c-file-style: "linux" -*- */
+/*
+ * libwnck based tasklist applet.
+ * (C) 2001 Red Hat, Inc
+ * (C) 2001 Alexander Larsson
+ *
+ * Authors: Alexander Larsson
+ *
+ */
+
+#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1
+
+#ifdef HAVE_CONFIG_H
+ #include <config.h>
+#endif
+
+#include <string.h>
+
+#include <mate-panel-applet.h>
+#include <mate-panel-applet-mateconf.h>
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+#include <libwnck/libwnck.h>
+#include <mateconf/mateconf-client.h>
+
+#include "wncklet.h"
+#include "window-list.h"
+
+#define WINDOW_LIST_ICON "mate-panel-window-list"
+
+typedef struct {
+ GtkWidget* applet;
+ GtkWidget* tasklist;
+
+ gboolean include_all_workspaces;
+ WnckTasklistGroupingType grouping;
+ gboolean move_unminimized_windows;
+
+ GtkOrientation orientation;
+ int size;
+
+ GtkIconTheme* icon_theme;
+
+ /* Properties: */
+ GtkWidget* properties_dialog;
+ GtkWidget* show_current_radio;
+ GtkWidget* show_all_radio;
+ GtkWidget* never_group_radio;
+ GtkWidget* auto_group_radio;
+ GtkWidget* always_group_radio;
+ GtkWidget* minimized_windows_label;
+ GtkWidget* move_minimized_radio;
+ GtkWidget* change_workspace_radio;
+
+ /* new options, must be translated! */
+ /*GtkWidget* style_group_radio;
+ GtkWidget* icon_group_radio;
+ GtkWidget* text_group_radio;*/
+
+
+
+ /* mateconf listeners id */
+ guint listeners [3];
+} TasklistData;
+
+static void display_properties_dialog(GtkAction* action, TasklistData* tasklist);
+static void display_help_dialog(GtkAction* action, TasklistData* tasklist);
+static void display_about_dialog(GtkAction* action, TasklistData* tasklist);
+
+static void tasklist_update(TasklistData* tasklist)
+{
+ if (tasklist->orientation == GTK_ORIENTATION_HORIZONTAL)
+ {
+ gtk_widget_set_size_request(GTK_WIDGET(tasklist->tasklist), -1, tasklist->size);
+ }
+ else
+ {
+ gtk_widget_set_size_request(GTK_WIDGET(tasklist->tasklist), tasklist->size, -1);
+ }
+
+ wnck_tasklist_set_grouping(WNCK_TASKLIST(tasklist->tasklist), tasklist->grouping);
+ wnck_tasklist_set_include_all_workspaces(WNCK_TASKLIST(tasklist->tasklist), tasklist->include_all_workspaces);
+ wnck_tasklist_set_switch_workspace_on_unminimize(WNCK_TASKLIST(tasklist->tasklist), tasklist->move_unminimized_windows);
+}
+
+static void response_cb(GtkWidget* widget, int id, TasklistData* tasklist)
+{
+ if (id == GTK_RESPONSE_HELP)
+ {
+ wncklet_display_help(widget, "user-guide", "windowlist-prefs", WINDOW_LIST_ICON);
+ }
+ else
+ {
+ gtk_widget_hide(widget);
+ }
+}
+
+static void applet_realized(MatePanelApplet* applet, TasklistData* tasklist)
+{
+ tasklist->icon_theme = gtk_icon_theme_get_for_screen(gtk_widget_get_screen(tasklist->applet));
+}
+
+static void applet_change_orient(MatePanelApplet* applet, MatePanelAppletOrient orient, TasklistData* tasklist)
+{
+ GtkOrientation new_orient;
+
+ switch (orient)
+ {
+ case MATE_PANEL_APPLET_ORIENT_LEFT:
+ case MATE_PANEL_APPLET_ORIENT_RIGHT:
+ new_orient = GTK_ORIENTATION_VERTICAL;
+ break;
+ case MATE_PANEL_APPLET_ORIENT_UP:
+ case MATE_PANEL_APPLET_ORIENT_DOWN:
+ default:
+ new_orient = GTK_ORIENTATION_HORIZONTAL;
+ break;
+ }
+
+ if (new_orient == tasklist->orientation)
+ return;
+
+ tasklist->orientation = new_orient;
+
+ tasklist_update(tasklist);
+}
+
+static void applet_change_background(MatePanelApplet* applet, MatePanelAppletBackgroundType type, GdkColor* color, GdkPixmap* pixmap, TasklistData* tasklist)
+{
+ switch (type)
+ {
+ case PANEL_NO_BACKGROUND:
+ wnck_tasklist_set_button_relief(WNCK_TASKLIST(tasklist->tasklist), GTK_RELIEF_NORMAL);
+ break;
+ case PANEL_COLOR_BACKGROUND:
+ case PANEL_PIXMAP_BACKGROUND:
+ wnck_tasklist_set_button_relief(WNCK_TASKLIST(tasklist->tasklist), GTK_RELIEF_NONE);
+ break;
+ }
+}
+
+static void applet_change_pixel_size(MatePanelApplet* applet, gint size, TasklistData* tasklist)
+{
+ if (tasklist->size == size)
+ return;
+
+ tasklist->size = size;
+
+ tasklist_update(tasklist);
+}
+
+static void destroy_tasklist(GtkWidget* widget, TasklistData* tasklist)
+{
+ MateConfClient* client = mateconf_client_get_default();
+
+ mateconf_client_notify_remove(client, tasklist->listeners[0]);
+ mateconf_client_notify_remove(client, tasklist->listeners[1]);
+ mateconf_client_notify_remove(client, tasklist->listeners[2]);
+
+ g_object_unref(G_OBJECT(client));
+
+ tasklist->listeners[0] = 0;
+ tasklist->listeners[1] = 0;
+ tasklist->listeners[2] = 0;
+
+ if (tasklist->properties_dialog)
+ gtk_widget_destroy(tasklist->properties_dialog);
+
+ g_free(tasklist);
+}
+
+static const GtkActionEntry tasklist_menu_actions[] = {
+ {
+ "TasklistPreferences",
+ GTK_STOCK_PROPERTIES,
+ N_("_Preferences"),
+ NULL,
+ NULL,
+ G_CALLBACK(display_properties_dialog)
+ },
+ {
+ "TasklistHelp",
+ GTK_STOCK_HELP,
+ N_("_Help"),
+ NULL,
+ NULL,
+ G_CALLBACK(display_help_dialog)
+ },
+ {
+ "TasklistAbout",
+ GTK_STOCK_ABOUT,
+ N_("_About"),
+ NULL,
+ NULL,
+ G_CALLBACK(display_about_dialog)
+ }
+};
+
+static void tasklist_properties_update_content_radio(TasklistData* tasklist)
+{
+ GtkWidget* button;
+
+ if (tasklist->show_current_radio == NULL)
+ return;
+
+ if (tasklist->include_all_workspaces)
+ {
+ button = tasklist->show_all_radio;
+ }
+ else
+ {
+ button = tasklist->show_current_radio;
+ }
+
+ if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)))
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
+
+ gtk_widget_set_sensitive(tasklist->minimized_windows_label, tasklist->include_all_workspaces);
+ gtk_widget_set_sensitive(tasklist->move_minimized_radio, tasklist->include_all_workspaces);
+ gtk_widget_set_sensitive(tasklist->change_workspace_radio, tasklist->include_all_workspaces);
+}
+
+static void display_all_workspaces_changed(MateConfClient* client, guint cnxn_id, MateConfEntry* entry, TasklistData* tasklist)
+{
+ gboolean value;
+
+ if (!entry->value || entry->value->type != MATECONF_VALUE_BOOL)
+ return;
+
+ value = mateconf_value_get_bool(entry->value);
+
+ tasklist->include_all_workspaces = (value != 0);
+ tasklist_update(tasklist);
+
+ tasklist_properties_update_content_radio(tasklist);
+}
+
+static WnckTasklistGroupingType get_grouping_type(MateConfValue* value)
+{
+ WnckTasklistGroupingType type = -1;
+ const char* str;
+
+ g_assert(value != NULL);
+
+ /* Backwards compat for old type: */
+ if (value->type == MATECONF_VALUE_BOOL)
+ {
+ type = (mateconf_value_get_bool(value)) ? WNCK_TASKLIST_AUTO_GROUP : WNCK_TASKLIST_NEVER_GROUP;
+
+ }
+ else if (value->type == MATECONF_VALUE_STRING)
+ {
+ str = mateconf_value_get_string(value);
+
+ if (g_ascii_strcasecmp(str, "never") == 0)
+ {
+ type = WNCK_TASKLIST_NEVER_GROUP;
+ }
+ else if (g_ascii_strcasecmp(str, "auto") == 0)
+ {
+ type = WNCK_TASKLIST_AUTO_GROUP;
+ }
+ else if (g_ascii_strcasecmp(str, "always") == 0)
+ {
+ type = WNCK_TASKLIST_ALWAYS_GROUP;
+ }
+ }
+
+ return type;
+}
+
+static GtkWidget* get_grouping_button(TasklistData* tasklist, WnckTasklistGroupingType type)
+{
+ switch (type)
+ {
+ default:
+ case WNCK_TASKLIST_NEVER_GROUP:
+ return tasklist->never_group_radio;
+ break;
+ case WNCK_TASKLIST_AUTO_GROUP:
+ return tasklist->auto_group_radio;
+ break;
+ case WNCK_TASKLIST_ALWAYS_GROUP:
+ return tasklist->always_group_radio;
+ break;
+ }
+}
+
+static void group_windows_changed(MateConfClient* client, guint cnxn_id, MateConfEntry* entry, TasklistData* tasklist)
+{
+ WnckTasklistGroupingType type;
+ GtkWidget* button;
+
+ if (!entry->value || (entry->value->type != MATECONF_VALUE_BOOL && entry->value->type != MATECONF_VALUE_STRING))
+ return;
+
+ type = get_grouping_type(entry->value);
+
+ if (type == -1)
+ {
+ g_warning("tasklist: Unknown value for MateConf key 'group_windows'");
+ return;
+ }
+
+ tasklist->grouping = type;
+ tasklist_update(tasklist);
+
+ button = get_grouping_button(tasklist, type);
+
+ if (button && !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)))
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
+ }
+}
+
+static void tasklist_update_unminimization_radio(TasklistData* tasklist)
+{
+ GtkWidget* button;
+
+ if (tasklist->move_minimized_radio == NULL)
+ return;
+
+ if (tasklist->move_unminimized_windows)
+ {
+ button = tasklist->move_minimized_radio;
+ }
+ else
+ {
+ button = tasklist->change_workspace_radio;
+ }
+
+ if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)))
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
+}
+
+
+static void move_unminimized_windows_changed(MateConfClient* client, guint cnxn_id, MateConfEntry* entry, TasklistData* tasklist)
+{
+ gboolean value;
+
+ if (!entry->value || entry->value->type != MATECONF_VALUE_BOOL)
+ return;
+
+ value = mateconf_value_get_bool(entry->value);
+
+ tasklist->move_unminimized_windows = (value != 0);
+ tasklist_update(tasklist);
+
+ tasklist_update_unminimization_radio(tasklist);
+}
+
+static void setup_mateconf(TasklistData* tasklist)
+{
+ MateConfClient* client;
+ char* key;
+
+ client = mateconf_client_get_default();
+
+ key = mate_panel_applet_mateconf_get_full_key(MATE_PANEL_APPLET(tasklist->applet), "display_all_workspaces");
+ tasklist->listeners[0] = mateconf_client_notify_add(client, key, (MateConfClientNotifyFunc) display_all_workspaces_changed, tasklist, NULL, NULL);
+ g_free(key);
+
+ key = mate_panel_applet_mateconf_get_full_key(MATE_PANEL_APPLET(tasklist->applet), "group_windows");
+ tasklist->listeners[1] = mateconf_client_notify_add(client, key, (MateConfClientNotifyFunc) group_windows_changed, tasklist, NULL, NULL);
+ g_free(key);
+
+ key = mate_panel_applet_mateconf_get_full_key(MATE_PANEL_APPLET(tasklist->applet), "move_unminimized_windows");
+ tasklist->listeners[2] = mateconf_client_notify_add(client, key, (MateConfClientNotifyFunc) move_unminimized_windows_changed, tasklist, NULL, NULL);
+ g_free(key);
+
+ g_object_unref(G_OBJECT(client));
+}
+
+static void applet_size_request(GtkWidget* widget, GtkRequisition* requisition, TasklistData* tasklist)
+{
+ int len;
+ const int* size_hints;
+ GtkRequisition child_req;
+ WnckTasklist* wncktl = WNCK_TASKLIST(tasklist->tasklist);
+
+ gtk_widget_get_child_requisition(tasklist->applet, &child_req);
+
+ size_hints = wnck_tasklist_get_size_hint_list(wncktl, &len);
+ g_assert(len % 2 == 0);
+
+ mate_panel_applet_set_size_hints(MATE_PANEL_APPLET(tasklist->applet), size_hints, len, 0);
+}
+
+static GdkPixbuf* icon_loader_func(const char* icon, int size, unsigned int flags, void* data)
+{
+ TasklistData* tasklist;
+ GdkPixbuf* retval;
+ char* icon_no_extension;
+ char* p;
+
+ tasklist = data;
+
+ if (icon == NULL || strcmp(icon, "") == 0)
+ return NULL;
+
+ if (g_path_is_absolute(icon))
+ {
+ if (g_file_test(icon, G_FILE_TEST_EXISTS))
+ {
+ return gdk_pixbuf_new_from_file_at_size(icon, size, size, NULL);
+ }
+ else
+ {
+ char* basename;
+
+ basename = g_path_get_basename(icon);
+ retval = icon_loader_func(basename, size, flags, data);
+ g_free(basename);
+
+ return retval;
+ }
+ }
+
+ /* This is needed because some .desktop files have an icon name *and*
+ * an extension as icon */
+ icon_no_extension = g_strdup(icon);
+ p = strrchr(icon_no_extension, '.');
+
+ if (p && (strcmp(p, ".png") == 0 || strcmp(p, ".xpm") == 0 || strcmp(p, ".svg") == 0))
+ {
+ *p = 0;
+ }
+
+ retval = gtk_icon_theme_load_icon(tasklist->icon_theme, icon_no_extension, size, 0, NULL);
+ g_free(icon_no_extension);
+
+ return retval;
+}
+
+gboolean window_list_applet_fill(MatePanelApplet* applet)
+{
+ TasklistData* tasklist;
+ GtkActionGroup* action_group;
+ gchar* ui_path;
+ GError* error;
+ MateConfValue* value;
+
+ tasklist = g_new0(TasklistData, 1);
+
+ tasklist->applet = GTK_WIDGET(applet);
+
+ mate_panel_applet_set_flags(MATE_PANEL_APPLET(tasklist->applet), MATE_PANEL_APPLET_EXPAND_MAJOR | MATE_PANEL_APPLET_EXPAND_MINOR | MATE_PANEL_APPLET_HAS_HANDLE);
+
+ mate_panel_applet_add_preferences(applet, "/schemas/apps/window_list_applet/prefs", NULL);
+
+ setup_mateconf(tasklist);
+
+ error = NULL;
+
+ tasklist->include_all_workspaces = mate_panel_applet_mateconf_get_bool(applet, "display_all_workspaces", &error);
+
+ if (error)
+ {
+ g_error_free(error);
+ tasklist->include_all_workspaces = FALSE; /* Default value */
+ }
+
+ error = NULL;
+ tasklist->grouping = -1;
+
+ value = mate_panel_applet_mateconf_get_value(applet, "group_windows", &error);
+
+ if (error)
+ {
+ g_error_free(error);
+ }
+ else if (value)
+ {
+ tasklist->grouping = get_grouping_type(value);
+ mateconf_value_free(value);
+ }
+
+ if (tasklist->grouping < 0)
+ tasklist->grouping = WNCK_TASKLIST_AUTO_GROUP; /* Default value */
+
+ error = NULL;
+ tasklist->move_unminimized_windows = mate_panel_applet_mateconf_get_bool(applet, "move_unminimized_windows", &error);
+
+ if (error)
+ {
+ g_error_free(error);
+ tasklist->move_unminimized_windows = TRUE; /* Default value */
+ }
+
+ tasklist->size = mate_panel_applet_get_size(applet);
+
+ switch (mate_panel_applet_get_orient(applet))
+ {
+ case MATE_PANEL_APPLET_ORIENT_LEFT:
+ case MATE_PANEL_APPLET_ORIENT_RIGHT:
+ tasklist->orientation = GTK_ORIENTATION_VERTICAL;
+ break;
+ case MATE_PANEL_APPLET_ORIENT_UP:
+ case MATE_PANEL_APPLET_ORIENT_DOWN:
+ default:
+ tasklist->orientation = GTK_ORIENTATION_HORIZONTAL;
+ break;
+ }
+
+ tasklist->tasklist = wnck_tasklist_new(NULL);
+
+ wnck_tasklist_set_icon_loader(WNCK_TASKLIST(tasklist->tasklist), icon_loader_func, tasklist, NULL);
+
+ g_signal_connect(G_OBJECT(tasklist->tasklist), "destroy", G_CALLBACK(destroy_tasklist), tasklist);
+
+ g_signal_connect(G_OBJECT(tasklist->applet), "size_request", G_CALLBACK(applet_size_request), tasklist);
+ tasklist_update(tasklist);
+ gtk_widget_show(tasklist->tasklist);
+
+ gtk_container_add(GTK_CONTAINER(tasklist->applet), tasklist->tasklist);
+
+ g_signal_connect(G_OBJECT(tasklist->applet), "realize", G_CALLBACK(applet_realized), tasklist);
+ g_signal_connect(G_OBJECT(tasklist->applet), "change_orient", G_CALLBACK(applet_change_orient), tasklist);
+ g_signal_connect(G_OBJECT(tasklist->applet), "change_size", G_CALLBACK(applet_change_pixel_size), tasklist);
+ g_signal_connect(G_OBJECT(tasklist->applet), "change_background", G_CALLBACK(applet_change_background), tasklist);
+
+ mate_panel_applet_set_background_widget(MATE_PANEL_APPLET(tasklist->applet), GTK_WIDGET(tasklist->applet));
+
+ action_group = gtk_action_group_new("Tasklist Applet Actions");
+ gtk_action_group_set_translation_domain(action_group, GETTEXT_PACKAGE);
+ gtk_action_group_add_actions(action_group, tasklist_menu_actions, G_N_ELEMENTS(tasklist_menu_actions), tasklist);
+ ui_path = g_build_filename(WNCK_MENU_UI_DIR, "window-list-menu.xml", NULL);
+ mate_panel_applet_setup_menu_from_file(MATE_PANEL_APPLET(tasklist->applet), ui_path, action_group);
+ g_free(ui_path);
+
+ if (mate_panel_applet_get_locked_down(MATE_PANEL_APPLET(tasklist->applet)))
+ {
+ GtkAction* action;
+
+ action = gtk_action_group_get_action(action_group, "TasklistPreferences");
+ gtk_action_set_visible(action, FALSE);
+ }
+
+ g_object_unref(action_group);
+
+ gtk_widget_show(tasklist->applet);
+
+ return TRUE;
+}
+
+
+static void display_help_dialog(GtkAction* action, TasklistData* tasklist)
+{
+ wncklet_display_help(tasklist->applet, "user-guide", "windowlist", WINDOW_LIST_ICON);
+}
+
+static void display_about_dialog(GtkAction* action, TasklistData* tasklist)
+{
+ static const gchar* authors[] = {
+ "Alexander Larsson <alla@lysator.liu.se>",
+ NULL
+ };
+
+ const char* documenters [] = {
+ "Sun MATE Documentation Team <gdocteam@sun.com>",
+ NULL
+ };
+
+ char copyright[] = \
+ "Copyright \xc2\xa9 2001-2002 Red Hat, Inc.";
+
+ gtk_show_about_dialog(GTK_WINDOW(tasklist->applet),
+ "program-name", _("Window List"),
+ "authors", authors,
+ "comments", _("The Window List shows a list of all windows in a set of buttons and lets you browse them."),
+ "copyright", copyright,
+ "documenters", documenters,
+ "icon-name", WINDOW_LIST_ICON,
+ "logo-icon-name", WINDOW_LIST_ICON,
+ "translator-credits", _("translator-credits"),
+ "version", VERSION,
+ "website", "http://matsusoft.com.ar/projects/mate/",
+ NULL);
+}
+
+static void group_windows_toggled(GtkToggleButton* button, TasklistData* tasklist)
+{
+ if (gtk_toggle_button_get_active(button))
+ {
+ char* str = g_object_get_data(G_OBJECT(button), "group_value");
+ mate_panel_applet_mateconf_set_string(MATE_PANEL_APPLET(tasklist->applet), "group_windows", str, NULL);
+ }
+}
+
+/*static void group_button_toggled(GtkToggleButton* button, TasklistData* tasklist)
+{
+ if (gtk_toggle_button_get_active(button))
+ {
+ char* str = g_object_get_data(G_OBJECT(button), "group_value");
+
+ printf("str: %s\n", str);
+ // Add later!
+ //mate_panel_applet_mateconf_set_string(MATE_PANEL_APPLET(tasklist->applet), "group_button", str, NULL);
+ }
+}*/
+
+static void move_minimized_toggled(GtkToggleButton* button, TasklistData* tasklist)
+{
+ mate_panel_applet_mateconf_set_bool(MATE_PANEL_APPLET(tasklist->applet), "move_unminimized_windows", gtk_toggle_button_get_active(button), NULL);
+}
+
+static void display_all_workspaces_toggled(GtkToggleButton* button, TasklistData* tasklist)
+{
+ mate_panel_applet_mateconf_set_bool(MATE_PANEL_APPLET(tasklist->applet), "display_all_workspaces", gtk_toggle_button_get_active(button), NULL);
+}
+
+#define WID(s) GTK_WIDGET(gtk_builder_get_object(builder, s))
+
+static void setup_sensitivity(TasklistData* tasklist, MateConfClient* client, GtkBuilder* builder, const char* wid1, const char* wid2, const char* wid3, const char* key)
+{
+ MatePanelApplet* applet = MATE_PANEL_APPLET(tasklist->applet);
+ char* fullkey;
+ GtkWidget* w;
+
+ fullkey = mate_panel_applet_mateconf_get_full_key(applet, key);
+
+ if (mateconf_client_key_is_writable(client, fullkey, NULL))
+ {
+ g_free(fullkey);
+ return;
+ }
+
+ g_free(fullkey);
+
+ w = WID(wid1);
+ g_assert(w != NULL);
+ gtk_widget_set_sensitive(w, FALSE);
+
+ if (wid2 != NULL)
+ {
+ w = WID(wid2);
+ g_assert(w != NULL);
+ gtk_widget_set_sensitive(w, FALSE);
+ }
+
+ if (wid3 != NULL)
+ {
+ w = WID(wid3);
+ g_assert(w != NULL);
+ gtk_widget_set_sensitive(w, FALSE);
+ }
+}
+
+static void setup_dialog(GtkBuilder* builder, TasklistData* tasklist)
+{
+ MateConfClient* client;
+ GtkWidget* button;
+
+ client = mateconf_client_get_default();
+
+ tasklist->show_current_radio = WID("show_current_radio");
+ tasklist->show_all_radio = WID("show_all_radio");
+
+ setup_sensitivity(tasklist, client, builder, "show_current_radio", "show_all_radio", NULL, "display_all_workspaces" /* key */);
+
+ tasklist->never_group_radio = WID("never_group_radio");
+ tasklist->auto_group_radio = WID("auto_group_radio");
+ tasklist->always_group_radio = WID("always_group_radio");
+
+ setup_sensitivity(tasklist, client, builder, "never_group_radio", "auto_group_radio", "always_group_radio", "group_windows" /* key */);
+
+ tasklist->minimized_windows_label = WID("minimized_windows_label");
+ tasklist->move_minimized_radio = WID("move_minimized_radio");
+ tasklist->change_workspace_radio = WID("change_workspace_radio");
+
+
+ /*tasklist->style_group_radio = WID("style_button_radio");
+ tasklist->icon_group_radio = WID("icon_only_radio");
+ tasklist->text_group_radio = WID("text_only_radio");*/
+
+ setup_sensitivity(tasklist, client, builder, "move_minimized_radio", "change_workspace_radio", NULL, "move_unminimized_windows" /* key */);
+
+ /* Window grouping: */
+ button = get_grouping_button(tasklist, tasklist->grouping);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
+ g_object_set_data(G_OBJECT(tasklist->never_group_radio), "group_value", "never");
+ g_object_set_data(G_OBJECT(tasklist->auto_group_radio), "group_value", "auto");
+ g_object_set_data(G_OBJECT(tasklist->always_group_radio), "group_value", "always");
+
+ g_signal_connect(G_OBJECT(tasklist->never_group_radio), "toggled", (GCallback) group_windows_toggled, tasklist);
+ g_signal_connect(G_OBJECT(tasklist->auto_group_radio), "toggled", (GCallback) group_windows_toggled, tasklist);
+ g_signal_connect(G_OBJECT(tasklist->always_group_radio), "toggled", (GCallback) group_windows_toggled, tasklist);
+
+ /* Button list */
+ //button = get_grouping_button(tasklist, tasklist->grouping);
+ //gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
+ /*g_object_set_data(G_OBJECT(tasklist->style_group_radio), "group_value", "style");
+ g_object_set_data(G_OBJECT(tasklist->icon_group_radio), "group_value", "icon");
+ g_object_set_data(G_OBJECT(tasklist->text_group_radio), "group_value", "text");
+
+ g_signal_connect(G_OBJECT(tasklist->style_group_radio), "toggled", (GCallback) group_button_toggled, tasklist);
+ g_signal_connect(G_OBJECT(tasklist->icon_group_radio), "toggled", (GCallback) group_button_toggled, tasklist);
+ g_signal_connect(G_OBJECT(tasklist->text_group_radio), "toggled", (GCallback) group_button_toggled, tasklist);*/
+
+ /* move window when unminimizing: */
+ tasklist_update_unminimization_radio(tasklist);
+ g_signal_connect(G_OBJECT(tasklist->move_minimized_radio), "toggled", (GCallback) move_minimized_toggled, tasklist);
+
+ /* Tasklist content: */
+ tasklist_properties_update_content_radio (tasklist);
+ g_signal_connect(G_OBJECT(tasklist->show_all_radio), "toggled", (GCallback) display_all_workspaces_toggled, tasklist);
+
+ g_signal_connect_swapped(WID("done_button"), "clicked", (GCallback) gtk_widget_hide, tasklist->properties_dialog);
+ g_signal_connect(tasklist->properties_dialog, "response", G_CALLBACK(response_cb), tasklist);
+
+ g_object_unref(G_OBJECT(client));
+}
+
+static void display_properties_dialog(GtkAction* action, TasklistData* tasklist)
+{
+ if (tasklist->properties_dialog == NULL)
+ {
+ GtkBuilder* builder;
+ GError* error;
+
+ builder = gtk_builder_new();
+ gtk_builder_set_translation_domain(builder, GETTEXT_PACKAGE);
+
+ error = NULL;
+ gtk_builder_add_from_file(builder, TASKLIST_BUILDERDIR "/window-list.ui", &error);
+
+ if (error)
+ {
+ g_warning("Error loading preferences: %s", error->message);
+ g_error_free(error);
+ return;
+ }
+
+ tasklist->properties_dialog = WID("tasklist_properties_dialog");
+
+ g_object_add_weak_pointer(G_OBJECT(tasklist->properties_dialog), (void**) &tasklist->properties_dialog);
+
+ setup_dialog(builder, tasklist);
+
+ g_object_unref(builder);
+ }
+
+ gtk_window_set_icon_name(GTK_WINDOW(tasklist->properties_dialog), WINDOW_LIST_ICON);
+
+ gtk_window_set_resizable(GTK_WINDOW(tasklist->properties_dialog), FALSE);
+ gtk_window_set_screen(GTK_WINDOW(tasklist->properties_dialog), gtk_widget_get_screen(tasklist->applet));
+ gtk_window_present(GTK_WINDOW(tasklist->properties_dialog));
+}
diff --git a/applets/wncklet/window-list.h b/applets/wncklet/window-list.h
new file mode 100644
index 00000000..aa5c2811
--- /dev/null
+++ b/applets/wncklet/window-list.h
@@ -0,0 +1,25 @@
+/*
+ * libwnck based tasklist Applet.
+ * (C) 2001 Alexander Larsson
+ *
+ * Authors: Alexander Larsson
+ *
+ */
+
+#ifndef __WINDOW_LIST_H__
+#define __WINDOW_LIST_H__
+
+#include <glib.h>
+#include <mate-panel-applet.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+gboolean window_list_applet_fill(MatePanelApplet* applet);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/applets/wncklet/window-list.schemas.in b/applets/wncklet/window-list.schemas.in
new file mode 100644
index 00000000..b60c3222
--- /dev/null
+++ b/applets/wncklet/window-list.schemas.in
@@ -0,0 +1,77 @@
+<mateconfschemafile>
+ <schemalist>
+
+ <schema>
+ <key>/schemas/apps/window_list_applet/prefs/display_all_workspaces</key>
+ <owner>window-list-applet</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Show windows from all workspaces</short>
+ <long>
+ If true, the window list will show windows from all workspaces.
+ Otherwise it will only display windows from the current workspace.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/window_list_applet/prefs/group_windows</key>
+ <owner>window-list-applet</owner>
+ <type>string</type>
+ <default>never</default>
+ <locale name="C">
+ <short>When to group windows</short>
+ <long>
+ Decides when to group windows from the same application on the
+ window list. Possible values are "never", "auto" and "always".
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/window_list_applet/prefs/move_unminimized_windows</key>
+ <owner>window-list-applet</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Move windows to current workspace when unminimized</short>
+ <long>
+ If true, then when unminimizing a window, move it to the
+ current workspace. Otherwise, switch to the workspace of
+ the window.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/window_list_applet/prefs/minimum_size</key>
+ <owner>window-list-applet</owner>
+ <type>int</type>
+ <default>50</default>
+ <locale name="C">
+ <short>Minimum window list size</short>
+ <long>
+ The use of this key was deprecated in MATE 2.20. The schema is
+ retained for compatibility with older versions.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/window_list_applet/prefs/maximum_size</key>
+ <owner>window-list-applet</owner>
+ <type>int</type>
+ <default>4096</default>
+ <locale name="C">
+ <short>Maximum window list size</short>
+ <long>
+ The use of this key was deprecated in MATE 2.20. The schema is
+ retained for compatibility with older versions.
+ </long>
+ </locale>
+ </schema>
+
+ </schemalist>
+
+</mateconfschemafile>
diff --git a/applets/wncklet/window-list.ui b/applets/wncklet/window-list.ui
new file mode 100644
index 00000000..9d6f4e71
--- /dev/null
+++ b/applets/wncklet/window-list.ui
@@ -0,0 +1,443 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.16"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkDialog" id="tasklist_properties_dialog">
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Window List Preferences</property>
+ <property name="type_hint">normal</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox2">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <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="orientation">vertical</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkVBox" id="vbox7">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Window List Content</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox9">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="show_current_radio">
+ <property name="label" translatable="yes">Sh_ow windows from current workspace</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="show_all_radio">
+ <property name="label" translatable="yes">Show windows from a_ll workspaces</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">show_current_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+
+
+
+
+
+
+
+
+
+<!-- agregado -- >
+ <child>
+ <object class="GtkVBox" id="vbox15">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+
+ <child>
+
+ <object class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Button list</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+
+ </child>
+
+ <child>
+ <object class="GtkAlignment" id="alignment16">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="left_padding">12</property>
+
+ < ! -- lista de opciones -- >
+ <child>
+ <object class="GtkVBox" id="vbox16">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <object class="GtkRadioButton" id="style_group_radio">
+ <property name="label" translatable="yes">Show application icon and title</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+
+ <child>
+ <object class="GtkRadioButton" id="icon_group_radio">
+ <property name="label" translatable="yes">Show only application icon image</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">style_group_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+
+ <child>
+ <object class="GtkRadioButton" id="text_group_radio">
+ <property name="label" translatable="yes">Show only application text title</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">style_group_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+
+ </object>
+ </child>
+
+ </object>
+
+ <packing>
+ < !-- posicion dentro de la primer tabla vertical -- >
+ <property name="position">1</property>
+ </packing>
+
+ </child>
+
+ </object>
+
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+
+ </child>
+
+< ! -- !agregado -->
+
+
+
+
+
+
+
+
+
+
+ <child>
+ <object class="GtkVBox" id="vbox11">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Window Grouping</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox12">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="never_group_radio">
+ <property name="label" translatable="yes">_Never group windows</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="auto_group_radio">
+ <property name="label" translatable="yes">Group windows when _space is limited</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">never_group_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="always_group_radio">
+ <property name="label" translatable="yes">_Always group windows</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">never_group_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox13">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="minimized_windows_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Restoring Minimized Windows</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox14">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="move_minimized_radio">
+ <property name="label" translatable="yes">Restore to current _workspace</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="change_workspace_radio">
+ <property name="label" translatable="yes">Restore to na_tive workspace</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">move_minimized_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area2">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkButton" id="help_button">
+ <property name="label">gtk-help</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">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="done_button">
+ <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="has_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">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-11">help_button</action-widget>
+ <action-widget response="0">done_button</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/applets/wncklet/window-menu-menu.xml b/applets/wncklet/window-menu-menu.xml
new file mode 100644
index 00000000..2646b2d0
--- /dev/null
+++ b/applets/wncklet/window-menu-menu.xml
@@ -0,0 +1,3 @@
+<menuitem name="WindowMenu Help Item" action="WindowMenuHelp" />
+<menuitem name="WindowMenu About Item" action="WindowMenuAbout" />
+
diff --git a/applets/wncklet/window-menu.c b/applets/wncklet/window-menu.c
new file mode 100644
index 00000000..dabdb7e8
--- /dev/null
+++ b/applets/wncklet/window-menu.c
@@ -0,0 +1,269 @@
+/* window-menu.c: Window Selector applet
+ *
+ * Copyright (C) 2003 Sun Microsystems, Inc.
+ * Copyright (C) 2001 Free Software Foundation, Inc.
+ * Copyright (C) 2000 Helix Code, Inc.
+ *
+ * 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 of the License, 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.
+ *
+ * Authors:
+ * Mark McLoughlin <mark@skynet.ie>
+ * George Lebl <jirka@5z.com>
+ * Jacob Berkman <jacob@helixcode.com>
+ */
+
+#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1
+
+#ifdef HAVE_CONFIG_H
+ #include <config.h>
+#endif
+
+#include <string.h>
+#include <mate-panel-applet.h>
+
+#include <glib/gi18n.h>
+#include <gdk/gdkkeysyms.h>
+
+#include <libwnck/selector.h>
+
+#include "wncklet.h"
+#include "window-menu.h"
+
+#define WINDOW_MENU_ICON "mate-panel-window-menu"
+
+typedef struct {
+ GtkWidget* applet;
+ GtkWidget* selector;
+ int size;
+ MatePanelAppletOrient orient;
+} WindowMenu;
+
+static void window_menu_help(GtkAction* action, WindowMenu* window_menu)
+{
+ wncklet_display_help(window_menu->applet, "user-guide", "panel-windowselector", WINDOW_MENU_ICON);
+}
+
+static void window_menu_about(GtkAction* action, WindowMenu* window_menu)
+{
+ static const char* authors[] = {
+ "Mark McLoughlin <mark@skynet.ie>",
+ "George Lebl <jirka@5z.com>",
+ "Jacob Berkman <jacob@helixcode.com>",
+ NULL
+ };
+
+ const char* documenters[] = {
+ "Sun MATE Documentation Team <gdocteam@sun.com>",
+ NULL
+ };
+
+ char copyright[] = \
+ "Copyright \xc2\xa9 2003 Sun Microsystems, Inc.\n"
+ "Copyright \xc2\xa9 2001 Free Software Foundation, Inc.\n"
+ "Copyright \xc2\xa9 2000 Helix Code, Inc.";
+
+ gtk_show_about_dialog(GTK_WINDOW(window_menu->applet),
+ "program-name", _("Window Selector"),
+ "authors", authors,
+ "comments", _("The Window Selector shows a list of all windows in a menu and lets you browse them."),
+ "copyright", copyright,
+ "documenters", documenters,
+ "icon-name", WINDOW_MENU_ICON,
+ "logo-icon-name", WINDOW_MENU_ICON,
+ "translator-credits", _("translator-credits"),
+ "version", VERSION,
+ "website", "http://matsusoft.com.ar/projects/mate/",
+ NULL);
+}
+
+static const GtkActionEntry window_menu_actions[] = {
+ {
+ "WindowMenuHelp",
+ GTK_STOCK_HELP,
+ N_("_Help"),
+ NULL,
+ NULL,
+ G_CALLBACK(window_menu_help)
+ },
+ {
+ "WindowMenuAbout",
+ GTK_STOCK_ABOUT,
+ N_("_About"),
+ NULL,
+ NULL,
+ G_CALLBACK(window_menu_about)
+ }
+};
+
+static void window_menu_destroy(GtkWidget* widget, WindowMenu* window_menu)
+{
+ g_free(window_menu);
+}
+
+static gboolean window_menu_on_expose(GtkWidget* widget, GdkEventExpose* event, gpointer data)
+{
+ WindowMenu* window_menu = data;
+
+ if (gtk_widget_has_focus(window_menu->applet))
+ gtk_paint_focus(gtk_widget_get_style(widget), gtk_widget_get_window(widget), gtk_widget_get_state(widget), NULL, widget, "menu-applet", 0, 0, -1, -1);
+
+ return FALSE;
+}
+
+static inline void force_no_focus_padding(GtkWidget* widget)
+{
+ gboolean first_time = TRUE;
+
+ if (first_time)
+ {
+ gtk_rc_parse_string("\n"
+ " style \"window-menu-applet-button-style\"\n"
+ " {\n"
+ " GtkWidget::focus-line-width=0\n"
+ " GtkWidget::focus-padding=0\n"
+ " }\n"
+ "\n"
+ " widget \"*.PanelApplet-window-menu-applet-button\" style \"window-menu-applet-button-style\"\n"
+ "\n");
+ first_time = FALSE;
+ }
+
+ gtk_widget_set_name(widget, "PanelApplet-window-menu-applet-button");
+}
+
+static void window_menu_size_allocate(MatePanelApplet* applet, GtkAllocation* allocation, WindowMenu* window_menu)
+{
+ MatePanelAppletOrient orient;
+ GList* children;
+ GtkWidget* child;
+
+ orient = mate_panel_applet_get_orient(applet);
+
+ children = gtk_container_get_children(GTK_CONTAINER(window_menu->selector));
+ child = GTK_WIDGET(children->data);
+ g_list_free(children);
+
+ if (orient == MATE_PANEL_APPLET_ORIENT_LEFT || orient == MATE_PANEL_APPLET_ORIENT_RIGHT)
+ {
+ if (window_menu->size == allocation->width && orient == window_menu->orient)
+ return;
+
+ window_menu->size = allocation->width;
+ gtk_widget_set_size_request(child, window_menu->size, -1);
+ }
+ else
+ {
+ if (window_menu->size == allocation->height && orient == window_menu->orient)
+ return;
+
+ window_menu->size = allocation->height;
+ gtk_widget_set_size_request(child, -1, window_menu->size);
+ }
+
+ window_menu->orient = orient;
+}
+
+static gboolean window_menu_key_press_event(GtkWidget* widget, GdkEventKey* event, WindowMenu* window_menu)
+{
+ GtkMenuShell* menu_shell;
+ WnckSelector* selector;
+
+ switch (event->keyval)
+ {
+ case GDK_KP_Enter:
+ case GDK_ISO_Enter:
+ case GDK_3270_Enter:
+ case GDK_Return:
+ case GDK_space:
+ case GDK_KP_Space:
+ selector = WNCK_SELECTOR(window_menu->selector);
+ /*
+ * We need to call _gtk_menu_shell_activate() here as is done in
+ * window_key_press_handler in gtkmenubar.c which pops up menu
+ * when F10 is pressed.
+ *
+ * As that function is private its code is replicated here.
+ */
+ menu_shell = GTK_MENU_SHELL(selector);
+
+ if (!menu_shell->active)
+ {
+ gtk_grab_add(GTK_WIDGET(menu_shell));
+ menu_shell->have_grab = TRUE;
+ menu_shell->active = TRUE;
+ }
+
+ gtk_menu_shell_select_first(menu_shell, FALSE);
+ return TRUE;
+ default:
+ break;
+ }
+
+ return FALSE;
+}
+
+static gboolean filter_button_press(GtkWidget* widget, GdkEventButton* event, gpointer data)
+{
+ if (event->button != 1)
+ g_signal_stop_emission_by_name(widget, "button_press_event");
+
+ return FALSE;
+}
+
+gboolean window_menu_applet_fill(MatePanelApplet* applet)
+{
+ WindowMenu* window_menu;
+ GtkActionGroup* action_group;
+ gchar* ui_path;
+
+ window_menu = g_new0(WindowMenu, 1);
+
+ window_menu->applet = GTK_WIDGET(applet);
+ force_no_focus_padding(window_menu->applet);
+ gtk_widget_set_tooltip_text(window_menu->applet, _("Window Selector"));
+
+ mate_panel_applet_set_flags(applet, MATE_PANEL_APPLET_EXPAND_MINOR);
+ window_menu->size = mate_panel_applet_get_size(applet);
+ window_menu->orient = mate_panel_applet_get_orient(applet);
+
+ g_signal_connect(window_menu->applet, "destroy", G_CALLBACK(window_menu_destroy), window_menu);
+
+ action_group = gtk_action_group_new("WindowMenu Applet Actions");
+ gtk_action_group_set_translation_domain(action_group, GETTEXT_PACKAGE);
+ gtk_action_group_add_actions(action_group, window_menu_actions, G_N_ELEMENTS(window_menu_actions), window_menu);
+ ui_path = g_build_filename(WNCK_MENU_UI_DIR, "window-menu-menu.xml", NULL);
+ mate_panel_applet_setup_menu_from_file(applet, ui_path, action_group);
+ g_free(ui_path);
+ g_object_unref(action_group);
+
+ window_menu->selector = wnck_selector_new();
+ gtk_container_add(GTK_CONTAINER(window_menu->applet), window_menu->selector);
+
+ mate_panel_applet_set_background_widget(MATE_PANEL_APPLET(window_menu->applet), GTK_WIDGET(window_menu->selector));
+
+ g_signal_connect(window_menu->applet, "key_press_event", G_CALLBACK(window_menu_key_press_event), window_menu);
+ g_signal_connect(window_menu->applet, "size-allocate", G_CALLBACK(window_menu_size_allocate), window_menu);
+
+ g_signal_connect_after(G_OBJECT(window_menu->applet), "focus-in-event", G_CALLBACK(gtk_widget_queue_draw), window_menu);
+ g_signal_connect_after(G_OBJECT(window_menu->applet), "focus-out-event", G_CALLBACK(gtk_widget_queue_draw), window_menu);
+ g_signal_connect_after(G_OBJECT(window_menu->selector), "expose-event", G_CALLBACK(window_menu_on_expose), window_menu);
+
+ g_signal_connect(G_OBJECT(window_menu->selector), "button_press_event", G_CALLBACK(filter_button_press), window_menu);
+
+ gtk_widget_show_all(GTK_WIDGET(window_menu->applet));
+
+ return TRUE;
+}
diff --git a/applets/wncklet/window-menu.h b/applets/wncklet/window-menu.h
new file mode 100644
index 00000000..0da59d16
--- /dev/null
+++ b/applets/wncklet/window-menu.h
@@ -0,0 +1,45 @@
+/* window-menu.h: Window Menu applet
+ *
+ * Copyright (C) 2003 Sun Microsystems, Inc.
+ * Copyright (C) 2001 Free Software Foundation, Inc.
+ * Copyright (C) 2000 Helix Code, Inc.
+ *
+ * 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 of the License, 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.
+ *
+ * Authors:
+ * Mark McLoughlin <mark@skynet.ie>
+ * Glynn Foster <glynn.foster@sun.com>
+ * George Lebl <jirka@5z.com>
+ * Jacob Berkman <jacob@helixcode.com>
+ */
+
+#ifndef __WINDOW_MENU_H__
+#define __WINDOW_MENU_H__
+
+#include <glib.h>
+#include <mate-panel-applet.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+gboolean window_menu_applet_fill(MatePanelApplet* applet);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/applets/wncklet/wncklet.c b/applets/wncklet/wncklet.c
new file mode 100644
index 00000000..43135620
--- /dev/null
+++ b/applets/wncklet/wncklet.c
@@ -0,0 +1,144 @@
+/* wncklet.c: A collection of window navigation applets
+ *
+ * Copyright (C) 2003 Sun Microsystems, Inc.
+ *
+ * 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 of the License, 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.
+ *
+ * Authors:
+ * Mark McLoughlin <mark@skynet.ie>
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include <config.h>
+#endif
+
+#include <string.h>
+#include <mate-panel-applet.h>
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+#include <libwnck/screen.h>
+#include <libwnck/util.h>
+
+#include "wncklet.h"
+#include "window-menu.h"
+#include "workspace-switcher.h"
+#include "window-list.h"
+#include "showdesktop.h"
+
+void wncklet_display_help(GtkWidget* widget, const char* doc_id, const char* link_id, const char* icon_name)
+{
+ GError* error = NULL;
+ char* uri;
+
+ if (link_id)
+ uri = g_strdup_printf("ghelp:%s?%s", doc_id, link_id);
+ else
+ uri = g_strdup_printf("ghelp:%s", doc_id);
+
+ gtk_show_uri(gtk_widget_get_screen(widget), uri, gtk_get_current_event_time(), &error);
+
+ g_free(uri);
+
+ if (error && g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ {
+ g_error_free(error);
+ }
+ else if (error)
+ {
+ GtkWidget* parent;
+ GtkWidget* dialog;
+ char* primary;
+
+ if (GTK_IS_WINDOW(widget))
+ parent = widget;
+ else
+ parent = NULL;
+
+ primary = g_markup_printf_escaped(_("Could not display help document '%s'"), doc_id);
+ dialog = gtk_message_dialog_new(parent ? GTK_WINDOW(parent) : NULL, GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", primary);
+
+ gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", error->message);
+
+ g_error_free(error);
+ g_free(primary);
+
+ g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
+
+ gtk_window_set_icon_name(GTK_WINDOW(dialog), icon_name);
+ gtk_window_set_screen(GTK_WINDOW(dialog), gtk_widget_get_screen(widget));
+
+ if (parent == NULL)
+ {
+ /* we have no parent window */
+ gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog), FALSE);
+ gtk_window_set_title(GTK_WINDOW(dialog), _("Error displaying help document"));
+ }
+
+ gtk_widget_show(dialog);
+ }
+}
+
+WnckScreen* wncklet_get_screen(GtkWidget* applet)
+{
+ int screen_num;
+
+ if (!gtk_widget_has_screen(applet))
+ return wnck_screen_get_default();
+
+ screen_num = gdk_screen_get_number(gtk_widget_get_screen(applet));
+
+ return wnck_screen_get(screen_num);
+}
+
+void wncklet_connect_while_alive(gpointer object, const char* signal, GCallback func, gpointer func_data, gpointer alive_object)
+{
+ GClosure* closure;
+
+ closure = g_cclosure_new(func, func_data, NULL);
+ g_object_watch_closure(G_OBJECT(alive_object), closure);
+ g_signal_connect_closure_by_id(object, g_signal_lookup(signal, G_OBJECT_TYPE(object)), 0, closure, FALSE);
+}
+
+static gboolean wncklet_factory(MatePanelApplet* applet, const char* iid, gpointer data)
+{
+ gboolean retval = FALSE;
+ static gboolean type_registered = FALSE;
+
+ if (!type_registered)
+ {
+ wnck_set_client_type(WNCK_CLIENT_TYPE_PAGER);
+ type_registered = TRUE;
+ }
+
+ if (!strcmp(iid, "WindowMenuApplet"))
+ retval = window_menu_applet_fill(applet);
+ else if (!strcmp(iid, "WorkspaceSwitcherApplet") || !strcmp(iid, "PagerApplet"))
+ retval = workspace_switcher_applet_fill(applet);
+ else if (!strcmp(iid, "WindowListApplet") || !strcmp(iid, "TasklistApplet"))
+ retval = window_list_applet_fill(applet);
+ else if (!strcmp(iid, "ShowDesktopApplet"))
+ retval = show_desktop_applet_fill(applet);
+
+ return retval;
+}
+
+
+#ifdef WNCKLET_INPROCESS
+ MATE_PANEL_APPLET_IN_PROCESS_FACTORY("WnckletFactory", PANEL_TYPE_APPLET, "WindowNavigationApplets", wncklet_factory, NULL)
+#else
+ MATE_PANEL_APPLET_OUT_PROCESS_FACTORY("WnckletFactory", PANEL_TYPE_APPLET, "WindowNavigationApplets", wncklet_factory, NULL)
+#endif
diff --git a/applets/wncklet/wncklet.h b/applets/wncklet/wncklet.h
new file mode 100644
index 00000000..933cf452
--- /dev/null
+++ b/applets/wncklet/wncklet.h
@@ -0,0 +1,48 @@
+/* wncklet.h
+ *
+ * Copyright (C) 2003 Wipro Technologies
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Arvind Samptur <arvind.samptur@wipro.com>
+ *
+ */
+
+#ifndef __WNCKLET_H__
+#define __WNCKLET_H__
+
+#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1
+#include <libwnck/screen.h>
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <mate-panel-applet.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void wncklet_display_help(GtkWidget* widget, const char* doc_id, const char* link_id, const char* icon_name);
+
+WnckScreen* wncklet_get_screen(GtkWidget* applet);
+
+void wncklet_connect_while_alive(gpointer object, const char* signal, GCallback func, gpointer func_data, gpointer alive_object);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/applets/wncklet/workspace-switcher-menu.xml b/applets/wncklet/workspace-switcher-menu.xml
new file mode 100644
index 00000000..d7354eb8
--- /dev/null
+++ b/applets/wncklet/workspace-switcher-menu.xml
@@ -0,0 +1,6 @@
+<menuitem name="Pager Preferences Item" action="PagerPreferences" />
+<menuitem name="Pager Help Item" action="PagerHelp" />
+<menuitem name="Pager About Item" action="PagerAbout" />
+
+
+
diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c
new file mode 100644
index 00000000..cd241bea
--- /dev/null
+++ b/applets/wncklet/workspace-switcher.c
@@ -0,0 +1,932 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/*
+ * libwnck based pager applet.
+ * (C) 2001 Alexander Larsson
+ * (C) 2001 Red Hat, Inc
+ *
+ * Authors: Alexander Larsson
+ *
+ */
+
+#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1
+
+#ifdef HAVE_CONFIG_H
+ #include <config.h>
+#endif
+
+#include <string.h>
+
+#include <mate-panel-applet.h>
+#include <mate-panel-applet-mateconf.h>
+
+#include <stdlib.h>
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+#include <libwnck/libwnck.h>
+#include <mateconf/mateconf-client.h>
+
+#include "workspace-switcher.h"
+
+#include "wncklet.h"
+
+/* even 16 is pretty darn dubious. */
+#define MAX_REASONABLE_ROWS 16
+#define DEFAULT_ROWS 1
+
+#define NEVER_SENSITIVE "never_sensitive"
+#define NUM_WORKSPACES "/apps/marco/general/num_workspaces"
+#define WORKSPACE_NAME "/apps/marco/workspace_names/name_1"
+
+#define WORKSPACE_SWITCHER_ICON "mate-panel-workspace-switcher"
+
+typedef enum {
+ PAGER_WM_MARCO,
+ PAGER_WM_COMPIZ,
+ PAGER_WM_UNKNOWN
+} PagerWM;
+
+typedef struct {
+ GtkWidget* applet;
+
+ GtkWidget* pager;
+
+ WnckScreen* screen;
+ PagerWM wm;
+
+ /* Properties: */
+ GtkWidget* properties_dialog;
+ GtkWidget* workspaces_frame;
+ GtkWidget* workspace_names_label;
+ GtkWidget* workspace_names_scroll;
+ GtkWidget* display_workspaces_toggle;
+ GtkWidget* all_workspaces_radio;
+ GtkWidget* current_only_radio;
+ GtkWidget* num_rows_spin; /* for vertical layout this is cols */
+ GtkWidget* label_row_col;
+ GtkWidget* num_workspaces_spin;
+ GtkWidget* workspaces_tree;
+ GtkListStore* workspaces_store;
+
+ GtkOrientation orientation;
+ int n_rows; /* for vertical layout this is cols */
+ WnckPagerDisplayMode display_mode;
+ gboolean display_all;
+
+ /* mateconf listeners id */
+ guint listeners[3];
+} PagerData;
+
+static void display_properties_dialog(GtkAction* action, PagerData* pager);
+static void display_help_dialog(GtkAction* action, PagerData* pager);
+static void display_about_dialog(GtkAction* action, PagerData* pager);
+
+static void pager_update(PagerData* pager)
+{
+ wnck_pager_set_orientation(WNCK_PAGER(pager->pager), pager->orientation);
+ wnck_pager_set_n_rows(WNCK_PAGER(pager->pager), pager->n_rows);
+ wnck_pager_set_show_all(WNCK_PAGER(pager->pager), pager->display_all);
+
+ if (pager->wm == PAGER_WM_MARCO)
+ wnck_pager_set_display_mode(WNCK_PAGER(pager->pager), pager->display_mode);
+ else
+ wnck_pager_set_display_mode(WNCK_PAGER(pager->pager), WNCK_PAGER_DISPLAY_CONTENT);
+}
+
+static void update_properties_for_wm(PagerData* pager)
+{
+ switch (pager->wm)
+ {
+ case PAGER_WM_MARCO:
+ if (pager->workspaces_frame)
+ gtk_widget_show(pager->workspaces_frame);
+ if (pager->workspace_names_label)
+ gtk_widget_show(pager->workspace_names_label);
+ if (pager->workspace_names_scroll)
+ gtk_widget_show(pager->workspace_names_scroll);
+ if (pager->display_workspaces_toggle)
+ gtk_widget_show(pager->display_workspaces_toggle);
+ break;
+ case PAGER_WM_COMPIZ:
+ if (pager->workspaces_frame)
+ gtk_widget_show(pager->workspaces_frame);
+ if (pager->workspace_names_label)
+ gtk_widget_hide(pager->workspace_names_label);
+ if (pager->workspace_names_scroll)
+ gtk_widget_hide(pager->workspace_names_scroll);
+ if (pager->display_workspaces_toggle)
+ gtk_widget_hide(pager->display_workspaces_toggle);
+ break;
+ case PAGER_WM_UNKNOWN:
+ if (pager->workspaces_frame)
+ gtk_widget_hide(pager->workspaces_frame);
+ break;
+ default:
+ g_assert_not_reached();
+ }
+
+ if (pager->properties_dialog)
+ gtk_window_reshow_with_initial_size(GTK_WINDOW(pager->properties_dialog));
+}
+
+static void window_manager_changed(WnckScreen* screen, PagerData* pager)
+{
+ const char *wm_name;
+
+ wm_name = wnck_screen_get_window_manager_name(screen);
+
+ if (!wm_name)
+ pager->wm = PAGER_WM_UNKNOWN;
+ else if (strcmp(wm_name, "Marco") == 0)
+ pager->wm = PAGER_WM_MARCO;
+ else if (strcmp(wm_name, "Compiz") == 0)
+ pager->wm = PAGER_WM_COMPIZ;
+ else
+ pager->wm = PAGER_WM_UNKNOWN;
+
+ update_properties_for_wm(pager);
+ pager_update(pager);
+}
+
+static void applet_realized(MatePanelApplet* applet, PagerData* pager)
+{
+ pager->screen = wncklet_get_screen(GTK_WIDGET(applet));
+
+ window_manager_changed(pager->screen, pager);
+ wncklet_connect_while_alive(pager->screen, "window_manager_changed", G_CALLBACK(window_manager_changed), pager, pager->applet);
+}
+
+static void applet_unrealized(MatePanelApplet* applet, PagerData* pager)
+{
+ pager->screen = NULL;
+ pager->wm = PAGER_WM_UNKNOWN;
+}
+
+static void applet_change_orient(MatePanelApplet* applet, MatePanelAppletOrient orient, PagerData* pager)
+{
+ GtkOrientation new_orient;
+
+ switch (orient)
+ {
+ case MATE_PANEL_APPLET_ORIENT_LEFT:
+ case MATE_PANEL_APPLET_ORIENT_RIGHT:
+ new_orient = GTK_ORIENTATION_VERTICAL;
+ break;
+ case MATE_PANEL_APPLET_ORIENT_UP:
+ case MATE_PANEL_APPLET_ORIENT_DOWN:
+ default:
+ new_orient = GTK_ORIENTATION_HORIZONTAL;
+ break;
+ }
+
+ if (new_orient == pager->orientation)
+ return;
+
+ pager->orientation = new_orient;
+ pager_update(pager);
+
+ if (pager->label_row_col)
+ gtk_label_set_text(GTK_LABEL(pager->label_row_col), pager->orientation == GTK_ORIENTATION_HORIZONTAL ? _("rows") : _("columns"));
+}
+
+static void applet_change_background(MatePanelApplet* applet, MatePanelAppletBackgroundType type, GdkColor* color, GdkPixmap* pixmap, PagerData* pager)
+{
+ switch (type)
+ {
+ case PANEL_NO_BACKGROUND:
+ wnck_pager_set_shadow_type(WNCK_PAGER(pager->pager), GTK_SHADOW_IN);
+ break;
+ case PANEL_COLOR_BACKGROUND:
+ wnck_pager_set_shadow_type(WNCK_PAGER(pager->pager), GTK_SHADOW_NONE);
+ break;
+ case PANEL_PIXMAP_BACKGROUND:
+ wnck_pager_set_shadow_type(WNCK_PAGER(pager->pager), GTK_SHADOW_NONE);
+ break;
+ }
+}
+
+static gboolean applet_scroll(MatePanelApplet* applet, GdkEventScroll* event, PagerData* pager)
+{
+ GdkScrollDirection absolute_direction;
+ int index;
+ int n_workspaces;
+ int n_columns;
+ int in_last_row;
+
+ if (event->type != GDK_SCROLL)
+ return FALSE;
+
+ index = wnck_workspace_get_number(wnck_screen_get_active_workspace(pager->screen));
+ n_workspaces = wnck_screen_get_workspace_count(pager->screen);
+ n_columns = n_workspaces / pager->n_rows;
+
+ if (n_workspaces % pager->n_rows != 0)
+ n_columns++;
+
+ in_last_row = n_workspaces % n_columns;
+
+ absolute_direction = event->direction;
+
+ if (gtk_widget_get_direction(GTK_WIDGET(applet)) == GTK_TEXT_DIR_RTL)
+ {
+ switch (event->direction)
+ {
+ case GDK_SCROLL_DOWN:
+ case GDK_SCROLL_UP:
+ break;
+ case GDK_SCROLL_RIGHT:
+ absolute_direction = GDK_SCROLL_LEFT;
+ break;
+ case GDK_SCROLL_LEFT:
+ absolute_direction = GDK_SCROLL_RIGHT;
+ break;
+ }
+ }
+
+ switch (absolute_direction)
+ {
+ case GDK_SCROLL_DOWN:
+ if (index + n_columns < n_workspaces)
+ {
+ index += n_columns;
+ }
+ else if ((index < n_workspaces - 1 && index + in_last_row != n_workspaces - 1) || (index == n_workspaces - 1 && in_last_row != 0))
+ {
+ index = (index % n_columns) + 1;
+ }
+ break;
+
+ case GDK_SCROLL_RIGHT:
+ if (index < n_workspaces - 1)
+ index++;
+ break;
+
+ case GDK_SCROLL_UP:
+ if (index - n_columns >= 0)
+ {
+ index -= n_columns;
+ }
+ else if (index > 0)
+ {
+ index = ((pager->n_rows - 1) * n_columns) + (index % n_columns) - 1;
+ }
+
+ if (index >= n_workspaces)
+ index -= n_columns;
+ break;
+
+ case GDK_SCROLL_LEFT:
+ if (index > 0)
+ index--;
+ break;
+ default:
+ g_assert_not_reached();
+ break;
+ }
+
+ wnck_workspace_activate(wnck_screen_get_workspace(pager->screen, index), event->time);
+
+ return TRUE;
+}
+
+static void destroy_pager(GtkWidget* widget, PagerData* pager)
+{
+ MateConfClient* client = mateconf_client_get_default();
+
+ mateconf_client_notify_remove(client, pager->listeners[0]);
+ mateconf_client_notify_remove(client, pager->listeners[1]);
+ mateconf_client_notify_remove(client, pager->listeners[2]);
+
+ g_object_unref(G_OBJECT(client));
+
+ pager->listeners[0] = 0;
+ pager->listeners[1] = 0;
+ pager->listeners[2] = 0;
+
+ if (pager->properties_dialog)
+ gtk_widget_destroy(pager->properties_dialog);
+
+ g_free(pager);
+}
+
+static const GtkActionEntry pager_menu_actions[] = {
+ {
+ "PagerPreferences",
+ GTK_STOCK_PROPERTIES,
+ N_("_Preferences"),
+ NULL,
+ NULL,
+ G_CALLBACK(display_properties_dialog)
+ },
+ {
+ "PagerHelp",
+ GTK_STOCK_HELP,
+ N_("_Help"),
+ NULL,
+ NULL,
+ G_CALLBACK(display_help_dialog)
+ },
+ {
+ "PagerAbout",
+ GTK_STOCK_ABOUT,
+ N_("_About"),
+ NULL,
+ NULL,
+ G_CALLBACK(display_about_dialog)
+ }
+};
+
+static void num_rows_changed(MateConfClient* client, guint cnxn_id, MateConfEntry* entry, PagerData* pager)
+{
+ int n_rows = DEFAULT_ROWS;
+
+ if (entry->value != NULL && entry->value->type == MATECONF_VALUE_INT)
+ {
+ n_rows = mateconf_value_get_int(entry->value);
+ }
+
+ n_rows = CLAMP(n_rows, 1, MAX_REASONABLE_ROWS);
+
+ pager->n_rows = n_rows;
+ pager_update(pager);
+
+ if (pager->num_rows_spin && gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(pager->num_rows_spin)) != n_rows)
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(pager->num_rows_spin), pager->n_rows);
+}
+
+static void display_workspace_names_changed(MateConfClient* client, guint cnxn_id, MateConfEntry* entry, PagerData* pager)
+{
+ gboolean value = FALSE; /* Default value */
+
+ if (entry->value != NULL && entry->value->type == MATECONF_VALUE_BOOL)
+ {
+ value = mateconf_value_get_bool(entry->value);
+ }
+
+ if (value)
+ {
+ pager->display_mode = WNCK_PAGER_DISPLAY_NAME;
+ }
+ else
+ {
+ pager->display_mode = WNCK_PAGER_DISPLAY_CONTENT;
+ }
+
+ pager_update(pager);
+
+ if (pager->display_workspaces_toggle && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pager->display_workspaces_toggle)) != value)
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pager->display_workspaces_toggle), value);
+ }
+}
+
+
+static void all_workspaces_changed(MateConfClient* client, guint cnxn_id, MateConfEntry* entry, PagerData* pager)
+{
+ gboolean value = TRUE; /* Default value */
+
+ if (entry->value != NULL && entry->value->type == MATECONF_VALUE_BOOL)
+ {
+ value = mateconf_value_get_bool(entry->value);
+ }
+
+ pager->display_all = value;
+ pager_update(pager);
+
+ if (pager->all_workspaces_radio)
+ {
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pager->all_workspaces_radio)) != value)
+ {
+ if (value)
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pager->all_workspaces_radio), TRUE);
+ }
+ else
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pager->current_only_radio), TRUE);
+ }
+ }
+
+ if (!g_object_get_data(G_OBJECT(pager->num_rows_spin), NEVER_SENSITIVE))
+ gtk_widget_set_sensitive(pager->num_rows_spin, value);
+ }
+}
+
+static void setup_mateconf(PagerData* pager)
+{
+ MateConfClient* client;
+ char* key;
+
+ client = mateconf_client_get_default();
+
+ key = mate_panel_applet_mateconf_get_full_key(MATE_PANEL_APPLET(pager->applet), "num_rows");
+ pager->listeners[0] = mateconf_client_notify_add(client, key, (MateConfClientNotifyFunc) num_rows_changed, pager, NULL, NULL);
+
+ g_free(key);
+
+
+ key = mate_panel_applet_mateconf_get_full_key(MATE_PANEL_APPLET(pager->applet), "display_workspace_names");
+ pager->listeners[1] = mateconf_client_notify_add(client, key, (MateConfClientNotifyFunc) display_workspace_names_changed, pager, NULL, NULL);
+
+ g_free(key);
+
+ key = mate_panel_applet_mateconf_get_full_key(MATE_PANEL_APPLET(pager->applet), "display_all_workspaces");
+ pager->listeners[2] = mateconf_client_notify_add(client, key, (MateConfClientNotifyFunc) all_workspaces_changed, pager, NULL, NULL);
+
+ g_free(key);
+
+ g_object_unref(G_OBJECT(client));
+}
+
+gboolean workspace_switcher_applet_fill(MatePanelApplet* applet)
+{
+ PagerData* pager;
+ GtkActionGroup* action_group;
+ gchar* ui_path;
+ GError* error;
+ gboolean display_names;
+
+ mate_panel_applet_add_preferences(applet, "/schemas/apps/workspace_switcher_applet/prefs", NULL);
+
+ pager = g_new0(PagerData, 1);
+
+ pager->applet = GTK_WIDGET(applet);
+
+ mate_panel_applet_set_flags(MATE_PANEL_APPLET(pager->applet), MATE_PANEL_APPLET_EXPAND_MINOR);
+
+ setup_mateconf(pager);
+
+ error = NULL;
+ pager->n_rows = mate_panel_applet_mateconf_get_int(applet, "num_rows", &error);
+
+ if (error)
+ {
+ g_printerr(_("Error loading num_rows value for Workspace Switcher: %s\n"), error->message);
+ g_error_free(error);
+ /* leave current value */
+ }
+
+ pager->n_rows = CLAMP(pager->n_rows, 1, MAX_REASONABLE_ROWS);
+
+ error = NULL;
+ display_names = mate_panel_applet_mateconf_get_bool(applet, "display_workspace_names", &error);
+
+ if (error)
+ {
+ g_printerr(_("Error loading display_workspace_names value for Workspace Switcher: %s\n"), error->message);
+ g_error_free(error);
+ /* leave current value */
+ }
+
+ if (display_names)
+ {
+ pager->display_mode = WNCK_PAGER_DISPLAY_NAME;
+ }
+ else
+ {
+ pager->display_mode = WNCK_PAGER_DISPLAY_CONTENT;
+ }
+
+ error = NULL;
+ pager->display_all = mate_panel_applet_mateconf_get_bool(applet, "display_all_workspaces", &error);
+
+ if (error)
+ {
+ g_printerr(_("Error loading display_all_workspaces value for Workspace Switcher: %s\n"), error->message);
+ g_error_free(error);
+ /* leave current value */
+ }
+
+ switch (mate_panel_applet_get_orient(applet))
+ {
+ case MATE_PANEL_APPLET_ORIENT_LEFT:
+ case MATE_PANEL_APPLET_ORIENT_RIGHT:
+ pager->orientation = GTK_ORIENTATION_VERTICAL;
+ break;
+ case MATE_PANEL_APPLET_ORIENT_UP:
+ case MATE_PANEL_APPLET_ORIENT_DOWN:
+ default:
+ pager->orientation = GTK_ORIENTATION_HORIZONTAL;
+ break;
+ }
+
+ pager->pager = wnck_pager_new(NULL);
+ pager->screen = NULL;
+ pager->wm = PAGER_WM_UNKNOWN;
+ wnck_pager_set_shadow_type(WNCK_PAGER(pager->pager), GTK_SHADOW_IN);
+
+ g_signal_connect(G_OBJECT(pager->pager), "destroy", G_CALLBACK(destroy_pager), pager);
+
+ gtk_container_add(GTK_CONTAINER(pager->applet), pager->pager);
+ gtk_widget_show(pager->pager);
+
+ g_signal_connect(G_OBJECT(pager->applet), "realize", G_CALLBACK(applet_realized), pager);
+ g_signal_connect(G_OBJECT(pager->applet), "unrealize", G_CALLBACK(applet_unrealized), pager);
+ g_signal_connect(G_OBJECT(pager->applet), "change_orient", G_CALLBACK(applet_change_orient), pager);
+ g_signal_connect(G_OBJECT(pager->applet), "scroll-event", G_CALLBACK(applet_scroll), pager);
+ g_signal_connect(G_OBJECT(pager->applet), "change_background", G_CALLBACK(applet_change_background), pager);
+
+ gtk_widget_show(pager->applet);
+
+ mate_panel_applet_set_background_widget(MATE_PANEL_APPLET(pager->applet), GTK_WIDGET(pager->applet));
+
+ action_group = gtk_action_group_new("WorkspaceSwitcher Applet Actions");
+ gtk_action_group_set_translation_domain(action_group, GETTEXT_PACKAGE);
+ gtk_action_group_add_actions(action_group, pager_menu_actions, G_N_ELEMENTS(pager_menu_actions), pager);
+ ui_path = g_build_filename(WNCK_MENU_UI_DIR, "workspace-switcher-menu.xml", NULL);
+ mate_panel_applet_setup_menu_from_file(MATE_PANEL_APPLET(pager->applet), ui_path, action_group);
+ g_free(ui_path);
+
+ if (mate_panel_applet_get_locked_down(MATE_PANEL_APPLET(pager->applet)))
+ {
+ GtkAction *action;
+
+ action = gtk_action_group_get_action(action_group, "PagerPreferences");
+ gtk_action_set_visible(action, FALSE);
+ }
+
+ g_object_unref(action_group);
+
+ return TRUE;
+}
+
+
+static void display_help_dialog(GtkAction* action, PagerData* pager)
+{
+ wncklet_display_help(pager->applet, "user-guide", "overview-workspaces", WORKSPACE_SWITCHER_ICON);
+}
+
+static void display_about_dialog(GtkAction* action, PagerData* pager)
+{
+ static const gchar* authors[] = {
+ "Alexander Larsson <alla@lysator.liu.se>",
+ NULL
+ };
+
+ const char* documenters[] = {
+ "John Fleck <jfleck@inkstain.net>",
+ "Sun MATE Documentation Team <gdocteam@sun.com>",
+ NULL
+ };
+
+ char copyright[] = \
+ "Copyright \xc2\xa9 2001-2002 Red Hat, Inc.";
+
+ gtk_show_about_dialog(GTK_WINDOW(pager->applet),
+ "program-name", _("Workspace Switcher"),
+ "authors", authors,
+ "comments", _("The Workspace Switcher shows you a small version of your workspaces that lets you manage your windows."),
+ "copyright", copyright,
+ "documenters", documenters,
+ "icon-name", WORKSPACE_SWITCHER_ICON,
+ "logo-icon-name", WORKSPACE_SWITCHER_ICON,
+ "translator-credits", _("translator-credits"),
+ "version", VERSION,
+ "website", "http://matsusoft.com.ar/projects/mate/",
+ NULL);
+}
+
+
+static void display_workspace_names_toggled(GtkToggleButton*button, PagerData* pager)
+{
+ mate_panel_applet_mateconf_set_bool(MATE_PANEL_APPLET(pager->applet), "display_workspace_names", gtk_toggle_button_get_active(button), NULL);
+}
+
+static void all_workspaces_toggled(GtkToggleButton* button, PagerData* pager)
+{
+ mate_panel_applet_mateconf_set_bool(MATE_PANEL_APPLET(pager->applet), "display_all_workspaces", gtk_toggle_button_get_active(button), NULL);
+}
+
+static void num_rows_value_changed(GtkSpinButton* button, PagerData* pager)
+{
+ mate_panel_applet_mateconf_set_int(MATE_PANEL_APPLET(pager->applet), "num_rows", gtk_spin_button_get_value_as_int(button), NULL);
+}
+
+static void update_workspaces_model(PagerData* pager)
+{
+ int nr_ws, i;
+ WnckWorkspace* workspace;
+ GtkTreeIter iter;
+
+ nr_ws = wnck_screen_get_workspace_count(pager->screen);
+
+ if (pager->properties_dialog)
+ {
+ if (nr_ws != gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(pager->num_workspaces_spin)))
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(pager->num_workspaces_spin), nr_ws);
+
+ gtk_list_store_clear(pager->workspaces_store);
+
+ for (i = 0; i < nr_ws; i++)
+ {
+ workspace = wnck_screen_get_workspace(pager->screen, i);
+ gtk_list_store_append(pager->workspaces_store, &iter);
+ gtk_list_store_set(pager->workspaces_store, &iter, 0, wnck_workspace_get_name(workspace), -1);
+ }
+ }
+}
+
+static void workspace_renamed(WnckWorkspace* space, PagerData* pager)
+{
+ int i;
+ GtkTreeIter iter;
+
+ i = wnck_workspace_get_number(space);
+
+ if (gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(pager->workspaces_store), &iter, NULL, i))
+ gtk_list_store_set(pager->workspaces_store, &iter, 0, wnck_workspace_get_name(space), -1);
+}
+
+static void workspace_created(WnckScreen* screen, WnckWorkspace* space, PagerData* pager)
+{
+ g_return_if_fail(WNCK_IS_SCREEN(screen));
+
+ update_workspaces_model(pager);
+
+ wncklet_connect_while_alive(space, "name_changed", G_CALLBACK(workspace_renamed), pager, pager->properties_dialog);
+}
+
+static void workspace_destroyed(WnckScreen* screen, WnckWorkspace* space, PagerData* pager)
+{
+ g_return_if_fail(WNCK_IS_SCREEN(screen));
+ update_workspaces_model(pager);
+}
+
+static void num_workspaces_value_changed(GtkSpinButton* button, PagerData* pager)
+{
+ /* Slow down a bit after the first change, since it's moving really to
+ * fast. See bug #336731 for background.
+ * FIXME: remove this if bug 410520 gets fixed. */
+ button->timer_step = 0.2;
+
+ wnck_screen_change_workspace_count(pager->screen, gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(pager->num_workspaces_spin)));
+}
+
+static gboolean workspaces_tree_focused_out(GtkTreeView* treeview, GdkEventFocus* event, PagerData* pager)
+{
+ GtkTreeSelection* selection;
+
+ selection = gtk_tree_view_get_selection(treeview);
+ gtk_tree_selection_unselect_all(selection);
+ return TRUE;
+}
+
+static void workspace_name_edited(GtkCellRendererText* cell_renderer_text, const gchar* path, const gchar* new_text, PagerData* pager)
+{
+ const gint* indices;
+ WnckWorkspace* workspace;
+ GtkTreePath* p;
+
+ p = gtk_tree_path_new_from_string(path);
+ indices = gtk_tree_path_get_indices(p);
+ workspace = wnck_screen_get_workspace(pager->screen, indices[0]);
+
+ if (workspace != NULL)
+ {
+ gchar* temp_name = g_strdup(new_text);
+
+ wnck_workspace_change_name(workspace, g_strstrip(temp_name));
+
+ g_free(temp_name);
+ }
+ else
+ {
+ g_warning("Edited name of workspace %d which no longer exists", indices[0]);
+ }
+
+ gtk_tree_path_free(p);
+}
+
+static void properties_dialog_destroyed(GtkWidget* widget, PagerData* pager)
+{
+ pager->properties_dialog = NULL;
+ pager->workspaces_frame = NULL;
+ pager->workspace_names_label = NULL;
+ pager->workspace_names_scroll = NULL;
+ pager->display_workspaces_toggle = NULL;
+ pager->all_workspaces_radio = NULL;
+ pager->current_only_radio = NULL;
+ pager->num_rows_spin = NULL;
+ pager->label_row_col = NULL;
+ pager->num_workspaces_spin = NULL;
+ pager->workspaces_tree = NULL;
+ pager->workspaces_store = NULL;
+}
+
+static gboolean delete_event(GtkWidget* widget, gpointer data)
+{
+ gtk_widget_destroy(widget);
+ return TRUE;
+}
+
+static void response_cb(GtkWidget* widget, int id, PagerData* pager)
+{
+ if (id == GTK_RESPONSE_HELP)
+ wncklet_display_help(widget, "user-guide", "overview-workspaces", WORKSPACE_SWITCHER_ICON);
+ else
+ gtk_widget_destroy(widget);
+}
+
+static void close_dialog(GtkWidget* button, gpointer data)
+{
+ PagerData* pager = data;
+ GtkTreeViewColumn* col;
+
+ /* This is a hack. The "editable" signal for GtkCellRenderer is emitted
+ only on button press or focus cycle. Hence when the user changes the
+ name and closes the preferences dialog without a button-press he would
+ lose the name changes. So, we call the gtk_cell_editable_editing_done
+ to stop the editing. Thanks to Paolo for a better crack than the one I had.
+ */
+
+ col = gtk_tree_view_get_column(GTK_TREE_VIEW(pager->workspaces_tree), 0);
+
+ if (col->editable_widget != NULL && GTK_IS_CELL_EDITABLE(col->editable_widget))
+ gtk_cell_editable_editing_done(col->editable_widget);
+
+ gtk_widget_destroy(pager->properties_dialog);
+}
+
+#define WID(s) GTK_WIDGET(gtk_builder_get_object(builder, s))
+
+static void
+setup_sensitivity(PagerData* pager, GtkBuilder* builder, const char* wid1, const char* wid2, const char* wid3, const char* key)
+{
+ MatePanelApplet* applet = MATE_PANEL_APPLET(pager->applet);
+ MateConfClient* client = mateconf_client_get_default();
+ char* fullkey;
+ GtkWidget* w;
+
+ if (key[0] == '/')
+ fullkey = g_strdup(key);
+ else
+ fullkey = mate_panel_applet_mateconf_get_full_key(applet, key);
+
+ if (mateconf_client_key_is_writable(client, fullkey, NULL))
+ {
+ g_object_unref(G_OBJECT(client));
+ g_free(fullkey);
+ return;
+ }
+
+ g_object_unref(G_OBJECT(client));
+ g_free(fullkey);
+
+ w = WID(wid1);
+ g_assert(w != NULL);
+ g_object_set_data(G_OBJECT(w), NEVER_SENSITIVE, GINT_TO_POINTER(1));
+ gtk_widget_set_sensitive(w, FALSE);
+
+ if (wid2 != NULL)
+ {
+ w = WID(wid2);
+ g_assert(w != NULL);
+ g_object_set_data(G_OBJECT(w), NEVER_SENSITIVE, GINT_TO_POINTER(1));
+ gtk_widget_set_sensitive(w, FALSE);
+ }
+
+ if (wid3 != NULL)
+ {
+ w = WID(wid3);
+ g_assert(w != NULL);
+ g_object_set_data(G_OBJECT(w), NEVER_SENSITIVE, GINT_TO_POINTER(1));
+ gtk_widget_set_sensitive(w, FALSE);
+ }
+}
+
+static void setup_dialog(GtkBuilder* builder, PagerData* pager)
+{
+ gboolean value;
+ GtkTreeViewColumn* column;
+ GtkCellRenderer* cell;
+ int nr_ws, i;
+
+ pager->workspaces_frame = WID("workspaces_frame");
+ pager->workspace_names_label = WID("workspace_names_label");
+ pager->workspace_names_scroll = WID("workspace_names_scroll");
+
+ pager->display_workspaces_toggle = WID("workspace_name_toggle");
+ setup_sensitivity(pager, builder, "workspace_name_toggle", NULL, NULL, "display_workspace_names" /* key */);
+
+ pager->all_workspaces_radio = WID("all_workspaces_radio");
+ pager->current_only_radio = WID("current_only_radio");
+ setup_sensitivity(pager, builder, "all_workspaces_radio", "current_only_radio", "label_row_col", "display_all_workspaces" /* key */);
+
+ pager->num_rows_spin = WID("num_rows_spin");
+ pager->label_row_col = WID("label_row_col");
+ setup_sensitivity(pager, builder, "num_rows_spin", NULL, NULL, "num_rows" /* key */);
+
+ pager->num_workspaces_spin = WID("num_workspaces_spin");
+ setup_sensitivity(pager, builder, "num_workspaces_spin", NULL, NULL, NUM_WORKSPACES /* key */);
+
+ pager->workspaces_tree = WID("workspaces_tree_view");
+ setup_sensitivity(pager, builder, "workspaces_tree_view", NULL, NULL, WORKSPACE_NAME /* key */);
+
+ /* Display workspace names: */
+
+ g_signal_connect(G_OBJECT(pager->display_workspaces_toggle), "toggled", (GCallback) display_workspace_names_toggled, pager);
+
+ if (pager->display_mode == WNCK_PAGER_DISPLAY_NAME)
+ {
+ value = TRUE;
+ }
+ else
+ {
+ value = FALSE;
+ }
+
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pager->display_workspaces_toggle), value);
+
+ /* Display all workspaces: */
+ g_signal_connect(G_OBJECT(pager->all_workspaces_radio), "toggled", (GCallback) all_workspaces_toggled, pager);
+
+ if (pager->display_all)
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pager->all_workspaces_radio), TRUE);
+
+ if (!g_object_get_data(G_OBJECT(pager->num_rows_spin), NEVER_SENSITIVE))
+ {
+ gtk_widget_set_sensitive(pager->num_rows_spin, TRUE);
+ }
+ }
+ else
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pager->current_only_radio), TRUE);
+ gtk_widget_set_sensitive(pager->num_rows_spin, FALSE);
+ }
+
+ /* Num rows: */
+ g_signal_connect(G_OBJECT(pager->num_rows_spin), "value_changed", (GCallback) num_rows_value_changed, pager);
+
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(pager->num_rows_spin), pager->n_rows);
+ gtk_label_set_text(GTK_LABEL(pager->label_row_col), pager->orientation == GTK_ORIENTATION_HORIZONTAL ? _("rows") : _("columns"));
+
+ g_signal_connect(pager->properties_dialog, "destroy", G_CALLBACK(properties_dialog_destroyed), pager);
+ g_signal_connect(pager->properties_dialog, "delete_event", G_CALLBACK(delete_event), pager);
+ g_signal_connect(pager->properties_dialog, "response", G_CALLBACK(response_cb), pager);
+
+ g_signal_connect(WID("done_button"), "clicked", (GCallback) close_dialog, pager);
+
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(pager->num_workspaces_spin), wnck_screen_get_workspace_count(pager->screen));
+ g_signal_connect(G_OBJECT(pager->num_workspaces_spin), "value_changed", (GCallback) num_workspaces_value_changed, pager);
+
+ wncklet_connect_while_alive(pager->screen, "workspace_created", G_CALLBACK(workspace_created), pager, pager->properties_dialog);
+
+ wncklet_connect_while_alive(pager->screen, "workspace_destroyed", G_CALLBACK(workspace_destroyed), pager, pager->properties_dialog);
+
+ g_signal_connect(G_OBJECT(pager->workspaces_tree), "focus_out_event", (GCallback) workspaces_tree_focused_out, pager);
+
+ pager->workspaces_store = gtk_list_store_new(1, G_TYPE_STRING, NULL);
+ update_workspaces_model(pager);
+ gtk_tree_view_set_model(GTK_TREE_VIEW(pager->workspaces_tree), GTK_TREE_MODEL(pager->workspaces_store));
+
+ g_object_unref(pager->workspaces_store);
+
+ cell = g_object_new(GTK_TYPE_CELL_RENDERER_TEXT, "editable", TRUE, NULL);
+ column = gtk_tree_view_column_new_with_attributes("workspace", cell, "text", 0, NULL);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(pager->workspaces_tree), column);
+ g_signal_connect(cell, "edited", (GCallback) workspace_name_edited, pager);
+
+ nr_ws = wnck_screen_get_workspace_count(pager->screen);
+
+ for (i = 0; i < nr_ws; i++)
+ {
+ wncklet_connect_while_alive(G_OBJECT(wnck_screen_get_workspace(pager->screen, i)), "name_changed", G_CALLBACK(workspace_renamed), pager, pager->properties_dialog);
+ }
+
+ update_properties_for_wm(pager);
+}
+
+static void display_properties_dialog(GtkAction* action, PagerData* pager)
+{
+ if (pager->properties_dialog == NULL)
+ {
+ GtkBuilder* builder;
+ GError* error;
+
+ builder = gtk_builder_new();
+ gtk_builder_set_translation_domain(builder, GETTEXT_PACKAGE);
+
+ error = NULL;
+ gtk_builder_add_from_file(builder, PAGER_BUILDERDIR "/workspace-switcher.ui", &error);
+
+ if (error)
+ {
+ g_warning("Error loading preferences: %s", error->message);
+ g_error_free(error);
+ return;
+ }
+
+ pager->properties_dialog = WID("pager_properties_dialog");
+
+ g_object_add_weak_pointer(G_OBJECT(pager->properties_dialog), (gpointer*) &pager->properties_dialog);
+
+ setup_dialog(builder, pager);
+
+ g_object_unref(builder);
+ }
+
+ gtk_window_set_icon_name(GTK_WINDOW(pager->properties_dialog), WORKSPACE_SWITCHER_ICON);
+ gtk_window_set_screen(GTK_WINDOW(pager->properties_dialog), gtk_widget_get_screen(pager->applet));
+ gtk_window_present(GTK_WINDOW(pager->properties_dialog));
+}
diff --git a/applets/wncklet/workspace-switcher.h b/applets/wncklet/workspace-switcher.h
new file mode 100644
index 00000000..7d7dead5
--- /dev/null
+++ b/applets/wncklet/workspace-switcher.h
@@ -0,0 +1,25 @@
+/*
+ * libwnck based pager Apple.
+ * (C) 2001 Alexander Larsson
+ *
+ * Authors: Alexander Larsson
+ *
+ */
+
+#ifndef __WORKSPACE_SWITCHER_APPLET_H__
+#define __WORKSPACE_SWITCHER_APPLET_H__
+
+#include <glib.h>
+#include <mate-panel-applet.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+gboolean workspace_switcher_applet_fill(MatePanelApplet* applet);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/applets/wncklet/workspace-switcher.schemas.in b/applets/wncklet/workspace-switcher.schemas.in
new file mode 100644
index 00000000..3096b9c3
--- /dev/null
+++ b/applets/wncklet/workspace-switcher.schemas.in
@@ -0,0 +1,52 @@
+<mateconfschemafile>
+ <schemalist>
+
+ <schema>
+ <key>/schemas/apps/workspace_switcher_applet/prefs/display_workspace_names</key>
+ <owner>workspace-switcher-applet</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Display workspace names</short>
+ <long>
+ If true, the workspaces in the workspace switcher will display
+ the names of the workspaces. Otherwise they will display the
+ windows on the workspace. This setting only works when the window
+ manager is Marco.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/workspace_switcher_applet/prefs/display_all_workspaces</key>
+ <owner>workspace-switcher-applet</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Display all workspaces</short>
+ <long>
+ If true, the workspace switcher will show all workspaces. Otherwise
+ it will only show the current workspace.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/workspace_switcher_applet/prefs/num_rows</key>
+ <owner>workspace-switcher-applet</owner>
+ <type>int</type>
+ <default>1</default>
+ <locale name="C">
+ <short>Rows in workspace switcher</short>
+ <long>
+ This key specifies how many rows (for horizontal layout)
+ or columns (for vertical layout) the workspace switcher shows the
+ workspaces in. This key is only relevant if the
+ display_all_workspaces key is true.
+ </long>
+ </locale>
+ </schema>
+
+ </schemalist>
+
+</mateconfschemafile>
diff --git a/applets/wncklet/workspace-switcher.ui b/applets/wncklet/workspace-switcher.ui
new file mode 100644
index 00000000..8de7fb34
--- /dev/null
+++ b/applets/wncklet/workspace-switcher.ui
@@ -0,0 +1,323 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.16"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkDialog" id="pager_properties_dialog">
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Workspace Switcher Preferences</property>
+ <property name="resizable">False</property>
+ <property name="type_hint">normal</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="vbox2">
+ <property name="visible">True</property>
+ <property name="border_width">5</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox5">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="current_only_radio">
+ <property name="label" translatable="yes">Show _only the current workspace</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox9">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkRadioButton" id="all_workspaces_radio">
+ <property name="label" translatable="yes">Show _all workspaces in:</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">current_only_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox10">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkSpinButton" id="num_rows_spin">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">num_rows_adjustment</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_row_col">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">rows</property>
+ <property name="justify">center</property>
+ <property name="mnemonic_widget">num_rows_spin</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">Switcher</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="workspaces_frame">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkHBox" id="hbox4">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="num_workspaces_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Number of _workspaces:</property>
+ <property name="use_underline">True</property>
+ <property name="justify">center</property>
+ <property name="mnemonic_widget">num_workspaces_spin</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="num_workspaces_spin">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">num_workspaces_adjustment</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="workspace_names_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Workspace na_mes:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">workspaces_tree_view</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="workspace_names_scroll">
+ <property name="height_request">100</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTreeView" id="workspaces_tree_view">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">Workspace Names</property>
+ <property name="headers_visible">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="workspace_name_toggle">
+ <property name="label" translatable="yes">Show workspace _names in switcher</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">Workspaces</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkButton" id="help_button">
+ <property name="label">gtk-help</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">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="done_button">
+ <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="has_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">1</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">help_button</action-widget>
+ <action-widget response="0">done_button</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkAdjustment" id="num_workspaces_adjustment">
+ <property name="value">1</property>
+ <property name="lower">1</property>
+ <property name="upper">36</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="num_rows_adjustment">
+ <property name="value">1</property>
+ <property name="lower">1</property>
+ <property name="upper">16</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+</interface>