Merge pull request #32750 from jtojnar/gupdates

GNOME updates
This commit is contained in:
Jan Tojnar 2017-12-18 02:20:35 +01:00 committed by GitHub
commit 3366ce99df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 51 additions and 267 deletions

View File

@ -1,10 +1,10 @@
# Autogenerated by maintainers/scripts/gnome.sh update
fetchurl: {
name = "evolution-3.26.2";
name = "evolution-3.26.3";
src = fetchurl {
url = mirror://gnome/sources/evolution/3.26/evolution-3.26.2.tar.xz;
sha256 = "2d9299b8414903021faa03cbb885814de454f5260398eb2c2a03600224479137";
url = mirror://gnome/sources/evolution/3.26/evolution-3.26.3.tar.xz;
sha256 = "091621f21827e2dfb8057f3b2c3a215c4e97a692c59d0a4ee33108af571de60e";
};
}

View File

@ -1,10 +1,10 @@
# Autogenerated by maintainers/scripts/gnome.sh update
fetchurl: {
name = "gnome-photos-3.26.2";
name = "gnome-photos-3.26.3";
src = fetchurl {
url = mirror://gnome/sources/gnome-photos/3.26/gnome-photos-3.26.2.tar.xz;
sha256 = "9001ed2794da44522a1d700c7b5aff40ede92f80ba17031f0dfa7f54d6d05657";
url = mirror://gnome/sources/gnome-photos/3.26/gnome-photos-3.26.3.tar.xz;
sha256 = "028de4c8662b7d1dc3ca6c3fbe3ce7f6bb90dd097708e99f235a409756dbadab";
};
}

View File

@ -1,10 +1,10 @@
# Autogenerated by maintainers/scripts/gnome.sh update
fetchurl: {
name = "epiphany-3.26.3";
name = "epiphany-3.26.4";
src = fetchurl {
url = mirror://gnome/sources/epiphany/3.26/epiphany-3.26.3.tar.xz;
sha256 = "cb50042496e704621db3d0213581b0f914c639e160522751f64c5e5f6e6040b5";
url = mirror://gnome/sources/epiphany/3.26/epiphany-3.26.4.tar.xz;
sha256 = "390d50f975f8ab9228016eb60bf4b8ea9a39be0b31467e2d6c27ae75fa1e84ea";
};
}

View File

@ -1,10 +1,10 @@
# Autogenerated by maintainers/scripts/gnome.sh update
fetchurl: {
name = "evolution-data-server-3.26.2.1";
name = "evolution-data-server-3.26.3";
src = fetchurl {
url = mirror://gnome/sources/evolution-data-server/3.26/evolution-data-server-3.26.2.1.tar.xz;
sha256 = "09fb1c4ce20c62309e8ea2d80649f590492e88c1deb89118e715e155296baefd";
url = mirror://gnome/sources/evolution-data-server/3.26/evolution-data-server-3.26.3.tar.xz;
sha256 = "63b1ae5f76be818862f455bf841b5ebb1ec3e1f4df6d3a16dc2be348b7e0a1c5";
};
}

View File

@ -1,10 +1,10 @@
# Autogenerated by maintainers/scripts/gnome.sh update
fetchurl: {
name = "gnome-online-accounts-3.26.1";
name = "gnome-online-accounts-3.26.2";
src = fetchurl {
url = mirror://gnome/sources/gnome-online-accounts/3.26/gnome-online-accounts-3.26.1.tar.xz;
sha256 = "603c110405cb89a01497a69967f10e3f3f36add3dc175b062ec4c5ed4485621b";
url = mirror://gnome/sources/gnome-online-accounts/3.26/gnome-online-accounts-3.26.2.tar.xz;
sha256 = "49f8760d86fe33057eaeeb4f1667bc7f6163e428591e7aed9575563be10b17d1";
};
}

View File

@ -1,10 +1,10 @@
# Autogenerated by maintainers/scripts/gnome.sh update
fetchurl: {
name = "gnome-user-docs-3.26.2";
name = "gnome-user-docs-3.26.2.1";
src = fetchurl {
url = mirror://gnome/sources/gnome-user-docs/3.26/gnome-user-docs-3.26.2.tar.xz;
sha256 = "e7d7f0434624ef6f21803c798d8672331f065485bdf59d44ac5b6b5f14fa1b78";
url = mirror://gnome/sources/gnome-user-docs/3.26/gnome-user-docs-3.26.2.1.tar.xz;
sha256 = "93136f5baffd160c14e1b39f0ac60b9768975edac2da2b30c945faef534af8f5";
};
}

View File

