[gnome-tweak-tool] extensions: Fix error if GNOME Shell isn't running
- From: Jeremy Bicha <jbicha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] extensions: Fix error if GNOME Shell isn't running
- Date: Wed, 7 Jun 2017 19:59:15 +0000 (UTC)
commit d909b29e972fe7126f2ee4e5d3b798ac75255b94
Author: Jeremy Bicha <jbicha ubuntu com>
Date: Wed Jun 7 14:43:22 2017 -0400
extensions: Fix error if GNOME Shell isn't running
otherwise Tweak Tool will fail to start
gtweak/tweaks/tweak_group_shell_extensions.py | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_group_shell_extensions.py b/gtweak/tweaks/tweak_group_shell_extensions.py
index 9df3791..e8c39f1 100644
--- a/gtweak/tweaks/tweak_group_shell_extensions.py
+++ b/gtweak/tweaks/tweak_group_shell_extensions.py
@@ -45,14 +45,18 @@ class _ExtensionsBlankState(Gtk.Box):
self.add(Gtk.Label(label="<b>" + _("No Extensions Installed") + "</b>",
use_markup=True, opacity=0.3))
- self._swInfo = Gio.DesktopAppInfo.new("org.gnome.Software.desktop")
-
- if self._swInfo:
- btn = Gtk.Button(label=_("Browse in Software"),
- always_show_image=True, halign=Gtk.Align.CENTER,
- image=Gtk.Image(icon_name="org.gnome.Software-symbolic"))
- btn.connect("clicked", self._on_browse_clicked)
- self.add(btn)
+ try:
+ self._swInfo = Gio.DesktopAppInfo.new("org.gnome.Software.desktop")
+
+ if self._swInfo:
+ btn = Gtk.Button(label=_("Browse in Software"),
+ always_show_image=True, halign=Gtk.Align.CENTER,
+ image=Gtk.Image(icon_name="org.gnome.Software-symbolic"))
+ btn.connect("clicked", self._on_browse_clicked)
+ self.add(btn)
+
+ except:
+ logging.warning("Error detecting shell", exc_info=True)
self.show_all()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]