[gnome-dvb-daemon] Don't use deprecated widgets HBox, VBox, HButtonBox and VButtonBox anymore



commit ecaad76fd180fabea3d6987153376da6de5ef071
Author: Sebastian PÃlsterl <sebp k-d-w org>
Date:   Sun Oct 30 12:39:43 2011 +0100

    Don't use deprecated widgets HBox, VBox, HButtonBox and VButtonBox anymore

 .../channellisteditor/ChannelListEditorDialog.py   |   14 +++++++-------
 .../ui/controlcenter/ControlCenterWindow.py        |    6 +++---
 client/gnomedvb/ui/preferences/Dialogs.py          |   12 ++++++------
 client/gnomedvb/ui/preferences/Preferences.py      |    8 ++++----
 client/gnomedvb/ui/recordings/RecordingsDialog.py  |    4 ++--
 client/gnomedvb/ui/timers/EditTimersDialog.py      |    4 ++--
 client/gnomedvb/ui/timers/TimerDialog.py           |    4 ++--
 client/gnomedvb/ui/widgets/DateTime.py             |    8 ++++----
 client/gnomedvb/ui/widgets/Frame.py                |    5 +++--
 client/gnomedvb/ui/wizard/pages/BasePage.py        |    5 +++--
 client/gnomedvb/ui/wizard/pages/ChannelScanPage.py |    2 +-
 .../ui/wizard/pages/SaveChannelListPage.py         |    2 +-
 12 files changed, 38 insertions(+), 36 deletions(-)
---
diff --git a/client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py b/client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py
index 6555073..8e7b0d6 100644
--- a/client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py
+++ b/client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py
@@ -45,12 +45,12 @@ class ChannelListEditorDialog(Gtk.Dialog):
         close_button = self.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
         close_button.grab_default()
 
-        self.vbox_main = Gtk.VBox(spacing=12)
+        self.vbox_main = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12)
         self.vbox_main.set_border_width(5)
         self.get_content_area().pack_start(self.vbox_main, True, True, 0)
 
         # channel groups
-        groups_box = Gtk.HBox(spacing=6)
+        groups_box = Gtk.Box(spacing=6)
         groups_frame = BaseFrame("<b>%s</b>" % _("Channel groups"),
             groups_box)
         self.vbox_main.pack_start(groups_frame, False, True, 0)
@@ -69,7 +69,7 @@ class ChannelListEditorDialog(Gtk.Dialog):
         scrolledgroups.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
         groups_box.pack_start(scrolledgroups, True, True, 0)
         
-        groups_buttonbox = Gtk.VButtonBox()
+        groups_buttonbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
         groups_buttonbox.set_spacing(6)
         groups_buttonbox.set_layout(Gtk.ButtonBoxStyle.START)
         groups_box.pack_end(groups_buttonbox, False, False, 0)
@@ -95,7 +95,7 @@ class ChannelListEditorDialog(Gtk.Dialog):
         groups_label.set_markup_with_mnemonic(_("_Group:"))
         groups_label.set_mnemonic_widget(self.devgroupscombo)
         
-        groups_box = Gtk.HBox(spacing=6)
+        groups_box = Gtk.Box(spacing=6)
         groups_box.pack_start(groups_label, False, True, 0)
         groups_box.pack_start(self.devgroupscombo, True, True, 0)
         
@@ -104,10 +104,10 @@ class ChannelListEditorDialog(Gtk.Dialog):
         self.vbox_main.pack_start(self.devgroups_frame, False, True, 0)
      
         # channels
-        channels_box = Gtk.VBox(spacing=6)
+        channels_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6)
         self.vbox_main.pack_start(channels_box, True, True, 0)
 
-        cbox = Gtk.HBox(spacing=6)
+        cbox = Gtk.Box(spacing=6)
         channels_box.pack_start(cbox, True, True, 0)
 
         # all channels
@@ -154,7 +154,7 @@ class ChannelListEditorDialog(Gtk.Dialog):
             self.select_group_helpbox)
         cbox.pack_start(self.right_frame, True, True, 0)
         
-        buttonbox = Gtk.HButtonBox()
+        buttonbox = Gtk.ButtonBox()
         buttonbox.set_spacing(6)
         buttonbox.set_layout(Gtk.ButtonBoxStyle.SPREAD)
         self.add_channel_button = Gtk.Button(stock=Gtk.STOCK_ADD)
diff --git a/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py b/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py
index 005cd35..10f99f0 100644
--- a/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py
+++ b/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py
@@ -54,7 +54,7 @@ class ControlCenterWindow(Gtk.Window):
         self.set_title(_("DVB Control Center"))
         self.set_default_size(800, 500)
         
