diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-06-24 14:52:46 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-06-24 14:52:46 +0800 |
commit | 301d558d8fea6d2517c83618d1e1327dcdc211e0 (patch) | |
tree | a662bee2099450ebc43836d3a4d7814b774b3c86 | |
parent | 4c3ed4ce5559461d2662eddf7a96545582df198b (diff) | |
download | marcuscom-ports-301d558d8fea6d2517c83618d1e1327dcdc211e0.tar marcuscom-ports-301d558d8fea6d2517c83618d1e1327dcdc211e0.tar.gz marcuscom-ports-301d558d8fea6d2517c83618d1e1327dcdc211e0.tar.bz2 marcuscom-ports-301d558d8fea6d2517c83618d1e1327dcdc211e0.tar.lz marcuscom-ports-301d558d8fea6d2517c83618d1e1327dcdc211e0.tar.xz marcuscom-ports-301d558d8fea6d2517c83618d1e1327dcdc211e0.tar.zst marcuscom-ports-301d558d8fea6d2517c83618d1e1327dcdc211e0.zip |
Update to 2.15.1.1.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@6477 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r-- | x11/gnome-applets/Makefile | 24 | ||||
-rw-r--r-- | x11/gnome-applets/distinfo | 6 | ||||
-rw-r--r-- | x11/gnome-applets/files/patch-cpufreq-freebsd | 531 | ||||
-rw-r--r-- | x11/gnome-applets/files/patch-cpufreq-selector-freebsd | 434 | ||||
-rw-r--r-- | x11/gnome-applets/files/patch-gswitchit | 2915 | ||||
-rw-r--r-- | x11/gnome-applets/pkg-plist | 97 |
6 files changed, 448 insertions, 3559 deletions
diff --git a/x11/gnome-applets/Makefile b/x11/gnome-applets/Makefile index f09ddfb0c..447a34524 100644 --- a/x11/gnome-applets/Makefile +++ b/x11/gnome-applets/Makefile @@ -3,12 +3,11 @@ # Whom: Joe Marcus Clarke <marcus@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/x11/gnome-applets/Makefile,v 1.116 2006/06/17 04:17:57 marcus Exp $ +# $MCom: ports/x11/gnome-applets/Makefile,v 1.118 2006/06/18 03:38:38 marcus Exp $ # PORTNAME= gnome-applets -PORTVERSION= 2.14.2 -PORTREVISION= 1 +PORTVERSION= 2.15.1.1 CATEGORIES= x11 gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} @@ -33,6 +32,7 @@ INSTALLS_ICONS= yes INSTALLS_SHLIB= yes USE_GNOME= gnomeprefix gnomehack intlhack gnomepanel \ gail gnomedocutils +WANT_GNOME= yes USE_GSTREAMER= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-gstreamer=0.10 @@ -41,7 +41,7 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \ FREEBSD_SYS=${FREEBSD_SYS} GCONF_SCHEMAS= charpick.schemas drivemount.schemas geyes.schemas \ - gswitchit.schemas gtik.schemas gweather.schemas \ + gswitchit.schemas gweather.schemas \ mixer.schemas multiload.schemas \ stickynotes.schemas @@ -49,6 +49,11 @@ OPTIONS= MINI_COMMANDER "Enable mini-commander applet" off FREEBSD_SYS?= /usr/src/sys +.if defined(PACKAGE_BUILDING) +.undef WITHOUT_GNOME +WITH_GNOME= yes +.endif + .include <bsd.port.pre.mk> .if exists(${LOCALBASE}/libdata/pkgconfig/libnotify.pc) || \ @@ -79,8 +84,19 @@ PLIST_SUB+= COMMANDER="" PLIST_SUB+= COMMANDER="@comment " .endif +.if exists(${pygnome2_DETECT}) || ( ${HAVE_GNOME:Mpygnome2}!="" && ${ARCH}!="sparc64" ) +USE_PYTHON= yes +.include "${PORTSDIR}/Mk/bsd.python.mk" +USE_GNOME+= pygnome2 +PLIST_SUB+= PYTHON="" +.else +PLIST_SUB+= PYTHON="@comment " +.endif + post-patch: @${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|g' \ ${WRKSRC}/libgweather/weather-met.c + @${REINPLACE_CMD} -e 's|system-tools-backends|system-tools-backends-2.0|g' \ + ${WRKSRC}/configure .include <bsd.port.post.mk> diff --git a/x11/gnome-applets/distinfo b/x11/gnome-applets/distinfo index 271f8ddad..dd164baea 100644 --- a/x11/gnome-applets/distinfo +++ b/x11/gnome-applets/distinfo @@ -1,3 +1,3 @@ -MD5 (gnome2/gnome-applets-2.14.2.tar.bz2) = e6da539e78da1256b9a9bee1301fd44f -SHA256 (gnome2/gnome-applets-2.14.2.tar.bz2) = 4bdd52b47649cfa6dc5d065201124ae02d3da593531cd0defa1a9cf7a761f1df -SIZE (gnome2/gnome-applets-2.14.2.tar.bz2) = 6601120 +MD5 (gnome2/gnome-applets-2.15.1.1.tar.bz2) = d632538ac5a4ed880302be25dbdc0f69 +SHA256 (gnome2/gnome-applets-2.15.1.1.tar.bz2) = 8aed30bda4c9f377663edc6ce846fa4f658fc0ba4e435648b6baeb7b50bb73a1 +SIZE (gnome2/gnome-applets-2.15.1.1.tar.bz2) = 6453936 diff --git a/x11/gnome-applets/files/patch-cpufreq-freebsd b/x11/gnome-applets/files/patch-cpufreq-freebsd index 4bed0298d..2d77112dd 100644 --- a/x11/gnome-applets/files/patch-cpufreq-freebsd +++ b/x11/gnome-applets/files/patch-cpufreq-freebsd @@ -1,6 +1,160 @@ ---- cpufreq/src/cpufreq-monitor-sysctl.h.orig Sun Feb 13 01:00:25 2005 -+++ cpufreq/src/cpufreq-monitor-sysctl.h Sat Feb 12 20:25:21 2005 -@@ -0,0 +1,48 @@ +--- cpufreq/src/cpufreq-monitor-cpuinfo.c.orig Thu Jun 15 01:01:54 2006 ++++ cpufreq/src/cpufreq-monitor-cpuinfo.c Sat Jun 17 13:48:19 2006 +@@ -22,6 +22,10 @@ + #include <glib.h> + #include <glib/gi18n.h> + ++#ifdef __FreeBSD__ ++#include <sys/types.h> ++#include <sys/sysctl.h> ++#endif /* __FreeBSD__ */ + #include <string.h> + #include <stdio.h> + +@@ -59,15 +63,20 @@ cpufreq_monitor_cpuinfo_new (guint cpu) + static gboolean + cpufreq_monitor_cpuinfo_run (CPUFreqMonitor *monitor) + { ++#ifndef __FreeBSD__ + gchar *file; + gchar **lines; + gchar *buffer = NULL; + gchar *p; ++#else ++ size_t len; ++#endif /* __FreeBSD__ */ + gint cpu, i; + gint cur_freq, max_freq; + gchar *governor; + GError *error = NULL; + ++#ifndef __FreeBSD__ + file = g_strdup ("/proc/cpuinfo"); + if (!g_file_get_contents (file, &buffer, NULL, &error)) { + g_warning (error->message); +@@ -112,6 +121,12 @@ cpufreq_monitor_cpuinfo_run (CPUFreqMoni + + g_strfreev (lines); + g_free (buffer); ++#else ++ len = sizeof (cpu); ++ ++ if (sysctlbyname ("hw.clockrate", &cpu, &len, NULL, 0) == -1) ++ return FALSE; ++#endif /* __FreeBSD__ */ + + governor = g_strdup (_("Frequency Scaling Unsupported")); + cur_freq = cpu * 1000; +--- cpufreq/src/cpufreq-applet.c.orig Thu Jun 15 01:01:53 2006 ++++ cpufreq/src/cpufreq-applet.c Sat Jun 17 13:42:50 2006 +@@ -17,6 +17,7 @@ + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Authors : Carlos García Campos <carlosgc@gnome.org> ++ * Joe Marcus Clarke <marcus@FreeBSD.org> + */ + + #ifdef HAVE_CONFIG_H +@@ -519,6 +524,7 @@ cpufreq_applet_about_cb (BonoboUICompone + { + static const gchar *const authors[] = { + "Carlos Garcia Campos <carlosgc@gnome.org>", ++ "Joe Marcus Clarke <marcus@FreeBSD.org> (FreeBSD support)", + NULL + }; + static const gchar *const documenters[] = { +--- cpufreq/src/cpufreq-utils.c.orig Sat Jun 17 14:02:11 2006 ++++ cpufreq/src/cpufreq-utils.c Sat Jun 17 14:02:12 2006 +@@ -21,11 +21,32 @@ + + #include <gtk/gtkmessagedialog.h> + #include <sys/types.h> ++#ifdef __FreeBSD__ ++#include <sys/sysctl.h> ++#endif /* __FreeBSD__ */ + #include <sys/stat.h> + #include <unistd.h> + + #include "cpufreq-utils.h" + ++#ifdef __FreeBSD__ ++guint ++cpufreq_utils_get_n_cpus (void) ++{ ++ size_t len; ++ static guint n_cpus = 0; ++ ++ if (n_cpus > 0) ++ return n_cpus; ++ ++ len = sizeof (n_cpus); ++ if (sysctlbyname ("hw.ncpu", &n_cpus, &len, NULL, 0) == -1) { ++ return 1; ++ } ++ ++ return n_cpus; ++} ++#else + guint + cpufreq_utils_get_n_cpus (void) + { +@@ -68,6 +89,7 @@ cpufreq_utils_get_n_cpus (void) + + return 1; + } ++#endif /* __FreeBSD__ */ + + void + cpufreq_utils_display_error (const gchar *message, +--- cpufreq/src/Makefile.in.orig Sat Jun 17 13:42:50 2006 ++++ cpufreq/src/Makefile.in Sat Jun 17 14:03:45 2006 +@@ -62,7 +62,8 @@ am__cpufreq_applet_SOURCES_DIST = cpufre + cpufreq-monitor-procfs.h cpufreq-monitor-sysfs.c \ + cpufreq-monitor-sysfs.h cpufreq-monitor-libcpufreq.c \ + cpufreq-monitor-libcpufreq.h cpufreq-monitor-cpuinfo.c \ +- cpufreq-monitor-cpuinfo.h ++ cpufreq-monitor-cpuinfo.h cpufreq-monitor-sysctl.c \ ++ cpufreq-monitor-sysctl.h + @HAVE_LIBCPUFREQ_TRUE@am__objects_1 = \ + @HAVE_LIBCPUFREQ_TRUE@ cpufreq-monitor-libcpufreq.$(OBJEXT) + am_cpufreq_applet_OBJECTS = cpufreq-applet.$(OBJEXT) \ +@@ -71,7 +72,8 @@ am_cpufreq_applet_OBJECTS = cpufreq-appl + cpufreq-monitor-factory.$(OBJEXT) \ + cpufreq-monitor-procfs.$(OBJEXT) \ + cpufreq-monitor-sysfs.$(OBJEXT) $(am__objects_1) \ +- cpufreq-monitor-cpuinfo.$(OBJEXT) ++ cpufreq-monitor-cpuinfo.$(OBJEXT) \ ++ cpufreq-monitor-sysctl.$(OBJEXT) + cpufreq_applet_OBJECTS = $(am_cpufreq_applet_OBJECTS) + am__DEPENDENCIES_1 = + cpufreq_applet_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@@ -85,6 +87,7 @@ am__depfiles_maybe = depfiles + @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-monitor-libcpufreq.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-monitor-procfs.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-monitor-sysfs.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-monitor-sysctl.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-monitor.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-popup.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-prefs.Po \ +@@ -397,6 +400,7 @@ cpufreq_applet_SOURCES = \ + cpufreq-monitor.c cpufreq-monitor.h \ + cpufreq-monitor-factory.c cpufreq-monitor-factory.h \ + cpufreq-monitor-procfs.c cpufreq-monitor-procfs.h \ ++ cpufreq-monitor-sysctl.c cpufreq-monitor-sysctl.h \ + cpufreq-monitor-sysfs.c cpufreq-monitor-sysfs.h \ + $(cpufreq_files) \ + cpufreq-monitor-cpuinfo.c cpufreq-monitor-cpuinfo.h +@@ -482,6 +486,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor-factory.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor-libcpufreq.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor-procfs.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor-sysctl.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor-sysfs.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-popup.Po@am__quote@ +--- cpufreq/src/cpufreq-monitor-sysctl.h.orig Sat Jun 17 14:05:37 2006 ++++ cpufreq/src/cpufreq-monitor-sysctl.h Sat Jun 17 14:14:13 2006 +@@ -0,0 +1,49 @@ +/* + * Copyright (C) 2001, 2002 Free Software Foundation + * @@ -25,6 +179,7 @@ +#define __CPUFREQ_MONITOR_SYSCTL_H__ + +#include <glib-object.h> ++ +#include "cpufreq-monitor.h" + +#define TYPE_CPUFREQ_MONITOR_SYSCTL (cpufreq_monitor_sysctl_get_type ()) @@ -45,13 +200,13 @@ + CPUFreqMonitorClass parent_class; +}; + -+GType cpufreq_monitor_sysctl_get_type (); ++GType cpufreq_monitor_sysctl_get_type (void) G_GNUC_CONST; +CPUFreqMonitor *cpufreq_monitor_sysctl_new (guint cpu); + +#endif /* __CPUFREQ_MONITOR_SYSCTL_H__ */ ---- cpufreq/src/cpufreq-monitor-sysctl.c.orig Sun Feb 13 03:52:42 2005 -+++ cpufreq/src/cpufreq-monitor-sysctl.c Mon Feb 14 00:42:07 2005 -@@ -0,0 +1,269 @@ +--- cpufreq/src/cpufreq-monitor-sysctl.c.orig Sat Jun 17 14:15:55 2006 ++++ cpufreq/src/cpufreq-monitor-sysctl.c Sat Jun 24 01:45:23 2006 +@@ -0,0 +1,161 @@ +/* + * Copyright (C) 2001, 2002 Free Software Foundation + * @@ -82,70 +237,32 @@ +#include <sys/sysctl.h> + +#include "cpufreq-monitor-sysctl.h" -+#include "cpufreq-monitor-protected.h" + +#define PARENT_TYPE TYPE_CPUFREQ_MONITOR + +#define CPUFREQ_MONITOR_GET_PROTECTED(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), PARENT_TYPE, CPUFreqMonitorProtected)) + +static void cpufreq_monitor_sysctl_class_init (CPUFreqMonitorSysctlClass *klass); -+static void cpufreq_monitor_sysctl_finalize (GObject *object); + -+static void cpufreq_monitor_sysctl_run (CPUFreqMonitor *monitor); ++static gboolean cpufreq_monitor_sysctl_run (CPUFreqMonitor *monitor); +static GList *cpufreq_monitor_sysctl_get_available_frequencies (CPUFreqMonitor *monitor); + +static gboolean cpufreq_monitor_sysctl_get (gpointer gdata); + -+ -+static CPUFreqMonitorClass *parent_class = NULL; -+ -+typedef struct _CPUFreqMonitorProtected CPUFreqMonitorProtected; -+ -+GType cpufreq_monitor_sysctl_get_type () -+{ -+ static GType type = 0; -+ -+ if (!type) { -+ static const GTypeInfo info = { -+ sizeof (CPUFreqMonitorSysctlClass), -+ (GBaseInitFunc) NULL, -+ (GBaseFinalizeFunc) NULL, -+ (GClassInitFunc) cpufreq_monitor_sysctl_class_init, -+ NULL, -+ NULL, -+ sizeof (CPUFreqMonitorSysctl), -+ 0, -+ NULL -+ }; -+ -+ type = g_type_register_static (PARENT_TYPE, "CPUFreqMonitorSysctl", -+ &info, 0); -+ } -+ -+ return type; -+} ++G_DEFINE_TYPE (CPUFreqMonitorSysctl, cpufreq_monitor_sysctl, CPUFREQ_TYPE_MONITOR) + +static void -+cpufreq_monitor_sysctl_class_init (CPUFreqMonitorSysctlClass *klass) ++cpufreq_monitor_sysctl_init (CPUFreqMonitorSysctl *monitor) +{ -+ GObjectClass *object_class = G_OBJECT_CLASS (klass); -+ CPUFreqMonitorClass *monitor_class = CPUFREQ_MONITOR_CLASS (klass); -+ -+ parent_class = g_type_class_peek_parent (klass); -+ -+ monitor_class->run = cpufreq_monitor_sysctl_run; -+ monitor_class->get_available_frequencies = cpufreq_monitor_sysctl_get_available_frequencies; -+ -+ object_class->finalize = cpufreq_monitor_sysctl_finalize; +} + +static void -+cpufreq_monitor_sysctl_finalize (GObject *object) ++cpufreq_monitor_sysctl_class_init (CPUFreqMonitorSysctlClass *klass) +{ -+ g_return_if_fail (IS_CPUFREQ_MONITOR_SYSCTL (object)); ++ CPUFreqMonitorClass *monitor_class = CPUFREQ_MONITOR_CLASS (klass); + -+ if (G_OBJECT_CLASS (parent_class)->finalize) -+ (* G_OBJECT_CLASS (parent_class)->finalize) (object); ++ monitor_class->run = cpufreq_monitor_sysctl_run; ++ monitor_class->get_available_frequencies = cpufreq_monitor_sysctl_get_available_frequencies; +} + +CPUFreqMonitor * @@ -159,29 +276,23 @@ +} + +static gboolean -+cpufreq_monitor_sysctl_get (gpointer gdata) ++cpufreq_monitor_sysctl_run (CPUFreqMonitor *monitor) +{ + gint fmax, fmin, ifreq; -+ gchar *freq, *perc, *unit, *governor; -+ gboolean changed; ++ gchar *governor; + size_t len; + gchar *freq_oid; -+ CPUFreqMonitorSysctl *monitor; -+ CPUFreqMonitorProtected *private; ++ guint mon_cpu; ++ GList *list; + -+ monitor = (CPUFreqMonitorSysctl *) gdata; -+ private = CPUFREQ_MONITOR_GET_PROTECTED (CPUFREQ_MONITOR (monitor)); ++ list = cpufreq_monitor_get_available_frequencies (CPUFREQ_MONITOR (monitor)); + -+ if (private->available_freqs == NULL) { -+ if (!cpufreq_monitor_sysctl_get_available_frequencies (CPUFREQ_MONITOR (monitor))) -+ return FALSE; -+ } -+ -+ fmax = atoi ((gchar *) private->available_freqs->data); -+ fmin = atoi ((gchar *) g_list_nth_data (private->available_freqs, (g_list_length (private->available_freqs) - 1))); ++ fmax = atoi ((gchar *) list->data); ++ fmin = atoi ((gchar *) g_list_nth_data (list, (g_list_length (list) - 1))); + ++ g_object_get (G_OBJECT (monitor), "cpu", &mon_cpu, NULL); + len = sizeof (ifreq); -+ freq_oid = g_strdup_printf ("dev.cpu.%d.freq", private->cpu); ++ freq_oid = g_strdup_printf ("dev.cpu.%d.freq", mon_cpu); + + if (sysctlbyname (freq_oid, &ifreq, &len, NULL, 0) == -1) { + g_free (freq_oid); @@ -189,7 +300,7 @@ + } + + ifreq *= 1000; -+ ++ + if (ifreq == fmax) + governor = g_strdup ("performance"); + else if (ifreq == fmin) @@ -197,93 +308,29 @@ + else + governor = g_strdup ("other"); + -+ freq = parent_class->get_human_readable_freq (ifreq); -+ perc = parent_class->get_human_readable_perc (fmax, ifreq); -+ unit = parent_class->get_human_readable_unit (ifreq); -+ -+ changed = FALSE; -+ -+ if (!private->governor || (g_ascii_strcasecmp (governor, private->governor) != 0)) { -+ changed = TRUE; -+ } -+ -+ if (!private->freq || (g_ascii_strcasecmp (freq, private->freq) != 0)) { -+ changed = TRUE; -+ } -+ -+ if (!private->perc || (g_ascii_strcasecmp (perc, private->perc) != 0)) { -+ changed = TRUE; -+ } -+ -+ if (!private->unit || (g_ascii_strcasecmp (unit, private->unit) != 0)) { -+ changed = TRUE; -+ } -+ -+ parent_class->free_data (CPUFREQ_MONITOR (monitor)); -+ -+ private->governor = governor; -+ private->freq = freq; -+ private->perc = perc; -+ private->unit = unit; -+ -+ if (private->governor == NULL) -+ return FALSE; -+ if (private->freq == NULL) -+ return FALSE; -+ if (private->perc == NULL) -+ return FALSE; -+ if (private->unit == NULL) -+ return FALSE; -+ -+ if (changed) -+ g_signal_emit (CPUFREQ_MONITOR (monitor), parent_class->signals[CHANGED], 0); ++ g_object_set (G_OBJECT (monitor), ++ "governor", governor, ++ "frequency", ifreq, ++ "max-frequency", fmax, ++ NULL); + + return TRUE; +} + -+static void -+cpufreq_monitor_sysctl_run (CPUFreqMonitor *monitor) -+{ -+ CPUFreqMonitorProtected *private; -+ -+ g_return_if_fail (IS_CPUFREQ_MONITOR_SYSCTL (monitor)); -+ -+ private = CPUFREQ_MONITOR_GET_PROTECTED (CPUFREQ_MONITOR (monitor)); -+ -+ if (private->timeout_handler > 0) -+ g_source_remove (private->timeout_handler); -+ -+ private->timeout_handler = g_timeout_add (1000, cpufreq_monitor_sysctl_get, (gpointer) monitor); -+} -+ -+static void -+free_string (gpointer str, gpointer gdata) -+{ -+ if (str) g_free (str); -+} -+ +static GList * +cpufreq_monitor_sysctl_get_available_frequencies (CPUFreqMonitor *monitor) +{ -+ CPUFreqMonitorProtected *private; + gchar *levels_oid, *levels; + gchar **levelsp, **l; ++ GList *list = NULL; + gint mib[4]; ++ guint mon_cpu; + size_t len; + -+ g_return_val_if_fail (IS_CPUFREQ_MONITOR_SYSCTL (monitor), NULL); -+ -+ private = CPUFREQ_MONITOR_GET_PROTECTED (CPUFREQ_MONITOR (monitor)); -+ -+ if (private->available_freqs) { -+ g_list_foreach (private->available_freqs, -+ free_string, NULL); -+ g_list_free (private->available_freqs); -+ private->available_freqs = NULL; -+ } ++ g_object_get (G_OBJECT (monitor), "cpu", &mon_cpu, NULL); + + levels_oid = g_strdup_printf ("dev.cpu.%d.freq_levels", -+ private->cpu); ++ mon_cpu); + len = 4; + sysctlnametomib (levels_oid, mib, &len); + len = sizeof (levels); @@ -295,7 +342,7 @@ + levels = g_malloc (len); + if (sysctl (mib, 4, levels, &len, NULL, 0) == -1) + return NULL; -+ ++ + levelsp = g_strsplit (levels, " ", 0); + g_free (levels); + @@ -310,219 +357,71 @@ + * mW. + */ + int freq = atoi (frpr[0]); -+ private->available_freqs = -+ g_list_append (private->available_freqs, g_strdup_printf ("%d", freq * 1000)); ++ list = ++ g_list_append (list, g_strdup_printf ("%d", freq * 1000)); + } + g_strfreev (frpr); + } + + g_strfreev (levelsp); + -+ return private->available_freqs; ++ return (list); +} +#endif /* __FreeBSD__ */ ---- cpufreq/src/cpufreq-monitor-factory.c.orig Thu Apr 14 12:11:06 2005 -+++ cpufreq/src/cpufreq-monitor-factory.c Sun Jul 3 17:09:15 2005 -@@ -17,13 +17,21 @@ +--- cpufreq/src/cpufreq-monitor-factory.c.orig Sat Jun 17 06:28:02 2006 ++++ cpufreq/src/cpufreq-monitor-factory.c Sat Jun 24 01:45:54 2006 +@@ -17,6 +17,7 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * Authors : Carlos García Campos <carlosgc@gnome.org> + * Joe Marcus Clarke <marcus@FreeBSD.org> */ + #ifdef HAVE_CONFIG_H +@@ -25,11 +26,18 @@ + #include <glib.h> + #include <glib/gi18n.h> +#ifdef __FreeBSD__ +#include <sys/types.h> +#include <sys/sysctl.h> +#endif /* __FreeBSD__ */ #include "cpufreq-applet.h" + #include "cpufreq-utils.h" #include "cpufreq-monitor-sysfs.h" #include "cpufreq-monitor-procfs.h" +#ifdef __FreeBSD__ +#include "cpufreq-monitor-sysctl.h" +#endif /* __FreeBSD__ */ #include "cpufreq-monitor-cpuinfo.h" - #include "cpufreq-monitor-factory.h" - -@@ -31,6 +39,7 @@ CPUFreqMonitor * + #ifdef HAVE_LIBCPUFREQ + #include "cpufreq-monitor-libcpufreq.h" +@@ -40,6 +48,7 @@ CPUFreqMonitor * cpufreq_monitor_factory_create_monitor (guint cpu) { CPUFreqMonitor *monitor = NULL; +#ifndef __FreeBSD__ - if (g_file_test ("/sys/devices/system/cpu/cpu0/cpufreq", G_FILE_TEST_EXISTS)) { /* 2.6 kernel */ - monitor = cpufreq_monitor_sysfs_new (cpu); -@@ -49,6 +58,20 @@ cpufreq_monitor_factory_create_monitor ( - - monitor = cpufreq_monitor_cpuinfo_new (cpu); + #ifdef HAVE_LIBCPUFREQ + monitor = cpufreq_monitor_libcpufreq_new (cpu); +@@ -63,6 +72,19 @@ cpufreq_monitor_factory_create_monitor ( + + monitor = cpufreq_monitor_cpuinfo_new (cpu); } +#else + size_t len; + + if (sysctlbyname ("dev.cpu.0.freq", NULL, &len, NULL, 0) == 0) { -+ monitor = cpufreq_monitor_sysctl_new (cpu); ++ monitor = cpufreq_monitor_sysctl_new (cpu); + } else { -+ cpufreq_applet_display_error (_("CPU frequency scaling unsupported"), -+ _("You will not be able to modify the frequency of your machine. " -+ "Your machine may be misconfigured or not have hardware support " -+ "for CPU frequency scaling.")); -+ -+ monitor = cpufreq_monitor_cpuinfo_new (cpu); ++ cpufreq_utils_display_error (_("CPU frequency scaling unsupported"), ++ _("You will not be able to modify the frequency of your machine. " ++ "Your machine may be misconfigured or not have hardware support " ++ "for CPU frequency scaling.")); ++ monitor = cpufreq_monitor_cpuinfo_new (cpu); + } +#endif /* __FreeBSD__ */ - + return monitor; } ---- cpufreq/src/cpufreq-monitor-cpuinfo.c.orig Thu Apr 14 12:11:06 2005 -+++ cpufreq/src/cpufreq-monitor-cpuinfo.c Sun Jul 3 17:07:16 2005 -@@ -23,6 +23,10 @@ - #include <glib/gi18n.h> - #include <libgnomevfs/gnome-vfs.h> - -+#ifdef __FreeBSD__ -+#include <sys/types.h> -+#include <sys/sysctl.h> -+#endif /* __FreeBSD__ */ - #include <string.h> - #include <stdio.h> - -@@ -104,6 +108,7 @@ cpufreq_monitor_cpuinfo_new (guint cpu) - static gboolean - cpufreq_monitor_cpuinfo_get (gpointer gdata) - { -+#ifndef __FreeBSD__ - GnomeVFSHandle *handle; - GnomeVFSFileSize bytes_read; - GnomeVFSResult result; -@@ -111,6 +116,9 @@ cpufreq_monitor_cpuinfo_get (gpointer gd - gchar **lines; - gchar buffer[256]; - gchar *p; -+#else -+ size_t len; -+#endif /* __FreeBSD__ */ - gchar *freq, *perc, *unit, *governor; - gint cpu, i; - CPUFreqMonitorCPUInfo *monitor; -@@ -120,6 +128,7 @@ cpufreq_monitor_cpuinfo_get (gpointer gd - - private = CPUFREQ_MONITOR_GET_PROTECTED (CPUFREQ_MONITOR (monitor)); - -+#ifndef __FreeBSD__ - uri = gnome_vfs_get_uri_from_local_path ("/proc/cpuinfo"); - - result = gnome_vfs_open (&handle, uri, GNOME_VFS_OPEN_READ); -@@ -180,6 +189,12 @@ cpufreq_monitor_cpuinfo_get (gpointer gd - - g_strfreev (lines); - g_free (file); -+#else -+ len = sizeof (cpu); -+ -+ if (sysctlbyname ("hw.clockrate", &cpu, &len, NULL, 0) == -1) -+ return FALSE; -+#endif /* __FreeBSD__ */ - - governor = g_strdup (_("Frequency Scaling Unsupported")); - freq = parent_class->get_human_readable_freq (cpu * 1000); /* kHz are expected*/ ---- cpufreq/src/cpufreq-applet.c.orig Thu Apr 14 12:11:06 2005 -+++ cpufreq/src/cpufreq-applet.c Sun Jul 3 17:28:43 2005 -@@ -17,6 +17,7 @@ - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Authors : Carlos García Campos <carlosgc@gnome.org> -+ * Joe Marcus Clarke <marcus@FreeBSD.org> - */ - - #include <config.h> -@@ -26,6 +27,10 @@ - #include <panel-applet-gconf.h> - #include <glade/glade.h> - #include <glib/gi18n.h> -+#ifdef __FreeBSD__ -+#include <sys/types.h> -+#include <sys/sysctl.h> -+#endif /* __FreeBSD__ */ - #include <string.h> - - #include "cpufreq-applet.h" -@@ -193,6 +198,7 @@ cpufreq_applet_about_cb (BonoboUICompone - { - static const gchar *authors[] = { - "Carlos Garcia Campos <carlosgc@gnome.org>", -+ "Joe Marcus Clarke <marcus@FreeBSD.org> (FreeBSD support)", - NULL - }; - static const gchar *documenters[] = { -@@ -233,6 +239,7 @@ static gint - cpufreq_applet_get_max_cpu (void) - { - gint mcpu = -1; -+#ifndef __FreeBSD__ - gchar *file = NULL; - - do { -@@ -242,11 +249,20 @@ cpufreq_applet_get_max_cpu (void) - } while (g_file_test (file, G_FILE_TEST_EXISTS)); - g_free (file); - mcpu --; -+#else -+ size_t len; -+ -+ len = sizeof (mcpu); -+ -+ sysctlbyname ("hw.ncpu", &mcpu, &len, NULL, 0); -+ mcpu --; -+#endif /* __FreeBSD__ */ - - if (mcpu >= 0) - return mcpu; - - mcpu = -1; -+#ifndef __FreeBSD__ - file = NULL; - do { - if (file) g_free (file); -@@ -255,6 +271,7 @@ cpufreq_applet_get_max_cpu (void) - } while (g_file_test (file, G_FILE_TEST_EXISTS)); - g_free (file); - mcpu --; -+#endif - - if (mcpu >= 0) - return mcpu; ---- cpufreq/src/Makefile.in.orig Tue Oct 4 00:11:26 2005 -+++ cpufreq/src/Makefile.in Tue Oct 4 00:20:37 2005 -@@ -57,6 +57,7 @@ - cpufreq-prefs.$(OBJEXT) cpufreq-popup.$(OBJEXT) \ - cpufreq-monitor.$(OBJEXT) cpufreq-monitor-factory.$(OBJEXT) \ - cpufreq-monitor-procfs.$(OBJEXT) \ -+ cpufreq-monitor-sysctl.$(OBJEXT) \ - cpufreq-monitor-sysfs.$(OBJEXT) \ - cpufreq-monitor-cpuinfo.$(OBJEXT) - cpufreq_applet_OBJECTS = $(am_cpufreq_applet_OBJECTS) -@@ -71,6 +72,7 @@ - @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-monitor-factory.Po \ - @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-monitor-procfs.Po \ - @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-monitor-sysfs.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-monitor-sysctl.Po \ - @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-monitor.Po \ - @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-popup.Po \ - @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-prefs.Po -@@ -358,6 +360,7 @@ - cpufreq-monitor-protected.h \ - cpufreq-monitor-factory.c cpufreq-monitor-factory.h \ - cpufreq-monitor-procfs.c cpufreq-monitor-procfs.h \ -+ cpufreq-monitor-sysctl.c cpufreq-monitor-sysctl.h \ - cpufreq-monitor-sysfs.c cpufreq-monitor-sysfs.h \ - cpufreq-monitor-cpuinfo.c cpufreq-monitor-cpuinfo.h - -@@ -441,6 +444,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor-cpuinfo.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor-factory.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor-procfs.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor-sysctl.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor-sysfs.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-popup.Po@am__quote@ diff --git a/x11/gnome-applets/files/patch-cpufreq-selector-freebsd b/x11/gnome-applets/files/patch-cpufreq-selector-freebsd index d25df35e2..75d4af0ac 100644 --- a/x11/gnome-applets/files/patch-cpufreq-selector-freebsd +++ b/x11/gnome-applets/files/patch-cpufreq-selector-freebsd @@ -1,60 +1,50 @@ ---- cpufreq/src/cpufreq-selector/cpufreq-sysctl.h.orig Mon Feb 14 00:38:57 2005 -+++ cpufreq/src/cpufreq-selector/cpufreq-sysctl.h Mon Feb 14 00:21:39 2005 -@@ -0,0 +1,51 @@ -+/* -+ * Copyright (C) 2001, 2002 Free Software Foundation -+ * -+ * This library 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 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 -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public -+ * License along with this library; if not, write to the Free -+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ * Authors : Joe Marcus Clarke <marcus@FreeBSD.org> -+ */ -+ -+#ifndef __CPUFREQ_SYSCTL_H__ -+#define __CPUFREQ_SYSCTL_H__ -+ -+#include <glib-object.h> -+ -+#include "cpufreq.h" -+ -+#define TYPE_CPUFREQ_SYSCTL (cpufreq_sysctl_get_type ()) -+#define CPUFREQ_SYSCTL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CPUFREQ_SYSCTL, CPUFreqSysctl)) -+#define CPUFREQ_SYSCTL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_CPUFREQ_SYSCTL, CPUFreqSysctlClass)) -+#define IS_CPUFREQ_SYSCTL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CPUFREQ_SYSCTL)) -+#define IS_CPUFREQ_SYSCTL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CPUFREQ_SYSCTL)) -+#define CPUFREQ_SYSCTL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CPUFREQ_SYSCTL, CPUFreqSysctlClass)) -+ -+typedef struct _CPUFreqSysctl CPUFreqSysctl; -+typedef struct _CPUFreqSysctlClass CPUFreqSysctlClass; -+typedef struct _CPUFreqSysctlPriv CPUFreqSysctlPriv; -+ -+struct _CPUFreqSysctl { -+ CPUFreq parent; -+}; -+ -+struct _CPUFreqSysctlClass { -+ CPUFreqClass parent_class; -+}; -+ -+ -+GType cpufreq_sysctl_get_type (); -+CPUFreqSysctl *cpufreq_sysctl_new (); -+ -+#endif /* __CPUFREQ_SYSCTL_H__ */ ---- cpufreq/src/cpufreq-selector/cpufreq-sysctl.c.orig Mon Feb 14 00:38:52 2005 -+++ cpufreq/src/cpufreq-selector/cpufreq-sysctl.c Mon Feb 14 00:44:43 2005 -@@ -0,0 +1,235 @@ +--- cpufreq/src/cpufreq-selector/Makefile.in.orig Sat Jun 24 01:52:35 2006 ++++ cpufreq/src/cpufreq-selector/Makefile.in Sat Jun 24 02:14:08 2006 +@@ -58,13 +58,15 @@ am__cpufreq_selector_SOURCES_DIST = cpuf + cpufreq-selector.h cpufreq-selector-sysfs.c \ + cpufreq-selector-sysfs.h cpufreq-selector-procfs.c \ + cpufreq-selector-procfs.h cpufreq-selector-libcpufreq.c \ +- cpufreq-selector-libcpufreq.h main.c ++ cpufreq-selector-libcpufreq.h main.c \ ++ cpufreq-selector-sysctl.c cpufreq-selector-sysctl.h + @HAVE_LIBCPUFREQ_TRUE@am__objects_1 = \ + @HAVE_LIBCPUFREQ_TRUE@ cpufreq-selector-libcpufreq.$(OBJEXT) + am_cpufreq_selector_OBJECTS = cpufreq-selector.$(OBJEXT) \ + cpufreq-selector-sysfs.$(OBJEXT) \ + cpufreq-selector-procfs.$(OBJEXT) $(am__objects_1) \ +- main.$(OBJEXT) ++ main.$(OBJEXT) \ ++ cpufreq-selector-sysctl.$(OBJEXT) + cpufreq_selector_OBJECTS = $(am_cpufreq_selector_OBJECTS) + am__DEPENDENCIES_1 = + cpufreq_selector_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@@ -74,6 +76,7 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/cpufreq-selector-libcpufreq.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-selector-procfs.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-selector-sysctl.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-selector-sysfs.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-selector.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/main.Po +@@ -371,6 +374,7 @@ cpufreq_selector_SOURCES = \ + cpufreq-selector.c cpufreq-selector.h \ + cpufreq-selector-sysfs.c cpufreq-selector-sysfs.h \ + cpufreq-selector-procfs.c cpufreq-selector-procfs.h \ ++ cpufreq-selector-sysctl.c cpufreq-selector-sysctl.h \ + $(cpufreq_files) \ + main.c + +@@ -451,6 +455,7 @@ distclean-compile: + + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-selector-libcpufreq.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-selector-procfs.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-selector-sysctl.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-selector-sysfs.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-selector.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ +--- cpufreq/src/cpufreq-selector/cpufreq-selector-sysctl.c.orig Sat Jun 24 01:52:35 2006 ++++ cpufreq/src/cpufreq-selector/cpufreq-selector-sysctl.c Sat Jun 24 02:09:38 2006 +@@ -0,0 +1,90 @@ +/* + * Copyright (C) 2001, 2002 Free Software Foundation + * @@ -84,214 +74,125 @@ +#include <sys/sysctl.h> +#endif /* __FreeBSD__ */ + -+#include "cpufreq-sysctl.h" -+ -+#define PARENT_TYPE TYPE_CPUFREQ -+ -+#define CPUFREQ_SYSCTL_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), TYPE_CPUFREQ_SYSCTL, CPUFreqSysctlPrivate)) ++#include "cpufreq-selector-sysctl.h" + -+static void cpufreq_sysctl_init (CPUFreqSysctl *cfq); -+static void cpufreq_sysctl_class_init (CPUFreqSysctlClass *klass); -+static void cpufreq_sysctl_finalize (GObject *object); ++static void cpufreq_selector_sysctl_init (CPUFreqSelectorSysctl *selector); ++static void cpufreq_selector_sysctl_class_init (CPUFreqSelectorSysctlClass *klass); + -+static void cpufreq_sysctl_set_governor (CPUFreq *cfq, const gchar *governor); -+static void cpufreq_sysctl_set_frequency (CPUFreq *cfq, gint frequency); ++static gboolean cpufreq_selector_sysctl_set_frequency (CPUFreqSelector *selector, guint frequency, GError **error); ++static gboolean cpufreq_selector_sysctl_set_governor (CPUFreqSelector *selector, const gchar *governor, GError **error); + -+static void cpufreq_sysctl_setup (CPUFreqSysctl *cfq); -+ -+static GObjectClass *parent_class = NULL; -+ -+typedef struct _CPUFreqSysctlPrivate CPUFreqSysctlPrivate; -+ -+struct _CPUFreqSysctlPrivate -+{ -+ gint pmax; -+}; -+ -+GType cpufreq_sysctl_get_type () -+{ -+ static GType type = 0; -+ -+ if (!type) { -+ static const GTypeInfo info = { -+ sizeof (CPUFreqSysctlClass), -+ (GBaseInitFunc) NULL, -+ (GBaseFinalizeFunc) NULL, -+ (GClassInitFunc) cpufreq_sysctl_class_init, -+ NULL, -+ NULL, -+ sizeof (CPUFreqSysctl), -+ 0, -+ (GInstanceInitFunc) cpufreq_sysctl_init -+ }; -+ -+ type = g_type_register_static (PARENT_TYPE, "CPUFreqSysctl", -+ &info, 0); -+ } -+ -+ return type; -+} ++G_DEFINE_TYPE (CPUFreqSelectorSysctl, cpufreq_selector_sysctl, CPUFREQ_TYPE_SELECTOR) + +static void -+cpufreq_sysctl_init (CPUFreqSysctl *cfq) ++cpufreq_selector_sysctl_init (CPUFreqSelectorSysctl *selector) +{ -+ CPUFreqSysctlPrivate *private; -+ -+ g_return_if_fail (IS_CPUFREQ_SYSCTL (cfq)); -+ -+ private = CPUFREQ_SYSCTL_GET_PRIVATE (cfq); +} + +static void -+cpufreq_sysctl_class_init (CPUFreqSysctlClass *klass) ++cpufreq_selector_sysctl_class_init (CPUFreqSelectorSysctlClass *klass) +{ -+ GObjectClass *object_class = G_OBJECT_CLASS (klass); -+ CPUFreqClass *cfq_class = CPUFREQ_CLASS (klass); -+ -+ parent_class = g_type_class_peek_parent (klass); ++ CPUFreqSelectorClass *selector_class = CPUFREQ_SELECTOR_CLASS (klass); + -+ g_type_class_add_private (klass, sizeof (CPUFreqSysctlPrivate)); -+ -+ cfq_class->set_governor = cpufreq_sysctl_set_governor; -+ cfq_class->set_frequency = cpufreq_sysctl_set_frequency; -+ -+ object_class->finalize = cpufreq_sysctl_finalize; ++ selector_class->set_frequency = cpufreq_selector_sysctl_set_frequency; ++ selector_class->set_governor = cpufreq_selector_sysctl_set_governor; +} + -+static void -+cpufreq_sysctl_finalize (GObject *object) ++CPUFreqSelector * ++cpufreq_selector_sysctl_new (guint cpu) +{ -+ if (G_OBJECT_CLASS (parent_class)->finalize) -+ (* G_OBJECT_CLASS (parent_class)->finalize) (object); -+} -+ -+CPUFreqSysctl * -+cpufreq_sysctl_new () -+{ -+ CPUFreqSysctl *cfq; -+ -+ cfq = g_object_new (TYPE_CPUFREQ_SYSCTL, NULL); ++ CPUFreqSelector *selector; + -+ cpufreq_sysctl_setup (cfq); ++ selector = CPUFREQ_SELECTOR (g_object_new (CPUFREQ_TYPE_SELECTOR_SYSCTL, ++ "cpu", cpu, NULL)); + -+ return cfq; ++ return selector; +} + -+static void -+cpufreq_sysctl_set_governor (CPUFreq *cfq, const gchar *governor) ++static gboolean ++cpufreq_selector_sysctl_set_governor (CPUFreqSelector *selector, const gchar *governor, GError **error) +{ -+ /* Not implemented. */ ++ return TRUE; +} + -+static void -+cpufreq_sysctl_set_frequency (CPUFreq *cfq, gint frequency) ++static gboolean ++cpufreq_selector_sysctl_set_frequency (CPUFreqSelector *selector, guint frequency, GError **error) +{ -+ gint cpu, i; ++ guint cpu, i; + size_t len; + gchar *freq_oid; + -+ g_return_if_fail (IS_CPUFREQ_SYSCTL (cfq)); ++ g_object_get (G_OBJECT (selector), "cpu", &cpu, NULL); + -+ g_object_get (G_OBJECT (cfq), "n_cpu", &cpu, NULL); -+ -+ frequency = (gint) ((gdouble) frequency / 1000); /* Convert back to MHz*/ ++ frequency = (guint) ((gdouble) frequency / 1000); /* Convert back to MHz*/ + + for (i = 0; i < cpu; i++) { -+ freq_oid = g_strdup_printf ("dev.cpu.%d.freq", i); ++ freq_oid = g_strdup_printf ("dev.cpu.%d.freq", (gint) i); + + sysctlbyname (freq_oid, NULL, &len, &frequency, sizeof (frequency)); + g_free (freq_oid); + } -+} -+ -+ -+static void -+cpufreq_sysctl_setup (CPUFreqSysctl *cfq) -+{ -+ guint cpu; -+ gint fmax, fmin; -+ gint pmax; -+ gint ifreq; -+ gint mib[4]; -+ gchar *governor, *levels; -+ gchar **levelsp, **frpr, **l; -+ size_t len; -+ CPUFreqSysctlPrivate *private; -+ -+ g_return_if_fail (IS_CPUFREQ_SYSCTL (cfq)); -+ -+ private = CPUFREQ_SYSCTL_GET_PRIVATE (cfq); -+ -+ pmax = 100; -+ fmax = 0; -+ fmin = 0; -+ ifreq = 0; + -+ private->pmax = pmax; -+ -+ len = sizeof (cpu); ++ return TRUE; ++} +--- cpufreq/src/cpufreq-selector/cpufreq-selector-sysctl.h.orig Sat Jun 24 01:52:35 2006 ++++ cpufreq/src/cpufreq-selector/cpufreq-selector-sysctl.h Sat Jun 24 02:13:05 2006 +@@ -0,0 +1,53 @@ ++/* ++ * Copyright (C) 2001, 2002 Free Software Foundation ++ * ++ * This library 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 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 ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public ++ * License along with this library; if not, write to the Free ++ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * Authors : Joe Marcus Clarke <marcus@FreeBSD.org> ++ */ + -+ if (sysctlbyname ("hw.ncpu", &cpu, &len, NULL, 0) == -1) -+ cpu = 1; -+ -+ len = 4; -+ sysctlnametomib ("dev.cpu.0.freq_levels", mib, &len); -+ len = sizeof (levels); ++#ifndef __CPUFREQ_SELECTOR_SYSCTL_H__ ++#define __CPUFREQ_SELECTOR_SYSCTL_H__ + -+ if (sysctl (mib, 4, NULL, &len, NULL, 0) == -1) { -+ g_warning ("Failed to fetch dev.cpu.0.freq_levels"); -+ return; -+ } ++#include <glib-object.h> + -+ levels = g_malloc (len); -+ if (sysctl (mib, 4, levels, &len, NULL, 0) == -1) { -+ g_warning ("Failed to fetch data for dev.cpu.0.freq_levels"); -+ return; -+ } ++#include "cpufreq-selector.h" + -+ levelsp = g_strsplit (levels, " ", 0); -+ g_free (levels); ++G_BEGIN_DECLS + -+ frpr = g_strsplit (levelsp[0], "/", 0); /* MAX */ -+ if (frpr && frpr[0] != NULL) -+ fmax = atoi (frpr[0]); -+ g_strfreev (frpr); ++#define CPUFREQ_TYPE_SELECTOR_SYSCTL (cpufreq_selector_sysctl_get_type ()) ++#define CPUFREQ_SELECTOR_SYSCTL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CPUFREQ_TYPE_SELECTOR_SYSCTL, CPUFreqSelectorProcfs)) ++#define CPUFREQ_SELECTOR_SYSCTL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), CPUFREQ_TYPE_SELECTOR_SYSCTL, CPUFreqSelectorProcfsClass)) ++#define CPUFREQ_IS_SELECTOR_SYSCTL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CPUFREQ_TYPE_SELECTOR_SYSCTL)) ++#define CPUFREQ_IS_SELECTOR_SYSCTL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CPUFREQ_TYPE_SELECTOR_SYSCTL)) ++#define CPUFREQ_SELECTOR_SYSCTL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CPUFREQ_TYPE_SELECTOR_SYSCTL, CPUFreqSelectorProcfsClass)) + -+ for (l = levelsp; l && *l; l++) /* Walk to the last frequency */ -+ ; ++typedef struct _CPUFreqSelectorSysctl CPUFreqSelectorSysctl; ++typedef struct _CPUFreqSelectorSysctlClass CPUFreqSelectorSysctlClass; + -+ l --; -+ frpr = g_strsplit (*l, "/", 0); -+ if (frpr && frpr[0] != NULL) -+ fmin = atoi (frpr[0]); -+ -+ g_strfreev (frpr); -+ g_strfreev (levelsp); ++struct _CPUFreqSelectorSysctl { ++ CPUFreqSelector parent; ++}; + -+ len = sizeof (ifreq); -+ if (sysctlbyname ("dev.cpu.0.freq", &ifreq, &len, NULL, 0) == -1) { -+ g_warning ("Failed to fetch data for dev.cpu.0.freq"); -+ return; -+ } ++struct _CPUFreqSelectorSysctlClass { ++ CPUFreqSelectorClass parent_class; ++}; + -+ if (ifreq == fmax) -+ governor = g_strdup ("performance"); -+ else if (ifreq == fmin) -+ governor = g_strdup ("economy"); -+ else -+ governor = g_strdup ("other"); -+ -+ fmax *= 1000; -+ fmin *= 1000; ++GType cpufreq_selector_sysctl_get_type (void) G_GNUC_CONST; ++CPUFreqSelector *cpufreq_selector_sysctl_new (guint cpu); + -+ g_object_set (G_OBJECT (cfq), "n_cpu", cpu, -+ "sc_max", fmax, "sc_min", fmin, -+ "governor", governor, NULL); ++G_END_DECLS + -+ g_free (governor); -+} ---- cpufreq/src/cpufreq-selector/main.c.orig Sun Apr 3 12:03:13 2005 -+++ cpufreq/src/cpufreq-selector/main.c Sun Jul 3 17:16:19 2005 ++#endif /* __CPUFREQ_SELECTOR_SYSCTL_H__ */ +--- cpufreq/src/cpufreq-selector/main.c.orig Sat Jun 17 22:13:41 2006 ++++ cpufreq/src/cpufreq-selector/main.c Sat Jun 24 02:15:02 2006 @@ -17,6 +17,7 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * @@ -299,75 +200,40 @@ + * Joe Marcus Clarke <marcus@FreeBSD.org> */ - #include <glib-object.h> -@@ -26,6 +27,9 @@ - #include "cpufreq.h" - #include "cpufreq-sysfs.h" - #include "cpufreq-procfs.h" + #ifdef HAVE_CONFIG_H +@@ -33,6 +34,9 @@ + #ifdef HAVE_LIBCPUFREQ + #include "cpufreq-selector-libcpufreq.h" + #endif +#ifdef __FreeBSD__ -+#include "cpufreq-sysctl.h" ++#include "cpufreq-selector-sysctl.h" +#endif /* __FreeBSD__ */ - gint - main (gint argc, gchar **argv) -@@ -34,6 +38,9 @@ main (gint argc, gchar **argv) - static gint cpu = 0; - static gchar *governor = NULL; - static gulong frequency = 0; + static gint cpu = 0; + static gchar *governor = NULL; +@@ -51,6 +55,9 @@ main (gint argc, gchar **argv) + CPUFreqSelector *selector; + GOptionContext *context; + GError *error = NULL; +#ifdef __FreeBSD__ -+ size_t len; -+#endif /* __FreeBSD__ */ - GError *error = NULL; - CPUFreq *cfq; ++ size_t len; ++#endif -@@ -71,10 +78,15 @@ main (gint argc, gchar **argv) - - g_option_context_free (context); - + if (geteuid () != 0) { + g_printerr ("You must be root\n"); +@@ -83,10 +90,15 @@ main (gint argc, gchar **argv) + #ifdef HAVE_LIBCPUFREQ + selector = cpufreq_selector_libcpufreq_new (cpu); + #else +#ifndef __FreeBSD__ - if (g_file_test ("/sys/devices/system/cpu/cpu0/cpufreq", G_FILE_TEST_EXISTS)) { /* 2.6 kernel */ - cfq = CPUFREQ (cpufreq_sysfs_new ()); - } else if (g_file_test ("/proc/cpufreq", G_FILE_TEST_EXISTS)) { /* 2.4 kernel */ - cfq = CPUFREQ (cpufreq_procfs_new ()); + if (g_file_test ("/sys/devices/system/cpu/cpu0/cpufreq", G_FILE_TEST_EXISTS)) { /* 2.6 kernel */ + selector = cpufreq_selector_sysfs_new (cpu); + } else if (g_file_test ("/proc/cpufreq", G_FILE_TEST_EXISTS)) { /* 2.4 kernel */ + selector = cpufreq_selector_procfs_new (cpu); +#else + if (sysctlbyname ("dev.cpu.0.freq", NULL, &len, NULL, 0) == 0) { -+ cfq = CPUFREQ (cpufreq_sysctl_new ()); ++ selector = cpufreq_selector_sysctl_new (cpu); +#endif /* __FreeBSD__ */ - } else { - g_print ("No cpufreq support\n"); - return 1; ---- cpufreq/src/cpufreq-selector/Makefile.in.orig Tue Oct 4 00:21:25 2005 -+++ cpufreq/src/cpufreq-selector/Makefile.in Tue Oct 4 00:27:54 2005 -@@ -55,7 +55,7 @@ - PROGRAMS = $(bin_PROGRAMS) - am_cpufreq_selector_OBJECTS = cpufreq.$(OBJEXT) \ - cpufreq-sysfs.$(OBJEXT) cpufreq-procfs.$(OBJEXT) \ -- main.$(OBJEXT) -+ cpufreq-sysctl.$(OBJEXT) main.$(OBJEXT) - cpufreq_selector_OBJECTS = $(am_cpufreq_selector_OBJECTS) - am__DEPENDENCIES_1 = - cpufreq_selector_DEPENDENCIES = $(am__DEPENDENCIES_1) -@@ -64,6 +64,7 @@ - am__depfiles_maybe = depfiles - @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/cpufreq-procfs.Po \ - @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-sysfs.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/cpufreq-sysctl.Po \ - @AMDEP_TRUE@ ./$(DEPDIR)/cpufreq.Po ./$(DEPDIR)/main.Po - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@@ -332,6 +333,7 @@ - cpufreq.c cpufreq.h \ - cpufreq-sysfs.c cpufreq-sysfs.h \ - cpufreq-procfs.c cpufreq-procfs.h \ -+ cpufreq-sysctl.c cpufreq-sysctl.h \ - main.c - - cpufreq_selector_LDADD = $(CPUFREQ_SELECTOR_LIBS) -lpopt -@@ -407,6 +409,7 @@ - -rm -f *.tab.c - - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-procfs.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-sysctl.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-sysfs.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ + } else { + g_printerr ("No cpufreq support\n"); + return 1; diff --git a/x11/gnome-applets/files/patch-gswitchit b/x11/gnome-applets/files/patch-gswitchit deleted file mode 100644 index fcf3f64eb..000000000 --- a/x11/gnome-applets/files/patch-gswitchit +++ /dev/null @@ -1,2915 +0,0 @@ -diff -u libgswitchit-/ChangeLog libgswitchit/ChangeLog ---- libgswitchit-/ChangeLog 2006-01-03 07:38:59.000000000 -0500 -+++ libgswitchit/ChangeLog 2006-05-26 20:19:52.000000000 -0400 -@@ -1,3 +1,20 @@ -+2006-05-27 Sergey Udaltsov <svu@gnome.org> -+ -+ * gswitchit_config.[ch]: optimizing dealing with UTF8 descriptions - -+ changed GSList to NULL-terminated gchar ** -+ -+2006-04-22 Sergey Udaltsov <svu@gnome.org> -+ -+ * gswitchit_config.[ch]: save/load preview window coords -+ -+2006-04-20 Sergey Udaltsov <svu@gnome.org> -+ -+ * gswitchit_config.c: added kbd config ToString function -+ -+2006-04-20 Sergey Udaltsov <svu@gnome.org> -+ -+ * *.c,*.h: update for new libxklavier API -+ - 2006-01-03 Kristof Vansant <de_lupus@pandora.be> - - Fixes #171668 -Only in libgswitchit: .ChangeLog.swp -diff -u libgswitchit-/gswitchit_config.c libgswitchit/gswitchit_config.c ---- libgswitchit-/gswitchit_config.c 2006-01-30 05:48:20.000000000 -0500 -+++ libgswitchit/gswitchit_config.c 2006-05-26 20:19:52.000000000 -0400 -@@ -25,8 +25,6 @@ - #include <gdk/gdkx.h> - #include <libgnome/gnome-program.h> - --#include <libxklavier/xklavier_config.h> -- - #include "gswitchit_config.h" - #include "gswitchit_config_private.h" - -@@ -37,27 +35,41 @@ - - #define GSWITCHIT_CONFIG_KEY_PREFIX KEYBOARD_CONFIG_KEY_PREFIX "/general" - --const char GSWITCHIT_CONFIG_DIR[] = GSWITCHIT_CONFIG_KEY_PREFIX; --const char GSWITCHIT_CONFIG_KEY_DEFAULT_GROUP[] = -+const gchar GSWITCHIT_CONFIG_DIR[] = GSWITCHIT_CONFIG_KEY_PREFIX; -+const gchar GSWITCHIT_CONFIG_KEY_DEFAULT_GROUP[] = - GSWITCHIT_CONFIG_KEY_PREFIX "/defaultGroup"; --const char GSWITCHIT_CONFIG_KEY_GROUP_PER_WINDOW[] = -+const gchar GSWITCHIT_CONFIG_KEY_GROUP_PER_WINDOW[] = - GSWITCHIT_CONFIG_KEY_PREFIX "/groupPerWindow"; --const char GSWITCHIT_CONFIG_KEY_HANDLE_INDICATORS[] = -+const gchar GSWITCHIT_CONFIG_KEY_HANDLE_INDICATORS[] = - GSWITCHIT_CONFIG_KEY_PREFIX "/handleIndicators"; --const char GSWITCHIT_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[] -+const gchar GSWITCHIT_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[] - = GSWITCHIT_CONFIG_KEY_PREFIX "/layoutNamesAsGroupNames"; - -+#define GSWITCHIT_PREVIEW_CONFIG_KEY_PREFIX "/apps/gswitchit/preview" -+ -+const gchar GSWITCHIT_PREVIEW_CONFIG_DIR[] = -+ GSWITCHIT_PREVIEW_CONFIG_KEY_PREFIX; -+const gchar GSWITCHIT_PREVIEW_CONFIG_KEY_X[] = -+ GSWITCHIT_PREVIEW_CONFIG_KEY_PREFIX "/x"; -+const gchar GSWITCHIT_PREVIEW_CONFIG_KEY_Y[] = -+ GSWITCHIT_PREVIEW_CONFIG_KEY_PREFIX "/y"; -+const gchar GSWITCHIT_PREVIEW_CONFIG_KEY_WIDTH[] = -+ GSWITCHIT_PREVIEW_CONFIG_KEY_PREFIX "/width"; -+const gchar GSWITCHIT_PREVIEW_CONFIG_KEY_HEIGHT[] = -+ GSWITCHIT_PREVIEW_CONFIG_KEY_PREFIX "/height"; -+ - /** - * GSwitchItAppletConfig - */ - #define GSWITCHIT_APPLET_CONFIG_KEY_PREFIX "/apps/gswitchit/Applet" - --const char GSWITCHIT_APPLET_CONFIG_DIR[] = GSWITCHIT_APPLET_CONFIG_KEY_PREFIX; --const char GSWITCHIT_APPLET_CONFIG_KEY_SHOW_FLAGS[] = -+const gchar GSWITCHIT_APPLET_CONFIG_DIR[] = -+ GSWITCHIT_APPLET_CONFIG_KEY_PREFIX; -+const gchar GSWITCHIT_APPLET_CONFIG_KEY_SHOW_FLAGS[] = - GSWITCHIT_APPLET_CONFIG_KEY_PREFIX "/showFlags"; --const char GSWITCHIT_APPLET_CONFIG_KEY_ENABLED_PLUGINS[] = -+const gchar GSWITCHIT_APPLET_CONFIG_KEY_ENABLED_PLUGINS[] = - GSWITCHIT_APPLET_CONFIG_KEY_PREFIX "/enabledPlugins"; --const char GSWITCHIT_APPLET_CONFIG_KEY_SECONDARIES[] = -+const gchar GSWITCHIT_APPLET_CONFIG_KEY_SECONDARIES[] = - GSWITCHIT_APPLET_CONFIG_KEY_PREFIX "/secondary"; - - /** -@@ -65,15 +77,15 @@ - */ - #define GSWITCHIT_KBD_CONFIG_KEY_PREFIX KEYBOARD_CONFIG_KEY_PREFIX "/kbd" - --const char GSWITCHIT_KBD_CONFIG_DIR[] = GSWITCHIT_KBD_CONFIG_KEY_PREFIX; --const char GSWITCHIT_KBD_CONFIG_KEY_MODEL[] = -+const gchar GSWITCHIT_KBD_CONFIG_DIR[] = GSWITCHIT_KBD_CONFIG_KEY_PREFIX; -+const gchar GSWITCHIT_KBD_CONFIG_KEY_MODEL[] = - GSWITCHIT_KBD_CONFIG_KEY_PREFIX "/model"; --const char GSWITCHIT_KBD_CONFIG_KEY_LAYOUTS[] = -+const gchar GSWITCHIT_KBD_CONFIG_KEY_LAYOUTS[] = - GSWITCHIT_KBD_CONFIG_KEY_PREFIX "/layouts"; --const char GSWITCHIT_KBD_CONFIG_KEY_OPTIONS[] = -+const gchar GSWITCHIT_KBD_CONFIG_KEY_OPTIONS[] = - GSWITCHIT_KBD_CONFIG_KEY_PREFIX "/options"; - --const char *GSWITCHIT_KBD_CONFIG_ACTIVE[] = { -+const gchar *GSWITCHIT_KBD_CONFIG_ACTIVE[] = { - GSWITCHIT_KBD_CONFIG_KEY_MODEL, - GSWITCHIT_KBD_CONFIG_KEY_LAYOUTS, - GSWITCHIT_KBD_CONFIG_KEY_OPTIONS -@@ -81,16 +93,16 @@ - - #define GSWITCHIT_KBD_CONFIG_SYSBACKUP_KEY_PREFIX KEYBOARD_CONFIG_KEY_PREFIX "/kbd.sysbackup" - --const char GSWITCHIT_KBD_CONFIG_SYSBACKUP_DIR[] = -+const gchar GSWITCHIT_KBD_CONFIG_SYSBACKUP_DIR[] = - GSWITCHIT_KBD_CONFIG_SYSBACKUP_KEY_PREFIX; --const char GSWITCHIT_KBD_CONFIG_SYSBACKUP_KEY_MODEL[] = -+const gchar GSWITCHIT_KBD_CONFIG_SYSBACKUP_KEY_MODEL[] = - GSWITCHIT_KBD_CONFIG_SYSBACKUP_KEY_PREFIX "/model"; --const char GSWITCHIT_KBD_CONFIG_SYSBACKUP_KEY_LAYOUTS[] = -+const gchar GSWITCHIT_KBD_CONFIG_SYSBACKUP_KEY_LAYOUTS[] = - GSWITCHIT_KBD_CONFIG_SYSBACKUP_KEY_PREFIX "/layouts"; --const char GSWITCHIT_KBD_CONFIG_SYSBACKUP_KEY_OPTIONS[] = -+const gchar GSWITCHIT_KBD_CONFIG_SYSBACKUP_KEY_OPTIONS[] = - GSWITCHIT_KBD_CONFIG_SYSBACKUP_KEY_PREFIX "/options"; - --const char *GSWITCHIT_KBD_CONFIG_SYSBACKUP[] = { -+const gchar *GSWITCHIT_KBD_CONFIG_SYSBACKUP[] = { - GSWITCHIT_KBD_CONFIG_SYSBACKUP_KEY_MODEL, - GSWITCHIT_KBD_CONFIG_SYSBACKUP_KEY_LAYOUTS, - GSWITCHIT_KBD_CONFIG_SYSBACKUP_KEY_OPTIONS -@@ -111,12 +123,13 @@ - } - - static Bool --_GSwitchItKbdConfigGetDescriptions (const char *layoutName, -- const char *variantName, -- char **layoutShortDescr, -- char **layoutDescr, -- char **variantShortDescr, -- char **variantDescr) -+_GSwitchItKbdConfigGetDescriptions (XklConfigRegistry * configRegistry, -+ const gchar * layoutName, -+ const gchar * variantName, -+ gchar ** layoutShortDescr, -+ gchar ** layoutDescr, -+ gchar ** variantShortDescr, -+ gchar ** variantDescr) - { - static XklConfigItem litem; - static XklConfigItem vitem; -@@ -124,8 +137,8 @@ - layoutName = g_strdup (layoutName); - - g_snprintf (litem.name, sizeof litem.name, "%s", layoutName); -- if (XklConfigFindLayout (&litem)) { -- *layoutShortDescr = litem.shortDescription; -+ if (xkl_config_registry_find_layout (configRegistry, &litem)) { -+ *layoutShortDescr = litem.short_description; - *layoutDescr = litem.description; - } else - *layoutShortDescr = *layoutDescr = NULL; -@@ -134,8 +147,9 @@ - variantName = g_strdup (variantName); - g_snprintf (vitem.name, sizeof vitem.name, "%s", - variantName); -- if (XklConfigFindVariant (layoutName, &vitem)) { -- *variantShortDescr = vitem.shortDescription; -+ if (xkl_config_registry_find_variant -+ (configRegistry, layoutName, &vitem)) { -+ *variantShortDescr = vitem.short_description; - *variantDescr = vitem.description; - } else - *variantShortDescr = *variantDescr = NULL; -@@ -154,14 +168,15 @@ - GConfClientNotifyFunc func, - gpointer userData, int *pid) - { -- GError *err = NULL; -- XklDebug (150, "Listening to [%s]\n", key); -+ GError *gerror = NULL; -+ xkl_debug (150, "Listening to [%s]\n", key); - *pid = gconf_client_notify_add (confClient, -- key, func, userData, NULL, &err); -+ key, func, userData, NULL, -+ &gerror); - if (0 == *pid) { - g_warning ("Error listening for configuration: [%s]\n", -- err->message); -- g_error_free (err); -+ gerror->message); -+ g_error_free (gerror); - } - } - -@@ -177,10 +192,10 @@ - /** - * extern common functions - */ --const char * --GSwitchItKbdConfigMergeItems (const char *parent, const char *child) -+const gchar * -+GSwitchItKbdConfigMergeItems (const gchar * parent, const gchar * child) - { -- static char buffer[XKL_MAX_CI_NAME_LENGTH * 2 - 1]; -+ static gchar buffer[XKL_MAX_CI_NAME_LENGTH * 2 - 1]; - *buffer = '\0'; - if (parent != NULL) { - if (strlen (parent) >= XKL_MAX_CI_NAME_LENGTH) -@@ -197,12 +212,13 @@ - } - - gboolean --GSwitchItKbdConfigSplitItems (const char *merged, char **parent, char **child) -+GSwitchItKbdConfigSplitItems (const gchar * merged, gchar ** parent, -+ gchar ** child) - { -- static char pbuffer[XKL_MAX_CI_NAME_LENGTH]; -- static char cbuffer[XKL_MAX_CI_NAME_LENGTH]; -+ static gchar pbuffer[XKL_MAX_CI_NAME_LENGTH]; -+ static gchar cbuffer[XKL_MAX_CI_NAME_LENGTH]; - int plen, clen; -- const char *pos; -+ const gchar *pos; - *parent = *child = NULL; - - if (merged == NULL) -@@ -270,25 +286,24 @@ - _GSwitchItKbdConfigCopyFromXklConfig (GSwitchItKbdConfig * kbdConfig, - XklConfigRec * pdata) - { -- int i; - char **p, **p1; - GSwitchItKbdConfigModelSet (kbdConfig, pdata->model); -- XklDebug (150, "Loaded Kbd model: [%s]\n", pdata->model); -+ xkl_debug (150, "Loaded Kbd model: [%s]\n", pdata->model); - - GSwitchItKbdConfigLayoutsReset (kbdConfig); - p = pdata->layouts; - p1 = pdata->variants; -- for (i = pdata->numLayouts; --i >= 0;) { -+ while (p != NULL && *p != NULL) { - if (*p1 == NULL || **p1 == '\0') { -- XklDebug (150, "Loaded Kbd layout: [%s]\n", *p); -+ xkl_debug (150, "Loaded Kbd layout: [%s]\n", *p); - _GSwitchItKbdConfigLayoutsAdd (kbdConfig, *p); - } else { - char fullLayout[XKL_MAX_CI_NAME_LENGTH * 2]; - g_snprintf (fullLayout, sizeof (fullLayout), - "%s\t%s", *p, *p1); -- XklDebug (150, -- "Loaded Kbd layout with variant: [%s]\n", -- fullLayout); -+ xkl_debug (150, -+ "Loaded Kbd layout with variant: [%s]\n", -+ fullLayout); - _GSwitchItKbdConfigLayoutsAdd (kbdConfig, - fullLayout); - } -@@ -298,7 +313,7 @@ - - GSwitchItKbdConfigOptionsReset (kbdConfig); - p = pdata->options; -- for (i = pdata->numOptions; --i >= 0;) { -+ while (p != NULL && *p != NULL) { - char group[XKL_MAX_CI_NAME_LENGTH]; - char *option = *p; - char *delim = -@@ -308,8 +323,8 @@ - ((len = (delim - option)) < XKL_MAX_CI_NAME_LENGTH)) { - strncpy (group, option, len); - group[len] = 0; -- XklDebug (150, "Loaded Kbd option: [%s][%s]\n", -- group, option); -+ xkl_debug (150, "Loaded Kbd option: [%s][%s]\n", -+ group, option); - GSwitchItKbdConfigOptionsAdd (kbdConfig, group, - option); - } -@@ -322,63 +337,69 @@ - XklConfigRec * pdata) - { - int i; -+ int numLayouts, numOptions; - pdata->model = -- (kbdConfig->model == NULL) ? NULL : strdup (kbdConfig->model); -+ (kbdConfig->model == -+ NULL) ? NULL : g_strdup (kbdConfig->model); - -- pdata->numLayouts = pdata->numVariants = -+ numLayouts = - (kbdConfig->layouts == - NULL) ? 0 : g_slist_length (kbdConfig->layouts); -- pdata->numOptions = -+ numOptions = - (kbdConfig->options == - NULL) ? 0 : g_slist_length (kbdConfig->options); - -- XklDebug (150, "Taking %d layouts\n", pdata->numLayouts); -- if (pdata->numLayouts != 0) { -+ xkl_debug (150, "Taking %d layouts\n", numLayouts); -+ if (numLayouts != 0) { - GSList *theLayout = kbdConfig->layouts; - char **p1 = pdata->layouts = -- calloc ((sizeof (char *)) * pdata->numLayouts, 1); -+ g_new0 (char *, numLayouts + 1); - char **p2 = pdata->variants = -- calloc ((sizeof (char *)) * pdata->numVariants, 1); -- for (i = pdata->numLayouts; --i >= 0;) { -+ g_new0 (char *, numLayouts + 1); -+ for (i = numLayouts; --i >= 0;) { - char *layout, *variant; - if (GSwitchItKbdConfigSplitItems - (theLayout->data, &layout, &variant) - && variant != NULL) { - *p1 = - (layout == -- NULL) ? NULL : strdup (layout); -+ NULL) ? g_strdup ("") : -+ g_strdup (layout); - *p2 = - (variant == -- NULL) ? NULL : strdup (variant); -+ NULL) ? g_strdup ("") : -+ g_strdup (variant); - } else { - *p1 = - (theLayout->data == -- NULL) ? NULL : strdup (theLayout-> -- data); -- *p2 = NULL; -+ NULL) ? g_strdup ("") : -+ g_strdup (theLayout->data); -+ *p2 = g_strdup (""); - } -- XklDebug (150, "Adding [%s]/%p and [%s]/%p\n", -- *p1 ? *p1 : "(nil)", *p1, -- *p2 ? *p2 : "(nil)", *p2); -+ xkl_debug (150, "Adding [%s]/%p and [%s]/%p\n", -+ *p1 ? *p1 : "(nil)", *p1, -+ *p2 ? *p2 : "(nil)", *p2); - p1++; - p2++; - theLayout = theLayout->next; - } - } - -- if (pdata->numOptions != 0) { -+ if (numOptions != 0) { - GSList *theOption = kbdConfig->options; - char **p = pdata->options = -- calloc ((sizeof (char *)) * pdata->numOptions, 1); -- for (i = pdata->numOptions; --i >= 0;) { -+ g_new0 (char *, numOptions + 1); -+ for (i = numOptions; --i >= 0;) { - char *group, *option; - if (GSwitchItKbdConfigSplitItems - (theOption->data, &group, &option) - && option != NULL) -- *(p++) = strdup (option); -- else -- XklDebug (150, "Could not split [%s]\n", -- theOption->data); -+ *(p++) = g_strdup (option); -+ else { -+ *(p++) = g_strdup (""); -+ xkl_debug (150, "Could not split [%s]\n", -+ theOption->data); -+ } - theOption = theOption->next; - } - } -@@ -404,7 +425,7 @@ - - static void - _GSwitchItKbdConfigLoadParams (GSwitchItKbdConfig * kbdConfig, -- const char *paramNames[]) -+ const gchar * paramNames[]) - { - GError *gerror = NULL; - gchar *pc; -@@ -425,7 +446,8 @@ - GSwitchItKbdConfigModelSet (kbdConfig, pc); - g_free (pc); - } -- XklDebug (150, "Loaded Kbd model: [%s]\n", kbdConfig->model ? kbdConfig->model : "(null)"); -+ xkl_debug (150, "Loaded Kbd model: [%s]\n", -+ kbdConfig->model ? kbdConfig->model : "(null)"); - - GSwitchItKbdConfigLayoutsReset (kbdConfig); - -@@ -442,11 +464,11 @@ - } - - while (pl != NULL) { -- XklDebug (150, "Loaded Kbd layout: [%s]\n", pl->data); -+ xkl_debug (150, "Loaded Kbd layout: [%s]\n", pl->data); - _GSwitchItKbdConfigLayoutsAdd (kbdConfig, pl->data); - pl = pl->next; - } -- _GSwitchItConfigStringListReset(&pl); -+ _GSwitchItConfigStringListReset (&pl); - - GSwitchItKbdConfigOptionsReset (kbdConfig); - -@@ -463,52 +485,58 @@ - } - - while (pl != NULL) { -- XklDebug (150, "Loaded Kbd option: [%s]\n", pl->data); -+ xkl_debug (150, "Loaded Kbd option: [%s]\n", pl->data); - _GSwitchItKbdConfigOptionsAdd (kbdConfig, -- (const char *) pl->data); -+ (const gchar *) pl->data); - pl = pl->next; - } -- _GSwitchItConfigStringListReset(&pl); -+ _GSwitchItConfigStringListReset (&pl); - } - - static void - _GSwitchItKbdConfigSaveParams (GSwitchItKbdConfig * kbdConfig, - GConfChangeSet * cs, -- const char *paramNames[]) -+ const gchar * paramNames[]) - { - GSList *pl; - - if (kbdConfig->model) -- gconf_change_set_set_string (cs, paramNames[0], kbdConfig->model); -+ gconf_change_set_set_string (cs, paramNames[0], -+ kbdConfig->model); - else - gconf_change_set_unset (cs, paramNames[0]); -- XklDebug (150, "Saved Kbd model: [%s]\n", kbdConfig->model ? kbdConfig->model : "(null)"); -+ xkl_debug (150, "Saved Kbd model: [%s]\n", -+ kbdConfig->model ? kbdConfig->model : "(null)"); - - if (kbdConfig->layouts) { - pl = kbdConfig->layouts; - while (pl != NULL) { -- XklDebug (150, "Saved Kbd layout: [%s]\n", pl->data); -+ xkl_debug (150, "Saved Kbd layout: [%s]\n", -+ pl->data); - pl = pl->next; - } - gconf_change_set_set_list (cs, - paramNames[1], -- GCONF_VALUE_STRING, kbdConfig->layouts); -+ GCONF_VALUE_STRING, -+ kbdConfig->layouts); - } else { -- XklDebug (150, "Saved Kbd layouts: []\n"); -+ xkl_debug (150, "Saved Kbd layouts: []\n"); - gconf_change_set_unset (cs, paramNames[1]); - } - - if (kbdConfig->options) { - pl = kbdConfig->options; - while (pl != NULL) { -- XklDebug (150, "Saved Kbd option: [%s]\n", pl->data); -+ xkl_debug (150, "Saved Kbd option: [%s]\n", -+ pl->data); - pl = pl->next; - } - gconf_change_set_set_list (cs, - paramNames[2], -- GCONF_VALUE_STRING, kbdConfig->options); -+ GCONF_VALUE_STRING, -+ kbdConfig->options); - } else { -- XklDebug (150, "Saved Kbd options: []\n"); -+ xkl_debug (150, "Saved Kbd options: []\n"); - gconf_change_set_unset (cs, paramNames[2]); - } - } -@@ -517,13 +545,14 @@ - * extern GSwitchItConfig config functions - */ - void --GSwitchItConfigInit (GSwitchItConfig * config, -- GConfClient * confClient) -+GSwitchItConfigInit (GSwitchItConfig * config, GConfClient * confClient, -+ XklEngine * engine) - { - GError *gerror = NULL; - - memset (config, 0, sizeof (*config)); - config->confClient = confClient; -+ config->engine = engine; - g_object_ref (config->confClient); - - gconf_client_add_dir (config->confClient, -@@ -559,7 +588,7 @@ - g_error_free (gerror); - gerror = NULL; - } -- XklDebug (150, "groupPerApp: %d\n", config->groupPerApp); -+ xkl_debug (150, "groupPerApp: %d\n", config->groupPerApp); - - config->handleIndicators = - gconf_client_get_bool (config->confClient, -@@ -572,7 +601,8 @@ - g_error_free (gerror); - gerror = NULL; - } -- XklDebug (150, "handleIndicators: %d\n", config->handleIndicators); -+ xkl_debug (150, "handleIndicators: %d\n", -+ config->handleIndicators); - - config->layoutNamesAsGroupNames = - gconf_client_get_bool (config->confClient, -@@ -585,7 +615,8 @@ - g_error_free (gerror); - gerror = NULL; - } -- XklDebug (150, "layoutNamesAsGroupNames: %d\n", config->layoutNamesAsGroupNames); -+ xkl_debug (150, "layoutNamesAsGroupNames: %d\n", -+ config->layoutNamesAsGroupNames); - - config->defaultGroup = - gconf_client_get_int (config->confClient, -@@ -600,9 +631,10 @@ - } - - if (config->defaultGroup < -1 -- || config->defaultGroup >= XklGetMaxNumGroups ()) -+ || config->defaultGroup >= -+ xkl_engine_get_max_num_groups (config->engine)) - config->defaultGroup = -1; -- XklDebug (150, "defaultGroup: %d\n", config->defaultGroup); -+ xkl_debug (150, "defaultGroup: %d\n", config->defaultGroup); - } - - void -@@ -642,38 +674,40 @@ - { - gboolean rv = TRUE; - -- XklSetGroupPerApp (config->groupPerApp); -- XklSetIndicatorsHandling (config->handleIndicators); -- XklSetDefaultGroup (config->defaultGroup); -+ xkl_engine_set_group_per_toplevel_window (config->engine, -+ config->groupPerApp); -+ xkl_engine_set_indicators_handling (config->engine, -+ config->handleIndicators); -+ xkl_engine_set_default_group (config->engine, -+ config->defaultGroup); - - return rv; - } - - void --GSwitchItConfigLockNextGroup (void) -+GSwitchItConfigLockNextGroup (GSwitchItConfig * config) - { -- int group = XklGetNextGroup (); -- XklLockGroup (group); -+ int group = xkl_engine_get_next_group (config->engine); -+ xkl_engine_lock_group (config->engine, group); - } - - void --GSwitchItConfigLockPrevGroup (void) -+GSwitchItConfigLockPrevGroup (GSwitchItConfig * config) - { -- int group = XklGetPrevGroup (); -- XklLockGroup (group); -+ int group = xkl_engine_get_prev_group (config->engine); -+ xkl_engine_lock_group (config->engine, group); - } - - void --GSwitchItConfigRestoreGroup (void) -+GSwitchItConfigRestoreGroup (GSwitchItConfig * config) - { -- int group = XklGetRestoreGroup (); -- XklLockGroup (group); -+ int group = xkl_engine_get_current_window_group (config->engine); -+ xkl_engine_lock_group (config->engine, group); - } - - void - GSwitchItConfigStartListen (GSwitchItConfig * config, -- GConfClientNotifyFunc func, -- gpointer userData) -+ GConfClientNotifyFunc func, gpointer userData) - { - _GSwitchItConfigAddListener (config->confClient, - GSWITCHIT_CONFIG_DIR, func, -@@ -686,17 +720,19 @@ - _GSwitchItConfigRemoveListener (config->confClient, - &config->configListenerId); - } -+ - /** - * extern GSwitchItKbdConfig config functions - */ - void - GSwitchItKbdConfigInit (GSwitchItKbdConfig * kbdConfig, -- GConfClient * confClient) -+ GConfClient * confClient, XklEngine * engine) - { - GError *gerror = NULL; - - memset (kbdConfig, 0, sizeof (*kbdConfig)); - kbdConfig->confClient = confClient; -+ kbdConfig->engine = engine; - g_object_ref (kbdConfig->confClient); - - gconf_client_add_dir (kbdConfig->confClient, -@@ -731,14 +767,15 @@ - GSList *pl; - - if (kbdConfig->model == NULL) -- kbdConfig->model = g_strdup (kbdConfigDefault->model); -+ kbdConfig->model = -+ g_strdup (kbdConfigDefault->model); - - if (kbdConfig->layouts == NULL) { - pl = kbdConfigDefault->layouts; - while (pl != NULL) { - kbdConfig->layouts = -- g_slist_append (kbdConfig->layouts, -- g_strdup (pl->data)); -+ g_slist_append (kbdConfig->layouts, -+ g_strdup (pl->data)); - pl = pl->next; - } - } -@@ -747,8 +784,8 @@ - pl = kbdConfigDefault->options; - while (pl != NULL) { - kbdConfig->options = -- g_slist_append (kbdConfig->options, -- g_strdup (pl->data)); -+ g_slist_append (kbdConfig->options, -+ g_strdup (pl->data)); - pl = pl->next; - } - } -@@ -765,29 +802,27 @@ - void - GSwitchItKbdConfigLoadFromXCurrent (GSwitchItKbdConfig * kbdConfig) - { -- XklConfigRec data; -- XklConfigRecInit (&data); -- if (XklConfigGetFromServer (&data)) -- _GSwitchItKbdConfigCopyFromXklConfig (kbdConfig, &data); -+ XklConfigRec *data = xkl_config_rec_new (); -+ if (xkl_config_rec_get_from_server (data, kbdConfig->engine)) -+ _GSwitchItKbdConfigCopyFromXklConfig (kbdConfig, data); - else -- XklDebug (150, -- "Could not load keyboard config from server: [%s]\n", -- XklGetLastError ()); -- XklConfigRecDestroy (&data); -+ xkl_debug (150, -+ "Could not load keyboard config from server: [%s]\n", -+ xkl_get_last_error ()); -+ g_object_unref (G_OBJECT (data)); - } - - void - GSwitchItKbdConfigLoadFromXInitial (GSwitchItKbdConfig * kbdConfig) - { -- XklConfigRec data; -- XklConfigRecInit (&data); -- if (XklConfigGetFromBackup (&data)) -- _GSwitchItKbdConfigCopyFromXklConfig (kbdConfig, &data); -+ XklConfigRec *data = xkl_config_rec_new (); -+ if (xkl_config_rec_get_from_backup (data, kbdConfig->engine)) -+ _GSwitchItKbdConfigCopyFromXklConfig (kbdConfig, data); - else -- XklDebug (150, -- "Could not load keyboard config from backup: [%s]\n", -- XklGetLastError ()); -- XklConfigRecDestroy (&data); -+ xkl_debug (150, -+ "Could not load keyboard config from backup: [%s]\n", -+ xkl_get_last_error ()); -+ g_object_unref (G_OBJECT (data)); - } - - gboolean -@@ -856,7 +891,8 @@ - if (kbdConfig->model != NULL) - g_free (kbdConfig->model); - kbdConfig->model = -- (modelName == NULL || modelName[0] == '\0') ? NULL : g_strdup (modelName); -+ (modelName == NULL -+ || modelName[0] == '\0') ? NULL : g_strdup (modelName); - } - - void -@@ -864,7 +900,7 @@ - const gchar * layoutName, - const gchar * variantName) - { -- const char *merged; -+ const gchar *merged; - if (layoutName == NULL) - return; - merged = GSwitchItKbdConfigMergeItems (layoutName, variantName); -@@ -890,7 +926,7 @@ - const gchar * groupName, - const gchar * optionName) - { -- const char *merged; -+ const gchar *merged; - if (groupName == NULL || optionName == NULL) - return; - merged = GSwitchItKbdConfigMergeItems (groupName, optionName); -@@ -904,7 +940,7 @@ - const gchar * groupName, - const gchar * optionName) - { -- const char *merged = -+ const gchar *merged = - GSwitchItKbdConfigMergeItems (groupName, optionName); - if (merged == NULL) - return FALSE; -@@ -918,14 +954,11 @@ - GSwitchItKbdConfigActivate (GSwitchItKbdConfig * kbdConfig) - { - gboolean rv; -+ XklConfigRec *data = xkl_config_rec_new (); - -- XklConfigRec data; -- XklConfigRecInit (&data); -- -- _GSwitchItKbdConfigCopyToXklConfig (kbdConfig, &data); -- -- rv = XklConfigActivate (&data); -- XklConfigRecDestroy (&data); -+ _GSwitchItKbdConfigCopyToXklConfig (kbdConfig, data); -+ rv = xkl_config_rec_activate (data, kbdConfig->engine); -+ g_object_unref (G_OBJECT (data)); - - return rv; - } -@@ -937,7 +970,8 @@ - { - _GSwitchItConfigAddListener (kbdConfig->confClient, - GSWITCHIT_KBD_CONFIG_DIR, func, -- userData, &kbdConfig->configListenerId); -+ userData, -+ &kbdConfig->configListenerId); - } - - void -@@ -954,15 +988,15 @@ - GSwitchItAppletConfigFreeImages (GSwitchItAppletConfig * appletConfig) - { - GdkPixbuf *pi; -- GSList* imgNode; -- while ((imgNode = appletConfig->images) != NULL) -- { -+ GSList *imgNode; -+ while ((imgNode = appletConfig->images) != NULL) { - pi = GDK_PIXBUF (imgNode->data); - /* It can be NULL - some images may be missing */ - if (pi != NULL) { - gdk_pixbuf_unref (pi); - } -- appletConfig->images = g_slist_remove_link (appletConfig->images, imgNode); -+ appletConfig->images = -+ g_slist_remove_link (appletConfig->images, imgNode); - g_slist_free_1 (imgNode); - } - } -@@ -986,7 +1020,8 @@ - - if (fullLayoutName != NULL) { - char *l, *v; -- GSwitchItKbdConfigSplitItems (fullLayoutName, &l, &v); -+ GSwitchItKbdConfigSplitItems (fullLayoutName, &l, -+ &v); - if (l != NULL) { - // probably there is something in theme? - iconInfo = gtk_icon_theme_lookup_icon -@@ -1018,53 +1053,62 @@ - if (!appletConfig->showFlags) - return; - -- for (i = XklGetMaxNumGroups (); --i >= 0;) { -+ for (i = xkl_engine_get_max_num_groups (appletConfig->engine); -+ --i >= 0;) { - GdkPixbuf *image = NULL; - char *imageFile = - GSwitchItAppletConfigGetImagesFile (appletConfig, - kbdConfig, i); - - if (imageFile != NULL) { -- GError *err = NULL; -+ GError *gerror = NULL; - image = -- gdk_pixbuf_new_from_file (imageFile, &err); -+ gdk_pixbuf_new_from_file (imageFile, &gerror); - if (image == NULL) { -- GtkWidget *dialog = gtk_message_dialog_new (NULL, -- GTK_DIALOG_DESTROY_WITH_PARENT, -- GTK_MESSAGE_ERROR, -- GTK_BUTTONS_OK, -- _("There was an error loading an image: %s"), -- err->message); -+ GtkWidget *dialog = -+ gtk_message_dialog_new (NULL, -+ GTK_DIALOG_DESTROY_WITH_PARENT, -+ GTK_MESSAGE_ERROR, -+ GTK_BUTTONS_OK, -+ _ -+ ("There was an error loading an image: %s"), -+ gerror-> -+ message); - g_signal_connect (G_OBJECT (dialog), - "response", -- G_CALLBACK (gtk_widget_destroy), NULL); -+ G_CALLBACK -+ (gtk_widget_destroy), -+ NULL); - -- gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); -+ gtk_window_set_resizable (GTK_WINDOW -+ (dialog), FALSE); - - gtk_widget_show (dialog); -- g_error_free (err); -+ g_error_free (gerror); - } -- XklDebug (150, -- "Image %d[%s] loaded -> %p[%dx%d]\n", -- i, imageFile, image, -- gdk_pixbuf_get_width (image), -- gdk_pixbuf_get_height (image)); -+ xkl_debug (150, -+ "Image %d[%s] loaded -> %p[%dx%d]\n", -+ i, imageFile, image, -+ gdk_pixbuf_get_width (image), -+ gdk_pixbuf_get_height (image)); - g_free (imageFile); - } - /* We append the image anyway - even if it is NULL! */ -- appletConfig->images = g_slist_prepend (appletConfig->images, image); -+ appletConfig->images = -+ g_slist_prepend (appletConfig->images, image); - } - } - - void - GSwitchItAppletConfigInit (GSwitchItAppletConfig * appletConfig, -- GConfClient * confClient) -+ GConfClient * confClient, XklEngine * engine) - { - GError *gerror = NULL; - gchar *sp, *datadir; - - memset (appletConfig, 0, sizeof (*appletConfig)); - appletConfig->confClient = confClient; -+ appletConfig->engine = engine; - g_object_ref (appletConfig->confClient); - - gconf_client_add_dir (appletConfig->confClient, -@@ -1204,7 +1248,9 @@ - void - GSwitchItAppletConfigActivate (GSwitchItAppletConfig * appletConfig) - { -- XklSetSecondaryGroupsMask (appletConfig->secondaryGroupsMask); -+ xkl_engine_set_secondary_groups_mask (appletConfig->engine, -+ appletConfig-> -+ secondaryGroupsMask); - } - - void -@@ -1214,7 +1260,8 @@ - { - _GSwitchItConfigAddListener (appletConfig->confClient, - GSWITCHIT_APPLET_CONFIG_DIR, func, -- userData, &appletConfig->configListenerId); -+ userData, -+ &appletConfig->configListenerId); - } - - void -@@ -1225,27 +1272,31 @@ - } - - Bool --GSwitchItKbdConfigGetDescriptions (const char *name, -- char **layoutShortDescr, -- char **layoutDescr, -- char **variantShortDescr, -- char **variantDescr) -+GSwitchItKbdConfigGetDescriptions (XklConfigRegistry * configRegistry, -+ const gchar * name, -+ gchar ** layoutShortDescr, -+ gchar ** layoutDescr, -+ gchar ** variantShortDescr, -+ gchar ** variantDescr) - { - char *layoutName = NULL, *variantName = NULL; -- if (!GSwitchItKbdConfigSplitItems (name, &layoutName, &variantName)) -+ if (!GSwitchItKbdConfigSplitItems -+ (name, &layoutName, &variantName)) - return FALSE; -- return _GSwitchItKbdConfigGetDescriptions (layoutName, variantName, -- layoutShortDescr, -- layoutDescr, -- variantShortDescr, -- variantDescr); -+ return _GSwitchItKbdConfigGetDescriptions (configRegistry, -+ layoutName, -+ variantName, -+ layoutShortDescr, -+ layoutDescr, -+ variantShortDescr, -+ variantDescr); - } - --const char * --GSwitchItKbdConfigFormatFullLayout (const char *layoutDescr, -- const char *variantDescr) -+const gchar * -+GSwitchItKbdConfigFormatFullLayout (const gchar * layoutDescr, -+ const gchar * variantDescr) - { -- static char fullDescr[XKL_MAX_CI_DESC_LENGTH * 2]; -+ static gchar fullDescr[XKL_MAX_CI_DESC_LENGTH * 2]; - if (variantDescr == NULL) - g_snprintf (fullDescr, sizeof (fullDescr), "%s", - layoutDescr); -@@ -1255,55 +1306,221 @@ - return fullDescr; - } - --GSList * --GSwitchItConfigLoadGroupDescriptionsUtf8 (GSwitchItConfig * config) -+gchar ** -+GSwitchItConfigLoadGroupDescriptionsUtf8 (GSwitchItConfig * config, -+ XklConfigRegistry * -+ configRegistry) - { - int i; -- const char **pNativeNames = XklGetGroupNames (); -- GSList *rv = NULL; -- if ((XklGetBackendFeatures() & XKLF_MULTIPLE_LAYOUTS_SUPPORTED) && -- config->layoutNamesAsGroupNames) { -- XklConfigRec xklConfig; -- XklConfigRecInit (&xklConfig); -- if (XklConfigGetFromServer (&xklConfig)) { -- char **pl = xklConfig.layouts; -- char **pv = xklConfig.variants; -- for (i = xklConfig.numLayouts; --i >= 0;) { -+ const gchar **pNativeNames = -+ xkl_engine_get_groups_names (config->engine); -+ guint totalGroups = xkl_engine_get_num_groups (config->engine); -+ guint totalLayouts; -+ gchar **rv = g_new0 (char *, totalGroups + 1); -+ gchar **pCurrentDescr = rv; -+ -+ if ((xkl_engine_get_features (config->engine) & -+ XKLF_MULTIPLE_LAYOUTS_SUPPORTED) -+ && config->layoutNamesAsGroupNames) { -+ XklConfigRec *xklConfig = xkl_config_rec_new (); -+ if (xkl_config_rec_get_from_server -+ (xklConfig, config->engine)) { -+ char **pl = xklConfig->layouts; -+ char **pv = xklConfig->variants; -+ i = totalGroups; -+ while (pl != NULL && *pl != NULL && i >= 0) { - char *lSDescr; - char *lDescr; - char *vSDescr; - char *vDescr; - if (_GSwitchItKbdConfigGetDescriptions -- (*pl++, *pv++, &lSDescr, &lDescr, -- &vSDescr, &vDescr)) { -+ (configRegistry, *pl++, *pv++, -+ &lSDescr, &lDescr, &vSDescr, -+ &vDescr)) { - char *nameUtf = - g_locale_to_utf8 - (GSwitchItKbdConfigFormatFullLayout - (lDescr, vDescr), -1, NULL, - NULL, NULL); -- rv = g_slist_append (rv, nameUtf); -+ *pCurrentDescr++ = nameUtf; - } else { -- rv = g_slist_append (rv, g_strdup("")); -+ *pCurrentDescr++ = g_strdup (""); - } - } - } -- XklConfigRecDestroy (&xklConfig); -+ g_object_unref (G_OBJECT (xklConfig)); - /* Worst case - multiple layous - but SOME of them are multigrouped :((( - We cannot do much - just add empty descriptions. - The UI is going to be messy. - Canadian layouts are famous for this sh.t. */ -- if (g_slist_length (rv) != XklGetNumGroups()) -- { -- XklDebug (0, "The mismatch between " -- "the number of groups: %d and number of layouts: %d\n", -- XklGetNumGroups(), g_slist_length (rv)); -- for (i = XklGetNumGroups() - g_slist_length (rv); --i>=0;) -- rv = g_slist_append (rv, g_strdup("")); -+ totalLayouts = g_strv_length (rv); -+ if (totalLayouts != totalGroups) { -+ xkl_debug (0, -+ "The mismatch between " -+ "the number of groups: %d and number of layouts: %d\n", -+ totalGroups, totalLayouts); -+ pCurrentDescr = rv + totalLayouts; -+ for (i = totalGroups - totalLayouts; --i >= 0;) -+ *pCurrentDescr++ = g_strdup (""); - } - } -- if (rv == NULL) -- for (i = XklGetNumGroups (); --i >= 0;) -- rv = g_slist_append (rv, g_strdup (*pNativeNames++)); -+ totalLayouts = g_strv_length (rv); -+ if (!totalLayouts) -+ for (i = totalGroups; --i >= 0;) -+ *pCurrentDescr++ = g_strdup (*pNativeNames++); - - return rv; - } -+ -+gchar * -+GSwitchItKbdConfigToString (const GSwitchItKbdConfig * config) -+{ -+ gchar *layouts = NULL, *options = NULL; -+ GString *buffer = g_string_new (NULL); -+ -+ GSList *iter; -+ gint count; -+ gchar *result; -+ -+ if (config->layouts) { -+ /* g_slist_length is "expensive", so we determinate the length on the fly */ -+ for (iter = config->layouts, count = 0; iter; -+ iter = iter->next, ++count) { -+ if (buffer->len) -+ g_string_append (buffer, " "); -+ -+ g_string_append (buffer, -+ (const gchar *) iter->data); -+ } -+ -+ layouts = -+ g_strdup_printf (ngettext -+ ("layout \"%s\"", "layouts \"%s\"", -+ count), buffer->str); -+ g_string_truncate (buffer, 0); -+ } -+ if (config->options) { -+ /* g_slist_length is "expensive", so we determinate the length on the fly */ -+ for (iter = config->options, count = 0; iter; -+ iter = iter->next, ++count) { -+ if (buffer->len) -+ g_string_append (buffer, " "); -+ -+ g_string_append (buffer, -+ (const gchar *) iter->data); -+ } -+ -+ options = -+ g_strdup_printf (ngettext -+ ("option \"%s\"", "options \"%s\"", -+ count), buffer->str); -+ g_string_truncate (buffer, 0); -+ } -+ -+ g_string_free (buffer, TRUE); -+ -+ result = -+ g_strdup_printf (_("model \"%s\", %s and %s"), config->model, -+ layouts ? layouts : _("no layout"), -+ options ? options : _("no options")); -+ -+ g_free (options); -+ g_free (layouts); -+ -+ return result; -+} -+ -+GdkRectangle * -+GSwitchItPreviewLoad (void) -+{ -+ GError *gerror = NULL; -+ GdkRectangle *rv = NULL; -+ gint x, y, w, h; -+ GConfClient *confClient = gconf_client_get_default (); -+ -+ if (confClient == NULL) -+ return NULL; -+ -+ x = gconf_client_get_int (confClient, -+ GSWITCHIT_PREVIEW_CONFIG_KEY_X, &gerror); -+ if (gerror != NULL) { -+ xkl_debug (0, "Error getting the preview x: %s\n", -+ gerror->message); -+ g_error_free (gerror); -+ g_object_unref (G_OBJECT (confClient)); -+ return NULL; -+ } -+ -+ y = gconf_client_get_int (confClient, -+ GSWITCHIT_PREVIEW_CONFIG_KEY_Y, &gerror); -+ if (gerror != NULL) { -+ xkl_debug (0, "Error getting the preview y: %s\n", -+ gerror->message); -+ g_error_free (gerror); -+ g_object_unref (G_OBJECT (confClient)); -+ return NULL; -+ } -+ -+ w = gconf_client_get_int (confClient, -+ GSWITCHIT_PREVIEW_CONFIG_KEY_WIDTH, -+ &gerror); -+ if (gerror != NULL) { -+ xkl_debug (0, "Error getting the preview width: %s\n", -+ gerror->message); -+ g_error_free (gerror); -+ g_object_unref (G_OBJECT (confClient)); -+ return NULL; -+ } -+ -+ h = gconf_client_get_int (confClient, -+ GSWITCHIT_PREVIEW_CONFIG_KEY_HEIGHT, -+ &gerror); -+ if (gerror != NULL) { -+ xkl_debug (0, "Error getting the preview height: %s\n", -+ gerror->message); -+ g_error_free (gerror); -+ g_object_unref (G_OBJECT (confClient)); -+ return NULL; -+ } -+ -+ g_object_unref (G_OBJECT (confClient)); -+ -+ // default values should be just ignored -+ if (x == -1 || y == -1 || w == -1 || h == -1) -+ return NULL; -+ -+ rv = g_new (GdkRectangle, 1); -+ rv->x = x; -+ rv->y = y; -+ rv->width = w; -+ rv->height = h; -+ return rv; -+} -+ -+void -+GSwitchItPreviewSave (GdkRectangle * rect) -+{ -+ GConfClient *confClient = gconf_client_get_default (); -+ GConfChangeSet *cs; -+ GError *gerror = NULL; -+ -+ cs = gconf_change_set_new (); -+ -+ gconf_change_set_set_int (cs, GSWITCHIT_PREVIEW_CONFIG_KEY_X, -+ rect->x); -+ gconf_change_set_set_int (cs, GSWITCHIT_PREVIEW_CONFIG_KEY_Y, -+ rect->y); -+ gconf_change_set_set_int (cs, GSWITCHIT_PREVIEW_CONFIG_KEY_WIDTH, -+ rect->width); -+ gconf_change_set_set_int (cs, GSWITCHIT_PREVIEW_CONFIG_KEY_HEIGHT, -+ rect->height); -+ -+ gconf_client_commit_change_set (confClient, cs, TRUE, &gerror); -+ if (gerror != NULL) { -+ g_warning ("Error saving preview configuration: %s\n", -+ gerror->message); -+ g_error_free (gerror); -+ } -+ gconf_change_set_unref (cs); -+ g_object_unref (G_OBJECT (confClient)); -+} -diff -u libgswitchit-/gswitchit_config.h libgswitchit/gswitchit_config.h ---- libgswitchit-/gswitchit_config.h 2005-07-26 16:38:25.000000000 -0400 -+++ libgswitchit/gswitchit_config.h 2006-05-26 20:19:52.000000000 -0400 -@@ -27,22 +27,30 @@ - #include <gdk-pixbuf/gdk-pixbuf.h> - #include <gconf/gconf-client.h> - --extern const char GSWITCHIT_CONFIG_DIR[]; --extern const char GSWITCHIT_CONFIG_KEY_DEFAULT_GROUP[]; --extern const char GSWITCHIT_CONFIG_KEY_GROUP_PER_WINDOW[]; --extern const char GSWITCHIT_CONFIG_KEY_HANDLE_INDICATORS[]; --extern const char GSWITCHIT_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[]; -- --extern const char GSWITCHIT_KBD_CONFIG_DIR[]; --extern const char GSWITCHIT_KBD_CONFIG_KEY_MODEL[]; --extern const char GSWITCHIT_KBD_CONFIG_KEY_LAYOUTS[]; --extern const char GSWITCHIT_KBD_CONFIG_KEY_OPTIONS[]; -+#include <libxklavier/xklavier.h> -+ -+extern const gchar GSWITCHIT_CONFIG_DIR[]; -+extern const gchar GSWITCHIT_CONFIG_KEY_DEFAULT_GROUP[]; -+extern const gchar GSWITCHIT_CONFIG_KEY_GROUP_PER_WINDOW[]; -+extern const gchar GSWITCHIT_CONFIG_KEY_HANDLE_INDICATORS[]; -+extern const gchar GSWITCHIT_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[]; -+ -+extern const gchar GSWITCHIT_PREVIEW_CONFIG_DIR[]; -+extern const gchar GSWITCHIT_PREVIEW_CONFIG_KEY_X[]; -+extern const gchar GSWITCHIT_PREVIEW_CONFIG_KEY_Y[]; -+extern const gchar GSWITCHIT_PREVIEW_CONFIG_KEY_WIDTH[]; -+extern const gchar GSWITCHIT_PREVIEW_CONFIG_KEY_HEIGHT[]; -+ -+extern const gchar GSWITCHIT_KBD_CONFIG_DIR[]; -+extern const gchar GSWITCHIT_KBD_CONFIG_KEY_MODEL[]; -+extern const gchar GSWITCHIT_KBD_CONFIG_KEY_LAYOUTS[]; -+extern const gchar GSWITCHIT_KBD_CONFIG_KEY_OPTIONS[]; - - /* - * General configuration - */ - typedef struct _GSwitchItConfig { -- int defaultGroup; -+ gint defaultGroup; - gboolean groupPerApp; - gboolean handleIndicators; - gboolean layoutNamesAsGroupNames; -@@ -50,6 +58,7 @@ - /* private, transient */ - GConfClient *confClient; - int configListenerId; -+ XklEngine *engine; - } GSwitchItConfig; - - /* -@@ -63,6 +72,7 @@ - /* private, transient */ - GConfClient *confClient; - int configListenerId; -+ XklEngine *engine; - } GSwitchItKbdConfig; - - /* -@@ -79,13 +89,15 @@ - GSList *images; - GtkIconTheme *iconTheme; - int configListenerId; -+ XklEngine *engine; - } GSwitchItAppletConfig; - - /** - * GSwitchItConfig functions - */ - extern void GSwitchItConfigInit (GSwitchItConfig * config, -- GConfClient * confClient); -+ GConfClient * confClient, -+ XklEngine * engine); - extern void GSwitchItConfigTerm (GSwitchItConfig * config); - - extern void GSwitchItConfigLoadFromGConf (GSwitchItConfig * config); -@@ -95,17 +107,19 @@ - extern gboolean GSwitchItConfigActivate (GSwitchItConfig * config); - - /* Affected by XKB and XKB/GConf configuration */ --extern GSList * --GSwitchItConfigLoadGroupDescriptionsUtf8 (GSwitchItConfig * config); -+extern gchar **GSwitchItConfigLoadGroupDescriptionsUtf8 (GSwitchItConfig * -+ config, -+ XklConfigRegistry -+ * configRegistry); - --extern void GSwitchItConfigLockNextGroup (void); -+extern void GSwitchItConfigLockNextGroup (GSwitchItConfig * config); - --extern void GSwitchItConfigLockPrevGroup (void); -+extern void GSwitchItConfigLockPrevGroup (GSwitchItConfig * config); - --extern void GSwitchItConfigRestoreGroup (void); -+extern void GSwitchItConfigRestoreGroup (GSwitchItConfig * config); - - extern void GSwitchItConfigStartListen (GSwitchItConfig * config, -- GConfClientNotifyFunc func, -+ GConfClientNotifyFunc func, - gpointer user_data); - - extern void GSwitchItConfigStopListen (GSwitchItConfig * config); -@@ -114,24 +128,31 @@ - * GSwitchItKbdConfig functions - */ - extern void GSwitchItKbdConfigInit (GSwitchItKbdConfig * kbdConfig, -- GConfClient * confClient); -+ GConfClient * confClient, -+ XklEngine * engine); - extern void GSwitchItKbdConfigTerm (GSwitchItKbdConfig * kbdConfig); - --extern void GSwitchItKbdConfigLoadFromGConf (GSwitchItKbdConfig * kbdConfig, -- GSwitchItKbdConfig * kbdConfigDefault); -+extern void GSwitchItKbdConfigLoadFromGConf (GSwitchItKbdConfig * -+ kbdConfig, -+ GSwitchItKbdConfig * -+ kbdConfigDefault); - - extern void GSwitchItKbdConfigSaveToGConf (GSwitchItKbdConfig * kbdConfig); - --extern void GSwitchItKbdConfigLoadFromGConfBackup (GSwitchItKbdConfig * kbdConfig); -+extern void GSwitchItKbdConfigLoadFromGConfBackup (GSwitchItKbdConfig * -+ kbdConfig); - --extern void GSwitchItKbdConfigSaveToGConfBackup (GSwitchItKbdConfig * kbdConfig); -+extern void GSwitchItKbdConfigSaveToGConfBackup (GSwitchItKbdConfig * -+ kbdConfig); - --extern void GSwitchItKbdConfigLoadFromXInitial (GSwitchItKbdConfig * kbdConfig); -+extern void GSwitchItKbdConfigLoadFromXInitial (GSwitchItKbdConfig * -+ kbdConfig); - --extern void GSwitchItKbdConfigLoadFromXCurrent (GSwitchItKbdConfig * kbdConfig); -+extern void GSwitchItKbdConfigLoadFromXCurrent (GSwitchItKbdConfig * -+ kbdConfig); - - extern void GSwitchItKbdConfigStartListen (GSwitchItKbdConfig * kbdConfig, -- GConfClientNotifyFunc func, -+ GConfClientNotifyFunc func, - gpointer user_data); - - extern void GSwitchItKbdConfigStopListen (GSwitchItKbdConfig * kbdConfig); -@@ -139,55 +160,85 @@ - extern gboolean GSwitchItKbdConfigEquals (GSwitchItKbdConfig * kbdConfig1, - GSwitchItKbdConfig * kbdConfig2); - --extern gboolean GSwitchItKbdConfigActivate (GSwitchItKbdConfig * kbdConfig); -+extern gboolean GSwitchItKbdConfigActivate (GSwitchItKbdConfig * -+ kbdConfig); - --extern const char *GSwitchItKbdConfigMergeItems (const char *parent, -- const char *child); -+extern const gchar *GSwitchItKbdConfigMergeItems (const gchar * parent, -+ const gchar * child); - --extern gboolean GSwitchItKbdConfigSplitItems (const char *merged, -- char **parent, char **child); -+extern gboolean GSwitchItKbdConfigSplitItems (const gchar * merged, -+ gchar ** parent, -+ gchar ** child); -+ -+extern Bool GSwitchItKbdConfigGetDescriptions (XklConfigRegistry * -+ configRegistry, -+ const gchar * name, -+ gchar ** layoutShortDescr, -+ gchar ** layoutDescr, -+ gchar ** variantShortDescr, -+ gchar ** variantDescr); -+ -+extern const gchar *GSwitchItKbdConfigFormatFullLayout (const gchar -+ * layoutDescr, -+ const gchar * -+ variantDescr); - --extern Bool GSwitchItKbdConfigGetDescriptions (const char *name, -- char **layoutShortDescr, -- char **layoutDescr, -- char **variantShortDescr, -- char **variantDescr); -+extern gchar *GSwitchItKbdConfigToString (const GSwitchItKbdConfig * -+ config); - --extern const char *GSwitchItKbdConfigFormatFullLayout (const char *layoutDescr, -- const char *variantDescr); - - /** - * GSwitchItAppletConfig functions - - * some of them require GSwitchItKbdConfig as well - - * for loading approptiate images - */ --extern void GSwitchItAppletConfigInit (GSwitchItAppletConfig * appletConfig, -- GConfClient * confClient); --extern void GSwitchItAppletConfigTerm (GSwitchItAppletConfig * appletConfig); -- --extern void GSwitchItAppletConfigLoadFromGConf (GSwitchItAppletConfig * appletConfig); --extern void GSwitchItAppletConfigSaveToGConf (GSwitchItAppletConfig * appletConfig); -- --extern char --*GSwitchItAppletConfigGetImagesFile (GSwitchItAppletConfig * appletConfig, -- GSwitchItKbdConfig * kbdConfig, -- int group); -- --extern void GSwitchItAppletConfigLoadImages (GSwitchItAppletConfig * appletConfig, -- GSwitchItKbdConfig * kbdConfig); --extern void GSwitchItAppletConfigFreeImages (GSwitchItAppletConfig * appletConfig); -+extern void GSwitchItAppletConfigInit (GSwitchItAppletConfig * -+ appletConfig, -+ GConfClient * confClient, -+ XklEngine * engine); -+extern void GSwitchItAppletConfigTerm (GSwitchItAppletConfig * -+ appletConfig); -+ -+extern void GSwitchItAppletConfigLoadFromGConf (GSwitchItAppletConfig * -+ appletConfig); -+extern void GSwitchItAppletConfigSaveToGConf (GSwitchItAppletConfig * -+ appletConfig); -+ -+extern gchar *GSwitchItAppletConfigGetImagesFile (GSwitchItAppletConfig * -+ appletConfig, -+ GSwitchItKbdConfig * -+ kbdConfig, int group); -+ -+extern void GSwitchItAppletConfigLoadImages (GSwitchItAppletConfig * -+ appletConfig, -+ GSwitchItKbdConfig * -+ kbdConfig); -+extern void GSwitchItAppletConfigFreeImages (GSwitchItAppletConfig * -+ appletConfig); - - /* Should be updated on Applet/GConf and Kbd/GConf configuration change */ --extern void GSwitchItAppletConfigUpdateImages (GSwitchItAppletConfig * appletConfig, -- GSwitchItKbdConfig * kbdConfig); -+extern void GSwitchItAppletConfigUpdateImages (GSwitchItAppletConfig * -+ appletConfig, -+ GSwitchItKbdConfig * -+ kbdConfig); - - /* Should be updated on Applet/GConf configuration change */ --extern void GSwitchItAppletConfigActivate (GSwitchItAppletConfig * appletConfig); -+extern void GSwitchItAppletConfigActivate (GSwitchItAppletConfig * -+ appletConfig); - --extern void GSwitchItAppletConfigStartListen (GSwitchItAppletConfig * appletConfig, -- GConfClientNotifyFunc func, -+extern void GSwitchItAppletConfigStartListen (GSwitchItAppletConfig * -+ appletConfig, -+ GConfClientNotifyFunc func, - gpointer user_data); - --extern void GSwitchItAppletConfigStopListen (GSwitchItAppletConfig * appletConfig); -+extern void GSwitchItAppletConfigStopListen (GSwitchItAppletConfig * -+ appletConfig); -+ -+/** -+ * GSwitchItPreview functions -+ */ -+extern GdkRectangle *GSwitchItPreviewLoad (void); -+ -+extern void GSwitchItPreviewSave (GdkRectangle * rect); - - #endif -diff -u libgswitchit-/gswitchit_plugin.h libgswitchit/gswitchit_plugin.h ---- libgswitchit-/gswitchit_plugin.h 2005-12-06 18:25:44.000000000 -0500 -+++ libgswitchit/gswitchit_plugin.h 2006-05-26 20:27:01.000000000 -0400 -@@ -35,7 +35,8 @@ - typedef gboolean (*GSwitchItPluginInitFunc) (GSwitchItPluginContainer * - pc); - --typedef void (*GSwitchItPluginGroupChangedFunc) (GtkWidget * notebook, int newGroup); -+typedef void (*GSwitchItPluginGroupChangedFunc) (GtkWidget * notebook, -+ int newGroup); - - typedef void (*GSwitchItPluginConfigChangedFunc) (const GSwitchItKbdConfig - * from, -@@ -105,7 +106,8 @@ - - extern guint GSwitchItPluginGetNumGroups (GSwitchItPluginContainer * pc); - --extern GSList* --GSwitchItPluginLoadLocalizedGroupNames (GSwitchItPluginContainer * pc); -+extern gchar -+ **GSwitchItPluginLoadLocalizedGroupNames (GSwitchItPluginContainer * -+ pc); - - #endif -diff -u libgswitchit-/gswitchit_plugin_manager.c libgswitchit/gswitchit_plugin_manager.c ---- libgswitchit-/gswitchit_plugin_manager.c 2005-12-06 18:25:44.000000000 -0500 -+++ libgswitchit/gswitchit_plugin_manager.c 2006-04-19 19:18:00.000000000 -0400 -@@ -46,11 +46,11 @@ - if (dir == NULL) - return; - -- XklDebug (100, "Scanning [%s]...\n", dirname); -+ xkl_debug (100, "Scanning [%s]...\n", dirname); - while ((filename = g_dir_read_name (dir)) != NULL) { - gchar *fullPath = - g_build_filename (dirname, filename, NULL); -- XklDebug (100, "Loading plugin module [%s]...\n", -+ xkl_debug (100, "Loading plugin module [%s]...\n", - fullPath); - if (fullPath != NULL) { - GModule *module = g_module_open (fullPath, 0); -@@ -68,7 +68,7 @@ - g_new0 - (GSwitchItPluginManagerRecord, - 1); -- XklDebug (100, -+ xkl_debug (100, - "Loaded plugin from [%s]: [%s]/[%s]...\n", - fullPath, - plugin->name, -@@ -84,12 +84,12 @@ - continue; - } - } else -- XklDebug (0, -+ xkl_debug (0, - "Bad plugin: [%s]\n", - fullPath); - g_module_close (module); - } else -- XklDebug (0, "Bad module: [%s], %s\n", -+ xkl_debug (0, "Bad module: [%s], %s\n", - fullPath, g_module_error()); - g_free (fullPath); - } -@@ -101,7 +101,7 @@ - _GSwitchItPluginManagerLoadAll (GSwitchItPluginManager *manager) - { - if (!g_module_supported ()) { -- XklDebug (0, "Modules are not supported - no plugins!\n"); -+ xkl_debug (0, "Modules are not supported - no plugins!\n"); - return; - } - _GSwitchItPluginManagerAddPluginsDir (manager, SYS_PLUGIN_DIR); -@@ -113,7 +113,7 @@ - { - const GSwitchItPlugin *plugin = rec->plugin; - if (plugin != NULL) { -- XklDebug (100, "Terminating plugin: [%s]...\n", -+ xkl_debug (100, "Terminating plugin: [%s]...\n", - plugin->name); - if (plugin->termCallback) - (*plugin->termCallback) (); -@@ -123,7 +123,7 @@ - static void - _GSwitchItPluginManagerRecDestroy (GSwitchItPluginManagerRecord *rec) - { -- XklDebug (100, "Unloading plugin: [%s]...\n", rec->plugin->name); -+ xkl_debug (100, "Unloading plugin: [%s]...\n", rec->plugin->name); - - g_module_close (rec->module); - g_free (rec); -@@ -158,7 +158,7 @@ - GSList *pluginNameNode = enabledPlugins; - if (manager->allPluginRecs == NULL) - return; -- XklDebug (100, "Initializing all enabled plugins...\n"); -+ xkl_debug (100, "Initializing all enabled plugins...\n"); - while (pluginNameNode != NULL) { - const char *fullPath = pluginNameNode->data; - if (fullPath != NULL) { -@@ -171,7 +171,7 @@ - const GSwitchItPlugin *plugin = - rec->plugin; - gboolean initialized = FALSE; -- XklDebug (100, -+ xkl_debug (100, - "Initializing plugin: [%s] from [%s]...\n", - plugin->name, fullPath); - if (plugin->initCallback != NULL) -@@ -183,7 +183,7 @@ - manager->initedPluginRecs = - g_slist_append (manager-> - initedPluginRecs, rec); -- XklDebug (100, -+ xkl_debug (100, - "Plugin [%s] initialized: %d\n", - plugin->name, initialized); - } -@@ -324,7 +324,7 @@ - int groupToAssign = - (*plugin->windowCreatedCallback) (win, parent); - if (groupToAssign != -1) { -- XklDebug (100, -+ xkl_debug (100, - "Plugin [%s] assigned group %d to new window %ld\n", - plugin->name, groupToAssign, win); - return groupToAssign; -@@ -348,7 +348,7 @@ - groupDescription, - kbdConfig); - if (decoratedWidget != NULL) { -- XklDebug (100, -+ xkl_debug (100, - "Plugin [%s] decorated widget %p to %p\n", - plugin->name, widget, decoratedWidget); - return decoratedWidget; -@@ -383,9 +383,3 @@ - { - g_object_unref (pc->confClient); - } -- --guint --GSwitchItPluginGetNumGroups (GSwitchItPluginContainer *pc) --{ -- return XklGetNumGroups (); --} -diff -u libgswitchit-/gswitchit_util.c libgswitchit/gswitchit_util.c ---- libgswitchit-/gswitchit_util.c 2005-03-16 07:53:08.000000000 -0500 -+++ libgswitchit/gswitchit_util.c 2006-04-19 19:18:00.000000000 -0400 -@@ -72,5 +72,5 @@ - void - GSwitchItInstallGlibLogAppender (void) - { -- XklSetLogAppender (GSwitchItLogAppender); -+ xkl_set_log_appender (GSwitchItLogAppender); - } -Only in libgswitchit: .indent.pro -Only in libgswitchit: MAINTAINERS -diff -u gswitchit-/ChangeLog gswitchit/ChangeLog ---- gswitchit-/ChangeLog 2006-04-08 13:27:51.000000000 -0400 -+++ gswitchit/ChangeLog 2006-05-26 20:21:10.000000000 -0400 -@@ -1,3 +1,17 @@ -+2006-05-27 Sergey Udaltsov <svu@gnome.org> -+ -+ * gswitchit-applet.c, gswitchit-plugin.c: Better UTF-8 description -+ handling, changed GSList to NULL-terminated gchar ** -+ -+2006-05-23 Sergey Udaltsov <svu@gnome.org> -+ -+ * gswitchit-applet.c: Mouse wheel events are ignored -+ -+2006-04-23 Sergey Udaltsov <svu@gnome.org> -+ -+ * gswitchit-applet.c: Layout View keeps track of the window -+ geometry (same as gnome-keyboard-properties "Add Layout" dialog) -+ - 2006-04-08 cyphra <serrador@cvs.gnome.org> - - * help/es/es.po: Updated Spanish translation -diff -u gswitchit-/gswitchit-applet.c gswitchit/gswitchit-applet.c ---- gswitchit-/gswitchit-applet.c 2006-03-29 12:30:57.000000000 -0500 -+++ gswitchit/gswitchit-applet.c 2006-05-26 20:21:10.000000000 -0400 -@@ -32,8 +32,6 @@ - #include <gdk/gdkx.h> - #include <glade/glade.h> - --#include <libxklavier/xklavier_config.h> -- - #define GROUPS_SUBMENU_PATH "/popups/popup/groups" - - /* we never build applet without XKB, so far: TODO */ -@@ -45,8 +43,14 @@ - * BAD STYLE: Taken from xklavier_private_xkb.h - * Any ideas on architectural improvements are WELCOME - */ --extern Bool _XklXkbConfigPrepareNative( const XklConfigRecPtr data, XkbComponentNamesPtr componentNamesPtr ); --extern void _XklXkbConfigCleanupNative( XkbComponentNamesPtr componentNamesPtr ); -+extern gboolean xkl_xkb_config_native_prepare (XklEngine * engine, -+ const XklConfigRec * data, -+ XkbComponentNamesPtr -+ component_names); -+ -+extern void xkl_xkb_config_native_cleanup (XklEngine * engine, -+ XkbComponentNamesPtr -+ component_names); - /* */ - #endif - -@@ -64,7 +68,7 @@ - GSList* cur; \ - for (cur = globals.appletInstances; cur != NULL; cur = cur->next) { \ - GSwitchItApplet * sia = (GSwitchItApplet*)cur->data; --#define NextApplet \ -+#define NextApplet() \ - } \ - } - -@@ -150,9 +154,9 @@ - GSwitchItAppletRevalidate (sia); - - /* also, update tooltips */ -- currentState = XklGetCurrentState (); -+ currentState = xkl_engine_get_current_state (globals.engine); - if (currentState->group >= 0) { -- pname = g_slist_nth_data (globals.groupNames, currentState->group); -+ pname = globals.groupNames[currentState->group]; - GSwitchItAppletSetTooltip (sia, pname); - } - } -@@ -160,78 +164,82 @@ - /* Should be called once for all applets */ - static void - GSwitchItConfigChanged (GConfClient * client, -- guint cnxn_id, -- GConfEntry * entry) -+ guint cnxn_id, GConfEntry * entry) - { -- XklDebug (100, -- "General configuration changed in GConf - reiniting...\n"); -+ xkl_debug (100, -+ "General configuration changed in GConf - reiniting...\n"); - GSwitchItConfigLoadFromGConf (&globals.config); - GSwitchItConfigActivate (&globals.config); -- ForAllApplets () -+ ForAllApplets () { - GSwitchItAppletReinitUi (sia); -- NextApplet -+ } NextApplet (); - } - - /* Should be called once for all applets */ - static void - GSwitchItAppletConfigChanged (GConfClient * client, -- guint cnxn_id, -- GConfEntry * entry) -+ guint cnxn_id, GConfEntry * entry) - { -- GSList* enabledPlugins = NULL; -+ GSList *enabledPlugins = NULL; - -- XklDebug (100, -- "Applet configuration changed in GConf - reiniting...\n"); -+ xkl_debug (100, -+ "Applet configuration changed in GConf - reiniting...\n"); - GSwitchItAppletConfigLoadFromGConf (&globals.appletConfig); -- GSwitchItAppletConfigUpdateImages (&globals.appletConfig, &globals.kbdConfig); -+ GSwitchItAppletConfigUpdateImages (&globals.appletConfig, -+ &globals.kbdConfig); - GSwitchItAppletConfigActivate (&globals.appletConfig); -- -+ - GSwitchItPluginManagerTogglePlugins (&globals.pluginManager, - &globals.pluginContainer, -- globals.appletConfig.enabledPlugins); -+ globals.appletConfig. -+ enabledPlugins); - -- ForAllApplets () -+ ForAllApplets () { - GSwitchItAppletReinitUi (sia); -- NextApplet -+ } NextApplet (); - } - - /* Should be called once for all applets */ - static void --GSwitchItAppletKbdConfigCallback (void) -+GSwitchItAppletKbdConfigCallback (XklEngine * engine) - { -- XklDebug (100, -- "XKB configuration changed on X Server - reiniting...\n"); -+ xkl_debug (100, -+ "XKB configuration changed on X Server - reiniting...\n"); - - GSwitchItKbdConfigLoadFromXCurrent (&globals.kbdConfig); -- GSwitchItAppletConfigUpdateImages (&globals.appletConfig, &globals.kbdConfig); -+ GSwitchItAppletConfigUpdateImages (&globals.appletConfig, -+ &globals.kbdConfig); - -- while (globals.groupNames != NULL) { -- GSList * nn = globals.groupNames; -- globals.groupNames = g_slist_remove_link (globals.groupNames, nn); -- g_free (nn->data); -- g_slist_free_1 (nn); -- } -- globals.groupNames = GSwitchItConfigLoadGroupDescriptionsUtf8 (&globals.config); -+ g_strfreev (globals.groupNames); -+ globals.groupNames = -+ GSwitchItConfigLoadGroupDescriptionsUtf8 (&globals.config, -+ globals. -+ configRegistry); - -- ForAllApplets () -+ ForAllApplets () { - GSwitchItAppletReinitUi (sia); -- NextApplet -+ } -+ NextApplet (); - } - - /* Should be called once for all applets */ - static void --GSwitchItAppletStateCallback (XklStateChange changeType, -- int group, Bool restore) -+GSwitchItAppletStateCallback (XklEngine * engine, -+ XklEngineStateChange changeType, gint group, -+ gboolean restore) - { -- XklDebug (150, "group is now %d, restore: %d\n", group, restore); -+ xkl_debug (150, "group is now %d, restore: %d\n", group, restore); - - if (changeType == GROUP_CHANGED) { -- ForAllApplets () -- GSwitchItPluginManagerGroupChanged (&globals.pluginManager, -- sia->notebook, group); -- XklDebug (200, "do repaint\n"); -+ ForAllApplets () { -+ GSwitchItPluginManagerGroupChanged (&globals. -+ pluginManager, -+ sia->notebook, -+ group); -+ xkl_debug (200, "do repaint\n"); - GSwitchItAppletRevalidateGroup (sia, group); -- NextApplet -+ } -+ NextApplet (); - } - } - -@@ -241,37 +249,43 @@ - { - XEvent *xevent = (XEvent *) xev; - -- XklFilterEvents (xevent); -+ xkl_engine_filter_events (globals.engine, xevent); - switch (xevent->type) { - case DestroyNotify: - { -- XDestroyWindowEvent *de = (XDestroyWindowEvent *) xev; -- -- ForAllApplets () -- GdkWindow * w = sia->appletAncestor; -+ XDestroyWindowEvent *de = -+ (XDestroyWindowEvent *) xev; -+ -+ ForAllApplets () { -+ GdkWindow *w = sia->appletAncestor; - - /* compare the applet's parent window with the even window */ -- if (w != NULL && GDK_WINDOW_XID (w) == de->window) { -+ if (w != NULL -+ && GDK_WINDOW_XID (w) == de->window) { - sia->appletAncestor = NULL; - } -- NextApplet -- -+ } -+ NextApplet (); - } - break; - case ReparentNotify: - { - XReparentEvent *rne = (XReparentEvent *) xev; - -- ForAllApplets () -- GdkWindow * w = sia->appletAncestor; -+ ForAllApplets () { -+ GdkWindow *w = sia->appletAncestor; - - /* compare the applet's parent window with the even window */ -- if (w != NULL && GDK_WINDOW_XID (w) == rne->window) { -- /* if so - make it transparent...*/ -- XklSetTransparent (rne->window, TRUE); -- break; /* once is enough */ -+ if (w != NULL -+ && GDK_WINDOW_XID (w) == rne->window) { -+ /* if so - make it transparent... */ -+ xkl_engine_set_window_transparent -+ (globals.engine, rne->window, -+ TRUE); -+ break; /* once is enough */ - } -- NextApplet -+ } -+ NextApplet (); - } - break; - } -@@ -283,7 +297,7 @@ - GSwitchItAppletRevalidate (GSwitchItApplet * sia) - { - XklState *currentState; -- currentState = XklGetCurrentState (); -+ currentState = xkl_engine_get_current_state (globals.engine); - if (currentState->group >= 0) - GSwitchItAppletRevalidateGroup (sia, currentState->group); - } -@@ -318,8 +332,7 @@ - image = GDK_PIXBUF (pimage); - orient = - panel_applet_get_orient (PANEL_APPLET (sia->applet)); -- psize = -- panel_applet_get_size (PANEL_APPLET (sia->applet)); -+ psize = panel_applet_get_size (PANEL_APPLET (sia->applet)); - isize = psize - 4; - xyratio = - 1.0 * gdk_pixbuf_get_width (image) / -@@ -340,8 +353,11 @@ - ysize1 = psize / xyratio; - break; - } -- XklDebug (150, "Resizing the applet for size %d: %d X %d\n", isize, xsize, ysize); -- XklDebug (150, "Would be %d: %d X %d\n", psize, xsize1, ysize1); -+ xkl_debug (150, -+ "Resizing the applet for size %d: %d X %d\n", -+ isize, xsize, ysize); -+ xkl_debug (150, "Would be %d: %d X %d\n", psize, xsize1, -+ ysize1); - - scaled = - gdk_pixbuf_scale_simple (image, xsize, ysize, -@@ -350,7 +366,7 @@ - gtk_container_add (GTK_CONTAINER (sia->ebox), flagImg); - g_object_unref (G_OBJECT (scaled)); - } else { -- gpointer pcounter = NULL; -+ gpointer pcounter = NULL; - char *prevLayoutName = NULL; - char *labelTitle = NULL; - int counter = 0; -@@ -359,12 +375,15 @@ - GtkWidget *align, *label; - static GHashTable *shortDescrs = NULL; - if (group == 0) -- shortDescrs = g_hash_table_new_full (g_str_hash, g_str_equal, -- g_free, NULL); -+ shortDescrs = -+ g_hash_table_new_full (g_str_hash, g_str_equal, -+ g_free, NULL); - -- if (XklGetBackendFeatures() & XKLF_MULTIPLE_LAYOUTS_SUPPORTED) { -+ if (xkl_engine_get_features (globals.engine) & -+ XKLF_MULTIPLE_LAYOUTS_SUPPORTED) { - char *fullLayoutName = -- (char *) g_slist_nth_data (globals.kbdConfig.layouts, -+ (char *) g_slist_nth_data (globals.kbdConfig. -+ layouts, - group); - char *variantName; - if (!GSwitchItKbdConfigSplitItems -@@ -376,44 +395,45 @@ - sizeof (configItem.name), "%s", - layoutName); - -- if (XklConfigFindLayout (&configItem)) { -- char *sd = configItem.shortDescription; -+ if (xkl_config_registry_find_layout -+ (globals.configRegistry, &configItem)) { -+ char *sd = configItem.short_description; - if (sd != NULL && *sd != '\0') { -- layoutName = -+ layoutName = - g_locale_to_utf8 (sd, -1, NULL, - NULL, NULL); - } - } - } else -- layoutName = g_strdup (g_slist_nth_data (globals.groupNames, group)); -+ layoutName = g_strdup (globals.groupNames[group]); - - if (layoutName == NULL) - layoutName = g_strdup ("?"); - -- if (g_hash_table_lookup_extended (shortDescrs, layoutName, -- (gpointer*)&prevLayoutName, &pcounter)) -- { -+ if (g_hash_table_lookup_extended (shortDescrs, layoutName, -+ (gpointer *) & -+ prevLayoutName, -+ &pcounter)) { - /* "next" same description */ -- char* appendix = NULL; -- counter = GPOINTER_TO_INT(pcounter); -+ char *appendix = NULL; -+ counter = GPOINTER_TO_INT (pcounter); - appendix = g_strnfill (counter, '*'); -- labelTitle = g_strconcat (layoutName, appendix, NULL); -+ labelTitle = -+ g_strconcat (layoutName, appendix, NULL); - g_free (appendix); - /* layoutName is g_freed inside g_hash_table_insert function */ -- } -- else -- { -+ } else { - /* "first" time this description */ - labelTitle = g_strdup (layoutName); - } -- g_hash_table_insert (shortDescrs, layoutName, GINT_TO_POINTER (counter + 1)); -+ g_hash_table_insert (shortDescrs, layoutName, -+ GINT_TO_POINTER (counter + 1)); - - align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0); - label = gtk_label_new (labelTitle); - g_free (labelTitle); - -- if (group == XklGetNumGroups ()) -- { -+ if (group == xkl_engine_get_num_groups (globals.engine)) { - g_hash_table_destroy (shortDescrs); - shortDescrs = NULL; - } -@@ -425,13 +445,11 @@ - } - g_signal_connect (G_OBJECT (sia->ebox), - "button_press_event", -- G_CALLBACK -- (GSwitchItAppletButtonPressed), sia); -+ G_CALLBACK (GSwitchItAppletButtonPressed), sia); - - g_signal_connect (G_OBJECT (sia->applet), - "key_press_event", -- G_CALLBACK -- (GSwitchItAppletKeyPressed), sia); -+ G_CALLBACK (GSwitchItAppletKeyPressed), sia); - - return sia->ebox; - } -@@ -440,23 +458,24 @@ - GSwitchItAppletFillNotebook (GSwitchItApplet * sia) - { - int grp; -- int totalGroups = XklGetNumGroups (); -+ int totalGroups = xkl_engine_get_num_groups (globals.engine); - GtkNotebook *notebook = GTK_NOTEBOOK (sia->notebook); - - for (grp = 0; grp < totalGroups; grp++) { - GtkWidget *page, *decoratedPage; -- XklDebug (150, -- "The widget for the group %d is not ready, let's prepare it!\n", -- grp); -+ xkl_debug (150, -+ "The widget for the group %d is not ready, let's prepare it!\n", -+ grp); - page = GSwitchItAppletPrepareDrawing (sia, grp); - - decoratedPage = -- GSwitchItPluginManagerDecorateWidget (&globals.pluginManager, -+ GSwitchItPluginManagerDecorateWidget (&globals. -+ pluginManager, - page, grp, -- g_slist_nth_data ( -- globals.groupNames, -- grp), -- &globals.kbdConfig); -+ globals. -+ groupNames[grp], -+ &globals. -+ kbdConfig); - page = decoratedPage == NULL ? page : decoratedPage; - - gtk_notebook_append_page (notebook, page, NULL); -@@ -468,11 +487,12 @@ - GSwitchItAppletRevalidateGroup (GSwitchItApplet * sia, int group) - { - const char *pname; -- XklDebug (200, "Revalidating for group %d\n", group); -+ xkl_debug (200, "Revalidating for group %d\n", group); - -- gtk_notebook_set_current_page (GTK_NOTEBOOK (sia->notebook), group + 1); -+ gtk_notebook_set_current_page (GTK_NOTEBOOK (sia->notebook), -+ group + 1); - -- pname = g_slist_nth_data (globals.groupNames, group); -+ pname = globals.groupNames[group]; - GSwitchItAppletSetTooltip (sia, pname); - } - -@@ -486,56 +506,57 @@ - GSwitchItAppletRevalidate (sia); - } - --static void --GSwitchItAppletSetBackground(PanelAppletBackgroundType type, -- GtkRcStyle * rc_style, -- GtkWidget * w, -- GdkColor * color, -- GdkPixmap * pixmap) -+static void -+GSwitchItAppletSetBackground (PanelAppletBackgroundType type, -+ GtkRcStyle * rc_style, -+ GtkWidget * w, -+ GdkColor * color, GdkPixmap * pixmap) - { - GtkStyle *style; - - gtk_widget_set_style (GTK_WIDGET (w), NULL); - gtk_widget_modify_style (GTK_WIDGET (w), rc_style); - -- switch (type) -- { -+ switch (type) { - case PANEL_NO_BACKGROUND: -- break; -+ break; - case PANEL_COLOR_BACKGROUND: -- gtk_widget_modify_bg (GTK_WIDGET (w), -- GTK_STATE_NORMAL, color); -+ gtk_widget_modify_bg (GTK_WIDGET (w), -+ GTK_STATE_NORMAL, color); - break; - case PANEL_PIXMAP_BACKGROUND: - style = gtk_style_copy (w->style); - if (style->bg_pixmap[GTK_STATE_NORMAL]) -- g_object_unref (style->bg_pixmap[GTK_STATE_NORMAL]); -+ g_object_unref (style-> -+ bg_pixmap[GTK_STATE_NORMAL]); - style->bg_pixmap[GTK_STATE_NORMAL] = g_object_ref (pixmap); - gtk_widget_set_style (w, style); - g_object_unref (style); - break; - } - /* go down */ -- if (GTK_IS_CONTAINER (w)) -- { -- GList * child = gtk_container_get_children (GTK_CONTAINER (w)); -- while (child != NULL) -- { -+ if (GTK_IS_CONTAINER (w)) { -+ GList *child = -+ gtk_container_get_children (GTK_CONTAINER (w)); -+ while (child != NULL) { - GSwitchItAppletSetBackground (type, rc_style, -- GTK_WIDGET (child->data), color, pixmap); -+ GTK_WIDGET (child-> -+ data), -+ color, pixmap); - child = child->next; - } - } - } - - static void --GSwitchItAppletChangeBackground (PanelApplet * widget, -+GSwitchItAppletChangeBackground (PanelApplet * widget, - PanelAppletBackgroundType type, - GdkColor * color, GdkPixmap * pixmap, - GSwitchItApplet * sia) - { - GtkRcStyle *rc_style = gtk_rc_style_new (); -- GSwitchItAppletSetBackground(type, rc_style, sia->applet, color, pixmap); -+ GSwitchItAppletSetBackground (type, rc_style, sia->applet, color, -+ pixmap); - gtk_rc_style_unref (rc_style); - } - -@@ -552,7 +573,7 @@ - case GDK_Return: - case GDK_space: - case GDK_KP_Space: -- GSwitchItConfigLockNextGroup (); -+ GSwitchItConfigLockNextGroup (&globals.config); - return TRUE; - default: - break; -@@ -566,13 +587,12 @@ - GdkEventButton * - event, GSwitchItAppletConfig * config) - { -- GtkWidget * img = gtk_bin_get_child (GTK_BIN (widget)); -- XklDebug (150, "Flag img size %d x %d\n", -- img->allocation.width, -- img->allocation.height); -+ GtkWidget *img = gtk_bin_get_child (GTK_BIN (widget)); -+ xkl_debug (150, "Flag img size %d x %d\n", -+ img->allocation.width, img->allocation.height); - if (event->button == 1 && event->type == GDK_BUTTON_PRESS) { -- XklDebug (150, "Mouse button pressed on applet\n"); -- GSwitchItConfigLockNextGroup (); -+ xkl_debug (150, "Mouse button pressed on applet\n"); -+ GSwitchItConfigLockNextGroup (&globals.config); - return TRUE; - } - return FALSE; -@@ -595,114 +615,150 @@ - } - } - --static void --GSwitchItPreviewResponse (GtkWidget *dialog, gint resp) -+static void -+GSwitchItPreviewResponse (GtkWidget * dialog, gint resp) - { -- switch (resp) -- { -- case GTK_RESPONSE_HELP: -- GSwitchItHelp (GTK_WIDGET (dialog), -- "layout-view"); -- break; -- case GTK_RESPONSE_CLOSE: -- gtk_widget_destroy (dialog); -- default:; -+ GdkRectangle rect; -+ -+ switch (resp) { -+ case GTK_RESPONSE_HELP: -+ GSwitchItHelp (GTK_WIDGET (dialog), "layout-view"); -+ return; -+ case GTK_RESPONSE_CLOSE: -+ gtk_window_get_position (GTK_WINDOW (dialog), &rect.x, -+ &rect.y); -+ gtk_window_get_size (GTK_WINDOW (dialog), &rect.width, -+ &rect.height); -+ GSwitchItPreviewSave (&rect); -+ gtk_widget_destroy (dialog); - } - } - --static void --GSwitchItPreviewDestroy (GtkWidget *dialog, gint group) -+static void -+GSwitchItPreviewDestroy (GtkWidget * dialog, gint group) - { -- GladeXML *gladeData = GLADE_XML (gtk_object_get_data (GTK_OBJECT (dialog), "gladeData")); -+ GladeXML *gladeData = -+ GLADE_XML (gtk_object_get_data -+ (GTK_OBJECT (dialog), "gladeData")); - g_object_unref (G_OBJECT (gladeData)); -- g_hash_table_remove (globals.previewDialogs, GINT_TO_POINTER (group)); -+ g_hash_table_remove (globals.previewDialogs, -+ GINT_TO_POINTER (group)); - } - - void - GSwitchItAppletCmdPreview (BonoboUIComponent * - uic, GSwitchItApplet * sia, const gchar * verb) - { -- static KeyboardDrawingGroupLevel groupsLevels[] = { {0,1}, {0,3}, {0,0}, {0,2} }; -- static KeyboardDrawingGroupLevel * pGroupsLevels[] = { -- groupsLevels, groupsLevels + 1, groupsLevels + 2, groupsLevels + 3 }; -+ static KeyboardDrawingGroupLevel groupsLevels[] = -+ { {0, 1}, {0, 3}, {0, 0}, {0, 2} }; -+ static KeyboardDrawingGroupLevel *pGroupsLevels[] = { -+ groupsLevels, groupsLevels + 1, groupsLevels + 2, -+ groupsLevels + 3 -+ }; - #ifdef HAVE_XKB - GladeXML *gladeData; - GtkWidget *dialog, *kbdraw; - XkbComponentNamesRec componentNames; -- XklConfigRec xklData; -+ XklConfigRec *xklData; -+ GdkRectangle *rect; - #endif -- XklState *xklState = XklGetCurrentState (); -- gpointer p = g_hash_table_lookup (globals.previewDialogs, GINT_TO_POINTER (xklState->group)); -- if (p != NULL) -- { -+ XklState *xklState = -+ xkl_engine_get_current_state (globals.config.engine); -+ gpointer p = g_hash_table_lookup (globals.previewDialogs, -+ GINT_TO_POINTER (xklState-> -+ group)); -+ if (p != NULL) { - /* existing window */ - gtk_window_present (GTK_WINDOW (p)); - return; - } - #ifdef HAVE_XKB -- gladeData = glade_xml_new (GNOME_GLADEDIR "/gswitchit.glade", "gswitchit_layout_view", NULL); -- dialog = glade_xml_get_widget (gladeData, "gswitchit_layout_view"); -+ gladeData = -+ glade_xml_new (GNOME_GLADEDIR "/gswitchit.glade", -+ "gswitchit_layout_view", NULL); -+ dialog = glade_xml_get_widget (gladeData, "gswitchit_layout_view"); - kbdraw = keyboard_drawing_new (); - -- if (xklState->group >= 0 && -- xklState->group < g_slist_length (globals.groupNames)) -- { -+ if (xklState->group >= 0 && -+ xklState->group < g_strv_length (globals.groupNames)) { - char title[128]; - snprintf (title, sizeof (title), -- _("Keyboard Layout \"%s\""), -- g_slist_nth_data (globals.groupNames, xklState->group)); -- gtk_window_set_title (GTK_WINDOW(dialog), title); -- } -- -- keyboard_drawing_set_groups_levels (KEYBOARD_DRAWING (kbdraw), pGroupsLevels); -- -- XklConfigRecInit (&xklData); -- if (XklConfigGetFromServer (&xklData)) -- { -- if (xklState->group >= 0 && -- xklState->group < xklData.numLayouts && -- xklState->group < xklData.numVariants) -- { -- char * l = g_strdup (xklData.layouts[xklState->group]); -- char * v = g_strdup (xklData.variants[xklState->group]); -- char ** p; -+ _("Keyboard Layout \"%s\""), -+ globals.groupNames[xklState->group]); -+ gtk_window_set_title (GTK_WINDOW (dialog), title); -+ } -+ -+ keyboard_drawing_set_groups_levels (KEYBOARD_DRAWING (kbdraw), -+ pGroupsLevels); -+ -+ xklData = xkl_config_rec_new (); -+ if (xkl_config_rec_get_from_server (xklData, globals.engine)) { -+ int numLayouts = g_strv_length (xklData->layouts); -+ int numVariants = g_strv_length (xklData->variants); -+ if (xklState->group >= 0 && -+ xklState->group < numLayouts && -+ xklState->group < numVariants) { -+ char *l = -+ g_strdup (xklData->layouts[xklState->group]); -+ char *v = -+ g_strdup (xklData->variants[xklState->group]); -+ char **p; - int i; - -- if( ( p = xklData.layouts ) != NULL ) -- for( i = xklData.numLayouts; --i >= 0; ) -- free( *p++ ); -- -- if( ( p = xklData.variants ) != NULL ) -- for( i = xklData.numVariants; --i >= 0; ) -- free( *p++ ); -- -- xklData.numLayouts = xklData.numVariants = 1; -- xklData.layouts = realloc (xklData.layouts, sizeof (char*)); -- xklData.variants = realloc (xklData.variants, sizeof (char*)); -- xklData.layouts[0] = l; -- xklData.variants[0] = v; -+ if ((p = xklData->layouts) != NULL) -+ for (i = numLayouts; --i >= 0;) -+ g_free (*p++); -+ -+ if ((p = xklData->variants) != NULL) -+ for (i = numVariants; --i >= 0;) -+ g_free (*p++); -+ -+ xklData->layouts = -+ g_realloc (xklData->layouts, -+ sizeof (char *) * 2); -+ xklData->variants = -+ g_realloc (xklData->variants, -+ sizeof (char *) * 2); -+ xklData->layouts[0] = l; -+ xklData->variants[0] = v; -+ xklData->layouts[1] = xklData->variants[1] = NULL; - } - -- if (_XklXkbConfigPrepareNative (&xklData, &componentNames)) -- { -- keyboard_drawing_set_keyboard (KEYBOARD_DRAWING (kbdraw), &componentNames); -- _XklXkbConfigCleanupNative (&componentNames); -+ if (xkl_xkb_config_native_prepare -+ (globals.engine, xklData, &componentNames)) { -+ keyboard_drawing_set_keyboard (KEYBOARD_DRAWING -+ (kbdraw), -+ &componentNames); -+ xkl_xkb_config_native_cleanup (globals.engine, -+ &componentNames); - } - } -- XklConfigRecDestroy (&xklData); -+ g_object_unref (G_OBJECT (xklData)); - - gtk_object_set_data (GTK_OBJECT (dialog), "gladeData", gladeData); - g_signal_connect (GTK_OBJECT (dialog), - "destroy", G_CALLBACK (GSwitchItPreviewDestroy), - GINT_TO_POINTER (xklState->group)); -- g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK(GSwitchItPreviewResponse), NULL); -+ g_signal_connect (G_OBJECT (dialog), "response", -+ G_CALLBACK (GSwitchItPreviewResponse), NULL); -+ -+ rect = GSwitchItPreviewLoad (); -+ if (rect != NULL) { -+ gtk_window_move (GTK_WINDOW (dialog), rect->x, rect->y); -+ gtk_window_resize (GTK_WINDOW (dialog), rect->width, -+ rect->height); -+ g_free (rect); -+ } else -+ gtk_window_resize (GTK_WINDOW (dialog), 700, 400); - -- gtk_window_resize (GTK_WINDOW (dialog), 700, 400); - gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE); - -- gtk_container_add (GTK_CONTAINER (glade_xml_get_widget (gladeData, "preview_vbox")), kbdraw); -- -- g_hash_table_insert (globals.previewDialogs, GINT_TO_POINTER (xklState->group), dialog); -+ gtk_container_add (GTK_CONTAINER -+ (glade_xml_get_widget -+ (gladeData, "preview_vbox")), kbdraw); -+ -+ g_hash_table_insert (globals.previewDialogs, -+ GINT_TO_POINTER (xklState->group), dialog); - - gtk_widget_show_all (GTK_WIDGET (dialog)); - #endif -@@ -733,24 +789,26 @@ - XklState st; - Window cur; - if (sscanf (verb, "Group_%d", &st.group) != 1) { -- XklDebug (50, "Strange verb: [%s]\n", verb); -+ xkl_debug (50, "Strange verb: [%s]\n", verb); - return; - } - -- XklAllowOneSwitchToSecondaryGroup (); -- cur = XklGetCurrentWindow (); -+ xkl_engine_allow_one_switch_to_secondary_group (globals.engine); -+ cur = xkl_engine_get_current_window (globals.engine); - if (cur != (Window) NULL) { -- XklDebug (150, "Enforcing the state %d for window %lx\n", -- st.group, cur); -- XklSaveState (XklGetCurrentWindow (), &st); -+ xkl_debug (150, "Enforcing the state %d for window %lx\n", -+ st.group, cur); -+ xkl_engine_save_state (globals.engine, -+ xkl_engine_get_current_window -+ (globals.engine), &st); - /* XSetInputFocus( GDK_DISPLAY(), cur, RevertToNone, CurrentTime );*/ - } else { -- XklDebug (150, -- "??? Enforcing the state %d for unknown window\n", -- st.group); -+ xkl_debug (150, -+ "??? Enforcing the state %d for unknown window\n", -+ st.group); - /* strange situation - bad things can happen */ - } -- XklLockGroup (st.group); -+ xkl_engine_lock_group (globals.engine, st.group); - } - - void -@@ -772,20 +830,25 @@ - "Sergey V. Udaltsov<svu@gnome.org>", - NULL - }; -- -+ - const gchar *translator_credits = _("translator-credits"); -- -+ - gtk_show_about_dialog (NULL, -- "name", _("Keyboard Indicator"), -- "version", VERSION, -+ "name", _("Keyboard Indicator"), -+ "version", VERSION, - /* Translators: Please replace (C) with the proper copyright character. */ -- "copyright", _("Copyright (c) Sergey V. Udaltsov 1999-2004"), -- "comments", _("Keyboard layout indicator applet for GNOME"), -- "authors", authors, -- "documenters", documenters, -- "translator-credits", strcmp (translator_credits, "translator-credits") != 0 ? translator_credits : NULL, -- "logo-icon-name", "gswitchit-applet", -- NULL); -+ "copyright", -+ _ -+ ("Copyright (c) Sergey V. Udaltsov 1999-2004"), -+ "comments", -+ _ -+ ("Keyboard layout indicator applet for GNOME"), -+ "authors", authors, "documenters", -+ documenters, "translator-credits", -+ strcmp (translator_credits, -+ "translator-credits") != -+ 0 ? translator_credits : NULL, -+ "logo-icon-name", "gswitchit-applet", NULL); - } - - static void -@@ -795,45 +858,46 @@ - BonoboUIComponent *popup; - popup = - panel_applet_get_popup_component (PANEL_APPLET (sia->applet)); -- for (i = 0;;i++) { -+ for (i = 0;; i++) { - char path[80]; - g_snprintf (path, sizeof (path), - GROUPS_SUBMENU_PATH "/Group_%d", i); - if (bonobo_ui_component_path_exists (popup, path, NULL)) { - bonobo_ui_component_rm (popup, path, NULL); -- XklDebug (160, -- "Unregistered group menu item \'%s\'\n", -- path); -+ xkl_debug (160, -+ "Unregistered group menu item \'%s\'\n", -+ path); - } else - break; - } - -- XklDebug (160, "Unregistered group submenu\n"); -+ xkl_debug (160, "Unregistered group submenu\n"); - } - - static void - GSwitchItAppletSetupGroupsSubmenu (GSwitchItApplet * sia) - { -- unsigned i, nGroups; -- GSList *nameNode = globals.groupNames; -+ unsigned i; -+ gchar **currentName = globals.groupNames; - BonoboUIComponent *popup; - popup = - panel_applet_get_popup_component (PANEL_APPLET (sia->applet)); -- XklDebug (160, "Registering group submenu\n"); -- nGroups = g_slist_length (globals.groupNames); -- for (i = 0; i < nGroups; i++) { -+ xkl_debug (160, "Registering group submenu\n"); -+ for (i = 0; *currentName; i++, currentName++) { - char verb[40]; - BonoboUINode *node; - g_snprintf (verb, sizeof (verb), "Group_%d", i); - node = bonobo_ui_node_new ("menuitem"); - bonobo_ui_node_set_attr (node, "name", verb); - bonobo_ui_node_set_attr (node, "verb", verb); -- bonobo_ui_node_set_attr (node, "label", nameNode->data); -+ bonobo_ui_node_set_attr (node, "label", *currentName); - bonobo_ui_node_set_attr (node, "pixtype", "filename"); - if (globals.appletConfig.showFlags) { - char *imageFile = -- GSwitchItAppletConfigGetImagesFile (&globals.appletConfig, -- &globals.kbdConfig, -+ GSwitchItAppletConfigGetImagesFile (&globals. -+ appletConfig, -+ &globals. -+ kbdConfig, - i); - if (imageFile != NULL) { - bonobo_ui_node_set_attr (node, "pixname", -@@ -846,10 +910,9 @@ - bonobo_ui_component_add_verb (popup, verb, (BonoboUIVerbFn) - GSwitchItAppletCmdSetGroup, - sia); -- XklDebug (160, -- "Registered group menu item \'%s\' as \'%s\'\n", -- verb, nameNode->data); -- nameNode = g_slist_next (nameNode); -+ xkl_debug (160, -+ "Registered group menu item \'%s\' as \'%s\'\n", -+ verb, *currentName); - } - } - -@@ -874,14 +937,15 @@ - (GdkFilterFunc) GSwitchItAppletFilterXEvt, - NULL); - -- XklStartListen (XKLL_TRACK_KEYBOARD_STATE); -+ xkl_engine_start_listen (globals.engine, -+ XKLL_TRACK_KEYBOARD_STATE); - } - - /* Should be called once for all applets */ - static void - GSwitchItAppletStopListen (GSwitchItApplet * sia) - { -- XklStopListen (); -+ xkl_engine_stop_listen (globals.engine); - - gdk_window_remove_filter (NULL, (GdkFilterFunc) - GSwitchItAppletFilterXEvt, NULL); -@@ -894,13 +958,21 @@ - applet, GSwitchItApplet * sia); - - static gboolean -+GSwitchItAppletScrollCallback (GtkWidget * notebook) -+{ -+ /* mouse wheel events should be ignored, otherwise funny effects appear */ -+ return TRUE; -+} -+ -+static gboolean - GSwitchItAppletInit (GSwitchItApplet * sia, PanelApplet * applet) - { - GtkWidget *defDrawingArea; - GtkNotebook *notebook; - GConfClient *confClient; - -- XklDebug (100, "Starting the applet startup process for %p\n", sia); -+ xkl_debug (100, "Starting the applet startup process for %p\n", -+ sia); - - glade_gnome_init (); - gtk_window_set_default_icon_name ("gswitchit-applet"); -@@ -912,7 +984,6 @@ - notebook = GTK_NOTEBOOK (sia->notebook = gtk_notebook_new ()); - gtk_notebook_set_show_tabs (notebook, FALSE); - gtk_notebook_set_show_border (notebook, FALSE); -- - gtk_container_add (GTK_CONTAINER (sia->applet), - GTK_WIDGET (notebook)); - -@@ -931,15 +1002,21 @@ - - if (GSwitchItAppletFirstInstance ()) { - /* GSwitchItInstallGlibLogAppender( ); */ -- if (XklInit (GDK_DISPLAY ()) != 0) { -+ xkl_debug (100, "*** First instance *** \n"); -+ -+ memset (&globals, 0, sizeof (globals)); -+ -+ globals.engine = xkl_engine_get_instance (GDK_DISPLAY ()); -+ if (globals.engine == NULL) { - GSwitchItAppletSetTooltip (sia, -- _("XKB initialization error")); -+ _ -+ ("XKB initialization error")); - return TRUE; - } -- XklDebug (100, "*** First instance *** \n"); - -- XklConfigInit (); -- if (!XklConfigLoadRegistry ()) { -+ globals.configRegistry = -+ xkl_config_registry_get_instance (globals.engine); -+ if (!xkl_config_registry_load (globals.configRegistry)) { - GSwitchItAppletSetTooltip (sia, - _ - ("Error loading XKB configuration registry")); -@@ -948,18 +1025,25 @@ - - confClient = gconf_client_get_default (); - -- memset (&globals, 0, sizeof(globals)); -- -- XklRegisterStateCallback ((XklStateCallback) -- GSwitchItAppletStateCallback, NULL); -- XklRegisterConfigCallback ((XklConfigCallback) -- GSwitchItAppletKbdConfigCallback, NULL); -- GSwitchItPluginContainerInit (&globals.pluginContainer, confClient); -- -- -- GSwitchItConfigInit (&globals.config, confClient); -- GSwitchItKbdConfigInit (&globals.kbdConfig, confClient); -- GSwitchItAppletConfigInit (&globals.appletConfig, confClient); -+ g_signal_connect (globals.engine, "X-state-changed", -+ G_CALLBACK -+ (GSwitchItAppletStateCallback), NULL); -+ g_signal_connect (globals.engine, "X-config-changed", -+ G_CALLBACK -+ (GSwitchItAppletKbdConfigCallback), -+ NULL); -+ -+ -+ GSwitchItPluginContainerInit (&globals.pluginContainer, -+ confClient); -+ -+ -+ GSwitchItConfigInit (&globals.config, confClient, -+ globals.engine); -+ GSwitchItKbdConfigInit (&globals.kbdConfig, confClient, -+ globals.engine); -+ GSwitchItAppletConfigInit (&globals.appletConfig, -+ confClient, globals.engine); - - g_object_unref (confClient); - -@@ -967,37 +1051,53 @@ - GSwitchItConfigActivate (&globals.config); - GSwitchItKbdConfigLoadFromXCurrent (&globals.kbdConfig); - GSwitchItAppletConfigLoadFromGConf (&globals.appletConfig); -- GSwitchItAppletConfigUpdateImages (&globals.appletConfig, &globals.kbdConfig); -+ GSwitchItAppletConfigUpdateImages (&globals.appletConfig, -+ &globals.kbdConfig); - GSwitchItAppletConfigActivate (&globals.appletConfig); - -- globals.groupNames = GSwitchItConfigLoadGroupDescriptionsUtf8 (&globals.config); -- globals.previewDialogs = g_hash_table_new (g_direct_hash, g_direct_equal); -+ globals.groupNames = -+ GSwitchItConfigLoadGroupDescriptionsUtf8 (&globals. -+ config, -+ globals. -+ configRegistry); -+ globals.previewDialogs = -+ g_hash_table_new (g_direct_hash, g_direct_equal); - - GSwitchItPluginManagerInit (&globals.pluginManager); -- GSwitchItPluginManagerInitEnabledPlugins (&globals.pluginManager, -- &globals.pluginContainer, -- globals.appletConfig.enabledPlugins); -+ GSwitchItPluginManagerInitEnabledPlugins (&globals. -+ pluginManager, -+ &globals. -+ pluginContainer, -+ globals. -+ appletConfig. -+ enabledPlugins); - GSwitchItConfigStartListen (&globals.config, - (GConfClientNotifyFunc) -- GSwitchItConfigChanged, -- NULL); -+ GSwitchItConfigChanged, NULL); - GSwitchItAppletConfigStartListen (&globals.appletConfig, - (GConfClientNotifyFunc) - GSwitchItAppletConfigChanged, - NULL); - GSwitchItAppletStartListen (sia); - -- XklDebug (100, "*** First instance inited globals *** \n"); -+ xkl_debug (100, -+ "*** First instance inited globals *** \n"); - } - GSwitchItAppletFillNotebook (sia); - GSwitchItAppletRevalidate (sia); - - g_signal_connect (G_OBJECT (sia->applet), "change_size", -- G_CALLBACK (GSwitchItAppletChangePixelSize), sia); -+ G_CALLBACK (GSwitchItAppletChangePixelSize), -+ sia); - g_signal_connect (G_OBJECT (sia->applet), "change_background", -- G_CALLBACK (GSwitchItAppletChangeBackground), sia); -+ G_CALLBACK (GSwitchItAppletChangeBackground), -+ sia); - g_signal_connect (G_OBJECT (sia->applet), "button_press_event", - G_CALLBACK (GSwitchItAppletButtonPressed), sia); -+ g_signal_connect (sia->notebook, "scroll_event", -+ G_CALLBACK -+ (GSwitchItAppletScrollCallback), NULL); -+ - - gtk_widget_add_events (sia->applet, GDK_BUTTON_PRESS_MASK); - -@@ -1011,21 +1111,21 @@ - void - GSwitchItAppletTerm (PanelApplet * applet, GSwitchItApplet * sia) - { -- XklDebug (100, "Starting the applet shutdown process for %p\n", sia); -+ xkl_debug (100, "Starting the applet shutdown process for %p\n", -+ sia); - /* remove BEFORE all termination work is finished */ -- globals.appletInstances = g_slist_remove (globals.appletInstances, sia); -+ globals.appletInstances = -+ g_slist_remove (globals.appletInstances, sia); - - if (GSwitchItAppletLastInstance ()) { -- XklDebug (100, "*** Last instance *** \n"); -+ xkl_debug (100, "*** Last instance *** \n"); - GSwitchItAppletStopListen (sia); - - GSwitchItConfigStopListen (&globals.config); - GSwitchItAppletConfigStopListen (&globals.appletConfig); - -- XklRegisterStateCallback (NULL, NULL); -- XklRegisterConfigCallback (NULL, NULL); -- -- GSwitchItPluginManagerTermInitializedPlugins (&globals.pluginManager); -+ GSwitchItPluginManagerTermInitializedPlugins (&globals. -+ pluginManager); - GSwitchItPluginManagerTerm (&globals.pluginManager); - - g_hash_table_destroy (globals.previewDialogs); -@@ -1036,23 +1136,23 @@ - - GSwitchItPluginContainerTerm (&globals.pluginContainer); - -- XklConfigFreeRegistry (); -- XklConfigTerm (); -- XklDebug (100, "*** Last instance terminated globals *** \n"); -- XklTerm (); -+ xkl_debug (100, -+ "*** Last instance terminated globals *** \n"); -+ g_object_unref (G_OBJECT (globals.configRegistry)); -+ g_object_unref (G_OBJECT (globals.engine)); - } - - GSwitchItAppletCleanupNotebook (sia); - - g_free (sia); -- XklDebug (100, "The applet successfully terminated\n"); -+ xkl_debug (100, "The applet successfully terminated\n"); - } - - gboolean - GSwitchItAppletNew (PanelApplet * applet) - { - gboolean rv = TRUE; -- GSwitchItApplet * sia; -+ GSwitchItApplet *sia; - #if 0 - GLogLevelFlags fatal_mask; - fatal_mask = G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL; -@@ -1061,8 +1161,9 @@ - sia = g_new0 (GSwitchItApplet, 1); - rv = GSwitchItAppletInit (sia, applet); - /* append AFTER all initialization work is finished */ -- globals.appletInstances = g_slist_append (globals.appletInstances, sia); -- XklDebug (100, "The applet successfully started: %d\n", rv); -+ globals.appletInstances = -+ g_slist_append (globals.appletInstances, sia); -+ xkl_debug (100, "The applet successfully started: %d\n", rv); - return rv; - } - -@@ -1070,12 +1171,12 @@ - void - GSwitchItPluginContainerReinitUi (GSwitchItPluginContainer * pc) - { -- ForAllApplets () -+ ForAllApplets () { - GSwitchItAppletReinitUi (sia); -- NextApplet -+ } NextApplet (); - } - --GSList * -+gchar ** - GSwitchItPluginLoadLocalizedGroupNames (GSwitchItPluginContainer * pc) - { - return globals.groupNames; -diff -u gswitchit-/gswitchit-applet.h gswitchit/gswitchit-applet.h ---- gswitchit-/gswitchit-applet.h 2005-07-27 20:37:58.000000000 -0400 -+++ gswitchit/gswitchit-applet.h 2006-05-26 20:21:10.000000000 -0400 -@@ -38,9 +38,11 @@ - GSwitchItConfig config; - GSwitchItAppletConfig appletConfig; - GSwitchItKbdConfig kbdConfig; -- GSList *groupNames; -+ gchar **groupNames; - GSList *appletInstances; - GHashTable *previewDialogs; -+ XklEngine *engine; -+ XklConfigRegistry *configRegistry; - } GSwitchItAppletGlobals; - - extern void GSwitchItAppletRevalidate (GSwitchItApplet * sia); -diff -u gswitchit-/gswitchit-plugins-add.c gswitchit/gswitchit-plugins-add.c ---- gswitchit-/gswitchit-plugins-add.c 2005-03-16 07:51:35.000000000 -0500 -+++ gswitchit/gswitchit-plugins-add.c 2006-04-19 19:16:25.000000000 -0400 -@@ -26,7 +26,6 @@ - #include <libbonobo.h> - - #include <libxklavier/xklavier.h> --#include <libxklavier/xklavier_config.h> - - static void - CappletAddAvailablePluginFunc (const char *fullPath, -diff -u gswitchit-/gswitchit-plugins.c gswitchit/gswitchit-plugins.c ---- gswitchit-/gswitchit-plugins.c 2005-07-26 17:11:56.000000000 -0400 -+++ gswitchit/gswitchit-plugins.c 2006-05-26 20:21:10.000000000 -0400 -@@ -28,7 +28,6 @@ - #include <libgnomeui/gnome-ui-init.h> - - #include <libxklavier/xklavier.h> --#include <libxklavier/xklavier_config.h> - - static GSwitchItKbdConfig initialSysKbdConfig; - -@@ -257,7 +256,9 @@ - gtk_window_set_default_icon_name ("gswitchit-properties-capplet"); - - /* default domain! */ -- data = glade_xml_new (GNOME_GLADEDIR "/gswitchit-plugins.glade", "gswitchit_plugins", NULL); -+ data = -+ glade_xml_new (GNOME_GLADEDIR "/gswitchit-plugins.glade", -+ "gswitchit_plugins", NULL); - gswic->capplet = capplet = - glade_xml_get_widget (data, "gswitchit_plugins"); - -@@ -324,7 +325,7 @@ - memset (&gswic, 0, sizeof (gswic)); - gnome_program_init ("gswitchit", VERSION, - LIBGNOMEUI_MODULE, argc, argv, -- GNOME_PROGRAM_STANDARD_PROPERTIES, NULL); -+ GNOME_PROGRAM_STANDARD_PROPERTIES, NULL); - if (!gconf_init (argc, argv, &gconf_error)) { - g_warning (_("Failed to init GConf: %s\n"), - gconf_error->message); -@@ -332,24 +333,28 @@ - return 1; - } - gconf_error = NULL; -- /*GSwitchItInstallGlibLogAppender( );*/ -- XklInit (GDK_DISPLAY ()); -- XklConfigInit (); -- XklConfigLoadRegistry (); -+ /*GSwitchItInstallGlibLogAppender( ); */ -+ gswic.engine = xkl_engine_get_instance (GDK_DISPLAY ()); -+ gswic.configRegistry = -+ xkl_config_registry_get_instance (gswic.engine); - - confClient = gconf_client_get_default (); - GSwitchItPluginContainerInit (&gswic.pluginContainer, confClient); - g_object_unref (confClient); - -- GSwitchItKbdConfigInit (&gswic.kbdConfig, confClient); -- GSwitchItKbdConfigInit (&initialSysKbdConfig, confClient); -+ GSwitchItKbdConfigInit (&gswic.kbdConfig, confClient, -+ gswic.engine); -+ GSwitchItKbdConfigInit (&initialSysKbdConfig, confClient, -+ gswic.engine); - -- GSwitchItAppletConfigInit (&gswic.appletConfig, confClient); -+ GSwitchItAppletConfigInit (&gswic.appletConfig, confClient, -+ gswic.engine); - - GSwitchItPluginManagerInit (&gswic.pluginManager); - - GSwitchItKbdConfigLoadFromXInitial (&initialSysKbdConfig); -- GSwitchItKbdConfigLoadFromGConf (&gswic.kbdConfig, &initialSysKbdConfig); -+ GSwitchItKbdConfigLoadFromGConf (&gswic.kbdConfig, -+ &initialSysKbdConfig); - - GSwitchItAppletConfigLoadFromGConf (&gswic.appletConfig); - CappletSetup (&gswic); -@@ -363,9 +368,8 @@ - GSwitchItKbdConfigTerm (&initialSysKbdConfig); - - GSwitchItPluginContainerTerm (&gswic.pluginContainer); -- XklConfigFreeRegistry (); -- XklConfigTerm (); -- XklTerm (); -+ g_object_unref (G_OBJECT (gswic.configRegistry)); -+ g_object_unref (G_OBJECT (gswic.engine)); - return 0; - } - -@@ -375,8 +379,10 @@ - { - } - --GSList * -+gchar ** - GSwitchItPluginLoadLocalizedGroupNames (GSwitchItPluginContainer * pc) - { -- return GSwitchItConfigLoadGroupDescriptionsUtf8 (&(((GSwitchItPluginsCapplet *) pc)->config)); -+ return -+ GSwitchItConfigLoadGroupDescriptionsUtf8 (& -+ (((GSwitchItPluginsCapplet *) pc)->config), (((GSwitchItPluginsCapplet *) pc)->configRegistry)); - } -diff -u gswitchit-/gswitchit-plugins.h gswitchit/gswitchit-plugins.h ---- gswitchit-/gswitchit-plugins.h 2005-03-16 07:51:35.000000000 -0500 -+++ gswitchit/gswitchit-plugins.h 2006-04-19 19:16:25.000000000 -0400 -@@ -32,6 +32,8 @@ - GSwitchItAppletConfig appletConfig; - GSwitchItKbdConfig kbdConfig; - GSwitchItPluginManager pluginManager; -+ XklEngine *engine; -+ XklConfigRegistry *configRegistry; - } GSwitchItPluginsCapplet; - - #define NAME_COLUMN 0 -Common subdirectories: gswitchit-/help and gswitchit/help -Only in gswitchit: .indent.pro diff --git a/x11/gnome-applets/pkg-plist b/x11/gnome-applets/pkg-plist index 2cf9c24b3..66727bdfd 100644 --- a/x11/gnome-applets/pkg-plist +++ b/x11/gnome-applets/pkg-plist @@ -1,5 +1,6 @@ %%CPUFREQ%%bin/cpufreq-selector bin/gswitchit-plugins-capplet +%%PYTHON%%bin/invest-chart %%BATTERY%%etc/sound/events/battstat_applet.soundlist include/libgswitchit/gswitchit_config.h include/libgswitchit/gswitchit_plugin.h @@ -10,6 +11,30 @@ lib/libgweather.a lib/libgweather.la lib/libgweather.so lib/libgweather.so.0 +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/__init__.py +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/__init__.pyc +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/__init__.pyo +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/about.py +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/about.pyc +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/about.pyo +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/applet.py +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/applet.pyc +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/applet.pyo +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/chart.py +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/chart.pyc +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/chart.pyo +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/defs.py +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/defs.pyc +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/defs.pyo +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/preferences.py +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/preferences.pyc +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/preferences.pyo +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/quotes.py +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/quotes.pyc +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/quotes.pyo +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/widgets.py +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/widgets.pyc +%%PYTHON%%%%PYTHON_SITELIBDIR%%/invest/widgets.pyo libdata/bonobo/servers/GNOME_AccessxStatusApplet.server %%BATTERY%%libdata/bonobo/servers/GNOME_BattstatApplet.server libdata/bonobo/servers/GNOME_CDPlayerApplet.server @@ -29,6 +54,7 @@ libdata/bonobo/servers/GNOME_NullApplet_Factory.server libdata/bonobo/servers/GNOME_Panel_TrashApplet.server libdata/bonobo/servers/GNOME_Panel_WirelessApplet.server libdata/bonobo/servers/GNOME_StickyNotesApplet.server +%%PYTHON%%libdata/bonobo/servers/Invest_Applet.server libdata/pkgconfig/gswitchit.pc libdata/pkgconfig/gweather.pc libexec/accessx-status-applet @@ -39,8 +65,8 @@ libexec/drivemount_applet2 libexec/geyes_applet2 %%COMMANDER%%libexec/gnome-applets/mc-install-default-macros libexec/gnome-keyboard-applet -libexec/gtik2_applet2 libexec/gweather-applet-2 +%%PYTHON%%libexec/invest-applet %%COMMANDER%%libexec/mini_commander_applet libexec/mixer_applet2 libexec/modem_applet @@ -48,6 +74,7 @@ libexec/multiload-applet-2 libexec/null_applet libexec/stickynotes_applet libexec/trashapplet +%%PYTHON%%share/gnome/applications/invest-chart.desktop share/gnome/gnome-2.0/ui/GNOME_AccessxApplet.xml %%BATTERY%%share/gnome/gnome-2.0/ui/GNOME_BattstatApplet.xml %%CPUFREQ%%share/gnome/gnome-2.0/ui/GNOME_CPUFreqApplet.xml @@ -56,13 +83,16 @@ share/gnome/gnome-2.0/ui/GNOME_DriveMountApplet.xml share/gnome/gnome-2.0/ui/GNOME_GSwitchItApplet.xml share/gnome/gnome-2.0/ui/GNOME_GWeatherApplet.xml share/gnome/gnome-2.0/ui/GNOME_GeyesApplet.xml -share/gnome/gnome-2.0/ui/GNOME_GtikApplet.xml %%COMMANDER%%share/gnome/gnome-2.0/ui/GNOME_MiniCommanderApplet.xml share/gnome/gnome-2.0/ui/GNOME_MixerApplet.xml share/gnome/gnome-2.0/ui/GNOME_ModemLights.xml share/gnome/gnome-2.0/ui/GNOME_MultiloadApplet.xml share/gnome/gnome-2.0/ui/GNOME_Panel_TrashApplet.xml share/gnome/gnome-2.0/ui/GNOME_StickyNotesApplet.xml +%%PYTHON%%share/gnome/gnome-2.0/ui/Invest_Applet.xml +%%PYTHON%%share/gnome/gnome-applets/art/invest-16.png +%%PYTHON%%share/gnome/gnome-applets/art/invest-button.png +%%PYTHON%%share/gnome/gnome-applets/art/invest.svg share/gnome/gnome-applets/geyes/Bizarre/Bizarre-eye.png share/gnome/gnome-applets/geyes/Bizarre/Bizarre-pupil.png share/gnome/gnome-applets/geyes/Bizarre/config @@ -80,10 +110,12 @@ share/gnome/gnome-applets/geyes/Horrid/horrid_eye.png share/gnome/gnome-applets/geyes/Horrid/horrid_pupil.png %%BATTERY%%share/gnome/gnome-applets/glade/battstat_applet.glade %%CPUFREQ%%share/gnome/gnome-applets/glade/cpufreq-preferences.glade +%%PYTHON%%share/gnome/gnome-applets/glade/financialchart.glade share/gnome/gnome-applets/glade/gswitchit-plugins.glade share/gnome/gnome-applets/glade/gswitchit.glade %%COMMANDER%%share/gnome/gnome-applets/glade/mini-commander.glade share/gnome/gnome-applets/glade/modemlights.glade +%%PYTHON%%share/gnome/gnome-applets/glade/prefs-dialog.glade share/gnome/gnome-applets/glade/stickynotes.glade share/gnome/gnome-applets/glade/trashapplet.glade share/gnome/gnome-applets/gweather/Locations.xml @@ -295,6 +327,16 @@ share/gnome/help/char-palette/uk/figures/charpick_characters.png %%CPUFREQ%%share/gnome/help/cpufreq-applet/uk/figures/cpufreq-applet-selector-both.png %%CPUFREQ%%share/gnome/help/cpufreq-applet/uk/figures/cpufreq-applet-selector.png %%CPUFREQ%%share/gnome/help/cpufreq-applet/uk/figures/cpufreq-applet.png +%%CPUFREQ%%share/gnome/help/cpufreq-applet/zh_CN/cpufreq-applet.xml +%%CPUFREQ%%share/gnome/help/cpufreq-applet/zh_CN/figures/cpufreq-100.png +%%CPUFREQ%%share/gnome/help/cpufreq-applet/zh_CN/figures/cpufreq-25.png +%%CPUFREQ%%share/gnome/help/cpufreq-applet/zh_CN/figures/cpufreq-50.png +%%CPUFREQ%%share/gnome/help/cpufreq-applet/zh_CN/figures/cpufreq-75.png +%%CPUFREQ%%share/gnome/help/cpufreq-applet/zh_CN/figures/cpufreq-applet-preferences-smp.png +%%CPUFREQ%%share/gnome/help/cpufreq-applet/zh_CN/figures/cpufreq-applet-preferences.png +%%CPUFREQ%%share/gnome/help/cpufreq-applet/zh_CN/figures/cpufreq-applet-selector-both.png +%%CPUFREQ%%share/gnome/help/cpufreq-applet/zh_CN/figures/cpufreq-applet-selector.png +%%CPUFREQ%%share/gnome/help/cpufreq-applet/zh_CN/figures/cpufreq-applet.png share/gnome/help/drivemount/C/drivemount.xml share/gnome/help/drivemount/C/figures/drivemount-applet_eject.png share/gnome/help/drivemount/C/figures/drivemount-applet_example.png @@ -332,6 +374,12 @@ share/gnome/help/drivemount/uk/figures/drivemount-applet_example.png share/gnome/help/drivemount/uk/figures/drivemount-applet_mount.png share/gnome/help/drivemount/uk/figures/drivemount-applet_open.png share/gnome/help/drivemount/uk/figures/drivemount-applet_status.png +share/gnome/help/drivemount/zh_CN/drivemount.xml +share/gnome/help/drivemount/zh_CN/figures/drivemount-applet_eject.png +share/gnome/help/drivemount/zh_CN/figures/drivemount-applet_example.png +share/gnome/help/drivemount/zh_CN/figures/drivemount-applet_mount.png +share/gnome/help/drivemount/zh_CN/figures/drivemount-applet_open.png +share/gnome/help/drivemount/zh_CN/figures/drivemount-applet_status.png share/gnome/help/geyes/C/figures/geyes_applet.png share/gnome/help/geyes/C/geyes.xml share/gnome/help/geyes/C/legal.xml @@ -352,15 +400,6 @@ share/gnome/help/gswitchit/C/legal.xml share/gnome/help/gswitchit/es/gswitchit.xml share/gnome/help/gswitchit/fr/gswitchit.xml share/gnome/help/gswitchit/uk/gswitchit.xml -share/gnome/help/gtik2_applet2/C/figures/gtik_applet.png -share/gnome/help/gtik2_applet2/C/gtik2_applet2.xml -share/gnome/help/gtik2_applet2/C/legal.xml -share/gnome/help/gtik2_applet2/es/figures/gtik_applet.png -share/gnome/help/gtik2_applet2/es/gtik2_applet2.xml -share/gnome/help/gtik2_applet2/fr/figures/gtik_applet.png -share/gnome/help/gtik2_applet2/fr/gtik2_applet2.xml -share/gnome/help/gtik2_applet2/uk/figures/gtik_applet.png -share/gnome/help/gtik2_applet2/uk/gtik2_applet2.xml share/gnome/help/gweather/C/figures/gweather-details.png share/gnome/help/gweather/C/figures/gweather-menu-prefs.png share/gnome/help/gweather/C/figures/gweather-prefs-general.png @@ -535,12 +574,14 @@ share/gnome/omf/char-palette/char-palette-uk.omf %%CPUFREQ%%share/gnome/omf/cpufreq-applet/cpufreq-applet-es.omf %%CPUFREQ%%share/gnome/omf/cpufreq-applet/cpufreq-applet-nl.omf %%CPUFREQ%%share/gnome/omf/cpufreq-applet/cpufreq-applet-uk.omf +%%CPUFREQ%%share/gnome/omf/cpufreq-applet/cpufreq-applet-zh_CN.omf share/gnome/omf/drivemount/drivemount-C.omf share/gnome/omf/drivemount/drivemount-es.omf share/gnome/omf/drivemount/drivemount-fr.omf share/gnome/omf/drivemount/drivemount-it.omf share/gnome/omf/drivemount/drivemount-pa.omf share/gnome/omf/drivemount/drivemount-uk.omf +share/gnome/omf/drivemount/drivemount-zh_CN.omf share/gnome/omf/geyes/geyes-C.omf share/gnome/omf/geyes/geyes-bg.omf share/gnome/omf/geyes/geyes-es.omf @@ -552,10 +593,6 @@ share/gnome/omf/gswitchit/gswitchit-C.omf share/gnome/omf/gswitchit/gswitchit-es.omf share/gnome/omf/gswitchit/gswitchit-fr.omf share/gnome/omf/gswitchit/gswitchit-uk.omf -share/gnome/omf/gtik2_applet2/gtik2_applet2-C.omf -share/gnome/omf/gtik2_applet2/gtik2_applet2-es.omf -share/gnome/omf/gtik2_applet2/gtik2_applet2-fr.omf -share/gnome/omf/gtik2_applet2/gtik2_applet2-uk.omf share/gnome/omf/gweather/gweather-C.omf share/gnome/omf/gweather/gweather-es.omf share/gnome/omf/gweather/gweather-fr.omf @@ -624,6 +661,7 @@ share/gnome/pixmaps/accessx-status-applet/sticky-super-none.png %%CPUFREQ%%share/gnome/pixmaps/cpufreq-applet/cpufreq-75.png %%CPUFREQ%%share/gnome/pixmaps/cpufreq-applet/cpufreq-applet.png %%CPUFREQ%%share/gnome/pixmaps/cpufreq-applet/cpufreq-na.png +%%PYTHON%%share/gnome/pixmaps/invest-big.png share/gnome/pixmaps/stickynotes/close.png share/gnome/pixmaps/stickynotes/locked.png share/gnome/pixmaps/stickynotes/resize_se.png @@ -723,7 +761,6 @@ share/icons/hicolor/48x48/apps/gnome-cpu.png share/icons/hicolor/48x48/apps/gnome-eyes.png %%COMMANDER%%share/icons/hicolor/48x48/apps/gnome-mini-commander.png share/icons/hicolor/48x48/apps/gnome-modem.png -share/icons/hicolor/48x48/apps/gnome-money.png share/icons/hicolor/48x48/apps/gswitchit-applet.png share/icons/hicolor/48x48/apps/gswitchit-properties-capplet.png share/locale/am/LC_MESSAGES/gnome-applets-2.0.mo @@ -732,7 +769,6 @@ share/locale/az/LC_MESSAGES/gnome-applets-2.0.mo share/locale/be/LC_MESSAGES/gnome-applets-2.0.mo share/locale/bg/LC_MESSAGES/gnome-applets-2.0.mo share/locale/bn/LC_MESSAGES/gnome-applets-2.0.mo -share/locale/br/LC_MESSAGES/gnome-applets-2.0.mo share/locale/bs/LC_MESSAGES/gnome-applets-2.0.mo share/locale/ca/LC_MESSAGES/gnome-applets-2.0.mo share/locale/cs/LC_MESSAGES/gnome-applets-2.0.mo @@ -756,7 +792,6 @@ share/locale/he/LC_MESSAGES/gnome-applets-2.0.mo share/locale/hi/LC_MESSAGES/gnome-applets-2.0.mo share/locale/hr/LC_MESSAGES/gnome-applets-2.0.mo share/locale/hu/LC_MESSAGES/gnome-applets-2.0.mo -share/locale/hy/LC_MESSAGES/gnome-applets-2.0.mo share/locale/id/LC_MESSAGES/gnome-applets-2.0.mo share/locale/is/LC_MESSAGES/gnome-applets-2.0.mo share/locale/it/LC_MESSAGES/gnome-applets-2.0.mo @@ -764,18 +799,15 @@ share/locale/ja/LC_MESSAGES/gnome-applets-2.0.mo share/locale/ka/LC_MESSAGES/gnome-applets-2.0.mo share/locale/ko/LC_MESSAGES/gnome-applets-2.0.mo share/locale/ku/LC_MESSAGES/gnome-applets-2.0.mo -share/locale/ky/LC_MESSAGES/gnome-applets-2.0.mo share/locale/lt/LC_MESSAGES/gnome-applets-2.0.mo share/locale/lv/LC_MESSAGES/gnome-applets-2.0.mo share/locale/mk/LC_MESSAGES/gnome-applets-2.0.mo -share/locale/ml/LC_MESSAGES/gnome-applets-2.0.mo share/locale/mn/LC_MESSAGES/gnome-applets-2.0.mo share/locale/ms/LC_MESSAGES/gnome-applets-2.0.mo share/locale/nb/LC_MESSAGES/gnome-applets-2.0.mo share/locale/ne/LC_MESSAGES/gnome-applets-2.0.mo share/locale/nl/LC_MESSAGES/gnome-applets-2.0.mo share/locale/nn/LC_MESSAGES/gnome-applets-2.0.mo -share/locale/no/LC_MESSAGES/gnome-applets-2.0.mo share/locale/pa/LC_MESSAGES/gnome-applets-2.0.mo share/locale/pl/LC_MESSAGES/gnome-applets-2.0.mo share/locale/pt/LC_MESSAGES/gnome-applets-2.0.mo @@ -808,16 +840,10 @@ share/locale/zh_TW/LC_MESSAGES/gnome-applets-2.0.mo @dirrmtry share/locale/te @dirrmtry share/locale/rw/LC_MESSAGES @dirrmtry share/locale/rw -@dirrmtry share/locale/ky/LC_MESSAGES -@dirrmtry share/locale/ky @dirrmtry share/locale/ku/LC_MESSAGES @dirrmtry share/locale/ku -@dirrmtry share/locale/hy/LC_MESSAGES -@dirrmtry share/locale/hy @dirrmtry share/locale/dz/LC_MESSAGES @dirrmtry share/locale/dz -@dirrmtry share/locale/br/LC_MESSAGES -@dirrmtry share/locale/br @dirrmtry share/icons/hicolor/48x48/apps @dirrmtry share/icons/hicolor/48x48 @dirrmtry share/icons/hicolor @@ -831,7 +857,6 @@ share/locale/zh_TW/LC_MESSAGES/gnome-applets-2.0.mo @dirrm share/gnome/omf/mixer_applet2 %%COMMANDER%%@dirrm share/gnome/omf/command-line @dirrm share/gnome/omf/gweather -@dirrm share/gnome/omf/gtik2_applet2 @dirrm share/gnome/omf/gswitchit @dirrm share/gnome/omf/geyes @dirrm share/gnome/omf/drivemount @@ -896,15 +921,6 @@ share/locale/zh_TW/LC_MESSAGES/gnome-applets-2.0.mo @dirrm share/gnome/help/gweather/C/figures @dirrm share/gnome/help/gweather/C @dirrm share/gnome/help/gweather -@dirrm share/gnome/help/gtik2_applet2/uk/figures -@dirrm share/gnome/help/gtik2_applet2/uk -@dirrm share/gnome/help/gtik2_applet2/fr/figures -@dirrm share/gnome/help/gtik2_applet2/fr -@dirrm share/gnome/help/gtik2_applet2/es/figures -@dirrm share/gnome/help/gtik2_applet2/es -@dirrm share/gnome/help/gtik2_applet2/C/figures -@dirrm share/gnome/help/gtik2_applet2/C -@dirrm share/gnome/help/gtik2_applet2 @dirrm share/gnome/help/gswitchit/uk @dirrm share/gnome/help/gswitchit/fr @dirrm share/gnome/help/gswitchit/es @@ -925,6 +941,8 @@ share/locale/zh_TW/LC_MESSAGES/gnome-applets-2.0.mo @dirrm share/gnome/help/geyes/C/figures @dirrm share/gnome/help/geyes/C @dirrm share/gnome/help/geyes +@dirrm share/gnome/help/drivemount/zh_CN/figures +@dirrm share/gnome/help/drivemount/zh_CN @dirrm share/gnome/help/drivemount/uk/figures @dirrm share/gnome/help/drivemount/uk @dirrm share/gnome/help/drivemount/pa/figures @@ -938,6 +956,8 @@ share/locale/zh_TW/LC_MESSAGES/gnome-applets-2.0.mo @dirrm share/gnome/help/drivemount/C/figures @dirrm share/gnome/help/drivemount/C @dirrm share/gnome/help/drivemount +%%CPUFREQ%%@dirrm share/gnome/help/cpufreq-applet/zh_CN/figures +%%CPUFREQ%%@dirrm share/gnome/help/cpufreq-applet/zh_CN %%CPUFREQ%%@dirrm share/gnome/help/cpufreq-applet/uk/figures %%CPUFREQ%%@dirrm share/gnome/help/cpufreq-applet/uk %%CPUFREQ%%@dirrm share/gnome/help/cpufreq-applet/nl/figures @@ -1007,6 +1027,9 @@ share/locale/zh_TW/LC_MESSAGES/gnome-applets-2.0.mo @dirrm share/gnome/gnome-applets/geyes/Bloodshot @dirrm share/gnome/gnome-applets/geyes/Bizarre @dirrm share/gnome/gnome-applets/geyes +@dirrm share/gnome/gnome-applets/art @dirrm share/gnome/gnome-applets +%%PYTHON%%@dirrm %%PYTHON_SITELIBDIR%%/invest +%%PYTHON%%@dirrmtry %%PYTHON_SITELIBDIR%% @dirrm include/libgweather @dirrm include/libgswitchit |