diff options
author | Calum Lind <calumlind@gmail.com> | 2018-11-06 13:21:06 +0000 |
---|---|---|
committer | Calum Lind <calumlind@gmail.com> | 2018-11-06 14:57:55 +0000 |
commit | d937a323fb7adaeea89b690dcafab1220cff4480 (patch) | |
tree | b697829380121973f3604eddc289e99a43dadf39 | |
parent | d7c48d27d8f9800009f75425d4292ac26d0707a8 (diff) | |
download | deluge-d937a323fb7adaeea89b690dcafab1220cff4480.tar.gz deluge-d937a323fb7adaeea89b690dcafab1220cff4480.tar.bz2 deluge-d937a323fb7adaeea89b690dcafab1220cff4480.zip |
[GTK] Replace all deprecated VBox and HBox
Use the recommended Gtk.Box.new() signature to match the GTK usage.
19 files changed, 101 insertions, 72 deletions
diff --git a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options.ui b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options.ui index 73b38316e..a4cd364e9 100644 --- a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options.ui +++ b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options.ui @@ -46,6 +46,7 @@ <object class="GtkBox" id="dialog-vbox1"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child internal-child="action_area"> <object class="GtkButtonBox" id="dialog-action_area1"> <property name="visible">True</property> @@ -108,18 +109,20 @@ </packing> </child> <child> - <object class="GtkVBox" id="vbox1"> + <object class="GtkBox" id="vbox1"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> <object class="GtkNotebook" id="notebook1"> <property name="visible">True</property> <property name="can_focus">True</property> <child> - <object class="GtkVBox" id="vbox2"> + <object class="GtkBox" id="vbox2"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="border_width">6</property> + <property name="orientation">vertical</property> <child> <object class="GtkFrame" id="frame2"> <property name="visible">True</property> @@ -132,11 +135,12 @@ <property name="can_focus">False</property> <property name="left_padding">12</property> <child> - <object class="GtkVBox" id="vbox6"> + <object class="GtkBox" id="vbox6"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> - <object class="GtkHBox" id="hbox3"> + <object class="GtkBox" id="hbox3"> <property name="visible">True</property> <property name="can_focus">False</property> <child> @@ -230,9 +234,10 @@ it will be added to the session.</property> <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkVBox" id="vbox7"> + <object class="GtkBox" id="vbox7"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> <object class="GtkRadioButton" id="isnt_append_extension"> <property name="label" translatable="yes">Delete .torrent after adding</property> @@ -251,7 +256,7 @@ the .torrent will be deleted.</property> </packing> </child> <child> - <object class="GtkHBox" id="hbox1"> + <object class="GtkBox" id="hbox1"> <property name="visible">True</property> <property name="can_focus">False</property> <child> @@ -316,7 +321,7 @@ and deleted from the watch folder.</property> </object> </child> <child> - <object class="GtkHBox" id="hbox7"> + <object class="GtkBox" id="hbox7"> <property name="visible">True</property> <property name="can_focus">False</property> <child> @@ -410,9 +415,10 @@ also delete the .torrent file used to add it.</property> <property name="can_focus">False</property> <property name="left_padding">12</property> <child> - <object class="GtkVBox" id="vbox3"> + <object class="GtkBox" id="vbox3"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> <object class="GtkCheckButton" id="download_location_toggle"> <property name="label" translatable="yes">Set download folder</property> @@ -431,7 +437,7 @@ also delete the .torrent file used to add it.</property> </packing> </child> <child> - <object class="GtkHBox" id="hbox4"> + <object class="GtkBox" id="hbox4"> <property name="visible">True</property> <property name="can_focus">False</property> <child> @@ -499,9 +505,10 @@ also delete the .torrent file used to add it.</property> <property name="can_focus">False</property> <property name="left_padding">12</property> <child> - <object class="GtkVBox" id="vbox4"> + <object class="GtkBox" id="vbox4"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> <object class="GtkCheckButton" id="move_completed_toggle"> <property name="label" translatable="yes">Set move completed folder</property> @@ -519,7 +526,7 @@ also delete the .torrent file used to add it.</property> </packing> </child> <child> - <object class="GtkHBox" id="hbox5"> + <object class="GtkBox" id="hbox5"> <property name="visible">True</property> <property name="can_focus">False</property> <child> @@ -601,7 +608,7 @@ also delete the .torrent file used to add it.</property> <property name="can_focus">False</property> <property name="left_padding">12</property> <child> - <object class="GtkHBox" id="hbox11"> + <object class="GtkBox" id="hbox11"> <property name="visible">True</property> <property name="can_focus">False</property> <child> @@ -626,7 +633,7 @@ also delete the .torrent file used to add it.</property> <property name="can_focus">False</property> <property name="has_entry">True</property> <child internal-child="entry"> - <object class="GtkEntry"> + <object class="GtkEntry" id="combobox-entry1"> <property name="can_focus">False</property> </object> </child> @@ -669,11 +676,12 @@ also delete the .torrent file used to add it.</property> </packing> </child> <child> - <object class="GtkVBox" id="vbox5"> + <object class="GtkBox" id="vbox5"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="border_width">6</property> <property name="spacing">5</property> + <property name="orientation">vertical</property> <child> <object class="GtkFrame" id="OwnerFrame"> <property name="visible">True</property> @@ -1070,7 +1078,7 @@ also delete the .torrent file used to add it.</property> </packing> </child> <child> - <object class="GtkHBox" id="auto_managed_box"> + <object class="GtkBox" id="auto_managed_box"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="homogeneous">True</property> @@ -1148,7 +1156,7 @@ also delete the .torrent file used to add it.</property> </object> </child> <child> - <object class="GtkHBox" id="add_paused_box"> + <object class="GtkBox" id="add_paused_box"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="homogeneous">True</property> @@ -1205,7 +1213,7 @@ also delete the .torrent file used to add it.</property> </packing> </child> <child> - <object class="GtkHBox" id="hbox2"> + <object class="GtkBox" id="hbox2"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="homogeneous">True</property> diff --git a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/config.ui b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/config.ui index 52aa4709e..0e645d374 100644 --- a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/config.ui +++ b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/config.ui @@ -8,7 +8,7 @@ <placeholder/> </child> <child> - <object class="GtkHBox" id="hbox9"> + <object class="GtkBox" id="hbox9"> <property name="visible">True</property> <property name="can_focus">False</property> <child> @@ -19,12 +19,13 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkVBox" id="prefs_box"> + <object class="GtkBox" id="prefs_box"> <property name="width_request">340</property> <property name="height_request">390</property> <property name="visible">True</property> <property name="can_focus">False</property> <property name="border_width">3</property> + <property name="orientation">vertical</property> <child> <object class="GtkFrame" id="frame1"> <property name="visible">True</property> @@ -32,10 +33,11 @@ <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> - <object class="GtkVBox" id="watchdirs_vbox"> + <object class="GtkBox" id="watchdirs_vbox"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="homogeneous">True</property> + <property name="orientation">vertical</property> <child> <placeholder/> </child> diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_pref.ui b/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_pref.ui index 582ed3431..013d8e70e 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_pref.ui +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_pref.ui @@ -15,10 +15,11 @@ <placeholder/> </child> <child> - <object class="GtkVBox" id="blocklist_prefs_box"> + <object class="GtkBox" id="blocklist_prefs_box"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">5</property> + <property name="orientation">vertical</property> <child> <object class="GtkFrame" id="frame1"> <property name="visible">True</property> @@ -31,7 +32,7 @@ <property name="can_focus">False</property> <property name="left_padding">12</property> <child> - <object class="GtkHBox" id="hbox2"> + <object class="GtkBox" id="hbox2"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">5</property> @@ -93,10 +94,11 @@ <property name="can_focus">False</property> <property name="left_padding">12</property> <child> - <object class="GtkVBox" id="vbox1"> + <object class="GtkBox" id="vbox1"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">5</property> + <property name="orientation">vertical</property> <child> <object class="GtkTable" id="table1"> <property name="visible">True</property> @@ -200,13 +202,14 @@ <property name="xscale">0</property> <property name="left_padding">12</property> <child> - <object class="GtkHBox" id="hbox3"> + <object class="GtkBox" id="hbox3"> <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkVBox" id="vbox3"> + <object class="GtkBox" id="vbox3"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> <object class="GtkButton" id="button_check_download"> <property name="visible">True</property> @@ -215,7 +218,7 @@ <property name="tooltip_text" translatable="yes">Download the blocklist file if necessary and import the file.</property> <signal name="clicked" handler="on_button_check_download_clicked" swapped="no"/> <child> - <object class="GtkHBox" id="hbox4"> + <object class="GtkBox" id="hbox4"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">5</property> @@ -260,7 +263,7 @@ <property name="tooltip_text" translatable="yes">Download a new blocklist file and import it.</property> <signal name="clicked" handler="on_button_force_download_clicked" swapped="no"/> <child> - <object class="GtkHBox" id="hbox5"> + <object class="GtkBox" id="hbox5"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">5</property> @@ -351,9 +354,10 @@ <property name="top_padding">5</property> <property name="left_padding">12</property> <child> - <object class="GtkVBox" id="vbox4"> + <object class="GtkBox" id="vbox4"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> <object class="GtkProgressBar" id="progressbar"> <property name="visible">True</property> @@ -510,7 +514,7 @@ <property name="can_focus">False</property> <property name="left_padding">12</property> <child> - <object class="GtkHBox" id="hbox1"> + <object class="GtkBox" id="hbox1"> <property name="visible">True</property> <property name="can_focus">False</property> <child> diff --git a/deluge/plugins/Execute/deluge/plugins/execute/data/execute_prefs.ui b/deluge/plugins/Execute/deluge/plugins/execute/data/execute_prefs.ui index ed1347aa6..fc02a54a8 100644 --- a/deluge/plugins/Execute/deluge/plugins/execute/data/execute_prefs.ui +++ b/deluge/plugins/Execute/deluge/plugins/execute/data/execute_prefs.ui @@ -14,9 +14,10 @@ <placeholder/> </child> <child> - <object class="GtkVBox" id="execute_box"> + <object class="GtkBox" id="execute_box"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> <object class="GtkFrame" id="add_frame"> <property name="visible">True</property> @@ -159,10 +160,11 @@ <property name="top_padding">5</property> <property name="left_padding">12</property> <child> - <object class="GtkVBox" id="commands_vbox"> + <object class="GtkBox" id="commands_vbox"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="orientation">vertical</property> <child> <placeholder/> </child> diff --git a/deluge/plugins/Execute/deluge/plugins/execute/gtkui.py b/deluge/plugins/Execute/deluge/plugins/execute/gtkui.py index 772c1e13a..c0c720089 100644 --- a/deluge/plugins/Execute/deluge/plugins/execute/gtkui.py +++ b/deluge/plugins/Execute/deluge/plugins/execute/gtkui.py @@ -83,7 +83,7 @@ class ExecutePreferences(object): def add_command(self, command_id, event, command): log.debug('Adding command `%s`', command_id) vbox = self.builder.get_object('commands_vbox') - hbox = Gtk.HBox(False, 5) + hbox = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, spacing=5) hbox.set_name(command_id + '_' + event) label = Gtk.Label(EVENT_MAP[event]) entry = Gtk.Entry() diff --git a/deluge/plugins/Extractor/deluge/plugins/extractor/data/extractor_prefs.ui b/deluge/plugins/Extractor/deluge/plugins/extractor/data/extractor_prefs.ui index 4509bd254..6f34b4411 100644 --- a/deluge/plugins/Extractor/deluge/plugins/extractor/data/extractor_prefs.ui +++ b/deluge/plugins/Extractor/deluge/plugins/extractor/data/extractor_prefs.ui @@ -8,10 +8,11 @@ <placeholder/> </child> <child> - <object class="GtkVBox" id="extractor_prefs_box"> + <object class="GtkBox" id="extractor_prefs_box"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">5</property> + <property name="orientation">vertical</property> <child> <object class="GtkFrame" id="frame1"> <property name="visible">True</property> @@ -19,13 +20,14 @@ <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> - <object class="GtkVBox" id="vbox1"> + <object class="GtkBox" id="vbox1"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="border_width">5</property> <property name="spacing">5</property> + <property name="orientation">vertical</property> <child> - <object class="GtkHBox" id="hbox1"> + <object class="GtkBox" id="hbox1"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">5</property> @@ -42,7 +44,7 @@ </packing> </child> <child> - <object class="GtkHBox" id="hbox2"> + <object class="GtkBox" id="hbox2"> <property name="visible">True</property> <property name="can_focus">False</property> <child> diff --git a/deluge/plugins/Label/deluge/plugins/label/data/label_add.ui b/deluge/plugins/Label/deluge/plugins/label/data/label_add.ui index df564c373..68f8a72b2 100644 --- a/deluge/plugins/Label/deluge/plugins/label/data/label_add.ui +++ b/deluge/plugins/Label/deluge/plugins/label/data/label_add.ui @@ -66,12 +66,13 @@ </packing> </child> <child> - <object class="GtkVBox" id="vbox1"> + <object class="GtkBox" id="vbox1"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">5</property> + <property name="orientation">vertical</property> <child> - <object class="GtkHBox" id="hbox1"> + <object class="GtkBox" id="hbox1"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">5</property> @@ -119,7 +120,7 @@ </packing> </child> <child> - <object class="GtkHBox" id="hbox2"> + <object class="GtkBox" id="hbox2"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">5</property> diff --git a/deluge/plugins/Label/deluge/plugins/label/data/label_options.ui b/deluge/plugins/Label/deluge/plugins/label/data/label_options.ui index dd33c19c3..c0fca4ff5 100644 --- a/deluge/plugins/Label/deluge/plugins/label/data/label_options.ui +++ b/deluge/plugins/Label/deluge/plugins/label/data/label_options.ui @@ -101,7 +101,7 @@ </packing> </child> <child> - <object class="GtkHBox" id="hbox3"> + <object class="GtkBox" id="hbox3"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">5</property> @@ -652,9 +652,10 @@ <property name="can_focus">False</property> <property name="left_padding">12</property> <child> - <object class="GtkVBox" id="vbox2"> + <object class="GtkBox" id="vbox2"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> <object class="GtkScrolledWindow" id="scrolledwindow1"> <property name="visible">True</property> diff --git a/deluge/plugins/Label/deluge/plugins/label/data/label_pref.ui b/deluge/plugins/Label/deluge/plugins/label/data/label_pref.ui index 26d9c4d67..81edc378a 100644 --- a/deluge/plugins/Label/deluge/plugins/label/data/label_pref.ui +++ b/deluge/plugins/Label/deluge/plugins/label/data/label_pref.ui @@ -8,10 +8,11 @@ <placeholder/> </child> <child> - <object class="GtkVBox" id="label_prefs_box"> + <object class="GtkBox" id="label_prefs_box"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">5</property> + <property name="orientation">vertical</property> <child> <object class="GtkFrame" id="frame3"> <property name="visible">True</property> diff --git a/deluge/plugins/Notifications/deluge/plugins/notifications/data/config.ui b/deluge/plugins/Notifications/deluge/plugins/notifications/data/config.ui index d75b4bbb6..c16b37acd 100644 --- a/deluge/plugins/Notifications/deluge/plugins/notifications/data/config.ui +++ b/deluge/plugins/Notifications/deluge/plugins/notifications/data/config.ui @@ -15,9 +15,10 @@ <placeholder/> </child> <child> - <object class="GtkVBox" id="prefs_box"> + <object class="GtkBox" id="prefs_box"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> <object class="GtkViewport" id="viewport1"> <property name="visible">True</property> @@ -29,10 +30,11 @@ <property name="can_focus">True</property> <property name="show_border">False</property> <child> - <object class="GtkVBox" id="vbox2"> + <object class="GtkBox" id="vbox2"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="valign">start</property> + <property name="orientation">vertical</property> <child> <object class="GtkFrame" id="frame2"> <property name="visible">True</property> @@ -48,9 +50,10 @@ <property name="left_padding">12</property> <property name="right_padding">10</property> <child> - <object class="GtkVBox" id="vbox1"> + <object class="GtkBox" id="vbox1"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> <object class="GtkCheckButton" id="blink_enabled"> <property name="label" translatable="yes">Tray icon blinks enabled</property> @@ -80,7 +83,7 @@ </packing> </child> <child> - <object class="GtkHBox" id="hbox2"> + <object class="GtkBox" id="hbox2"> <property name="visible">True</property> <property name="can_focus">False</property> <child> @@ -293,7 +296,7 @@ <property name="can_focus">False</property> <property name="bottom_padding">10</property> <child> - <object class="GtkHBox" id="hbox1"> + <object class="GtkBox" id="hbox1"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">2</property> @@ -481,12 +484,13 @@ </packing> </child> <child> - <object class="GtkVBox" id="vbox5"> + <object class="GtkBox" id="vbox5"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="margin_left">15</property> <property name="margin_right">10</property> <property name="margin_bottom">10</property> + <property name="orientation">vertical</property> <child> <placeholder/> </child> @@ -543,12 +547,13 @@ </packing> </child> <child> - <object class="GtkVBox" id="sounds_page"> + <object class="GtkBox" id="sounds_page"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="margin_left">15</property> <property name="margin_right">10</property> <property name="margin_bottom">10</property> + <property name="orientation">vertical</property> <child> <object class="GtkScrolledWindow" id="scrolledwindow3"> <property name="visible">True</property> diff --git a/deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py b/deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py index b802aa666..12f5fb63c 100644 --- a/deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py +++ b/deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py @@ -277,9 +277,9 @@ class GtkUI(Gtk3PluginBase): hover = Gtk.Label() self.scheduler_select = SchedulerSelectWidget(hover) - vbox = Gtk.VBox(False, 5) - hbox = Gtk.HBox(False, 5) - vbox_days = Gtk.VBox() + vbox = Gtk.Box.new(Gtk.Orientation.VERTICAL, spacing=5) + hbox = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, spacing=5) + vbox_days = Gtk.Box.new(Gtk.Orientation.VERTICAL, spacing=0) for day in DAYS: vbox_days.pack_start(Gtk.Label(day, xalign=0), True, False, 0) hbox.pack_start(vbox_days, False, False, 15) diff --git a/deluge/plugins/Stats/deluge/plugins/stats/data/config.ui b/deluge/plugins/Stats/deluge/plugins/stats/data/config.ui index 1ded24d86..326598b5b 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/data/config.ui +++ b/deluge/plugins/Stats/deluge/plugins/stats/data/config.ui @@ -8,9 +8,10 @@ <placeholder/> </child> <child> - <object class="GtkVBox" id="prefs_box"> + <object class="GtkBox" id="prefs_box"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> <object class="GtkFrame" id="frame1"> <property name="visible">True</property> diff --git a/deluge/plugins/Stats/deluge/plugins/stats/data/tabs.ui b/deluge/plugins/Stats/deluge/plugins/stats/data/tabs.ui index 0432b42ca..4b35765a9 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/data/tabs.ui +++ b/deluge/plugins/Stats/deluge/plugins/stats/data/tabs.ui @@ -8,11 +8,12 @@ <placeholder/> </child> <child> - <object class="GtkVBox" id="vbox1"> + <object class="GtkBox" id="vbox1"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> - <object class="GtkHBox" id="graph_label"> + <object class="GtkBox" id="graph_label"> <property name="visible">True</property> <property name="can_focus">False</property> <child> @@ -45,11 +46,12 @@ <property name="resize_mode">queue</property> <property name="shadow_type">none</property> <child> - <object class="GtkVBox" id="vbox2"> + <object class="GtkBox" id="vbox2"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> - <object class="GtkHBox" id="hbox1"> + <object class="GtkBox" id="hbox1"> <property name="visible">True</property> <property name="can_focus">False</property> <child> diff --git a/deluge/plugins/WebUi/deluge/plugins/webui/data/config.ui b/deluge/plugins/WebUi/deluge/plugins/webui/data/config.ui index a68602166..18647a415 100644 --- a/deluge/plugins/WebUi/deluge/plugins/webui/data/config.ui +++ b/deluge/plugins/WebUi/deluge/plugins/webui/data/config.ui @@ -14,9 +14,10 @@ <placeholder/> </child> <child> - <object class="GtkVBox" id="prefs_box"> + <object class="GtkBox" id="prefs_box"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> <object class="GtkFrame" id="settings_frame"> <property name="visible">True</property> @@ -30,10 +31,11 @@ <property name="top_padding">10</property> <property name="left_padding">12</property> <child> - <object class="GtkVBox" id="settings_vbox"> + <object class="GtkBox" id="settings_vbox"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">5</property> + <property name="orientation">vertical</property> <child> <object class="GtkCheckButton" id="enabled_checkbutton"> <property name="label" translatable="yes">Enable web interface</property> @@ -63,7 +65,7 @@ </packing> </child> <child> - <object class="GtkHBox" id="port_hbox"> + <object class="GtkBox" id="port_hbox"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">5</property> diff --git a/deluge/plugins/WebUi/deluge/plugins/webui/gtkui.py b/deluge/plugins/WebUi/deluge/plugins/webui/gtkui.py index f67791761..ca3a16ea4 100644 --- a/deluge/plugins/WebUi/deluge/plugins/webui/gtkui.py +++ b/deluge/plugins/WebUi/deluge/plugins/webui/gtkui.py @@ -80,7 +80,7 @@ class GtkUI(Gtk3PluginBase): vbox = self.builder.get_object('prefs_box') - hbox = Gtk.HBox() + hbox = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, spacing=0) icon = Gtk.Image.new_from_icon_name('dialog-error', Gtk.IconSize.BUTTON) icon.set_padding(5, 5) hbox.pack_start(icon, False, False, 0) diff --git a/deluge/ui/gtk3/dialogs.py b/deluge/ui/gtk3/dialogs.py index 77c38ed50..5169ab453 100644 --- a/deluge/ui/gtk3/dialogs.py +++ b/deluge/ui/gtk3/dialogs.py @@ -49,7 +49,7 @@ class BaseDialog(Gtk.Dialog): # Setup all the formatting and such to make our dialog look pretty self.set_border_width(5) self.set_default_size(200, 100) - hbox = Gtk.HBox(spacing=5) + hbox = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, spacing=5) image = Gtk.Image() if icon.endswith('.svg') or icon.endswith('.png'): # Hack for Windows since it doesn't support svg @@ -60,7 +60,7 @@ class BaseDialog(Gtk.Dialog): image.set_from_icon_name(icon, Gtk.IconSize.LARGE_TOOLBAR) image.set_alignment(0.5, 0.0) hbox.pack_start(image, False, False, 0) - vbox = Gtk.VBox(spacing=5) + vbox = Gtk.Box.new(Gtk.Orientation.VERTICAL, spacing=5) tlabel = Gtk.Label(label=text) tlabel.set_use_markup(True) tlabel.set_line_wrap(True) @@ -365,7 +365,7 @@ class OtherDialog(BaseDialog): parent, ) - hbox = Gtk.HBox(spacing=5) + hbox = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, spacing=5) alignment_spacer = Gtk.Alignment() hbox.pack_start(alignment_spacer, True, True, 0) alignment_spin = Gtk.Alignment(xalign=1, yalign=0.5, xscale=1, yscale=1) diff --git a/deluge/ui/gtk3/path_combo_chooser.py b/deluge/ui/gtk3/path_combo_chooser.py index e0fb5ab58..041efdbf0 100755 --- a/deluge/ui/gtk3/path_combo_chooser.py +++ b/deluge/ui/gtk3/path_combo_chooser.py @@ -1135,7 +1135,7 @@ class PathChooserComboBox(Gtk.Box, StoredValuesPopup, GObject.GObject): ): Gtk.Box.__init__(self) GObject.GObject.__init__(self) - self.list_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) + self.list_box = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, spacing=0) self._stored_values_popping_down = False self.filechooser_visible = True self.filechooser_enabled = True @@ -1694,7 +1694,7 @@ if __name__ == '__main__': w.set_title('ComboEntry example') w.connect('delete-event', Gtk.main_quit) - box1 = Gtk.Box(Gtk.Orientation.VERTICAL, 0) + box1 = Gtk.Box.new(Gtk.Orientation.VERTICAL, spacing=0) def get_resource2(filename): return '%s/glade/%s' % (os.path.abspath(os.path.dirname(sys.argv[0])), filename) diff --git a/deluge/ui/gtk3/preferences.py b/deluge/ui/gtk3/preferences.py index 8d2c194a5..c91e7f2ed 100644 --- a/deluge/ui/gtk3/preferences.py +++ b/deluge/ui/gtk3/preferences.py @@ -246,7 +246,7 @@ class Preferences(component.Component): parent = widget.get_parent() if parent: parent.remove(widget) - vbox = Gtk.VBox() + vbox = Gtk.Box.new(Gtk.Orientation.VERTICAL, spacing=0) label = Gtk.Label() label.set_use_markup(True) label.set_markup('<b><i><big>' + name + '</big></i></b>') diff --git a/deluge/ui/gtk3/statusbar.py b/deluge/ui/gtk3/statusbar.py index cc650b9dc..265e7c886 100644 --- a/deluge/ui/gtk3/statusbar.py +++ b/deluge/ui/gtk3/statusbar.py @@ -38,8 +38,7 @@ class StatusBarItem(object): ): self._widgets = [] self._ebox = Gtk.EventBox() - self._hbox = Gtk.HBox() - self._hbox.set_spacing(3) + self._hbox = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, spacing=3) self._image = Gtk.Image() self._label = Gtk.Label() if image or icon or stock: @@ -141,9 +140,8 @@ class StatusBar(component.Component): 'dht': self._on_dht, } self.current_warnings = [] - # Add a HBox to the statusbar after removing the initial label widget - self.hbox = Gtk.HBox() - self.hbox.set_spacing(10) + # Add hbox to the statusbar after removing the initial label widget + self.hbox = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, spacing=10) align = Gtk.Alignment() align.set_padding(2, 0, 3, 0) align.add(self.hbox) |