[PC-BSD Commits] r543 - pcbsd/trunk/kcmPBUsource

svn at pcbsd.org svn at pcbsd.org
Thu Jul 19 11:45:57 PDT 2007


Author: tim
Date: 2007-07-19 19:45:57 +0100 (Thu, 19 Jul 2007)
New Revision: 543

Modified:
   pcbsd/trunk/kcmPBUsource/Makefile
   pcbsd/trunk/kcmPBUsource/PBU.pro
   pcbsd/trunk/kcmPBUsource/kcm.cpp
   pcbsd/trunk/kcmPBUsource/kcm.h
   pcbsd/trunk/kcmPBUsource/pbumain.ui
   pcbsd/trunk/kcmPBUsource/pbumain.ui.h
Log:
Removed 'Save' and 'Quit' buttons, they were redundant. Settings are now saved when the user hits 'Apply' or 'Ok'. In addition, 'Apply' it enabled when changes are made to the panel.

Modified: pcbsd/trunk/kcmPBUsource/Makefile
===================================================================
--- pcbsd/trunk/kcmPBUsource/Makefile	2007-07-19 18:11:24 UTC (rev 542)
+++ pcbsd/trunk/kcmPBUsource/Makefile	2007-07-19 18:45:57 UTC (rev 543)
@@ -1,6 +1,6 @@
 #############################################################################
-# Makefile for building: libPBU.so.1.0.0
-# Generated by qmake (1.07a) (Qt 3.3.6) on: Thu Jun 15 10:25:32 2006
+# Makefile for building: libkcm_pcbsdpbu.so.1.0.0
+# Generated by qmake (1.07a) (Qt 3.3.6) on: Thu Jul 19 20:04:04 2007
 # Project:  PBU.pro
 # Template: lib
 # Command: $(QMAKE) -o Makefile PBU.pro
@@ -16,9 +16,9 @@
 CXXFLAGS = -pipe -Wall -W -O2 -fno-strict-aliasing -pipe -fPIC  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT
 LEXFLAGS = 
 YACCFLAGS= -d
-INCPATH  = -I/usr/local/share/qt/mkspecs/freebsd-g++ -I. -I/usr/local/include -I$(QTDIR)/include -I.ui/ -I. -I.moc/
+INCPATH  = -I/usr/local/share/qt/mkspecs/freebsd-g++ -I. -I../../../../../../../../local/include -I$(QTDIR)/include -I.ui/ -I. -I.moc/
 LINK     = c++
-LFLAGS   =  -Wl,-rpath,/usr/local/lib  -Wl,-rpath,$(QTDIR)/lib -pthread -shared -Wl,-soname,libPBU.so.1
+LFLAGS   =  -Wl,-rpath,/usr/local/lib  -Wl,-rpath,$(QTDIR)/lib -pthread -shared -Wl,-soname,libkcm_pcbsdpbu.so.1 -Wl,-rpath,/usr/local/lib/kde3
 LIBS     = $(SUBLIBS) -L/usr/local/lib -L$(QTDIR)/lib -lqt-mt
 AR       = ar cqs
 RANLIB   = 
@@ -64,14 +64,14 @@
 		.obj/moc_pbumain.o \
 		.obj/moc_notroot.o
 DIST	   = PBU.pro
-QMAKE_TARGET = PBU
-DESTDIR  = 
-TARGET   = libPBU.so.1.0.0
-TARGETA	= libPBU.a
-TARGETD	= libPBU.so.1.0.0
-TARGET0	= libPBU.so
-TARGET1	= libPBU.so.1
-TARGET2	= libPBU.so.1.0
+QMAKE_TARGET = kcm_pcbsdpbu
+DESTDIR  = ../../../../../../../../local/lib/kde3/
+TARGET   = libkcm_pcbsdpbu.so.1.0.0
+TARGETA	= ../../../../../../../../local/lib/kde3/libkcm_pcbsdpbu.a
+TARGETD	= libkcm_pcbsdpbu.so.1.0.0
+TARGET0	= libkcm_pcbsdpbu.so
+TARGET1	= libkcm_pcbsdpbu.so.1
+TARGET2	= libkcm_pcbsdpbu.so.1.0
 
 first: all
 ####### Implicit rules
