[pitivi] Viewer: remember state
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Viewer: remember state
- Date: Fri, 26 Nov 2010 10:12:58 +0000 (UTC)
commit ae3b94a2cb5bd57c14cc4669adfa81dcf9a2358b
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date: Thu Nov 25 16:11:57 2010 +0000
Viewer: remember state
pitivi/ui/viewer.py | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/ui/viewer.py b/pitivi/ui/viewer.py
index 44702eb..d05c3e0 100644
--- a/pitivi/ui/viewer.py
+++ b/pitivi/ui/viewer.py
@@ -249,6 +249,12 @@ class PitiviViewer(gtk.VBox, Loggable):
self.dock()
return True
+ def _externalWindowConfigureCb(self, window, event):
+ self.settings.viewerWidth = event.width
+ self.settings.viewerHeight = event.height
+ self.settings.viewerX = event.x
+ self.settings.viewerY = event.y
+
def _createUi(self):
""" Creates the Viewer GUI """
# drawing area
@@ -267,6 +273,8 @@ class PitiviViewer(gtk.VBox, Loggable):
vbox.pack_start(self.external)
self.external_window.connect("delete-event",
self._externalWindowDeleteCb)
+ self.external_window.connect("configure-event",
+ self._externalWindowConfigureCb)
self.external_vbox = vbox
self.external_vbox.show_all()
@@ -497,6 +505,7 @@ class PitiviViewer(gtk.VBox, Loggable):
return
self.docked = False
+ self.settings.viewerDocked = False
self.undock_action.set_label(_("Dock Viewer"))
self.remove(self.buttons)
@@ -518,6 +527,7 @@ class PitiviViewer(gtk.VBox, Loggable):
if self.docked:
return
self.docked = True
+ self.settings.viewerDocked = True
self.undock_action.set_label(_("Undock Viewer"))
self.target = self.internal
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]