-        self.vbox_outer = Gtk.VBox()
+        self.vbox_outer = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
         self.vbox_outer.show()
         self.add(self.vbox_outer)
         
@@ -63,7 +63,7 @@ class ControlCenterWindow(Gtk.Window):
         self.__create_menu()
         self.__create_toolbar()
         
-        self.hbox = Gtk.HBox(spacing=6)
+        self.hbox = Gtk.Box(spacing=6)
         self.vbox_outer.pack_start(self.hbox, True, True, 0)
         
         self.hpaned = Gtk.HPaned()
@@ -71,7 +71,7 @@ class ControlCenterWindow(Gtk.Window):
         self.hpaned.set_position(175)
         self.hbox.pack_start(self.hpaned, True, True, 0)
         
-        self.vbox_left = Gtk.VBox(spacing=6)
+        self.vbox_left = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6)
         self.hpaned.pack1(self.vbox_left)
 
         self.devgroupslist = Gtk.ListStore(str, int, GObject.GObject)
diff --git a/client/gnomedvb/ui/preferences/Dialogs.py b/client/gnomedvb/ui/preferences/Dialogs.py
index fdaf607..1493ef4 100644
--- a/client/gnomedvb/ui/preferences/Dialogs.py
+++ b/client/gnomedvb/ui/preferences/Dialogs.py
@@ -34,12 +34,12 @@ class AddToGroupDialog (Gtk.Dialog):
         self.__selected_group = None
         self.set_border_width(5)
         
-        self.vbox_main = Gtk.VBox(spacing=12)
+        self.vbox_main = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12)
         self.vbox_main.set_border_width(5)
         self.vbox_main.show()
         self.get_content_area().pack_start(self.vbox_main, True, True, 0)
         
-        groupbox = Gtk.HBox(spacing=18)
+        groupbox = Gtk.Box(spacing=18)
         groupbox.show()
         
         group_frame = BaseFrame("<b>%s</b>" % _("Add Device to Group"), groupbox)
@@ -96,7 +96,7 @@ class NewGroupDialog (Gtk.Dialog):
         self.set_default_size(400, 150)
         self.set_border_width(5)
         
-        self.vbox_main = Gtk.VBox(spacing=12)
+        self.vbox_main = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12)
         self.vbox_main.set_border_width(5)
         self.vbox_main.show()
         self.get_content_area().pack_start(self.vbox_main, True, True, 0)
@@ -125,7 +125,7 @@ class NewGroupDialog (Gtk.Dialog):
         self.channels.set_markup_with_mnemonic(_("Channels _file:"))
         self.channels.show()
         
-        self.channelsbox = Gtk.HBox(spacing=6)
+        self.channelsbox = Gtk.Box(spacing=6)
         self.channelsbox.show()
 
         self.channels_entry = Gtk.Entry()
@@ -142,7 +142,7 @@ class NewGroupDialog (Gtk.Dialog):
         self.table.attach(self.channels, 0, 1, 1, 2, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
         self.table.attach(self.channelsbox, 1, 2, 1, 2, yoptions=Gtk.AttachOptions.FILL)
         
-        recbox = Gtk.HBox(spacing=18)
+        recbox = Gtk.Box(spacing=18)
         recbox.show()
         
         recordings_frame = BaseFrame("<b>%s</b>" % _("Recordings"), recbox)
@@ -154,7 +154,7 @@ class NewGroupDialog (Gtk.Dialog):
         recordings.show()
         recbox.pack_start(recordings, False, True, 0)
         
-        recentrybox = Gtk.HBox(spacing=6)
+        recentrybox = Gtk.Box(spacing=6)
         recentrybox.show()
         recbox.pack_start(recentrybox, True, True, 0)
         
diff --git a/client/gnomedvb/ui/preferences/Preferences.py b/client/gnomedvb/ui/preferences/Preferences.py
index 15ccafd..b97fb48 100644
--- a/client/gnomedvb/ui/preferences/Preferences.py
+++ b/client/gnomedvb/ui/preferences/Preferences.py
@@ -45,18 +45,18 @@ class Preferences(Gtk.Window):
         self.set_default_size(600, 450)
         self.set_position(Gtk.WindowPosition.CENTER_ON_PARENT)
         
-        self.vbox = Gtk.VBox()
+        self.vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
         self.add(self.vbox)
         self.vbox.show()
         
         self.__create_toolbar()
 
-        self.vbox_main = Gtk.VBox(spacing=12)
+        self.vbox_main = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12)
         self.vbox_main.set_border_width(12)
         self.vbox_main.show()
         self.vbox.pack_start(self.vbox_main, True, True, 0)
         
