[Kstars-devel] branches/kstars/summer/kstars/kstars
Prakash Mohan
prak902000 at gmail.com
Tue Jul 7 11:33:45 CEST 2009
SVN commit 992569 by prakash:
Making the remove label more intuitive as it shows from which list it is removing the object.
CCMAIL: kstars-devel at kde.org
M +7 -3 obslistpopupmenu.cpp
M +1 -1 obslistpopupmenu.h
M +2 -2 tools/observinglist.cpp
--- branches/kstars/summer/kstars/kstars/obslistpopupmenu.cpp #992568:992569
@@ -32,7 +32,7 @@
ObsListPopupMenu::~ObsListPopupMenu() { }
-void ObsListPopupMenu::initPopupMenu( bool showAddToSession, bool showCenter, bool showDetails, bool showScope, bool showRemove) {
+void ObsListPopupMenu::initPopupMenu( bool showAddToSession, bool showCenter, bool showDetails, bool showScope, bool showRemove, bool sessionView ) {
clear();
//Insert item for adding the object to the session view
@@ -53,8 +53,12 @@
addAction( i18n("Altitude vs. Time"), ks->observingList(), SLOT( slotAVT() ) );
addSeparator();
//Insert item for Removing the object(s)
- if( showRemove )
- addAction( i18n("Remove from list"), ks->observingList(), SLOT( slotRemoveSelectedObjects() ) );
+ if( showRemove ) {
+ if( ! sessionView )
+ addAction( i18n("Remove from WishList"), ks->observingList(), SLOT( slotRemoveSelectedObjects() ) );
+ else
+ addAction( i18n("Remove from Session Plan"), ks->observingList(), SLOT( slotRemoveSelectedObjects() ) );
+ }
}
#include "obslistpopupmenu.moc"
--- branches/kstars/summer/kstars/kstars/obslistpopupmenu.h #992568:992569
@@ -45,7 +45,7 @@
/**Initialize the popup menus.
*/
- void initPopupMenu( bool showAddToSession = false, bool showCenter = false, bool showDetails = false, bool showScope = false, bool showRemove = false );
+ void initPopupMenu( bool showAddToSession = false, bool showCenter = false, bool showDetails = false, bool showScope = false, bool showRemove = false, bool sessionView = false );
private:
KStars *ks;
--- branches/kstars/summer/kstars/kstars/tools/observinglist.cpp #992568:992569
@@ -1348,9 +1348,9 @@
if( mouseEvent->button() == Qt::RightButton ) {
QPoint pos( mouseEvent->globalX() , mouseEvent->globalY() );
if( singleSelection )
- pmenu->initPopupMenu( false, true, true, showScope, true );
+ pmenu->initPopupMenu( false, true, true, showScope, true, true );
else
- pmenu->initPopupMenu( false, false, false, false, true );
+ pmenu->initPopupMenu( false, false, false, false, true, true );
pmenu->popup( pos );
}
}
More information about the Kstars-devel
mailing list