Getting column 2 in selected row of TreeView?
- From: ArtÅras Ålajus <x11 h2o pieva net>
- To: gtk-perl-list gnome org
- Subject: Getting column 2 in selected row of TreeView?
- Date: Wed, 10 Dec 2003 16:28:06 +0200
Hi,
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 http://h2o.pieva.net/gui.png .
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('msgto.glade');
$msgs_to{$to}->signal_autoconnect_from_package('main');
$msgs_to{$to}->get_widget('wTo')->set_title("Message to $to");
$msgs_to{$to}->get_widget('lNick')->set_text($to);
}
}
But this seems crazy :)
I would apreciate any help.
--
Sincerely, ArtÅras 'arturaz' Ålajus
You can find me at:
irc.freenode.org: nick arturaz
irc.data.lt: nick arturaz
ICQ: 157929934
Jabber: arturaz akl lt
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]