Ticket #3587: 3587-listing-mode-dialog-remove-old-code.patch
File 3587-listing-mode-dialog-remove-old-code.patch, 3.6 KB (added by mooffie, 9 years ago) |
---|
-
src/filemanager/boxes.c
From ee570d374618dabd9cd30018099254e7b1be9e3b Mon Sep 17 00:00:00 2001 From: Mooffie <mooffie@gmail.com> Date: Sun, 24 Jan 2016 15:32:33 +0200 Subject: [PATCH] "Listing mode" dialog: remove old code. --- src/filemanager/boxes.c | 62 ------------------------------------------------- 1 file changed, 62 deletions(-) diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c index 85cb18d..e823f50 100644
a b static const int panel_listing_brief_idx = 1; 102 102 static const int panel_listing_user_idx = 3; 103 103 104 104 static char **status_format; 105 static int listing_user_hotkey = 'u';106 105 static unsigned long panel_listing_types_id, panel_user_format_id, panel_brief_cols_id; 107 106 static unsigned long mini_user_status_id, mini_user_format_id; 108 107 … … panel_listing_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, 253 252 254 253 switch (msg) 255 254 { 256 case MSG_KEY:257 if (parm == '\n')258 {259 Widget *wi;260 261 wi = dlg_find_by_id (h, panel_listing_types_id);262 if (widget_is_active (wi))263 {264 WInput *in;265 266 in = INPUT (dlg_find_by_id (h, mini_user_format_id));267 input_assign_text (in, status_format[RADIO (wi)->sel]);268 dlg_stop (h);269 return MSG_HANDLED;270 }271 272 wi = dlg_find_by_id (h, panel_user_format_id);273 if (widget_is_active (wi))274 {275 h->ret_value = B_USER + 6;276 dlg_stop (h);277 return MSG_HANDLED;278 }279 280 wi = dlg_find_by_id (h, mini_user_format_id);281 if (widget_is_active (wi))282 {283 h->ret_value = B_USER + 7;284 dlg_stop (h);285 return MSG_HANDLED;286 }287 }288 289 if (g_ascii_tolower (parm) == listing_user_hotkey)290 {291 Widget *wi;292 293 wi = dlg_find_by_id (h, panel_user_format_id);294 if (widget_is_active (wi))295 {296 wi = dlg_find_by_id (h, mini_user_format_id);297 if (widget_is_active (wi))298 {299 WRadio *r;300 301 r = RADIO (dlg_find_by_id (h, panel_listing_types_id));302 r->pos = r->sel = panel_listing_user_idx;303 dlg_select_widget (WIDGET (r)); /* force redraw */304 send_message (h, r, MSG_ACTION, 0, NULL);305 return MSG_HANDLED;306 }307 }308 }309 return MSG_NOT_HANDLED;310 311 255 case MSG_ACTION: 312 256 if (sender != NULL && sender->id == panel_listing_types_id) 313 257 { … … panel_listing_box (WPanel * panel, int num, char **userp, char **minip, int *use 773 717 char *panel_brief_cols_out = NULL; 774 718 char *panel_user_format = NULL; 775 719 char *mini_user_format = NULL; 776 const char *cp;777 720 778 721 /* Controls whether the array strings have been translated */ 779 722 const char *list_types[LIST_TYPES] = { … … panel_listing_box (WPanel * panel, int num, char **userp, char **minip, int *use 810 753 quick_widgets, panel_listing_callback, NULL 811 754 }; 812 755 813 /* get hotkey of user-defined format string */814 cp = strchr (_(list_types[panel_listing_user_idx]), '&');815 if (cp != NULL && *++cp != '\0')816 listing_user_hotkey = g_ascii_tolower (*cp);817 818 756 mini_user_status = panel->user_mini_status; 819 757 result = panel->list_type; 820 758 status_format = panel->user_status_format;