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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Apr 20 08:28:00 UTC 2011


Revision: 3517
          http://rkward.svn.sourceforge.net/rkward/?rev=3517&view=rev
Author:   tfry
Date:     2011-04-20 08:28:00 +0000 (Wed, 20 Apr 2011)

Log Message:
-----------
Always show all positioning options, to avoid indexing problem.

Modified Paths:
--------------
    trunk/rkward/rkward/windows/rktoolwindowbar.cpp
    trunk/rkward/rkward/windows/rktoolwindowlist.h

Modified: trunk/rkward/rkward/windows/rktoolwindowbar.cpp
===================================================================
--- trunk/rkward/rkward/windows/rktoolwindowbar.cpp	2011-04-19 13:13:14 UTC (rev 3516)
+++ trunk/rkward/rkward/windows/rktoolwindowbar.cpp	2011-04-20 08:28:00 UTC (rev 3517)
@@ -273,10 +273,10 @@
 				connect (a, SIGNAL (triggered(bool)), this, SLOT (changeAttachment()));
 
 				KSelectAction *sel = new KSelectAction (i18n ("Position"), &menu);
-				if (position () != KMultiTabBar::Left) sel->addAction (KIcon (RKStandardIcons::getIcon (RKStandardIcons::ActionMoveLeft)), i18n ("Left Sidebar"));
-				if (position () != KMultiTabBar::Right) sel->addAction (KIcon (RKStandardIcons::getIcon (RKStandardIcons::ActionMoveRight)), i18n ("Right Sidebar"));
-				if (position () != KMultiTabBar::Top) sel->addAction (KIcon (RKStandardIcons::getIcon (RKStandardIcons::ActionMoveUp)), i18n ("Top Sidebar"));
-				if (position () != KMultiTabBar::Bottom) sel->addAction (KIcon (RKStandardIcons::getIcon (RKStandardIcons::ActionMoveDown)), i18n ("Bottom Sidebar"));
+				sel->addAction (KIcon (RKStandardIcons::getIcon (RKStandardIcons::ActionMoveLeft)), i18n ("Left Sidebar"));
+				sel->addAction (KIcon (RKStandardIcons::getIcon (RKStandardIcons::ActionMoveRight)), i18n ("Right Sidebar"));
+				sel->addAction (KIcon (RKStandardIcons::getIcon (RKStandardIcons::ActionMoveUp)), i18n ("Top Sidebar"));
+				sel->addAction (KIcon (RKStandardIcons::getIcon (RKStandardIcons::ActionMoveDown)), i18n ("Bottom Sidebar"));
 				sel->addAction (KIcon (RKStandardIcons::getIcon (RKStandardIcons::ActionDelete)), i18n ("Not shown in sidebar"));
 				connect (sel, SIGNAL (triggered(int)), this, SLOT (moveToolWindow(int)));
 				menu.addAction (sel);
@@ -318,11 +318,12 @@
 	else RKWorkplace::mainWorkplace ()->attachWindow (window);
 }
 
-void RKToolWindowBar::moveToolWindow(int target) {
+void RKToolWindowBar::moveToolWindow (int target) {
 	RK_TRACE (APP);
 
 	RK_ASSERT (target >= RKToolWindowList::Left);
 	RK_ASSERT (target <= RKToolWindowList::Bottom);
+	if (target == position ()) return;
 	RKMDIWindow *window = idToWidget (id_of_popup);
 	RK_ASSERT (window);
 

Modified: trunk/rkward/rkward/windows/rktoolwindowlist.h
===================================================================
--- trunk/rkward/rkward/windows/rktoolwindowlist.h	2011-04-19 13:13:14 UTC (rev 3516)
+++ trunk/rkward/rkward/windows/rktoolwindowlist.h	2011-04-20 08:28:00 UTC (rev 3517)
@@ -25,7 +25,7 @@
 
 /** Simple helper functions to keep track of available tool windows. */
 namespace RKToolWindowList {
-	enum Placement {
+	enum Placement {		//NOTE: enum values must match thus in KMultiTabBarPosition
 		Left=0,
 		Right=1,
 		Top=2,


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