… | |
… | |
44 | |
44 | |
45 | $self->pack_start (my $sw = Gtk2::ScrolledWindow->new, 1, 1, 0); |
45 | $self->pack_start (my $sw = Gtk2::ScrolledWindow->new, 1, 1, 0); |
46 | $sw->set_shadow_type ('etched-in'); |
46 | $sw->set_shadow_type ('etched-in'); |
47 | $sw->set_policy ('automatic', 'automatic'); |
47 | $sw->set_policy ('automatic', 'automatic'); |
48 | $sw->add ($tv); |
48 | $sw->add ($tv); |
49 | |
|
|
50 | $self->pack_start (my $e = $self->{new_attr_entry} = Gtk2::Entry->new, 0, 1, 0); |
|
|
51 | $e->signal_connect (activate => sub { |
|
|
52 | my ($e) = @_; |
|
|
53 | |
|
|
54 | $self->set_attr ($e->get_text, '<insert value>'); |
|
|
55 | $e->set_text (''); |
|
|
56 | |
|
|
57 | }); |
|
|
58 | } |
49 | } |
59 | |
50 | |
60 | sub SET_PROPERTY { |
51 | sub SET_PROPERTY { |
61 | my ($self, $pspec, $newval) = @_; |
52 | my ($self, $pspec, $newval) = @_; |
62 | |
53 | |
… | |
… | |
65 | if ($pspec eq 'editable') { |
56 | if ($pspec eq 'editable') { |
66 | |
57 | |
67 | if ($newval) { |
58 | if ($newval) { |
68 | |
59 | |
69 | $self->{edit_column}->set (editable => 1); |
60 | $self->{edit_column}->set (editable => 1); |
70 | $self->{new_attr_entry}->set (sensitive => 1); |
|
|
71 | |
61 | |
72 | } else { |
62 | } else { |
73 | |
63 | |
74 | $self->{edit_column}->set (editable => 0); |
64 | $self->{edit_column}->set (editable => 0); |
75 | $self->{new_attr_entry}->set (sensitive => 0); |
|
|
76 | } |
65 | } |
77 | |
66 | |
78 | } elsif ($pspec eq 'raw') { |
67 | } elsif ($pspec eq 'raw') { |
79 | |
68 | |
80 | $self->{raw} = $newval; |
69 | $self->{raw} = $newval; |
… | |
… | |
131 | |
120 | |
132 | # these are all attribute keys that will be _displayed_ |
121 | # these are all attribute keys that will be _displayed_ |
133 | my @attrib_keys = |
122 | my @attrib_keys = |
134 | grep { |
123 | grep { |
135 | # filter out msg, lore they are special and multiline! |
124 | # filter out msg, lore they are special and multiline! |
|
|
125 | $_ ne 'msg' |
136 | $_ ne 'msg' and $_ ne 'lore' |
126 | and $_ ne 'lore' |
|
|
127 | and ($self->{raw} or $_ ne '_name') # remove _name only when not raw |
137 | } ( |
128 | } ( |
138 | keys %$arch, # include all defined attribute keys |
129 | keys %$arch, # include all defined attribute keys |
139 | grep { |
130 | grep { |
140 | # we exclude the interesting attributes from |
131 | # we exclude the interesting attributes from |
141 | # the Typemap when raw is enabled |
132 | # the Typemap when raw is enabled |