Bug 82575

Summary: JJ: Make 'Help' and 'Default' buttons in configure dialogs functional.
Product: [Unmaintained] kopete Reporter: Will Stephenson <wstephenson>
Component: Main ApplicationAssignee: Kopete Developers <kopete-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist Keywords: junior-jobs
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: A patch to resolve the issue outlined in comment #1.
behavior and appearance tab defaults

Description Will Stephenson 2004-05-31 13:43:10 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

Kopete's Configure and Configure Plugins dialogs have 'Help' and 'Defaults' buttons that are supposed to show the manual at the relevant section and reset the dialog settings to their defaults, respectively.  Implementing these would be a good Junior Job for someone wanting to get into Kopete development.

Notes on doing this JJ to follow...
Comment 1 Will Stephenson 2004-05-31 14:17:14 UTC
Help:
The settings dialog that we use (KSettings::Dialog from kdelibs/kutils) automatically populates itself by looking for .desktop files specifying configuration dialog components in Kopete's installation.  Each file describes one component, like the Appearance section of the Configure dialog.  One element of these files is a DocPath entry saying where in the documentation hierarchy the information on the component.  Your mission, if you choose to accept it, is to find the relevant desktop files, and set useful DocPath entries.  The entries are relative to the help:/ protocol, so, for example, the Kopete docu starts at help:/kopete/index.html (type it into Konqueror).  See the kopete/kopete.desktop file for an example.  You can use named anchors to go to a particular section of the manual.

If you need additional help with this job, come back to me.
Comment 2 Will Stephenson 2004-05-31 19:08:05 UTC
Defaults:
This task is more challenging than the Help task.
This only applies to the Appearance and Behaviour faces of the Configure Kopete dialog.  When Defaults is clicked, the Settings dialog calls a virtual method, KCModule::defaults().  In our KCModule subclasses, AppearanceConfig and BehaviourConfig, this method is not overridden, so clicking Defaults does nothing.  Your task will be to provide a useful implementation of defaults().

A 'useful implementation' of defaults will be to reset each widget back to the value it would have in a new Kopete install.  You will be able to get most of these by looking at the default values set by KopetePrefs::load() when loading, if the config doesn't contain any data.

Note that each KCModule is composed of multiple panes.  Your defaults() will only reset the currently visible pane.
Comment 3 Timothy Coltman 2004-06-19 19:05:57 UTC
Created attachment 6412 [details]
A patch to resolve the issue outlined in comment #1.

This patch should enable the user, when clicking on the "Help" buttons in the
Kopete configuration dialog, to see the correct pages in the Kopete manual.
Comment 4 Will Stephenson 2004-06-20 14:50:06 UTC
CVS commit by wstephens: 

Add correct DocPath entries for config components.  Patch by Timothy Coltman (timothy_coltman@yahoo.com) gratefully received.  Tim, can we tempt you to try the second part of this JJ too?
CCMAIL: 82575@bugs.kde.org


  M +1 -0      accounts/kopete_accountconfig.desktop   1.54
  M +1 -0      appearance/kopete_appearanceconfig.desktop   1.43
  M +1 -0      behavior/kopete_behaviorconfig.desktop   1.39


--- kdenetwork/kopete/kopete/config/accounts/kopete_accountconfig.desktop  #1.53:1.54
@@ -85,4 +85,5 @@
 Comment[xx]=xxHere You Can Manage All Your Accountsxx
 Comment[zh_CN]=您可在此管理您全部的账户
+DocPath=kopete/configure-dialog.html#configuring-accounts
 
 

--- kdenetwork/kopete/kopete/config/appearance/kopete_appearanceconfig.desktop  #1.42:1.43
@@ -85,4 +85,5 @@
 Comment[xx]=xxHere You Can Alter Kopete's Look And Feelxx
 Comment[zh_CN]=您可在此更改 Kopete 的观感
+DocPath=kopete/configure-dialog.html#configuring-appearance
 
 

--- kdenetwork/kopete/kopete/config/behavior/kopete_behaviorconfig.desktop  #1.38:1.39
@@ -87,4 +87,5 @@
 Comment[xx]=xxHere You Can Personalize Kopetexx
 Comment[zh_CN]=您可在此个性化 Kopete
+DocPath=kopete/configure-dialog.html#configuring-behavior
 
 


Comment 5 Timothy Coltman 2004-06-20 16:32:20 UTC
Will wrote: "Tim, can we tempt you to try the second part of this JJ too?"

Consider me tempted, but a question:

When you talk about "multiple panes" for each KCModule, do you mean the tabs in the configuration dialog?

For example with the "Behavior" configuration, say I click on "Defaults" when the "Away Settings" tab is the current one? Should it only apply the default to the "Away Settings" tab or should it apply defaults to the "General" and "Chat" tabs as well? Currently I've got it applying to all three tabs, but I'm not sure whether that's correct.
Comment 6 Will Stephenson 2004-06-20 21:13:11 UTC
On Sunday 20 June 2004 15:32, Timothy Coltman wrote:
> When you talk about "multiple panes" for each KCModule, do you mean the
> tabs in the configuration dialog?

Yes, I meant the tabs. 

> For example with the "Behavior" configuration, say I click on "Defaults"
> when the "Away Settings" tab is the current one? Should it only apply the
> default to the "Away Settings" tab or should it apply defaults to the
> "General" and "Chat" tabs as well? Currently I've got it applying to all
> three tabs, but I'm not sure whether that's correct.

I can't find a reference either way.  Personally I would just default the 
current pane, but a quick fiddle with KControl shows that the modules I 
looked at set all tabs together to defaults.  Maybe what the correct approach 
is on kde-devel ?

Comment 7 Siim Keinaste 2006-03-15 00:10:49 UTC
Created attachment 15127 [details]
behavior and appearance tab defaults
Comment 8 Siim Keinaste 2006-03-15 00:13:04 UTC
Comment on attachment 15127 [details]
behavior and appearance tab defaults

Comments?
Comment 9 Nicolas L. 2007-07-18 23:37:28 UTC
can someone review  this patch ?
Comment 10 Matthew Dawson 2008-11-02 07:01:53 UTC
Taking a quick look at kopete in trunk, it appears that the Default and Help buttons now work.  As such, this bug should be now be closed.
Comment 11 Matt Rogers 2008-11-02 17:46:09 UTC
Reported as fixed.