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

List:       kde-core-devel
Subject:    kicker patch
From:       Matthias Elter <me () caldera ! de>
Date:       2000-09-13 8:59:41
[Download RAW message or body]

Hi

This patch gets rid of the delays when containers are added or removed.
Please test.

Bye,
Matthias

P.S.: It also removes one icon from the default config, so it fits on 800x600 
screens.

-- 
    _____     ___
   /  __/____/  /                Caldera (Deutschland) GmbH
  /  /_/ __  / /__           Naegelsbachstr. 49c, 91052 Erlangen
 /_____//_/ /____/          Matthias Elter,  email: me@caldera.de
==== /_____/ ======   phone: ++49 9131 7192 300, fax: ++49 9131 7192 399
 Caldera OpenLinux                  http://www.caldera.de

["kicker_save.patch" (text/english)]

Index: containerarea.cpp
===================================================================
RCS file: /home/kde/kdebase/kicker/core/containerarea.cpp,v
retrieving revision 1.13
diff -u -r1.13 containerarea.cpp
--- containerarea.cpp	2000/08/31 20:36:24	1.13
+++ containerarea.cpp	2000/09/13 08:58:10
@@ -120,7 +120,6 @@
     buttons << "Editors/kwrite.desktop";
     buttons << "Office/kword.desktop";
     buttons << "Office/kspread.desktop";
-    buttons << "Internet/KMail.desktop";
 
     for (QStringList::ConstIterator it = buttons.begin(); it != buttons.end(); ++it) {
 	QString s = locate("apps", *it);
@@ -214,7 +213,7 @@
     config->setGroup("General");
     QStringList alist = config->readListEntry("Applets");
     QStringList trusted = config->readListEntry("TrustedApplets");
-    
+
     // now restore the applets
     QStringList::Iterator it = alist.begin();
     while(it != alist.end())
@@ -409,7 +408,8 @@
     KMenuButtonContainer *b = new KMenuButtonContainer(viewport());
     addContainer(b);
     moveToFirstFreePosition(b);
-    saveContainerConfig();
+    saveContainerConfig(true);
+    b->saveConfiguration(b->appletId());
 }
 
 void ContainerArea::addDesktopButton()
@@ -417,7 +417,8 @@
     DesktopButtonContainer *b = new DesktopButtonContainer(viewport());
     addContainer(b);
     moveToFirstFreePosition(b);
-    saveContainerConfig();
+    saveContainerConfig(true);
+    b->saveConfiguration(b->appletId());
 }
 
 void ContainerArea::addWindowListButton()
@@ -425,7 +426,8 @@
     WindowListButtonContainer *b = new WindowListButtonContainer(viewport());
     addContainer(b);
     moveToFirstFreePosition(b);
-    saveContainerConfig();
+    saveContainerConfig(true);
+    b->saveConfiguration(b->appletId());
 }
 
 void ContainerArea::addURLButton(const QString &url)
@@ -433,7 +435,8 @@
     URLButtonContainer *b = new URLButtonContainer(viewport(), url);
     addContainer(b);
     moveToFirstFreePosition(b);
-    saveContainerConfig();
+    saveContainerConfig(true);
+    b->saveConfiguration(b->appletId());
 }
 
 void ContainerArea::addBrowserButton(const QString &startDir)
@@ -441,7 +444,8 @@
     BrowserButtonContainer *b = new BrowserButtonContainer( viewport(), startDir);
     addContainer(b);
     moveToFirstFreePosition(b);
-    saveContainerConfig();
+    saveContainerConfig(true);
+    b->saveConfiguration(b->appletId());
 }
 
 void ContainerArea::addExeButton(const QString &filePath, const QString &icon,
@@ -450,7 +454,8 @@
     ExeButtonContainer *b = new ExeButtonContainer(viewport(), filePath, icon, cmdLine, inTerm);
     addContainer(b);
     moveToFirstFreePosition(b);
-    saveContainerConfig();
+    saveContainerConfig(true);
+    b->saveConfiguration(b->appletId());
 }
 
 
@@ -469,7 +474,8 @@
 	    a = new InternalAppletContainer(info, viewport());
 	    addContainer(a);
 	    moveToFirstFreePosition(a);
-	    saveContainerConfig();
+	    saveContainerConfig(true);
+	    a->saveConfiguration(a->appletId());
 	}
     else
 	{
@@ -483,7 +489,8 @@
 {
     addContainer(a);
     moveToFirstFreePosition(a);
-    saveContainerConfig();
+    saveContainerConfig(true);
+    a->saveConfiguration(a->appletId());
 }
 
 void ContainerArea::addContainer(BaseContainer* a)
@@ -1210,7 +1217,8 @@
             }
             addContainer(a);
             moveToFirstFreePosition(a);
-            saveContainerConfig();
+	    saveContainerConfig(true);
+	    a->saveConfiguration(a->appletId()); 
         }
     }
 }
@@ -1449,7 +1457,7 @@
 
 void ContainerArea::slotSaveContainerConfig()
 {
-    saveContainerConfig();
+    saveContainerConfig(true);
 }
 
 void ContainerArea::slotRemoveContainer(BaseContainer* a)
Index: container_button.cpp
===================================================================
RCS file: /home/kde/kdebase/kicker/core/container_button.cpp,v
retrieving revision 1.1
diff -u -r1.1 container_button.cpp
--- container_button.cpp	2000/08/08 13:13:35	1.1
+++ container_button.cpp	2000/09/13 08:58:10
@@ -53,6 +53,13 @@
   if(_button) _button->saveConfiguration(group);
 }
 
+
+void ButtonContainer::slotSaveConfiguration()
+{
+    saveConfiguration(appletId());
+    emit requestSave();
+}
+
 void ButtonContainer::slotSetPopupDirection(Direction d)
 {
   BaseContainer::slotSetPopupDirection(d);
@@ -79,7 +86,7 @@
 
   _button->installEventFilter(this);
   _layout->add(_button);
-  connect(_button, SIGNAL(requestSave()), SIGNAL(requestSave()));
+  connect(_button, SIGNAL(requestSave()), SLOT(slotSaveConfiguration()));
 }
 
 bool ButtonContainer::eventFilter (QObject *, QEvent *e)
@@ -252,3 +259,4 @@
   _actions = KPanelApplet::Preferences;
   embedButton(b);
 }
+
Index: container_button.h
===================================================================
RCS file: /home/kde/kdebase/kicker/core/container_button.h,v
retrieving revision 1.2
diff -u -r1.2 container_button.h
--- container_button.h	2000/08/11 03:13:53	1.2
+++ container_button.h	2000/09/13 08:58:10
@@ -50,6 +50,9 @@
  public slots:
   void slotSetPopupDirection(Direction d);
   void slotSetOrientation(Orientation o);
+    
+protected slots:
+  void slotSaveConfiguration();
 
  protected:
   void embedButton(PanelButton* p);


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

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