@ -1,10 +1,10 @@
# Autogenerated by maintainers/scripts/gnome.sh update
fetchurl: {
name = "devhelp-3.26.0";
name = "devhelp-3.26.1";
src = fetchurl {
url = mirror://gnome/sources/devhelp/3.26/devhelp-3.26.0.tar.xz;
sha256 = "6bf2714f7f953b5858c643585383c4e4c8e9c65055527505abbf24fbf1ac8e38";
url = mirror://gnome/sources/devhelp/3.26/devhelp-3.26.1.tar.xz;
sha256 = "10bd468ae2188abd98af9ba7b81aced337d2206e9d843eb44520be5b00d77d8e";
};
}

View File

@ -1,97 +0,0 @@
From f7f7fe6bf36ca08c66192077bf964036eb02ffb5 Mon Sep 17 00:00:00 2001
From: Jascha Geerds <jascha@jgeerds.name>
Date: Tue, 19 Sep 2017 03:08:07 +0200
Subject: [PATCH 1/3] Search for themes and icons in system data dirs
---
gtweak/tweaks/tweak_group_appearance.py | 17 ++++-------------
gtweak/utils.py | 17 +++++++++++++++++
2 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/gtweak/tweaks/tweak_group_appearance.py b/gtweak/tweaks/tweak_group_appearance.py
index ccadefc..0d12194 100644
--- a/gtweak/tweaks/tweak_group_appearance.py
+++ b/gtweak/tweaks/tweak_group_appearance.py
@@ -26,7 +26,7 @@ from gi.repository import Gtk
from gi.repository import GLib
import gtweak
-from gtweak.utils import walk_directories, make_combo_list_with_default, extract_zip_file
+from gtweak.utils import walk_directories, make_combo_list_with_default, extract_zip_file, get_resource_dirs
from gtweak.tweakmodel import Tweak
from gtweak.gshellwrapper import GnomeShellFactory
from gtweak.gsettings import GSettingsSetting
@@ -50,10 +50,7 @@ class GtkThemeSwitcher(GSettingsComboTweak):
if gtk_ver % 2: # Want even number
gtk_ver += 1
- dirs = ( os.path.join(gtweak.DATA_DIR, "themes"),
- os.path.join(GLib.get_user_data_dir(), "themes"),
- os.path.join(os.path.expanduser("~"), ".themes"))
- valid = walk_directories(dirs, lambda d:
+ valid = walk_directories(get_resource_dirs("themes"), lambda d:
os.path.exists(os.path.join(d, "gtk-2.0")) and \
(os.path.exists(os.path.join(d, "gtk-3.0")) or \
os.path.exists(os.path.join(d, "gtk-3.{}".format(gtk_ver)))))
@@ -69,10 +66,7 @@ class IconThemeSwitcher(GSettingsComboTweak):
**options)
def _get_valid_icon_themes(self):
- dirs = ( os.path.join(gtweak.DATA_DIR, "icons"),
- os.path.join(GLib.get_user_data_dir(), "icons"),
- os.path.join(os.path.expanduser("~"), ".icons"))
- valid = walk_directories(dirs, lambda d:
+ valid = walk_directories(get_resource_dirs("icons"), lambda d:
os.path.isdir(d) and \
os.path.exists(os.path.join(d, "index.theme")))
return valid
@@ -87,10 +81,7 @@ class CursorThemeSwitcher(GSettingsComboTweak):
**options)
def _get_valid_cursor_themes(self):
- dirs = ( os.path.join(gtweak.DATA_DIR, "icons"),
- os.path.join(GLib.get_user_data_dir(), "icons"),
- os.path.join(os.path.expanduser("~"), ".icons"))
- valid = walk_directories(dirs, lambda d:
+ valid = walk_directories(get_resource_dirs("icons"), lambda d:
os.path.isdir(d) and \
os.path.exists(os.path.join(d, "cursors")))
return valid
diff --git a/gtweak/utils.py b/gtweak/utils.py
index de6c345..6c60b88 100644
--- a/gtweak/utils.py
+++ b/gtweak/utils.py
@@ -21,6 +21,7 @@ import tempfile
import shutil
import subprocess
import glob
+import itertools
import gtweak
from gtweak.gsettings import GSettingsSetting
@@ -117,6 +118,22 @@ def execute_subprocess(cmd_then_args, block=True):
stdout, stderr = p.communicate()
return stdout, stderr, p.returncode
+def get_resource_dirs(resource):
+ """Returns a list of all known resource dirs for a given resource.
+
+ :param str resource:
+ Name of the resource (e.g. "themes")
+ :return:
+ A list of resource dirs
+ """
+ dirs = [os.path.join(dir, resource)
+ for dir in itertools.chain(GLib.get_system_data_dirs(),
+ (gtweak.DATA_DIR,
+ GLib.get_user_data_dir()))]
+ dirs += [os.path.join(os.path.expanduser("~"), ".{}".format(resource))]
+
+ return [dir for dir in dirs if os.path.isdir(dir)]
+
@singleton
class AutostartManager:
--
2.14.1

View File

@ -1,80 +0,0 @@
From 8e75fe5f1ebd8a140a7306294d2219aea4ac47d2 Mon Sep 17 00:00:00 2001
From: Jascha Geerds <jascha@jgeerds.name>
Date: Tue, 19 Sep 2017 03:16:07 +0200
Subject: [PATCH 2/3] Don't show multiple entries for a single theme
---
gtweak/tweaks/tweak_group_appearance.py | 8 ++++----
gtweak/utils.py | 16 ++++++++++++++++
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/gtweak/tweaks/tweak_group_appearance.py b/gtweak/tweaks/tweak_group_appearance.py
index 0d12194..8e05077 100644
--- a/gtweak/tweaks/tweak_group_appearance.py
+++ b/gtweak/tweaks/tweak_group_appearance.py
@@ -26,7 +26,7 @@ from gi.repository import Gtk
from gi.repository import GLib
import gtweak
-from gtweak.utils import walk_directories, make_combo_list_with_default, extract_zip_file, get_resource_dirs
+from gtweak.utils import walk_directories, make_combo_list_with_default, extract_zip_file, get_resource_dirs, get_unique_resources
from gtweak.tweakmodel import Tweak
from gtweak.gshellwrapper import GnomeShellFactory
from gtweak.gsettings import GSettingsSetting
@@ -54,7 +54,7 @@ class GtkThemeSwitcher(GSettingsComboTweak):
os.path.exists(os.path.join(d, "gtk-2.0")) and \
(os.path.exists(os.path.join(d, "gtk-3.0")) or \
os.path.exists(os.path.join(d, "gtk-3.{}".format(gtk_ver)))))
- return valid
+ return get_unique_resources(valid)
class IconThemeSwitcher(GSettingsComboTweak):
def __init__(self, **options):
@@ -69,7 +69,7 @@ class IconThemeSwitcher(GSettingsComboTweak):
valid = walk_directories(get_resource_dirs("icons"), lambda d:
os.path.isdir(d) and \
os.path.exists(os.path.join(d, "index.theme")))
- return valid
+ return get_unique_resources(valid)
class CursorThemeSwitcher(GSettingsComboTweak):
def __init__(self, **options):
@@ -84,7 +84,7 @@ class CursorThemeSwitcher(GSettingsComboTweak):
valid = walk_directories(get_resource_dirs("icons"), lambda d:
os.path.isdir(d) and \
os.path.exists(os.path.join(d, "cursors")))
- return valid
+ return get_unique_resources(valid)
class ShellThemeTweak(Gtk.Box, Tweak):
diff --git a/gtweak/utils.py b/gtweak/utils.py
index 6c60b88..6fd7c6a 100644
--- a/gtweak/utils.py
+++ b/gtweak/utils.py
@@ -134,6 +134,22 @@ def get_resource_dirs(resource):
return [dir for dir in dirs if os.path.isdir(dir)]
+def get_unique_resources(dirs):
+ """Filter out duplicated resources.
+
+ :param list dirs:
+ List of resource dirs (e.g. /usr/share/themes/Adwaita)
+ :return:
+ List of dirs without duplicated resources
+ """
+ unique_dirs = {}
+ for dir in dirs:
+ basename = os.path.basename(dir)
+ if basename not in unique_dirs:
+ unique_dirs[basename] = dir
+
+ return unique_dirs
+
@singleton
class AutostartManager:
--
2.14.1

