From: Christian Heller Date: Fri, 17 May 2013 00:59:04 +0000 (+0200) Subject: Renamed shift_window() to shift_active_window() for more precise description and... X-Git-Tag: tce~1285 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/static/index.html?a=commitdiff_plain;h=891ff33aec8906fe8203910a26c56650ce74b904;p=plomrogue Renamed shift_window() to shift_active_window() for more precise description and consistency with names of comparable functions. --- diff --git a/roguelike.c b/roguelike.c index bc971d4..89b6462 100644 --- a/roguelike.c +++ b/roguelike.c @@ -507,9 +507,9 @@ int main () { else if (key == get_action_key(world.keybindings, "cycle backwards")) cycle_active_window(&win_meta, 'p'); else if (key == get_action_key(world.keybindings, "shift forwards")) - shift_window(&win_meta, 'f'); + shift_active_window(&win_meta, 'f'); else if (key == get_action_key(world.keybindings, "shift backwards")) - shift_window(&win_meta, 'b'); + shift_active_window(&win_meta, 'b'); else if (key == get_action_key(world.keybindings, "grow horizontally")) growshrink_active_window(&win_meta, '*'); else if (key == get_action_key(world.keybindings, "shrink horizontally")) diff --git a/windows.c b/windows.c index ff0adb2..ba6401b 100644 --- a/windows.c +++ b/windows.c @@ -213,7 +213,7 @@ void cycle_active_window (struct WinMeta * win_meta, char dir) { else win_meta->active = win_meta->chain_end; } } } -void shift_window (struct WinMeta * win_meta, char dir) { +void shift_active_window (struct WinMeta * win_meta, char dir) { // Move active window forward/backward in window chain. If jumping beyond start/end, move to other chain end. if (0 != win_meta->active && win_meta->chain_start != win_meta->chain_end && (dir == 'f' || dir == 'b')) { int i, i_max; diff --git a/windows.h b/windows.h index c802e05..8f06ffc 100644 --- a/windows.h +++ b/windows.h @@ -42,4 +42,4 @@ void draw_window_borders (struct Win *, char); void draw_all_windows (struct WinMeta *); void resize_active_window (struct WinMeta *, int, int); void cycle_active_window (struct WinMeta *, char); -void shift_window (struct WinMeta *, char); +void shift_active_window (struct WinMeta *, char);