[gnome-tweak-tool] AppChooser: Respect setting of gtk-dialogs-use-header
- From: Phillip Wood <pwood src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] AppChooser: Respect setting of gtk-dialogs-use-header
- Date: Wed, 29 Apr 2015 09:53:20 +0000 (UTC)
commit 96014af979e0cde5d318fb951f9242b652d8fa0c
Author: Phillip Wood <phillip wood dunelm org uk>
Date: Fri Mar 27 10:57:24 2015 +0000
AppChooser: Respect setting of gtk-dialogs-use-header
Use a header-bar for the start-up application chooser dialog if
‘gtk-dialogs-use-header’ is True. Rename the ‘Add Application’ button to
‘Add’ and add a mnemonic for it as well as changing the response of the
‘Close’ button so that it is placed on the opposite side of the
header-bar to the ‘Add’ button.
https://bugzilla.gnome.org/show_bug.cgi?id=747983
gtweak/tweaks/tweak_group_startup.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_group_startup.py b/gtweak/tweaks/tweak_group_startup.py
index 01f7a3a..142d5a9 100644
--- a/gtweak/tweaks/tweak_group_startup.py
+++ b/gtweak/tweaks/tweak_group_startup.py
@@ -32,7 +32,8 @@ def _list_header_func(row, before, user_data):
class _AppChooser(Gtk.Dialog):
def __init__(self, main_window, running_exes, startup_apps):
- Gtk.Dialog.__init__(self, title=_("Applications"))
+ uhb = Gtk.Settings.get_default().props.gtk_dialogs_use_header
+ Gtk.Dialog.__init__(self, title=_("Applications"), use_header_bar=uhb)
self._running = {}
self._all = {}
@@ -73,8 +74,8 @@ class _AppChooser(Gtk.Dialog):
sw.props.hscrollbar_policy = Gtk.PolicyType.NEVER
sw.add(lb)
- self.add_button(_("_Close"), Gtk.ResponseType.CLOSE)
- self.add_button(_("Add Application"), Gtk.ResponseType.OK)
+ self.add_button(_("_Close"), Gtk.ResponseType.CANCEL)
+ self.add_button(_("_Add"), Gtk.ResponseType.OK)
self.set_default_response(Gtk.ResponseType.OK)
self.get_content_area().pack_start(self.searchbar, False, False, 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]