ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/kgsueme/kgsueme/userlist.pl
(Generate patch)

Comparing kgsueme/kgsueme/userlist.pl (file contents):
Revision 1.1 by pcg, Sun Jun 1 04:52:16 2003 UTC vs.
Revision 1.2 by pcg, Sun Jun 1 11:10:01 2003 UTC

4 4
5sub new { 5sub new {
6 my $class = shift; 6 my $class = shift;
7 my $self = $class->SUPER::new(@_); 7 my $self = $class->SUPER::new(@_);
8 8
9 $self->{model} = new Gtk2::ListStore Glib::String, Glib::String, Glib::Int, Glib::String; 9 $self->{model} = new Gtk2::ListStore Glib::String, Glib::String, Glib::String, Glib::Int, Glib::String;
10 gtk::state $self->{model}, "userlist::model", undef, modelsortorder => [2, 'descending']; 10 gtk::state $self->{model}, "userlist::model", undef, modelsortorder => [2, 'descending'];
11 11
12 $self->{widget} = new Gtk2::TreeView $self->{model}; 12 $self->{widget} = new Gtk2::TreeView $self->{model};
13 13
14 $self->{widget}->set_search_column(1); 14 $self->{widget}->set_search_column(1);
18 $column->set_sort_column_id(1); 18 $column->set_sort_column_id(1);
19 $column->set(sizing => 'grow-only'); 19 $column->set(sizing => 'grow-only');
20 $self->{widget}->append_column ($column); 20 $self->{widget}->append_column ($column);
21 21
22 my $column = $self->{rlcolumns}[1] = 22 my $column = $self->{rlcolumns}[1] =
23 Gtk2::TreeViewColumn->new_with_attributes ("Rk", $gtk::text_renderer, text => 1); 23 Gtk2::TreeViewColumn->new_with_attributes ("Rk", $gtk::text_renderer, text => 2);
24 $column->set_sort_column_id(2); 24 $column->set_sort_column_id(2);
25 $column->set(sizing => 'grow-only'); 25 $column->set(sizing => 'grow-only');
26 $self->{widget}->append_column ($column); 26 $self->{widget}->append_column ($column);
27 27
28 my $column = $self->{rlcolumns}[2] = 28 my $column = $self->{rlcolumns}[2] =
52 } 52 }
53 53
54 for (@$add, @$update) { 54 for (@$add, @$update) {
55 $l->set ($_->{iter} ||= $l->append, 55 $l->set ($_->{iter} ||= $l->append,
56 0, $_->{name}, 56 0, $_->{name},
57 1, lc $_->{name},
57 1, $_->rank_string, 58 2, $_->rank_string,
58 2, $_->rank, 59 3, $_->rank,
59 3, "?"); 60 4, "?");
60 } 61 }
61} 62}
62 63
631; 641;
64 65

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines