Bug 73150 - Close contact list after timeout
Summary: Close contact list after timeout
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: Contact list (other bugs)
Version First Reported In: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
: 93945 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-21 17:35 UTC by Carsten Schlipf
Modified: 2005-02-01 02:00 UTC (History)
2 users (show)

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


Attachments
Implements autohiding of the contact list after a configurable timeout (3.44 KB, patch)
2004-11-29 13:50 UTC, Christian Nitschkowski
Details
window-autohide.diff (3.79 KB, text/x-diff)
2004-12-02 21:54 UTC, Richard Smith
Details
Implements autohiding - next try (14.37 KB, patch)
2004-12-02 21:54 UTC, Christian Nitschkowski
Details
Autohiding complete - really (14.79 KB, patch)
2004-12-04 13:00 UTC, Christian Nitschkowski
Details
This time with WhatsThis-help as requested (14.53 KB, patch)
2004-12-04 15:16 UTC, Christian Nitschkowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Schlipf 2004-01-21 17:35:19 UTC
Version:           0.8.0 RC1 (using KDE 3.2.0 RC1, compiled sources)
Compiler:          gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
OS:          Linux (i686) release 2.4.20-18.9

Most instant messengers help to clean up the desktop by optionally closing the contact list after a configurable timeout.

It would be great, if Kopete could also do this.
Comment 1 Christian Nitschkowski 2004-03-29 23:04:51 UTC
Yes - nice idea.
I started implementing it.
Don't have the time to continue work on this today.
But I'll certainly have a look into this.
Comment 2 Matt Rogers 2004-11-28 22:58:36 UTC
*** Bug 93945 has been marked as a duplicate of this bug. ***
Comment 3 m.wege 2004-11-28 23:22:23 UTC
Please not that Wish 93945 is online partly a duplicate. I didn't suggest the contact list should disapear after timeout, if suggested to let the contact window disapear, when no contact is online. But this is also a good suggestion and they have obviously something to do with each other.
Comment 4 Christian Nitschkowski 2004-11-29 13:50:38 UTC
Created attachment 8478 [details]
Implements autohiding of the contact list after a configurable timeout

This patch implements autohiding of the contact list.
The window will be hidden after a configurable timeout after the mouse-cursor
left the window.
If the mouse-cursor never hit the window, it will be hidden as well after the
timeout.
The timeout has to be configured by hand in the config-file in group "General
Options" as the option "AutoHide=x" where 'x' is the timeout in milliseconds.
0 disables the feature.
I'd like to add an option to the configure-dialogs, too.
Comment 5 Christian Nitschkowski 2004-11-29 13:52:29 UTC
Forgot to mention - this is a patch against Kopete 0.9.0.
But it shouldn't be hard to apply this to newer versions.
Comment 6 Matt Rogers 2004-11-29 14:33:02 UTC
Thanks for the patch. However, I request that you update your patch so that it works with CVS. The amount of changes between 0.9.0 and CVS are enormous, and it _won't_ be easy to apply this patch to CVS.
Comment 7 Richard Smith 2004-11-29 15:20:24 UTC
On Monday 29 November 2004 13:33, Matt Rogers wrote:
> Thanks for the patch. However, I request that you update your patch so that
> it works with CVS. The amount of changes between 0.9.0 and CVS are
> enormous, and it _won't_ be easy to apply this patch to CVS.

Only kopetewindow.h and kopetewindow.cpp are changed, and they're relatively 
unaffected by the post-0.9.0 changes. The patch applies correctly to CVS. 
Attached is the same patch, but with the offsets corrected.


Created an attachment (id=8480)
window-autohide.diff
Comment 8 Olivier Goffart 2004-11-30 10:07:21 UTC
Anyway, the configuration option is missing.
Comment 9 Christian Nitschkowski 2004-12-02 21:54:57 UTC
Created attachment 8523 [details]
Implements autohiding - next try

This is a new patch against the CVS of today.
This time, it includes a nice UI-option for configuring the autohide-feature.
Take a look at Configure Kopete->Appearance->Contact List.
There is still one problem left, I haven't figured out how to fix, yet.
The new settings aren't applied when the config is saved.
One has to restart Kopete to let the changed settings take effect.
The key "AutoHide" in "General Options" isn't used anymore.
Instead there are two new keys in "ContactList":
- AutoHide: a boolean to switch autohiding on/off
- AutoHideTimeout: an unsigned integer, the timeout in seconds.

