[arch-commits] Commit in gnome-menus/repos (6 files)

Jan de Groot jgc at archlinux.org
Wed Dec 9 13:59:30 UTC 2015


    Date: Wednesday, December 9, 2015 @ 14:59:29
  Author: jgc
Revision: 255016

archrelease: copy trunk to extra-i686, extra-x86_64

Added:
  gnome-menus/repos/extra-i686/PKGBUILD
    (from rev 255015, gnome-menus/trunk/PKGBUILD)
  gnome-menus/repos/extra-i686/support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch
    (from rev 255015, gnome-menus/trunk/support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch)
  gnome-menus/repos/extra-x86_64/PKGBUILD
    (from rev 255015, gnome-menus/trunk/PKGBUILD)
  gnome-menus/repos/extra-x86_64/support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch
    (from rev 255015, gnome-menus/trunk/support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch)
Deleted:
  gnome-menus/repos/extra-i686/PKGBUILD
  gnome-menus/repos/extra-x86_64/PKGBUILD

---------------------------------------------------------------------+
 /PKGBUILD                                                           |   68 +++
 extra-i686/PKGBUILD                                                 |   27 -
 extra-i686/support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch   |  198 ++++++++++
 extra-x86_64/PKGBUILD                                               |   27 -
 extra-x86_64/support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch |  198 ++++++++++
 5 files changed, 464 insertions(+), 54 deletions(-)

Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2015-12-09 13:59:23 UTC (rev 255015)
+++ extra-i686/PKGBUILD	2015-12-09 13:59:29 UTC (rev 255016)
@@ -1,27 +0,0 @@
-# $Id$
-# Maintainer: Jan de Groot <jan at archlinux.org>
-
-pkgname=gnome-menus
-pkgver=3.13.3
-pkgrel=1
-pkgdesc="GNOME menu specifications"
-arch=('i686' 'x86_64')
-depends=('glib2')
-makedepends=('intltool' 'gobject-introspection' 'python2')
-license=('GPL' 'LGPL')
-url="http://www.gnome.org"
-source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
-sha256sums=('7c446eb8ff381df52b8ba04e5886497595e84d1bc46caf7af764d894736c654e')
-
-build() {
-  cd "$pkgname-$pkgver"
-  ./configure \
-      --prefix=/usr --sysconfdir=/etc \
-      --localstatedir=/var  --disable-static
-  make
-}
-
-package(){
-  cd "$pkgname-$pkgver"
-  make DESTDIR="$pkgdir" install
-}

Copied: gnome-menus/repos/extra-i686/PKGBUILD (from rev 255015, gnome-menus/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD	                        (rev 0)
+++ extra-i686/PKGBUILD	2015-12-09 13:59:29 UTC (rev 255016)
@@ -0,0 +1,34 @@
+# $Id$
+# Maintainer: Jan de Groot <jan at archlinux.org>
+
+pkgname=gnome-menus
+pkgver=3.13.3
+pkgrel=2
+pkgdesc="GNOME menu specifications"
+arch=('i686' 'x86_64')
+depends=('glib2')
+makedepends=('intltool' 'gobject-introspection' 'python2')
+license=('GPL' 'LGPL')
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz
+        support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch)
+sha256sums=('7c446eb8ff381df52b8ba04e5886497595e84d1bc46caf7af764d894736c654e'
+            'd35cbc10c4b20bb51514d2ca28c1967de099c50c67266f3ffe0b590a2da1ce7b')
+
+prepare() {
+  cd "$pkgname-$pkgver"
+  patch -Np1 -i ../support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  ./configure \
+      --prefix=/usr --sysconfdir=/etc \
+      --localstatedir=/var  --disable-static
+  make
+}
+
+package(){
+  cd "$pkgname-$pkgver"
+  make DESTDIR="$pkgdir" install
+}

