[meld/deprecation-cleanup: 16/48] meldwindow: Move the spinner to our HeaderBar
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/deprecation-cleanup: 16/48] meldwindow: Move the spinner to our HeaderBar
- Date: Sun, 2 Dec 2018 02:43:28 +0000 (UTC)
commit 1076e004d17cd545cf49df95dca2970aa779af31
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Dec 1 06:17:27 2018 +1000
meldwindow: Move the spinner to our HeaderBar
data/ui/meldapp.ui | 9 +++++++++
meld/meldwindow.py | 13 ++++---------
2 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/data/ui/meldapp.ui b/data/ui/meldapp.ui
index a2f39958..9ae84441 100644
--- a/data/ui/meldapp.ui
+++ b/data/ui/meldapp.ui
@@ -27,6 +27,15 @@
<property name="pack-type">end</property>
</packing>
</child>
+ <child>
+ <object class="GtkSpinner" id="spinner">
+ <property name="visible">false</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="pack-type">end</property>
+ </packing>
+ </child>
</object>
</child>
diff --git a/meld/meldwindow.py b/meld/meldwindow.py
index dc6906a0..db467f25 100644
--- a/meld/meldwindow.py
+++ b/meld/meldwindow.py
@@ -173,11 +173,14 @@ class MeldWindow(Component):
self.appvbox.pack_start(self.menubar, False, True, 0)
self.toolbar_holder.pack_start(self.toolbar, True, True, 0)
- # Double toolbars to work around UIManager integration issues
+ # This double toolbar works around integrating non-UIManager widgets
+ # into the toolbar. It's no longer used, but kept as a possible
+ # GAction porting helper.
self.secondary_toolbar = Gtk.Toolbar()
self.secondary_toolbar.get_style_context().add_class(
Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)
self.toolbar_holder.pack_end(self.secondary_toolbar, False, True, 0)
+ self.secondary_toolbar.show_all()
# Manually handle GAction additions
actions = (
@@ -188,18 +191,10 @@ class MeldWindow(Component):
action.connect('activate', callback)
self.widget.add_action(action)
- # Create a secondary toolbar, just to hold our progress spinner
- toolbutton = Gtk.ToolItem()
- self.spinner = Gtk.Spinner()
# Fake out the spinner on Windows. See Gitlab issue #133.
if os.name == 'nt':
for attr in ('stop', 'hide', 'show', 'start'):
setattr(self.spinner, attr, lambda *args: True)
- toolbutton.add(self.spinner)
- self.secondary_toolbar.insert(toolbutton, -1)
- # Set a minimum size because the spinner requests nothing
- self.secondary_toolbar.set_size_request(30, -1)
- self.secondary_toolbar.show_all()
self.widget.drag_dest_set(
Gtk.DestDefaults.MOTION | Gtk.DestDefaults.HIGHLIGHT |
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]