#
#
# patch "lib/perl/ComboAutoCompletion.pm"
# from [38983d6aacdc78457650f1262cd22f5e96e3e6a3]
# to [beec6576db8d416488a8ac5a8ef58b518b9f1d0b]
#
# patch "lib/perl/Completion.pm"
# from [f02cc02b1babee37e4dfdc1f1b1fc093979fb3dc]
# to [7b74d2bad676cdf2ad1b7c502064c5ffa6ad5e9b]
#
# patch "lib/ui/mtn-browse.glade"
# from [4290291e04345583d4d823dad96b75e4880fe0b6]
# to [278f6d634d1bde943970ac60dbb426d3e0a06392]
#
# patch "mtn-browse"
# from [230367ba72dda7af7517dc51ff8ef2e391a5fdf0]
# to [f4566e7120ad4d448858d753f280912755b1630f]
#
============================================================
--- lib/perl/ComboAutoCompletion.pm 38983d6aacdc78457650f1262cd22f5e96e3e6a3
+++ lib/perl/ComboAutoCompletion.pm beec6576db8d416488a8ac5a8ef58b518b9f1d0b
@@ -258,29 +258,27 @@ sub auto_completion_comboboxentry_key_re
return FALSE if ($instance->{in_cb});
local $instance->{in_cb} = 1;
- my($complete,
- $completion,
- $item,
- $len,
- $old_complete,
- $old_value,
- $success,
- $value);
- my $change_state = $details->{change_state};
my $combo_details = $details->{combo_details};
my $entry = $widget->child();
- my $name = $details->{name};
+ my $old_value = $combo_details->{value};
+ my $value = $entry->get_text();
# The user has typed something in then validate it and auto-complete it if
# necessary.
- $complete = 0;
- $old_complete = $combo_details->{complete};
- $old_value = $combo_details->{value};
- $value = $entry->get_text();
if ($value ne $old_value)
{
+ my($busy,
+ $completion,
+ $len,
+ $success);
+ my $change_state = $details->{change_state};
+ my $complete = 0;
+ my $name = $details->{name};
+ my $old_complete = $combo_details->{complete};
+ my $wm = WindowManager->instance();
+
# Don't auto-complete if the user is simply deleting from the extreme
# right.
@@ -305,7 +303,6 @@ sub auto_completion_comboboxentry_key_re
get_completion($value, \$completion, \$complete)))
{
$value =~ s/\s+$//;
- $len = length($value);
$success = $combo_details->{completion}->
get_completion($value, \$completion, \$complete);
}
@@ -322,9 +319,9 @@ sub auto_completion_comboboxentry_key_re
# Tell the user what is wrong via the status bar.
$message = __x("Invalid {name} name `{value}'",
- name => $name,
- value => $value);
- $instance->{appbar}->push($message);
+ name => $name,
+ value => $value);
+ $instance->{appbar}->set_status($message);
# Also via a tooltip as well if so desired (need to position it
# to be just below the comboboxentry widget).
@@ -346,7 +343,6 @@ sub auto_completion_comboboxentry_key_re
$x += $root_x - 10;
$y += $height + $root_y + 5;
get_tooltip_window($instance->{window}, $message, $x, $y);
- WindowManager->update_gui();
}
}
@@ -362,26 +358,62 @@ sub auto_completion_comboboxentry_key_re
$instance->{appbar}->clear_stack();
hide_tooltip_window();
}
+ $wm->update_gui();
$combo_details->{value} = $value;
$combo_details->{complete} = $complete;
- # Update the pulldown choices if that is what the user wants.
+ # Update the pulldown choices if the value has actually changed (what
+ # the user has entered may have been discarded due to not being valid)
+ # and that is what the user wants.
- $widget->get_model()->clear()
- unless ($user_preferences->{static_lists});
- foreach $item (@{$combo_details->{list}})
+ if ($value ne $old_value)
{
- my $item_len = length($item);
- if ($len <= $item_len && $value eq substr($item, 0, $len))
+
+ my @item_list;
+
+ foreach my $item (@{$combo_details->{list}})
{
- $widget->append_text($item)
- unless ($user_preferences->{static_lists});
+ my $item_len = length($item);
+ if ($len <= $item_len && $value eq substr($item, 0, $len))
+ {
+ push(@item_list, $item)
+ unless ($user_preferences->{static_lists});
- # The following check is needed in the case when the user is
- # simply deleting characters from the right.
+ # The following check is needed in the case when the user
+ # is simply deleting characters from the right.
- $combo_details->{complete} = 1 if ($len == $item_len);
+ $combo_details->{complete} = 1 if ($len == $item_len);
+ }
}
+ if (! $user_preferences->{static_lists})
+ {
+ my $counter = 1;
+ $busy = 1;
+ $wm->make_busy($instance, 1);
+ $instance->{appbar}->set_progress_percentage(0);
+ $instance->{appbar}->push(__x("Populating {name} list",
+ name => $name));
+ $wm->update_gui();
+ $widget->get_model()->clear()
+ unless ($user_preferences->{static_lists});
+ foreach my $item (@item_list)
+ {
+ $widget->append_text($item);
+ if (($counter % 10) == 0)
+ {
+ $instance->{appbar}->set_progress_percentage
+ ($counter / scalar(@item_list));
+ $wm->update_gui();
+ }
+ ++ $counter;
+ }
+ $instance->{appbar}->set_progress_percentage(1);
+ $wm->update_gui();
+ $instance->{appbar}->set_progress_percentage(0);
+ $instance->{appbar}->pop();
+ $wm->update_gui();
+ }
+
}
# Update the window state on a significant change.
@@ -391,6 +423,8 @@ sub auto_completion_comboboxentry_key_re
|| ($combo_details->{complete}
&& $combo_details->{value} ne $old_value));
+ $wm->make_busy($instance, 0) if ($busy);
+
}
return FALSE;
============================================================
--- lib/perl/Completion.pm f02cc02b1babee37e4dfdc1f1b1fc093979fb3dc
+++ lib/perl/Completion.pm 7b74d2bad676cdf2ad1b7c502064c5ffa6ad5e9b
@@ -223,7 +223,7 @@ sub get_completion($$$$)
else
{
- # The comepletion list is empty and so nothing can be matched.
+ # The completion list is empty and so nothing can be matched.
$$complete = 0;
$match = undef;
============================================================
--- lib/ui/mtn-browse.glade 4290291e04345583d4d823dad96b75e4880fe0b6
+++ lib/ui/mtn-browse.glade 278f6d634d1bde943970ac60dbb426d3e0a06392
@@ -5406,10 +5406,10 @@ history stored in ComboBox menus
True
Select this if you do not want the
-branch and revision ComboBox entry
-lists to update as you type in values
-(can help with speed when dealing
-with large lists)
+branch, revision and directory
+ComboBox entry lists to update as
+you type in values (can help with
+speed when dealing with large lists)
True
Static lists
True
============================================================
--- mtn-browse 230367ba72dda7af7517dc51ff8ef2e391a5fdf0
+++ mtn-browse f4566e7120ad4d448858d753f280912755b1630f
@@ -1167,9 +1167,7 @@ sub directory_up_button_clicked_cb($$)
return if ($browser->{in_cb});
local $browser->{in_cb} = 1;
- my($len,
- $old_len,
- $value);
+ my $value;
# Simply go up one directory level in the manifest if we aren't already at
# the top.
@@ -1177,24 +1175,64 @@ sub directory_up_button_clicked_cb($$)
$value = $browser->{directory_combo_details}->{value};
if ($value ne "")
{
- $old_len = length($value);
+
+ my $wm = WindowManager->instance();
+
+ $wm->make_busy($browser, 1);
+ $browser->{appbar}->set_status("");
+ $wm->update_gui();
+
$value = dirname($value);
$value = "" if ($value eq ".");
$browser->{directory_combo_details}->{value} = $value;
$browser->{directory_combo_details}->{complete} = 1;
- $len = length($value);
- if ($len < $old_len)
+
+ # Only update the comboboxentry's pulldown list if that is what the
+ # user wants.
+
+ if (! $user_preferences->{static_lists})
{
- $browser->{directory_comboboxentry}->get_model()->clear();
+
+ my($counter,
+ @directory_list,
+ $len);
+
+ $len = length($value);
+ $browser->{appbar}->set_progress_percentage(0);
+ $browser->{appbar}->set_status(__("Populating directory list"));
+ $wm->update_gui();
foreach my $item (@{$browser->{directory_combo_details}->{list}})
{
- $browser->{directory_comboboxentry}->append_text($item)
+ push(@directory_list, $item)
if ($value eq substr($item, 0, $len));
}
+ $counter = 1;
+ $browser->{directory_comboboxentry}->get_model()->clear();
+ foreach my $item (@directory_list)
+ {
+ $browser->{directory_comboboxentry}->append_text($item);
+ if (($counter % 10) == 0)
+ {
+ $browser->{appbar}->set_progress_percentage
+ ($counter / scalar(@directory_list));
+ $wm->update_gui();
+ }
+ ++ $counter;
+ }
+ $browser->{appbar}->set_progress_percentage(1);
+ $wm->update_gui();
+ $browser->{appbar}->set_progress_percentage(0);
+
}
+
$browser->{directory_comboboxentry}->child()->set_text($value);
$browser->{appbar}->clear_stack();
+ $wm->update_gui();
+
&{$browser->{update_handler}}($browser, DIRECTORY_CHANGED);
+
+ $wm->make_busy($browser, 0);
+
}
}