Fix #4094: show total export progress instead of per timespan progress
[ardour.git] / gtk2_ardour / window_proxy.cc
index 28a90215af819e0a48c0c4a46ac1df3e9d9139f0..ff525eb392e86ec108aa621d55709d716ada493c 100755 (executable)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2010 Paul Davis 
+    Copyright (C) 2010 Paul Davis
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
 
 #include <gtkmm/window.h>
 #include "window_proxy.h"
+#include "i18n.h"
 
 using namespace std;
 
@@ -35,6 +36,10 @@ WindowProxyBase::WindowProxyBase (string const & name, XMLNode const * node)
        , _width (-1)
        , _height (-1)
 {
+       if (!node) {
+               return;
+       }
+
        XMLNodeList children = node->children ();
 
        XMLNodeList::const_iterator i = children.begin ();
@@ -43,7 +48,7 @@ WindowProxyBase::WindowProxyBase (string const & name, XMLNode const * node)
                if ((*i)->name() == X_("Window") && prop && prop->value() == _name) {
                        break;
                }
-               
+
                ++i;
        }
 
@@ -54,7 +59,7 @@ WindowProxyBase::WindowProxyBase (string const & name, XMLNode const * node)
                if ((prop = (*i)->property (X_("visible"))) != 0) {
                        _visible = string_is_affirmative (prop->value ());
                }
-               
+
                if ((prop = (*i)->property (X_("x-off"))) != 0) {
                        _x_off = atoi (prop->value().c_str());
                }
@@ -78,7 +83,6 @@ WindowProxyBase::maybe_show ()
 {
        if (_visible) {
                show ();
-               setup ();
        }
 }
 
@@ -112,7 +116,7 @@ WindowProxyBase::get_state () const
        /* If the window has been created, get its current state; otherwise use
           the state that we started off with.
        */
-       
+
        Gtk::Window* gtk_window = get_gtk_window ();
        if (gtk_window) {
                v = gtk_window->is_visible ();