[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-19 Thread noreply
The proposal to merge 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands 
has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-19 Thread GunChleoc
The proposal to merge 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands 
has been updated.

Commit Message changed to:

Change the hotkeys used in message box to filter messages from [1..5] to Alt + 
[1...5]. Squash multiple triggering of Alt keys cause by interference with 
Linux window managers.

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-19 Thread GunChleoc
The proposal to merge 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands 
has been updated.

Commit Message changed to:

Change the hotkeys used in message box to filter messages from [1..5] to Alt + 
[1...5]. Squash multiple triggering of ALt keys cause by interference with 
Linux window managers.

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-19 Thread GunChleoc
Reordering the events is no problem there because of how often the function is 
called. So, I decided to go for efficiency and less code ;)

So, all bugs closed ow for Build 19! *happy dance*

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-18 Thread SirVer
Review: Approve

one comment inline, but I think this can go in the way it is.

Diff comments:

> 
> === modified file 'src/wlapplication.cc'
> --- src/wlapplication.cc  2016-08-13 12:16:14 +
> +++ src/wlapplication.cc  2016-09-16 16:56:31 +
> @@ -575,6 +588,20 @@
>   default:;
>   }
>   }
> +
> + // Now constructing the events for the Alt key from the container and 
> handling them.

technically, this reoders the events. But lets go with this as long as it does 
not make any troubles.

