[gimp] plug-ins: use GtkSettings values to determine whether to use header bar.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: use GtkSettings values to determine whether to use header bar.
- Date: Mon, 5 Aug 2019 14:11:50 +0000 (UTC)
commit aa6a1d369c54003e72fb212238330122b4dfe6cb
Author: Jehan <jehan girinstud io>
Date: Mon Aug 5 16:07:56 2019 +0200
plug-ins: use GtkSettings values to determine whether to use header bar.
As we do in other parts of the code.
Also applies the same thing to the console dialog itself.
plug-ins/python/python-console/python-console.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/python/python-console/python-console.py
b/plug-ins/python/python-console/python-console.py
index d49b800796..1c8cd3bd38 100755
--- a/plug-ins/python/python-console/python-console.py
+++ b/plug-ins/python/python-console/python-console.py
@@ -66,7 +66,8 @@ def run(procedure, args, data):
class ConsoleDialog(Gimp.Dialog):
def __init__(self):
- Gimp.Dialog.__init__(self)
+ use_header_bar = Gtk.Settings.get_default().get_property("gtk-dialogs-use-header")
+ Gimp.Dialog.__init__(self, use_header_bar=use_header_bar)
self.set_property("help-id", PROC_NAME)
Gtk.Window.set_title(self, _("Python Console"))
Gtk.Window.set_role(self, PROC_NAME)
@@ -170,7 +171,8 @@ def run(procedure, args, data):
def browse(self):
if not self.browse_dlg:
- dlg = Gimp.ProcBrowserDialog(use_header_bar=True)
+ use_header_bar = Gtk.Settings.get_default().get_property("gtk-dialogs-use-header")
+ dlg = Gimp.ProcBrowserDialog(use_header_bar=use_header_bar)
Gtk.Window.set_title(dlg, _("Python Procedure Browser"))
Gtk.Window.set_role(dlg, PROC_NAME)
Gtk.Dialog.add_button(dlg, "Apply", Gtk.ResponseType.APPLY)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]