Skip to content

Commit

Permalink
mintbackup.py: Fix gtk3 deprecation warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtwebster committed Jan 20, 2025
1 parent 7c180e8 commit e28dea9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions usr/lib/linuxmint/mintbackup/mintbackup.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,12 @@ def __init__(self):
accel_group = Gtk.AccelGroup()
self.main_window.add_accel_group(accel_group)
menu = self.builder.get_object("main_menu")
item = Gtk.ImageMenuItem()
item.set_image(Gtk.Image.new_from_icon_name("help-about-symbolic", Gtk.IconSize.MENU))
item.set_label(_("About"))
item = Gtk.ImageMenuItem(label=_("About"), image=Gtk.Image(icon_name="help-about-symbolic", icon_size=Gtk.IconSize.MENU))
item.connect("activate", self.open_about)
key, mod = Gtk.accelerator_parse("F1")
item.add_accelerator("activate", accel_group, key, mod, Gtk.AccelFlags.VISIBLE)
menu.append(item)
item = Gtk.ImageMenuItem(label=_("Quit"))
image = Gtk.Image.new_from_icon_name("application-exit-symbolic", Gtk.IconSize.MENU)
item.set_image(image)
item = Gtk.ImageMenuItem(label=_("Quit"), image=Gtk.Image(icon_name="application-exit-symbolic", icon_size=Gtk.IconSize.MENU))
item.connect('activate', lambda widget: self.main_window.destroy())
key, mod = Gtk.accelerator_parse("<Control>Q")
item.add_accelerator("activate", accel_group, key, mod, Gtk.AccelFlags.VISIBLE)
Expand Down

0 comments on commit e28dea9

Please sign in to comment.