Modified: desktop/trunk/lib/window.class.php (73 => 74)
--- desktop/trunk/lib/window.class.php 2006-12-12 22:03:38 UTC (rev 73)
+++ desktop/trunk/lib/window.class.php 2006-12-13 23:47:36 UTC (rev 74)
@@ -51,6 +51,13 @@
*/
protected $modal = false;
+ /**
+ * we keep track of our restore state event and remove the signal after
+ * using it once, we really don't want to be messing with state on every show
+ * @var $id bool
+ */
+ private $id;
+
//----------------------------------------------------------------
// Setup
//----------------------------------------------------------------
@@ -93,8 +100,8 @@
$this->minimized = isset($config->{$name . '_minimized'}) ? (bool) $config->{$name . '_minimized'} : false;
$this->connect('window-state-event', array($this, 'on_state_event'));
- $this->connect_simple('delete-event', array($this, 'on_state_save'));
- $this->connect_simple('show', array($this, 'on_state_restore'));
+ $this->connect_simple_after('delete-event', array($this, 'on_state_save'));
+ $this->id = $this->connect_simple('show', array($this, 'on_state_restore'));
return;
}
@@ -106,9 +113,16 @@
* @param string $name title to set
* @return void
*/
- public function set_title($title)
+ public function set_title($title, $raw = false)
{
- parent::set_title(CC::i18n('%s :: %s', CC::$program, $title));
+ if ($raw == false)
+ {
+ parent::set_title($title);
+ }
+ else
+ {
+ parent::set_title(CC::i18n('%s :: %s', CC::$program, $title));
+ }
return;
}
@@ -230,6 +244,7 @@
{
$this->iconify();
}
+ $this->disconnect($this->id);
return;
}