Bug 70900 - Enable/Disable integration with konqueror from Systray icons menu
Summary: Enable/Disable integration with konqueror from Systray icons menu
Status: RESOLVED FIXED
Alias: None
Product: kget
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mandrake RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: KGet authors
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-20 06:30 UTC by Mohd Asif Ali Rizwaan
Modified: 2005-07-24 14:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mohd Asif Ali Rizwaan 2003-12-20 06:30:37 UTC
Version:           v0.8.3 (using KDE 3.1.3)
Installed from:    Mandrake Linux Cooker i586 - Cooker
Compiler:          gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)
OS:          Linux (i686) release 2.4.22-10mdk

On RMB kget icon, Enable Integration with Konqueror should be displayed for quick enabling and disabling with konqueror.
Comment 1 Urs Wolfer 2005-07-24 14:53:06 UTC
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));