Getting column 2 in selected row of TreeView?


I need to get column 2 data (the nick) from row i clicked on with mouse button. The events are fine, i
just don't get how to get selection? if i use row-activated event i need to double click the row.
any ideas? screenshot is at .

Also i haven't made up my mind how to make another window from gladexml file. Do i need to add another
window which isn't showed to main gladexml file and duplicate it somehow, or do i need to generate new
windows from seperate gladexml file and store them in hash? If so, how i could get $to arg when i click
send button on that win?

I have thought of this:
sub compose_msg {
    my $to = $_[0]{'data'}[1][1]; # $to must be nick at selection.
    my $button = $_[1]->type;
    if ($button eq 'button-press') {
        # My guessings here...
        my $usertree = $gladexml->get_widget('UserTree');
        my $selection = $usertree->get_selection;
        my $path = $selection->get_selected_rows;
        add_text("act", Dumper($path));
            $msgs_to{$to} = Gtk2::GladeXML->new('');
            $msgs_to{$to}->get_widget('wTo')->set_title("Message to $to");
But this seems crazy :)
I would apreciate any help.
Sincerely, ArtÅras 'arturaz' Ålajus
You can find me at: nick arturaz nick arturaz
ICQ: 157929934
Jabber: arturaz akl lt

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]