diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-11-07 00:20:53 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-11-07 00:20:53 +0100 |
commit | 95592ce9fc2e0edd1168d6d80152730cce9bb2a1 (patch) | |
tree | 4c1e8c0080bb87223dd2f2068d77fedc327d597f /modules/rpmdragora/dragoraUpdate | |
parent | 390efecb238391bfe4b0335b4742d66054bde44c (diff) | |
download | colin-keep-95592ce9fc2e0edd1168d6d80152730cce9bb2a1.tar colin-keep-95592ce9fc2e0edd1168d6d80152730cce9bb2a1.tar.gz colin-keep-95592ce9fc2e0edd1168d6d80152730cce9bb2a1.tar.bz2 colin-keep-95592ce9fc2e0edd1168d6d80152730cce9bb2a1.tar.xz colin-keep-95592ce9fc2e0edd1168d6d80152730cce9bb2a1.zip |
- More porting for packages info
- Added a link to manage hidden information (though has problems in ncurses)
Diffstat (limited to 'modules/rpmdragora/dragoraUpdate')
-rwxr-xr-x | modules/rpmdragora/dragoraUpdate | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/modules/rpmdragora/dragoraUpdate b/modules/rpmdragora/dragoraUpdate index b0c4247..cdc5c47 100755 --- a/modules/rpmdragora/dragoraUpdate +++ b/modules/rpmdragora/dragoraUpdate @@ -252,6 +252,8 @@ sub run_treeview_dialog { my $closeButton = $factory->createPushButton($hbox, $loc->N("Quit") ); $statusbar = $factory->createBusyIndicator($vbox, "" ); + my $info_options = {}; + while(1) { my $event = $dialog->waitForEvent(); my $eventType = $event->eventType(); @@ -260,6 +262,31 @@ sub run_treeview_dialog { if ($eventType == $yui::YEvent::CancelEvent) { last if quit(); } + elsif ($eventType == $yui::YEvent::MenuEvent) { + my $item = $event->item(); + if (!$item) { + #URL emitted or at least a ref into RichText widget + my $url = yui::toYMenuEvent($event)->id (); + $item = $packageTbl->selectedItem(); + my $pkg = $data{$item->index()}{fullname}; + if ($url eq $AdminPanel::Rpmdragora::gui::hidden_info{details}) { + $info_options->{details} = 1; + AdminPanel::Rpmdragora::gui::setInfoOnWidget($pkg, $infoBox, $info_options); + } + elsif ($url eq $AdminPanel::Rpmdragora::gui::hidden_info{files}) { + $info_options->{files} = 1; + AdminPanel::Rpmdragora::gui::setInfoOnWidget($pkg, $infoBox, $info_options); + } + elsif ($url eq $AdminPanel::Rpmdragora::gui::hidden_info{changelog}) { + $info_options->{changelog} = 1; + AdminPanel::Rpmdragora::gui::setInfoOnWidget($pkg, $infoBox, $info_options); + } + else { + # default it's really a URL + AdminPanel::Rpmdragora::gui::run_browser($url); + } + } + } elsif ($eventType == $yui::YEvent::WidgetEvent) { # widget selected my $widget = $event->widget(); @@ -295,6 +322,7 @@ sub run_treeview_dialog { my $item = $packageTbl->selectedItem(); if ($item) { my $pkg = $data{$item->index()}{fullname}; + $info_options = {}; AdminPanel::Rpmdragora::gui::setInfoOnWidget($pkg, $infoBox); } my $wEvent = yui::toYWidgetEvent($event); @@ -308,9 +336,6 @@ sub run_treeview_dialog { } yui::YUI::app()->normalCursor(); } - elsif ($widget == $infoBox) { - print "RichText widget Event\n"; - } elsif ($widget == $selectButton) { yui::YUI::app()->busyCursor(); $initialized = 0; |