@@ -95,14 +95,20 @@
 
 ####### Build rules
 
-all: Makefile  $(TARGET)
+all: Makefile  ../../../../../../../../local/lib/kde3/$(TARGET)
 
-$(TARGET):  $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS) $(OBJCOMP)  
+../../../../../../../../local/lib/kde3/$(TARGET):  $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS) $(OBJCOMP)  
+	test -d ../../../../../../../../local/lib/kde3/ || mkdir -p ../../../../../../../../local/lib/kde3/
 	-$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
 	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) $(OBJCOMP)
 	-ln -s $(TARGET) $(TARGET0)
 	-ln -s $(TARGET) $(TARGET1)
 	-ln -s $(TARGET) $(TARGET2)
+	-$(DEL_FILE) ../../../../../../../../local/lib/kde3/$(TARGET)
+	-$(DEL_FILE) ../../../../../../../../local/lib/kde3/$(TARGET0)
+	-$(DEL_FILE) ../../../../../../../../local/lib/kde3/$(TARGET1)
+	-$(DEL_FILE) ../../../../../../../../local/lib/kde3/$(TARGET2)
+	-$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) ../../../../../../../../local/lib/kde3/
 
 
 
@@ -118,13 +124,13 @@
 $(MOC): 
 	( cd $(QTDIR)/src/moc && $(MAKE) )
 
-Makefile: PBU.pro  /usr/local/share/qt/mkspecs/freebsd-g++/qmake.conf /usr/X11R6/lib/libqt-mt.prl
+Makefile: PBU.pro  /usr/local/share/qt/mkspecs/freebsd-g++/qmake.conf ../../../../../../../../X11R6/lib/libqt-mt.prl
 	$(QMAKE) -o Makefile PBU.pro
 qmake: 
 	@$(QMAKE) -o Makefile PBU.pro
 
 dist: 
-	@mkdir -p .obj/PBU && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) .obj/PBU/ && $(COPY_FILE) --parents PBU_en.ts .obj/PBU/ && $(COPY_FILE) --parents images/filenew images/fileopen images/filesave images/print images/undo images/redo images/editcut images/editcopy images/editpaste images/searchfind images/ktalkd.png NewLogoSmall.png .obj/PBU/ && $(COPY_FILE) --parents pbumain.ui.h .obj/PBU/ && ( cd `dirname .obj/PBU` && $(TAR) PBU.tar PBU && $(GZIP) PBU.tar ) && $(MOVE) `dirname .obj/PBU`/PBU.tar.gz . && $(DEL_FILE) -r .obj/PBU
+	@mkdir -p .obj/kcm_pcbsdpbu && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) .obj/kcm_pcbsdpbu/ && $(COPY_FILE) --parents PBU_en.ts .obj/kcm_pcbsdpbu/ && $(COPY_FILE) --parents images/filenew images/fileopen images/filesave images/print images/undo images/redo images/editcut images/editcopy images/editpaste images/searchfind images/ktalkd.png NewLogoSmall.png .obj/kcm_pcbsdpbu/ && $(COPY_FILE) --parents pbumain.ui.h .obj/kcm_pcbsdpbu/ && ( cd `dirname .obj/kcm_pcbsdpbu` && $(TAR) kcm_pcbsdpbu.tar kcm_pcbsdpbu && $(GZIP) kcm_pcbsdpbu.tar ) && $(MOVE) `dirname .obj/kcm_pcbsdpbu`/kcm_pcbsdpbu.tar.gz . && $(DEL_FILE) -r .obj/kcm_pcbsdpbu
 
 mocclean:
 	-$(DEL_FILE) $(OBJMOC)
@@ -144,8 +150,8 @@
 ####### Sub-libraries
 
 distclean: clean
