[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdevelop/parts/appwizard
From:       Roberto Raggi <raggi () cli ! di ! unipi ! it>
Date:       2003-02-28 22:24:26
[Download RAW message or body]

CVS commit by raggi: 

now the generated code compiles with kde 3.0 too


  M +19 -5     kapp/app.cpp   1.9
  M +16 -0     kpartapp/app.cpp   1.10


--- kdevelop/parts/appwizard/kapp/app.cpp  #1.8:1.9
@@ -252,8 +252,13 @@ void $APPNAME$::optionsConfigureToolbars
 {
     // use the standard toolbar editor
-    saveMainWindowSettings( KGlobal::config(), autoSaveGroup() );
-    KEditToolbar dlg(actionCollection());
-    connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(newToolbarConfig()));
-    dlg.exec();
+#if defined(KDE_MAKE_VERSION)
+# if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
+    saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
+# else
+    saveMainWindowSettings(KGlobal::config());
+# endif
+#else
+    saveMainWindowSettings(KGlobal::config());
+#endif
 }
 
@@ -263,5 +268,14 @@ void $APPNAME$::newToolbarConfig()
     // recreate our GUI, and re-apply the settings (e.g. "text under icons", etc.)
     createGUI();
-    applyMainWindowSettings( KGlobal::config(), autoSaveGroup() );
+
+#if defined(KDE_MAKE_VERSION)
+# if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
+    applyMainWindowSettings(KGlobal::config(), autoSaveGroup());
+# else
+    applyMainWindowSettings(KGlobal::config());
+# endif
+#else
+    applyMainWindowSettings(KGlobal::config());
+#endif
 }
 

--- kdevelop/parts/appwizard/kpartapp/app.cpp  #1.9:1.10
@@ -151,5 +151,13 @@ void $APPNAME$::optionsConfigureKeys()
 void $APPNAME$::optionsConfigureToolbars()
 {
+#if defined(KDE_MAKE_VERSION)
+# if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
     saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
+# else
+    saveMainWindowSettings(KGlobal::config() );
+# endif
+#else
+    saveMainWindowSettings(KGlobal::config() );
+#endif
 
     // use the standard toolbar editor
@@ -162,5 +170,13 @@ void $APPNAME$::optionsConfigureToolbars
 void $APPNAME$::applyNewToolbarConfig()
 {
+#if defined(KDE_MAKE_VERSION)
+# if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
     applyMainWindowSettings(KGlobal::config(), autoSaveGroup());
+# else
+    applyMainWindowSettings(KGlobal::config());
+# endif
+#else
+    applyMainWindowSettings(KGlobal::config());
+#endif
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic