Yet more fix of PyGObject-3.11 DeprecationWarning
This commit is contained in:
parent
2fbf9ff0f9
commit
91ef047766
@ -380,10 +380,10 @@ class Gramplet(object):
|
||||
"""
|
||||
Force the generator to stop running.
|
||||
"""
|
||||
from gi.repository import GObject
|
||||
from gi.repository import GLib
|
||||
self._pause = True
|
||||
if self._idle_id != 0:
|
||||
GObject.source_remove(self._idle_id)
|
||||
GLib.source_remove(self._idle_id)
|
||||
self._idle_id = 0
|
||||
|
||||
def _db_changed(self, db):
|
||||
|
@ -63,7 +63,7 @@ class BackRefModel(Gtk.ListStore):
|
||||
self.idle = GLib.idle_add(self.load_model().__next__)
|
||||
|
||||
def destroy(self):
|
||||
GObject.source_remove(self.idle)
|
||||
GLib.source_remove(self.idle)
|
||||
|
||||
def load_model(self):
|
||||
"""
|
||||
|
@ -628,7 +628,7 @@ class DummyPage(PageView):
|
||||
PageView.__init__(self, title, pdata, dbstate, uistate)
|
||||
|
||||
def build_widget(self):
|
||||
box = Gtk.VBox(False, 1)
|
||||
box = Gtk.VBox(homogeneous=False, spacing=1)
|
||||
#top widget at the top
|
||||
box.pack_start(Gtk.Label(label=_('View %(name)s: %(msg)s') % {
|
||||
'name': self.title,
|
||||
|
@ -558,9 +558,9 @@ class GuiGramplet(object):
|
||||
if len(self.pui.option_order) == 0: return
|
||||
frame = Gtk.Frame()
|
||||
topbox = Gtk.VBox(homogeneous=False)
|
||||
hbox = Gtk.HBox(False, 5)
|
||||
labels = Gtk.VBox(True)
|
||||
options = Gtk.VBox(True)
|
||||
hbox = Gtk.HBox(homogeneous=False, spacing=5)
|
||||
labels = Gtk.VBox(homogeneous=True)
|
||||
options = Gtk.VBox(homogeneous=True)
|
||||
hbox.pack_start(labels, False, True, 0)
|
||||
hbox.pack_start(options, True, True, 0)
|
||||
topbox.pack_start(hbox, False, False, 0)
|
||||
|
@ -177,10 +177,10 @@ class FadeOut(GObject.GObject):
|
||||
"""Stops the fadeout and restores the background color"""
|
||||
##_LOG.debug('Stopping')
|
||||
if self._background_timeout_id != -1:
|
||||
GObject.source_remove(self._background_timeout_id)
|
||||
GLib.source_remove(self._background_timeout_id)
|
||||
self._background_timeout_id = -1
|
||||
if self._countdown_timeout_id != -1:
|
||||
GObject.source_remove(self._countdown_timeout_id)
|
||||
GLib.source_remove(self._countdown_timeout_id)
|
||||
self._countdown_timeout_id = -1
|
||||
|
||||
self._widget.update_background(self._start_color, unset=True)
|
||||
|
@ -43,7 +43,7 @@ class CalendarGramplet(Gramplet):
|
||||
self.gui.calendar.set_display_options(
|
||||
Gtk.CalendarDisplayOptions.SHOW_HEADING)
|
||||
self.gui.get_container_widget().remove(self.gui.textview)
|
||||
vbox = Gtk.VBox(False, 0)
|
||||
vbox = Gtk.VBox(homogeneous=False, spacing=0)
|
||||
vbox.pack_start(self.gui.calendar, False, False, 0)
|
||||
self.gui.get_container_widget().add_with_viewport(vbox)
|
||||
vbox.show_all()
|
||||
|
@ -39,7 +39,7 @@ class Gallery(Gramplet):
|
||||
Build the GUI interface.
|
||||
"""
|
||||
self.image_list = []
|
||||
self.top = Gtk.HBox(False, 3)
|
||||
self.top = Gtk.HBox(homogeneous=False, spacing=3)
|
||||
return self.top
|
||||
|
||||
def clear_images(self):
|
||||
|
@ -42,7 +42,7 @@ class Notes(Gramplet):
|
||||
"""
|
||||
Build the GUI interface.
|
||||
"""
|
||||
top = Gtk.VBox(False)
|
||||
top = Gtk.VBox(homogeneous=False)
|
||||
|
||||
hbox = Gtk.HBox()
|
||||
self.left = SimpleButton(Gtk.STOCK_GO_BACK, self.left_clicked)
|
||||
|
@ -42,7 +42,7 @@ class ToDo(Gramplet):
|
||||
"""
|
||||
Build the GUI interface.
|
||||
"""
|
||||
top = Gtk.VBox(False)
|
||||
top = Gtk.VBox(homogeneous=False)
|
||||
|
||||
hbox = Gtk.HBox()
|
||||
self.left = SimpleButton(Gtk.STOCK_GO_BACK, self.left_clicked)
|
||||
@ -51,7 +51,7 @@ class ToDo(Gramplet):
|
||||
hbox.pack_start(self.left, False, False, 0)
|
||||
self.right = SimpleButton(Gtk.STOCK_GO_FORWARD, self.right_clicked)
|
||||
self.right.set_tooltip_text(_('Next To Do note'))
|
||||
self.right.set_sensitive(False)
|
||||
self.right.set_sensitive(homogeneous=False)
|
||||
hbox.pack_start(self.right, False, False, 0)
|
||||
self.edit = SimpleButton(Gtk.STOCK_EDIT, self.edit_clicked)
|
||||
self.edit.set_tooltip_text(_('Edit the selected To Do note'))
|
||||
|
@ -45,7 +45,7 @@ class ToDoGramplet(Gramplet):
|
||||
"""
|
||||
Build the GUI interface.
|
||||
"""
|
||||
top = Gtk.VBox(False)
|
||||
top = Gtk.VBox(homogeneous=False)
|
||||
|
||||
hbox = Gtk.HBox()
|
||||
self.left = SimpleButton(Gtk.STOCK_GO_BACK, self.left_clicked)
|
||||
|
@ -102,7 +102,7 @@ class OsmGps():
|
||||
"""
|
||||
create the vbox
|
||||
"""
|
||||
self.vbox = Gtk.VBox(False, 0)
|
||||
self.vbox = Gtk.VBox(homogeneous=False, spacing=0)
|
||||
cache_path = config.get('geography.path')
|
||||
if not os.path.isdir(cache_path):
|
||||
try:
|
||||
|
@ -346,14 +346,14 @@ class HtmlView(NavigationView):
|
||||
contains the interface. This containter will be inserted into
|
||||
a Gtk.Notebook page.
|
||||
"""
|
||||
self.box = Gtk.VBox(False, 4)
|
||||
self.box = Gtk.VBox(homogeneous=False, spacing=4)
|
||||
#top widget at the top
|
||||
self.box.pack_start(self.top_widget(), False, False, 0 )
|
||||
#web page under it in a scrolled window
|
||||
#self.table = Gtk.Table(1, 1, False)
|
||||
self.toolkit = TOOLKIT = get_toolkits()
|
||||
self.renderer = RendererWebkit()
|
||||
self.frames = Gtk.HBox(False, 4)
|
||||
self.frames = Gtk.HBox(homogeneous=False, spacing=4)
|
||||
frame = Gtk.ScrolledWindow(hadjustment=None,
|
||||
vadjustment=None)
|
||||
frame.set_shadow_type(Gtk.ShadowType.NONE)
|
||||
@ -377,7 +377,7 @@ class HtmlView(NavigationView):
|
||||
"""
|
||||
The default class gives a widget where user can type an url
|
||||
"""
|
||||
hbox = Gtk.HBox(False, 4)
|
||||
hbox = Gtk.HBox(homogeneous=False, spacing=4)
|
||||
self.urlfield = Gtk.Entry()
|
||||
self.urlfield.set_text(config.get("htmlview.start-url"))
|
||||
self.urlfield.connect('activate', self._on_activate)
|
||||
|
Loading…
Reference in New Issue
Block a user