aboutsummaryrefslogtreecommitdiffstats
path: root/modules/rpmdragora/dragoraUpdate
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rpmdragora/dragoraUpdate')
-rwxr-xr-xmodules/rpmdragora/dragoraUpdate31
1 files changed, 28 insertions, 3 deletions
diff --git a/modules/rpmdragora/dragoraUpdate b/modules/rpmdragora/dragoraUpdate
index b0c4247d..cdc5c478 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;