Opened 2 years ago

Closed 23 months ago

#1460 closed defect (fixed)

File menu bar disappeared on Preferences Saved

Reported by: bowtie Owned by: adamk, alias, bowtie
Priority: major Milestone:
Component: Preference System Version: 0.96
Keywords: Cc:

Description

See the blog entry by Kirk Kimmel
http://blogs.perl.org/users/kirk_kimmel/2012/11/using-padre-for-the-first-time.html

Next I went to Tools, Preferences to change a few options around. When I
saved the changes the File menu bar disappeared, which is no good.

Change History (7)

comment:1 Changed 2 years ago by bowtie

bowtie:
Tools -> Preferences SAVE is corrupting menu bar (it's redraw related, I
think)

If you resize padre screen it gets fixed ( eg full screen and back)

I looked at this months ago, I could not see why the redraw was not working.

I think it's a side affect from Plug-in Manager two ( 6-9 mouths ago, only
affect linux/ubuntu).

I just came to the conclusion, that as it only affected me it was a Wx OS
compatibility issue.

Can I have a kick in right direction and I will take another look, thanks

adamk:
Start Padre in the debugger.

perl dev -d

b postpone Padre::Wx::Dialog::Preferences::run

c

Should get you to the main method that launches the preferences
dialog, and then saves configuration changes after it closes.

comment:2 Changed 2 years ago by bowtie

Observations

the SAVE Button in Padre::Wx::FBP::Preferences dose not aper to have an OnButtonClick? Event as the other buttons.

I was expecting to find an event related method, so I don't quite understand what happens when we click on SAVE.

This method seams to be the culprit

# re-create menu to activate shortcuts
# TO DO Massive encapsulation violation
sub _recreate_menubar {
    my $self = shift;
    my $main = $self->main;

    delete $main->{menu};
    $main->{menu} = Padre::Wx::Menubar->new($main);
    $main->SetMenuBar( $main->menu->wx );
    $main->refresh;
}

if I hack it so

sub _recreate_menubar {
    my $self = shift;
    my $main = $self->main;

    $main->relocale;
}

we will retain the menu, but Padre will require a cold boot for some changes to take affect, also generates some cruff in terminal.

comment:3 Changed 2 years ago by bowtie

  • Owner set to adamk, alias, bowtie
  • Status changed from new to assigned

comment:4 Changed 2 years ago by bowtie

stepped all the way back to r16539

to when this code first appeared.

as a side note, when a Feature is enabled or disabled, the menus do not get updated

comment:5 Changed 23 months ago by bowtie

hacked so in r19519

package Padre::Wx::Dialog::Preferences;

# re-create menu to activate shortcuts
# TO DO Massive encapsulation violation
sub _recreate_menubar {
    my $self = shift;
    my $main = $self->main;
    
    #ToDo this is just a quick fix, to stop menu bar Fup's from happing (BOWTIE)

    # delete $main->{menu};
    # $main->{menu} = Padre::Wx::Menubar->new($main);
    # $main->SetMenuBar( $main->menu->wx );
    $main->refresh;
}

comment:6 Changed 23 months ago by bowtie

  • Summary changed from File menu bar disappeared to File menu bar disappeared on Preferences Saved

comment:7 Changed 23 months ago by bowtie

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.