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
6528c3d6
Commit
6528c3d6
authored
Apr 23, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"Reload data" option
parent
329974b2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
1 deletion
+18
-1
data/en.mse-locale/locale
data/en.mse-locale/locale
+2
-0
src/gui/set/window.cpp
src/gui/set/window.cpp
+14
-1
src/gui/set/window.hpp
src/gui/set/window.hpp
+1
-0
src/util/window_id.hpp
src/util/window_id.hpp
+1
-0
No files found.
data/en.mse-locale/locale
View file @
6528c3d6
...
@@ -16,6 +16,7 @@ menu:
...
@@ -16,6 +16,7 @@ menu:
export
mws
:
Magic
&
Workstation
...
export
mws
:
Magic
&
Workstation
...
print
preview
:
Print
Pre
&
view
...
print
preview
:
Print
Pre
&
view
...
print
:
&
Print
...
Ctrl
+
P
print
:
&
Print
...
Ctrl
+
P
reload
data
:
Reload
Data
Ctrl
+
F5
exit
:
E
&
xit
Alt
+
F4
exit
:
E
&
xit
Alt
+
F4
edit
:
&
Edit
edit
:
&
Edit
...
@@ -103,6 +104,7 @@ help:
...
@@ -103,6 +104,7 @@ help:
export
mws
:
Export
the
set
so
it
can
be
played
with
in
Magic
Workstation
export
mws
:
Export
the
set
so
it
can
be
played
with
in
Magic
Workstation
print
preview
:
Shows
cards
as
they
will
be
printed
print
preview
:
Shows
cards
as
they
will
be
printed
print
:
Print
cards
from
this
set
print
:
Print
cards
from
this
set
reload
data
:
Reload
all
template
files
(
game
and
style
)
as
well
as
the
set
.
exit
:
Quits
Magic
Set
Editor
;
prompts
to
save
the
set
exit
:
Quits
Magic
Set
Editor
;
prompts
to
save
the
set
edit
:
edit
:
...
...
src/gui/set/window.cpp
View file @
6528c3d6
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include <gui/images_export_window.hpp>
#include <gui/images_export_window.hpp>
#include <gui/icon_menu.hpp>
#include <gui/icon_menu.hpp>
#include <gui/util.hpp>
#include <gui/util.hpp>
#include <util/io/package_manager.hpp>
#include <util/window_id.hpp>
#include <util/window_id.hpp>
#include <data/game.hpp>
#include <data/game.hpp>
#include <data/set.hpp>
#include <data/set.hpp>
...
@@ -63,6 +64,8 @@ SetWindow::SetWindow(Window* parent, const SetP& set)
...
@@ -63,6 +64,8 @@ SetWindow::SetWindow(Window* parent, const SetP& set)
menuFile
->
AppendSeparator
();
menuFile
->
AppendSeparator
();
// menuFile->Append(ID_FILE_INSPECT, _("Inspect Internal Data..."), _("Shows a the data in the set using a tree structure"));
// menuFile->Append(ID_FILE_INSPECT, _("Inspect Internal Data..."), _("Shows a the data in the set using a tree structure"));
// menuFile->AppendSeparator();
// menuFile->AppendSeparator();
menuFile
->
Append
(
ID_FILE_RELOAD
,
_MENU_
(
"reload data"
),
_HELP_
(
"reload data"
));
menuFile
->
AppendSeparator
();
menuFile
->
Append
(
ID_FILE_PRINT_PREVIEW
,
_MENU_
(
"print preview"
),
_HELP_
(
"print preview"
));
menuFile
->
Append
(
ID_FILE_PRINT_PREVIEW
,
_MENU_
(
"print preview"
),
_HELP_
(
"print preview"
));
menuFile
->
Append
(
ID_FILE_PRINT
,
_MENU_
(
"print"
),
_HELP_
(
"print"
));
menuFile
->
Append
(
ID_FILE_PRINT
,
_MENU_
(
"print"
),
_HELP_
(
"print"
));
menuFile
->
AppendSeparator
();
menuFile
->
AppendSeparator
();
...
@@ -396,7 +399,7 @@ void SetWindow::onFileNew(wxCommandEvent&) {
...
@@ -396,7 +399,7 @@ void SetWindow::onFileNew(wxCommandEvent&) {
}
}
void
SetWindow
::
onFileOpen
(
wxCommandEvent
&
)
{
void
SetWindow
::
onFileOpen
(
wxCommandEvent
&
)
{
if
(
!
askSaveAndContinue
())
return
;
if
(
!
askSaveAndContinue
())
return
;
wxFileDialog
dlg
(
this
,
_TITLE_
(
"open set"
),
_
(
""
),
_
(
""
),
import_formats
(),
wxOPEN
);
wxFileDialog
dlg
(
this
,
_TITLE_
(
"open set"
),
_
(
""
),
_
(
""
),
import_formats
(),
wxOPEN
);
if
(
dlg
.
ShowModal
()
==
wxID_OK
)
{
if
(
dlg
.
ShowModal
()
==
wxID_OK
)
{
setSet
(
import_set
(
dlg
.
GetPath
()));
setSet
(
import_set
(
dlg
.
GetPath
()));
...
@@ -473,6 +476,15 @@ void SetWindow::onFilePrintPreview(wxCommandEvent&) {
...
@@ -473,6 +476,15 @@ void SetWindow::onFilePrintPreview(wxCommandEvent&) {
print_preview
(
this
,
set
);
print_preview
(
this
,
set
);
}
}
void
SetWindow
::
onFileReload
(
wxCommandEvent
&
)
{
if
(
!
askSaveAndContinue
())
return
;
String
filename
=
set
->
absoluteFilename
();
if
(
filename
.
empty
())
return
;
wxBusyCursor
busy
;
packages
.
destroy
();
// unload all packages
setSet
(
import_set
(
filename
));
}
void
SetWindow
::
onFileRecent
(
wxCommandEvent
&
ev
)
{
void
SetWindow
::
onFileRecent
(
wxCommandEvent
&
ev
)
{
setSet
(
import_set
(
settings
.
recent_sets
.
at
(
ev
.
GetId
()
-
ID_FILE_RECENT
)));
setSet
(
import_set
(
settings
.
recent_sets
.
at
(
ev
.
GetId
()
-
ID_FILE_RECENT
)));
}
}
...
@@ -593,6 +605,7 @@ BEGIN_EVENT_TABLE(SetWindow, wxFrame)
...
@@ -593,6 +605,7 @@ BEGIN_EVENT_TABLE(SetWindow, wxFrame)
// EVT_MENU (ID_FILE_INSPECT, SetWindow::onFileInspect)
// EVT_MENU (ID_FILE_INSPECT, SetWindow::onFileInspect)
EVT_MENU
(
ID_FILE_PRINT
,
SetWindow
::
onFilePrint
)
EVT_MENU
(
ID_FILE_PRINT
,
SetWindow
::
onFilePrint
)
EVT_MENU
(
ID_FILE_PRINT_PREVIEW
,
SetWindow
::
onFilePrintPreview
)
EVT_MENU
(
ID_FILE_PRINT_PREVIEW
,
SetWindow
::
onFilePrintPreview
)
EVT_MENU
(
ID_FILE_RELOAD
,
SetWindow
::
onFileReload
)
EVT_MENU_RANGE
(
ID_FILE_RECENT
,
ID_FILE_RECENT_MAX
,
SetWindow
::
onFileRecent
)
EVT_MENU_RANGE
(
ID_FILE_RECENT
,
ID_FILE_RECENT_MAX
,
SetWindow
::
onFileRecent
)
EVT_MENU
(
ID_FILE_EXIT
,
SetWindow
::
onFileExit
)
EVT_MENU
(
ID_FILE_EXIT
,
SetWindow
::
onFileExit
)
EVT_MENU
(
ID_EDIT_UNDO
,
SetWindow
::
onEditUndo
)
EVT_MENU
(
ID_EDIT_UNDO
,
SetWindow
::
onEditUndo
)
...
...
src/gui/set/window.hpp
View file @
6528c3d6
...
@@ -111,6 +111,7 @@ class SetWindow : public wxFrame, public SetView {
...
@@ -111,6 +111,7 @@ class SetWindow : public wxFrame, public SetView {
void
onFileExportMWS
(
wxCommandEvent
&
);
void
onFileExportMWS
(
wxCommandEvent
&
);
void
onFilePrint
(
wxCommandEvent
&
);
void
onFilePrint
(
wxCommandEvent
&
);
void
onFilePrintPreview
(
wxCommandEvent
&
);
void
onFilePrintPreview
(
wxCommandEvent
&
);
void
onFileReload
(
wxCommandEvent
&
);
void
onFileRecent
(
wxCommandEvent
&
);
void
onFileRecent
(
wxCommandEvent
&
);
void
onFileExit
(
wxCommandEvent
&
);
void
onFileExit
(
wxCommandEvent
&
);
...
...
src/util/window_id.hpp
View file @
6528c3d6
...
@@ -38,6 +38,7 @@ enum MenuID {
...
@@ -38,6 +38,7 @@ enum MenuID {
,
ID_FILE_PRINT
=
wxID_PRINT
,
ID_FILE_PRINT
=
wxID_PRINT
,
ID_FILE_PRINT_PREVIEW
=
wxID_PREVIEW
,
ID_FILE_PRINT_PREVIEW
=
wxID_PREVIEW
,
ID_FILE_INSPECT
=
8
,
ID_FILE_INSPECT
=
8
,
ID_FILE_RELOAD
=
9
,
ID_FILE_RECENT
=
wxID_FILE1
,
ID_FILE_RECENT
=
wxID_FILE1
,
ID_FILE_RECENT_MAX
=
wxID_FILE9
,
ID_FILE_RECENT_MAX
=
wxID_FILE9
...
...
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