[Kst] branches/work/kst/1.5/kst/src/libkstapp

Andrew Walker arwalker at sumusltd.com
Wed Jul 4 21:41:43 CEST 2007


SVN commit 683490 by arwalker:

try and reduce likeliehood that later code changes will break functionality

 M  +4 -2      kst.cpp  


--- branches/work/kst/1.5/kst/src/libkstapp/kst.cpp #683489:683490
@@ -101,6 +101,8 @@
 #include "vectorsavedialog.h"
 #include "kstobjectdefaults.h"
 
+#define MODE_BUTTON_ID       5
+
 #define KST_STATUSBAR_DATA   1
 #define KST_STATUSBAR_STATUS 2
 
@@ -852,7 +854,7 @@
   _gfxPictureAction->plug(mouseModeMenu);
   _gfx2DPlotAction->plug(mouseModeMenu);
 
-  toolBar()->insertButton("thumbnail", 5, mouseModeMenu, true, i18n("Select the desired mode"));
+  toolBar()->insertButton("thumbnail", MODE_BUTTON_ID, mouseModeMenu, true, i18n("Select the desired mode"));
   toggleMouseMode();
 
   createGUI(0L);
@@ -1870,7 +1872,7 @@
   }
 
   if (action) {
-    KToolBarButton* button = toolBar()->getButton(5);
+    KToolBarButton* button = toolBar()->getButton(MODE_BUTTON_ID);
 
     if (button) {
       button->setText(action->toolTip());


More information about the Kst mailing list