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

List:       kde-bugs-dist
Subject:    [Bug 103215] kicker removes application link during application
From:       "Aaron J.Seigo" <aseigo () kde ! org>
Date:       2005-06-29 20:05:31
Message-ID: 20050629200531.12944.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=103215         
aseigo kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From aseigo kde org  2005-06-29 22:05 -------
SVN commit 430002 by aseigo:

disable the button if the file it represents dissapears
if the file remains gonzo, hide the button
if the file doesn't return within ~8.5 minutes we actually delete the
button.
BUG:103215


 M  +17 -1     panelbutton.cpp  
 M  +16 -7     panelbutton.h  


--- trunk/KDE/kdebase/kicker/libkicker/panelbutton.cpp #430001:430002
 @ -234,13 +234,29  @
 
 void PanelButton::scheduleForRemoval()
 {
+    static int timelapse = 1000;
     if (checkForBackingFile())
     {
         setEnabled(true);
+        timelapse = 1000;
+        emit hideme(false);
+        return;
     }
     else if (KickerSettings::removeButtonsWhenBroken())
     {
-        emit removeme();
+        if (timelapse > 255*1000) // we'v given it ~8.5 minutes by this point
+        {
+            emit removeme();
+            return;
+        }
+
+        if (timelapse > 3000 && isVisible())
+        {
+            emit hideme(true);
+        }
+
+        timelapse *= 2;
+        QTimer::singleShot(timelapse, this, SLOT(scheduleForRemoval()));
     }
 }
 
--- trunk/KDE/kdebase/kicker/libkicker/panelbutton.h #430001:430002
 @ -39,8 +39,8  @
 class KShadowEngine;
 
 /**
- * PanelButton is the base class for all buttons to be 
- * placed in Kicker's panels. It inherits QButton, and 
+ * PanelButton is the base class for all buttons to be
+ * placed in Kicker's panels. It inherits QButton, and
  * KickerTip::Client.
  */
 class KDE_EXPORT PanelButton: public QButton, public KickerTip::Client
 @ -114,7 +114,7  @
     QString title() const;
 
     /**
-     * Changes the name of the panel button's tile, with 
+     * Changes the name of the panel button's tile, with
      * optional color.
      *  param tile the button's tile name
      *  param color the button's tile color
 @ -217,11 +217,20  @
     void requestSave();
 
     /**
-     * Emitted when Kicker needs buttons removed (see KickerSettings::removeButtonsWhenBroken())
+     * Emitted when the button needs to be removed from it's container
+     *  see KickerSettings::removeButtonsWhenBroken()
      */
     void removeme();
 
     /**
+     * Emitted when the button may need to be removed, but that removal depends
+     * on as-yet-uncertain future events and therefore ought to be hidden from
+     * view, though not deleted quite yet.
+     *  see KickerSettings::removeButtonsWhenBroken()
+     */
+    void hideme(bool hide);
+
+    /**
      * Emitted when button initiates a drag
      */
     void dragme(const QPixmap);
 @ -267,7 +276,7  @
     virtual void triggerDrag();
 
     /**
-     * Emits a signal to drag the button. Reimplement this if, for example, 
+     * Emits a signal to drag the button. Reimplement this if, for example,
      * if you need the button to call dragme(KURL::List, const QPixmap)
      * instead of dragme(const QPixmap)
      */
 @ -427,7 +436,7  @
     virtual void initPopup() {};
 
     /**
-     * Called before drag occurs. Reimplement to do any 
+     * Called before drag occurs. Reimplement to do any
      * necessary setup before the button is dragged.
      */
     virtual void triggerDrag();
 @ -439,7 +448,7  @
 
 protected slots:
     /**
-     * Connected to the button's pressed() signal, this is 
+     * Connected to the button's pressed() signal, this is
      * the code that actually displays the menu. Reimplement if
      * you need to take care of any tasks before the popup is
      * displayed (eg. KickerTip)
[prev in list] [next in list] [prev in thread] [next in thread] 

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