diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-11-25 20:59:48 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-12-05 14:16:08 +0100 |
commit | c509d5f922f08b300436902403cfca5b4c208902 (patch) | |
tree | a78a278c6b416f63bb7bda035bdc64e51d18e2fb | |
parent | 4f2f1ed233fdc12b6ce3653581f5095fd3efa16c (diff) | |
download | rpmdrake-c509d5f922f08b300436902403cfca5b4c208902.tar rpmdrake-c509d5f922f08b300436902403cfca5b4c208902.tar.gz rpmdrake-c509d5f922f08b300436902403cfca5b4c208902.tar.bz2 rpmdrake-c509d5f922f08b300436902403cfca5b4c208902.tar.xz rpmdrake-c509d5f922f08b300436902403cfca5b4c208902.zip |
fix menu ids & simplify after conversion to UIManager
-rwxr-xr-x | rpmdrake | 48 |
1 files changed, 20 insertions, 28 deletions
@@ -579,11 +579,6 @@ sub run_treeview_dialog { my $status = gtknew('Label'); my $checkbox_show_autoselect; my %check_boxes; - my $auto_select_string = N("_Select dependencies without asking"); - my $clean_cache_string = N("Clear download cache after successful install"); - my $updates_string = N("_Compute updates on startup"); - my $NVR_string = N("Search in _full package names"); - my $regexp_search_string = N("Use _regular expressions in searches"); my @radio_labels = qw(flat by_group by_leaves by_presence by_selection by_size by_source); my @radios = map { @@ -596,12 +591,12 @@ sub run_treeview_dialog { # [name, stock_id, value, label, accelerator, tooltip, callback] [ 'FileMenu', undef, N("_File") ], if_(! $>, - [ 'Update media', undef, N("_Update media"), undef, undef, sub { + [ 'Update_media', undef, N("_Update media"), undef, undef, sub { update_sources_interactive($urpm, transient => $w->{real_window}) and $reload_db_and_clear_all->(); } ] ), - [ 'Reset_the_selection', undef, N("_Reset the selection"), undef, undef, sub { reset_selection($tree) } ], + [ 'Reset_selection', undef, N("_Reset the selection"), undef, undef, sub { reset_selection($tree) } ], [ 'Reload_the_packages_list', undef, N("Reload the _packages list"), undef, undef, $reload_db_and_clear_all ], [ 'Quit', undef, N("_Quit"), N("<control>Q"), undef, \&quit ], @@ -625,17 +620,17 @@ sub run_treeview_dialog { $view_callback ] ], toggle_actions => [ - [ 'Auto_select', undef, $auto_select_string, undef, undef, + [ 'Auto_select', undef, N("_Select dependencies without asking"), undef, undef, sub { - my $box = $check_boxes{$auto_select_string}; + my $box = $check_boxes{'Auto_select'}; $auto_select_opt->[0] = $box->get_active; $::rpmdrake_options{auto} = $box->get_active; $urpm->{options}{auto} = $box->get_active; } ], - [ 'Clean_Cache', undef, $clean_cache_string, undef, undef, + [ 'Clean_Cache', undef, N("Clear download cache after successful install"), undef, undef, sub { $clean_cache->[0] = - $check_boxes{$clean_cache_string}->get_active; + $check_boxes{'Clean_Cache'}->get_active; $::noclean = !$clean_cache->[0]; } ], @@ -643,14 +638,14 @@ sub run_treeview_dialog { $dont_show_selections->[0] = !$checkbox_show_autoselect->get_active; } ], - [ 'Compute_updates_on_startup', undef, $updates_string, undef, undef, sub { - $compute_updates->[0] = $check_boxes{$updates_string}->get_active; + [ 'Compute_updates_on_startup', undef, N("_Compute updates on startup"), undef, undef, sub { + $compute_updates->[0] = $check_boxes{'Compute_updates_on_startup'}->get_active; } ], - [ 'NVR_search', undef, $NVR_string, undef, undef, sub { - $NVR_searches->[0] = $check_boxes{$NVR_string}->get_active; + [ 'NVR_search', undef, N("Search in _full package names"), undef, undef, sub { + $NVR_searches->[0] = $check_boxes{'NVR_search'}->get_active; } ], - [ 'Use_RE_in_searches', undef, $regexp_search_string, undef, undef, sub { - $use_regexp->[0] = $check_boxes{$regexp_search_string}->get_active; + [ 'Use_RE_in_searches', undef, N("Use _regular expressions in searches"), undef, undef, sub { + $use_regexp->[0] = $check_boxes{'Use_RE_in_searches'}->get_active; } ], ], string => @@ -697,19 +692,16 @@ qq( } %check_boxes = map { - $_ => $ui->get_widget('/MenuBar/OptionsMenu' . $_); - } ($auto_select_string, - $clean_cache_string, - $NVR_string, - $updates_string, - $regexp_search_string); + $_ => $ui->get_widget('/MenuBar/OptionsMenu/' . $_); + } ('Auto_select', 'Clean_Cache', 'NVR_search', + 'Compute_updates_on_startup', 'Use_RE_in_searches'); if (!$>) { - $check_boxes{$regexp_search_string}->set_active($use_regexp->[0]); - $check_boxes{$NVR_string}->set_active($NVR_searches->[0]); - $check_boxes{$auto_select_string}->set_active($auto_select_opt->[0]); - $check_boxes{$updates_string}->set_active($compute_updates->[0]); - $check_boxes{$clean_cache_string}->set_active($clean_cache->[0]); + $check_boxes{'Use_RE_in_searches'}->set_active($use_regexp->[0]); + $check_boxes{'NVR_search'}->set_active($NVR_searches->[0]); + $check_boxes{'Auto_select'}->set_active($auto_select_opt->[0]); + $check_boxes{'Compute_updates_on_startup'}->set_active($compute_updates->[0]); + $check_boxes{'Clean_Cache'}->set_active($clean_cache->[0]); } $checkbox_show_autoselect = $ui->get_widget('/MenuBar/OptionsMenu/Auto_select') |