ui: replace deprecated GTK stock values
This commit is contained in:
parent
593d27770d
commit
55ed173c39
|
@ -67,7 +67,7 @@ def make_toggle(name, label, function, stock_id=None, *args):
|
||||||
# action.set_sensitive(notify.available)
|
# action.set_sensitive(notify.available)
|
||||||
# toggle_notifications = make_toggle('notifications', 'Notifications', _toggle_notifications)
|
# toggle_notifications = make_toggle('notifications', 'Notifications', _toggle_notifications)
|
||||||
|
|
||||||
about = make('help-about', _('About') + ' ' + NAME, _show_about_window, stock_id=Gtk.STOCK_ABOUT)
|
about = make('help-about', _('About') + ' ' + NAME, _show_about_window, stock_id='help-about')
|
||||||
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -96,7 +96,7 @@ def unpair(window, device):
|
||||||
_('Unpair') + ' ' + device.name + ' ?'
|
_('Unpair') + ' ' + device.name + ' ?'
|
||||||
)
|
)
|
||||||
qdialog.set_icon_name('remove')
|
qdialog.set_icon_name('remove')
|
||||||
qdialog.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL)
|
qdialog.add_button(_('Cancel'), Gtk.ResponseType.CANCEL)
|
||||||
qdialog.add_button(_('Unpair'), Gtk.ResponseType.ACCEPT)
|
qdialog.add_button(_('Unpair'), Gtk.ResponseType.ACCEPT)
|
||||||
choice = qdialog.run()
|
choice = qdialog.run()
|
||||||
qdialog.destroy()
|
qdialog.destroy()
|
||||||
|
|
|
@ -136,11 +136,11 @@ class DiversionDialog:
|
||||||
)
|
)
|
||||||
dialog.set_default_size(400, 100)
|
dialog.set_default_size(400, 100)
|
||||||
dialog.add_buttons(
|
dialog.add_buttons(
|
||||||
Gtk.STOCK_YES,
|
_('Yes'),
|
||||||
Gtk.ResponseType.YES,
|
Gtk.ResponseType.YES,
|
||||||
Gtk.STOCK_NO,
|
_('No'),
|
||||||
Gtk.ResponseType.NO,
|
Gtk.ResponseType.NO,
|
||||||
Gtk.STOCK_CANCEL,
|
_('Cancel'),
|
||||||
Gtk.ResponseType.CANCEL,
|
Gtk.ResponseType.CANCEL,
|
||||||
)
|
)
|
||||||
dialog.set_markup(_('If you choose No, changes will be lost when Solaar is closed.'))
|
dialog.set_markup(_('If you choose No, changes will be lost when Solaar is closed.'))
|
||||||
|
|
|
@ -65,7 +65,7 @@ def _create_menu(quit_handler):
|
||||||
|
|
||||||
from .action import about, make
|
from .action import about, make
|
||||||
menu.append(about.create_menu_item())
|
menu.append(about.create_menu_item())
|
||||||
menu.append(make('application-exit', _('Quit'), quit_handler, stock_id=Gtk.STOCK_QUIT).create_menu_item())
|
menu.append(make('application-exit', _('Quit'), quit_handler, stock_id='application-exit').create_menu_item())
|
||||||
del about, make
|
del about, make
|
||||||
|
|
||||||
menu.show_all()
|
menu.show_all()
|
||||||
|
|
Loading…
Reference in New Issue