| Summary: | Konsole: Add check box to control mouse wheel cycling over tab bar | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Darrell <darrella> |
| Component: | tdebase | Assignee: | Michele Calgaro <michele.calgaro> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | bugwatch, darrella, michele.calgaro, slavek.banko |
| Priority: | P1 | ||
| Version: | R14.0.0 [Trinity] | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | Konsole | |
| Attachments: |
Partial patch to provide GUI control for tab cycling
tdelibs and tdebase tab scroll on mouse whell patch Warnings fixed by the patch |
||
I was looking into bug 909 and 910. Basically the wheel scroll action is built into KDEUI and it is hard coded. relevant files are: tdelibs/tdeui/ktabbar.cpp tdelibs/tdeui/ktabwidget.cpp What is a solution, a global configuration option? or can we intercept/disconnect/handle the signal so it doesn't go to ktabbar? Add a configuration option. Konsole: tab bar context menu, Tab Options, Text "&Cycle Tabs With Mouse Wheel" (Initial caps to be consistent with other menu options.) Created attachment 858 [details]
Partial patch to provide GUI control for tab cycling
This is a partial attempt at providing a GUI control for tab cycling with the mouse wheel. The new check box control is located in Settings -> Configure Konsole -> General and correctly updates/toggles the user's konsolerc file.
The patch does not yet control tab cycling. I do not know how tab cycling is achieved in konsole.
See my comment. that is where the tab cycling actually happens. Those functions in tdelibs would be global. Seems then we should introduce a separate mouse wheel event function to the konsole code (and konqueror --- bug report 910), similar to the patch for task bar cycling (bug report 251). With the GUI controls and respective config file options available, seems we read those config options and then use that to determine whether the new mouse wheel event cycles the tabs. I'm not getting far with how to do this. :( Patch in attachment 858 [details] pushed in GIT commit d9087191. The patch only provides the GUI check box control and does not control tab cycling.
I will look into this bug. Created attachment 1551 [details]
tdelibs and tdebase tab scroll on mouse whell patch
I created a patch for this problem. The tdelibs patch adds the method "setMouseWheelScroll(bool)" to KTabWidget which can be used to enable or disable tab scrolling using the mouse wheel. The tdebase patch adds support for this functionality to Konsole and also fixes several compiling warning messages regarding "suggested additional parenthesis". Cheers Michele I tested the patch. Works fine. The original behavior is cycling is enabled all the time and now the check box disables cycling. Great!
> also fixes several compiling warning messages regarding "suggested additional parenthesis".
Just curious: would your provide some examples? I see no such messages in my build logs.
Slavek, do you want me to push the patch or do you first want to test?
(Odpověď na komentář #10)
> I tested the patch. Works fine. The original behavior is cycling is enabled all
> the time and now the check box disables cycling. Great!
>
> > also fixes several compiling warning messages regarding "suggested additional parenthesis".
>
> Just curious: would your provide some examples? I see no such messages in my
> build logs.
>
> Slavek, do you want me to push the patch or do you first want to test?
I would like to first look at the patch and also to test it.
In any case, it looks like a good work!
Created attachment 1552 [details]
Warnings fixed by the patch
(In reply to comment #10) > I tested the patch. Works fine. The original behavior is cycling is enabled all > the time and now the check box disables cycling. Great! > > > also fixes several compiling warning messages regarding "suggested additional parenthesis". > > Just curious: would your provide some examples? I see no such messages in my > build logs. > > Slavek, do you want me to push the patch or do you first want to test? The file attached above shows the warnings that I get on my computer if I build from the original files Btw the fix for bug 910 is coming soon, I just need some free time to do it and test it properly before submitting. > The file attached above shows the warnings that I get on my computer if I build
> from the original files
I wonder why I don't see the messages?
(In reply to comment #14) > > The file attached above shows the warnings that I get on my computer if I build > > from the original files > I wonder why I don't see the messages? 1) Are you using -Wno-parentheses when you compile? 2) (perhaps silly to say) The warnings comes out on stderr, not on stdout. > 1) Are you using -Wno-parentheses when you compile? Not that I am aware. Should I? If yes, why and how? > 2) (perhaps silly to say) The warnings comes out on stderr, not on stdout. Okay, that's fine, by build logs capture both. :-) > ... by build logs capture both.
That should have been:
my build logs capture both. :-)
(In reply to comment #16) > > 1) Are you using -Wno-parentheses when you compile? > Not that I am aware. Should I? If yes, why and how? > > > 2) (perhaps silly to say) The warnings comes out on stderr, not on stdout. > Okay, that's fine, by build logs capture both. :-) Using -Wno-parentheses would suppress those warnings that were coming out on my computer. This is an example taken from my build logs for tdebase. Try to compare with your logs and see if there is any different flag passed to g++ cd /home/tde_src/2_build/build/tdebase/obj-x86_64-linux-gnu/konsole/konsole && /usr/bin/g++ -DHAVE_CONFIG_H -Dtdeinit_konsole_shared_EXPORTS -DSMB_CTX_FLAG_USE_KERBEROS -DSMB_CTX_FLAG_FALLBACK_AFTER_KERBEROS -g -Wall -D_FORTIFY_SOURCE=2 -fvisibility=hidden -fvisibility-inlines-hidden -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -I/usr/include/tqt3 -I/usr/include/tqt -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -DNDEBUG -fPIC -I/home/tde_src/2_build/build/tdebase/obj-x86_64-linux-gnu/konsole/konsole -I/home/tde_src/2_build/build/tdebase/konsole/konsole -I/home/tde_src/2_build/build/tdebase/obj-x86_64-linux-gnu -I/opt/trinity/include -I/usr/include/tqt3 -I/usr/include/tqt -o CMakeFiles/tdeinit_konsole-shared.dir/konsole.cpp.o -c /home/tde_src/2_build/build/tdebase/konsole/konsole/konsole.cpp I forgot, this is my compiler version g++ (Debian 4.8.1-10) 4.8.1 Oops, my mistake. :-( I do have the messages in my build logs, but I was looking for the wrong text string. In my build logs I see the following: warning: suggest parentheses around '&&' within '||' [-Wparentheses] I see those messages in the following build logs: trinity-amarok trinity-digikam trinity-gwenview trinity-k3b trinity-k9copy trinity-kipi-plugins trinity-python-tqt trinity-tdeaccessibility trinity-tdeaddons trinity-tdeadmin trinity-tdeedu trinity-tdegames trinity-tdemultimedia trinity-tdewebdev trinity-tqt3 Fixing these messages seems clerical in nature. Do you have a good handle on what is neeeded? I can push clerical patches without reviews from the code experts. > Fixing these messages seems clerical in nature. Do you have a good handle on
> what is neeeded? I can push clerical patches without reviews from the code
> experts.
Usually it is something like this:
if (cond_A && cond_B || cond_C && cond_D)
which has to be rewritten as:
if ((cond_A && cond_B) || (cond_C && cond_D))
to avoid the warning message.
Another one is when two if statements are followed by a single else. For example:
if (cond_A)
if(cond_B)
do_something;
else
do_something_else;
which should be rewritten as:
if (cond_A)
{
if(cond_B)
do_something;
else
do_something_else;
}
I split tdebase/konsole patch into two parts. All pushed to GIT in hash 6b1b515 (tdelibs), 6ad5175 (tdebase) and 2a5554c (tdebase). |
Currently there is no option to control mouse wheel cycling when the mouse pointer hovers over the tab bar. Although useful for many people, the cycling feature is frustrating for others. In bug report 251 a patch was submitted to add a check box control for task bar application cycling. That patch can be used as a template to add the same control option. ("Cycle through tabs with mouse wheel")