# # # patch "mtn-browse" # from [4a511ca4c8b4a378638344f77104407a4b3a5f45] # to [7999e26f88f712dcb691cdd8f5a37119f30b7f37] # # patch "mtn-browse.glade" # from [fb6802ab22bb5380029fa6b296cb3411d47ca826] # to [fbb380a8bad310c2daae4203616e19a112384c29] # ============================================================ --- mtn-browse 4a511ca4c8b4a378638344f77104407a4b3a5f45 +++ mtn-browse 7999e26f88f712dcb691cdd8f5a37119f30b7f37 @@ -154,6 +154,10 @@ my @browsers; my @browsers; +# The tooltips widget. + +my $tooltips; + # ***** FUNCTIONAL PROTOTYPES FOR THIS FILE ***** # Private routines. @@ -171,6 +175,7 @@ sub new_browser_instance(); sub manifest_treeview_row_activated_cb($$$$); sub mtn_error_handler($$); sub new_browser_instance(); +sub set_label_value($$); sub setup_sigchld_handler($); sub sigchld_handler(); sub update_browser_state($$); @@ -259,6 +264,10 @@ sub new_browser_instance() }, $browser); + # Initialise tooltips. + + $tooltips = Gtk2::Tooltips->new(); + # Get the widgets that we are interested in. $browser->{main_window} = $browser->{glade}->get_widget("main_window"); @@ -911,7 +920,7 @@ sub update_browser_state($$) $browser->{branch_combo_details}->{completion_cache} = {}; $browser->{branch_combo_details}->{completed} = 0; $browser->{branch_combo_details}->{value} = ""; - $browser->{database_name_label}->set_text(""); + set_label_value($browser->{database_name_label}, ""); # Get the new list of branches. @@ -1033,9 +1042,9 @@ sub update_browser_state($$) $browser->{directory_combo_details}->{completed} = 0; $browser->{directory_combo_details}->{last_typed_len} = 0; $browser->{directory_combo_details}->{value} = ""; - $browser->{revision_id_label}->set_text(""); - $browser->{author_label}->set_text(""); - $browser->{change_log_label}->set_text(""); + set_label_value($browser->{revision_id_label}, ""); + set_label_value($browser->{author_label}, ""); + set_label_value($browser->{change_log_label}, ""); # Reset the name of the file being viewed. @@ -1091,9 +1100,10 @@ sub update_browser_state($$) $change_log = $cert->{value} if ($cert->{name} eq "changelog"); } - $browser->{revision_id_label}->set_text($revision_ids[0]); - $browser->{author_label}->set_text($author); - $browser->{change_log_label}->set_text($change_log); + set_label_value($browser->{revision_id_label}, + $revision_ids[0]); + set_label_value($browser->{author_label}, $author); + set_label_value($browser->{change_log_label}, $change_log); } } $browser->{manifest} = address@hidden; @@ -1425,13 +1435,14 @@ sub update_browser_state($$) } } } - $browser->{file_name_label}->set_text($manifest_entry->{name}); - $browser->{file_id_label}-> - set_text($manifest_entry->{file_id}); - $browser->{last_update_label}-> - set_text($manifest_entry->{last_update}); - $browser->{file_revision_id_label}-> - set_text($manifest_entry->{last_changed_revision}); + set_label_value($browser->{file_name_label}, + $manifest_entry->{name}); + set_label_value($browser->{file_id_label}, + $manifest_entry->{file_id}); + set_label_value($browser->{last_update_label}, + $manifest_entry->{last_update}); + set_label_value($browser->{file_revision_id_label}, + $manifest_entry->{last_changed_revision}); } } else @@ -1442,10 +1453,10 @@ sub update_browser_state($$) $browser->{file_button_vbox}->set_sensitive(FALSE); $browser->{file_view_svbuffer}->set_text(""); $browser->{file_view_svbuffer}->set("highlight", FALSE); - $browser->{file_name_label}->set_text(""); - $browser->{file_id_label}->set_text(""); - $browser->{last_update_label}->set_text(""); - $browser->{file_revision_id_label}->set_text(""); + set_label_value($browser->{file_name_label}, ""); + set_label_value($browser->{file_id_label}, ""); + set_label_value($browser->{last_update_label}, ""); + set_label_value($browser->{file_revision_id_label}, ""); } @@ -1885,10 +1896,36 @@ sub gtk2_update() { return if (Gtk2->main_level() == 0); - while (Gtk2->events_pending()) { Gtk2->main_iteration(); } } +# +############################################################################## +# +# Routine - set_label_value +# +# Description - This routine simply sets the text for the given label and +# the tooltip for the parent widget, assumed to be an event +# box, to the specified text. +# +# Data - $widget : The label widget that has an event box as its +# parent. +# $value : The text that the label and tooltip are to be set +# to. +# +############################################################################## + + + +sub set_label_value($$) +{ + + my($widget, $value) = @_; + + $widget->set_text($value); + $tooltips->set_tip($widget->parent(), $value); + +} ============================================================ --- mtn-browse.glade fb6802ab22bb5380029fa6b296cb3411d47ca826 +++ mtn-browse.glade fbb380a8bad310c2daae4203616e19a112384c29 @@ -882,25 +882,35 @@ with another revision Name of the file being displayed 1 1 - 0 0 79 10 71.1 79 + 0 0 277 10 249.3 277 0 0 17 10 15.3 17 - + 0 0 True - True - - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 + True + False + + + + 0 + 0 + True + True + + False + False + GTK_JUSTIFY_LEFT + False + True + 0 + 0.5 + 0 + 0 + + 0 @@ -934,25 +944,35 @@ with another revision Date of when file was last changed 1 1 - 0 0 79 10 71.1 79 + 0 0 277 10 249.3 277 0 0 17 10 15.3 17 - + 0 0 True - True - - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 + True + False + + + + 0 + 0 + True + True + + False + False + GTK_JUSTIFY_LEFT + False + True + 0 + 0.5 + 0 + 0 + + 0 @@ -1069,25 +1089,35 @@ updated with respect to this revision

