Package list mirage / aee346f
Format with black Thomas Ross 1 year, 6 months ago
1 changed file(s) with 29 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
16111611 title=_("Save As"), action=Gtk.FileChooserAction.SAVE,
16121612 )
16131613 dialog.add_buttons(
1614 Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, Gtk.STOCK_SAVE, Gtk.ResponseType.OK
1614 Gtk.STOCK_CANCEL,
1615 Gtk.ResponseType.CANCEL,
1616 Gtk.STOCK_SAVE,
1617 Gtk.ResponseType.OK,
16151618 )
16161619 dialog.set_default_response(Gtk.ResponseType.OK)
16171620 filename = os.path.basename(self.currimg_name)
17551758 # Prompt user for the url:
17561759 dialog = Gtk.Dialog(_("Open Remote"), self.window, Gtk.DialogFlags.MODAL)
17571760 dialog.add_buttons(
1758 Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, Gtk.STOCK_OPEN, Gtk.ResponseType.OK
1761 Gtk.STOCK_CANCEL,
1762 Gtk.ResponseType.CANCEL,
1763 Gtk.STOCK_OPEN,
1764 Gtk.ResponseType.OK,
17591765 )
17601766 location = Gtk.Entry.new()
17611767 location.set_size_request(300, -1)
17961802 title=_("Open"), action=Gtk.FileChooserAction.OPEN,
17971803 )
17981804 dialog.add_buttons(
1799 Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, Gtk.STOCK_OPEN, Gtk.ResponseType.OK
1805 Gtk.STOCK_CANCEL,
1806 Gtk.ResponseType.CANCEL,
1807 Gtk.STOCK_OPEN,
1808 Gtk.ResponseType.OK,
18001809 )
18011810 if isfile:
18021811 filter = Gtk.FileFilter.new()
21662175 # Show dialog:
21672176 self.actions_dialog.vbox.show_all()
21682177 instructions.set_size_request(self.actions_dialog.size_request().width - 50, -1)
2169 close_button = self.actions_dialog.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
2178 close_button = self.actions_dialog.add_button(
2179 Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE
2180 )
21702181 close_button.grab_focus()
21712182 self.actions_dialog.run()
21722183 self.refresh_custom_actions_menu()
22092220 )
22102221 self.dialog_name.set_transient_for(self.actions_dialog)
22112222 self.dialog_name.add_buttons(
2212 Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT, Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT
2223 Gtk.STOCK_CANCEL,
2224 Gtk.ResponseType.REJECT,
2225 Gtk.STOCK_OK,
2226 Gtk.ResponseType.ACCEPT,
22132227 )
22142228 else:
22152229 self.dialog_name = Gtk.Dialog(
22172231 )
22182232 self.dialog_name.set_transient_for(self.actions_dialog)
22192233 self.dialog_name.add_buttons(
2220 Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT, Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT
2234 Gtk.STOCK_CANCEL,
2235 Gtk.ResponseType.REJECT,
2236 Gtk.STOCK_OK,
2237 Gtk.ResponseType.ACCEPT,
22212238 )
22222239
22232240 self.dialog_name.set_modal(True)
41024119 title=_("Choose directory"), action=Gtk.FileChooserAction.OPEN
41034120 )
41044121 getdir.add_buttons(
4105 Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, Gtk.STOCK_OPEN, Gtk.ResponseType.OK
4122 Gtk.STOCK_CANCEL,
4123 Gtk.ResponseType.CANCEL,
4124 Gtk.STOCK_OPEN,
4125 Gtk.ResponseType.OK,
41064126 )
41074127 getdir.set_action(Gtk.FileChooserAction.SELECT_FOLDER)
41084128 getdir.set_filename(self.fixed_dir)
41544174 [
41554175 "Scott Horowitz <stonecrest@gmail.com>",
41564176 "Fredric Johansson <fredric.miscmail@gmail.com>",
4157 "Thomas Ross <thomasross@thomasross.io>"
4177 "Thomas Ross <thomasross@thomasross.io>",
41584178 ]
41594179 )
41604180 self.about_dialog.set_artists(["William Rea <sillywilly@gmail.com>"])
64326452 1000, self.disable_screensaver_in_slideshow_mode
64336453 )
64346454
6455
64356456 def run(argv):
64366457 Gdk.threads_enter()
64376458 app = Base()