View File

@ -1,27 +0,0 @@
From 6a6a7d1c708a2f568277699c5b605fa03ccb5faa Mon Sep 17 00:00:00 2001
From: Jascha Geerds <jascha@jgeerds.name>
Date: Tue, 19 Sep 2017 03:17:20 +0200
Subject: [PATCH 3/3] Create config dir if it doesn't exist
---
gtweak/gtksettings.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gtweak/gtksettings.py b/gtweak/gtksettings.py
index a11363b..2871c49 100644
--- a/gtweak/gtksettings.py
+++ b/gtweak/gtksettings.py
@@ -36,6 +36,10 @@ class GtkSettingsManager:
def _get_keyfile(self):
keyfile = None
try:
+ config_dir = os.path.dirname(self._path)
+ if not os.path.isdir(config_dir):
+ os.makedirs(config_dir)
+
keyfile = GLib.KeyFile()
keyfile.load_from_file(self._path, 0)
except MemoryError:
--
2.14.1

View File

@ -6,19 +6,18 @@
stdenv.mkDerivation rec {
inherit (import ./src.nix fetchurl) name src;
doCheck = true;
checkPhase = "meson test";
propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
nativeBuildInputs = [ meson ninja pkgconfig gettext itstool libxml2 file wrapGAppsHook ];
buildInputs = [ gtk3 glib gnome3.gsettings_desktop_schemas
gdk_pixbuf gnome3.defaultIconTheme librsvg
libnotify gnome3.gnome_shell python3Packages.pygobject3
libsoup gnome3.gnome_settings_daemon gnome3.nautilus
gnome3.gnome_desktop gobjectIntrospection
];
nativeBuildInputs = [
meson ninja pkgconfig gettext itstool libxml2 file wrapGAppsHook
];
buildInputs = [
gtk3 glib gnome3.gsettings_desktop_schemas
gdk_pixbuf gnome3.defaultIconTheme librsvg
libnotify gnome3.gnome_shell python3Packages.pygobject3
libsoup gnome3.gnome_settings_daemon gnome3.nautilus
gnome3.mutter gnome3.gnome_desktop gobjectIntrospection
];
postPatch = ''
patchShebangs meson-postinstall.py
@ -30,10 +29,21 @@ stdenv.mkDerivation rec {
'';
patches = [
./find_gsettings.patch
./0001-Search-for-themes-and-icons-in-system-data-dirs.patch
./0002-Don-t-show-multiple-entries-for-a-single-theme.patch
./0003-Create-config-dir-if-it-doesn-t-exist.patch
(fetchurl {
name = "find_gsettings.patch";
url = https://bugzilla.gnome.org/attachment.cgi?id=365642;
sha256 = "14ik1kad0w99xa2wn3d4ynrkhnwchjlqfbaij7p11y5zpiwhaha4";
})
(fetchurl {
name = "0001-Search-for-themes-and-icons-in-system-data-dirs.patch";
url = https://bugzilla.gnome.org/attachment.cgi?id=365643;
sha256 = "1phq3c7hc9lryih6rp3m5wmp88rfbl6iv42ng4g6bzm1jphgl89f";
})
(fetchurl {
name = "0001-appearance-Don-t-duplicate-the-cursor-theme-name.patch";
url = https://bugzilla.gnome.org/attachment.cgi?id=365648;
sha256 = "1n9vwsfz4sx72qsi1gd1y7460zmagwirvmi9qrfhc3ahanpyn4fr";
})
];
meta = with stdenv.lib; {

View File

@ -1,22 +0,0 @@
diff --git a/gtweak/gsettings.py b/gtweak/gsettings.py
index a00fe19..dce74b2 100644
--- a/gtweak/gsettings.py
+++ b/gtweak/gsettings.py
@@ -33,10 +33,15 @@ class GSettingsMissingError(Exception):
class _GSettingsSchema:
def __init__(self, schema_name, schema_dir=None, schema_filename=None, **options):
- if not schema_dir:
- schema_dir = gtweak.GSETTINGS_SCHEMA_DIR
if not schema_filename:
schema_filename = schema_name + ".gschema.xml"
+ if not schema_dir:
+ schema_dir = gtweak.GSETTINGS_SCHEMA_DIR
+ for xdg_dir in GLib.get_system_data_dirs():
+ dir = os.path.join(xdg_dir, "glib-2.0", "schemas")
+ if os.path.exists(os.path.join(dir, schema_filename)):
+ schema_dir = dir
+ break
schema_path = os.path.join(schema_dir, schema_filename)
if not os.path.exists(schema_path):

View File

@ -1,10 +1,10 @@
# Autogenerated by maintainers/scripts/gnome.sh update
fetchurl: {
name = "gnome-tweak-tool-3.26.3";
name = "gnome-tweak-tool-3.26.4";
src = fetchurl {
url = mirror://gnome/sources/gnome-tweak-tool/3.26/gnome-tweak-tool-3.26.3.tar.xz;
sha256 = "9406447850b14de204f9c5a6eaa6b63ba805ddb1a10fd863239841090af76430";
url = mirror://gnome/sources/gnome-tweak-tool/3.26/gnome-tweak-tool-3.26.4.tar.xz;
sha256 = "fda08044d22c258bbd93dbad326d282d4d1184b98795ae8e3e5f07f8275005df";
};
}

View File

@ -3,11 +3,11 @@
, libwebp, gnome3 }:
stdenv.mkDerivation rec {
name = "gegl-0.3.24";
name = "gegl-0.3.26";
src = fetchurl {
url = "http://download.gimp.org/pub/gegl/0.3/${name}.tar.bz2";
sha256 = "0x4xjca05fbncy49vjs5nq3ria6j8wlpiq6yldkv0r6qcb18p80s";
sha256 = "1a9zbi6ws0r0sqynvg2fh3ad0ipnphg7w62y7whlcrbpqi29izvf";
};
hardeningDisable = [ "format" ];