Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
d5ecd0b9
Commit
d5ecd0b9
authored
Dec 07, 2010
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added window showing profiler statistics
parent
72f83dc6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
src/gui/set/window.cpp
src/gui/set/window.cpp
+14
-5
src/gui/set/window.hpp
src/gui/set/window.hpp
+1
-0
No files found.
src/gui/set/window.cpp
View file @
d5ecd0b9
...
...
@@ -70,6 +70,9 @@ SetWindow::SetWindow(Window* parent, const SetP& set)
menuFile
->
Append
(
wxID_ANY
,
_
(
"export"
),
_MENU_
(
"export"
),
_HELP_
(
"export"
),
wxITEM_NORMAL
,
menuExport
);
menuFile
->
AppendSeparator
();
menuFile
->
Append
(
ID_FILE_CHECK_UPDATES
,
_MENU_
(
"check updates"
),
_HELP_
(
"check updates"
));
#if USE_SCRIPT_PROFILING
menuFile
->
Append
(
ID_FILE_PROFILER
,
_MENU_
(
"show profiler"
),
_HELP_
(
"show profiler"
));
#endif
// menuFile->Append(ID_FILE_INSPECT, _("Inspect Internal Data..."), _("Shows a the data in the set using a tree structure"));
// menuFile->AppendSeparator();
menuFile
->
Append
(
ID_FILE_RELOAD
,
_MENU_
(
"reload data"
),
_HELP_
(
"reload data"
));
...
...
@@ -117,7 +120,7 @@ SetWindow::SetWindow(Window* parent, const SetP& set)
SetStatusText
(
_HELP_
(
"welcome"
));
// tool bar
wxToolBar
*
tb
=
CreateToolBar
(
wxTB_FLAT
|
wxNO_BORDER
|
wxTB_HORIZONTAL
);
wxToolBar
*
tb
=
CreateToolBar
(
wxTB_FLAT
|
wxNO_BORDER
|
wxTB_HORIZONTAL
|
wxTB_NODIVIDER
);
tb
->
SetToolBitmapSize
(
wxSize
(
18
,
18
));
tb
->
AddTool
(
ID_FILE_NEW
,
_
(
""
),
load_resource_tool_image
(
_
(
"new"
)),
wxNullBitmap
,
wxITEM_NORMAL
,
_TOOLTIP_
(
"new set"
),
_HELP_
(
"new set"
));
tb
->
AddTool
(
ID_FILE_OPEN
,
_
(
""
),
load_resource_tool_image
(
_
(
"open"
)),
wxNullBitmap
,
wxITEM_NORMAL
,
_TOOLTIP_
(
"open set"
),
_HELP_
(
"open set"
));
...
...
@@ -364,7 +367,7 @@ bool SetWindow::askSaveAndContinue() {
try
{
if
(
set
->
needSaveAs
())
{
// need save as
wxFileDialog
dlg
(
this
,
_TITLE_
(
"save set"
),
settings
.
default_set_dir
,
set
->
short_name
,
export_formats
(
*
set
->
game
),
wx
SAVE
|
wx
OVERWRITE_PROMPT
);
wxFileDialog
dlg
(
this
,
_TITLE_
(
"save set"
),
settings
.
default_set_dir
,
set
->
short_name
,
export_formats
(
*
set
->
game
),
wx
FD_SAVE
|
wxFD_
OVERWRITE_PROMPT
);
if
(
dlg
.
ShowModal
()
==
wxID_OK
)
{
settings
.
default_set_dir
=
dlg
.
GetDirectory
();
export_set
(
*
set
,
dlg
.
GetPath
(),
dlg
.
GetFilterIndex
());
...
...
@@ -478,7 +481,7 @@ void SetWindow::onFileNew(wxCommandEvent&) {
void
SetWindow
::
onFileOpen
(
wxCommandEvent
&
)
{
if
(
!
settings
.
open_sets_in_new_window
&&
isOnlyWithSet
()
&&
!
askSaveAndContinue
())
return
;
wxFileDialog
dlg
(
this
,
_TITLE_
(
"open set"
),
settings
.
default_set_dir
,
_
(
""
),
import_formats
(),
wxOPEN
);
wxFileDialog
dlg
(
this
,
_TITLE_
(
"open set"
),
settings
.
default_set_dir
,
_
(
""
),
import_formats
(),
wx
FD_
OPEN
);
if
(
dlg
.
ShowModal
()
==
wxID_OK
)
{
settings
.
default_set_dir
=
dlg
.
GetDirectory
();
wxBusyCursor
busy
;
...
...
@@ -499,7 +502,7 @@ void SetWindow::onFileSave(wxCommandEvent& ev) {
}
void
SetWindow
::
onFileSaveAs
(
wxCommandEvent
&
)
{
wxFileDialog
dlg
(
this
,
_TITLE_
(
"save set"
),
settings
.
default_set_dir
,
set
->
short_name
,
export_formats
(
*
set
->
game
),
wx
SAVE
|
wx
OVERWRITE_PROMPT
);
wxFileDialog
dlg
(
this
,
_TITLE_
(
"save set"
),
settings
.
default_set_dir
,
set
->
short_name
,
export_formats
(
*
set
->
game
),
wx
FD_SAVE
|
wxFD_
OVERWRITE_PROMPT
);
if
(
dlg
.
ShowModal
()
==
wxID_OK
)
{
settings
.
default_set_dir
=
dlg
.
GetDirectory
();
export_set
(
*
set
,
dlg
.
GetPath
(),
dlg
.
GetFilterIndex
());
...
...
@@ -550,7 +553,7 @@ void SetWindow::onFileExportImage(wxCommandEvent&) {
if
(
!
card
)
return
;
// no card selected
String
name
=
wxFileSelector
(
_TITLE_
(
"save image"
),
settings
.
default_export_dir
,
clean_filename
(
card
->
identification
()),
_
(
""
),
_
(
"JPEG images (*.jpg)|*.jpg|Windows bitmaps (*.bmp)|*.bmp|PNG images (*.png)|*.png|TIFF images (*.tif)|*.tif"
),
wx
SAVE
|
wx
OVERWRITE_PROMPT
,
this
);
wx
FD_SAVE
|
wxFD_
OVERWRITE_PROMPT
,
this
);
if
(
!
name
.
empty
())
{
settings
.
default_export_dir
=
wxPathOnly
(
name
);
export_image
(
set
,
card
,
name
);
...
...
@@ -585,6 +588,11 @@ void SetWindow::onFileCheckUpdates(wxCommandEvent&) {
//Destroy();
}
void
show_profiler_window
(
wxWindow
*
parent
);
void
SetWindow
::
onFileProfiler
(
wxCommandEvent
&
)
{
show_profiler_window
(
this
);
}
void
SetWindow
::
onFilePrint
(
wxCommandEvent
&
)
{
ExportCardSelectionChoices
choices
;
selectionChoices
(
choices
);
...
...
@@ -744,6 +752,7 @@ BEGIN_EVENT_TABLE(SetWindow, wxFrame)
EVT_MENU
(
ID_FILE_EXPORT_APPR
,
SetWindow
::
onFileExportApprentice
)
EVT_MENU
(
ID_FILE_EXPORT_MWS
,
SetWindow
::
onFileExportMWS
)
EVT_MENU
(
ID_FILE_CHECK_UPDATES
,
SetWindow
::
onFileCheckUpdates
)
EVT_MENU
(
ID_FILE_PROFILER
,
SetWindow
::
onFileProfiler
)
// EVT_MENU (ID_FILE_INSPECT, SetWindow::onFileInspect)
EVT_MENU
(
ID_FILE_PRINT
,
SetWindow
::
onFilePrint
)
EVT_MENU
(
ID_FILE_PRINT_PREVIEW
,
SetWindow
::
onFilePrintPreview
)
...
...
src/gui/set/window.hpp
View file @
d5ecd0b9
...
...
@@ -124,6 +124,7 @@ class SetWindow : public wxFrame, public SetView {
void
onFileExportApprentice
(
wxCommandEvent
&
);
void
onFileExportMWS
(
wxCommandEvent
&
);
void
onFileCheckUpdates
(
wxCommandEvent
&
);
void
onFileProfiler
(
wxCommandEvent
&
);
void
onFilePrint
(
wxCommandEvent
&
);
void
onFilePrintPreview
(
wxCommandEvent
&
);
void
onFileReload
(
wxCommandEvent
&
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment