aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatteo Pasotti <matteo@mageia.org>2013-01-16 17:43:22 +0000
committerMatteo Pasotti <matteo@mageia.org>2013-01-16 17:43:22 +0000
commit87416ad0683631051338fd62e3db7f23f0169c14 (patch)
tree5bc19aa79faae599da9c1089ee23c43c2f3dc339 /modules
parentb34f259e2ac181be75162fd14aa37271757193d0 (diff)
downloadcolin-keep-87416ad0683631051338fd62e3db7f23f0169c14.tar
colin-keep-87416ad0683631051338fd62e3db7f23f0169c14.tar.gz
colin-keep-87416ad0683631051338fd62e3db7f23f0169c14.tar.bz2
colin-keep-87416ad0683631051338fd62e3db7f23f0169c14.tar.xz
colin-keep-87416ad0683631051338fd62e3db7f23f0169c14.zip
- gui.pm: rewrote get_description, get_details, get_url_link, get_main_text
- gui.pm: dropped gtk expanders from format_pkg_simplifiedinfo (Files and Changelog still missing) - gui.pm: added table_item_list hash (needed because of the -poor- YTable implementation) - rpmdragora: added detaillist_callback to handle detail_list double-click event - rpmdragora: switched info from YMultiLineEdit to YRichText widget
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/rpmdragora/rpmdragora25
1 files changed, 24 insertions, 1 deletions
diff --git a/modules/rpmdragora/rpmdragora b/modules/rpmdragora/rpmdragora
index f1f99d3..8b1f9d1 100755
--- a/modules/rpmdragora/rpmdragora
+++ b/modules/rpmdragora/rpmdragora
@@ -134,6 +134,23 @@ sub tree_callback {
return;
}
+sub detaillist_callback {
+ my ($selection, $info, $options) = @_;
+ $info->setValue("");
+ $info->setValue("<h2>".N("Informations")."</h2>");
+ my @data = get_info($options->{table_item_list}[$selection->index()],$info->parent()->parent());
+ for(@{$data[0]}){
+ if(ref $_ ne "ARRAY"){
+ $info->setValue($info->value()."<br />$_");
+ }else{
+ $info->setValue($info->value()."<br />");
+ for my $subitem(@{$_}){
+ $info->setValue($info->value()."<br />&nbsp;&nbsp;&nbsp;".$subitem);
+ }
+ }
+ }
+}
+
sub do_search($$$$$$$) {
my ($find_entry, $tree, $tree_model, $options, $current_search_type, $urpm, $pkgs) = @_;
my $entry = $find_entry->value() or return;
@@ -452,6 +469,7 @@ sub run_treeview_dialog {
$detail_list = $factory->createTable($hbox_middle,$detail_list_header);
$detail_list->setWeight(0,50);
+ $detail_list->setNotify(1);
#OLD compute_main_window_size($w);
=comment
@@ -620,7 +638,9 @@ sub run_treeview_dialog {
$find_entry->setWeight(0,10);
#OLD my $info = Gtk2::Mdv::TextView->new;
- my $info = $factory->createMultiLineEdit($hbox_bottom,"");
+ #my $info = $factory->createMultiLineEdit($hbox_bottom,"");
+ my $info = $factory->createRichText($hbox_bottom,"");
+ #$info->setDisabled();
$info->setWeight(0,40);
$info->setWeight(1,40);
#OLD $info->set_left_margin(2);
@@ -1001,6 +1021,9 @@ sub run_treeview_dialog {
elsif ($widget == $tree) {
tree_callback($tree->currentItem(),\%$options);
}
+ elsif ($widget == $detail_list){
+ detaillist_callback($detail_list->selectedItem(), $info, \%$options);
+ }
elsif ($widget == $file_menu && $mnuItemUpdateMedia) {
update_sources_interactive($urpm, transient => $my_win)
and $reload_db_and_clear_all->();