Changeset 10474
- Timestamp:
- 02/02/10 23:34:57 (6 months ago)
- Files:
-
- 1 modified
-
trunk/Padre/lib/Padre/Wx/Dialog/RegexEditor.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Wx/Dialog/RegexEditor.pm
r10473 r10474 58 58 # 59 59 # A private method that returns a hash of regex groups along with their meaning 60 # 60 # 61 61 sub _regex_groups { 62 62 my $self = shift; … … 152 152 my %regex_groups = $self->_regex_groups; 153 153 154 foreach my $code ( keys %regex_groups) {155 my %sub_group = %{ $regex_groups{$code}};154 foreach my $code ( keys %regex_groups ) { 155 my %sub_group = %{ $regex_groups{$code} }; 156 156 $self->{$code} = Wx::Button->new( 157 157 $self, -1, $sub_group{label}, 158 158 ); 159 # $self->{menu}->Append( -1, $subgroup{label} ); 160 # $self->{menu}->AppendSeparator(); 161 # my $subgroup_value = $subgroup{value}; 162 # foreach my $name (keys %subgroup_value) { 163 # my $menu_item = $self->{menu}->Append( -1, $subgroup_value{$name} ); 164 # $self->{menu}->AppendSeparator(); 165 # } 166 } 167 # Wx::Event::EVT_MENU( 168 # $self, 169 # $self->{menu}, 170 # sub { 171 # }, 172 # ); 159 160 # $self->{menu}->Append( -1, $subgroup{label} ); 161 # $self->{menu}->AppendSeparator(); 162 # my $subgroup_value = $subgroup{value}; 163 # foreach my $name (keys %subgroup_value) { 164 # my $menu_item = $self->{menu}->Append( -1, $subgroup_value{$name} ); 165 # $self->{menu}->AppendSeparator(); 166 # } 167 } 168 169 # Wx::Event::EVT_MENU( 170 # $self, 171 # $self->{menu}, 172 # sub { 173 # }, 174 # ); 173 175 174 176 # Matching radio button … … 176 178 $self, -1, Wx::gettext('Matching'), 177 179 ); 178 180 179 181 # Substitution radio button 180 182 $self->{substituting} = Wx::RadioButton->new( … … 204 206 my $regex = Wx::BoxSizer->new(Wx::wxVERTICAL); 205 207 $regex->Add( 206 $self->{regex}, 207 1, 208 Wx::wxALL | Wx::wxALIGN_CENTER_HORIZONTAL | Wx::wxEXPAND, 208 $self->{regex}, 209 1, 210 Wx::wxALL | Wx::wxALIGN_CENTER_HORIZONTAL | Wx::wxEXPAND, 209 211 1 210 212 ); 211 213 212 214 my $regex_groups = Wx::BoxSizer->new(Wx::wxVERTICAL); 213 foreach my $code ( keys %regex_groups) {215 foreach my $code ( keys %regex_groups ) { 214 216 $regex_groups->Add( $self->{$code}, 0, Wx::wxEXPAND | Wx::wxALIGN_CENTER_HORIZONTAL, 1 ); 215 217 } 216 218 217 219 my $combined = Wx::BoxSizer->new(Wx::wxHORIZONTAL); 218 $combined->Add( $regex, 2, Wx::wxALL | Wx::wxEXPAND, 0 );220 $combined->Add( $regex, 2, Wx::wxALL | Wx::wxEXPAND, 0 ); 219 221 $combined->Add( $regex_groups, 0, Wx::wxALL | Wx::wxEXPAND, 0 ); 220 222 221 223 # Vertical layout of the left hand side 222 224 my $left = Wx::BoxSizer->new(Wx::wxVERTICAL); 223 $left->Add( $operation, 0, Wx::wxALL | Wx::wxEXPAND, 2 );224 $left->Add( $modifiers, 0, Wx::wxALL | Wx::wxEXPAND, 2 );225 $left->Add( $operation, 0, Wx::wxALL | Wx::wxEXPAND, 2 ); 226 $left->Add( $modifiers, 0, Wx::wxALL | Wx::wxEXPAND, 2 ); 225 227 $left->AddSpacer(5); 226 $left->Add( $regex_label, 0, Wx::wxALL | Wx::wxEXPAND, 1 ); 227 $left->Add( $combined, 0, Wx::wxALL | Wx::wxEXPAND, 2 );228 228 $left->Add( $regex_label, 0, Wx::wxALL | Wx::wxEXPAND, 1 ); 229 $left->Add( $combined, 0, Wx::wxALL | Wx::wxEXPAND, 2 ); 230 229 231 $left->Add( $substitute_label, 0, Wx::wxALL | Wx::wxEXPAND, 1 ); 230 232 $left->Add(
