Specify label keyword in Button constructor

This commit is contained in:
Nick Hall 2015-05-22 23:35:10 +01:00
parent ae1af073a7
commit 53887d2033
6 changed files with 19 additions and 19 deletions

View File

@ -1339,7 +1339,7 @@ class GrampsPreferences(ConfigureDialog):
checkbutton.connect("toggled", self.toggle_hide_previous_addons)
grid.attach(checkbutton, 1, current_line, 1, 1)
button = Gtk.Button(_("Check now"))
button = Gtk.Button(label=_("Check now"))
button.connect("clicked", self.check_for_updates)
grid.attach(button, 3, current_line, 1, 1)

View File

@ -138,18 +138,18 @@ class PluginStatus(ManagedWindow):
vbox_reg.pack_start(scrolled_window_reg, True, True, 0)
hbutbox = Gtk.ButtonBox()
hbutbox.set_layout(Gtk.ButtonBoxStyle.SPREAD)
self.__info_btn = Gtk.Button(_("Info"))
self.__info_btn = Gtk.Button(label=_("Info"))
hbutbox.add(self.__info_btn)
self.__info_btn.connect('clicked', self.__info, self.list_reg, 4) # id_col
self.__hide_btn = Gtk.Button(_("Hide/Unhide"))
self.__hide_btn = Gtk.Button(label=_("Hide/Unhide"))
hbutbox.add(self.__hide_btn)
self.__hide_btn.connect('clicked', self.__hide,
self.list_reg, 4, 1) # list, id_col, hide_col
if __debug__:
self.__edit_btn = Gtk.Button(_("Edit"))
self.__edit_btn = Gtk.Button(label=_("Edit"))
hbutbox.add(self.__edit_btn)
self.__edit_btn.connect('clicked', self.__edit, self.list_reg, 4) # id_col
self.__load_btn = Gtk.Button(_("Load"))
self.__load_btn = Gtk.Button(label=_("Load"))
hbutbox.add(self.__load_btn)
self.__load_btn.connect('clicked', self.__load, self.list_reg, 4) # id_col
vbox_reg.pack_start(hbutbox, False, False, 0)
@ -192,19 +192,19 @@ class PluginStatus(ManagedWindow):
vbox_loaded.pack_start(scrolled_window, True, True, 0)
hbutbox = Gtk.ButtonBox()
hbutbox.set_layout(Gtk.ButtonBoxStyle.SPREAD)
self.__info_btn = Gtk.Button(_("Info"))
self.__info_btn = Gtk.Button(label=_("Info"))
hbutbox.add(self.__info_btn)
self.__info_btn.connect('clicked', self.__info, self.list, 4) # id_col
self.__hide_btn = Gtk.Button(_("Hide/Unhide"))
self.__hide_btn = Gtk.Button(label=_("Hide/Unhide"))
hbutbox.add(self.__hide_btn)
self.__hide_btn.connect('clicked', self.__hide,
self.list, 4, 5) # list, id_col, hide_col
if __debug__:
self.__edit_btn = Gtk.Button(_("Edit"))
self.__edit_btn = Gtk.Button(label=_("Edit"))
hbutbox.add(self.__edit_btn)
self.__edit_btn.connect('clicked', self.__edit, self.list, 4) # id_col
self.__load_btn = Gtk.Button(_("Load"))
self.__load_btn = Gtk.Button(label=_("Load"))
self.__load_btn.set_sensitive(False)
hbutbox.add(self.__load_btn)
self.__load_btn.connect('clicked', self.__load, self.list, 4) # id_col
@ -264,13 +264,13 @@ class PluginStatus(ManagedWindow):
hbutbox = Gtk.ButtonBox()
hbutbox.set_layout(Gtk.ButtonBoxStyle.SPREAD)
self.__add_btn = Gtk.Button(_("Install Addon"))
self.__add_btn = Gtk.Button(label=_("Install Addon"))
hbutbox.add(self.__add_btn)
self.__add_btn.connect('clicked', self.__get_addon_top)
self.__add_all_btn = Gtk.Button(_("Install All Addons"))
self.__add_all_btn = Gtk.Button(label=_("Install All Addons"))
hbutbox.add(self.__add_all_btn)
self.__add_all_btn.connect('clicked', self.__get_all_addons)
self.__refresh_btn = Gtk.Button(_("Refresh Addon List"))
self.__refresh_btn = Gtk.Button(label=_("Refresh Addon List"))
hbutbox.add(self.__refresh_btn)
self.__refresh_btn.connect('clicked', self.__refresh_addon_list)
install_page.pack_start(hbutbox, False, True, 5)
@ -283,7 +283,7 @@ class PluginStatus(ManagedWindow):
if __debug__:
# Only show the "Reload" button when in debug mode
# (without -O on the command line)
self.__reload_btn = Gtk.Button(_("Reload"))
self.__reload_btn = Gtk.Button(label=_("Reload"))
self.window.action_area.add(self.__reload_btn)
self.__reload_btn.connect('clicked', self.__reload)

View File

@ -177,12 +177,12 @@ class WriterOptionBox(object):
row += 1
hbox = Gtk.Box()
self.advanced_button = Gtk.Button(_("Change order"))
self.advanced_button = Gtk.Button(label=_("Change order"))
self.advanced_button.set_size_request(150, -1)
self.proxy_options_showing = False
self.advanced_button.connect("clicked", self.show_options)
hbox.pack_end(self.advanced_button, False, True, 0)
self.preview_button = Gtk.Button(_("Calculate Previews"))
self.preview_button = Gtk.Button(label=_("Calculate Previews"))
self.preview_button.connect("clicked", self.preview)
hbox.pack_end(self.preview_button, False, True, 0)
widget.pack_start(hbox, False, True, 0)

View File

@ -71,7 +71,7 @@ class AgeOnDateGramplet(Gramplet):
label = Gtk.Label()
label.set_text(_("Date") + ":")
self.entry = Gtk.Entry()
button = Gtk.Button(_("Run"))
button = Gtk.Button(label=_("Run"))
button.connect("clicked", self.run)
##self.filter =
hbox.pack_start(label, False, True, 0)

View File

@ -74,10 +74,10 @@ class PythonEvaluation(Gramplet):
self.error = self.__add_text_view(_("Error"))
bbox = Gtk.ButtonBox()
apply_button = Gtk.Button(_("Apply"))
apply_button = Gtk.Button(label=_("Apply"))
apply_button.connect('clicked', self.apply_clicked)
bbox.pack_start(apply_button, False, False, 6)
clear_button = Gtk.Button(_("Clear"))
clear_button = Gtk.Button(label=_("Clear"))
clear_button.connect('clicked', self.clear_clicked)
bbox.pack_start(clear_button, False, False, 6)
self.top.pack_start(bbox, False, False, 6)

View File

@ -106,7 +106,7 @@ class Leak(Gramplet):
self.top.pack_start(self.scroll, True, True, 6)
bbox = Gtk.ButtonBox()
apply_button = Gtk.Button(_("Refresh"))
apply_button = Gtk.Button(label=_("Refresh"))
apply_button.connect('clicked', self.apply_clicked)
bbox.pack_start(apply_button, False, False, 6)
self.top.pack_start(bbox, False, False, 6)