Remove usage of deprecated Gtk.Alignment
issue10081 review357131002
This commit is contained in:
1 parent
c4e25ab925
commit
b498220dcb
3 files changed
+10
-13
No files matched your search
@@ -603,13 +603,13 @@ class UserWarningDialog(WarningDialog):
|
||||
|
||||
def build_dialog(self, *args, **kwargs):
|
||||
dialog = super().build_dialog(*args, **kwargs)
|
||||
self.always = Gtk.CheckButton(label=_('Always ignore this warning.'))
|
||||
alignment = Gtk.Alignment(xalign=0, yalign=0.5)
|
||||
alignment.add(self.always)
|
||||
dialog.vbox.pack_start(alignment, expand=True, fill=False, padding=0)
|
||||
label = Gtk.Label(
|
||||
label=_('Do you want to proceed?'), halign=Gtk.Align.END)
|
||||
label=_('Do you want to proceed?'),
|
||||
halign=Gtk.Align.FILL, valign=Gtk.Align.END)
|
||||
dialog.vbox.pack_start(label, expand=True, fill=True, padding=0)
|
||||
self.always = Gtk.CheckButton(
|
||||
label=_('Always ignore this warning.'), halign=Gtk.Align.START)
|
||||
dialog.vbox.pack_start(self.always, expand=True, fill=False, padding=0)
|
||||
return dialog
|
||||
|
||||
def process_response(self, response):
|
||||
|
||||
@@ -407,11 +407,9 @@ class DBLogin(object):
|
||||
tooltips.set_tip(self.button_connect, _('Connect the Tryton server'))
|
||||
self.dialog.add_action_widget(self.button_connect, Gtk.ResponseType.OK)
|
||||
self.dialog.set_default_response(Gtk.ResponseType.OK)
|
||||
alignment = Gtk.Alignment(yalign=0, yscale=0, xscale=1)
|
||||
grid = Gtk.Grid(column_spacing=3, row_spacing=3)
|
||||
alignment.add(grid)
|
||||
self.dialog.vbox.pack_start(
|
||||
alignment, expand=True, fill=True, padding=0)
|
||||
grid = Gtk.Grid(
|
||||
column_spacing=3, row_spacing=3, valign=Gtk.Align.START)
|
||||
self.dialog.vbox.pack_start(grid, expand=True, fill=True, padding=0)
|
||||
|
||||
image = Gtk.Image()
|
||||
image.set_from_file(os.path.join(PIXMAPS_DIR, 'tryton.svg'))
|
||||
|
||||
@@ -37,10 +37,9 @@ class Image(BinaryMixin, Widget):
|
||||
|
||||
toolbar = self.toolbar() # Set button attributes even if not display
|
||||
if not attrs.get('readonly'):
|
||||
alignment = Gtk.Alignment(xalign=0.5, yalign=0.5)
|
||||
alignment.add(toolbar)
|
||||
toolbar.set_halign(Gtk.Align.CENTER)
|
||||
self.widget.pack_start(
|
||||
alignment, expand=False, fill=False, padding=0)
|
||||
toolbar, expand=False, fill=False, padding=0)
|
||||
|
||||
self._readonly = False
|
||||
|
||||
|
||||
Reference in new issue
Block a user