Commit c00ddf23 authored by John Stowers's avatar John Stowers

Add link to extensions.gnome.org

parent 48ffffbc
......@@ -2,6 +2,7 @@
* Update icon (bug 649359)
* Fix appearance of tweaks to no longer have a white background
* Remove welcome image and start with a tweakgroup selected by default
* Add link to extensions.gnome.org
3.5.0
* Work with new gnome shell dbus interface
......
......@@ -28,7 +28,7 @@ from gtweak.utils import walk_directories, extract_zip_file, make_combo_list_wit
from gtweak.gsettings import GSettingsSetting, GSettingsMissingError, GSettingsFakeSetting
from gtweak.gshellwrapper import GnomeShellFactory
from gtweak.tweakmodel import Tweak, TweakGroup, TWEAK_GROUP_THEME, TWEAK_GROUP_SHELL
from gtweak.widgets import ZipFileChooserButton, GSettingsComboTweak, GSettingsComboEnumTweak, GSettingsSwitchTweak, build_label_beside_widget, build_horizontal_sizegroup, build_combo_box_text
from gtweak.widgets import ZipFileChooserButton, GSettingsComboTweak, GSettingsComboEnumTweak, GSettingsSwitchTweak, build_label_beside_widget, build_horizontal_sizegroup, build_combo_box_text, UI_BOX_SPACING
class ShowWindowButtons(GSettingsComboTweak):
def __init__(self, **options):
......@@ -224,7 +224,7 @@ class StaticWorkspaceTweak(Tweak):
sb.set_sensitive(not dsettings[self.DYNAMIC_KEY])
sw.connect('notify::active', lambda _sw,_param,_sb: _sb.set_sensitive(not _sw.get_active()), sb)
hb = Gtk.HBox(spacing = 4)
hb = Gtk.HBox(spacing=UI_BOX_SPACING)
hb.pack_start(sw, False, False, 0)
hb.pack_start(sb, True, True, 0)
......
......@@ -10,7 +10,7 @@ from gi.repository import GLib
from gtweak.utils import extract_zip_file
from gtweak.gshellwrapper import GnomeShell, GnomeShellFactory
from gtweak.tweakmodel import Tweak, TweakGroup
from gtweak.widgets import ZipFileChooserButton, build_label_beside_widget, build_horizontal_sizegroup
from gtweak.widgets import ZipFileChooserButton, build_label_beside_widget, build_horizontal_sizegroup, UI_BOX_SPACING
class _ShellExtensionTweak(Tweak):
......@@ -46,7 +46,7 @@ class _ShellExtensionTweak(Tweak):
_("%s Extension") % ext["name"],
sw,
warning=warning)
self.widget_for_size_group = sw
self.widget_for_size_group = None
def _on_extension_toggled(self, sw, active, uuid):
if not sw.get_active():
......@@ -72,8 +72,14 @@ class _ShellExtensionInstallerTweak(Tweak):
chooser = ZipFileChooserButton(_("Select an extension"))
chooser.connect("file-set", self._on_file_set)
self.widget = build_label_beside_widget(self.name, chooser)
self.widget_for_size_group = chooser
hb = Gtk.HBox(spacing=UI_BOX_SPACING)
hb.pack_start(
Gtk.LinkButton.new_with_label("https://extensions.gnome.org",_("Get more extensions")),
False, False, 0)
hb.pack_start(chooser, False, False, 0)
self.widget = build_label_beside_widget(self.name, hb)
self.widget_for_size_group = hb
def _on_file_set(self, chooser):
f = chooser.get_filename()
......
......@@ -25,6 +25,8 @@ from gtweak.gsettings import GSettingsSetting, GSettingsFakeSetting, GSettingsMi
from gtweak.gtksettings import GtkSettingsManager
from gtweak.gconf import GConfSetting
UI_BOX_SPACING = 4
def build_label_beside_widget(txt, *widget, **kwargs):
"""
Builds a HBox containing widgets.
......@@ -44,7 +46,7 @@ def build_label_beside_widget(txt, *widget, **kwargs):
else:
hbox = Gtk.HBox()
hbox.props.spacing = 4
hbox.props.spacing = UI_BOX_SPACING
lbl = Gtk.Label(txt)
lbl.props.ellipsize = Pango.EllipsizeMode.END
lbl.props.xalign = 0.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment