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

List:       kde-core-devel
Subject:    kicker and resize handle
From:       Scott Wheeler <scott () slackorama ! net>
Date:       2002-02-06 6:59:27
[Download RAW message or body]

I think the new resize handle is a nice idea, but I keep accidentally resizing 
it when I don't want to.  So I created a patch in the "Preferences -> Look & 
Feel" menu to turn it off.  The default is on, but this should make it 
possible for people to turn it off if it annoys them.

I had to patch kicker and the kcontrol for kicker. 

The first patch should be applied in kdebase/kcontrol (patches the kicker dir) 
and the second in kdebase/kicker (patches the core dir).

I just applied them to current CVS on my machine and all seems well.  There's 
only one new string added, so it shouldn't be too big of a problem for the 
translation folks.

-Scott
["resizeHandle-kdebase.kicker.core.patch" (text/x-diff)]

diff -Naur core-back/panel.cpp core/panel.cpp
--- core-back/panel.cpp	Wed Feb  6 01:22:22 2002
+++ core/panel.cpp	Wed Feb  6 01:16:16 2002
@@ -88,10 +88,13 @@
 {
     _containerArea->initialize();
     readConfig();
+    setResizeHandle( _resizeHandle );
 }
 
 void Panel::configure()
 {
+    readConfig();
+    setResizeHandle( _resizeHandle );
     PanelContainer::readContainerConfig();
 }
 
@@ -103,6 +106,7 @@
     _containerArea->configure();
 
     config->setGroup("General");
+    _resizeHandle = config->readBoolEntry( "ResizeHandle", true );
 
     _panelsize = config->readNumEntry( "Size", PGlobal::sizeValue( Normal ) );
 
@@ -164,6 +168,17 @@
     _panelsize = size;
     updateLayout();
     writeConfig();
+}
+
+bool Panel::resizeHandle()
+{
+  return _resizeHandle;
+}
+
+void Panel::setResizeHandle(bool value)
+{
+  _resizeHandle=value;
+  _frame->enableResizeHandle( _resizeHandle );
 }
 
 void Panel::slotResizeRequest( int dx, int dy )
diff -Naur core-back/panel.h core/panel.h
--- core-back/panel.h	Wed Feb  6 01:22:22 2002
+++ core/panel.h	Wed Feb  6 01:19:12 2002
@@ -73,6 +73,9 @@
     void setCustomSize( int size );
     QSize sizeHint( Position p, QSize maxSize );
 
+    bool resizeHandle();
+    void setResizeHandle(bool value);
+
     ContainerArea *containerArea() { return(_containerArea); }
 
     void readConfig();
@@ -92,6 +95,7 @@
 private:
     Size _size;
     int _panelsize;
+    bool _resizeHandle;
     FittsLawFrame    *_frame;
     ContainerArea    *_containerArea;
 };

["resizeHandle-kdebase.kcontrol.kicker.patch" (text/x-diff)]

diff -Naur kicker-old/lookandfeeltab.ui kicker/lookandfeeltab.ui
--- kicker-old/lookandfeeltab.ui	Mon Jan  7 02:16:51 2002
+++ kicker/lookandfeeltab.ui	Tue Feb  5 23:55:52 2002
@@ -67,6 +67,14 @@
                         <string>S&amp;how tooltips</string>
                     </property>
                 </widget>
+                <widget class="QCheckBox">
+                    <property name="name">
+                        <cstring>resizeHandle_cb</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Resize Handle</string>
+                    </property>
+                </widget>
             </hbox>
         </widget>
         <widget class="QGroupBox" row="1" column="1">
diff -Naur kicker-old/lookandfeeltab_impl.cpp \
                kicker/lookandfeeltab_impl.cpp
--- kicker-old/lookandfeeltab_impl.cpp	Tue Jan  8 06:28:36 2002
+++ kicker/lookandfeeltab_impl.cpp	Wed Feb  6 00:08:38 2002
@@ -127,6 +127,8 @@
 
     connect(m_backgroundInput, SIGNAL(urlSelected(const QString&)), \
SLOT(browse_theme(const QString&)));  connect(m_showToolTips, \
SIGNAL(clicked()), SIGNAL(changed())); +    connect(resizeHandle_cb, \
SIGNAL(clicked()), SIGNAL(changed() ) ); +
 
   fill_tile_input();
   load();
@@ -304,7 +306,8 @@
     }
 
     m_showToolTips->setChecked( c->readBoolEntry( "ShowToolTips", true ) \
                );
-
+    resizeHandle_cb->setChecked( c->readBoolEntry("ResizeHandle", true) );
+  
   c->setGroup("buttons");
 
   bool tiles = c->readBoolEntry("EnableTileBackground", false);
@@ -320,6 +323,7 @@
   bool zoom = c->readBoolEntry("EnableIconZoom", false);
   zoom_cb->setChecked(zoom);
 
+
   c->setGroup("button_tiles");
 
   bool kmenu_tiles = c->readBoolEntry("EnableKMenuTiles", true);
@@ -446,6 +450,7 @@
   c->writeEntry("UseBackgroundTheme", m_backgroundImage->isChecked());
   c->writeEntry("BackgroundTheme", theme);
   c->writeEntry( "ShowToolTips", m_showToolTips->isChecked() );
+  c->writeEntry( "ResizeHandle", resizeHandle_cb->isChecked() );
 
   c->setGroup("buttons");
 
@@ -500,6 +505,7 @@
   m_backgroundInput->setEnabled(false);
   m_backgroundLabel->setEnabled(false);
   m_showToolTips->setChecked(true);
+  resizeHandle_cb->setChecked(true);
 
 }
 



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

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