I'd be grateful if someone could give me a hint how to apply changes without
needing to
restart Kopete.
Comment 10 Richard Smith 2004-12-02 23:05:59 UTC
On Thursday 02 December 2004 20:54, Christian Nitschkowski wrote:
> There is still one problem left, I haven't figured out how to fix, yet.
> The new settings aren't applied when the config is saved.
> One has to restart Kopete to let the changed settings take effect.
[...]
> I'd be grateful if someone could give me a hint how to apply changes
> without needing to restart Kopete.

Look at libkopete/private/kopeteprefs.{h,cpp}. You'll want to add a few new 
functions to that, following the established pattern.
Comment 11 Christian Nitschkowski 2004-12-03 00:05:05 UTC
Erm...
I already added some functions there.

bool contactListAutoHide() const;
unsigned int contactListAutoHideTimeout() const;
void setContactListAutoHide( bool );
void setContactListAutoHideTimeout( unsigned int );

Did I miss some function?
Could you please take a look at my patch?
Comment 12 Richard Smith 2004-12-03 01:15:03 UTC
On Thursday 02 December 2004 23:05, Christian Nitschkowski wrote:
> Did I miss some function?

You need to connect to KopetePrefs' signal contactListAppearanceChanged().
Comment 13 Christian Nitschkowski 2004-12-04 13:00:17 UTC
Created attachment 8532 [details]
Autohiding complete - really

It is nearly the same patch as I posted on Thursday.
But this time settings are applied immediately.
No need to restart kopete before changes take effect.

I added a new slot KopeteWindow::slotContactListAppearanceChanged() to use the
signal KopetePrefs::contactListAppearanceChanged() as Richard Smith suggested.
Maybe other things can be moved here, too.

I think the patch is now complete.
If there aren't any objections I'd like to commit it to CVS HEAD.
Comment 14 Christian Nitschkowski 2004-12-04 15:16:41 UTC
Created attachment 8534 [details]
This time with WhatsThis-help as requested

As requested the new widgets in the config-dialog now have a WhatsThis-help.
No big difference to the previous version.
Comment 15 Matt Rogers 2004-12-04 16:02:45 UTC
patch looks ok at first glance, but i'll have to apply it and try it here locally before approval.  Also, how does this implementation handle dialogs and stuff like that? For example, if I have a user info dialog or the configure dialog open, is it going to hide on me after the timeout hits?
Comment 16 m.wege 2004-12-04 18:24:51 UTC
Could you add the possibility that hides when no contact is online, instead of after a timeout?
Comment 17 Christian Nitschkowski 2004-12-04 23:58:49 UTC
@Matt Rogers:
As far as I know there is no problem with dialogs.
I tested configure-dialogs, history, and contact-info (not sure if it is called like this in english).
Only one problem occured when I opened the Metacontact-properties dialog.
It works just fine, but while the dialog is open you can't open the contact list when it gets hidden.

@Mark Wege:
What exactly do you mean?
When should the contact list be hidden?
Comment 18 m.wege 2004-12-05 00:12:41 UTC
at: Christian
The contact list should disapear when all my contacts are offline and reapear when a contact becomes online. I don't have so many contacts in my list (8) so it would be quite useful just having the list out of the way when it is not needed, but having it there to know when some of my friends is online. The notification is in this case not enough because I am not sitting all the time at the computer.
Comment 19 Carsten Schlipf 2004-12-05 18:09:39 UTC
However 'Autohide, when nobody is online' should be optional, since this is completely different from 'Autohide, after a timeout of xx seconds'.
Comment 20 Christian Nitschkowski 2004-12-17 21:52:21 UTC
Has someone tested my patch?
I'd like to see this feature in the next release of Kopete, and AFAIK tomorrow is feature-freeze-day.
Comment 21 Matt Rogers 2005-02-01 02:00:14 UTC
CVS commit by mattr: 

Add support for hiding the contact list after a certain time has passed
where there is no activity in the window. Thanks to Christian Nitschkowski
for the patch.

BUG: 73150


  M +40 -14    kopete.kdevelop   1.40
  M +47 -0     kopete/kopetewindow.cpp   1.223
  M +21 -1     kopete/kopetewindow.h   1.78
  M +8 -0      kopete/config/appearance/appearanceconfig.cpp   1.52
  M +102 -1    kopete/config/appearance/appearanceconfig_contactlist.ui   1.11
  M +16 -0     libkopete/private/kopeteprefs.cpp   1.55
  M +6 -0      libkopete/private/kopeteprefs.h   1.33