From 9c8afdd1555f2d26fec5e5e180c46374443541b3 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Fri, 6 Feb 2015 22:24:35 +0000 Subject: [PATCH] Convert Gtk HBox and VBox widgets into Box widgets --- gramps/gui/columnorder.py | 8 ++-- gramps/gui/configure.py | 4 +- gramps/gui/dbloader.py | 2 +- gramps/gui/dialog.py | 2 +- gramps/gui/editors/displaytabs/backreflist.py | 2 +- gramps/gui/editors/displaytabs/buttontab.py | 2 +- gramps/gui/editors/displaytabs/grampstab.py | 12 +++--- gramps/gui/editors/editplacename.py | 2 +- gramps/gui/filters/_searchbar.py | 2 +- gramps/gui/logger/_errorreportassistant.py | 42 +++++++++---------- gramps/gui/logger/_errorview.py | 2 +- gramps/gui/navigator.py | 6 +-- gramps/gui/plug/_guioptions.py | 42 +++++++++---------- gramps/gui/plug/report/_fileentry.py | 4 +- gramps/gui/plug/report/_papermenu.py | 4 +- gramps/gui/plug/report/_styleeditor.py | 2 +- gramps/gui/viewmanager.py | 14 +++---- gramps/gui/views/bookmarks.py | 2 +- gramps/gui/views/listview.py | 4 +- gramps/gui/views/navigationview.py | 2 +- gramps/gui/views/pageview.py | 2 +- gramps/gui/views/tags.py | 4 +- gramps/gui/widgets/dateentry.py | 4 +- gramps/gui/widgets/grampletbar.py | 7 ++-- gramps/gui/widgets/interactivesearchbox.py | 2 +- gramps/gui/widgets/labels.py | 10 ++--- gramps/gui/widgets/linkbox.py | 4 +- gramps/gui/widgets/progressdialog.py | 6 +-- gramps/gui/widgets/statusbar.py | 4 +- gramps/gui/widgets/validatedmaskedentry.py | 2 +- gramps/plugins/gramplet/ageondategramplet.py | 4 +- gramps/plugins/gramplet/calendargramplet.py | 2 +- gramps/plugins/gramplet/eval.py | 2 +- gramps/plugins/gramplet/gallery.py | 2 +- gramps/plugins/gramplet/leak.py | 2 +- gramps/plugins/gramplet/mediapreview.py | 2 +- gramps/plugins/gramplet/notes.py | 4 +- gramps/plugins/gramplet/todo.py | 4 +- gramps/plugins/gramplet/todogramplet.py | 4 +- gramps/plugins/gramplet/welcomegramplet.py | 2 +- gramps/plugins/lib/maps/osmgps.py | 2 +- gramps/plugins/sidebar/categorysidebar.py | 4 +- gramps/plugins/sidebar/dropdownsidebar.py | 2 +- gramps/plugins/sidebar/expandersidebar.py | 10 ++--- gramps/plugins/tool/patchnames.py | 6 +-- gramps/plugins/tool/populatesources.py | 6 +-- gramps/plugins/view/htmlrenderer.py | 2 +- 47 files changed, 133 insertions(+), 132 deletions(-) diff --git a/gramps/gui/columnorder.py b/gramps/gui/columnorder.py index 7e44548b8..5a8b7ccc3 100644 --- a/gramps/gui/columnorder.py +++ b/gramps/gui/columnorder.py @@ -58,7 +58,7 @@ from .glade import Glade #------------------------------------------------------------------------- __LOG = logging.getLogger(".ColumnOrder") -class ColumnOrder(Gtk.VBox): +class ColumnOrder(Gtk.Box): """ Column ordering selection widget """ @@ -74,7 +74,7 @@ class ColumnOrder(Gtk.VBox): tree: are the columns for a treeview, if so, the first columns is not changable """ - GObject.GObject.__init__(self) + Gtk.Box.__init__(self, orientation=Gtk.Orientation.VERTICAL) self.treeview = tree self.colnames = column_names @@ -95,7 +95,7 @@ class ColumnOrder(Gtk.VBox): self.pack_start(Gtk.Label(label=_('Drag and drop the columns to change' ' the order')), False, False, 0) self.pack_start(Gtk.Label(label=' '), False, False,0) - hbox = Gtk.HBox() + hbox = Gtk.Box() hbox.set_spacing(10) hbox.pack_start(Gtk.Label(label=' '), True, True, 0) scroll = Gtk.ScrolledWindow() @@ -105,7 +105,7 @@ class ColumnOrder(Gtk.VBox): self.tree.set_reorderable(True) scroll.add(self.tree) self.apply_button = Gtk.Button(stock='gtk-apply') - btns = Gtk.HButtonBox() + btns = Gtk.ButtonBox() btns.set_layout(Gtk.ButtonBoxStyle.END) btns.pack_start(self.apply_button, True, True, 0) hbox.pack_start(btns, False, True, 0) diff --git a/gramps/gui/configure.py b/gramps/gui/configure.py index 97808be49..80e4ac545 100644 --- a/gramps/gui/configure.py +++ b/gramps/gui/configure.py @@ -329,7 +329,7 @@ class ConfigureDialog(ManagedWindow): if not config: config = self.__config lwidget = BasicLabel("%s: " %label) - hbox = Gtk.HBox() + hbox = Gtk.Box() if path: entry.set_text(path) entry.connect('changed', callback_label) @@ -972,7 +972,7 @@ class GrampsPreferences(ConfigureDialog): lwidget = BasicLabel("%s: " % _('Name format')) lwidget.set_use_underline(True) lwidget.set_mnemonic_widget(self.fmt_obox) - hbox = Gtk.HBox() + hbox = Gtk.Box() btn = Gtk.Button("%s..." % _('Edit') ) btn.connect('clicked', self.cb_name_dialog) hbox.pack_start(self.fmt_obox, True, True, 0) diff --git a/gramps/gui/dbloader.py b/gramps/gui/dbloader.py index c45ce6ae5..12655dc88 100644 --- a/gramps/gui/dbloader.py +++ b/gramps/gui/dbloader.py @@ -483,7 +483,7 @@ def format_maker(): type_selector = GrampsFormatWidget() type_selector.set(format_list) - box = Gtk.HBox() + box = Gtk.Box() label = Gtk.Label(label=_('Select file _type:')) label.set_use_underline(True) label.set_mnemonic_widget(type_selector) diff --git a/gramps/gui/dialog.py b/gramps/gui/dialog.py index cb82b14ab..b386d5934 100644 --- a/gramps/gui/dialog.py +++ b/gramps/gui/dialog.py @@ -380,7 +380,7 @@ def main(args): def test_info(obj): InfoDialog('The title', 'This is a lot of info\n to show to all!', parent=win) - vbox = Gtk.VBox() + vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) win.add(vbox) btn1 = Gtk.Button('Info dialog') diff --git a/gramps/gui/editors/displaytabs/backreflist.py b/gramps/gui/editors/displaytabs/backreflist.py index fde9f9ad8..886a9b716 100644 --- a/gramps/gui/editors/displaytabs/backreflist.py +++ b/gramps/gui/editors/displaytabs/backreflist.py @@ -98,7 +98,7 @@ class BackRefList(EmbeddedList): self.edit_btn = SimpleButton(Gtk.STOCK_EDIT, self.edit_button_clicked) self.edit_btn.set_tooltip_text(_('Edit reference')) - hbox = Gtk.HBox() + hbox = Gtk.Box() hbox.set_spacing(6) hbox.pack_start(self.edit_btn, False, True, 0) hbox.show_all() diff --git a/gramps/gui/editors/displaytabs/buttontab.py b/gramps/gui/editors/displaytabs/buttontab.py index 3160ee6f9..63ce882dd 100644 --- a/gramps/gui/editors/displaytabs/buttontab.py +++ b/gramps/gui/editors/displaytabs/buttontab.py @@ -161,7 +161,7 @@ class ButtonTab(GrampsTab): else: self.jump_btn = None - hbox = Gtk.HBox() + hbox = Gtk.Box() hbox.set_spacing(6) if top_label: hbox.pack_start(self.top_label, False, True, 0) diff --git a/gramps/gui/editors/displaytabs/grampstab.py b/gramps/gui/editors/displaytabs/grampstab.py index d16231cf9..61f1c7af2 100644 --- a/gramps/gui/editors/displaytabs/grampstab.py +++ b/gramps/gui/editors/displaytabs/grampstab.py @@ -37,7 +37,7 @@ _RIGHT = Gdk.keyval_from_name("Right") # #------------------------------------------------------------------------- -class GrampsTab(Gtk.VBox): +class GrampsTab(Gtk.Box): """ This class provides the base level class for 'tabs', which are used to fill in notebook tabs for GRAMPS edit dialogs. @@ -64,7 +64,7 @@ class GrampsTab(Gtk.VBox): @param name: Notebook label name @type name: str/unicode """ - GObject.GObject.__init__(self) + Gtk.Box.__init__(self, orientation=Gtk.Orientation.VERTICAL) # store information to pass to child windows self.dbstate = dbstate @@ -102,9 +102,9 @@ class GrampsTab(Gtk.VBox): by the derived class. Creates an container that has the label and the icon in it. @returns: widget to be used for the notebook label. - @rtype: Gtk.HBox + @rtype: Gtk.Box """ - hbox = Gtk.HBox() + hbox = Gtk.Box() icon = self.get_icon_name() if isinstance(icon, tuple): @@ -143,7 +143,7 @@ class GrampsTab(Gtk.VBox): container class is provided, and the object may manipulate the child widgets contained in the container. @returns: gtk widget - @rtype: Gtk.HBox + @rtype: Gtk.Box """ return self.label_container @@ -187,7 +187,7 @@ class GrampsTab(Gtk.VBox): """ Builds the interface for the derived class. This function should be overridden in the derived class. Since the classes are derived from - Gtk.HBox, the self.pack_start, self.pack_end, and self.add functions + Gtk.Box, the self.pack_start, self.pack_end, and self.add functions can be used to add widgets to the interface. """ pass diff --git a/gramps/gui/editors/editplacename.py b/gramps/gui/editors/editplacename.py index cc5ff3ca1..ed9538f91 100644 --- a/gramps/gui/editors/editplacename.py +++ b/gramps/gui/editors/editplacename.py @@ -67,7 +67,7 @@ class EditPlaceName(ManagedWindow): window.connect('response', self.response) self.set_window(window, None, _('Place Name Editor')) - hbox = Gtk.HBox() + hbox = Gtk.Box() label = Gtk.Label(_('Place Name:')) self.entry = Gtk.Entry() if index >= 0: diff --git a/gramps/gui/filters/_searchbar.py b/gramps/gui/filters/_searchbar.py index 5cb7ad4f2..d84d38a84 100644 --- a/gramps/gui/filters/_searchbar.py +++ b/gramps/gui/filters/_searchbar.py @@ -52,7 +52,7 @@ class SearchBar(object): self.apply_text = '' self.visible = False - self.filterbar = Gtk.HBox() + self.filterbar = Gtk.Box() self.filter_text = Gtk.Entry() self.filter_button = Gtk.Button(stock=Gtk.STOCK_FIND) self.clear_button = Gtk.Button(stock=Gtk.STOCK_CLEAR) diff --git a/gramps/gui/logger/_errorreportassistant.py b/gramps/gui/logger/_errorreportassistant.py index 5589e582f..6b76ec393 100644 --- a/gramps/gui/logger/_errorreportassistant.py +++ b/gramps/gui/logger/_errorreportassistant.py @@ -224,7 +224,7 @@ class ErrorReportAssistant(Gtk.Assistant): image = Gtk.Image() image.set_from_file(SPLASH) - box = Gtk.VBox() + box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) box.pack_start(image, False, False, 5) box.pack_start(label, False, False, 5) @@ -289,7 +289,7 @@ class ErrorReportAssistant(Gtk.Assistant): button_box.pack_end(reset, False, False, 0) button_box.pack_end(clear, False, False, 0) - error_details_box = Gtk.VBox() + error_details_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) error_details_box.pack_start(label, False, False, 0) error_details_box.pack_start(sw_frame, True, True, 0) error_details_box.pack_start(button_box, False, False, 0) @@ -316,11 +316,11 @@ class ErrorReportAssistant(Gtk.Assistant): image = Gtk.Image() image.set_from_file(ICON) - heading = Gtk.HBox() + heading = Gtk.Box() heading.pack_start(side_label, True, True, 5) heading.pack_start(image, False, False, 5) - box = Gtk.VBox() + box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) box.pack_start(heading, False, False, 5) box.pack_start(error_details_frame, True, True, 0) @@ -370,7 +370,7 @@ class ErrorReportAssistant(Gtk.Assistant): button_box.pack_end(reset, False, False, 0) button_box.pack_end(clear, False, False, 0) - sys_information_box = Gtk.VBox() + sys_information_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) sys_information_box.pack_start(label, False, False, 0) sys_information_box.pack_start(sw_frame, True, True, 0) sys_information_box.pack_start(button_box, False, False, 0) @@ -395,11 +395,11 @@ class ErrorReportAssistant(Gtk.Assistant): image = Gtk.Image() image.set_from_file(ICON) - heading = Gtk.HBox() + heading = Gtk.Box() heading.pack_start(side_label, True, True, 5) heading.pack_start(image, False, False, 5) - box = Gtk.VBox() + box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) box.pack_start(heading, False, False, 5) box.pack_start(sys_information_frame, True, True, 0) @@ -443,7 +443,7 @@ class ErrorReportAssistant(Gtk.Assistant): button_box.pack_end(clear, False, False, 0) - user_information_box = Gtk.VBox() + user_information_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) user_information_box.pack_start(label, False, False, 0) user_information_box.pack_start(sw_frame, True, True, 0) user_information_box.pack_start(button_box, False, False, 0) @@ -467,11 +467,11 @@ class ErrorReportAssistant(Gtk.Assistant): image = Gtk.Image() image.set_from_file(ICON) - heading = Gtk.HBox() + heading = Gtk.Box() heading.pack_start(side_label, True, True, 5) heading.pack_start(image, False, False, 5) - box = Gtk.VBox() + box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) box.pack_start(heading, False, False, 5) box.pack_start(user_information_frame, True, True, 0) @@ -509,7 +509,7 @@ class ErrorReportAssistant(Gtk.Assistant): sw_frame = Gtk.Frame() sw_frame.add(swin) - summary_box = Gtk.VBox() + summary_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) summary_box.pack_start(label, False, False, 0) summary_box.pack_start(sw_frame, True, True, 0) @@ -534,11 +534,11 @@ class ErrorReportAssistant(Gtk.Assistant): image = Gtk.Image() image.set_from_file(ICON) - heading = Gtk.HBox() + heading = Gtk.Box() heading.pack_start(side_label, True, True, 5) heading.pack_start(image, False, False, 5) - box = Gtk.VBox() + box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) box.pack_start(heading, False, False, 5) box.pack_start(summary_frame, True, True, 0) @@ -574,10 +574,10 @@ class ErrorReportAssistant(Gtk.Assistant): url_button = Gtk.Button("File bug report") url_button.connect('clicked', self._start_gramps_bts_in_browser) - url_button_vbox = Gtk.VBox() + url_button_vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) url_button_vbox.pack_start(url_button, True, False, 0) - url_box = Gtk.HBox() + url_box = Gtk.Box() url_box.pack_start(url_label, True, True, 0) url_box.pack_start(url_button_vbox, False, False, 0) @@ -601,10 +601,10 @@ class ErrorReportAssistant(Gtk.Assistant): clip_button = Gtk.Button("Copy to clipboard") clip_button.connect('clicked', self._copy_to_clipboard) - clip_button_vbox = Gtk.VBox() + clip_button_vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) clip_button_vbox.pack_start(clip_button, True, False, 0) - clip_box = Gtk.HBox() + clip_box = Gtk.Box() clip_box.pack_start(clip_label, True, True, 0) clip_box.pack_start(clip_button_vbox, False, False, 0) @@ -617,7 +617,7 @@ class ErrorReportAssistant(Gtk.Assistant): clip_frame.add(clip_align) - inner_box = Gtk.VBox() + inner_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) inner_box.pack_start(label, False, False, 0) inner_box.pack_start(clip_frame, False, False, 0) inner_box.pack_start(url_frame, False, False, 0) @@ -643,11 +643,11 @@ class ErrorReportAssistant(Gtk.Assistant): image = Gtk.Image() image.set_from_file(ICON) - heading = Gtk.HBox() + heading = Gtk.Box() heading.pack_start(side_label, True, True, 5) heading.pack_start(image, False, False, 5) - box = Gtk.VBox() + box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) box.pack_start(heading, False, False, 5) box.pack_start(outer_frame, True, True, 0) @@ -671,7 +671,7 @@ class ErrorReportAssistant(Gtk.Assistant): image = Gtk.Image() image.set_from_file(SPLASH) - box = Gtk.VBox() + box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) box.pack_start(image, False, False, 5) box.pack_start(label, False, False, 5) diff --git a/gramps/gui/logger/_errorview.py b/gramps/gui/logger/_errorview.py index 878e3bf50..13207eb94 100644 --- a/gramps/gui/logger/_errorview.py +++ b/gramps/gui/logger/_errorview.py @@ -85,7 +85,7 @@ class ErrorView(object): vbox = self.top.get_content_area() vbox.set_spacing(5) self.top.set_border_width(12) - hbox = Gtk.HBox() + hbox = Gtk.Box() hbox.set_spacing(12) image = Gtk.Image() image.set_from_stock(Gtk.STOCK_DIALOG_ERROR, Gtk.IconSize.DIALOG) diff --git a/gramps/gui/navigator.py b/gramps/gui/navigator.py index 7e49aee41..81dc41735 100644 --- a/gramps/gui/navigator.py +++ b/gramps/gui/navigator.py @@ -91,17 +91,17 @@ class Navigator(object): self.cat_view_group = None self.merge_ids = [] - self.top = Gtk.VBox() + self.top = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) frame = Gtk.Frame() - hbox = Gtk.HBox() + hbox = Gtk.Box() hbox.show() frame.add(hbox) frame.show() self.select_button = Gtk.ToggleButton() self.select_button.set_relief(Gtk.ReliefStyle.NONE) - select_hbox = Gtk.HBox() + select_hbox = Gtk.Box() self.title_label = Gtk.Label(label='') arrow = Gtk.Arrow(arrow_type=Gtk.ArrowType.DOWN, shadow_type=Gtk.ShadowType.NONE) diff --git a/gramps/gui/plug/_guioptions.py b/gramps/gui/plug/_guioptions.py index baf49f6fe..f550260d4 100644 --- a/gramps/gui/plug/_guioptions.py +++ b/gramps/gui/plug/_guioptions.py @@ -490,13 +490,13 @@ class GuiBooleanOption(Gtk.CheckButton): # GuiEnumeratedListOption class # #------------------------------------------------------------------------- -class GuiEnumeratedListOption(Gtk.HBox): +class GuiEnumeratedListOption(Gtk.Box): """ This class displays an option that provides a finite number of values. Each possible value is assigned a value and a description. """ def __init__(self, option, dbstate, uistate, track, override): - GObject.GObject.__init__(self) + Gtk.Box.__init__(self) evtBox = Gtk.EventBox() self.__option = option self.__combo = Gtk.ComboBoxText() @@ -587,7 +587,7 @@ class GuiEnumeratedListOption(Gtk.HBox): # GuiPersonOption class # #------------------------------------------------------------------------- -class GuiPersonOption(Gtk.HBox): +class GuiPersonOption(Gtk.Box): """ This class displays an option that allows a person from the database to be selected. @@ -598,7 +598,7 @@ class GuiPersonOption(Gtk.HBox): @type option: gen.plug.menu.PersonOption @return: nothing """ - GObject.GObject.__init__(self) + Gtk.Box.__init__(self) self.__option = option self.__dbstate = dbstate self.__db = dbstate.get_database() @@ -712,7 +712,7 @@ class GuiPersonOption(Gtk.HBox): # GuiFamilyOption class # #------------------------------------------------------------------------- -class GuiFamilyOption(Gtk.HBox): +class GuiFamilyOption(Gtk.Box): """ This class displays an option that allows a family from the database to be selected. @@ -723,7 +723,7 @@ class GuiFamilyOption(Gtk.HBox): @type option: gen.plug.menu.FamilyOption @return: nothing """ - GObject.GObject.__init__(self) + Gtk.Box.__init__(self) self.__option = option self.__dbstate = dbstate self.__db = dbstate.get_database() @@ -901,7 +901,7 @@ class GuiFamilyOption(Gtk.HBox): # GuiNoteOption class # #------------------------------------------------------------------------- -class GuiNoteOption(Gtk.HBox): +class GuiNoteOption(Gtk.Box): """ This class displays an option that allows a note from the database to be selected. @@ -912,7 +912,7 @@ class GuiNoteOption(Gtk.HBox): @type option: gen.plug.menu.NoteOption @return: nothing """ - GObject.GObject.__init__(self) + Gtk.Box.__init__(self) self.__option = option self.__dbstate = dbstate self.__db = dbstate.get_database() @@ -1005,7 +1005,7 @@ class GuiNoteOption(Gtk.HBox): # GuiMediaOption class # #------------------------------------------------------------------------- -class GuiMediaOption(Gtk.HBox): +class GuiMediaOption(Gtk.Box): """ This class displays an option that allows a media object from the database to be selected. @@ -1016,7 +1016,7 @@ class GuiMediaOption(Gtk.HBox): @type option: gen.plug.menu.MediaOption @return: nothing """ - GObject.GObject.__init__(self) + Gtk.Box.__init__(self) self.__option = option self.__dbstate = dbstate self.__db = dbstate.get_database() @@ -1106,7 +1106,7 @@ class GuiMediaOption(Gtk.HBox): # GuiPersonListOption class # #------------------------------------------------------------------------- -class GuiPersonListOption(Gtk.HBox): +class GuiPersonListOption(Gtk.Box): """ This class displays a widget that allows multiple people from the database to be selected. @@ -1117,7 +1117,7 @@ class GuiPersonListOption(Gtk.HBox): @type option: gen.plug.menu.PersonListOption @return: nothing """ - GObject.GObject.__init__(self) + Gtk.Box.__init__(self) self.__option = option self.__dbstate = dbstate self.__db = dbstate.get_database() @@ -1283,7 +1283,7 @@ class GuiPersonListOption(Gtk.HBox): # GuiPlaceListOption class # #------------------------------------------------------------------------- -class GuiPlaceListOption(Gtk.HBox): +class GuiPlaceListOption(Gtk.Box): """ This class displays a widget that allows multiple places from the database to be selected. @@ -1294,7 +1294,7 @@ class GuiPlaceListOption(Gtk.HBox): @type option: gen.plug.menu.PlaceListOption @return: nothing """ - GObject.GObject.__init__(self) + Gtk.Box.__init__(self) self.__option = option self.__dbstate = dbstate self.__db = dbstate.get_database() @@ -1426,7 +1426,7 @@ class GuiPlaceListOption(Gtk.HBox): # GuiSurnameColorOption class # #------------------------------------------------------------------------- -class GuiSurnameColorOption(Gtk.HBox): +class GuiSurnameColorOption(Gtk.Box): """ This class displays a widget that allows multiple surnames to be selected from the database, and to assign a colour (not necessarily @@ -1438,7 +1438,7 @@ class GuiSurnameColorOption(Gtk.HBox): @type option: gen.plug.menu.SurnameColorOption @return: nothing """ - GObject.GObject.__init__(self) + Gtk.Box.__init__(self) self.__option = option self.__dbstate = dbstate self.__db = dbstate.get_database() @@ -1618,7 +1618,7 @@ class GuiSurnameColorOption(Gtk.HBox): # GuiDestinationOption class # #------------------------------------------------------------------------- -class GuiDestinationOption(Gtk.HBox): +class GuiDestinationOption(Gtk.Box): """ This class displays an option that allows the user to select a DestinationOption. @@ -1629,7 +1629,7 @@ class GuiDestinationOption(Gtk.HBox): @type option: gen.plug.menu.DestinationOption @return: nothing """ - GObject.GObject.__init__(self) + Gtk.Box.__init__(self) self.__option = option self.__entry = Gtk.Entry() self.__entry.set_text( self.__option.get_value() ) @@ -1787,13 +1787,13 @@ class GuiStyleOption(GuiEnumeratedListOption): # GuiBooleanListOption class # #------------------------------------------------------------------------- -class GuiBooleanListOption(Gtk.HBox): +class GuiBooleanListOption(Gtk.Box): """ This class displays an option that provides a list of check boxes. Each possible value is assigned a value and a description. """ def __init__(self, option, dbstate, uistate, track, override): - GObject.GObject.__init__(self) + Gtk.Box.__init__(self) self.__option = option self.__cbutton = [] @@ -1804,7 +1804,7 @@ class GuiBooleanListOption(Gtk.HBox): COLUMNS = 3 column = [] for i in range(COLUMNS): - vbox = Gtk.VBox() + vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.pack_start(vbox, True, True, 0) column.append(vbox) vbox.show() diff --git a/gramps/gui/plug/report/_fileentry.py b/gramps/gui/plug/report/_fileentry.py index 62880e6cf..0a7f215ad 100644 --- a/gramps/gui/plug/report/_fileentry.py +++ b/gramps/gui/plug/report/_fileentry.py @@ -24,10 +24,10 @@ import os from gi.repository import Gtk from gi.repository import GObject from gramps.gen.constfunc import conv_to_unicode, get_curr_dir, uni_to_gui -class FileEntry(Gtk.HBox): +class FileEntry(Gtk.Box): """ A widget that allows the user to select a file from the file system """ def __init__(self, defname, title): - GObject.GObject.__init__(self) + Gtk.Box.__init__(self) self.title = title self.dir = False diff --git a/gramps/gui/plug/report/_papermenu.py b/gramps/gui/plug/report/_papermenu.py index 3a0a9f167..d964ad9f5 100644 --- a/gramps/gui/plug/report/_papermenu.py +++ b/gramps/gui/plug/report/_papermenu.py @@ -131,11 +131,11 @@ class OrientationComboBox(Gtk.ComboBox): # PaperFrame # #------------------------------------------------------------------------- -class PaperFrame(Gtk.HBox): +class PaperFrame(Gtk.Box): """PaperFrame provides all the entry necessary to specify a paper style. """ def __init__(self,default_metric,default_name,default_orientation, margins=[2.54,2.54,2.54,2.54], custom=[29.7,21.0]): - GObject.GObject.__init__(self) + Gtk.Box.__init__(self) glade_xml = Glade() self.paper_grid = glade_xml.get_object('paper_grid') diff --git a/gramps/gui/plug/report/_styleeditor.py b/gramps/gui/plug/report/_styleeditor.py index d5aa6a877..7275f0c16 100644 --- a/gramps/gui/plug/report/_styleeditor.py +++ b/gramps/gui/plug/report/_styleeditor.py @@ -349,7 +349,7 @@ class StyleEditor(object): self.vbox.remove(widget) for i in range(t.get_columns()): - hbox = Gtk.HBox() + hbox = Gtk.Box() label = Gtk.Label(_('Column %d:') % (i + 1)) hbox.pack_start(label, False, False, 6) spin = Gtk.SpinButton() diff --git a/gramps/gui/viewmanager.py b/gramps/gui/viewmanager.py index 20bc4f50f..c16cba8d1 100644 --- a/gramps/gui/viewmanager.py +++ b/gramps/gui/viewmanager.py @@ -371,9 +371,9 @@ class ViewManager(CLIManager): self.window.set_has_resize_grip(True) self.window.set_default_size(width, height) - vbox = Gtk.VBox() + vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.window.add(vbox) - hpane = Gtk.HPaned() + hpane = Gtk.Paned() self.ebox = Gtk.EventBox() self.navigator = Navigator(self) @@ -393,7 +393,7 @@ class ViewManager(CLIManager): self.toolbar = self.uimanager.get_widget('/ToolBar') vbox.pack_start(self.menubar, False, True, 0) vbox.pack_start(self.toolbar, False, True, 0) - vbox.add(hpane) + vbox.pack_start(hpane, True, True, 0) self.statusbar = Statusbar() self.statusbar.show() vbox.pack_end(self.statusbar, False, True, 0) @@ -981,7 +981,7 @@ class ViewManager(CLIManager): self.pages.append(page) # create icon/label for notebook tab (useful for debugging) - hbox = Gtk.HBox() + hbox = Gtk.Box() image = Gtk.Image() image.set_from_stock(page.get_stock(), Gtk.IconSize.MENU) hbox.pack_start(image, False, True, 0) @@ -1232,7 +1232,7 @@ class ViewManager(CLIManager): close_button = window.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE) vbox = window.get_content_area() - hbox = Gtk.HBox() + hbox = Gtk.Box() label = Gtk.Label(label=_("Path:")) label.set_justify(Gtk.Justification.LEFT) label.set_size_request(90, -1) @@ -1252,7 +1252,7 @@ class ViewManager(CLIManager): button.add(image) hbox.pack_end(button, False, True, 0) vbox.pack_start(hbox, False, True, 0) - hbox = Gtk.HBox() + hbox = Gtk.Box() label = Gtk.Label(label=_("File:")) label.set_justify(Gtk.Justification.LEFT) label.set_size_request(90, -1) @@ -1271,7 +1271,7 @@ class ViewManager(CLIManager): }) hbox.pack_end(file_entry, True, True, 0) vbox.pack_start(hbox, False, True, 0) - hbox = Gtk.HBox() + hbox = Gtk.Box() bytes = 0 mbytes = "0" for media in self.dbstate.db.iter_media_objects(): diff --git a/gramps/gui/views/bookmarks.py b/gramps/gui/views/bookmarks.py index b875baa19..e57010a5d 100644 --- a/gramps/gui/views/bookmarks.py +++ b/gramps/gui/views/bookmarks.py @@ -216,7 +216,7 @@ class Bookmarks : % _("Organize Bookmarks")) label.set_use_markup(True) self.top.vbox.pack_start(label, 0, 0, 5) - box = Gtk.HBox() + box = Gtk.Box() self.top.vbox.pack_start(box, 1, 1, 5) name_titles = [(_('Name'), -1, 200), (_('ID'), -1, 50), ('', -1, 0)] diff --git a/gramps/gui/views/listview.py b/gramps/gui/views/listview.py index 7bac93049..1cae0700c 100644 --- a/gramps/gui/views/listview.py +++ b/gramps/gui/views/listview.py @@ -143,7 +143,7 @@ class ListView(NavigationView): contains the interface. This containter will be inserted into a Gtk.Notebook page. """ - self.vbox = Gtk.VBox() + self.vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.vbox.set_border_width(4) self.vbox.set_spacing(4) @@ -1010,7 +1010,7 @@ class ListView(NavigationView): combobox = Gtk.ComboBoxText() label = Gtk.Label(label=_("Format:")) label.set_alignment(1.0, 0.5) - box = Gtk.HBox() + box = Gtk.Box() box.pack_start(label, True, True, padding=12) box.pack_start(combobox, False, False, 0) combobox.append_text(_('CSV')) diff --git a/gramps/gui/views/navigationview.py b/gramps/gui/views/navigationview.py index 1f5dfbc2c..dbca7b945 100644 --- a/gramps/gui/views/navigationview.py +++ b/gramps/gui/views/navigationview.py @@ -350,7 +350,7 @@ class NavigationView(PageView): dialog.vbox.add(label) dialog.vbox.set_spacing(10) dialog.vbox.set_border_width(12) - hbox = Gtk.HBox() + hbox = Gtk.Box() hbox.pack_start(Gtk.Label("%s: " % _('ID', True, True, 0)), False) text = Gtk.Entry() text.set_activates_default(True) diff --git a/gramps/gui/views/pageview.py b/gramps/gui/views/pageview.py index 4ff21abd1..e9d3ec27b 100644 --- a/gramps/gui/views/pageview.py +++ b/gramps/gui/views/pageview.py @@ -626,7 +626,7 @@ class DummyPage(PageView): PageView.__init__(self, title, pdata, dbstate, uistate) def build_widget(self): - box = Gtk.VBox(homogeneous=False, spacing=1) + box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=1) #top widget at the top box.pack_start(Gtk.Label(label=_('View %(name)s: %(msg)s') % { 'name': self.title, diff --git a/gramps/gui/views/tags.py b/gramps/gui/views/tags.py index f8326bb53..5228b9b7d 100644 --- a/gramps/gui/views/tags.py +++ b/gramps/gui/views/tags.py @@ -379,7 +379,7 @@ class OrganizeTagsDialog(object): % _("Organize Tags")) label.set_use_markup(True) top.vbox.pack_start(label, 0, 0, 5) - box = Gtk.HBox() + box = Gtk.Box() top.vbox.pack_start(box, 1, 1, 5) name_titles = [('', NOSORT, 20, INTEGER), # Priority @@ -587,7 +587,7 @@ class EditTag(object): top.set_transient_for(self.parent_window) top.vbox.set_spacing(5) - hbox = Gtk.HBox() + hbox = Gtk.Box() top.vbox.pack_start(hbox, False, False, 10) label = Gtk.Label(label=_('Tag Name:')) diff --git a/gramps/gui/widgets/dateentry.py b/gramps/gui/widgets/dateentry.py index 20bfe16d2..45cc3d723 100644 --- a/gramps/gui/widgets/dateentry.py +++ b/gramps/gui/widgets/dateentry.py @@ -49,10 +49,10 @@ from gramps.gen.lib.date import Date # DateEntry class # #------------------------------------------------------------------------- -class DateEntry(Gtk.HBox): +class DateEntry(Gtk.Box): def __init__(self, uistate, track): - Gtk.HBox.__init__(self) + Gtk.Box.__init__(self) self.entry = ValidatableMaskedEntry() self.entry.set_width_chars(13) self.pack_start(self.entry, True, True, 0) diff --git a/gramps/gui/widgets/grampletbar.py b/gramps/gui/widgets/grampletbar.py index 965a52370..86631c7ce 100644 --- a/gramps/gui/widgets/grampletbar.py +++ b/gramps/gui/widgets/grampletbar.py @@ -112,7 +112,8 @@ class GrampletBar(Gtk.Notebook): self.set_scrollable(True) book_button = Gtk.Button() - box = Gtk.VBox() # Arrow is too small unless in a Vbox + # Arrow is too small unless in a box + box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) arrow = Gtk.Arrow(arrow_type=Gtk.ArrowType.DOWN, shadow_type=Gtk.ShadowType.NONE) arrow.show() @@ -691,12 +692,12 @@ class DetachedWindow(ManagedWindow): # TabLabel class # #------------------------------------------------------------------------- -class TabLabel(Gtk.HBox): +class TabLabel(Gtk.Box): """ Create a tab label consisting of a label and a close button. """ def __init__(self, gramplet, callback): - Gtk.HBox.__init__(self) + Gtk.Box.__init__(self) self.text = gramplet.title self.set_spacing(4) diff --git a/gramps/gui/widgets/interactivesearchbox.py b/gramps/gui/widgets/interactivesearchbox.py index 5efb3608c..04d233c24 100644 --- a/gramps/gui/widgets/interactivesearchbox.py +++ b/gramps/gui/widgets/interactivesearchbox.py @@ -157,7 +157,7 @@ class InteractiveSearchBox(): frame.show() self._search_window.add(frame) - vbox = Gtk.VBox() + vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) vbox.show() frame.add(vbox) vbox.set_border_width(3) diff --git a/gramps/gui/widgets/labels.py b/gramps/gui/widgets/labels.py index 5c900760f..ca4dc512a 100644 --- a/gramps/gui/widgets/labels.py +++ b/gramps/gui/widgets/labels.py @@ -128,7 +128,7 @@ class LinkLabel(Gtk.EventBox): self.label.set_use_markup(True) self.label.set_alignment(0, 0.5) - hbox = Gtk.HBox() + hbox = Gtk.Box() hbox.pack_start(self.label, False, False, 0) if label[1]: hbox.pack_start(GenderLabel(label[1]), False, False, 0) @@ -186,9 +186,9 @@ class LinkLabel(Gtk.EventBox): # EditLabel class # #------------------------------------------------------------------------- -class EditLabel(Gtk.HBox): +class EditLabel(Gtk.Box): def __init__(self, text): - GObject.GObject.__init__(self) + Gtk.Box.__init__(self) label = BasicLabel(text) self.pack_start(label, False, True, 0) self.pack_start(Gtk.Image.new_from_stock(Gtk.STOCK_EDIT, @@ -242,10 +242,10 @@ class MarkupLabel(Gtk.Label): # DualMarkupLabel class # #------------------------------------------------------------------------- -class DualMarkupLabel(Gtk.HBox): +class DualMarkupLabel(Gtk.Box): def __init__(self, text, alt, x_align=0, y_align=0.5): - GObject.GObject.__init__(self) + Gtk.Box.__init__(self) label = Gtk.Label(label=text) label.set_alignment(x_align, y_align) label.set_use_markup(True) diff --git a/gramps/gui/widgets/linkbox.py b/gramps/gui/widgets/linkbox.py index 91ef87235..adf36e83d 100644 --- a/gramps/gui/widgets/linkbox.py +++ b/gramps/gui/widgets/linkbox.py @@ -41,10 +41,10 @@ from gi.repository import Gtk # LinkBox class # #------------------------------------------------------------------------- -class LinkBox(Gtk.HBox): +class LinkBox(Gtk.Box): def __init__(self, link, button): - GObject.GObject.__init__(self) + Gtk.Box.__init__(self) self.set_spacing(6) self.pack_start(link, False, True, 0) if button: diff --git a/gramps/gui/widgets/progressdialog.py b/gramps/gui/widgets/progressdialog.py index e842bd982..53c28b23f 100644 --- a/gramps/gui/widgets/progressdialog.py +++ b/gramps/gui/widgets/progressdialog.py @@ -410,7 +410,7 @@ class ProgressMonitor(object): # _GtkProgressBar # #------------------------------------------------------------------------- -class _GtkProgressBar(Gtk.VBox): +class _GtkProgressBar(Gtk.Box): """ This widget displays the progress bar and labels for a progress indicator. It provides an interface to updating the progress bar. @@ -421,7 +421,7 @@ class _GtkProgressBar(Gtk.VBox): :param long_op_status: the status of the operation. :type long_op_status: :class:`.LongOpStatus` """ - GObject.GObject.__init__(self) + Gtk.Box.__init__(self, orientation=Gtk.Orientation.VERTICAL) msg = long_op_status.get_msg() self._old_val = -1 @@ -430,7 +430,7 @@ class _GtkProgressBar(Gtk.VBox): #self.set_border_width(24) self._pbar = Gtk.ProgressBar() - self._hbox = Gtk.HBox() + self._hbox = Gtk.Box() # Only display the cancel button is the operation # can be canceled. diff --git a/gramps/gui/widgets/statusbar.py b/gramps/gui/widgets/statusbar.py index 5748162de..d5df55e6d 100644 --- a/gramps/gui/widgets/statusbar.py +++ b/gramps/gui/widgets/statusbar.py @@ -45,12 +45,12 @@ from . import WarnButton # Statusbar class # #------------------------------------------------------------------------- -class Statusbar(Gtk.HBox): +class Statusbar(Gtk.Box): """ A status bar """ def __init__(self): - Gtk.HBox.__init__(self) + Gtk.Box.__init__(self) self.set_spacing(4) self.set_border_width(2) diff --git a/gramps/gui/widgets/validatedmaskedentry.py b/gramps/gui/widgets/validatedmaskedentry.py index a5529400e..c695503a3 100644 --- a/gramps/gui/widgets/validatedmaskedentry.py +++ b/gramps/gui/widgets/validatedmaskedentry.py @@ -1423,7 +1423,7 @@ def main(args): Gtk.main_quit() win.connect('delete-event', cb) - vbox = Gtk.VBox() + vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) win.add(vbox) label = Gtk.Label(label='Pre-filled entry validated against the given list:') diff --git a/gramps/plugins/gramplet/ageondategramplet.py b/gramps/plugins/gramplet/ageondategramplet.py index de0356dc1..8b6aad3ca 100644 --- a/gramps/plugins/gramplet/ageondategramplet.py +++ b/gramps/plugins/gramplet/ageondategramplet.py @@ -56,8 +56,8 @@ class AgeOnDateGramplet(Gramplet): from gi.repository import Gtk # GUI setup: self.set_tooltip(_("Enter a date, click Run")) - vbox = Gtk.VBox() - hbox = Gtk.HBox() + vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + hbox = Gtk.Box() # label, entry description = Gtk.TextView() description.set_wrap_mode(Gtk.WrapMode.WORD) diff --git a/gramps/plugins/gramplet/calendargramplet.py b/gramps/plugins/gramplet/calendargramplet.py index 512a64116..cd2cc4949 100644 --- a/gramps/plugins/gramplet/calendargramplet.py +++ b/gramps/plugins/gramplet/calendargramplet.py @@ -41,7 +41,7 @@ class CalendarGramplet(Gramplet): self.gui.calendar.set_display_options( Gtk.CalendarDisplayOptions.SHOW_HEADING) self.gui.get_container_widget().remove(self.gui.textview) - vbox = Gtk.VBox(homogeneous=False, spacing=0) + vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) vbox.pack_start(self.gui.calendar, False, False, 0) self.gui.get_container_widget().add_with_viewport(vbox) vbox.show_all() diff --git a/gramps/plugins/gramplet/eval.py b/gramps/plugins/gramplet/eval.py index 8aa42f5e3..64994a163 100644 --- a/gramps/plugins/gramplet/eval.py +++ b/gramps/plugins/gramplet/eval.py @@ -70,7 +70,7 @@ class PythonEvaluation(Gramplet): """ Build the GUI interface. """ - self.top = Gtk.VBox() + self.top = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.top.set_border_width(6) self.ebuf = self.__add_text_view(_("Evaluation")) diff --git a/gramps/plugins/gramplet/gallery.py b/gramps/plugins/gramplet/gallery.py index cec431b0a..ea74fed63 100644 --- a/gramps/plugins/gramplet/gallery.py +++ b/gramps/plugins/gramplet/gallery.py @@ -37,7 +37,7 @@ class Gallery(Gramplet): Build the GUI interface. """ self.image_list = [] - self.top = Gtk.HBox(homogeneous=False, spacing=3) + self.top = Gtk.Box(spacing=3) return self.top def clear_images(self): diff --git a/gramps/plugins/gramplet/leak.py b/gramps/plugins/gramplet/leak.py index 5497fe01b..b5d8029a7 100644 --- a/gramps/plugins/gramplet/leak.py +++ b/gramps/plugins/gramplet/leak.py @@ -79,7 +79,7 @@ class Leak(Gramplet): """ Build the GUI interface. """ - self.top = Gtk.VBox() + self.top = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.top.set_border_width(6) self.label = Gtk.Label() diff --git a/gramps/plugins/gramplet/mediapreview.py b/gramps/plugins/gramplet/mediapreview.py index 4dd4b6cbd..51fc082b3 100644 --- a/gramps/plugins/gramplet/mediapreview.py +++ b/gramps/plugins/gramplet/mediapreview.py @@ -35,7 +35,7 @@ class MediaPreview(Gramplet): """ Build the GUI interface. """ - self.top = Gtk.HBox() + self.top = Gtk.Box() self.photo = Photo(self.uistate.screen_height() < 1000) self.top.pack_start(self.photo, fill=True, expand=False, padding=5) self.top.show_all() diff --git a/gramps/plugins/gramplet/notes.py b/gramps/plugins/gramplet/notes.py index 6d6ba4d3e..49efdc812 100644 --- a/gramps/plugins/gramplet/notes.py +++ b/gramps/plugins/gramplet/notes.py @@ -40,9 +40,9 @@ class Notes(Gramplet): """ Build the GUI interface. """ - top = Gtk.VBox(homogeneous=False) + top = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) - hbox = Gtk.HBox() + hbox = Gtk.Box() self.left = SimpleButton(Gtk.STOCK_GO_BACK, self.left_clicked) self.left.set_sensitive(False) hbox.pack_start(self.left, False, False, 0) diff --git a/gramps/plugins/gramplet/todo.py b/gramps/plugins/gramplet/todo.py index 410e6a638..258cbc25a 100644 --- a/gramps/plugins/gramplet/todo.py +++ b/gramps/plugins/gramplet/todo.py @@ -40,9 +40,9 @@ class ToDo(Gramplet): """ Build the GUI interface. """ - top = Gtk.VBox(homogeneous=False) + top = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) - hbox = Gtk.HBox() + hbox = Gtk.Box() self.left = SimpleButton(Gtk.STOCK_GO_BACK, self.left_clicked) self.left.set_tooltip_text(_('Previous To Do note')) self.left.set_sensitive(False) diff --git a/gramps/plugins/gramplet/todogramplet.py b/gramps/plugins/gramplet/todogramplet.py index ef2390ca1..96aa60226 100644 --- a/gramps/plugins/gramplet/todogramplet.py +++ b/gramps/plugins/gramplet/todogramplet.py @@ -43,9 +43,9 @@ class ToDoGramplet(Gramplet): """ Build the GUI interface. """ - top = Gtk.VBox(homogeneous=False) + top = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) - hbox = Gtk.HBox() + hbox = Gtk.Box() self.left = SimpleButton(Gtk.STOCK_GO_BACK, self.left_clicked) self.left.set_tooltip_text(_('Previous To Do note')) self.left.set_sensitive(False) diff --git a/gramps/plugins/gramplet/welcomegramplet.py b/gramps/plugins/gramplet/welcomegramplet.py index 312b778ad..97eda7acf 100644 --- a/gramps/plugins/gramplet/welcomegramplet.py +++ b/gramps/plugins/gramplet/welcomegramplet.py @@ -82,7 +82,7 @@ class WelcomeGramplet(Gramplet): """ Build the GUI interface. """ - top = Gtk.VBox(homogeneous=False) + top = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) scrolledwindow = Gtk.ScrolledWindow() scrolledwindow.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) diff --git a/gramps/plugins/lib/maps/osmgps.py b/gramps/plugins/lib/maps/osmgps.py index 7a250f1ed..4e2de9a21 100644 --- a/gramps/plugins/lib/maps/osmgps.py +++ b/gramps/plugins/lib/maps/osmgps.py @@ -100,7 +100,7 @@ class OsmGps(): """ create the vbox """ - self.vbox = Gtk.VBox(homogeneous=False, spacing=0) + self.vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) cache_path = config.get('geography.path') if not os.path.isdir(cache_path): try: diff --git a/gramps/plugins/sidebar/categorysidebar.py b/gramps/plugins/sidebar/categorysidebar.py index 884a6eac7..b55cc5403 100644 --- a/gramps/plugins/sidebar/categorysidebar.py +++ b/gramps/plugins/sidebar/categorysidebar.py @@ -72,7 +72,7 @@ class CategorySidebar(BaseSidebar): self.merge_ids = [] self.window = Gtk.ScrolledWindow() - vbox = Gtk.VBox() + vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.window.add_with_viewport(vbox) self.window.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) self.window.show() @@ -176,7 +176,7 @@ class CategorySidebar(BaseSidebar): # add the image. If we are using text, use the BUTTON (larger) size. # otherwise, use the smaller size - hbox = Gtk.HBox() + hbox = Gtk.Box() hbox.show() image = Gtk.Image() if use_text: diff --git a/gramps/plugins/sidebar/dropdownsidebar.py b/gramps/plugins/sidebar/dropdownsidebar.py index 4fefb2e0a..88f6330d7 100644 --- a/gramps/plugins/sidebar/dropdownsidebar.py +++ b/gramps/plugins/sidebar/dropdownsidebar.py @@ -171,7 +171,7 @@ class DropdownSidebar(BaseSidebar): # add the image. If we are using text, use the BUTTON (larger) size. # otherwise, use the smaller size - hbox = Gtk.HBox() + hbox = Gtk.Box() hbox.show() image = Gtk.Image() if use_text: diff --git a/gramps/plugins/sidebar/expandersidebar.py b/gramps/plugins/sidebar/expandersidebar.py index d152e69bb..4cdd4beb4 100644 --- a/gramps/plugins/sidebar/expandersidebar.py +++ b/gramps/plugins/sidebar/expandersidebar.py @@ -60,7 +60,7 @@ class ExpanderSidebar(BaseSidebar): self.lookup = {} self.window = Gtk.ScrolledWindow() - vbox = Gtk.VBox() + vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.window.add_with_viewport(vbox) self.window.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) self.window.show() @@ -71,7 +71,7 @@ class ExpanderSidebar(BaseSidebar): expander = Gtk.Expander() self.expanders.append(expander) - catbox = Gtk.HBox() + catbox = Gtk.Box() image = Gtk.Image() image.set_from_stock(cat_icon, Gtk.IconSize.BUTTON) catbox.pack_start(image, False, False, 4) @@ -81,7 +81,7 @@ class ExpanderSidebar(BaseSidebar): catbox.set_tooltip_text(cat_name) expander.set_label_widget(catbox) - viewbox = Gtk.VBox() + viewbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) for view_num, view_name, view_icon in views[cat_num]: # create the button and add it to the sidebar button = self.__make_sidebar_button(use_text, cat_num, view_num, @@ -167,7 +167,7 @@ class ExpanderSidebar(BaseSidebar): Create the sidebar button. The page_title is the text associated with the button. """ - top = Gtk.HBox() + top = Gtk.Box() # create the button button = Gtk.ToggleButton() @@ -186,7 +186,7 @@ class ExpanderSidebar(BaseSidebar): # add the image. If we are using text, use the BUTTON (larger) size. # otherwise, use the smaller size - hbox = Gtk.HBox() + hbox = Gtk.Box() hbox.show() image = Gtk.Image() if use_text: diff --git a/gramps/plugins/tool/patchnames.py b/gramps/plugins/tool/patchnames.py index 0864c00e5..4e3646d1e 100644 --- a/gramps/plugins/tool/patchnames.py +++ b/gramps/plugins/tool/patchnames.py @@ -117,19 +117,19 @@ class PatchNames(tool.BatchTool, ManagedWindow): (Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT)) winprefix.vbox.set_spacing(5) - hboxpref = Gtk.HBox() + hboxpref = Gtk.Box() hboxpref.pack_start(Gtk.Label(_('Prefixes to search for:')), False, False, 5) self.prefixbox = Gtk.Entry() self.prefixbox.set_text(', '.join(PREFIX_LIST)) hboxpref.pack_start(self.prefixbox, True, True, 0) winprefix.vbox.pack_start(hboxpref, True, True, 0) - hboxcon = Gtk.HBox() + hboxcon = Gtk.Box() hboxcon.pack_start(Gtk.Label(_('Connectors splitting surnames:')), False, False, 5) self.conbox = Gtk.Entry() self.conbox.set_text(', '.join(CONNECTOR_LIST)) hboxcon.pack_start(self.conbox, True, True, 0) winprefix.vbox.pack_start(hboxcon, True, True, 0) - hboxconns = Gtk.HBox() + hboxconns = Gtk.Box() hboxconns.pack_start(Gtk.Label(_('Connectors not splitting surnames:')), False, False, 5) self.connsbox = Gtk.Entry() self.connsbox.set_text(', '.join(CONNECTOR_LIST_NONSPLIT)) diff --git a/gramps/plugins/tool/populatesources.py b/gramps/plugins/tool/populatesources.py index 0a4bb3b70..508bd9c7d 100644 --- a/gramps/plugins/tool/populatesources.py +++ b/gramps/plugins/tool/populatesources.py @@ -92,21 +92,21 @@ class PopulateSources(tool.Tool, ManagedWindow): " number of citations.") label.set_line_wrap(True) - hbox1 = Gtk.HBox() + hbox1 = Gtk.Box() label_sources = Gtk.Label(label="Number of sources" + ":") self.sources_entry = Gtk.Entry() self.sources_entry.set_text("%d" % num_sources) hbox1.pack_start(label_sources, False, True, 0) hbox1.pack_start(self.sources_entry, True, True, 0) - hbox2 = Gtk.HBox() + hbox2 = Gtk.Box() label_citations = Gtk.Label(label="Number of citations" + ":") self.citations_entry = Gtk.Entry() self.citations_entry.set_text("%d" % num_citations) hbox2.pack_start(label_citations, False, True, 0) hbox2.pack_start(self.citations_entry, True, True, 0) - vbox = Gtk.VBox() + vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) vbox.pack_start(label, True, True, 0) vbox.pack_start(hbox1, False, True, 0) vbox.pack_start(hbox2, False, True, 0) diff --git a/gramps/plugins/view/htmlrenderer.py b/gramps/plugins/view/htmlrenderer.py index 9bab0996f..2de64cf1a 100644 --- a/gramps/plugins/view/htmlrenderer.py +++ b/gramps/plugins/view/htmlrenderer.py @@ -344,7 +344,7 @@ class HtmlView(NavigationView): contains the interface. This containter will be inserted into a Gtk.Notebook page. """ - self.box = Gtk.VBox(spacing=4) + self.box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=4) #top widget at the top self.box.pack_start(self.top_widget(), False, False, 0 ) #web page under it in a scrolled window