PATCH: update the normal2 template with state changes

Guillaume Laurent glaurent at telegraph-road.org
Sat Feb 2 14:40:04 UTC 2002


Hi,
The following patches should update the normal2 template to use XML-defined 
application states rather than a litany of action->setEnabled().

--- kbase.cpp~  Sat Feb  2 14:27:48 2002
+++ kbase.cpp   Sat Feb  2 14:32:09 2002
@@ -38,12 +38,6 @@
   // disable actions at startup
   emit stateChanged("startup");

-  fileSave->setEnabled(false);
-  fileSaveAs->setEnabled(false);
-  filePrint->setEnabled(false);
-  editCut->setEnabled(false);
-  editCopy->setEnabled(false);
-  editPaste->setEnabled(false);
 }

 |NAME|App::~|NAME|App()
--- kbaseui.rc~ Wed Oct 18 20:12:17 2000
+++ kbaseui.rc  Sat Feb  2 14:31:01 2002
@@ -5,4 +5,16 @@
     <Action name="file_new_window"/>
   </Menu>
 </MenuBar>
+
+<State name="startup">
+  <disable>
+    <Action name="file_save"/>
+    <Action name="file_save_as"/>
+    <Action name="file_print"/>
+    <Action name="edit_cut"/>
+    <Action name="edit_copy"/>
+    <Action name="edit_paste"/>
+  </disable>
+</State>
+
 </kpartgui>


-- 
					Guillaume.
					http://www.telegraph-road.org




More information about the KDevelop-devel mailing list