[rkward-cvs] SF.net SVN: rkward:[2607] trunk/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Fri Aug 7 16:21:09 UTC 2009


Revision: 2607
          http://rkward.svn.sourceforge.net/rkward/?rev=2607&view=rev
Author:   tfry
Date:     2009-08-07 16:21:09 +0000 (Fri, 07 Aug 2009)

Log Message:
-----------
Add load / unload packages action also to object browser context menu

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/windows/robjectbrowser.cpp
    trunk/rkward/rkward/windows/robjectbrowser.h

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2009-08-07 16:15:31 UTC (rev 2606)
+++ trunk/rkward/ChangeLog	2009-08-07 16:21:09 UTC (rev 2607)
@@ -1,7 +1,7 @@
 - Double-clicking an item in the object browser now opens an object viewer, or (if possible) editor
 - Safeguard against removal of essential packages via the GUI
 - Add context menu action to unload packages in the object browser window
-- Add shortcut to the load / unload packages dialog also in the workspace menu
+- Add shortcut to the load / unload packages dialog also in the workspace menu and the object browser context menu
 - Make toolbar buttons configurable
 - Fixed: Console window would sometimes remain in partially active state after piping commands
 

Modified: trunk/rkward/rkward/windows/robjectbrowser.cpp
===================================================================
--- trunk/rkward/rkward/windows/robjectbrowser.cpp	2009-08-07 16:15:31 UTC (rev 2606)
+++ trunk/rkward/rkward/windows/robjectbrowser.cpp	2009-08-07 16:21:09 UTC (rev 2607)
@@ -132,6 +132,8 @@
 	connect (actions[Delete], SIGNAL(triggered(bool)), this, SLOT(popupDelete()));
 	actions.insert (Unload, new QAction (i18n ("Unload Package"), this));
 	connect (actions[Unload], SIGNAL(triggered(bool)), this, SLOT(popupUnload()));
+	actions.insert (LoadUnloadPackages, new QAction (i18n ("Load / Unload Packages"), this));
+	connect (actions[LoadUnloadPackages], SIGNAL(triggered(bool)), RKWardMainWindow::getMain(), SLOT(slotFileLoadLibs()));
 
 	QAction* sep = list_view->contextMenu ()->insertSeparator (list_view->contextMenu ()->actions ().value (0));
 	list_view->contextMenu ()->insertActions (sep, actions);
@@ -245,6 +247,7 @@
 		for (int i = 0; i < ActionCount; ++i) {
 			actions[i]->setVisible (false);
 		}
+		actions[LoadUnloadPackages]->setVisible (true);
 		return;
 	}
 
@@ -256,6 +259,7 @@
 	actions[CopyToGlobalEnv]->setVisible (object->canRead () && (!object->isInGlobalEnv()) && (!object->isType (RObject::ToplevelEnv)));
 	actions[Delete]->setVisible (object->canRemove ());
 	actions[Unload]->setVisible (object->isType (RObject::PackageEnv));
+	actions[LoadUnloadPackages]->setVisible (object == RObjectList::getObjectList ());
 }
 
 void RObjectBrowserInternal::doubleClicked (const QModelIndex& index) {

Modified: trunk/rkward/rkward/windows/robjectbrowser.h
===================================================================
--- trunk/rkward/rkward/windows/robjectbrowser.h	2009-08-07 16:15:31 UTC (rev 2606)
+++ trunk/rkward/rkward/windows/robjectbrowser.h	2009-08-07 16:21:09 UTC (rev 2607)
@@ -94,6 +94,7 @@
 		CopyToGlobalEnv,
 		Delete,
 		Unload,
+		LoadUnloadPackages,
 		ActionCount
 	};
 	QList<QAction*> actions;


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