# # # patch "lib/perl/ComboAutoCompletion.pm" # from [0100299fb493df39767bd38ff2da451040e1662a] # to [38983d6aacdc78457650f1262cd22f5e96e3e6a3] # # patch "lib/perl/Common.pm" # from [e907af6ee7754a6d899a0c226ef67e5cac7167d0] # to [f664db33d3603907d16c4bffe35bb2db6ebb5031] # # patch "lib/perl/Preferences.pm" # from [81f61fc079d69e125708ac6690f1b18592911637] # to [4671f66358132971e299bfb358dfac0eeec1c24f] # # patch "lib/ui/mtn-browse.glade" # from [7f91ca59c0a4d2328bb04c76cdcd054ddbf93115] # to [5960817326b15c71e60d220a9a17282b74dea08f] # ============================================================ --- lib/perl/ComboAutoCompletion.pm 0100299fb493df39767bd38ff2da451040e1662a +++ lib/perl/ComboAutoCompletion.pm 38983d6aacdc78457650f1262cd22f5e96e3e6a3 @@ -317,12 +317,7 @@ sub auto_completion_comboboxentry_key_re else { - my($height, - $message, - $root_x, - $root_y, - $x, - $y); + my $message; # Tell the user what is wrong via the status bar. @@ -331,18 +326,28 @@ sub auto_completion_comboboxentry_key_re value => $value); $instance->{appbar}->push($message); - # Also via a tooltip as well (need to position it to be just - # below the comboboxentry widget). + # Also via a tooltip as well if so desired (need to position it + # to be just below the comboboxentry widget). - ($x, $y) = - $widget->translate_coordinates($instance->{window}, 0, 0); - $height = ($widget->child()->window()->get_geometry())[3]; - ($root_x, $root_y) = - $instance->{window}->window()->get_origin(); - $x += $root_x - 10; - $y += $height + $root_y + 5; - get_tooltip_window($instance->{window}, $message, $x, $y); - WindowManager->update_gui(); + if ($user_preferences->{completion_tooltips}) + { + my($height, + $root_x, + $root_y, + $x, + $y); + ($x, $y) = + $widget->translate_coordinates($instance->{window}, + 0, + 0); + $height = ($widget->child()->window()->get_geometry())[3]; + ($root_x, $root_y) = + $instance->{window}->window()->get_origin(); + $x += $root_x - 10; + $y += $height + $root_y + 5; + get_tooltip_window($instance->{window}, $message, $x, $y); + WindowManager->update_gui(); + } } ============================================================ --- lib/perl/Common.pm e907af6ee7754a6d899a0c226ef67e5cac7167d0 +++ lib/perl/Common.pm f664db33d3603907d16c4bffe35bb2db6ebb5031 @@ -406,11 +406,17 @@ sub get_dir_contents($$$) my($path, $manifest, $result) = @_; - my($entry, + my(@dir_list, + $entry, $extract_re, + @file_list, + $list, $match_re, $name); + # Manifests are already sorted alphabetically. However, if the user wishes + # it, place folders before files. + if ($path eq "") { $match_re = qr/^[^\/]+$/; @@ -427,9 +433,28 @@ sub get_dir_contents($$$) if ($entry->{name} =~ m/$match_re/) { ($name) = ($entry->{name} =~ m/$extract_re/); - push(@$result, {manifest_entry => $entry, name => $name}); + if ($user_preferences->{folders_come_first}) + { + if ($entry->{type} eq "directory") + { + $list = address@hidden; + } + else + { + $list = address@hidden; + } + } + else + { + $list = $result; + } + push(@$list, {manifest_entry => $entry, name => $name}); } } + if ($user_preferences->{folders_come_first}) + { + @$result = (@dir_list, @file_list); + } } # ============================================================ --- lib/perl/Preferences.pm 81f61fc079d69e125708ac6690f1b18592911637 +++ lib/perl/Preferences.pm 4671f66358132971e299bfb358dfac0eeec1c24f @@ -80,7 +80,7 @@ use constant PREFERENCES_FILE_NAME => ". # Constant for the preferences file's format version. -use constant PREFERENCES_FORMAT_VERSION => 9; +use constant PREFERENCES_FORMAT_VERSION => 10; # Text viewable application mime types. @@ -460,8 +460,10 @@ sub defaults_button_clicked_cb($$) "history_size", "show_suspended", "show_file_details", + "folders_come_first", "show_line_numbers", "static_lists", + "completion_tooltips", "list_search_as_re", "diffs_application"); } @@ -1039,8 +1041,10 @@ sub get_preferences_window($$) "history_size_spinbutton", "show_suspended_revisions_checkbutton", "detailed_file_listing_checkbutton", + "folders_come_first_checkbutton", "show_line_numbers_checkbutton", "static_lists_checkbutton", + "show_completion_tooltips_checkbutton", "search_as_regular_expression_checkbutton", "external_diffs_app_entry", @@ -1283,11 +1287,17 @@ sub load_preferences_into_gui($) $instance->{detailed_file_listing_checkbutton}-> set_active($instance->{preferences}->{show_file_details} ? TRUE : FALSE); + $instance->{folders_come_first_checkbutton}-> + set_active($instance->{preferences}->{folders_come_first} ? + TRUE : FALSE); $instance->{show_line_numbers_checkbutton}-> set_active($instance->{preferences}->{show_line_numbers} ? TRUE : FALSE); $instance->{static_lists_checkbutton}-> set_active($instance->{preferences}->{static_lists} ? TRUE : FALSE); + $instance->{show_completion_tooltips_checkbutton}-> + set_active($instance->{preferences}->{completion_tooltips} ? + TRUE : FALSE); $instance->{search_as_regular_expression_checkbutton}-> set_active($instance->{preferences}->{list_search_as_re} ? TRUE : FALSE); @@ -1472,10 +1482,15 @@ sub save_preferences_from_gui($) 1 : 0; $instance->{preferences}->{show_file_details} = $instance->{detailed_file_listing_checkbutton}->get_active() ? 1 : 0; + $instance->{preferences}->{folders_come_first} = + $instance->{folders_come_first_checkbutton}->get_active() ? 1 : 0; $instance->{preferences}->{show_line_numbers} = $instance->{show_line_numbers_checkbutton}->get_active() ? 1 : 0; $instance->{preferences}->{static_lists} = $instance->{static_lists_checkbutton}->get_active() ? 1 : 0; + $instance->{preferences}->{completion_tooltips} = + $instance->{show_completion_tooltips_checkbutton}->get_active() ? + 1 : 0; $instance->{preferences}->{list_search_as_re} = $instance->{search_as_regular_expression_checkbutton}->get_active() ? 1 : 0; @@ -1668,6 +1683,12 @@ sub upgrade_preferences($) fixed => 0}; $preferences->{version} = 9; } + if ($preferences->{version} == 9) + { + $preferences->{folders_come_first} = 1; + $preferences->{completion_tooltips} = 1; + $preferences->{version} = 10; + } $preferences->{version} = PREFERENCES_FORMAT_VERSION; @@ -1696,46 +1717,48 @@ sub initialise_preferences() die(__("Cannot load system MIME types.\n")) unless (defined($mime_table = initialise_mime_info_table())); %preferences = - (version => PREFERENCES_FORMAT_VERSION, - default_mtn_db => "", - workspace => {takes_precedence => 1, - auto_select => 1}, - auto_select_head => 0, - query => {tagged => {limit => 200, - sort_chronologically => 1}, - id => {limit => 200, - sort_chronologically => 1}}, - history_size => 20, - show_suspended => 0, - show_file_details => 1, - show_line_numbers => 0, - static_lists => 0, - list_search_as_re => 0, - diffs_application => FILE_COMPARE_CMD . " '{file1}' '{file2}'", - fixed_font => "monospace 10", - toolbar_settings => {hide_text => 0, - fixed => 0}, - coloured_diffs => 1, - colours => {annotate_prefix_1 => {fg => "AliceBlue", - bg => "CadetBlue"}, - annotate_text_1 => {fg => "MidnightBlue", - bg => "PaleTurquoise"}, - annotate_prefix_2 => {fg => "AliceBlue", - bg => "SteelBlue"}, - annotate_text_2 => {fg => "MidnightBlue", - bg => "SkyBlue"}, - cmp_revision_1 => {fg => "DarkRed", - bg => "MistyRose1", - hl => "IndianRed1"}, - cmp_revision_2 => {fg => "DarkGreen", - bg => "DarkSeaGreen1", - hl => "SpringGreen1"}}, - mime_table => $mime_table, - histories => {advanced_find => [], - find_files_named => [], - find_files_containing => [], - find_files_modified_by => [], - find_text => []}); + (version => PREFERENCES_FORMAT_VERSION, + default_mtn_db => "", + workspace => {takes_precedence => 1, + auto_select => 1}, + auto_select_head => 0, + query => {tagged => {limit => 200, + sort_chronologically => 1}, + id => {limit => 200, + sort_chronologically => 1}}, + history_size => 20, + show_suspended => 0, + show_file_details => 1, + folders_come_first => 1, + show_line_numbers => 0, + static_lists => 0, + completion_tooltips => 1, + list_search_as_re => 0, + diffs_application => FILE_COMPARE_CMD . " '{file1}' '{file2}'", + fixed_font => "monospace 10", + toolbar_settings => {hide_text => 0, + fixed => 0}, + coloured_diffs => 1, + colours => {annotate_prefix_1 => {fg => "AliceBlue", + bg => "CadetBlue"}, + annotate_text_1 => {fg => "MidnightBlue", + bg => "PaleTurquoise"}, + annotate_prefix_2 => {fg => "AliceBlue", + bg => "SteelBlue"}, + annotate_text_2 => {fg => "MidnightBlue", + bg => "SkyBlue"}, + cmp_revision_1 => {fg => "DarkRed", + bg => "MistyRose1", + hl => "IndianRed1"}, + cmp_revision_2 => {fg => "DarkGreen", + bg => "DarkSeaGreen1", + hl => "SpringGreen1"}}, + mime_table => $mime_table, + histories => {advanced_find => [], + find_files_named => [], + find_files_containing => [], + find_files_modified_by => [], + find_text => []}); return \%preferences; ============================================================ --- lib/ui/mtn-browse.glade 7f91ca59c0a4d2328bb04c76cdcd054ddbf93115 +++ lib/ui/mtn-browse.glade 5960817326b15c71e60d220a9a17282b74dea08f @@ -5445,6 +5445,27 @@ that you are using + + True + Select this if you want all folders +to be listed before any files + True + Folders come first + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + True Select this if you want line numbers @@ -5474,7 +5495,7 @@ with large lists) (can help with speed when dealing with large lists) True - Static branch and revision lists + Static completion lists True GTK_RELIEF_NORMAL True @@ -5488,6 +5509,29 @@ with large lists) False + + + + True + Select this if you want feedback in the +form of special tooltips when typing in +values into either the branch or revision +combobox entry fields + True + Show completion tooltips + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + +