Convert more deprecated Gtk widgets

Converted HButtonBox and VButtonBox to ButtonBox widgets.
Converted HPaned and VPaned to Paned widgets.
Converted HScale to Scale widget.
This commit is contained in:
Nick Hall 2015-02-07 18:48:49 +00:00
parent 59238765e8
commit 30d809ed17
10 changed files with 17 additions and 17 deletions

View File

@ -447,7 +447,7 @@ class ConfigureDialog(ManagedWindow):
callback = self.update_slider
lwidget = BasicLabel("%s: " % label)
adj = Gtk.Adjustment(config.get(constant), range[0], range[1], 1, 0, 0)
slider = Gtk.HScale(adjustment=adj)
slider = Gtk.Scale(adjustment=adj)
slider.set_digits(0)
slider.set_value_pos(Gtk.PositionType.BOTTOM)
slider.connect('value-changed', callback, constant)

View File

@ -84,7 +84,7 @@ class SidebarFilter(DbGUIElement):
self.clear_btn.add(hbox)
self.clear_btn.connect('clicked', self.clear)
hbox = Gtk.HButtonBox()
hbox = Gtk.ButtonBox()
hbox.set_layout(Gtk.ButtonBoxStyle.START)
hbox.set_spacing(6)
hbox.set_border_width(12)

View File

@ -281,7 +281,7 @@ class ErrorReportAssistant(Gtk.Assistant):
clear = Gtk.Button("Clear")
clear.connect('clicked', self._clear_error_details)
button_box = Gtk.HButtonBox()
button_box = Gtk.ButtonBox()
button_box.set_border_width(6)
button_box.set_spacing(6)
button_box.set_layout(Gtk.ButtonBoxStyle.END)
@ -362,7 +362,7 @@ class ErrorReportAssistant(Gtk.Assistant):
clear.connect('clicked', self._clear_sys_information)
button_box = Gtk.HButtonBox()
button_box = Gtk.ButtonBox()
button_box.set_border_width(6)
button_box.set_spacing(6)
button_box.set_layout(Gtk.ButtonBoxStyle.END)
@ -436,7 +436,7 @@ class ErrorReportAssistant(Gtk.Assistant):
clear = Gtk.Button("Clear")
clear.connect('clicked', self._clear_user_information)
button_box = Gtk.HButtonBox()
button_box = Gtk.ButtonBox()
button_box.set_border_width(6)
button_box.set_spacing(6)
button_box.set_layout(Gtk.ButtonBoxStyle.END)

View File

@ -1153,7 +1153,7 @@ class GuiPersonListOption(Gtk.Box):
self.__add_person_clicked)
self.__del_person = widgets.SimpleButton(Gtk.STOCK_REMOVE,
self.__del_person_clicked)
self.__vbbox = Gtk.VButtonBox()
self.__vbbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
self.__vbbox.add(self.__add_person)
self.__vbbox.add(self.__del_person)
self.__vbbox.set_layout(Gtk.ButtonBoxStyle.SPREAD)
@ -1330,7 +1330,7 @@ class GuiPlaceListOption(Gtk.Box):
self.__add_place_clicked)
self.__del_place = widgets.SimpleButton(Gtk.STOCK_REMOVE,
self.__del_place_clicked)
self.__vbbox = Gtk.VButtonBox()
self.__vbbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
self.__vbbox.add(self.__add_place)
self.__vbbox.add(self.__del_place)
self.__vbbox.set_layout(Gtk.ButtonBoxStyle.SPREAD)
@ -1473,7 +1473,7 @@ class GuiSurnameColorOption(Gtk.Box):
self.__add_clicked)
self.del_surname = widgets.SimpleButton(Gtk.STOCK_REMOVE,
self.__del_clicked)
self.vbbox = Gtk.VButtonBox()
self.vbbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
self.vbbox.add(self.add_surname)
self.vbbox.add(self.del_surname)
self.vbbox.set_layout(Gtk.ButtonBoxStyle.SPREAD)

View File

@ -140,7 +140,7 @@ class PluginStatus(ManagedWindow):
scrolled_window_reg.add(self.list_reg)
vbox_reg.pack_start(scrolled_window_reg, True, True, 0)
hbutbox = Gtk.HButtonBox()
hbutbox = Gtk.ButtonBox()
hbutbox.set_layout(Gtk.ButtonBoxStyle.SPREAD)
self.__info_btn = Gtk.Button(_("Info"))
hbutbox.add(self.__info_btn)
@ -195,7 +195,7 @@ class PluginStatus(ManagedWindow):
scrolled_window.add(self.list)
vbox_loaded.pack_start(scrolled_window, True, True, 0)
hbutbox = Gtk.HButtonBox()
hbutbox = Gtk.ButtonBox()
hbutbox.set_layout(Gtk.ButtonBoxStyle.SPREAD)
self.__info_btn = Gtk.Button(_("Info"))
hbutbox.add(self.__info_btn)
@ -268,7 +268,7 @@ class PluginStatus(ManagedWindow):
#path to addon path line
install_page.pack_start(install_row, False, False, 0)
hbutbox = Gtk.HButtonBox()
hbutbox = Gtk.ButtonBox()
hbutbox.set_layout(Gtk.ButtonBoxStyle.SPREAD)
self.__add_btn = Gtk.Button(_("Install Addon"))
hbutbox.add(self.__add_btn)

View File

@ -228,7 +228,7 @@ class Bookmarks :
slist.add_with_viewport(self.namelist)
slist.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
box.pack_start(slist, 1, 1, 5)
bbox = Gtk.VButtonBox()
bbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
bbox.set_layout(Gtk.ButtonBoxStyle.START)
bbox.set_spacing(6)
up = Gtk.Button(stock=Gtk.STOCK_GO_UP)

View File

@ -152,8 +152,8 @@ class PageView(DbGUIElement):
self.bottombar = GrampletBar(self.dbstate, self.uistate, self,
self.ident + "_bottombar",
defaults[1])
hpane = Gtk.HPaned()
vpane = Gtk.VPaned()
hpane = Gtk.Paned()
vpane = Gtk.Paned(orientation=Gtk.Orientation.VERTICAL)
hpane.pack1(vpane, resize=True, shrink=False)
hpane.pack2(self.sidebar, resize=False, shrink=True)
hpane.show()

View File

@ -393,7 +393,7 @@ class OrganizeTagsDialog(object):
slist.add_with_viewport(self.namelist)
slist.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
box.pack_start(slist, 1, 1, 5)
bbox = Gtk.VButtonBox()
bbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
bbox.set_layout(Gtk.ButtonBoxStyle.START)
bbox.set_spacing(6)
up = Gtk.Button(stock=Gtk.STOCK_GO_UP)

View File

@ -77,7 +77,7 @@ class PythonEvaluation(Gramplet):
self.dbuf = self.__add_text_view(_("Output"))
self.error = self.__add_text_view(_("Error"))
bbox = Gtk.HButtonBox()
bbox = Gtk.ButtonBox()
apply_button = Gtk.Button(_("Apply"))
apply_button.connect('clicked', self.apply_clicked)
bbox.pack_start(apply_button, False, False, 6)

View File

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