# # # add_file "artwork/eye.svg" # content [4fa3c0ab3df9787518b0ae29f7399631ba5017b2] # # add_file "lib/ui/pixmaps/eye.png" # content [f06e8d3292076b0fe0dbb91a181a1508de52c641] # # patch "artwork/annotate.svg" # from [d683c9b759975524747a66df7a638c33e7ed6cf5] # to [cfbaae5441874a84fe5f218a17fc0409f5b51617] # # patch "artwork/diffs.svg" # from [c2ec0e32d111a8a2484251c401df7bc9e2e99c2e] # to [ad6d4efd2ee6cb48b8809d33404cc9f50ef25536] # # patch "artwork/external-diffs.svg" # from [b3f667edc15ca3cb157245476b321d95ad31c2f4] # to [0fac97cd6a72cc2f67a78b343b025f5d3e330d8f] # # patch "artwork/monotone-viz.svg" # from [973e3787f47c4a046492a95282b7569ce0268179] # to [c5f4f086a3fc173c5301e02a83faeaf020927934] # # patch "lib/perl/ComboAutoCompletion.pm" # from [dd0811843a29ab6bca6301bb1091987c98f3a75d] # to [0100299fb493df39767bd38ff2da451040e1662a] # # patch "lib/perl/Completion.pm" # from [14b963469ffd8340d75ea66e4f74f5d409b15516] # to [f02cc02b1babee37e4dfdc1f1b1fc093979fb3dc] # # patch "lib/ui/mtn-browse.glade" # from [2c32f821449107cb7519688a866854127f24e11c] # to [7f91ca59c0a4d2328bb04c76cdcd054ddbf93115] # # patch "lib/ui/pixmaps/annotate.png" # from [d846882433f2b6eeed7d25fb085a8a1aee42c059] # to [03053815e8660eea29645fbe2877db9c550c1c8c] # # patch "lib/ui/pixmaps/diffs.png" # from [c666a373e29c6189df0b1b00799e9a2c2c532ca4] # to [d490e754153dcbd7af1fc3d7672288d89c75f126] # # patch "lib/ui/pixmaps/external-diffs.png" # from [b4e167ca3a5e840750243cc24a074c6a1d31d2e7] # to [f575067e0791c8707d49a39ce4eccb8ce1496533] # # patch "lib/ui/pixmaps/monotone-viz.png" # from [41853635f2bb5932843f444ed771d8567293aac6] # to [d4e54c048d16fe402806e40c824a5ba0637cc609] # # patch "mtn-browse" # from [142c65ac8cd6a27d25dae7b21398bd2f18d16f6e] # to [a911e377d74adf4cc1db49a4d22d76e6ebd357af] # # set "lib/ui/pixmaps/eye.png" # attr "mtn:manual_merge" # value "true" # ============================================================ --- artwork/eye.svg 4fa3c0ab3df9787518b0ae29f7399631ba5017b2 +++ artwork/eye.svg 4fa3c0ab3df9787518b0ae29f7399631ba5017b2 @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + image/svg+xml + + + + + + + + + + + + + + + + ============================================================ # lib/ui/pixmaps/eye.png is binary ============================================================ --- artwork/annotate.svg d683c9b759975524747a66df7a638c33e7ed6cf5 +++ artwork/annotate.svg cfbaae5441874a84fe5f218a17fc0409f5b51617 @@ -13,12 +13,12 @@ id="svg4210" sodipodi:version="0.32" inkscape:version="0.45.1" - sodipodi:docbase="/home/aecoope/perl" + sodipodi:docbase="/home/aecoope/code/monotone.ca/mtn-browse/artwork" sodipodi:docname="annotate.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" - inkscape:export-filename="/home/aecoope/perl/diffs.png" - inkscape:export-xdpi="2.616276" - inkscape:export-ydpi="2.616276"> + inkscape:export-filename="/home/aecoope/code/monotone.ca/mtn-browse/lib/ui/pixmaps/annotate.png" + inkscape:export-xdpi="2.2498391" + inkscape:export-ydpi="2.2498391"> + x="-0.14610526" + width="1.2922105" + y="-0.14195455" + height="1.2839091" + id="filter3409"> + stdDeviation="41.403457" + id="feGaussianBlur3411" /> + style="opacity:1;fill:#444444;fill-opacity:1;stroke:#000000;stroke-width:20;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter3409)" + inkscape:export-xdpi="2.616276" + inkscape:export-ydpi="2.616276" + inkscape:export-filename="/home/aecoope/code/monotone.ca/mtn-browse/lib/ui/diffs.png" /> + inkscape:export-filename="/home/aecoope/code/monotone.ca/mtn-browse/lib/ui/pixmaps/diffs.png" + inkscape:export-xdpi="2.2498391" + inkscape:export-ydpi="2.2498391"> + x="-0.14610526" + width="1.2922105" + y="-0.14195455" + height="1.2839091" + id="filter4772"> + stdDeviation="41.403457" + id="feGaussianBlur4774" /> @@ -178,7 +178,7 @@ height="680.00079" width="660.11444" id="rect3396" - style="opacity:0.4;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:20;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter3438)" + style="opacity:1;fill:#444444;fill-opacity:1;stroke:#000000;stroke-width:20;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter4772)" inkscape:export-xdpi="2.2498391" inkscape:export-ydpi="2.2498391" inkscape:export-filename="/home/aecoope/perl/diffs.png" /> ============================================================ --- artwork/external-diffs.svg b3f667edc15ca3cb157245476b321d95ad31c2f4 +++ artwork/external-diffs.svg 0fac97cd6a72cc2f67a78b343b025f5d3e330d8f @@ -13,12 +13,12 @@ id="svg4210" sodipodi:version="0.32" inkscape:version="0.45.1" - sodipodi:docbase="/home/aecoope/perl" + sodipodi:docbase="/home/aecoope/code/monotone.ca/mtn-browse/artwork" sodipodi:docname="external-diffs.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" - inkscape:export-filename="/home/aecoope/perl/diffs.png" - inkscape:export-xdpi="2.616276" - inkscape:export-ydpi="2.616276"> + inkscape:export-filename="/home/aecoope/code/monotone.ca/mtn-browse/lib/ui/pixmaps/external-diffs.png" + inkscape:export-xdpi="2.2498391" + inkscape:export-ydpi="2.2498391"> - - - + + + @@ -293,7 +293,7 @@ id="rect3396" height="680.00079" inkscape:export-filename="/home/aecoope/perl/external-diffs.png" - style="opacity:0.4;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:20;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter3438)" /> + style="opacity:1;fill:#444444;fill-opacity:1;stroke:#000000;stroke-width:20;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter7902)" /> + inkscape:export-filename="/home/aecoope/code/monotone.ca/mtn-browse/lib/ui/pixmaps/monotone-viz.png" + inkscape:export-xdpi="2.7904053" + inkscape:export-ydpi="2.7904053"> + + + + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none" /> + + + + + + + transform="scale(1.1) translate(1,0)" + d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " + id="path4337" + style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round" /> + + + + id="path3496" + style="stroke-linejoin:round;font-size:12.0;fill-rule:evenodd;stroke:#444444;stroke-width:0.62500000;fill:#444444" /> + + + + id="path3654" + style="stroke-linejoin:round;font-size:12.0;fill-rule:evenodd;stroke:#444444;stroke-width:0.62500000;fill:#444444" /> + + + + transform="scale(0.6) translate(0,0)" + d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " + id="path3826" + style="stroke-linejoin:round;font-size:12.0;fill-rule:evenodd;stroke:#444444;stroke-width:0.62500000;fill:#444444" /> + + + - - - @@ -129,65 +206,129 @@ + inkscape:groupmode="layer"> + + + + + + + + + + + + + + sodipodi:nodetypes="cc" + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:8;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow2Mstart);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + sodipodi:nodetypes="czz" + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:8;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow2Mstart);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#3771c8;fill-opacity:1;stroke:#000000;stroke-width:8;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + height="100" + style="fill:#ff5599;fill-opacity:1;stroke:#000000;stroke-width:8;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:24,24;stroke-dashoffset:0;stroke-opacity:1" /> + style="fill:#3771c8;fill-opacity:1;stroke:#000000;stroke-width:8;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> - + id="path4314" + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:8;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow2Mstart);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + ============================================================ --- lib/perl/ComboAutoCompletion.pm dd0811843a29ab6bca6301bb1091987c98f3a75d +++ lib/perl/ComboAutoCompletion.pm 0100299fb493df39767bd38ff2da451040e1662a @@ -285,7 +285,8 @@ sub auto_completion_comboboxentry_key_re # right. $len = length($value); - if ($value ne substr($old_value, 0, $len)) + if ($len >= length($old_value) + || $value ne substr($old_value, 0, $len)) { # Initialise a new auto-completion object with a new list of terms @@ -341,8 +342,10 @@ 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(); } + $value = $completion; $len = length($value); $entry->set_text($value); @@ -359,19 +362,20 @@ sub auto_completion_comboboxentry_key_re # Update the pulldown choices if that is what the user wants. - if (! $user_preferences->{static_lists}) + $widget->get_model()->clear() + unless ($user_preferences->{static_lists}); + foreach $item (@{$combo_details->{list}}) { - $widget->get_model()->clear(); - foreach $item (@{$combo_details->{list}}) + my $item_len = length($item); + if ($len <= $item_len && $value eq substr($item, 0, $len)) { $widget->append_text($item) - if ($value eq substr($item, 0, $len)); + unless ($user_preferences->{static_lists}); # The following check is needed in the case when the user is # simply deleting characters from the right. - $combo_details->{complete} = 1 - if (! $complete && $value eq $item); + $combo_details->{complete} = 1 if ($len == $item_len); } } @@ -379,7 +383,8 @@ sub auto_completion_comboboxentry_key_re &{$instance->{update_handler}}($instance, $change_state) if ($combo_details->{complete} != $old_complete - || $combo_details->{value} ne $old_value); + || ($combo_details->{complete} + && $combo_details->{value} ne $old_value)); } @@ -417,7 +422,7 @@ sub get_tooltip_window($$$$) my $wm = WindowManager->instance(); # Create a new tooltip window if an existing one wasn't found, otherwise - # reuse an existing unused one. + # reuse an existing one (used or unused). if (! defined($instance = $wm->cond_find($window_type, sub { return 1; }))) { @@ -463,8 +468,8 @@ sub get_tooltip_window($$$$) local $instance->{in_cb} = 1; - # Update the tooltip message text and setup a timout handler to dismiss the - # window after three seconds. + # Update the tooltip message text and setup a timeout handler to dismiss + # the window after three seconds. $instance->{message_label}->set_text($message); $instance->{timeout_source_id} = ============================================================ --- lib/perl/Completion.pm 14b963469ffd8340d75ea66e4f74f5d409b15516 +++ lib/perl/Completion.pm f02cc02b1babee37e4dfdc1f1b1fc093979fb3dc @@ -124,7 +124,7 @@ sub new($;$) # `net.venge.monotone.contrib.'. You could simply think of this node as # an `end of string' token if you prefer. - $level->{""} = ""; + $level->{""} = {}; } @@ -158,48 +158,79 @@ sub get_completion($$$$) my($this, $value, $result, $complete) = @_; - my($char, - $level); + my $match = 1; - # Lookup value, stopping when it becomes ambiguous or we get to the end of - # $value. + $$result = ""; - $level = $this->{tree}; - $$result = ""; - foreach $char (split(//, $value)) + # The completion list must be non-empty to match something. + + if (scalar(%{$this->{tree}})) { - last unless (exists($level->{$char})); - $level = $level->{$char}; - $$result .= $char; - } - # Detect truncations. + my($char, + $level); - return if (length($value) > length($$result)); + # Lookup value, stopping when it becomes ambiguous, we get no match or + # we get to the end of $value. - # Now try and expand it further. + $level = $this->{tree}; + foreach $char (split(//, $value)) + { + last unless (exists($level->{$char})); + $level = $level->{$char}; + $$result .= $char; + } - while (defined(%$level) && keys(%$level) == 1) - { - ($char) = keys(%$level); - $$result .= $char; - $level = $level->{$char}; - } + # Detect truncations. - # Detect complete completions (doesn't mean to say that it can't be - # extended, just that as it stands at the moment $$result does contain a - # valid unique value). + if (length($value) > length($$result)) + { - if (! defined(%$level) || exists($level->{""})) - { - $$complete = 1; + # The result is smaller and so the latter part of $value doesn't + # match. + + $match = undef; + + } + else + { + + # $value matches so far so now try and expand it further. + + while (scalar(keys(%$level)) == 1) + { + ($char) = keys(%$level); + $$result .= $char; + $level = $level->{$char}; + } + + } + + # Detect complete completions (doesn't mean to say that it can't be + # extended, just that as it stands at the moment $$result does contain + # a valid unique value). + + if (! scalar(%$level) || exists($level->{""})) + { + $$complete = 1; + } + else + { + $$complete = 0; + } + } else { + + # The comepletion list is empty and so nothing can be matched. + $$complete = 0; + $match = undef; + } - return 1; + return $match; } ============================================================ --- lib/ui/mtn-browse.glade 2c32f821449107cb7519688a866854127f24e11c +++ lib/ui/mtn-browse.glade 7f91ca59c0a4d2328bb04c76cdcd054ddbf93115 @@ -682,9 +682,9 @@ in Monotone-Viz - + True - gtk-dialog-info + gnome-stock-multiple-file 4 0.5 0.5 @@ -1577,10 +1577,9 @@ into a viewer - + True - gnome-stock-book-open - 4 + eye.png 0.5 0.5 0 @@ -1632,9 +1631,9 @@ into a viewer - + True - gtk-dialog-info + gnome-stock-multiple-file 4 0.5 0.5 ============================================================ # lib/ui/pixmaps/annotate.png is binary ============================================================ # lib/ui/pixmaps/diffs.png is binary ============================================================ # lib/ui/pixmaps/external-diffs.png is binary ============================================================ # lib/ui/pixmaps/monotone-viz.png is binary ============================================================ --- mtn-browse 142c65ac8cd6a27d25dae7b21398bd2f18d16f6e +++ mtn-browse a911e377d74adf4cc1db49a4d22d76e6ebd357af @@ -667,6 +667,7 @@ sub open_toolbutton_clicked_cb($$) { setup_mtn_object($mtn, $browser->{window}); $browser->{mtn} = $mtn; + $browser->{appbar}->clear_stack(); &{$browser->{update_handler}}($browser, DATABASE_CHANGED); }