Accepting request 695634 from GNOME:Next

Scripted push of project GNOME:Next

OBS-URL: https://build.opensuse.org/request/show/695634
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-menus?expand=0&rev=126
This commit is contained in:
Dominique Leuenberger 2019-04-18 13:18:49 +00:00 committed by Git OBS Bridge
parent 5f1890412c
commit 3b92a97475
6 changed files with 70 additions and 221 deletions

View File

@ -1,27 +0,0 @@
From 4befe76fbdb76aa6a986297ef71d1601b2ced42e Mon Sep 17 00:00:00 2001
From: Josselin Mouette <joss@debian.org>
Date: Sun, 14 Dec 2014 20:36:36 +0100
Subject: [PATCH] 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);
--
2.6.6

View File

@ -1,172 +0,0 @@
From b4546ab43c2c7ef6fb6cb7e5db83dc3975b56e8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= <alberts.muktupavels@gmail.com>
Date: Mon, 27 Oct 2014 18:41:34 +0200
Subject: [PATCH] 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;
}
--
2.6.6

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7c446eb8ff381df52b8ba04e5886497595e84d1bc46caf7af764d894736c654e
size 404664

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c850c64b2074265fe59e099a340b8689cf3dd4658dc9feddd2ab5e95f1a74b74
size 499680

View File

@ -1,3 +1,58 @@
-------------------------------------------------------------------
Tue Mar 12 06:27:45 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 3.32.0:
+ Updated translations.
-------------------------------------------------------------------
Mon Mar 4 14:58:36 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 3.31.92:
+ Stop using gnome-common.
+ Add nm-connection-editor to the Utilities category.
+ Restore minimal Sundry app folder for upgrades. Users can
remove it by running gsettings reset-recursively
org.gnome.desktop.app-folders and logging out and logging back
in.
+ Updated translations.
-------------------------------------------------------------------
Tue Feb 19 23:28:03 UTC 2019 - bjorn.lie@gmail.com
- Update to version 3.31.90:
+ Fix missing close tag that broke traditional menu users.
+ Add CI to check the validity of our menu file so we don't make
that mistake as easily next time.
+ Add gnome-abrt to the Utilities category.
+ Updated translations.
-------------------------------------------------------------------
Tue Jan 22 11:41:31 UTC 2019 - bjorn.lie@gmail.com
- Update to version 3.31.4:
+ Remove the Sundry category.
+ Switch to modern realpath.
+ Stop using intltool.
+ Updated translations.
- Drop python-devel and python-gtk BuildRequires: They are not
needed nor used.
-------------------------------------------------------------------
Thu Jan 3 14:09:28 UTC 2019 - bjorn.lie@gmail.com
- Update to version 3.31.3:
+ desktop-entries: support multiple desktops in
XDG_CURRENT_DESKTOP.
+ libmenu: Remove support for legacy-dirs.
+ layout:
- Update .desktop filenames.
- Drop obsolete Fedora special case .desktop filenames.
+ Miscellaneous fixes.
- Drop intltool BuildRequires: No longer needed.
- Drop upstream fixed patches:
+ 0001-desktop-entries-support-multiple-desktops-in-XDG_CUR.patch
+ 0001-desktop-entries-fix-trivial-bug-in-handling-of-multi.patch
-------------------------------------------------------------------
Wed Feb 28 16:28:38 UTC 2018 - dimstar@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package gnome-menus
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,29 +12,23 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: gnome-menus
Version: 3.13.3
Version: 3.32.0
Release: 0
Summary: The GNOME Desktop Menu
License: LGPL-2.1-or-later
Group: System/GUI/GNOME
URL: http://www.gnome.org
Source: http://download.gnome.org/sources/gnome-menus/3.13/%{name}-%{version}.tar.xz
Source0: https://download.gnome.org/sources/gnome-menus/3.32/%{name}-%{version}.tar.xz
Source99: baselibs.conf
# PATCH-FIX-UPSTREAM 0001-desktop-entries-support-multiple-desktops-in-XDG_CUR.patch bsc#988595 fezhang@suse.com -- Support multiple desktops specified by XDG_CURRENT_DESKTOP
Patch0: 0001-desktop-entries-support-multiple-desktops-in-XDG_CUR.patch
# PATCH-FIX-UPSTREAM 0001-desktop-entries-fix-trivial-bug-in-handling-of-multi.patch bsc#988595 bgo#741505 fezhang@suse.com -- Fix a typo in 0001-desktop-entries-support-multiple-desktops-in-XDG_CUR.patch
Patch1: 0001-desktop-entries-fix-trivial-bug-in-handling-of-multi.patch
BuildRequires: fdupes
BuildRequires: gobject-introspection-devel
BuildRequires: intltool
BuildRequires: pkgconfig
BuildRequires: python-devel
BuildRequires: python-gtk
BuildRequires: translation-update-upstream
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(gio-unix-2.0) >= 2.29.15
@ -80,7 +74,7 @@ Provides: %{name}-branding = %{version}
BuildArch: noarch
#BRAND: This package contains set of needed .menu files in
#BRAND: /etc/xdg/menus. .directory files in
#BRAND: %{_datadir}/desktop-directories/Multimedia.directory are part of
#BRAND: %%{_datadir}/desktop-directories/Multimedia.directory are part of
#BRAND: the main package. If you need custom one, simply it put there
#BRAND: and modify .menu file to refer to it.
@ -107,20 +101,19 @@ http://www.freedesktop.org/Standards/menu-spec
%lang_package
%prep
%setup -q
%autosetup -p1
translation-update-upstream
%patch0 -p1
%patch1 -p1
%build
%configure\
%configure \
--disable-static
make %{?_smp_mflags}
%{nil}
%make_build
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%find_lang %{name}-3.0 %{?no_lang_C}
%find_lang %{name} %{?no_lang_C}
for dotdirectory in %{buildroot}%{_datadir}/desktop-directories/*.directory; do
%suse_update_desktop_file $dotdirectory
done
@ -142,7 +135,7 @@ done
%files -n typelib-1_0-GMenu-3_0
%{_libdir}/girepository-1.0/GMenu-3.0.typelib
%files lang -f %{name}-3.0.lang
%files lang -f %{name}.lang
%files branding-upstream
%{_sysconfdir}/xdg/menus/gnome-applications.menu