-	-$(DEL_FILE) $(TARGET) $(TARGET)
-	-$(DEL_FILE) $(TARGET0) $(TARGET1) $(TARGET2) $(TARGETA)
+	-$(DEL_FILE) ../../../../../../../../local/lib/kde3/$(TARGET) $(TARGET)
+	-$(DEL_FILE) ../../../../../../../../local/lib/kde3/$(TARGET0) ../../../../../../../../local/lib/kde3/$(TARGET1) ../../../../../../../../local/lib/kde3/$(TARGET2) $(TARGETA)
 
 
 FORCE:
@@ -209,7 +215,7 @@
 		images/searchfind \
 		images/ktalkd.png \
 		NewLogoSmall.png
-	$(UIC)  -embed PBU images/filenew images/fileopen images/filesave images/print images/undo images/redo images/editcut images/editcopy images/editpaste images/searchfind images/ktalkd.png NewLogoSmall.png -o .ui/qmake_image_collection.cpp
+	$(UIC)  -embed kcm_pcbsdpbu images/filenew images/fileopen images/filesave images/print images/undo images/redo images/editcut images/editcopy images/editpaste images/searchfind images/ktalkd.png NewLogoSmall.png -o .ui/qmake_image_collection.cpp
 
 ####### Install
 

Modified: pcbsd/trunk/kcmPBUsource/PBU.pro
===================================================================
--- pcbsd/trunk/kcmPBUsource/PBU.pro	2007-07-19 18:11:24 UTC (rev 542)
+++ pcbsd/trunk/kcmPBUsource/PBU.pro	2007-07-19 18:45:57 UTC (rev 543)
@@ -2,8 +2,6 @@
 LANGUAGE	= C++
 
 CONFIG	+= qt warn_on release
-TARGET  = kcm_pcbsdpbu
-DESTDIR = /usr/local/lib/kde3/
 
 HEADERS	+= kcm.h
 
@@ -25,6 +23,13 @@
 	images/ktalkd.png \
 	NewLogoSmall.png
 
+TARGET  = kcm_pcbsdpbu
+DESTDIR = /usr/local/lib/kde3/
+
+
+
+
+
 TRANSLATIONS = PBU_en.ts 
 
 

Modified: pcbsd/trunk/kcmPBUsource/kcm.cpp
===================================================================
--- pcbsd/trunk/kcmPBUsource/kcm.cpp	2007-07-19 18:11:24 UTC (rev 542)
+++ pcbsd/trunk/kcmPBUsource/kcm.cpp	2007-07-19 18:45:57 UTC (rev 543)
@@ -22,7 +22,8 @@
   {
    buttons();
    setButtons(KCModule::Help);
-  PBUMain *pbuproc = new PBUMain(parent);
+  pbuproc = new PBUMain(parent);
+  connect(pbuproc, SIGNAL(changed()), this, SLOT(configChanged()));
   pbuproc->ProgramInit();
   pbuproc->reparent(this, QPoint());
   } else  {
@@ -52,10 +53,17 @@
 }
 
 
