[ToolTips] File->Actions: src/partcontroller.cpp

Dominik Haumann dhdev at gmx.de
Mon Oct 13 00:09:02 UTC 2003


Hi ho!

what do you think about additional information for the user?

The ToolTips will be shown in the status bar;
WhatsThis will be shown when pressing shift+F1.

IMHO are futher WhatsThis-Tips superfluous...
any comments? - shall I commit?
regards,
Dominik

/*************************************************************************/

Index: partcontroller.cpp
===================================================================
RCS file: /home/kde/kdevelop/src/partcontroller.cpp,v
retrieving revision 1.101
diff -u -p -r1.101 partcontroller.cpp
--- partcontroller.cpp  7 Sep 2003 20:17:33 -0000       1.101
+++ partcontroller.cpp  12 Oct 2003 22:01:59 -0000
@@ -101,16 +101,20 @@ void PartController::setupActions()
 {
   KActionCollection *ac = 
TopLevel::getInstance()->main()->actionCollection();

-  (void) KStdAction::open(this, SLOT(slotOpenFile()),
+  KAction newAction = KStdAction::open(this, SLOT(slotOpenFile()),
     ac, "file_open");
+  newAction->setToolTip( i18n("Open an existing file") );
+  newAction->setWhatsThis( i18n("<b>Open file</b><p>Opens an existing file 
without adding it to the project.</p>") );

   m_openRecentAction = KStdAction::openRecent( this, 
SLOT(slotOpenRecent(const KURL&) ),
     ac, "file_open_recent" );
+  m_openRecentAction->setToolTip( i18n("Open a recent file") );
   m_openRecentAction->loadEntries( kapp->config(), "RecentFiles" );

   m_saveAllFilesAction = new KAction(i18n("Save Al&l"), 0,
     this, SLOT(slotSaveAllFiles()),
     ac, "file_save_all");
+  m_saveAllFilesAction->setToolTip( i18n("Save all modified files") );
   m_saveAllFilesAction->setEnabled(false);

   m_revertAllFilesAction = new KAction(i18n("Rever&t All"), 0,
@@ -121,16 +125,19 @@ void PartController::setupActions()
   m_closeWindowAction = KStdAction::close(
     this, SLOT(slotCloseWindow()),
     ac, "file_close");
+  m_closeWindowAction->setToolTip( i18n("Close current file") );
   m_closeWindowAction->setEnabled(false);

   m_closeAllWindowsAction = new KAction(i18n("Close All"), 0,
     this, SLOT(slotCloseAllWindows()),
     ac, "file_close_all");
+  m_closeAllWindowsAction->setToolTip( i18n("Close all files") );
   m_closeAllWindowsAction->setEnabled(false);

   m_closeOtherWindowsAction = new KAction(i18n("Close All Others"), 0,
     this, SLOT(slotCloseOtherWindows()),
     ac, "file_closeother");
+  m_closeOtherWindowsAction->setToolTip( i18n("Close other files") );
   m_closeOtherWindowsAction->setEnabled(false);

   m_backAction = new KToolBarPopupAction(i18n("Back"), "back", 0,




More information about the KDevelop-devel mailing list