Allocate wxWidget identifiers dynamically to avoid potential conflics.

This commit is contained in:
Henrik Brix Andersen 2012-08-02 21:11:36 +02:00
parent 1f6b7ce7e8
commit 69fa308f55
2 changed files with 19 additions and 19 deletions

View File

@ -15,20 +15,20 @@ use Wx 0.9901 qw(:bitmap :dialog :frame :icon :id :misc :systemsettings :topleve
use Wx::Event qw(EVT_CLOSE EVT_MENU);
use base 'Wx::App';
use constant MI_LOAD_CONF => 1;
use constant MI_EXPORT_CONF => 2;
use constant MI_QUICK_SLICE => 3;
use constant MI_REPEAT_QUICK => 4;
use constant MI_QUICK_SAVE_AS => 5;
use constant MI_SLICE_SVG => 6;
use constant MI_LOAD_CONF => &Wx::NewId;
use constant MI_EXPORT_CONF => &Wx::NewId;
use constant MI_QUICK_SLICE => &Wx::NewId;
use constant MI_REPEAT_QUICK => &Wx::NewId;
use constant MI_QUICK_SAVE_AS => &Wx::NewId;
use constant MI_SLICE_SVG => &Wx::NewId;
use constant MI_TAB_PLATER => 7;
use constant MI_TAB_PRINT => 8;
use constant MI_TAB_FILAMENT => 9;
use constant MI_TAB_PRINTER => 10;
use constant MI_TAB_PLATER => &Wx::NewId;
use constant MI_TAB_PRINT => &Wx::NewId;
use constant MI_TAB_FILAMENT => &Wx::NewId;
use constant MI_TAB_PRINTER => &Wx::NewId;
use constant MI_CONF_WIZARD => 11;
use constant MI_WEBSITE => 12;
use constant MI_CONF_WIZARD => &Wx::NewId;
use constant MI_WEBSITE => &Wx::NewId;
our $datadir;
our $Settings;

View File

@ -12,13 +12,13 @@ use Wx qw(:bitmap :brush :button :cursor :dialog :filedialog :font :keycode :ico
use Wx::Event qw(EVT_BUTTON EVT_COMMAND EVT_KEY_DOWN EVT_LIST_ITEM_DESELECTED EVT_LIST_ITEM_SELECTED EVT_MOUSE_EVENTS EVT_PAINT EVT_TOOL);
use base 'Wx::Panel';
use constant TB_MORE => 1;
use constant TB_LESS => 2;
use constant TB_45CW => 3;
use constant TB_45CCW => 4;
use constant TB_ROTATE => 5;
use constant TB_SCALE => 6;
use constant TB_SPLIT => 7;
use constant TB_MORE => &Wx::NewId;
use constant TB_LESS => &Wx::NewId;
use constant TB_45CW => &Wx::NewId;
use constant TB_45CCW => &Wx::NewId;
use constant TB_ROTATE => &Wx::NewId;
use constant TB_SCALE => &Wx::NewId;
use constant TB_SPLIT => &Wx::NewId;
my $THUMBNAIL_DONE_EVENT : shared = Wx::NewEventType;
my $PROGRESS_BAR_EVENT : shared = Wx::NewEventType;