<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>76323</bug_id>
          
          <creation_ts>2004-02-28 00:22:59 +0000</creation_ts>
          <short_desc>no mainWindow restore on exec kopete</short_desc>
          <delta_ts>2004-03-01 05:43:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kopete</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Gentoo Packages</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kees van Wijk">cvanwijk</reporter>
          <assigned_to name="Kopete Developers">kopete-bugs-null</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>210534</commentid>
    <comment_count>0</comment_count>
    <who name="Kees van Wijk">cvanwijk</who>
    <bug_when>2004-02-28 00:22:59 +0000</bug_when>
    <thetext>Version:            (using KDE KDE 3.2.0)
Installed from:    Gentoo Packages

Many kde applications startup only one instance, Examples are juk or kmail. 
So the effect of starting a second juk or kmail by typing into a konsole kmail or juk is only (as far as I, the user, see) to raise the existing instance. Probably through something like 
&quot;dcop kmail kmail-mainwindow restore&quot; 
This is a very nice feature but it is missing from kopete. 

When I type &quot;kopete&quot; in my terminal while there is already one instance running that instance should by restored (raised).

Groeten,
Kees</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>211143</commentid>
    <comment_count>1</comment_count>
    <who name="Matt Rogers">mattr</who>
    <bug_when>2004-03-01 03:12:06 +0000</bug_when>
    <thetext>working on it! (or as lilachaze would say, &quot;Mine!&quot;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>211160</commentid>
    <comment_count>2</comment_count>
    <who name="Matt Rogers">mattr</who>
    <bug_when>2004-03-01 05:43:58 +0000</bug_when>
    <thetext>CVS commit by mattr: 

Fix bug 76323. Restore the window when attempting to run a second instance
of kopete. [BACKPORT]

CCMAIL: 76323-done@bugs.kde.org


  M +22 -0     kopete.cpp   1.170.2.2
  M +2 -0      kopete.h   1.81.2.1


--- kdenetwork/kopete/kopete/kopete.cpp  #1.170.2.1:1.170.2.2
@@ -216,4 +216,26 @@ void  Kopete::slotAllPluginsLoaded()
 }
 
+int Kopete::newInstance()
+{
+        kdDebug(14000) &lt;&lt; k_funcinfo &lt;&lt; endl;
+
+        /** The following three lines work around the problem that
+         * Kopete has multiple main windows, so qapp-&gt;mainWidget()
+         * returns 0, which breaks the normal
+         * KUniqueApplication::newInstance() that raises the window
+         * when we run a new instance.
+         *
+         * 1. Set the main widget to the contact list window
+         * 2. Call KUniqueApplication::newInstance()
+         * 3. Set the main widget back to 0
+         */
+
+        setMainWidget( m_mainWindow );
+        int kUniqAppReturnCode = KUniqueApplication::newInstance();
+        setMainWidget( 0L );
+
+        return kUniqAppReturnCode;
+}
+
 void Kopete::quitKopete()
 {

--- kdenetwork/kopete/kopete/kopete.h  #1.81:1.81.2.1
@@ -49,4 +49,6 @@ public:
         bool isShuttingDown() const { return m_isShuttingDown; }
 
+        virtual int newInstance();
+
 public slots:
         /**


</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>