Bug 143233 - Hide JavaScript Console menu item should not have check mark
Summary: Hide JavaScript Console menu item should not have check mark
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-19 21:04 UTC by Andrew Walker
Modified: 2007-03-31 00:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed patch (2.71 KB, patch)
2007-03-22 18:14 UTC, Andrew Walker
Details
Keep checkmark, don't change label (1022 bytes, patch)
2007-03-29 18:51 UTC, Netterfield
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Walker 2007-03-19 21:04:23 UTC
Version:           HEAD (using KDE KDE 3.5.1)
OS:                Linux

PROBLEM:

To be more consistent with Hide/Show Toolbar/Statusbar menu items the Hide JavaSscript Console should not have a check mark associated with it.

STEPS TO REPRODUCE:

Start Kst
Enable the JavaScript extension if necessary
Select Tools... Show JavaScript Console
Select Tools... menu

RESULT:

The menu item for Hide JavaScript Console has an associated checkmark

EXPECTED RESULTS:

The menu item for Hide JavaScript Console should have no associated checkmark
Comment 1 Andrew Walker 2007-03-22 18:14:59 UTC
Created attachment 20072 [details]
Proposed patch

Use KAction instead of KToggleAction
Comment 2 George Staikos 2007-03-22 18:33:48 UTC
I think the problem here is just a missing connection.  Your patch  
implements KToggleAction without using KToggleAction.

--
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/
Comment 3 Andrew Walker 2007-03-22 18:37:50 UTC
As I understand it a KToggleAction is checkbox-like. However, this is now what we want as the menu item should never be checked.

Hence, we need to keep track of the state ourselves instead of passing it off to KToggleAction.

That said, if you can supply the missing connection that fixes this bug it would be more elegant.
Comment 4 Netterfield 2007-03-29 18:51:11 UTC
Created attachment 20122 [details]
Keep checkmark, don't change label

How about we keep the architecture as it is, but chose to not change the
label.... Is this clear/standard in KDE?
Comment 5 Andrew Walker 2007-03-29 18:54:12 UTC
I think we already had this discussion in the past. 
What we currently have is standard - we just need to lose the checkmark.
Comment 6 George Staikos 2007-03-29 19:06:04 UTC
The checkmark/toggle action is definitely the standard KDE approach.   
I suspect this patch doesn't solve the synchronization problem  
though.  I think there's a missing signal connection somewhere.

--
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/
Comment 7 Andrew Walker 2007-03-29 19:22:24 UTC
The Hide/Show approach is used by KolourPaint, KIconEdit, KSig, KBabel, etc.
Comment 8 Netterfield 2007-03-29 19:31:56 UTC
What sync problem?  I thought that the bug was either  just the wording of the 
menu item, or the existence of a checkmark (depending on how you looked at 
it).

On Thursday 29 March 2007 1:06:05 pm George Staikos wrote:
[bugs.kde.org quoted mail]
Comment 9 Netterfield 2007-03-29 19:49:29 UTC
The checkmark approach seems to be used by Konqueror and Kmail/Kontact.
Assertion: Konq should be considered the standard for all things KDE.

so...
Lets go with Konq/Kmail and use the Check/No Check approach.  

cbn

On Thursday 29 March 2007 1:22:25 pm Andrew Walker wrote:
[bugs.kde.org quoted mail]
Comment 10 George Staikos 2007-03-29 20:09:42 UTC
On 29-Mar-07, at 1:49 PM, Barth Netterfield wrote:

> The checkmark approach seems to be used by Konqueror and Kmail/ 
> Kontact.
> Assertion: Konq should be considered the standard for all things KDE.
>
> so...
> Lets go with Konq/Kmail and use the Check/No Check approach.


   Agreed - those are the only things I even checked against too.   
Simply because some apps do some things doesn't mean it's the right  
approach.

--
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/
Comment 11 George Staikos 2007-03-29 20:12:41 UTC
> What sync problem?  I thought that the bug was either  just the  
> wording of the
> menu item, or the existence of a checkmark (depending on how you  
> looked at
> it).


    Oh, I thought it was sometimes not synchronizing its state with  
the state of the console itself.  Andrew?

--
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/
Comment 12 Andrew Walker 2007-03-29 20:14:31 UTC
I agree with Barth. There is no sync problem.
Comment 13 Andrew Walker 2007-03-29 20:50:45 UTC
This makes the JavaScript Console checkmark approach inconsistent with Kst's own Show/Hide Statusbar and Toolbar.

If we're okay with that then Barth's patch looks good, but I would delete the obsolete lines rather than comment them out.
Comment 14 Netterfield 2007-03-31 00:37:43 UTC
SVN commit 648294 by netterfield:

BUG: 143233

Make consistent w/ konqueror/kmail and with tools menue.



 M  +0 -3      js.cpp  


--- trunk/extragear/graphics/kst/src/extensions/js/js.cpp #648293:648294
@@ -232,7 +232,6 @@
 
 void KstJS::showConsole() {
 #ifdef KST_HAVE_READLINE
-  _showAction->setText(i18n("Hide &JavaScript Console"));
   if (!_konsolePart) {
     strcpy(shellStr, "SHELL=kstcmd");
     putenv(shellStr);
@@ -266,7 +265,6 @@
 void KstJS::shellExited() {
 #ifdef KST_HAVE_READLINE
   _showAction->setChecked(false);
-  _showAction->setText(i18n("Show &JavaScript Console"));
   _konsolePart = 0L;
   QTimer::singleShot(0, this, SLOT(restoreUI())); // konsole crashes otherwise
 #endif
@@ -285,7 +283,6 @@
 
 void KstJS::hideConsole() {
 #ifdef KST_HAVE_READLINE
-  _showAction->setText(i18n("Show &JavaScript Console"));
   if (_konsolePart) {
     _konsolePart->widget()->hide();
   }