diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-12-02 21:45:14 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-12-02 21:45:14 +0100 |
commit | 9c82c06a1282289978b0fbb4aa14dbcea3b919b5 (patch) | |
tree | e7777dcaa448920f32ac51d45fa2dc77cc070cef /modules | |
parent | 45f74a345d3539b679bf1ac681812137ad85fffe (diff) | |
download | colin-keep-9c82c06a1282289978b0fbb4aa14dbcea3b919b5.tar colin-keep-9c82c06a1282289978b0fbb4aa14dbcea3b919b5.tar.gz colin-keep-9c82c06a1282289978b0fbb4aa14dbcea3b919b5.tar.bz2 colin-keep-9c82c06a1282289978b0fbb4aa14dbcea3b919b5.tar.xz colin-keep-9c82c06a1282289978b0fbb4aa14dbcea3b919b5.zip |
Really fixed quit procedure
Diffstat (limited to 'modules')
-rwxr-xr-x | modules/rpmdragora/rpmdragora | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/modules/rpmdragora/rpmdragora b/modules/rpmdragora/rpmdragora index f1b268a..8beaf5e 100755 --- a/modules/rpmdragora/rpmdragora +++ b/modules/rpmdragora/rpmdragora @@ -374,13 +374,8 @@ sub _do_search($$$$$$) { my $tree_selection = $tree->currentItem(); } -#sub quit() { - #($rpmdragora_width->[0], $rpmdragora_height->[0]) = $::w->{real_window}->get_size; - #real_quit(); -#} - sub quit { - $my_win->destroy(); + real_quit(); } sub run_treeview_dialog { @@ -1069,8 +1064,7 @@ sub run_treeview_dialog { #event type checking if ($eventType == $yui::YEvent::CancelEvent) { - quit(); - last; + last if quit(); } elsif ($eventType == $yui::YEvent::MenuEvent) { ### MENU ### @@ -1091,8 +1085,7 @@ sub run_treeview_dialog { my $menuLabel = $item->label(); if ($menuLabel eq $fileMenu{ quit }->label()) { #menu File->Quit - quit(); - last; + last if quit(); } elsif ($menuLabel eq $fileMenu{ update }->label()) { update_sources_interactive($urpm, transient => $my_win) @@ -1103,7 +1096,7 @@ sub run_treeview_dialog { my $db = eval { open_rpm_db() }; if (!ref($db)) { statusbar_msg($loc->N("Reset aborted (RPM DB is locked by another process)"), 1); - return; + last; } $urpm->disable_selected( $db, $urpm->{state}, @@ -1192,6 +1185,7 @@ sub run_treeview_dialog { } + $my_win->destroy } @@ -1203,6 +1197,10 @@ if (my $pid = is_running('rpmdragora')) { exit(0); } +if(!warn_about_user_mode()) { + exit(0); +} + yui::YUI::app()->setApplicationTitle($loc->N("Software Management")); yui::YUI::app()->setApplicationIcon($wm_icon); @@ -1213,23 +1211,17 @@ $mgaFactory = yui::YExternalWidgets::externalWidgetFactory($MGAPlugin); $mgaFactory = yui::YMGAWidgetFactory::getYMGAWidgetFactory($mgaFactory); $optFactory = yui::YUI::optionalWidgetFactory; - - ### MAIN DIALOG ### $my_win = $factory->createMainDialog; readconf(); -if(!warn_about_user_mode()) { - quit(); - exit(0); -} - AdminPanel::Rpmdragora::rpmnew::do_merge_if_needed(); - init(); run_treeview_dialog(\&perform_installation); writeconf(); + +1;
\ No newline at end of file |