summaryrefslogtreecommitdiff
path: root/sysutils/xfce4-xkb-plugin
diff options
context:
space:
mode:
authorkristerw <kristerw@pkgsrc.org>2004-06-28 01:12:09 +0000
committerkristerw <kristerw@pkgsrc.org>2004-06-28 01:12:09 +0000
commit2116a56974a712145e52c01689820c83882067b5 (patch)
treeaa033ab6f3966c6423101f687aaed5ed33030380 /sysutils/xfce4-xkb-plugin
parentd9b4231597e4d00393043f50940d990eeee89f4b (diff)
downloadpkgsrc-2116a56974a712145e52c01689820c83882067b5.tar.gz
Fix some C99 variable definitions, to make this build with gcc 2.95.
Diffstat (limited to 'sysutils/xfce4-xkb-plugin')
-rw-r--r--sysutils/xfce4-xkb-plugin/distinfo4
-rw-r--r--sysutils/xfce4-xkb-plugin/patches/patch-aa25
-rw-r--r--sysutils/xfce4-xkb-plugin/patches/patch-ab108
3 files changed, 136 insertions, 1 deletions
diff --git a/sysutils/xfce4-xkb-plugin/distinfo b/sysutils/xfce4-xkb-plugin/distinfo
index 2edafa0e37a..165c904f8a2 100644
--- a/sysutils/xfce4-xkb-plugin/distinfo
+++ b/sysutils/xfce4-xkb-plugin/distinfo
@@ -1,4 +1,6 @@
-$NetBSD: distinfo,v 1.1.1.1 2004/06/21 06:08:34 martti Exp $
+$NetBSD: distinfo,v 1.2 2004/06/28 01:12:09 kristerw Exp $
SHA1 (xfce4-xkb-plugin-0.3.1.tar.gz) = 19e1c72bda1d9bffaafa08ef512c17dc1b84c130
Size (xfce4-xkb-plugin-0.3.1.tar.gz) = 334044 bytes
+SHA1 (patch-aa) = c7f554bf8c64c370930b302129b413f406dab98c
+SHA1 (patch-ab) = bd4263562d4268e4dc4b89b75a3a5cdebe128672
diff --git a/sysutils/xfce4-xkb-plugin/patches/patch-aa b/sysutils/xfce4-xkb-plugin/patches/patch-aa
new file mode 100644
index 00000000000..a17d0ebfbc6
--- /dev/null
+++ b/sysutils/xfce4-xkb-plugin/patches/patch-aa
@@ -0,0 +1,25 @@
+$NetBSD: patch-aa,v 1.1 2004/06/28 01:12:09 kristerw Exp $
+
+--- panel-plugin/xfce4-xkb-plugin.c.orig Mon Jun 28 02:48:38 2004
++++ panel-plugin/xfce4-xkb-plugin.c Mon Jun 28 02:50:08 2004
+@@ -87,7 +87,7 @@
+
+ xkb_refresh_gui(xkb);
+
+- char *initial_group = initialize_xkb(xkb);
++ initialize_xkb(xkb);
+
+ channel = g_io_channel_unix_new(get_connection_number());
+ source_id = g_io_add_watch(channel, G_IO_IN | G_IO_PRI, (GIOFunc) &gio_callback, (gpointer) xkb);
+@@ -113,10 +113,9 @@
+ }
+
+ static void xkb_free(Control *ctrl) {
++ t_xkb *xkb;
+ g_source_remove(source_id);
+ deinitialize_xkb();
+-
+- t_xkb *xkb;
+
+ g_return_if_fail(ctrl != NULL);
+ g_return_if_fail(ctrl->data != NULL);
diff --git a/sysutils/xfce4-xkb-plugin/patches/patch-ab b/sysutils/xfce4-xkb-plugin/patches/patch-ab
new file mode 100644
index 00000000000..deae926294f
--- /dev/null
+++ b/sysutils/xfce4-xkb-plugin/patches/patch-ab
@@ -0,0 +1,108 @@
+$NetBSD: patch-ab,v 1.1 2004/06/28 01:12:09 kristerw Exp $
+
+--- panel-plugin/xkb.c.orig Mon Jun 28 02:50:20 2004
++++ panel-plugin/xkb.c Mon Jun 28 02:57:50 2004
+@@ -105,16 +105,16 @@
+ const Atom *group_source;
+ Bool status;
+ int major, minor, oppcode;
++ XkbStateRec xkb_state;
++ XkbDescRec *kbd_desc_ptr = NULL;
++ int i;
+
+ // Initialize the Xkb extension
+ status = XkbQueryExtension(dsp, &oppcode,
+ &base_event_code, &base_error_code, &major, &minor);
+
+- XkbStateRec xkb_state;
+ device_id = XkbUseCoreKbd;
+
+- XkbDescRec *kbd_desc_ptr = NULL;
+-
+ kbd_desc_ptr = XkbAllocKeyboard();
+ if (kbd_desc_ptr == NULL) {
+ fprintf(stderr, "Failed to get keyboard description\n");
+@@ -146,12 +146,12 @@
+
+ if (group_count == 0) group_count=1;
+
+- int i;
+ for (i = 0; i < group_count; i++) {
+ group_names[i] = NULL;
+ symbol_names[i] = NULL;
+ }
+
++ {
+ const Atom *tmp_group_source = kbd_desc_ptr->names->groups;
+ Atom cur_group_atom;
+ char *ptr;
+@@ -163,6 +163,7 @@
+ *ptr = '\0';
+ }
+ }
++ {
+ Atom sym_name_atom = kbd_desc_ptr->names->symbols;
+ char *sym_name;
+ char *ptr1;
+@@ -251,7 +252,8 @@
+ current_group_xkb_no = xkb_state.group;
+
+ status = True;
+-
++ }
++ }
+ HastaLaVista:
+ if (kbd_desc_ptr) XkbFreeKeyboard(kbd_desc_ptr, 0, True);
+ return status;
+@@ -286,13 +288,14 @@
+ void set_new_locale(t_xkb *ctrl) {
+ t_xkb *plugin = (t_xkb *) ctrl;
+ char filename[255];
++ GdkPixbuf *pixbuf, *tmp;
++ int size;
+
+ // Set the label
+ gtk_label_set_label((GtkLabel *) plugin->label, get_symbol_name_by_res_no(current_group_xkb_no));
+
+ // Set the image
+- GdkPixbuf *pixbuf, *tmp;
+- int size = plugin->size - 4;
++ size = plugin->size - 4;
+ tmp = gdk_pixbuf_new_from_file(get_current_gourp_flag_name(filename), NULL);
+ if (tmp == NULL) { // could not be loaded for some reason
+ printf("in set_new_locale: tmp is NULL\n");
+@@ -335,10 +338,10 @@
+ char * initialize_xkb(t_xkb *ctrl) {
+ XkbEvent evnt;
+ int event_code, error_rtrn, major, minor, reason_rtrn;
++ char * display_name;
+ major = XkbMajorVersion;
+ minor = XkbMinorVersion;
+
+- char * display_name;
+ display_name = "";
+ XkbIgnoreExtension(False);
+ dsp = XkbOpenDisplay(display_name, &event_code, &error_rtrn, &major, &minor, &reason_rtrn);
+@@ -362,12 +365,12 @@
+
+ if (do_init_xkb() != True) return "N/A";
+
++ {
+ char *group = get_symbol_name_by_res_no(current_group_xkb_no);
+-
++ XkbStateRec state;
+ XkbSelectEventDetails(dsp, XkbUseCoreKbd, XkbStateNotify,
+ XkbAllStateComponentsMask, XkbGroupStateMask);
+
+- XkbStateRec state;
+ XkbGetState(dsp, device_id, &state);
+ current_group_xkb_no = (current_group_xkb_no != state.group) ? state.group : current_group_xkb_no;
+ accomodate_group_xkb();
+@@ -375,6 +378,7 @@
+ if (ctrl != NULL) set_new_locale(ctrl);
+
+ return group;
++ }
+ }
+
+ static void deinit_group_names() {