Copied: gnome-menus/repos/extra-i686/support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch (from rev 255015, gnome-menus/trunk/support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch)
===================================================================
--- extra-i686/support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch	                        (rev 0)
+++ extra-i686/support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch	2015-12-09 13:59:29 UTC (rev 255016)
@@ -0,0 +1,198 @@
+From b4546ab43c2c7ef6fb6cb7e5db83dc3975b56e8e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= <alberts.muktupavels at gmail.com>
+Date: Mon, 27 Oct 2014 18:41:34 +0200
+Subject: desktop-entries: support multiple desktops in XDG_CURRENT_DESKTOP
+
+This is based on glib commit:
+5a5e16e93c4f11e635918ecdb41681f63fd05a39
+---
+ libmenu/desktop-entries.c | 110 ++++++++++++++++++++++------------------------
+ 1 file changed, 52 insertions(+), 58 deletions(-)
+
+diff --git a/libmenu/desktop-entries.c b/libmenu/desktop-entries.c
+index 326f311..bd4f886 100644
+--- a/libmenu/desktop-entries.c
++++ b/libmenu/desktop-entries.c
+@@ -85,32 +85,27 @@ unix_basename_from_path (const char *path)
+     return path;
+ }
+ 
+-static const char *
+-get_current_desktop (void)
++static const gchar * const *
++get_current_desktops (void)
+ {
+-  static char *current_desktop = NULL;
++  static gchar **result;
+ 
+-  /* Support XDG_CURRENT_DESKTOP environment variable; this can be used
+-   * to abuse gnome-menus in non-GNOME desktops. */
+-  if (!current_desktop)
++  if (g_once_init_enter (&result))
+     {
+-      const char *desktop;
++      const gchar *desktops;
++      gchar **tmp;
+ 
+-      desktop = g_getenv ("XDG_CURRENT_DESKTOP");
++      desktops = g_getenv ("XDG_CURRENT_DESKTOP");
+ 
+-      /* Note: if XDG_CURRENT_DESKTOP is set but empty, do as if it
+-       * was not set */
+-      if (!desktop || desktop[0] == '\0')
+-        current_desktop = g_strdup ("GNOME");
+-      else
+-        current_desktop = g_strdup (desktop);
+-    }
++      if (desktops)
++        desktops = "";
+ 
+-  /* Using "*" means skipping desktop-related checks */
+-  if (g_strcmp0 (current_desktop, "*") == 0)
+-    return NULL;
++      tmp = g_strsplit (desktops, ":", 0);
++
++      g_once_init_leave (&result, tmp);
++    }
+ 
+-  return current_desktop;
++  return  (const gchar **) result;
+ }
+ 
+ static GIcon *
+@@ -151,52 +146,58 @@ key_file_get_icon (GKeyFile *key_file)
+ static gboolean
+ key_file_get_show_in (GKeyFile *key_file)
+ {
+-  const gchar *current_desktop;
+-  gchar **strv;
++  const gchar * const *current_desktops;
++  gchar **only_show_in;
++  gchar **not_show_in;
+   gboolean show_in = TRUE;
+-  int i;
+-
+-  current_desktop = get_current_desktop ();
+-  if (!current_desktop)
+-    return TRUE;
+-
+-  strv = g_key_file_get_string_list (key_file,
+-                                     DESKTOP_ENTRY_GROUP,
+-                                     "OnlyShowIn",
+-                                     NULL,
+-                                     NULL);
+-  if (strv)
++  gint i;
++
++  current_desktops = get_current_desktops ();
++  only_show_in = g_key_file_get_string_list (key_file,
++                                             DESKTOP_ENTRY_GROUP,
++                                             "OnlyShowIn",
++                                             NULL,
++                                             NULL);
++  not_show_in = g_key_file_get_string_list (key_file,
++                                            DESKTOP_ENTRY_GROUP,
++                                            "NotShowIn",
++                                            NULL,
++                                            NULL);
++
++  for (i = 0; current_desktops[i]; i++)
+     {
+-      show_in = FALSE;
+-      for (i = 0; strv[i]; i++)
++      gint j;
++
++      if (only_show_in)
+         {
+-          if (!strcmp (strv[i], current_desktop))
++          show_in = FALSE;
++          for (j = 0; only_show_in[j]; j++)
+             {
+-              show_in = TRUE;
+-              break;
++              if (g_str_equal (only_show_in[j], current_desktops[i]))
++                {
++                  show_in = TRUE;
++                  goto out;
++                }
+             }
+         }
+-    }
+-  else
+-    {
+-      strv = g_key_file_get_string_list (key_file,
+-                                         DESKTOP_ENTRY_GROUP,
+-                                         "NotShowIn",
+-                                         NULL,
+-                                         NULL);
+-      if (strv)
++
++      if (not_show_in)
+         {
+           show_in = TRUE;
+-          for (i = 0; strv[i]; i++)
++          for (j = 0; not_show_in[j]; j++)
+             {
+-              if (!strcmp (strv[i], current_desktop))
++              if (g_str_equal (not_show_in[j], current_desktops[i]))
+                 {
+                   show_in = FALSE;
++                  goto out;
+                 }
+             }
+         }
+     }
+-  g_strfreev (strv);
++
++out:
++  g_strfreev (only_show_in);
++  g_strfreev (not_show_in);
+ 
+   return show_in;
+ }
+@@ -579,14 +580,7 @@ gboolean
+ desktop_entry_get_show_in (DesktopEntry *entry)
+ {
+   if (entry->type == DESKTOP_ENTRY_DESKTOP)
+-    {
+-      const char *current_desktop = get_current_desktop ();
+-
+-      if (current_desktop == NULL)
+-        return TRUE;
+-      else
+-        return g_desktop_app_info_get_show_in (((DesktopEntryDesktop*)entry)->appinfo, current_desktop);
+-    }
++    return g_desktop_app_info_get_show_in (((DesktopEntryDesktop*)entry)->appinfo, NULL);
+   return ((DesktopEntryDirectory*)entry)->showin;
+ }
+ 
+-- 
+cgit v0.11.2
+
+From 4befe76fbdb76aa6a986297ef71d1601b2ced42e Mon Sep 17 00:00:00 2001
+From: Josselin Mouette <joss at debian.org>
+Date: Sun, 14 Dec 2014 20:36:36 +0100
+Subject: desktop-entries: fix trivial bug in handling of multiple desktops in
+ XDG_CURRENT_DESKTOP.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=741505
+---
+ libmenu/desktop-entries.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libmenu/desktop-entries.c b/libmenu/desktop-entries.c
+index bd4f886..a463d79 100644
+--- a/libmenu/desktop-entries.c
++++ b/libmenu/desktop-entries.c
+@@ -97,7 +97,7 @@ get_current_desktops (void)
+ 
+       desktops = g_getenv ("XDG_CURRENT_DESKTOP");
+ 
+-      if (desktops)
++      if (!desktops)
+         desktops = "";
+ 
+       tmp = g_strsplit (desktops, ":", 0);
+-- 
+cgit v0.11.2
+

Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2015-12-09 13:59:23 UTC (rev 255015)
+++ extra-x86_64/PKGBUILD	2015-12-09 13:59:29 UTC (rev 255016)
@@ -1,27 +0,0 @@
-# $Id$
-# Maintainer: Jan de Groot <jan at archlinux.org>
-
-pkgname=gnome-menus
-pkgver=3.13.3
-pkgrel=1
-pkgdesc="GNOME menu specifications"
-arch=('i686' 'x86_64')
-depends=('glib2')
-makedepends=('intltool' 'gobject-introspection' 'python2')
-license=('GPL' 'LGPL')
-url="http://www.gnome.org"
-source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
-sha256sums=('7c446eb8ff381df52b8ba04e5886497595e84d1bc46caf7af764d894736c654e')
-
-build() {
-  cd "$pkgname-$pkgver"
-  ./configure \
-      --prefix=/usr --sysconfdir=/etc \
-      --localstatedir=/var  --disable-static
-  make
-}
-
-package(){
-  cd "$pkgname-$pkgver"
-  make DESTDIR="$pkgdir" install
-}

