Ticket #1378 (new defect)

Opened 2 years ago

Last modified 22 months ago

Creating an editor theme file while Padre is running, and then selecting the last Editor Theme in the drop-down box, causes Padre to crash

Reported by: run4flat Owned by:
Priority: minor Milestone:
Component: Preference System Version: 0.92
Keywords: theme Cc:

Description

Steps to reproduce:
1) Start Padre
2) Create a new theme file
3) Select last Editor Style under Tools->Preferences->Appearance

---
I wanted to get my line highlight color to be light blue instead of bright yellow. For some reason, I seem unable to modify the normal preferences. That, however, is not the bug.

I tried to address this issue by creating my own style file. I created this file while Padre was already running. I was quite pleased that Tools->Preferences->Appearance->Editor Style was immediately populated with my new theme, but it wasn't being selected for some reason. Then I selected the last theme, Ultraedit, and Padre crashed with this message:

===========================
Use of uninitialized value $name in concatenation (.) or string at /home/visitors/dcmertens/perl5/lib/perl5/Padre/Wx/Theme.pm line 116.
Use of uninitialized value $name in concatenation (.) or string at /home/visitors/dcmertens/perl5/lib/perl5/Padre/Wx/Theme.pm line 116.
Use of uninitialized value $name in concatenation (.) or string at /home/visitors/dcmertens/perl5/lib/perl5/Padre/Wx/Theme.pm line 191.
The style does not exist at /home/visitors/dcmertens/perl5/lib/perl5/Padre/Wx/Theme.pm line 191.
Perl exited with active threads:

3 running and unjoined
0 finished and unjoined
0 running and detached

===========================

It looks like the drop-down takes new files into account, but something under Padre::Wx::Theme does not.

Change History

comment:1 Changed 2 years ago by bowtie

find the default.txt

mine is located

~/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl​/5.14.2/auto/share/dist/Padre/themes/default.txt

copy to your local dir, mine is

~/.local/share/.padre/themes/my_theme.txt

edit file

name en-gb My Theme

then test

The most recent edition of Padre seems to not pay attention to my Editor Current Line Background Colour preference.

You will have to manual edit my_theme.txt locally you want "SetCaretLineBackground?" have fun.

comment:2 Changed 2 years ago by run4flat

Thanks for this hint.

1) Changing the preferences was not the point of the bug report, although that is a nuisance. The issue was the crash, which indicates that Padre::Wx::Theme gets its information from a different place as the drop-down in the preferences dialog.

2) Unfortunately, Padre does not pay any attention to this color preference in this file. In fact, the resulting style has no caret line background color at all. It's just a white background (against a white background for all the other lines).

comment:3 Changed 22 months ago by bowtie

Is this still the case with Padre 0.96?

Note: See TracTickets for help on using tickets.