summaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2004-11-24 12:29:56 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2004-11-24 12:29:56 +0800
commita98185fa9f7eb1b43fe672928bf9e59a8c2fd430 (patch)
tree633264df5c269a34d3f3131bcaa66f91e2a05bbc /sysutils
parent3080e9561d8274549e59c8351b13e336906e31cd (diff)
downloadmarcuscom-ports-a98185fa9f7eb1b43fe672928bf9e59a8c2fd430.tar
marcuscom-ports-a98185fa9f7eb1b43fe672928bf9e59a8c2fd430.tar.gz
marcuscom-ports-a98185fa9f7eb1b43fe672928bf9e59a8c2fd430.tar.bz2
marcuscom-ports-a98185fa9f7eb1b43fe672928bf9e59a8c2fd430.tar.lz
marcuscom-ports-a98185fa9f7eb1b43fe672928bf9e59a8c2fd430.tar.xz
marcuscom-ports-a98185fa9f7eb1b43fe672928bf9e59a8c2fd430.tar.zst
marcuscom-ports-a98185fa9f7eb1b43fe672928bf9e59a8c2fd430.zip
Fix build with new libxklavier.
Reported by: mezz Obtained from: GNOME CVS git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@3123 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/gnome-control-center/files/patch-libgswitchit_gswitchit_config.c65
-rw-r--r--sysutils/gnomecontrolcenter2/files/patch-libgswitchit_gswitchit_config.c65
2 files changed, 130 insertions, 0 deletions
diff --git a/sysutils/gnome-control-center/files/patch-libgswitchit_gswitchit_config.c b/sysutils/gnome-control-center/files/patch-libgswitchit_gswitchit_config.c
new file mode 100644
index 000000000..8eeb90fb3
--- /dev/null
+++ b/sysutils/gnome-control-center/files/patch-libgswitchit_gswitchit_config.c
@@ -0,0 +1,65 @@
+--- libgswitchit/gswitchit_config.c.orig Tue Nov 23 23:22:30 2004
++++ libgswitchit/gswitchit_config.c Tue Nov 23 23:29:11 2004
+@@ -380,44 +380,6 @@
+ }
+
+ static gboolean
+-_GSwitchItXkbConfigDoWithSettings (GSwitchItXkbConfig *
+- xkbConfig,
+- gboolean activate,
+- const char *psFileName)
+-{
+- gboolean rv = FALSE;
+-
+- XklConfigRec data;
+- XklConfigRecInit (&data);
+-
+- _GSwitchItXkbConfigCopyToXklConfig (xkbConfig, &data);
+-
+- if (activate) {
+- rv = XklConfigActivate (&data, NULL);
+- } else {
+- char *home = getenv ("HOME");
+- char xkmFileName[PATH_MAX];
+- char cmd[PATH_MAX * 2 + 20];
+- int status;
+- g_snprintf (xkmFileName, sizeof (xkmFileName),
+- "%s/.gnome_private/xkbpreview.xkm", home);
+- rv = XklConfigWriteXKMFile (xkmFileName, &data, NULL);
+- if (rv) {
+- g_snprintf (cmd, sizeof (cmd),
+- "xkbprint -full -color %s %s",
+- xkmFileName, psFileName);
+- status = system (cmd);
+- XklDebug (100, "Res: [%d]\n", status);
+- //unlink( xkmFileName );
+- } else {
+- XklDebug (10, "Could not create XKM file!\n");
+- }
+- }
+- XklConfigRecDestroy (&data);
+- return rv;
+-}
+-
+-static gboolean
+ _GSListStrEqual (GSList * l1, GSList * l2)
+ {
+ if (l1 == l2)
+@@ -752,7 +714,16 @@
+ gboolean
+ GSwitchItXkbConfigActivate (GSwitchItXkbConfig * xkbConfig)
+ {
+- return _GSwitchItXkbConfigDoWithSettings (xkbConfig, TRUE, NULL);
++ gboolean rv = FALSE;
++
++ XklConfigRec data;
++ XklConfigRecInit (&data);
++
++ _GSwitchItXkbConfigCopyToXklConfig (xkbConfig, &data);
++
++ rv = XklConfigActivate (&data);
++ XklConfigRecDestroy (&data);
++ return rv;
+ }
+
+ gboolean
diff --git a/sysutils/gnomecontrolcenter2/files/patch-libgswitchit_gswitchit_config.c b/sysutils/gnomecontrolcenter2/files/patch-libgswitchit_gswitchit_config.c
new file mode 100644
index 000000000..8eeb90fb3
--- /dev/null
+++ b/sysutils/gnomecontrolcenter2/files/patch-libgswitchit_gswitchit_config.c
@@ -0,0 +1,65 @@
+--- libgswitchit/gswitchit_config.c.orig Tue Nov 23 23:22:30 2004
++++ libgswitchit/gswitchit_config.c Tue Nov 23 23:29:11 2004
+@@ -380,44 +380,6 @@
+ }
+
+ static gboolean
+-_GSwitchItXkbConfigDoWithSettings (GSwitchItXkbConfig *
+- xkbConfig,
+- gboolean activate,
+- const char *psFileName)
+-{
+- gboolean rv = FALSE;
+-
+- XklConfigRec data;
+- XklConfigRecInit (&data);
+-
+- _GSwitchItXkbConfigCopyToXklConfig (xkbConfig, &data);
+-
+- if (activate) {
+- rv = XklConfigActivate (&data, NULL);
+- } else {
+- char *home = getenv ("HOME");
+- char xkmFileName[PATH_MAX];
+- char cmd[PATH_MAX * 2 + 20];
+- int status;
+- g_snprintf (xkmFileName, sizeof (xkmFileName),
+- "%s/.gnome_private/xkbpreview.xkm", home);
+- rv = XklConfigWriteXKMFile (xkmFileName, &data, NULL);
+- if (rv) {
+- g_snprintf (cmd, sizeof (cmd),
+- "xkbprint -full -color %s %s",
+- xkmFileName, psFileName);
+- status = system (cmd);
+- XklDebug (100, "Res: [%d]\n", status);
+- //unlink( xkmFileName );
+- } else {
+- XklDebug (10, "Could not create XKM file!\n");
+- }
+- }
+- XklConfigRecDestroy (&data);
+- return rv;
+-}
+-
+-static gboolean
+ _GSListStrEqual (GSList * l1, GSList * l2)
+ {
+ if (l1 == l2)
+@@ -752,7 +714,16 @@
+ gboolean
+ GSwitchItXkbConfigActivate (GSwitchItXkbConfig * xkbConfig)
+ {
+- return _GSwitchItXkbConfigDoWithSettings (xkbConfig, TRUE, NULL);
++ gboolean rv = FALSE;
++
++ XklConfigRec data;
++ XklConfigRecInit (&data);
++
++ _GSwitchItXkbConfigCopyToXklConfig (xkbConfig, &data);
++
++ rv = XklConfigActivate (&data);
++ XklConfigRecDestroy (&data);
++ return rv;
+ }
+
+ gboolean