Copied: gnome-menus/repos/extra-x86_64/PKGBUILD (from rev 255015, gnome-menus/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD	                        (rev 0)
+++ extra-x86_64/PKGBUILD	2015-12-09 13:59:29 UTC (rev 255016)
@@ -0,0 +1,34 @@
+# $Id$
+# Maintainer: Jan de Groot <jan at archlinux.org>
+
+pkgname=gnome-menus
+pkgver=3.13.3
+pkgrel=2
+pkgdesc="GNOME menu specifications"
+arch=('i686' 'x86_64')
+depends=('glib2')
+makedepends=('intltool' 'gobject-introspection' 'python2')
+license=('GPL' 'LGPL')
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz
+        support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch)
+sha256sums=('7c446eb8ff381df52b8ba04e5886497595e84d1bc46caf7af764d894736c654e'
+            'd35cbc10c4b20bb51514d2ca28c1967de099c50c67266f3ffe0b590a2da1ce7b')
+
+prepare() {
+  cd "$pkgname-$pkgver"
+  patch -Np1 -i ../support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  ./configure \
+      --prefix=/usr --sysconfdir=/etc \
+      --localstatedir=/var  --disable-static
+  make
+}
+
+package(){
+  cd "$pkgname-$pkgver"
+  make DESTDIR="$pkgdir" install
+}

