Example #1
0
 private string show_full_log_type_to_str(show_full_log_type type)
 {
     switch (type) {
     case show_full_log_type.both:
         return "-L";
     case show_full_log_type.just_view:
         return "+L";
     case show_full_log_type.just_full_log:
         return "L";
     default:
         Debug.Assert(false);
         return "-L";
     }
 }
Example #2
0
        private void show_full_log(show_full_log_type show) {
            Control to_focus = null;
            switch (show) {
            case show_full_log_type.both:
                show_filteredleft_pane1(true);
                show_filteredleft_pane2(true);
                global_ui.show_fulllog = true;
                global_ui.show_current_view = true;
                to_focus = log_view_for_tab(viewsTab.SelectedIndex);
                break;
            case show_full_log_type.just_view:
                show_filteredleft_pane1(true);
                show_filteredleft_pane2(false);
                global_ui.show_fulllog = false;
                global_ui.show_current_view = true;
                to_focus = log_view_for_tab(viewsTab.SelectedIndex);
                break;
            case show_full_log_type.just_full_log:
                show_filteredleft_pane1(false);
                show_filteredleft_pane2(true);
                global_ui.show_fulllog = true;
                global_ui.show_current_view = false;
                to_focus = full_log_ctrl_;
                break;
            default:
                Debug.Assert(false);
                break;
            }

            if (!global_ui.show_current_view)
                // 1.4.9 - so that on activate, we focus correctly
                active_pane_ = full_log_ctrl_;

            // can't focus now, it would sometimes get the hotkey ('L') to be sent twice, and we'd end up toggling twice with a single press
            if ( to_focus != null)
                util.postpone(() => {
                    var lv = to_focus as log_view;
                    if ( lv != null)
                        lv.set_focus();
                    else
                        to_focus.Focus();
                }, 100);
        }
Example #3
0
 private void show_full_log(show_full_log_type show)
 {
     switch (show) {
     case show_full_log_type.both:
         show_filteredleft_pane1(true);
         show_filteredleft_pane2(true);
         cur_context().show_fulllog = true;
         break;
     case show_full_log_type.just_view:
         show_filteredleft_pane1(true);
         show_filteredleft_pane2(false);
         cur_context().show_fulllog = false;
         break;
     case show_full_log_type.just_full_log:
         show_filteredleft_pane1(false);
         show_filteredleft_pane2(true);
         break;
     default:
         Debug.Assert(false);
         break;
     }
     toggleFullLog.Text = show_full_log_type_to_str(show);
 }