-void    PCBSDKCModule::save() {
+void    PCBSDKCModule::save()
+{
+    pbuproc->saveCron();
 }
 
+void PCBSDKCModule::configChanged()
+{
+    emit changed(true);
+}
 
+
 /*
 * Start the KFactory Creation  
 *

Modified: pcbsd/trunk/kcmPBUsource/kcm.h
===================================================================
--- pcbsd/trunk/kcmPBUsource/kcm.h	2007-07-19 18:11:24 UTC (rev 542)
+++ pcbsd/trunk/kcmPBUsource/kcm.h	2007-07-19 18:45:57 UTC (rev 543)
@@ -9,6 +9,12 @@
 class  PCBSDKCModule : public KCModule {
    Q_OBJECT
 
+private:
+    PBUMain *pbuproc;
+    
+private slots:
+    void configChanged();
+    
 public:
    PCBSDKCModule(QWidget * = NULL,  const char * = NULL,  const QStringList & = QStringList());
    ~PCBSDKCModule();

Modified: pcbsd/trunk/kcmPBUsource/pbumain.ui
===================================================================
--- pcbsd/trunk/kcmPBUsource/pbumain.ui	2007-07-19 18:11:24 UTC (rev 542)
+++ pcbsd/trunk/kcmPBUsource/pbumain.ui	2007-07-19 18:45:57 UTC (rev 543)
@@ -103,52 +103,6 @@
                             <string>Weekly on:</string>
                         </property>
                     </widget>
-                    <widget class="QTimeEdit">
-                        <property name="name">
-                            <cstring>dailyTimeEdit</cstring>
-                        </property>
-                        <property name="geometry">
-                            <rect>
-                                <x>180</x>
-                                <y>30</y>
-                                <width>123</width>
-                                <height>26</height>
-                            </rect>
-                        </property>
-                        <property name="time">
-                            <time>
-                                <hour>9</hour>
-                                <minute>0</minute>
-                                <second>0</second>
-                            </time>
-                        </property>
-                        <property name="display">
-                            <set>AMPM|Minutes|Hours</set>
-                        </property>
-                    </widget>
-                    <widget class="QTimeEdit">
-                        <property name="name">
-                            <cstring>weeklyTimeEdit</cstring>
-                        </property>
-                        <property name="geometry">
-                            <rect>
-                                <x>270</x>
-                                <y>60</y>
-                                <width>123</width>
-                                <height>26</height>
-                            </rect>
-                        </property>
-                        <property name="time">
-                            <time>
-                                <hour>9</hour>
-                                <minute>0</minute>
-                                <second>0</second>
-                            </time>
-                        </property>
-                        <property name="display">
-                            <set>AMPM|Minutes|Hours</set>
-                        </property>
-                    </widget>
                     <widget class="QComboBox">
                         <item>
                             <property name="text">
@@ -197,6 +151,52 @@
                             </rect>
                         </property>
                     </widget>
+                    <widget class="QTimeEdit">
+                        <property name="name">
+                            <cstring>dailyTimeEdit</cstring>
+                        </property>
+                        <property name="geometry">
+                            <rect>
+                                <x>180</x>
+                                <y>30</y>
+                                <width>123</width>
+                                <height>26</height>
+                            </rect>
+                        </property>
+                        <property name="time">
+                            <time>
+                                <hour>9</hour>
+                                <minute>0</minute>
+                                <second>0</second>
+                            </time>
+                        </property>
+                        <property name="display">
+                            <set>AMPM|Minutes|Hours</set>
+                        </property>
+                    </widget>
+                    <widget class="QTimeEdit">
+                        <property name="name">
+                            <cstring>weeklyTimeEdit</cstring>
+                        </property>
+                        <property name="geometry">
+                            <rect>
+                                <x>270</x>
+                                <y>60</y>
+                                <width>123</width>
+                                <height>26</height>
+                            </rect>
+                        </property>
+                        <property name="time">
+                            <time>
+                                <hour>9</hour>
+                                <minute>0</minute>
+                                <second>0</second>
+                            </time>
+                        </property>
+                        <property name="display">
+                            <set>AMPM|Minutes|Hours</set>
+                        </property>
+                    </widget>
                 </widget>
                 <widget class="QCheckBox" row="3" column="0">
                     <property name="name">
@@ -231,23 +231,6 @@
                         <property name="name">
                             <cstring>unnamed</cstring>
                         </property>
-                        <spacer>
-                            <property name="name">
-                                <cstring>spacer6</cstring>
-                            </property>
-                            <property name="orientation">
-                                <enum>Horizontal</enum>
-                            </property>
-                            <property name="sizeType">
-                                <enum>Expanding</enum>
-                            </property>
-                            <property name="sizeHint">
-                                <size>
-                                    <width>21</width>
-                                    <height>20</height>
-                                </size>
-                            </property>
-                        </spacer>
                         <widget class="QPushButton">
                             <property name="name">
                                 <cstring>checkButton</cstring>
@@ -265,48 +248,6 @@
                                 <string></string>
                             </property>
                         </widget>
-                        <widget class="QPushButton">
-                            <property name="name">
-                                <cstring>saveButton</cstring>
-                            </property>
-                            <property name="minimumSize">
-                                <size>
-                                    <width>120</width>
-                                    <height>28</height>
-                                </size>
-                            </property>
-                            <property name="text">
-                                <string>&amp;Save</string>
-                            </property>
-                            <property name="accel">
-                                <string>Alt+S</string>
-                            </property>
-                        </widget>
-                        <widget class="QPushButton">
-                            <property name="name">
-                                <cstring>quitButton</cstring>
-                            </property>
-                            <property name="sizePolicy">
-                                <sizepolicy>
-                                    <hsizetype>0</hsizetype>
-                                    <vsizetype>0</vsizetype>
-                                    <horstretch>0</horstretch>
-                                    <verstretch>0</verstretch>
-                                </sizepolicy>
-                            </property>
-                            <property name="minimumSize">
-                                <size>
-                                    <width>120</width>
-                                    <height>28</height>
-                                </size>
-                            </property>
-                            <property name="text">
-                                <string>&amp;Quit</string>
-                            </property>
-                            <property name="accel">
-                                <string>Alt+Q</string>
-                            </property>
-                        </widget>
                         <spacer>
                             <property name="name">
                                 <cstring>spacer5</cstring>
@@ -361,12 +302,14 @@
     <variable access="private">QProcess *Touch;</variable>
     <variable access="private">QProcess *DelFile;</variable>
 </variables>
+<signals>
+    <signal>changed();</signal>
+</signals>
 <slots>
     <slot>ProgramInit()</slot>
-    <slot access="private">quitSlot()</slot>
     <slot access="private">checkButtons()</slot>
     <slot access="private">loadCron()</slot>
-    <slot access="private">saveCron()</slot>
+    <slot>saveCron()</slot>
     <slot access="private">checkNow()</slot>
     <slot access="private">UpdateStartupChanged()</slot>
 </slots>

Modified: pcbsd/trunk/kcmPBUsource/pbumain.ui.h
===================================================================
--- pcbsd/trunk/kcmPBUsource/pbumain.ui.h	2007-07-19 18:11:24 UTC (rev 542)
+++ pcbsd/trunk/kcmPBUsource/pbumain.ui.h	2007-07-19 18:45:57 UTC (rev 543)
@@ -13,16 +13,11 @@
 
 void PBUMain::ProgramInit()
 {
-    quitButton->setEnabled(FALSE);
-    quitButton->setHidden(TRUE);
     
-    
-    connect(quitButton, SIGNAL( clicked() ), this, SLOT(quitSlot() ) );
     connect(noUpdateRadio, SIGNAL( clicked() ), this, SLOT(checkButtons() ) );
     connect(updateRadio, SIGNAL( clicked() ), this, SLOT(checkButtons() ) );
     connect(dailyRadio, SIGNAL( clicked() ), this, SLOT(checkButtons() ) );
     connect(weeklyRadio, SIGNAL( clicked() ), this, SLOT(checkButtons() ) );
-    connect(saveButton, SIGNAL( clicked() ), this, SLOT(saveCron() ) );
     connect(checkButton, SIGNAL( clicked() ), this, SLOT(checkNow() ) );
     connect(checkUpdateStartup, SIGNAL( clicked() ), this, SLOT(UpdateStartupChanged() ) );
     
@@ -33,12 +28,7 @@
 }
 
 
-void PBUMain::quitSlot()
-{
-    close();
-}
 
-
 void PBUMain::checkButtons()
 {
 
@@ -68,7 +58,7 @@
        } 
  
     }
-
+    emit changed();
 }
 
 
@@ -225,10 +215,8 @@
 void PBUMain::UpdateStartupChanged()
 {
     	QSettings settings;
-              QString value;
-               bool check = TRUE;
+              QString value;	       
 	       
-	       
     if ( checkUpdateStartup->isChecked() )
     {
        settings.writeEntry("/PC-BSD/StartupUpdates", "0");



More information about the Commits mailing list