[rkward-cvs] SF.net SVN: rkward: [1881] trunk/rkward/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Tue May 8 11:54:44 UTC 2007
Revision: 1881
http://svn.sourceforge.net/rkward/?rev=1881&view=rev
Author: tfry
Date: 2007-05-08 04:54:44 -0700 (Tue, 08 May 2007)
Log Message:
-----------
Don't populate the workspace browser until it is first needed to improve startup time, slightly
Modified Paths:
--------------
trunk/rkward/rkward/rkward.cpp
trunk/rkward/rkward/robjectbrowser.cpp
trunk/rkward/rkward/robjectbrowser.h
trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp
Modified: trunk/rkward/rkward/rkward.cpp
===================================================================
--- trunk/rkward/rkward/rkward.cpp 2007-05-08 11:33:24 UTC (rev 1880)
+++ trunk/rkward/rkward/rkward.cpp 2007-05-08 11:54:44 UTC (rev 1881)
@@ -315,7 +315,7 @@
RKGlobals::rInterface ()->startThread ();
- RObjectBrowser::mainBrowser ()->initialize ();
+ RObjectBrowser::mainBrowser ()->unlock ();
}
void RKWardMainWindow::slotConfigure () {
Modified: trunk/rkward/rkward/robjectbrowser.cpp
===================================================================
--- trunk/rkward/rkward/robjectbrowser.cpp 2007-05-08 11:33:24 UTC (rev 1880)
+++ trunk/rkward/rkward/robjectbrowser.cpp 2007-05-08 11:54:44 UTC (rev 1881)
@@ -77,6 +77,9 @@
connect (list_view, SIGNAL (doubleClicked (QListViewItem *, const QPoint &, int )), this, SLOT (slotListDoubleClicked (QListViewItem *, const QPoint &, int)));
resize (minimumSizeHint ().expandedTo (QSize (400, 480)));
+
+ initialized = false;
+ locked = true;
}
RObjectBrowser::~RObjectBrowser () {
@@ -90,14 +93,26 @@
if (e->reason () != QFocusEvent::Mouse) {
list_view->setObjectCurrent (RObjectList::getGlobalEnv (), true);
}
+ initialize ();
}
+void RObjectBrowser::unlock () {
+ RK_TRACE (APP);
+
+ locked = false;
+ if (hasFocus ()) initialize ();
+}
+
void RObjectBrowser::initialize () {
RK_TRACE (APP);
+ if (initialized) return;
+ if (locked) return;
- list_view->initializeLater ();
+ list_view->initialize ();
connect (update_button, SIGNAL (clicked ()), this, SLOT (updateButtonClicked ()));
+
+ initialized = true;
}
void RObjectBrowser::updateButtonClicked () {
Modified: trunk/rkward/rkward/robjectbrowser.h
===================================================================
--- trunk/rkward/rkward/robjectbrowser.h 2007-05-08 11:33:24 UTC (rev 1880)
+++ trunk/rkward/rkward/robjectbrowser.h 2007-05-08 11:54:44 UTC (rev 1881)
@@ -44,6 +44,7 @@
enum PopupItems { Help=1, Edit=2, View=3, Rename=4, Copy=5, CopyToGlobalEnv=6, Delete=7 };
static RObjectBrowser *mainBrowser () { return object_browser; };
+ void unlock ();
public slots:
void updateButtonClicked ();
void contextMenuCallback (RKListViewItem *item, bool *suppress);
@@ -64,9 +65,11 @@
private:
QPushButton *update_button;
RKObjectListView *list_view;
+ bool initialized;
+ bool locked;
+ void initialize ();
friend class RKWardMainWindow;
- void initialize ();
static RObjectBrowser *object_browser;
};
Modified: trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp 2007-05-08 11:33:24 UTC (rev 1880)
+++ trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp 2007-05-08 11:54:44 UTC (rev 1881)
@@ -155,7 +155,7 @@
}
// END
- interface_pref = static_cast<PluginPrefs> (config->readNumEntry ("Interface Preferences", static_cast<int> (PreferWizard)));
+ interface_pref = static_cast<PluginPrefs> (config->readNumEntry ("Interface Preferences", static_cast<int> (PreferRecommended)));
show_code = config->readBoolEntry ("Code display default", true);
code_size = config->readNumEntry ("Code display size", 40);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list