diff options
-rw-r--r-- | src/menu.c | 17 |
1 files changed, 4 insertions, 13 deletions
@@ -31,6 +31,8 @@ #include "tk.h" #include "util.h" +const int MF_MENU_SIZES_[] = {15, 20, 30}; + struct _mf_menu { long seed; int size; @@ -54,19 +56,8 @@ _mf_menu_size(void *user_data, int state) { struct _mf_menu *menu = (struct _mf_menu *) user_data; - switch (state) { - case 0: - menu->size = 15; - break; - case 1: - menu->size = 20; - break; - case 2: - menu->size = 30; - break; - default: - break; - } + menu->size = MF_MENU_SIZES_[state]; + return 0; } |