pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/libgnomekbd Pull in patch from libgnomekbd trunk t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5831bba9dab9
branches:  trunk
changeset: 551905:5831bba9dab9
user:      jmcneill <jmcneill%pkgsrc.org@localhost>
date:      Sun Dec 21 00:29:02 2008 +0000

description:
Pull in patch from libgnomekbd trunk that prevents a crash when a buggy
X server fails a XkbGetKeyboard call. Bump PKGREVISION.

diffstat:

 x11/libgnomekbd/Makefile         |    3 +-
 x11/libgnomekbd/distinfo         |    4 +-
 x11/libgnomekbd/patches/patch-ac |  193 ++++++++++++++++++++++++++++++++++++++-
 3 files changed, 193 insertions(+), 7 deletions(-)

diffs (242 lines):

diff -r 2003661f58d5 -r 5831bba9dab9 x11/libgnomekbd/Makefile
--- a/x11/libgnomekbd/Makefile  Sun Dec 21 00:27:31 2008 +0000
+++ b/x11/libgnomekbd/Makefile  Sun Dec 21 00:29:02 2008 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.12 2008/10/16 18:20:25 drochner Exp $
+# $NetBSD: Makefile,v 1.13 2008/12/21 00:29:02 jmcneill Exp $
 #
 
 DISTNAME=      libgnomekbd-2.24.0
+PKGREVISION=   1
 CATEGORIES=    x11
 MASTER_SITES=  ${MASTER_SITE_GNOME:=sources/libgnomekbd/2.24/}
 EXTRACT_SUFX=  .tar.bz2
diff -r 2003661f58d5 -r 5831bba9dab9 x11/libgnomekbd/distinfo
--- a/x11/libgnomekbd/distinfo  Sun Dec 21 00:27:31 2008 +0000
+++ b/x11/libgnomekbd/distinfo  Sun Dec 21 00:29:02 2008 +0000
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.6 2008/10/16 18:20:25 drochner Exp $
+$NetBSD: distinfo,v 1.7 2008/12/21 00:29:02 jmcneill Exp $
 
 SHA1 (libgnomekbd-2.24.0.tar.bz2) = 3e81ade6050930a9d1e3443b89981cf36821032a
 RMD160 (libgnomekbd-2.24.0.tar.bz2) = 8ca98404615c405705fd82c917acb7b4b55b334e
 Size (libgnomekbd-2.24.0.tar.bz2) = 411322 bytes
 SHA1 (patch-aa) = 7be6e43e63a4701b38052e08a06129a064094cde
 SHA1 (patch-ab) = cc148a31666c05a80edc2baf608d72a1a0ccec98
-SHA1 (patch-ac) = 7c22964c48779006509aebb703983d47f47fd593
+SHA1 (patch-ac) = 0470b92a31dc54fd14614447da891620af83c268
 SHA1 (patch-ad) = 5cb43be430334d9a1f1c6888012ff9b9395f3126
 SHA1 (patch-ae) = da103d07fcd3053ad0993b98542a6815dbc5e42b
 SHA1 (patch-af) = 0c2569c177846e75e58922b38c9bb8f4fe762162
diff -r 2003661f58d5 -r 5831bba9dab9 x11/libgnomekbd/patches/patch-ac
--- a/x11/libgnomekbd/patches/patch-ac  Sun Dec 21 00:27:31 2008 +0000
+++ b/x11/libgnomekbd/patches/patch-ac  Sun Dec 21 00:29:02 2008 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ac,v 1.1 2008/06/02 16:42:21 drochner Exp $
+$NetBSD: patch-ac,v 1.2 2008/12/21 00:29:02 jmcneill Exp $
 
---- libgnomekbd/gkbd-indicator.c.orig  2007-10-08 17:18:41.000000000 +0200
-+++ libgnomekbd/gkbd-indicator.c
+--- libgnomekbd/gkbd-indicator.c.orig  2008-12-20 19:23:49.000000000 -0500
++++ libgnomekbd/gkbd-indicator.c       2008-12-20 19:23:55.000000000 -0500
 @@ -17,6 +17,8 @@
   * Boston, MA 02111-1307, USA.
   */