> + for (const auto& event : alt_events) {
> + ev.type = event.second;
> + ev.key.keysym.sym = event.first.first;
> + ev.key.keysym.mod = event.first.second;
> + bool handled = false;
> + if (cb && cb->key) {
> + handled = cb->key(ev.type == SDL_KEYDOWN, 
> ev.key.keysym);
> + }
> + if (!handled) {
> + handle_key(ev.type == SDL_KEYDOWN, ev.key.keysym.sym, 
> ev.key.keysym.mod);
> + }
> + }
>  }
>  
>  /*


-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-16 Thread GunChleoc
Review: Resubmit

Yep, fixing this in WLApplication is much cleaner.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-15 Thread SirVer
Review: Needs Fixing



Diff comments:

> 
> === modified file 'src/wui/game_message_menu.cc'
> --- src/wui/game_message_menu.cc  2016-08-04 15:49:05 +
> +++ src/wui/game_message_menu.cc  2016-09-14 07:40:02 +
> @@ -357,23 +358,66 @@
>   center_view();
>   return true;
>   case SDLK_0:
> - filter_messages(Widelands::Message::Type::kAllMessages);
> - return true;
> + if (code.mod & KMOD_ALT) {
> + 
> filter_messages(Widelands::Message::Type::kAllMessages);
> + last_keyboard_action_ = 0;
> + return true;
> + }
> + return false;
>   case SDLK_1:
> - filter_messages(Widelands::Message::Type::kGeologists);
> - return true;
> + if (code.mod & KMOD_ALT) {

Actually doing this in the input loop would be less lines of codes and probably 
saver. I vote for that for b19.

> + // Workaround for duplicate triggering of the 
> Alt key in Ubuntu:
> + // Don't accept the same key twice for the same 
> gametime.
> + // TODO(GunChleoc): This means that when the 
> game is paused,
> + // the button won't toggle on and off by 
> pressing ALT + 1 repeatedly.
> + const uint32_t gametime = 
> iplayer().game().get_gametime();
> + if (last_keyboard_action_ != gametime) {
> + 
> filter_messages(Widelands::Message::Type::kGeologists);
> + last_keyboard_action_ = gametime;
> + return true;
> + }
> + }
> + return false;
>   case SDLK_2:
> - filter_messages(Widelands::Message::Type::kEconomy);
> - return true;
> + if (code.mod & KMOD_ALT) {
> + const uint32_t gametime = 
> iplayer().game().get_gametime();
> + if (last_keyboard_action_ != gametime) {
> + 
> filter_messages(Widelands::Message::Type::kEconomy);
> + last_keyboard_action_ = gametime;
> + return true;
> + }
> + }
> + return false;
>   case SDLK_3:
> - filter_messages(Widelands::Message::Type::kSeafaring);
> - return true;
> + if (code.mod & KMOD_ALT) {
> + const uint32_t gametime = 
> iplayer().game().get_gametime();
> + if (last_keyboard_action_ != gametime) {
> + 
> filter_messages(Widelands::Message::Type::kSeafaring);
> + last_keyboard_action_ = gametime;
> + return true;
> + }
> + }
> + return false;
>   case SDLK_4:
> - filter_messages(Widelands::Message::Type::kWarfare);
> - return true;
> + if (code.mod & KMOD_ALT) {
> + const uint32_t gametime = 
> iplayer().game().get_gametime();
> + if (last_keyboard_action_ != gametime) {
> + 
> filter_messages(Widelands::Message::Type::kWarfare);
> + last_keyboard_action_ = gametime;
> + return true;
> + }
> + }
> + return false;
>   case SDLK_5:
> - filter_messages(Widelands::Message::Type::kScenario);
> - return true;
> + if (code.mod & KMOD_ALT) {
> + const uint32_t gametime = 
> iplayer().game().get_gametime();
> + if (last_keyboard_action_ != gametime) {
> + 
> filter_messages(Widelands::Message::Type::kScenario);
> + last_keyboard_action_ = gametime;
> + return true;
> + }
> + }
> + return false;
>   case SDLK_DELETE:
>   archive_or_restore();
>   return true;


-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-14 Thread bunnybot
Continuous integration builds have changed state:

Travis build 1318. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/159808318.
Appveyor build 1160. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1616661_messagebox_hotkeys-1160.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-14 Thread GunChleoc
Review: Resubmit

Hmmm, people usually associate F1 with help, F5 with refresh etc... also, 0 has 
some nice semantics that we can't have with the function keys.

I have found a workaround that will work for everything except toggling a 
button on and off with the same key while the game is paused. What do you think?

We could also try to attack the problem at the poll event stage, but I'd rather 
do that when we're not in feature freeze.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-13 Thread SirVer
I remember that we had issues with Windowmanagers and alt before - some use 
this key also to make the window draggable as a whole. Maybe we should stick to 
ctrl shortcuts then. Or how about using the F1-F5 keys?
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-13 Thread GunChleoc
These are the events I get for key down:

Ctrl alone:
===
sym = 1073742048, mod = 0


Alt alone:
==
sym = 1073742050, mod = 0
sym = 1073742050, mod = 256 (LALT)


Ctrl-1:
===
sym = 1073742048, mod = 0
sym = 49, mod = 64 (LCTRL)
pressed 1


Alt-1:
==
sym = 1073742050, mod = 0
sym = 1073742050, mod = 256 (LALT)
sym = 49, mod = 256 (LALT)
pressed 1

sym = 1073742050, mod = 256 (LALT)
sym = 49, mod = 256 (LALT)
pressed 1


My best guess is that the window manager is interfering and messing things up. 
The only other place where we use the Alt key is in the tool selection in the 
editor, where it doesn't matter if the key is triggered multiple times.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-12 Thread SirVer
I would print out all the key events that end up in this function and try to 
understand why with alt 2 messages are sent.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-12 Thread GunChleoc
I have found out what happens:

if (code.mod & KMOD_CTRL) { triggers once, toggling the button off or on.

if (code.mod & KMOD_ALT) { triggers twice, toggling the button off and on.

The next question to solve is why / how to circumvent the bug.

The intention is that the user can hit the same key twice in order to toggle 
the button on and off, rather than having to use ALT + 0 to toggle off, so I'd 
rather not reprogram the filter_messages function.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-11 Thread SirVer
Maybe linux uses different key modifiers for the keys? Maybe there is a type 
issue somewhere? Does 
if ((code.mod & KMOD_LALT) || (code.mod & KMOD_RALT)) work? 
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-11 Thread bunnybot
Continuous integration builds have changed state:

Travis build 1315. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/159135849.
Appveyor build 1157. State: failed. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1616661_messagebox_hotkeys-1157.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-11 Thread GunChleoc
If I use

if (code.mod & (KMOD_LCTRL | KMOD_RCTRL)) {

it works with the control keys, If I use

if (code.mod & (KMOD_LALT | KMOD_RALT)) {

It does not work with the Alt keys. Same code, different key *headdesk*
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-11 Thread SirVer
Works on Mac! there is a NOCOM in the code still. 
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-10 Thread kaputtnik
Until -> As from tomorrow :-S
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-10 Thread kaputtnik
> The message button access doesn't work on Ubuntu.

Pressing "n"? Clicking the "Message" button? Those work here on arch-linux.

Until tomorrow i am away for 14 days so if something goes wrong with this 
branch feel free to change it.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-10 Thread bunnybot
Continuous integration builds have changed state:

Travis build 1311. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/158847433.
Appveyor build 1153. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1616661_messagebox_hotkeys-1153.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-10 Thread GunChleoc
Review: Needs Fixing

The message button access doesn't work on Ubuntu.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-10 Thread bunnybot
Bunnybot encountered an error while working on this merge proposal:

Running 'bzr pull --overwrite' failed. Output:

ssh_exchange_identification: Connection closed by remote host
ConnectionReset reading response for 'BzrDir.open_2.1', retrying
ssh_exchange_identification: Connection closed by remote host
bzr: ERROR: Connection closed: Unexpected end of message. Please check 
connectivity and permissions, and report a bug if problems persist. 
Using saved parent location: 
bzr+ssh://bazaar.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/

-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-10 Thread bunnybot
Bunnybot encountered an error while working on this merge proposal:

Running 'bzr pull --overwrite' failed. Output:

ssh_exchange_identification: Connection closed by remote host
ConnectionReset reading response for 'BzrDir.open_2.1', retrying
ssh_exchange_identification: Connection closed by remote host
bzr: ERROR: Connection closed: Unexpected end of message. Please check 
connectivity and permissions, and report a bug if problems persist. 
Using saved parent location: 
bzr+ssh://bazaar.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/

-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-09 Thread Klaus Halfmann
Please wait until this could be tested on OSX. 
No idea how the Mapping of the Alt key workds with SDL on OSX yet.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-09 Thread bunnybot
Continuous integration builds have changed state:

Travis build 1311. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/158847433.
Appveyor build 1153. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1616661_messagebox_hotkeys-1153.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-09 Thread kaputtnik
kaputtnik has proposed merging 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands.

Commit message:
Change the hotkeys used in message box to filter messages from [1..5] to Alt + 
[1...5]

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1616661 in widelands: "Hotkeys of messagebox are in conflict with saved 
position"
  https://bugs.launchpad.net/widelands/+bug/1616661

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381

Fixes conflict with hotkeys of saved positions of map.

Change the hotkeys used in message box to filter messages from [1..5] to Alt + 
[1...5]. The Tooltips and the help texts are also changed accordingly.

There is a NOCOMM left. I didn't found any tooltip which correspond to this 
code. So maybe it could be removed.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands.
=== modified file 'data/tribes/scripting/help/controls.lua'
--- data/tribes/scripting/help/controls.lua	2016-05-17 16:40:22 +
+++ data/tribes/scripting/help/controls.lua	2016-09-09 20:10:42 +
@@ -73,17 +73,17 @@
  h3(_"In the message window, the following additional shortcuts are available:") ..
  p(
-- TRANSLATORS: This is the helptext for an access key combination.
-   dl(help_format_hotkey("0"), _"Show all messages") ..
-   -- TRANSLATORS: This is the helptext for an access key combination.
-   dl(help_format_hotkey("1"), _"Show geologists’ messages only") ..
-   -- TRANSLATORS: This is the helptext for an access key combination.
-   dl(help_format_hotkey("2"), _"Show economy messages only") ..
-   -- TRANSLATORS: This is the helptext for an access key combination.
-   dl(help_format_hotkey("3"), _"Show seafaring messages only") ..
-   -- TRANSLATORS: This is the helptext for an access key combination.
-   dl(help_format_hotkey("4"), _"Show warfare messages only") ..
-   -- TRANSLATORS: This is the helptext for an access key combination.
-   dl(help_format_hotkey("5"), _"Show scenario messages only") ..
+   dl(help_format_hotkey("Alt + 0"), _"Show all messages") ..
+   -- TRANSLATORS: This is the helptext for an access key combination.
+   dl(help_format_hotkey("Alt + 1"), _"Show geologists’ messages only") ..
+   -- TRANSLATORS: This is the helptext for an access key combination.
+   dl(help_format_hotkey("Alt + 2"), _"Show economy messages only") ..
+   -- TRANSLATORS: This is the helptext for an access key combination.
+   dl(help_format_hotkey("Alt + 3"), _"Show seafaring messages only") ..
+   -- TRANSLATORS: This is the helptext for an access key combination.
+   dl(help_format_hotkey("Alt + 4"), _"Show warfare messages only") ..
+   -- TRANSLATORS: This is the helptext for an access key combination.
+   dl(help_format_hotkey("Alt + 5"), _"Show scenario messages only") ..
-- TRANSLATORS: This is the helptext for an access key combination.
dl(help_format_hotkey("G"), _"Jump to the location corresponding to the current message") ..
-- TRANSLATORS: This is an access key combination. Localize, but do not change the key.

=== modified file 'src/wui/game_message_menu.cc'
--- src/wui/game_message_menu.cc	2016-08-04 15:49:05 +
+++ src/wui/game_message_menu.cc	2016-09-09 20:10:42 +
@@ -349,6 +349,7 @@
  * Handle message menu hotkeys.
  */
 bool GameMessageMenu::handle_key(bool down, SDL_Keysym code) {
+
 	if (down) {
 		switch (code.sym) {
 		// Don't forget to change the tooltips if any of these get reassigned
@@ -357,23 +358,41 @@
 center_view();
 			return true;
 		case SDLK_0:
-			filter_messages(Widelands::Message::Type::kAllMessages);
-			return true;
+			if (code.mod & KMOD_LALT) {
+filter_messages(Widelands::Message::Type::kAllMessages);
+return true;
+			}
+			return false;
 		case SDLK_1:
-			filter_messages(Widelands::Message::Type::kGeologists);
-			return true;
+			if (code.mod & KMOD_LALT) {
+filter_messages(Widelands::Message::Type::kGeologists);
+return true;
+			}
+			return false;
 		case SDLK_2:
-			filter_messages(Widelands::Message::Type::kEconomy);
-			return true;
+			if (code.mod & KMOD_LALT) {
+filter_messages(Widelands::Message::Type::kEconomy);
+return true;
+			}
+			return false;
 		case SDLK_3:
-			filter_messages(Widelands::Message::Type::kSeafaring);
-			return true;
+			if (code.mod & KMOD_LALT) {
+filter_messages(Widelands::Message::Type::kSeafaring);
+return true;
+			}
+			return false;
 		case SDLK_4:
-			filter_messages(Widelands::Message::Type::kWarfare);
-			return t

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands

2016-09-09 Thread kaputtnik
The proposal to merge 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands 
has been updated.

Commit Message changed to:

Change the hotkeys used in message box to filter messages from [1..5] to Alt + 
[1...5]

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1616661_messagebox_hotkeys/+merge/305381
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1616661_messagebox_hotkeys into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp