home · contact · privacy
Corrected lack of some specific error messages.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 25 Aug 2013 02:16:27 +0000 (04:16 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 25 Aug 2013 02:16:27 +0000 (04:16 +0200)
src/draw_wins.c
src/misc.c

index 02b569cf1457eba6b78ad140b0ddc548b1455dd9..ad5ad123cd08d78ec2905a5784b329e4ac9693d0 100644 (file)
@@ -223,13 +223,14 @@ extern void draw_keys_win(struct Win * win)
                            win->frame.size.y - 1);
     uint8_t keydescwidth = 9 + 1; /* max length assured by get_keyname() + \0 */
     char * keydesc = malloc(keydescwidth), * keyname;
+    char * err_hint = "Trouble drawing scroll hint in Keybindings Window.";
     attr_t attri;
     for (y = 0; y <= world->keyswindata->max && y < win->frame.size.y; y++)
     {
         if (0 == y && offset > 0)
         {
             exit_err(draw_scroll_hint(&win->frame, y, offset + 1, '^'),
-                     world, NULL);
+                     world, err_hint);
             continue;
         }
         else if (win->frame.size.y == y + 1
@@ -239,7 +240,7 @@ extern void draw_keys_win(struct Win * win)
             exit_err(draw_scroll_hint(&win->frame, y,
                                       world->keyswindata->max
                                        - (offset + win->frame.size.y) + 2, 'v'),
-                     world, NULL);
+                     world, err_hint);
             continue;
         }
         attri = 0;
index 72568858451877a65b5cd51dcf61b5074c5d268d..875e11919802986054ef9eeca71ede9646f8e07c 100644 (file)
@@ -259,6 +259,9 @@ extern uint8_t meta_keys(int key, struct World * world,
                          struct Win * win_map, struct Win * win_info,
                          struct Win * win_log)
 {
+    char * err_toggle = "Trouble toggling window.";
+    char * err_shift  = "Trouble shifting window.";
+    char * err_resize = "Trouble resizing window.";
     if (key == get_action_key(world->keybindings, "quit"))
     {
         return 1;
@@ -273,19 +276,19 @@ extern uint8_t meta_keys(int key, struct World * world,
     }
     else if (key == get_action_key(world->keybindings, "toggle keys window"))
     {
-        exit_err(toggle_window(win_meta, win_keys), world, NULL);
+        exit_err(toggle_window(win_meta, win_keys), world, err_toggle);
     }
     else if (key == get_action_key(world->keybindings, "toggle map window"))
     {
-        exit_err(toggle_window(win_meta, win_map), world, NULL);
+        exit_err(toggle_window(win_meta, win_map), world, err_toggle);
     }
     else if (key == get_action_key(world->keybindings, "toggle info window"))
     {
-        exit_err(toggle_window(win_meta, win_info), world, NULL);
+        exit_err(toggle_window(win_meta, win_info), world, err_toggle);
     }
     else if (key == get_action_key(world->keybindings, "toggle log window"))
     {
-        exit_err(toggle_window(win_meta, win_log), world, NULL);
+        exit_err(toggle_window(win_meta, win_log), world, err_toggle);
     }
     else if (key == get_action_key(world->keybindings, "cycle forwards"))
     {
@@ -297,27 +300,27 @@ extern uint8_t meta_keys(int key, struct World * world,
     }
     else if (key == get_action_key(world->keybindings, "shift forwards"))
     {
-        exit_err(shift_active_win(win_meta, 'f'), world, NULL);
+        exit_err(shift_active_win(win_meta, 'f'), world, err_shift);
     }
     else if (key == get_action_key(world->keybindings, "shift backwards"))
     {
-        exit_err(shift_active_win(win_meta, 'b'), world, NULL);
+        exit_err(shift_active_win(win_meta, 'b'), world, err_shift);
     }
     else if (key == get_action_key(world->keybindings, "grow horizontally"))
     {
-        exit_err(growshrink_active_window(win_meta, '*'), world, NULL);
+        exit_err(growshrink_active_window(win_meta, '*'), world, err_resize);
     }
     else if (key == get_action_key(world->keybindings, "shrink horizontally"))
     {
-        exit_err(growshrink_active_window(win_meta, '_'), world, NULL);
+        exit_err(growshrink_active_window(win_meta, '_'), world, err_resize);
     }
     else if (key == get_action_key(world->keybindings, "grow vertically"))
     {
-        exit_err(growshrink_active_window(win_meta, '+'), world, NULL);
+        exit_err(growshrink_active_window(win_meta, '+'), world, err_resize);
     }
     else if (key == get_action_key(world->keybindings, "shrink vertically"))
     {
-        exit_err(growshrink_active_window(win_meta, '-'), world, NULL);
+        exit_err(growshrink_active_window(win_meta, '-'), world, err_resize);
     }
     else if (key == get_action_key(world->keybindings, "save keys"))
     {