diff options
author | Perberos <[email protected]> | 2011-12-01 22:56:10 -0300 |
---|---|---|
committer | Perberos <[email protected]> | 2011-12-01 22:56:10 -0300 |
commit | c51ef797a707f4e2c6f9688d4378f2b0e9898a66 (patch) | |
tree | 019ae92bb53c19b30077545cb14743cbd1b57aef /matecomponent/panel-module | |
download | mate-panel-c51ef797a707f4e2c6f9688d4378f2b0e9898a66.tar.bz2 mate-panel-c51ef797a707f4e2c6f9688d4378f2b0e9898a66.tar.xz |
moving from https://github.com/perberos/mate-desktop-environment
Diffstat (limited to 'matecomponent/panel-module')
8 files changed, 2038 insertions, 0 deletions
diff --git a/matecomponent/panel-module/MATE_Panel_Popup.xml b/matecomponent/panel-module/MATE_Panel_Popup.xml new file mode 100644 index 00000000..9956f2e6 --- /dev/null +++ b/matecomponent/panel-module/MATE_Panel_Popup.xml @@ -0,0 +1,20 @@ +<Root> + <popups> + <popup name="button3"> + + <placeholder delimit="top"> + + <menuitem name="remove" verb="RemoveAppletFromPanel" _label="_Remove From Panel" + pixtype="stock" pixname="gtk-remove"/> + + <menuitem name="move" verb="MoveApplet" _label="_Move"/> + + <separator verb="LockSeparator"/> + + <menuitem name="lock" verb="LockAppletToPanel" _label="Loc_k To Panel" + type="toggle"/> + + </placeholder> + </popup> + </popups> +</Root> diff --git a/matecomponent/panel-module/Makefile.am b/matecomponent/panel-module/Makefile.am new file mode 100644 index 00000000..8c353127 --- /dev/null +++ b/matecomponent/panel-module/Makefile.am @@ -0,0 +1,51 @@ +panelmodule_LTLIBRARIES = libmate-panel-applets-matecomponent.la +panelmoduledir = $(modulesdir) + +libmate_panel_applets_matecomponent_la_SOURCES = \ + $(CORBA_SRCLIST) \ + mate-panel-applets-matecomponent-module.c \ + mate-panel-applets-manager-matecomponent.c \ + mate-panel-applets-manager-matecomponent.h \ + mate-panel-applet-frame-matecomponent.c \ + mate-panel-applet-frame-matecomponent.h + +libmate_panel_applets_matecomponent_la_CPPFLAGS = \ + $(MATECOMPONENT_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/mate-panel \ + -I$(top_builddir) \ + -DDATADIR=\""$(datadir)"\" + +libmate_panel_applets_matecomponent_la_LDFLAGS = \ + -export_dynamic -avoid-version -module -no-undefined \ + -export-symbols-regex '^g_io_module_(load|unload|query)' + +libmate_panel_applets_matecomponent_la_LIBADD = \ + $(MATECOMPONENT_LIBS) + +CORBA_SRCLIST = \ + MATE_Panel-stubs.c \ + MATE_Panel-skels.c \ + MATE_Panel-common.c \ + MATE_Panel.h + +$(CORBA_SRCLIST): $(top_srcdir)/matecomponent/idl/MATE_Panel.idl $(MATECORBA_IDL) + $(AM_V_GEN)$(MATECORBA_IDL) -I $(MATECOMPONENT_IDLDIR) -I $(MATECOMPONENT_ACT_IDLDIR) $(top_srcdir)/matecomponent/idl/MATE_Panel.idl + +xmluidir = $(datadir)/mate-2.0/ui +xmlui_DATA = MATE_Panel_Popup.xml + +install-data-hook: + if test -z "$(DESTDIR)" -a "$(GIO_QUERYMODULES)" != "no" ; then \ + $(GIO_QUERYMODULES) $(modulesdir) ; \ + fi +uninstall-local: + if test "$(GIO_QUERYMODULES)" != "no" ; then \ + $(GIO_QUERYMODULES) $(modulesdir) ; \ + fi + +EXTRA_DIST = $(xmlui_DATA) + +CLEANFILES = $(CORBA_SRCLIST) + +-include $(top_srcdir)/git.mk diff --git a/matecomponent/panel-module/Makefile.in b/matecomponent/panel-module/Makefile.in new file mode 100644 index 00000000..aeefa56f --- /dev/null +++ b/matecomponent/panel-module/Makefile.in @@ -0,0 +1,786 @@ +# 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@ +subdir = matecomponent/panel-module +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)$(panelmoduledir)" \ + "$(DESTDIR)$(xmluidir)" +LTLIBRARIES = $(panelmodule_LTLIBRARIES) +am__DEPENDENCIES_1 = +libmate_panel_applets_matecomponent_la_DEPENDENCIES = \ + $(am__DEPENDENCIES_1) +am__objects_1 = \ + libmate_panel_applets_matecomponent_la-MATE_Panel-stubs.lo \ + libmate_panel_applets_matecomponent_la-MATE_Panel-skels.lo \ + libmate_panel_applets_matecomponent_la-MATE_Panel-common.lo +am_libmate_panel_applets_matecomponent_la_OBJECTS = $(am__objects_1) \ + libmate_panel_applets_matecomponent_la-mate-panel-applets-matecomponent-module.lo \ + libmate_panel_applets_matecomponent_la-mate-panel-applets-manager-matecomponent.lo \ + libmate_panel_applets_matecomponent_la-mate-panel-applet-frame-matecomponent.lo +libmate_panel_applets_matecomponent_la_OBJECTS = \ + $(am_libmate_panel_applets_matecomponent_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +libmate_panel_applets_matecomponent_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libmate_panel_applets_matecomponent_la_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 = $(libmate_panel_applets_matecomponent_la_SOURCES) +DIST_SOURCES = $(libmate_panel_applets_matecomponent_la_SOURCES) +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@ +panelmodule_LTLIBRARIES = libmate-panel-applets-matecomponent.la +panelmoduledir = $(modulesdir) +libmate_panel_applets_matecomponent_la_SOURCES = \ + $(CORBA_SRCLIST) \ + mate-panel-applets-matecomponent-module.c \ + mate-panel-applets-manager-matecomponent.c \ + mate-panel-applets-manager-matecomponent.h \ + mate-panel-applet-frame-matecomponent.c \ + mate-panel-applet-frame-matecomponent.h + +libmate_panel_applets_matecomponent_la_CPPFLAGS = \ + $(MATECOMPONENT_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/mate-panel \ + -I$(top_builddir) \ + -DDATADIR=\""$(datadir)"\" + +libmate_panel_applets_matecomponent_la_LDFLAGS = \ + -export_dynamic -avoid-version -module -no-undefined \ + -export-symbols-regex '^g_io_module_(load|unload|query)' + +libmate_panel_applets_matecomponent_la_LIBADD = \ + $(MATECOMPONENT_LIBS) + +CORBA_SRCLIST = \ + MATE_Panel-stubs.c \ + MATE_Panel-skels.c \ + MATE_Panel-common.c \ + MATE_Panel.h + +xmluidir = $(datadir)/mate-2.0/ui +xmlui_DATA = MATE_Panel_Popup.xml +EXTRA_DIST = $(xmlui_DATA) +CLEANFILES = $(CORBA_SRCLIST) +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 matecomponent/panel-module/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu matecomponent/panel-module/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-panelmoduleLTLIBRARIES: $(panelmodule_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(panelmoduledir)" || $(MKDIR_P) "$(DESTDIR)$(panelmoduledir)" + @list='$(panelmodule_LTLIBRARIES)'; test -n "$(panelmoduledir)" || 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)$(panelmoduledir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(panelmoduledir)"; \ + } + +uninstall-panelmoduleLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(panelmodule_LTLIBRARIES)'; test -n "$(panelmoduledir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(panelmoduledir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(panelmoduledir)/$$f"; \ + done + +clean-panelmoduleLTLIBRARIES: + -test -z "$(panelmodule_LTLIBRARIES)" || rm -f $(panelmodule_LTLIBRARIES) + @list='$(panelmodule_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 +libmate-panel-applets-matecomponent.la: $(libmate_panel_applets_matecomponent_la_OBJECTS) $(libmate_panel_applets_matecomponent_la_DEPENDENCIES) + $(AM_V_CCLD)$(libmate_panel_applets_matecomponent_la_LINK) -rpath $(panelmoduledir) $(libmate_panel_applets_matecomponent_la_OBJECTS) $(libmate_panel_applets_matecomponent_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmate_panel_applets_matecomponent_la-MATE_Panel-common.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmate_panel_applets_matecomponent_la-MATE_Panel-skels.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmate_panel_applets_matecomponent_la-MATE_Panel-stubs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmate_panel_applets_matecomponent_la-mate-panel-applet-frame-matecomponent.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmate_panel_applets_matecomponent_la-mate-panel-applets-manager-matecomponent.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmate_panel_applets_matecomponent_la-mate-panel-applets-matecomponent-module.Plo@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 $@ $< + +libmate_panel_applets_matecomponent_la-MATE_Panel-stubs.lo: MATE_Panel-stubs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmate_panel_applets_matecomponent_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmate_panel_applets_matecomponent_la-MATE_Panel-stubs.lo -MD -MP -MF $(DEPDIR)/libmate_panel_applets_matecomponent_la-MATE_Panel-stubs.Tpo -c -o libmate_panel_applets_matecomponent_la-MATE_Panel-stubs.lo `test -f 'MATE_Panel-stubs.c' || echo '$(srcdir)/'`MATE_Panel-stubs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmate_panel_applets_matecomponent_la-MATE_Panel-stubs.Tpo $(DEPDIR)/libmate_panel_applets_matecomponent_la-MATE_Panel-stubs.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='MATE_Panel-stubs.c' object='libmate_panel_applets_matecomponent_la-MATE_Panel-stubs.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) $(libmate_panel_applets_matecomponent_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmate_panel_applets_matecomponent_la-MATE_Panel-stubs.lo `test -f 'MATE_Panel-stubs.c' || echo '$(srcdir)/'`MATE_Panel-stubs.c + +libmate_panel_applets_matecomponent_la-MATE_Panel-skels.lo: MATE_Panel-skels.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmate_panel_applets_matecomponent_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmate_panel_applets_matecomponent_la-MATE_Panel-skels.lo -MD -MP -MF $(DEPDIR)/libmate_panel_applets_matecomponent_la-MATE_Panel-skels.Tpo -c -o libmate_panel_applets_matecomponent_la-MATE_Panel-skels.lo `test -f 'MATE_Panel-skels.c' || echo '$(srcdir)/'`MATE_Panel-skels.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmate_panel_applets_matecomponent_la-MATE_Panel-skels.Tpo $(DEPDIR)/libmate_panel_applets_matecomponent_la-MATE_Panel-skels.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='MATE_Panel-skels.c' object='libmate_panel_applets_matecomponent_la-MATE_Panel-skels.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) $(libmate_panel_applets_matecomponent_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmate_panel_applets_matecomponent_la-MATE_Panel-skels.lo `test -f 'MATE_Panel-skels.c' || echo '$(srcdir)/'`MATE_Panel-skels.c + +libmate_panel_applets_matecomponent_la-MATE_Panel-common.lo: MATE_Panel-common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmate_panel_applets_matecomponent_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmate_panel_applets_matecomponent_la-MATE_Panel-common.lo -MD -MP -MF $(DEPDIR)/libmate_panel_applets_matecomponent_la-MATE_Panel-common.Tpo -c -o libmate_panel_applets_matecomponent_la-MATE_Panel-common.lo `test -f 'MATE_Panel-common.c' || echo '$(srcdir)/'`MATE_Panel-common.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmate_panel_applets_matecomponent_la-MATE_Panel-common.Tpo $(DEPDIR)/libmate_panel_applets_matecomponent_la-MATE_Panel-common.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='MATE_Panel-common.c' object='libmate_panel_applets_matecomponent_la-MATE_Panel-common.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) $(libmate_panel_applets_matecomponent_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmate_panel_applets_matecomponent_la-MATE_Panel-common.lo `test -f 'MATE_Panel-common.c' || echo '$(srcdir)/'`MATE_Panel-common.c + +libmate_panel_applets_matecomponent_la-mate-panel-applets-matecomponent-module.lo: mate-panel-applets-matecomponent-module.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmate_panel_applets_matecomponent_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmate_panel_applets_matecomponent_la-mate-panel-applets-matecomponent-module.lo -MD -MP -MF $(DEPDIR)/libmate_panel_applets_matecomponent_la-mate-panel-applets-matecomponent-module.Tpo -c -o libmate_panel_applets_matecomponent_la-mate-panel-applets-matecomponent-module.lo `test -f 'mate-panel-applets-matecomponent-module.c' || echo '$(srcdir)/'`mate-panel-applets-matecomponent-module.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmate_panel_applets_matecomponent_la-mate-panel-applets-matecomponent-module.Tpo $(DEPDIR)/libmate_panel_applets_matecomponent_la-mate-panel-applets-matecomponent-module.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mate-panel-applets-matecomponent-module.c' object='libmate_panel_applets_matecomponent_la-mate-panel-applets-matecomponent-module.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) $(libmate_panel_applets_matecomponent_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmate_panel_applets_matecomponent_la-mate-panel-applets-matecomponent-module.lo `test -f 'mate-panel-applets-matecomponent-module.c' || echo '$(srcdir)/'`mate-panel-applets-matecomponent-module.c + +libmate_panel_applets_matecomponent_la-mate-panel-applets-manager-matecomponent.lo: mate-panel-applets-manager-matecomponent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmate_panel_applets_matecomponent_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmate_panel_applets_matecomponent_la-mate-panel-applets-manager-matecomponent.lo -MD -MP -MF $(DEPDIR)/libmate_panel_applets_matecomponent_la-mate-panel-applets-manager-matecomponent.Tpo -c -o libmate_panel_applets_matecomponent_la-mate-panel-applets-manager-matecomponent.lo `test -f 'mate-panel-applets-manager-matecomponent.c' || echo '$(srcdir)/'`mate-panel-applets-manager-matecomponent.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmate_panel_applets_matecomponent_la-mate-panel-applets-manager-matecomponent.Tpo $(DEPDIR)/libmate_panel_applets_matecomponent_la-mate-panel-applets-manager-matecomponent.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mate-panel-applets-manager-matecomponent.c' object='libmate_panel_applets_matecomponent_la-mate-panel-applets-manager-matecomponent.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) $(libmate_panel_applets_matecomponent_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmate_panel_applets_matecomponent_la-mate-panel-applets-manager-matecomponent.lo `test -f 'mate-panel-applets-manager-matecomponent.c' || echo '$(srcdir)/'`mate-panel-applets-manager-matecomponent.c + +libmate_panel_applets_matecomponent_la-mate-panel-applet-frame-matecomponent.lo: mate-panel-applet-frame-matecomponent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmate_panel_applets_matecomponent_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmate_panel_applets_matecomponent_la-mate-panel-applet-frame-matecomponent.lo -MD -MP -MF $(DEPDIR)/libmate_panel_applets_matecomponent_la-mate-panel-applet-frame-matecomponent.Tpo -c -o libmate_panel_applets_matecomponent_la-mate-panel-applet-frame-matecomponent.lo `test -f 'mate-panel-applet-frame-matecomponent.c' || echo '$(srcdir)/'`mate-panel-applet-frame-matecomponent.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmate_panel_applets_matecomponent_la-mate-panel-applet-frame-matecomponent.Tpo $(DEPDIR)/libmate_panel_applets_matecomponent_la-mate-panel-applet-frame-matecomponent.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mate-panel-applet-frame-matecomponent.c' object='libmate_panel_applets_matecomponent_la-mate-panel-applet-frame-matecomponent.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) $(libmate_panel_applets_matecomponent_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmate_panel_applets_matecomponent_la-mate-panel-applet-frame-matecomponent.lo `test -f 'mate-panel-applet-frame-matecomponent.c' || echo '$(srcdir)/'`mate-panel-applet-frame-matecomponent.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +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) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(panelmoduledir)" "$(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." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-panelmoduleLTLIBRARIES \ + 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-panelmoduleLTLIBRARIES install-xmluiDATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +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-local uninstall-panelmoduleLTLIBRARIES \ + uninstall-xmluiDATA + +.MAKE: install-am install-data-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-panelmoduleLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-data-hook install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-panelmoduleLTLIBRARIES \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip 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-local uninstall-panelmoduleLTLIBRARIES \ + uninstall-xmluiDATA + + +$(CORBA_SRCLIST): $(top_srcdir)/matecomponent/idl/MATE_Panel.idl $(MATECORBA_IDL) + $(AM_V_GEN)$(MATECORBA_IDL) -I $(MATECOMPONENT_IDLDIR) -I $(MATECOMPONENT_ACT_IDLDIR) $(top_srcdir)/matecomponent/idl/MATE_Panel.idl + +install-data-hook: + if test -z "$(DESTDIR)" -a "$(GIO_QUERYMODULES)" != "no" ; then \ + $(GIO_QUERYMODULES) $(modulesdir) ; \ + fi +uninstall-local: + if test "$(GIO_QUERYMODULES)" != "no" ; then \ + $(GIO_QUERYMODULES) $(modulesdir) ; \ + fi + +-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/matecomponent/panel-module/mate-panel-applet-frame-matecomponent.c b/matecomponent/panel-module/mate-panel-applet-frame-matecomponent.c new file mode 100644 index 00000000..e62a13a7 --- /dev/null +++ b/matecomponent/panel-module/mate-panel-applet-frame-matecomponent.c @@ -0,0 +1,759 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * mate-panel-applet-frame-matecomponent.c: panel side container for applets + * + * Copyright (C) 2001 - 2003 Sun Microsystems, Inc. + * Copyright (C) 2010 Vincent Untz <[email protected]> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 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 <[email protected]> + */ + +#include <config.h> + +#include <string.h> + +#include <libmatecomponentui.h> + +#include <mate-panel-applet-frame.h> +#include <mate-panel-applets-manager.h> + +#include "MATE_Panel.h" + +#include "mate-panel-applet-frame-matecomponent.h" + +G_DEFINE_TYPE (MatePanelAppletFrameMateComponent, + mate_panel_applet_frame_matecomponent, + PANEL_TYPE_APPLET_FRAME) + +struct _MatePanelAppletFrameMateComponentPrivate +{ + MATE_Vertigo_MatePanelAppletShell applet_shell; + CORBA_Object control; + MateComponent_PropertyBag property_bag; + MateComponentUIComponent *ui_component; +}; + +#define PROPERTY_ORIENT "mate-panel-applet-orient" +#define PROPERTY_SIZE "mate-panel-applet-size" +#define PROPERTY_BACKGROUND "mate-panel-applet-background" +#define PROPERTY_FLAGS "mate-panel-applet-flags" +#define PROPERTY_SIZE_HINTS "mate-panel-applet-size-hints" +#define PROPERTY_LOCKED_DOWN "mate-panel-applet-locked-down" + +typedef enum { + PANEL_SIZE_XX_SMALL = MATE_Vertigo_PANEL_XX_SMALL, + PANEL_SIZE_X_SMALL = MATE_Vertigo_PANEL_X_SMALL, + PANEL_SIZE_SMALL = MATE_Vertigo_PANEL_SMALL, + PANEL_SIZE_MEDIUM = MATE_Vertigo_PANEL_MEDIUM, + PANEL_SIZE_LARGE = MATE_Vertigo_PANEL_LARGE, + PANEL_SIZE_X_LARGE = MATE_Vertigo_PANEL_X_LARGE, + PANEL_SIZE_XX_LARGE = MATE_Vertigo_PANEL_XX_LARGE +} PanelSize; + +/* Keep in sync with mate-panel-applet.h. Uggh. */ +typedef enum { + APPLET_FLAGS_NONE = 0, + APPLET_EXPAND_MAJOR = 1 << 0, + APPLET_EXPAND_MINOR = 1 << 1, + APPLET_HAS_HANDLE = 1 << 2 +} MatePanelAppletFlags; + +GQuark +mate_panel_applet_frame_matecomponent_error_quark (void) +{ + static GQuark ret = 0; + + if (ret == 0) { + ret = g_quark_from_static_string ("mate_panel_applet_frame_matecomponent_error"); + } + + return ret; +} + +static guint +get_mate_panel_applet_orient (PanelOrientation orientation) +{ + /* For some reason libmate-panel-applet and panel use a different logic for + * orientation, so we need to convert it. We should fix this. */ + switch (orientation) { + case PANEL_ORIENTATION_TOP: + return 1; + case PANEL_ORIENTATION_BOTTOM: + return 0; + case PANEL_ORIENTATION_LEFT: + return 3; + case PANEL_ORIENTATION_RIGHT: + return 2; + default: + g_assert_not_reached (); + break; + } +} + +static void +mate_panel_applet_frame_matecomponent_update_flags (MatePanelAppletFrame *frame, + const CORBA_any *any) +{ + int flags; + gboolean major; + gboolean minor; + gboolean has_handle; + + flags = MATECOMPONENT_ARG_GET_SHORT (any); + + major = (flags & APPLET_EXPAND_MAJOR) != 0; + minor = (flags & APPLET_EXPAND_MINOR) != 0; + has_handle = (flags & APPLET_HAS_HANDLE) != 0; + + _mate_panel_applet_frame_update_flags (frame, major, minor, has_handle); +} + +static void +mate_panel_applet_frame_matecomponent_update_size_hints (MatePanelAppletFrame *frame, + const CORBA_any *any) +{ + CORBA_sequence_CORBA_long *seq; + + seq = any->_value; + + _mate_panel_applet_frame_update_size_hints (frame, seq->_buffer, seq->_length); +} + +static void +mate_panel_applet_frame_matecomponent_init_properties (MatePanelAppletFrame *frame) +{ + MatePanelAppletFrameMateComponent *matecomponent_frame = MATE_PANEL_APPLET_FRAME_MATECOMPONENT (frame); + CORBA_any *any; + + any = matecomponent_pbclient_get_value (matecomponent_frame->priv->property_bag, + PROPERTY_FLAGS, + MATECOMPONENT_ARG_SHORT, + NULL); + if (any) { + mate_panel_applet_frame_matecomponent_update_flags (frame, any); + CORBA_free (any); + } + + any = matecomponent_pbclient_get_value (matecomponent_frame->priv->property_bag, + PROPERTY_SIZE_HINTS, + TC_CORBA_sequence_CORBA_long, + NULL); + if (any) { + mate_panel_applet_frame_matecomponent_update_size_hints (frame, any); + CORBA_free (any); + } +} + +static void +mate_panel_applet_frame_matecomponent_sync_menu_state (MatePanelAppletFrame *frame, + gboolean movable, + gboolean removable, + gboolean lockable, + gboolean locked, + gboolean locked_down) +{ + MatePanelAppletFrameMateComponent *matecomponent_frame = MATE_PANEL_APPLET_FRAME_MATECOMPONENT (frame); + + matecomponent_ui_component_set_prop (matecomponent_frame->priv->ui_component, + "/commands/LockAppletToPanel", + "state", + locked ? "1" : "0", + NULL); + + /* First sensitivity */ + matecomponent_ui_component_set_prop (matecomponent_frame->priv->ui_component, + "/commands/LockAppletToPanel", + "sensitive", + lockable ? "1" : "0", + NULL); + + matecomponent_ui_component_set_prop (matecomponent_frame->priv->ui_component, + "/commands/RemoveAppletFromPanel", + "sensitive", + (locked && !lockable) ? "0" : (removable ? "1" : "0"), + NULL); + + matecomponent_ui_component_set_prop (matecomponent_frame->priv->ui_component, + "/commands/MoveApplet", + "sensitive", + locked ? "0" : (movable ? "1" : "0"), + NULL); + + matecomponent_ui_component_set_prop (matecomponent_frame->priv->ui_component, + "/commands/LockAppletToPanel", + "hidden", + locked_down ? "1" : "0", + NULL); + + matecomponent_ui_component_set_prop (matecomponent_frame->priv->ui_component, + "/commands/LockSeparator", + "hidden", + locked_down ? "1" : "0", + NULL); + + matecomponent_ui_component_set_prop (matecomponent_frame->priv->ui_component, + "/commands/RemoveAppletFromPanel", + "hidden", + locked_down ? "1" : "0", + NULL); + + matecomponent_ui_component_set_prop (matecomponent_frame->priv->ui_component, + "/commands/MoveApplet", + "hidden", + locked_down ? "1" : "0", + NULL); +} + +static void +mate_panel_applet_frame_matecomponent_popup_menu (MatePanelAppletFrame *frame, + guint button, + guint32 timestamp) +{ + MatePanelAppletFrameMateComponent *matecomponent_frame = MATE_PANEL_APPLET_FRAME_MATECOMPONENT (frame); + CORBA_Environment env; + + CORBA_exception_init (&env); + + MATE_Vertigo_MatePanelAppletShell_popup_menu (matecomponent_frame->priv->applet_shell, + button, timestamp, &env); + if (MATECOMPONENT_EX (&env)) + g_warning ("Exception from popup_menu '%s'\n", env._id); + + CORBA_exception_free (&env); +} + +static void +mate_panel_applet_frame_matecomponent_change_orientation (MatePanelAppletFrame *frame, + PanelOrientation orientation) +{ + MatePanelAppletFrameMateComponent *matecomponent_frame = MATE_PANEL_APPLET_FRAME_MATECOMPONENT (frame); + CORBA_unsigned_short orient = 0; + + switch (orientation) { + case PANEL_ORIENTATION_TOP: + orient = MATE_Vertigo_PANEL_ORIENT_DOWN; + break; + case PANEL_ORIENTATION_BOTTOM: + orient = MATE_Vertigo_PANEL_ORIENT_UP; + break; + case PANEL_ORIENTATION_LEFT: + orient = MATE_Vertigo_PANEL_ORIENT_RIGHT; + break; + case PANEL_ORIENTATION_RIGHT: + orient = MATE_Vertigo_PANEL_ORIENT_LEFT; + break; + default: + g_assert_not_reached (); + break; + } + + matecomponent_pbclient_set_short (matecomponent_frame->priv->property_bag, + PROPERTY_ORIENT, + orient, + NULL); + + gtk_widget_queue_resize (GTK_WIDGET (frame)); +} + +static void +mate_panel_applet_frame_matecomponent_change_size (MatePanelAppletFrame *frame, + guint size) +{ + MatePanelAppletFrameMateComponent *matecomponent_frame = MATE_PANEL_APPLET_FRAME_MATECOMPONENT (frame); + + /* Normalise the size to the constants defined in the IDL. */ + size = size <= PANEL_SIZE_XX_SMALL ? PANEL_SIZE_XX_SMALL : + size <= PANEL_SIZE_X_SMALL ? PANEL_SIZE_X_SMALL : + size <= PANEL_SIZE_SMALL ? PANEL_SIZE_SMALL : + size <= PANEL_SIZE_MEDIUM ? PANEL_SIZE_MEDIUM : + size <= PANEL_SIZE_LARGE ? PANEL_SIZE_LARGE : + size <= PANEL_SIZE_X_LARGE ? PANEL_SIZE_X_LARGE : PANEL_SIZE_XX_LARGE; + + matecomponent_pbclient_set_short (matecomponent_frame->priv->property_bag, + PROPERTY_SIZE, + size, + NULL); +} + +static void +mate_panel_applet_frame_matecomponent_change_background (MatePanelAppletFrame *frame, + PanelBackgroundType type) +{ + MatePanelAppletFrameMateComponent *matecomponent_frame = MATE_PANEL_APPLET_FRAME_MATECOMPONENT (frame); + char *bg_str; + + bg_str = _mate_panel_applet_frame_get_background_string ( + frame, PANEL_WIDGET (GTK_WIDGET (frame)->parent), type); + + if (bg_str != NULL) { + matecomponent_pbclient_set_string (matecomponent_frame->priv->property_bag, + PROPERTY_BACKGROUND, + bg_str, NULL); + + g_free (bg_str); + } +} + +static void +mate_panel_applet_frame_matecomponent_applet_broken (MateCORBAConnection *cnx, + MatePanelAppletFrame *frame) +{ + _mate_panel_applet_frame_applet_broken (frame); +} + +static void +popup_handle_remove (MateComponentUIComponent *uic, + MatePanelAppletFrame *frame, + const gchar *verbname) +{ + _mate_panel_applet_frame_applet_remove (frame); +} + +static void +popup_handle_move (MateComponentUIComponent *uic, + MatePanelAppletFrame *frame, + const gchar *verbname) +{ + _mate_panel_applet_frame_applet_move (frame); +} + +static void +listener_popup_handle_lock (MateComponentUIComponent *uic, + const char *path, + MateComponent_UIComponent_EventType type, + const char *state, + gpointer data) +{ + MatePanelAppletFrame *frame; + gboolean locked; + + g_assert (!strcmp (path, "LockAppletToPanel")); + + if (type != MateComponent_UIComponent_STATE_CHANGED) + return; + + if (!state) + return; + + frame = (MatePanelAppletFrame *) data; + locked = (strcmp (state, "1") == 0); + + _mate_panel_applet_frame_applet_lock (frame, locked); + + mate_panel_applet_frame_sync_menu_state (frame); +} + +static MateComponentUIVerb popup_verbs [] = { + MATECOMPONENT_UI_UNSAFE_VERB ("RemoveAppletFromPanel", popup_handle_remove), + MATECOMPONENT_UI_UNSAFE_VERB ("MoveApplet", popup_handle_move), + + MATECOMPONENT_UI_VERB_END +}; + + +static void +mate_panel_applet_frame_matecomponent_finalize (GObject *object) +{ + MatePanelAppletFrameMateComponent *frame = MATE_PANEL_APPLET_FRAME_MATECOMPONENT (object); + + if (frame->priv->control) { + /* do this before unref'ing every matecomponent stuff since it looks + * like we can receive some events when unref'ing them */ + MateCORBA_small_unlisten_for_broken (frame->priv->control, + G_CALLBACK (mate_panel_applet_frame_matecomponent_applet_broken)); + matecomponent_object_release_unref (frame->priv->control, NULL); + frame->priv->control = CORBA_OBJECT_NIL; + } + + if (frame->priv->property_bag) + matecomponent_object_release_unref ( + frame->priv->property_bag, NULL); + + if (frame->priv->applet_shell) + matecomponent_object_release_unref ( + frame->priv->applet_shell, NULL); + + if (frame->priv->ui_component) + matecomponent_object_unref ( + MATECOMPONENT_OBJECT (frame->priv->ui_component)); + + G_OBJECT_CLASS (mate_panel_applet_frame_matecomponent_parent_class)->finalize (object); +} + +static void +mate_panel_applet_frame_matecomponent_init (MatePanelAppletFrameMateComponent *frame) +{ + GtkWidget *container; + + frame->priv = G_TYPE_INSTANCE_GET_PRIVATE (frame, + PANEL_TYPE_APPLET_FRAME_MATECOMPONENT, + MatePanelAppletFrameMateComponentPrivate); + + frame->priv->applet_shell = CORBA_OBJECT_NIL; + frame->priv->control = CORBA_OBJECT_NIL; + frame->priv->property_bag = CORBA_OBJECT_NIL; + frame->priv->ui_component = NULL; +} + +static void +mate_panel_applet_frame_matecomponent_class_init (MatePanelAppletFrameMateComponentClass *class) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + MatePanelAppletFrameClass *frame_class = MATE_PANEL_APPLET_FRAME_CLASS (class); + + gobject_class->finalize = mate_panel_applet_frame_matecomponent_finalize; + + frame_class->init_properties = mate_panel_applet_frame_matecomponent_init_properties; + frame_class->sync_menu_state = mate_panel_applet_frame_matecomponent_sync_menu_state; + frame_class->popup_menu = mate_panel_applet_frame_matecomponent_popup_menu; + frame_class->change_orientation = mate_panel_applet_frame_matecomponent_change_orientation; + frame_class->change_size = mate_panel_applet_frame_matecomponent_change_size; + frame_class->change_background = mate_panel_applet_frame_matecomponent_change_background; + + g_type_class_add_private (class, sizeof (MatePanelAppletFrameMateComponentPrivate)); +} + +static MATE_Vertigo_MatePanelAppletShell +mate_panel_applet_frame_get_applet_shell (MateComponent_Control control) +{ + CORBA_Environment env; + MATE_Vertigo_MatePanelAppletShell retval; + + CORBA_exception_init (&env); + + retval = MateComponent_Unknown_queryInterface (control, + "IDL:MATE/Vertigo/MatePanelAppletShell:1.0", + &env); + if (MATECOMPONENT_EX (&env)) { + g_warning ("Unable to obtain AppletShell interface from control\n"); + + retval = CORBA_OBJECT_NIL; + } + + CORBA_exception_free (&env); + + return retval; +} + +static const char* mate_panel_applet_frame_get_orient_string(MatePanelAppletFrame* frame, MatePanelAppletFrameActivating* frame_act) +{ + PanelOrientation orientation; + const char* retval = NULL; + + orientation = mate_panel_applet_frame_activating_get_orientation(frame_act); + + switch (orientation) + { + case PANEL_ORIENTATION_TOP: + retval = "down"; + break; + case PANEL_ORIENTATION_BOTTOM: + retval = "up"; + break; + case PANEL_ORIENTATION_LEFT: + retval = "right"; + break; + case PANEL_ORIENTATION_RIGHT: + retval = "left"; + break; + default: + g_assert_not_reached(); + break; + } + + return retval; +} + +static const char* mate_panel_applet_frame_get_size_string (MatePanelAppletFrame* frame, MatePanelAppletFrameActivating* frame_act) +{ + const char* retval = NULL; + guint32 size; + + size = mate_panel_applet_frame_activating_get_size(frame_act); + + if (size <= PANEL_SIZE_XX_SMALL) + { + retval = "xx-small"; + } + else if (size <= PANEL_SIZE_X_SMALL) + { + retval = "x-small"; + } + else if (size <= PANEL_SIZE_SMALL) + { + retval = "small"; + } + else if (size <= PANEL_SIZE_MEDIUM) + { + retval = "medium"; + } + else if (size <= PANEL_SIZE_LARGE) + { + retval = "large"; + } + else if (size <= PANEL_SIZE_X_LARGE) + { + retval = "x-large"; + } + else + { + retval = "xx-large"; + } + + return retval; +} + +static char * +mate_panel_applet_frame_construct_item (MatePanelAppletFrame *frame, + MatePanelAppletFrameActivating *frame_act) +{ + char *retval; + char *conf_path = NULL; + char *bg_str = NULL; + gboolean locked_down; + + conf_path = mate_panel_applet_frame_activating_get_conf_path (frame_act); + //FIXME vuntz +#if 0 + bg_str = _mate_panel_applet_frame_get_background_string ( + frame, panel, panel->background.type); +#endif + + if (bg_str == NULL) + bg_str = g_strdup (""); + + locked_down = mate_panel_applet_frame_activating_get_locked_down (frame_act); + + retval = g_strdup_printf ( + "prefs_key=%s;" + "background=%s;orient=%s;size=%s;locked_down=%s", + conf_path, bg_str, + mate_panel_applet_frame_get_orient_string (frame, frame_act), + mate_panel_applet_frame_get_size_string (frame, frame_act), + locked_down ? "true" : "false"); + + g_free (conf_path); + g_free (bg_str); + + return retval; +} + +static void +mate_panel_applet_frame_event_listener (MateComponentListener *listener, + const char *event, + const CORBA_any *any, + CORBA_Environment *ev, + MatePanelAppletFrame *frame) +{ + if (!strcmp (event, "MateComponent/Property:change:" PROPERTY_FLAGS)) + mate_panel_applet_frame_matecomponent_update_flags (frame, any); + + else if (!strcmp (event, "MateComponent/Property:change:" PROPERTY_SIZE_HINTS)) + mate_panel_applet_frame_matecomponent_update_size_hints (frame, any); +} + +static void +mate_panel_applet_frame_matecomponent_activated (CORBA_Object object, + const char *error_reason, + gpointer data) +{ + MatePanelAppletFrameActivating *frame_act; + MatePanelAppletFrameMateComponent *matecomponent_frame; + MatePanelAppletFrame *frame; + GtkWidget *widget; + MateComponentControlFrame *control_frame; + MateComponent_Control control; + MateComponent_ItemContainer container; + CORBA_Environment corba_ev; + AppletInfo *info; + char *error; + char *item_name; + GError *gerror = NULL; + + widget = NULL; + matecomponent_frame = MATE_PANEL_APPLET_FRAME_MATECOMPONENT (data); + frame = MATE_PANEL_APPLET_FRAME (data); + frame_act = g_object_get_data (G_OBJECT (frame), "mate-panel-applet-frame-activating"); + g_object_set_data (G_OBJECT (frame), "mate-panel-applet-frame-activating", NULL); + + /* according to the source of matecomponent control == NULL && no + exception can happen, so handle it */ + if (error_reason != NULL || object == CORBA_OBJECT_NIL) { + gerror = g_error_new_literal (mate_panel_applet_frame_matecomponent_error_quark (), 0, error_reason); + goto error_out; + } + + CORBA_exception_init (&corba_ev); + + item_name = mate_panel_applet_frame_construct_item (frame, + frame_act); + + matecomponent_frame->priv->control = CORBA_OBJECT_NIL; + container = MateComponent_Unknown_queryInterface (object, + "IDL:MateComponent/ItemContainer:1.0", + &corba_ev); + if (!MATECOMPONENT_EX (&corba_ev) && container != CORBA_OBJECT_NIL) { + MateComponent_Unknown containee; + + containee = MateComponent_ItemContainer_getObjectByName (container, + item_name, + TRUE, + &corba_ev); + matecomponent_object_release_unref (container, NULL); + + if (!MATECOMPONENT_EX (&corba_ev) && containee != CORBA_OBJECT_NIL) { + matecomponent_frame->priv->control = + MateComponent_Unknown_queryInterface (containee, + "IDL:MateComponent/Control:1.0", + &corba_ev); + + matecomponent_object_release_unref (containee, NULL); + } + } + g_free (item_name); + + if (matecomponent_frame->priv->control == CORBA_OBJECT_NIL) { + error = matecomponent_exception_get_text (&corba_ev); + gerror = g_error_new (mate_panel_applet_frame_matecomponent_error_quark (), 0, "failed to get MateComponent/Control interface:\n", error); + CORBA_exception_free (&corba_ev); + matecomponent_object_release_unref (object, NULL); + g_free (error); + goto error_out; + } + + widget = matecomponent_widget_new_control_from_objref (matecomponent_frame->priv->control, + CORBA_OBJECT_NIL); + + CORBA_exception_free (&corba_ev); + matecomponent_object_release_unref (object, NULL); + + if (!widget) { + gerror = g_error_new_literal (mate_panel_applet_frame_matecomponent_error_quark (), 0, "no widget created"); + goto error_out; + } + + control_frame = matecomponent_widget_get_control_frame (MATECOMPONENT_WIDGET (widget)); + if (control_frame == NULL) { + gerror = g_error_new_literal (mate_panel_applet_frame_matecomponent_error_quark (), 0, "cannot get control frame"); + goto error_out; + } + + matecomponent_frame->priv->property_bag = + matecomponent_control_frame_get_control_property_bag (control_frame, + &corba_ev); + if (matecomponent_frame->priv->property_bag == NULL || MATECOMPONENT_EX (&corba_ev)) { + error = matecomponent_exception_get_text (&corba_ev); + CORBA_exception_free (&corba_ev); + gerror = g_error_new (mate_panel_applet_frame_matecomponent_error_quark (), 0, "cannot get property bag frame:\n%s", error); + g_free (error); + goto error_out; + } + + matecomponent_event_source_client_add_listener (matecomponent_frame->priv->property_bag, + (MateComponentListenerCallbackFn) mate_panel_applet_frame_event_listener, + "MateComponent/Property:change:mate-panel-applet", + NULL, + frame); + + matecomponent_frame->priv->ui_component = + matecomponent_control_frame_get_popup_component (control_frame, + &corba_ev); + if (matecomponent_frame->priv->ui_component == NULL || MATECOMPONENT_EX (&corba_ev)) { + error = matecomponent_exception_get_text (&corba_ev); + CORBA_exception_free (&corba_ev); + gerror = g_error_new (mate_panel_applet_frame_matecomponent_error_quark (), 0, "cannot get popup component:\n%s", error); + g_free (error); + goto error_out; + } + + matecomponent_ui_util_set_ui (matecomponent_frame->priv->ui_component, DATADIR, + "MATE_Panel_Popup.xml", "panel", NULL); + + matecomponent_ui_component_add_listener (matecomponent_frame->priv->ui_component, + "LockAppletToPanel", + listener_popup_handle_lock, + frame); + + matecomponent_ui_component_add_verb_list_with_data ( + matecomponent_frame->priv->ui_component, popup_verbs, frame); + + control = matecomponent_control_frame_get_control (control_frame); + if (!control) { + CORBA_exception_free (&corba_ev); + gerror = g_error_new_literal (mate_panel_applet_frame_matecomponent_error_quark (), 0, "cannot get control"); + goto error_out; + } + + matecomponent_frame->priv->applet_shell = mate_panel_applet_frame_get_applet_shell (control); + if (matecomponent_frame->priv->applet_shell == CORBA_OBJECT_NIL) { + CORBA_exception_free (&corba_ev); + gerror = g_error_new_literal (mate_panel_applet_frame_matecomponent_error_quark (), 0, "cannot get applet shell"); + goto error_out; + } + + CORBA_exception_free (&corba_ev); + + MateCORBA_small_listen_for_broken (object, + G_CALLBACK (mate_panel_applet_frame_matecomponent_applet_broken), + frame); + + gtk_container_add (GTK_CONTAINER (frame), widget); + + goto out; + +error_out: + if (widget) + g_object_unref (widget); + if (!gerror) + gerror = g_error_new_literal (mate_panel_applet_frame_matecomponent_error_quark (), 0, "unknown error"); + +out: + _mate_panel_applet_frame_activated (frame, frame_act, gerror); +} + +gboolean +mate_panel_applet_frame_matecomponent_load (const gchar *iid, + MatePanelAppletFrameActivating *frame_act) +{ + MatePanelAppletFrameMateComponent *matecomponent_frame; + MatePanelAppletFrame *frame; + CORBA_Environment ev; + + g_return_val_if_fail (iid != NULL, FALSE); + g_return_val_if_fail (frame_act != NULL, FALSE); + + if (!mate_panel_applets_manager_factory_activate (iid)) + return FALSE; + + matecomponent_frame = g_object_new (PANEL_TYPE_APPLET_FRAME_MATECOMPONENT, NULL); + frame = MATE_PANEL_APPLET_FRAME (matecomponent_frame); + _mate_panel_applet_frame_set_iid (frame, iid); + + g_object_set_data (G_OBJECT (frame), "mate-panel-applet-frame-activating", frame_act); + + CORBA_exception_init (&ev); + + matecomponent_activation_activate_from_id_async ((gchar *) iid, 0, + (MateComponentActivationCallback) mate_panel_applet_frame_matecomponent_activated, + frame, &ev); + + CORBA_exception_free (&ev); + + return TRUE; +} diff --git a/matecomponent/panel-module/mate-panel-applet-frame-matecomponent.h b/matecomponent/panel-module/mate-panel-applet-frame-matecomponent.h new file mode 100644 index 00000000..b6246e26 --- /dev/null +++ b/matecomponent/panel-module/mate-panel-applet-frame-matecomponent.h @@ -0,0 +1,65 @@ +/* + * mate-panel-applet-frame-matecomponent.h: panel side container for applets + * + * Copyright (C) 2001 - 2003 Sun Microsystems, Inc. + * Copyright (C) 2010 Vincent Untz <[email protected]> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 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 <[email protected]> + */ + +#ifndef __MATE_PANEL_APPLET_FRAME_MATECOMPONENT_H__ +#define __MATE_PANEL_APPLET_FRAME_MATECOMPONENT_H__ + +#include <mate-panel-applet-frame.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#define PANEL_TYPE_APPLET_FRAME_MATECOMPONENT (mate_panel_applet_frame_matecomponent_get_type ()) +#define MATE_PANEL_APPLET_FRAME_MATECOMPONENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PANEL_TYPE_APPLET_FRAME_MATECOMPONENT, MatePanelAppletFrameMateComponent)) +#define MATE_PANEL_APPLET_FRAME_MATECOMPONENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PANEL_TYPE_APPLET_FRAME_MATECOMPONENT, MatePanelAppletFrameMateComponentClass)) +#define PANEL_IS_APPLET_FRAME_MATECOMPONENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PANEL_TYPE_APPLET_FRAME_MATECOMPONENT)) +#define PANEL_IS_APPLET_FRAME_MATECOMPONENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PANEL_TYPE_APPLET_FRAME_MATECOMPONENT)) +#define MATE_PANEL_APPLET_FRAME_MATECOMPONENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PANEL_TYPE_APPLET_FRAME_MATECOMPONENT, MatePanelAppletFrameMateComponentClass)) + +typedef struct _MatePanelAppletFrameMateComponent MatePanelAppletFrameMateComponent; +typedef struct _MatePanelAppletFrameMateComponentClass MatePanelAppletFrameMateComponentClass; +typedef struct _MatePanelAppletFrameMateComponentPrivate MatePanelAppletFrameMateComponentPrivate; + +struct _MatePanelAppletFrameMateComponentClass { + MatePanelAppletFrameClass parent_class; +}; + +struct _MatePanelAppletFrameMateComponent{ + MatePanelAppletFrame parent; + + MatePanelAppletFrameMateComponentPrivate *priv; +}; + +GType mate_panel_applet_frame_matecomponent_get_type (void) G_GNUC_CONST; + +gboolean mate_panel_applet_frame_matecomponent_load (const gchar *iid, + MatePanelAppletFrameActivating *frame_act); + +#ifdef __cplusplus +} +#endif + +#endif /* __MATE_PANEL_APPLET_FRAME_MATECOMPONENT_H__ */ diff --git a/matecomponent/panel-module/mate-panel-applets-manager-matecomponent.c b/matecomponent/panel-module/mate-panel-applets-manager-matecomponent.c new file mode 100644 index 00000000..3a0187a8 --- /dev/null +++ b/matecomponent/panel-module/mate-panel-applets-manager-matecomponent.c @@ -0,0 +1,250 @@ +/* + * mate-panel-applets-manager-matecomponent.c + * + * Copyright (C) 2010 Vincent Untz <[email protected]> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 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. + */ + +#include <config.h> + +#include <string.h> +#include <libmatecomponent.h> + +#include <mate-panel-applets-manager.h> + +#include "mate-panel-applet-frame-matecomponent.h" + +#include "mate-panel-applets-manager-matecomponent.h" + +G_DEFINE_DYNAMIC_TYPE (MatePanelAppletsManagerMateComponent, mate_panel_applets_manager_matecomponent, PANEL_TYPE_APPLETS_MANAGER); + +struct _MatePanelAppletsManagerMateComponentPrivate +{ + GHashTable *applets; +}; + +static const char applet_requirements [] = + "has_all (repo_ids, ['IDL:MateComponent/Control:1.0'," + " 'IDL:MATE/Vertigo/MatePanelAppletShell:1.0']) && " + "defined (panel:icon)"; + +static char *applet_sort_criteria [] = { + "name", + NULL + }; + +static void +mate_panel_applets_manager_matecomponent_load_applet_infos (MatePanelAppletsManagerMateComponent *manager) +{ + MateComponent_ServerInfoList *applet_list; + CORBA_Environment env; + const char * const *langs; + GSList *langs_gslist; + int i; + + CORBA_exception_init (&env); + + applet_list = matecomponent_activation_query (applet_requirements, + applet_sort_criteria, + &env); + if (MATECOMPONENT_EX (&env)) { + g_warning ("MateComponent query returned exception %s\n", + MATECOMPONENT_EX_REPOID (&env)); + + CORBA_exception_free (&env); + CORBA_free (applet_list); + + return; + } + + CORBA_exception_free (&env); + + langs = g_get_language_names (); + + langs_gslist = NULL; + for (i = 0; langs[i]; i++) + langs_gslist = g_slist_prepend (langs_gslist, (char *) langs[i]); + + langs_gslist = g_slist_reverse (langs_gslist); + + for (i = 0; i < applet_list->_length; i++) { + MateComponent_ServerInfo *info; + const char *name, *description, *icon; + MatePanelAppletInfo *applet_info; + + info = &applet_list->_buffer[i]; + + name = matecomponent_server_info_prop_lookup (info, + "name", + langs_gslist); + description = matecomponent_server_info_prop_lookup (info, + "description", + langs_gslist); + icon = matecomponent_server_info_prop_lookup (info, + "panel:icon", + NULL); + + applet_info = mate_panel_applet_info_new (info->iid, name, description, icon, NULL); + + g_hash_table_insert (manager->priv->applets, g_strdup (info->iid), applet_info); + } + + g_slist_free (langs_gslist); + CORBA_free (applet_list); +} + +static GList * +mate_panel_applets_manager_matecomponent_get_applets (MatePanelAppletsManager *manager) +{ + MatePanelAppletsManagerMateComponent *matecomponent_manager = MATE_PANEL_APPLETS_MANAGER_MATECOMPONENT (manager); + + GHashTableIter iter; + gpointer key, value; + GList *retval = NULL; + + g_hash_table_iter_init (&iter, matecomponent_manager->priv->applets); + while (g_hash_table_iter_next (&iter, &key, &value)) + retval = g_list_prepend (retval, value); + + return g_list_reverse (retval);; +} + +static gboolean +mate_panel_applets_manager_matecomponent_factory_activate (MatePanelAppletsManager *manager, + const gchar *iid) +{ + MatePanelAppletsManagerMateComponent *matecomponent_manager = MATE_PANEL_APPLETS_MANAGER_MATECOMPONENT (manager); + MatePanelAppletInfo *info; + + /* we let matecomponent deal with that, but we need to return the right value */ + + info = g_hash_table_lookup (matecomponent_manager->priv->applets, iid); + + return (info != NULL); +} + +static gboolean +mate_panel_applets_manager_matecomponent_factory_deactivate (MatePanelAppletsManager *manager, + const gchar *iid) +{ + MatePanelAppletsManagerMateComponent *matecomponent_manager = MATE_PANEL_APPLETS_MANAGER_MATECOMPONENT (manager); + MatePanelAppletInfo *info; + + /* we let matecomponent deal with that, but we need to return the right value */ + + info = g_hash_table_lookup (matecomponent_manager->priv->applets, iid); + + return (info != NULL); +} + +static MatePanelAppletInfo * +mate_panel_applets_manager_matecomponent_get_applet_info (MatePanelAppletsManager *manager, + const gchar *iid) +{ + MatePanelAppletsManagerMateComponent *matecomponent_manager = MATE_PANEL_APPLETS_MANAGER_MATECOMPONENT (manager); + + return g_hash_table_lookup (matecomponent_manager->priv->applets, iid); +} + +static MatePanelAppletInfo * +mate_panel_applets_manager_matecomponent_get_applet_info_from_old_id (MatePanelAppletsManager *manager, + const gchar *iid) +{ + MatePanelAppletsManagerMateComponent *matecomponent_manager = MATE_PANEL_APPLETS_MANAGER_MATECOMPONENT (manager); + + return g_hash_table_lookup (matecomponent_manager->priv->applets, iid); +} + +static gboolean +mate_panel_applets_manager_matecomponent_load_applet (MatePanelAppletsManager *manager, + const gchar *iid, + MatePanelAppletFrameActivating *frame_act) +{ + return mate_panel_applet_frame_matecomponent_load (iid, frame_act); +} + +static void +mate_panel_applets_manager_matecomponent_finalize (GObject *object) +{ + MatePanelAppletsManagerMateComponent *manager = MATE_PANEL_APPLETS_MANAGER_MATECOMPONENT (object); + + if (manager->priv->applets) { + g_hash_table_destroy (manager->priv->applets); + manager->priv->applets = NULL; + } + + G_OBJECT_CLASS (mate_panel_applets_manager_matecomponent_parent_class)->finalize (object); +} + +static void +mate_panel_applets_manager_matecomponent_init (MatePanelAppletsManagerMateComponent *manager) +{ + manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, + PANEL_TYPE_APPLETS_MANAGER_MATECOMPONENT, + MatePanelAppletsManagerMateComponentPrivate); + + manager->priv->applets = g_hash_table_new_full (g_str_hash, + g_str_equal, + (GDestroyNotify) g_free, + (GDestroyNotify) mate_panel_applet_info_free); + + mate_panel_applets_manager_matecomponent_load_applet_infos (manager); +} + +static void +mate_panel_applets_manager_matecomponent_class_finalize (MatePanelAppletsManagerMateComponentClass *class) +{ +} + +static void +mate_panel_applets_manager_matecomponent_class_init (MatePanelAppletsManagerMateComponentClass *class) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + MatePanelAppletsManagerClass *manager_class = MATE_PANEL_APPLETS_MANAGER_CLASS (class); + + /* This is a horrible hack: we shouldn't call matecomponent_init() here, but + * in g_io_module_load() or even + * mate_panel_applets_manager_matecomponent_register(). However, it looks like if + * there's no giomodule.cache file, the module gets unloaded, and + * matecomponent_init() gets called twice, which makes everythings goes wrong: + * matecomponent has been unloaded so believes it has to get initialized, but + * the types are already registered in the GType system. And bam. */ + + matecomponent_init (NULL, NULL); + + gobject_class->finalize = mate_panel_applets_manager_matecomponent_finalize; + + manager_class->get_applets = mate_panel_applets_manager_matecomponent_get_applets; + manager_class->factory_activate = mate_panel_applets_manager_matecomponent_factory_activate; + manager_class->factory_deactivate = mate_panel_applets_manager_matecomponent_factory_deactivate; + manager_class->get_applet_info = mate_panel_applets_manager_matecomponent_get_applet_info; + manager_class->get_applet_info_from_old_id = mate_panel_applets_manager_matecomponent_get_applet_info_from_old_id; + manager_class->load_applet = mate_panel_applets_manager_matecomponent_load_applet; + + g_type_class_add_private (class, sizeof (MatePanelAppletsManagerMateComponentPrivate)); +} + + +void +mate_panel_applets_manager_matecomponent_register (GIOModule *module) +{ + mate_panel_applets_manager_matecomponent_register_type (G_TYPE_MODULE (module)); + g_io_extension_point_implement (MATE_PANEL_APPLETS_MANAGER_EXTENSION_POINT_NAME, + PANEL_TYPE_APPLETS_MANAGER_MATECOMPONENT, + "matecomponent", + 10); +} diff --git a/matecomponent/panel-module/mate-panel-applets-manager-matecomponent.h b/matecomponent/panel-module/mate-panel-applets-manager-matecomponent.h new file mode 100644 index 00000000..88741ed8 --- /dev/null +++ b/matecomponent/panel-module/mate-panel-applets-manager-matecomponent.h @@ -0,0 +1,59 @@ +/* + * mate-panel-applets-manager-matecomponent.h + * + * Copyright (C) 2010 Vincent Untz <[email protected]> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 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 __MATE_PANEL_APPLETS_MANAGER_MATECOMPONENT_H__ +#define __MATE_PANEL_APPLETS_MANAGER_MATECOMPONENT_H__ + +#include <mate-panel-applets-manager.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#define PANEL_TYPE_APPLETS_MANAGER_MATECOMPONENT (mate_panel_applets_manager_matecomponent_get_type ()) +#define MATE_PANEL_APPLETS_MANAGER_MATECOMPONENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PANEL_TYPE_APPLETS_MANAGER_MATECOMPONENT, MatePanelAppletsManagerMateComponent)) +#define MATE_PANEL_APPLETS_MANAGER_MATECOMPONENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANEL_TYPE_APPLETS_MANAGER_MATECOMPONENT, MatePanelAppletsManagerMateComponentClass)) +#define PANEL_IS_APPLETS_MANAGER_MATECOMPONENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PANEL_TYPE_APPLETS_MANAGER_MATECOMPONENT)) +#define PANEL_IS_APPLETS_MANAGER_MATECOMPONENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANEL_TYPE_APPLETS_MANAGER_MATECOMPONENT)) +#define MATE_PANEL_APPLETS_MANAGER_MATECOMPONENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PANEL_TYPE_APPLETS_MANAGER_MATECOMPONENT, MatePanelAppletsManagerMateComponentClass)) + +typedef struct _MatePanelAppletsManagerMateComponent MatePanelAppletsManagerMateComponent; +typedef struct _MatePanelAppletsManagerMateComponentClass MatePanelAppletsManagerMateComponentClass; +typedef struct _MatePanelAppletsManagerMateComponentPrivate MatePanelAppletsManagerMateComponentPrivate; + +struct _MatePanelAppletsManagerMateComponentClass { + MatePanelAppletsManagerClass parent_class; +}; + +struct _MatePanelAppletsManagerMateComponent { + MatePanelAppletsManager parent; + + /*< private > */ + MatePanelAppletsManagerMateComponentPrivate *priv; +}; + +GType mate_panel_applets_manager_matecomponent_get_type (void); + +#ifdef __cplusplus +} +#endif + +#endif /* __MATE_PANEL_APPLETS_MANAGER_MATECOMPONENT_H__ */ diff --git a/matecomponent/panel-module/mate-panel-applets-matecomponent-module.c b/matecomponent/panel-module/mate-panel-applets-matecomponent-module.c new file mode 100644 index 00000000..5713ebc4 --- /dev/null +++ b/matecomponent/panel-module/mate-panel-applets-matecomponent-module.c @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2010 Novell, 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. + * + * Author: Vincent Untz <[email protected]> + */ + +#include "config.h" + +#include <gio/gio.h> + +#include <mate-panel-applets-manager.h> +#include "mate-panel-applets-manager-matecomponent.h" + +void +g_io_module_load (GIOModule *module) +{ + mate_panel_applets_manager_matecomponent_register (module); +} + +void +g_io_module_unload (GIOModule *module) +{ +} + +char ** +g_io_module_query (void) +{ + char *eps[] = { + MATE_PANEL_APPLETS_MANAGER_EXTENSION_POINT_NAME, + NULL + }; + return g_strdupv (eps); +} |