File's unique id in database 1 1 - 0 0 84 10 75.6 84 + 0 0 283 10 254.7 283 0 0 17 10 15.3 17 - + 0 0 True - True - - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 + True + False + + + + 0 + 0 + True + True + + False + False + GTK_JUSTIFY_LEFT + False + True + 0 + 0.5 + 0 + 0 + + 0 @@ -1122,25 +1152,35 @@ file was last changed file was last changed 1 1 - 0 0 84 10 75.6 84 + 0 0 283 10 254.7 283 0 0 17 10 15.3 17 - + 0 0 True - True - - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 + True + False + + + + 0 + 0 + True + True + + False + False + GTK_JUSTIFY_LEFT + False + True + 0 + 0.5 + 0 + 0 + + 0 @@ -1540,21 +1580,31 @@ with another version 0 0 17 10 15.3 17 - + 0 0 True - True - - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 + True + False + + + + 0 + 0 + True + True + + False + False + GTK_JUSTIFY_LEFT + False + True + 0 + 0.5 + 0 + 0 + + 0 @@ -1591,21 +1641,31 @@ with another version 0 0 17 10 15.3 17 - + 0 0 True - True - - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 + True + False + + + + 0 + 0 + True + True + + False + False + GTK_JUSTIFY_LEFT + False + True + 0 + 0.5 + 0 + 0 + + 0 @@ -1724,21 +1784,31 @@ with another version 0 0 17 10 15.3 17 - + 0 0 True - True - - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 + True + False + + + + 0 + 0 + True + True + + False + False + GTK_JUSTIFY_LEFT + False + True + 0 + 0.5 + 0 + 0 + + 0 @@ -1775,21 +1845,31 @@ with another version 0 0 17 10 15.3 17 - + 0 0 True - True - - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 + True + False + + + + 0 + 0 + True + True + + False + False + GTK_JUSTIFY_LEFT + False + True + 0 + 0.5 + 0 + 0 + + 0