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

List:       kde-pim
Subject:    [Kde-pim] kdepim/kontact/src
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2005-03-24 11:48:39
Message-ID: 20050324114839.E7B1A5B6 () office ! kde ! org
[Download RAW message or body]

CVS commit by tokoe: 

Remove the 'Select Components...' menu entry and rename the button in
KJanusWidget instead. You need a kdeui from CVS HEAD for let this work.

CCMAIL:kde-pim@kde.org


  M +0 -1      kontactui.rc   1.18
  M +24 -21    mainwindow.cpp   1.171
  M +0 -1      mainwindow.h   1.68


--- kdepim/kontact/src/kontactui.rc  #1.17:1.18
@@ -19,5 +19,4 @@
      <DefineGroup name="settings_configure" append="configure_merge"/>
      <Action name="settings_configure_kontact" append="configure_merge"/>
-     <Action name="settings_select_components" append="configure_merge"/>
 
 <!-- Those actions have to be set by the parts because some applications

--- kdepim/kontact/src/mainwindow.cpp  #1.170:1.171
@@ -25,8 +25,9 @@
 #include <qimage.h>
 #include <qobjectlist.h>
+#include <qprogressbar.h>
+#include <qpushbutton.h>
 #include <qsplitter.h>
-#include <qwhatsthis.h>
 #include <qtimer.h>
-#include <qprogressbar.h>
+#include <qwhatsthis.h>
 
 #include <dcopclient.h>
@@ -76,4 +77,22 @@
 using namespace Kontact;
 
+class SettingsDialogWrapper : public KSettings::Dialog
+{
+  public:
+    SettingsDialogWrapper( ContentInListView content, QWidget * parent = 0 )
+      : KSettings::Dialog( content, parent, 0 )
+    {
+    }
+
+
+    void fixButtonLabel( QWidget *widget )
+    {
+      QObject *object = widget->child( "KJanusWidget::buttonBelowList" );
+      QPushButton *button = static_cast<QPushButton*>( object );
+      if ( button )
+        button->setText( i18n( "Select Components..." ) );
+    }
+};
+
 MainWindow::MainWindow()
   : Kontact::Core(), mTopWidget( 0 ), mSplitter( 0 ),
@@ -303,8 +322,4 @@ void MainWindow::setupActions()
                                          actionCollection(), "action_new" );
 
-  new KAction( i18n( "Select Components..." ), "configure", 0, this,
-               SLOT( slotSelectComponents() ),
-               actionCollection(), "settings_select_components" );
-
   new KAction( i18n( "Configure Kontact..." ), "configure", 0, this, SLOT( slotPreferences() ),
                actionCollection(), "settings_configure_kontact" );
@@ -662,7 +677,7 @@ void MainWindow::slotQuit()
 void MainWindow::slotPreferences()
 {
-  static KSettings::Dialog *dlg = 0;
+  static SettingsDialogWrapper *dlg = 0;
   if ( !dlg ) {
-    dlg = new KSettings::Dialog( KSettings::Dialog::Configurable, this );
+    dlg = new SettingsDialogWrapper( KSettings::Dialog::Configurable, this );
 
     // do not show settings of components running standalone
@@ -686,17 +701,5 @@ void MainWindow::slotPreferences()
 
   dlg->show();
-}
-
-void MainWindow::slotSelectComponents()
-{
-  static KSettings::ComponentsDialog *dlg = 0;
-  if ( !dlg ) {
-    dlg = new KSettings::ComponentsDialog( this );
-    dlg->setPluginInfos( mPluginInfos );
-    connect( dlg, SIGNAL( okClicked() ), SLOT( pluginsChanged() ) );
-    connect( dlg, SIGNAL( applyClicked() ), SLOT( pluginsChanged() ) );
-  }
-
-  dlg->show();
+  dlg->fixButtonLabel( this );
 }
 

--- kdepim/kontact/src/mainwindow.h  #1.67:1.68
@@ -90,5 +90,4 @@ class MainWindow : public Kontact::Core,
     void slotActivePartChanged( KParts::Part *part );
     void slotPreferences();
-    void slotSelectComponents();
     void slotNewClicked();
     void slotQuit();


_______________________________________________
kde-pim mailing list
kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

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