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

List:       kde-commits
Subject:    kdelibs/kdecore
From:       Nadeem Hasan <nhasan () nadmm ! com>
Date:       2003-06-01 3:42:50
[Download RAW message or body]

CVS commit by nhasan: 

Add KGlobalSettings::showIconsOnButtons()


  M +11 -2     kglobalsettings.cpp   1.69
  M +12 -1     kglobalsettings.h   1.44


--- kdelibs/kdecore/kglobalsettings.cpp  #1.68:1.69
@@ -601,6 +601,7 @@ bool KGlobalSettings::isMultiHead()
 bool KGlobalSettings::wheelMouseZooms()
 {
-    KConfigGroup group( KGlobal::config(), "KDE" );
-    return group.readBoolEntry( "WheelMouseZooms", KDE_DEFAULT_WHEEL_ZOOM );
+    KConfig *c = KGlobal::config();
+    KConfigGroupSaver cgs( c, "KDE" );
+    return c->readBoolEntry( "WheelMouseZooms", KDE_DEFAULT_WHEEL_ZOOM );
 }
 
@@ -658,4 +659,12 @@ QRect KGlobalSettings::desktopGeometry(Q
         return dw->geometry();
     }
+}
+
+bool KGlobalSettings::showIconsOnPushButtons()
+{
+    KConfig *c = KGlobal::config();
+    KConfigGroupSaver cgs( c, "KDE" );
+    return c->readBoolEntry("ShowIconsOnPushButtons",
+        KDE_DEFAULT_ICON_ON_PUSHBUTTON);
 }
 

--- kdelibs/kdecore/kglobalsettings.h  #1.43:1.44
@@ -31,4 +31,5 @@
 #define KDE_DEFAULT_VISUAL_ACTIVATE_SPEED 50
 #define KDE_DEFAULT_WHEEL_ZOOM false
+#define KDE_DEFAULT_ICON_ON_PUSHBUTTON false
 
 /**
@@ -444,4 +445,14 @@ class KGlobalSettings
      */
     static QRect desktopGeometry(QWidget* w);
+
+    /**
+     * This function determines if the user wishes to see icons on the
+     * push buttons.
+     *
+     * @return Returns true if user wants to show icons.
+     *
+     * @since 3.2
+     */
+    static bool showIconsOnPushButtons();
 
 private:


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

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