@@ -11,7 +11,106 @@
  #include <memory.h>
  
  #include <gdk/gdkkeysyms.h>
-@@ -306,7 +308,7 @@ gkbd_indicator_prepare_drawing (GkbdIndi
+@@ -135,7 +137,12 @@ gkbd_indicator_fill (GkbdIndicator * gki
+       GtkNotebook *notebook = GTK_NOTEBOOK (gki);
+ 
+       for (grp = 0; grp < total_groups; grp++) {
+-              GtkWidget *page, *decorated_page;
++              GtkWidget *page, *decorated_page = NULL;
++              gchar *full_group_name =
++                  (grp <
++                   g_strv_length (globals.
++                                  full_group_names)) ?
++                  globals.full_group_names[grp] : "?";
+               page = gkbd_indicator_prepare_drawing (gki, grp);
+ 
+               if (page == NULL)
+@@ -144,7 +151,7 @@ gkbd_indicator_fill (GkbdIndicator * gki
+               decorated_page =
+                   gkbd_indicator_plugin_manager_decorate_widget
+                   (&globals.plugin_manager, page, grp,
+-                   globals.full_group_names[grp], &globals.kbd_cfg);
++                   full_group_name, &globals.kbd_cfg);
+ 
+               page = decorated_page == NULL ? page : decorated_page;
+ 
+@@ -257,39 +264,46 @@ gkbd_indicator_prepare_drawing (GkbdIndi
+                           g_hash_table_new_full (g_str_hash, g_str_equal,
+                                                  g_free, NULL);
+ 
+-              if (xkl_engine_get_features (globals.engine) &
+-                  XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+-                      char *full_layout_name =
+-                          (char *) g_slist_nth_data (globals.kbd_cfg.
+-                                                     layouts_variants,
+-                                                     group);
+-                      char *variant_name;
+-                      if (!gkbd_keyboard_config_split_items
+-                          (full_layout_name, &layout_name,
+-                           &variant_name))
+-                              /* just in case */
+-                              layout_name = full_layout_name;
+-
+-                      /* make it freeable */
+-                      layout_name = g_strdup (layout_name);
+-
+-                      if (globals.short_group_names != NULL) {
+-                              char *short_group_name =
+-                                  globals.short_group_names[group];
+-                              if (short_group_name != NULL
+-                                  && *short_group_name != '\0') {
+-                                      /* drop the long name */
+-                                      g_free (layout_name);
+-                                      layout_name =
+-                                          g_strdup (short_group_name);
++
++              if (group < g_strv_length (globals.short_group_names)) {
++                      if (xkl_engine_get_features (globals.engine) &
++                          XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
++                              char *full_layout_name = (char *)
++                                  g_slist_nth_data (globals.kbd_cfg.
++                                                    layouts_variants,
++                                                    group);
++                              char *variant_name;
++                              if (!gkbd_keyboard_config_split_items
++                                  (full_layout_name, &layout_name,
++                                   &variant_name))
++                                      /* just in case */
++                                      layout_name = full_layout_name;
++
++                              /* make it freeable */
++                              layout_name = g_strdup (layout_name);
++
++                              if (globals.short_group_names != NULL) {
++                                      char *short_group_name =
++                                          globals.short_group_names
++                                          [group];
++                                      if (short_group_name != NULL
++                                          && *short_group_name != '\0') {
++                                              /* drop the long name */
++                                              g_free (layout_name);
++                                              layout_name =
++                                                  g_strdup
++                                                  (short_group_name);
++                                      }
+                               }
++                      } else {
++                              layout_name =
++                                  g_strdup (globals.full_group_names
++                                            [group]);
+                       }
+-              } else
+-                      layout_name =
+-                          g_strdup (globals.full_group_names[group]);
++              }
+ 
+               if (layout_name == NULL)
+-                      layout_name = g_strdup ("?");
++                      layout_name = g_strdup ("??");
+ 
+               /* Process layouts with repeating description */
+               ppln = &prev_layout_name;
+@@ -306,7 +320,7 @@ gkbd_indicator_prepare_drawing (GkbdIndi
                        utf8length = g_unichar_to_utf8 (cidx, appendix);
                        appendix[utf8length] = '\0';
                        lbl_title =
@@ -20,3 +119,89 @@
                } else {
                        /* "first" time this description */
                        lbl_title = g_strdup (layout_name);
+@@ -347,7 +361,8 @@ gkbd_indicator_update_tooltips (GkbdIndi
+ {
+       XklState *state = xkl_engine_get_current_state (globals.engine);
+       gchar *buf;
+-      if (state == NULL || state->group < 0)
++      if (state == NULL || state->group < 0
++          || state->group >= g_strv_length (globals.full_group_names))
+               return;
+ 
+       buf = g_strdup_printf (globals.tooltips_format,
+@@ -401,12 +416,9 @@ gkbd_indicator_ind_cfg_changed (GConfCli
+                                            &globals.kbd_cfg);
+       gkbd_indicator_config_activate (&globals.ind_cfg);
+ 
+-      gkbd_indicator_plugin_manager_toggle_plugins (&globals.
+-                                                    plugin_manager,
+-                                                    &globals.
+-                                                    plugin_container,
+-                                                    globals.ind_cfg.
+-                                                    enabled_plugins);
++      gkbd_indicator_plugin_manager_toggle_plugins
++          (&globals.plugin_manager, &globals.plugin_container,
++           globals.ind_cfg.enabled_plugins);
+ 
+       ForAllIndicators () {
+               gkbd_indicator_reinit_ui (gki);
+@@ -465,8 +477,8 @@ gkbd_indicator_kbd_cfg_callback (GkbdInd
+       }
+ 
+       gkbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+-                                       (const gchar **) xklrec->
+-                                       variants);
++                                       (const gchar **)
++                                       xklrec->variants);
+ 
+       ForAllIndicators () {
+               gkbd_indicator_reinit_ui (gki);
+@@ -664,8 +676,8 @@ gkbd_indicator_global_term (void)
+       gkbd_desktop_config_stop_listen (&globals.cfg);
+       gkbd_indicator_config_stop_listen (&globals.ind_cfg);
+ 
+-      gkbd_indicator_plugin_manager_term_initialized_plugins (&globals.
+-                                                              plugin_manager);
++      gkbd_indicator_plugin_manager_term_initialized_plugins
++          (&globals.plugin_manager);
+       gkbd_indicator_plugin_manager_term (&globals.plugin_manager);
+ 
+       gkbd_indicator_config_term (&globals.ind_cfg);
+@@ -756,18 +768,14 @@ gkbd_indicator_global_init (void)
+       gkbd_indicator_config_activate (&globals.ind_cfg);
+ 
+       gkbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
+-                                       (const gchar **) xklrec->
+-                                       variants);
++                                       (const gchar **)
++                                       xklrec->variants);
+       g_object_unref (G_OBJECT (xklrec));
+ 
+       gkbd_indicator_plugin_manager_init (&globals.plugin_manager);
+-      gkbd_indicator_plugin_manager_init_enabled_plugins (&globals.
+-                                                          plugin_manager,
+-                                                          &globals.
+-                                                          plugin_container,
+-                                                          globals.
+-                                                          ind_cfg.
+-                                                          enabled_plugins);
++      gkbd_indicator_plugin_manager_init_enabled_plugins
++          (&globals.plugin_manager, &globals.plugin_container,
++           globals.ind_cfg.enabled_plugins);
+       gkbd_desktop_config_start_listen (&globals.cfg,
+                                         (GConfClientNotifyFunc)
+                                         gkbd_indicator_cfg_changed,
+@@ -821,10 +829,9 @@ gkbd_indicator_get_image_filename (guint
+ {
+       if (!globals.ind_cfg.show_flags)
+               return NULL;
+-      return gkbd_indicator_config_get_images_file (&globals.
+-                                                    ind_cfg,
+-                                                    &globals.
+-                                                    kbd_cfg, group);
++      return gkbd_indicator_config_get_images_file (&globals.ind_cfg,
++                                                    &globals.kbd_cfg,
++                                                    group);
+ }
+ 
+ gdouble



Home | Main Index | Thread Index | Old Index