+ return self._layout
+
+ def set_orientation(self, orientation):
+ if orientation == gtk.ORIENTATION_VERTICAL:
+ if self._isPortrait:
+ return
+ self._isPortrait = True
+
+ self._controls.remove(self._back)
+ self._controls.remove(self._stop)
+ self._controls.remove(self._pause)
+ self._controls.remove(self._play)
+ self._controls.remove(self._next)
+ self._layout.remove(self._controls)
+
+ self._controls = gtk.HBox()
+ self._controls.pack_start(self._back)
+ self._controls.pack_start(self._stop)
+ self._controls.pack_start(self._pause)
+ self._controls.pack_start(self._play)
+ self._controls.pack_start(self._next)
+ self._layout.pack_start(self._controls)
+ elif orientation == gtk.ORIENTATION_HORIZONTAL:
+ if not self._isPortrait:
+ return
+ self._isPortrait = False
+
+ self._controls.remove(self._back)
+ self._controls.remove(self._stop)
+ self._controls.remove(self._pause)
+ self._controls.remove(self._play)
+ self._controls.remove(self._next)
+ self._layout.remove(self._controls)
+
+ self._controls = gtk.VBox()
+ self._controls.pack_start(self._back)
+ self._controls.pack_start(self._stop)
+ self._controls.pack_start(self._pause)
+ self._controls.pack_start(self._play)
+ self._controls.pack_start(self._next)
+ self._layout.pack_start(self._controls)
+ else:
+ raise NotImplementedError(orientation)