-        self.action_area = Gtk.HButtonBox()
+        self.action_area = Gtk.ButtonBox()
         self.action_area.set_layout(Gtk.ButtonBoxStyle.END)
         self.vbox_main.pack_end(self.action_area, False, True, 0)
         self.action_area.show()
@@ -133,7 +133,7 @@ class Preferences(Gtk.Window):
         button_setup.set_menu(setup_menu)
         
     def __create_registered_groups(self):
-        self.groups_box = Gtk.HBox(spacing=6)
+        self.groups_box = Gtk.Box(spacing=6)
         self.groups_box.show()
         self.vbox_main.pack_start(self.groups_box, True, True, 0)
     
diff --git a/client/gnomedvb/ui/recordings/RecordingsDialog.py b/client/gnomedvb/ui/recordings/RecordingsDialog.py
index e86ef12..4ad2d46 100644
--- a/client/gnomedvb/ui/recordings/RecordingsDialog.py
+++ b/client/gnomedvb/ui/recordings/RecordingsDialog.py
@@ -39,7 +39,7 @@ class RecordingsDialog(Gtk.Dialog):
         close_button = self.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
         close_button.grab_default()
             
-        hbox_main = Gtk.HBox(spacing=12)
+        hbox_main = Gtk.Box(spacing=12)
         hbox_main.set_border_width(5)
         hbox_main.show()
         self.get_content_area().pack_start(hbox_main, True, True, 0)
@@ -62,7 +62,7 @@ class RecordingsDialog(Gtk.Dialog):
         scrolledwindow.show()
         hbox_main.pack_start(scrolledwindow, True, True, 0)
         
-        buttonbox = Gtk.VButtonBox()
+        buttonbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
         buttonbox.set_spacing(6)
         buttonbox.set_layout(Gtk.ButtonBoxStyle.START)
         buttonbox.show()
diff --git a/client/gnomedvb/ui/timers/EditTimersDialog.py b/client/gnomedvb/ui/timers/EditTimersDialog.py
index 8976318..f25892f 100644
--- a/client/gnomedvb/ui/timers/EditTimersDialog.py
+++ b/client/gnomedvb/ui/timers/EditTimersDialog.py
@@ -58,7 +58,7 @@ class EditTimersDialog(Gtk.Dialog):
         self.set_default_size(550, 400)
         self.set_border_width(5)
         
-        self.main_box = Gtk.HBox(spacing=12)
+        self.main_box = Gtk.Box(spacing=12)
         self.main_box.set_border_width(5)
         self.main_box.show()
         self.get_content_area().pack_start(self.main_box, True, True, 0)
@@ -109,7 +109,7 @@ class EditTimersDialog(Gtk.Dialog):
         self.scrolledwindow.add(self.timersview)
         self.main_box.pack_start(self.scrolledwindow, True, True, 0)
         
-        self.buttonbox = Gtk.VButtonBox()
+        self.buttonbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
         self.buttonbox.set_spacing(6)
         self.buttonbox.set_layout(Gtk.ButtonBoxStyle.START)
         self.button_add = Gtk.Button(stock=Gtk.STOCK_ADD)
diff --git a/client/gnomedvb/ui/timers/TimerDialog.py b/client/gnomedvb/ui/timers/TimerDialog.py
index 35a5629..cdc1457 100644
--- a/client/gnomedvb/ui/timers/TimerDialog.py
+++ b/client/gnomedvb/ui/timers/TimerDialog.py
@@ -92,7 +92,7 @@ class TimerDialog(Gtk.Dialog):
         label_start.set_markup_with_mnemonic(_("_Start time:"))
         table.attach(label_start, 0, 1, 2, 3)
         
-        hbox = Gtk.HBox(spacing=6)
+        hbox = Gtk.Box(spacing=6)
         table.attach(hbox, 1, 2, 2, 3, yoptions=0)
 
         if starttime == None:
