[Kget] [Bug 70900] Enable/Disable integration with konqueror from Systray icons menu

Urs Wolfer u.wolfer at bluewin.ch
Sun Jul 24 14:53:08 CEST 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=70900         
u.wolfer bluewin ch changed:

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



------- Additional Comments From u.wolfer bluewin ch  2005-07-24 14:53 -------
SVN commit 438125 by uwolfer:

Changes on KGet Konqueror integration:

* User can easily enable / disable KGet as download manager for Konqueror with right-click on KGet systrayicon (right-click-menu).
FEATURE: 70900

* Reformulated question at first KGet startup and settings about KGet integration in Konqueror.
BUG: 63628

 M  +1 -1      dlgadvancedbase.ui  
 M  +1 -0      docking.cpp  
 M  +31 -0     kmainwidget.cpp  
 M  +2 -0      kmainwidget.h  
 M  +1 -1      settings.cpp  


--- trunk/KDE/kdenetwork/kget/dlgadvancedbase.ui #438124:438125
 @ -108,7 +108,7  @
                         <cstring>cb_konqiIntegration</cstring>
                     </property>
                     <property name="text">
-                        <string>Enable integration with Konqueror</string>
+                        <string>Use KGet as Download Manager for Konqueror</string>
                     </property>
                 </widget>
                 <widget class="QCheckBox" row="9" column="0" rowspan="1" colspan="3">
--- trunk/KDE/kdenetwork/kget/docking.cpp #438124:438125
 @ -47,6 +47,7  @
     // popup menu for right mouse button
     KPopupMenu *popupMenu = contextMenu();
     parent->action("drop_target")->plug(popupMenu);
+    parent->action("konqueror_integration")->plug(popupMenu);
     popupMenu->insertSeparator();
     parent->m_paPreferences->plug(popupMenu);
 
--- trunk/KDE/kdenetwork/kget/kmainwidget.cpp #438124:438125
 @ -387,6 +387,10  @
     m_paShowLog      = new KToggleAction(i18n("Show &Log Window"),"tool_logwindow", 0, this, SLOT(slotToggleLogWindow()), coll, "toggle_log");
     m_paShowLog->setCheckedState(i18n("Hide &Log Window"));
     m_paDropTarget   = new KAction(i18n("Show Drop &Target"),"tool_drop_target", 0, this, SLOT(slotToggleDropTarget()), coll, "drop_target");
+    m_paKonquerorIntegration = new KAction(i18n("Enable &KGet as Konqueror Download Manager"), 0, 0, this, SLOT(slotKonquerorIntegration()), coll, "konqueror_integration");
+    if (ksettings.b_KonquerorIntegration) {
+        m_paKonquerorIntegration->setText(i18n("Disable &KGet as Konqueror Download Manager"));
+    }
 
     menuHelp = new KHelpMenu(this, KGlobal::instance()->aboutData());
     KStdAction::whatsThis(menuHelp, SLOT(contextHelpActivated()), coll, "whats_this");
 @ -1841,6 +1845,33  @
 }
 
 
+void KMainWidget::slotKonquerorIntegration()
+{
+#ifdef _DEBUG
+    sDebugIn << endl;
+#endif
+
+        bool bIsKonquiEnable=!ksettings.b_KonquerorIntegration;
+        ksettings.b_KonquerorIntegration=!ksettings.b_KonquerorIntegration;
+        KConfig cfg("konquerorrc", false, false);
+        cfg.setGroup("HTML Settings");
+        cfg.writePathEntry("DownloadManager",QString((bIsKonquiEnable)?"kget":""));
+        cfg.sync();
+        if (bIsKonquiEnable) 
+        {
+            m_paKonquerorIntegration->setText(i18n("Disable &KGet as Konqueror Download Manager"));
+        }
+        else
+        {
+            m_paKonquerorIntegration->setText(i18n("Enable &KGet as Konqueror Download Manager"));
+        }
+
+#ifdef _DEBUG
+    sDebugOut << endl;
+#endif
+}
+
+
 void KMainWidget::slotPopupMenu(Transfer * item)
 {
 #ifdef _DEBUG
--- trunk/KDE/kdenetwork/kget/kmainwidget.h #438124:438125
 @ -104,6 +104,7  @
     void slotToggleDropTarget();
     void slotToggleAnimation();
     void slotUpdateActions();
+    void slotKonquerorIntegration();
 
 protected slots:
     void slotQuit();
 @ -218,6 +219,7  @
     KToggleAction *m_paAutoDisconnect, *m_paAutoShutdown, *m_paAutoPaste;
 
     KAction *m_paDropTarget;
+    KAction *m_paKonquerorIntegration;
     bool m_showDropTarget;
 
 };
--- trunk/KDE/kdenetwork/kget/settings.cpp #438124:438125
 @ -128,7 +128,7  @
     if(config->readBoolEntry("FirstRun",true))
     {
         config->writeEntry("FirstRun",false);
-        bool bAnswerYes = KMessageBox::questionYesNo(0L,i18n("This is the first time that you have run KGet.\nDo you want to enable integration with Konqueror?"), i18n("Konqueror Integration"), i18n("Enable"), i18n("Do Not Enable")) == KMessageBox::Yes;
+        bool bAnswerYes = KMessageBox::questionYesNo(0L,i18n("This is the first time that you have run KGet.\nDo you want to use KGet as Download Manager for Konqueror?"), i18n("Konqueror Integration"), i18n("Enable"), i18n("Do Not Enable")) == KMessageBox::Yes;
         if (bAnswerYes)
         {
             cfg->writePathEntry("DownloadManager", QString(KGET_APP_NAME));



More information about the Kget mailing list