Copied: gnome-menus/repos/extra-x86_64/support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch (from rev 255015, gnome-menus/trunk/support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch)
===================================================================
--- extra-x86_64/support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch	                        (rev 0)
+++ extra-x86_64/support-multiple-desktops-in-XDG_CURRENT_DESKTOP.patch	2015-12-09 13:59:29 UTC (rev 255016)
@@ -0,0 +1,198 @@
+From b4546ab43c2c7ef6fb6cb7e5db83dc3975b56e8e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= <alberts.muktupavels at gmail.com>
+Date: Mon, 27 Oct 2014 18:41:34 +0200
+Subject: desktop-entries: support multiple desktops in XDG_CURRENT_DESKTOP
+
+This is based on glib commit:
+5a5e16e93c4f11e635918ecdb41681f63fd05a39
+---
+ libmenu/desktop-entries.c | 110 ++++++++++++++++++++++------------------------
+ 1 file changed, 52 insertions(+), 58 deletions(-)
+
+diff --git a/libmenu/desktop-entries.c b/libmenu/desktop-entries.c
+index 326f311..bd4f886 100644
+--- a/libmenu/desktop-entries.c
++++ b/libmenu/desktop-entries.c
+@@ -85,32 +85,27 @@ unix_basename_from_path (const char *path)
+     return path;
+ }
+ 
+-static const char *
+-get_current_desktop (void)
++static const gchar * const *
++get_current_desktops (void)
+ {
+-  static char *current_desktop = NULL;
++  static gchar **result;
+ 
+-  /* Support XDG_CURRENT_DESKTOP environment variable; this can be used
+-   * to abuse gnome-menus in non-GNOME desktops. */
+-  if (!current_desktop)
++  if (g_once_init_enter (&result))
+     {
+-      const char *desktop;
++      const gchar *desktops;
++      gchar **tmp;
+ 
+-      desktop = g_getenv ("XDG_CURRENT_DESKTOP");
++      desktops = g_getenv ("XDG_CURRENT_DESKTOP");
+ 
+-      /* Note: if XDG_CURRENT_DESKTOP is set but empty, do as if it
+-       * was not set */
+-      if (!desktop || desktop[0] == '\0')
+-        current_desktop = g_strdup ("GNOME");
+-      else
+-        current_desktop = g_strdup (desktop);
+-    }
++      if (desktops)
++        desktops = "";
+ 
+-  /* Using "*" means skipping desktop-related checks */
+-  if (g_strcmp0 (current_desktop, "*") == 0)
+-    return NULL;
++      tmp = g_strsplit (desktops, ":", 0);
++
++      g_once_init_leave (&result, tmp);
++    }
+ 
+-  return current_desktop;
++  return  (const gchar **) result;
+ }
+ 
+ static GIcon *
+@@ -151,52 +146,58 @@ key_file_get_icon (GKeyFile *key_file)
+ static gboolean
+ key_file_get_show_in (GKeyFile *key_file)
+ {
+-  const gchar *current_desktop;
+-  gchar **strv;
++  const gchar * const *current_desktops;
++  gchar **only_show_in;
++  gchar **not_show_in;
+   gboolean show_in = TRUE;
+-  int i;
+-
+-  current_desktop = get_current_desktop ();
+-  if (!current_desktop)
+-    return TRUE;
+-
+-  strv = g_key_file_get_string_list (key_file,
+-                                     DESKTOP_ENTRY_GROUP,
+-                                     "OnlyShowIn",
+-                                     NULL,
+-                                     NULL);
+-  if (strv)
++  gint i;
++
++  current_desktops = get_current_desktops ();
++  only_show_in = g_key_file_get_string_list (key_file,
++                                             DESKTOP_ENTRY_GROUP,
++                                             "OnlyShowIn",
++                                             NULL,
++                                             NULL);
++  not_show_in = g_key_file_get_string_list (key_file,
++                                            DESKTOP_ENTRY_GROUP,
++                                            "NotShowIn",
++                                            NULL,
++                                            NULL);
++
++  for (i = 0; current_desktops[i]; i++)
+     {
+-      show_in = FALSE;
+-      for (i = 0; strv[i]; i++)
++      gint j;
++
++      if (only_show_in)
+         {
+-          if (!strcmp (strv[i], current_desktop))
++          show_in = FALSE;
++          for (j = 0; only_show_in[j]; j++)
+             {
+-              show_in = TRUE;
+-              break;
++              if (g_str_equal (only_show_in[j], current_desktops[i]))
++                {
++                  show_in = TRUE;
++                  goto out;
++                }
+             }
+         }
+-    }
+-  else
+-    {
+-      strv = g_key_file_get_string_list (key_file,
+-                                         DESKTOP_ENTRY_GROUP,
+-                                         "NotShowIn",
+-                                         NULL,
+-                                         NULL);
+-      if (strv)
++
++      if (not_show_in)
+         {
+           show_in = TRUE;
+-          for (i = 0; strv[i]; i++)
++          for (j = 0; not_show_in[j]; j++)
+             {
+-              if (!strcmp (strv[i], current_desktop))
++              if (g_str_equal (not_show_in[j], current_desktops[i]))
+                 {
+                   show_in = FALSE;
++                  goto out;
+                 }
+             }
+         }
+     }
+-  g_strfreev (strv);
++
++out:
++  g_strfreev (only_show_in);
++  g_strfreev (not_show_in);
+ 
+   return show_in;
+ }
+@@ -579,14 +580,7 @@ gboolean
+ desktop_entry_get_show_in (DesktopEntry *entry)
+ {
+   if (entry->type == DESKTOP_ENTRY_DESKTOP)
+-    {
+-      const char *current_desktop = get_current_desktop ();
+-
+-      if (current_desktop == NULL)
+-        return TRUE;
+-      else
+-        return g_desktop_app_info_get_show_in (((DesktopEntryDesktop*)entry)->appinfo, current_desktop);
+-    }
++    return g_desktop_app_info_get_show_in (((DesktopEntryDesktop*)entry)->appinfo, NULL);
+   return ((DesktopEntryDirectory*)entry)->showin;
+ }
+ 
+-- 
+cgit v0.11.2
+
+From 4befe76fbdb76aa6a986297ef71d1601b2ced42e Mon Sep 17 00:00:00 2001
+From: Josselin Mouette <joss at debian.org>
+Date: Sun, 14 Dec 2014 20:36:36 +0100
+Subject: desktop-entries: fix trivial bug in handling of multiple desktops in
+ XDG_CURRENT_DESKTOP.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=741505
+---
+ libmenu/desktop-entries.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libmenu/desktop-entries.c b/libmenu/desktop-entries.c
+index bd4f886..a463d79 100644
+--- a/libmenu/desktop-entries.c
++++ b/libmenu/desktop-entries.c
+@@ -97,7 +97,7 @@ get_current_desktops (void)
+ 
+       desktops = g_getenv ("XDG_CURRENT_DESKTOP");
+ 
+-      if (desktops)
++      if (!desktops)
+         desktops = "";
+ 
+       tmp = g_strsplit (desktops, ":", 0);
+-- 
+cgit v0.11.2
+



More information about the arch-commits mailing list