@@ -107,7 +107,7 @@ class TimerDialog(Gtk.Dialog):
         label_duration.set_markup_with_mnemonic(_("_Duration:"))
         table.attach(label_duration, 0, 1, 3, 4, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
         
-        duration_hbox = Gtk.HBox(spacing=6)
+        duration_hbox = Gtk.Box(spacing=6)
         table.attach(duration_hbox, 1, 2, 3, 4)
         
         self.duration = Gtk.SpinButton()
diff --git a/client/gnomedvb/ui/widgets/DateTime.py b/client/gnomedvb/ui/widgets/DateTime.py
index ddde4a6..ebead22 100644
--- a/client/gnomedvb/ui/widgets/DateTime.py
+++ b/client/gnomedvb/ui/widgets/DateTime.py
@@ -32,7 +32,7 @@ class CalendarPopup(Gtk.Window):
     def __init__(self, dt=None):
         GObject.GObject.__init__(self, type=Gtk.WindowType.POPUP)
         self.set_border_width(5)
-        self.vbox = Gtk.VBox(spacing=12)
+        self.vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12)
         self.add(self.vbox)
         
         self.connect("key-press-event", self._on_key_press_event)
@@ -43,14 +43,14 @@ class CalendarPopup(Gtk.Window):
         self.cal.connect("day-selected-double-click", lambda w: self.popdown())
         self.vbox.pack_start(self.cal, True, True, 0)
         
-        self.time_box = Gtk.HBox(spacing=12)
+        self.time_box = Gtk.Box(spacing=12)
         self.vbox.pack_start(self.time_box, False, True, 0)
 
         time_label = Gtk.Label()
         time_label.set_markup_with_mnemonic(_("_Time:"))
         self.time_box.pack_start(time_label, False, True, 0)
 
-        spinners_box = Gtk.HBox(spacing=6)
+        spinners_box = Gtk.Box(spacing=6)
         self.time_box.pack_start(spinners_box, True, True, 0)
 
         self.hour = Gtk.SpinButton()
@@ -162,7 +162,7 @@ class DateTimeBox(Gtk.Bin):
         self.valid_color = None
         self.invalid_color = None
 
-        self.hbox = Gtk.HBox()
+        self.hbox = Gtk.Box()
 
         self.entry = Gtk.Entry()
         self.entry.set_editable(False)
diff --git a/client/gnomedvb/ui/widgets/Frame.py b/client/gnomedvb/ui/widgets/Frame.py
index ee2cd60..32d9ad6 100644
--- a/client/gnomedvb/ui/widgets/Frame.py
+++ b/client/gnomedvb/ui/widgets/Frame.py
@@ -21,10 +21,11 @@ from gi.repository import Gtk
 
 __all__ = ["Frame", "BaseFrame", "TextFieldLabel"]
 
-class BaseFrame(Gtk.VBox):
+class BaseFrame(Gtk.Box):
 
     def __init__(self, markup, child, expand=True, fill=True, padding=0):
-        GObject.GObject.__init__(self, spacing=6)
+        GObject.GObject.__init__(self, orientation=Gtk.Orientation.VERTICAL,
+            spacing=6)
     
         label = Gtk.Label()
         label.set_halign(Gtk.Align.START)
diff --git a/client/gnomedvb/ui/wizard/pages/BasePage.py b/client/gnomedvb/ui/wizard/pages/BasePage.py
index 24a2d22..b78d01e 100644
--- a/client/gnomedvb/ui/wizard/pages/BasePage.py
+++ b/client/gnomedvb/ui/wizard/pages/BasePage.py
@@ -19,10 +19,11 @@
 from gi.repository import GObject
 from gi.repository import Gtk
 
-class BasePage(Gtk.VBox):
+class BasePage(Gtk.Box):
 
     def __init__(self):
-        GObject.GObject.__init__(self, spacing=6)
+        GObject.GObject.__init__(self, orientation=Gtk.Orientation.VERTICAL,
+            spacing=6)
         self.set_border_width(24)
 
         self._label = Gtk.Label()
diff --git a/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py b/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py
index a8ffde5..bed99b8 100644
--- a/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py
+++ b/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py
@@ -75,7 +75,7 @@ class ChannelScanPage(BasePage):
         
         self.popup_menu = uimanager.get_widget("/channels-popup")
 
-        topbox = Gtk.VBox(spacing=6)
+        topbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6)
         self.pack_start(topbox, True, True, 0)
 
         label = TextFieldLabel()
diff --git a/client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py b/client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py
index 3238b58..6573d9f 100644
--- a/client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py
+++ b/client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py
@@ -35,7 +35,7 @@ class SaveChannelListPage(BasePage):
         text = _("Choose a location where you want to save the list of channels.")
         self._label.set_text(text)
 
-        button_box = Gtk.HButtonBox()
+        button_box = Gtk.ButtonBox()
         self.pack_start(button_box, True, True, 0)
     
         save_button = Gtk.Button(stock=Gtk.STOCK_SAVE)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]