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
da81a7c4
Commit
da81a7c4
authored
Jan 21, 2011
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
blinker tweaks
parent
3b3af165
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
src/gui/set/console_panel.cpp
src/gui/set/console_panel.cpp
+4
-2
src/gui/set/console_panel.hpp
src/gui/set/console_panel.hpp
+1
-1
src/gui/set/window.cpp
src/gui/set/window.cpp
+8
-0
No files found.
src/gui/set/console_panel.cpp
View file @
da81a7c4
...
@@ -420,8 +420,10 @@ void ConsolePanel::doPaste() { entry->doPaste(); }
...
@@ -420,8 +420,10 @@ void ConsolePanel::doPaste() { entry->doPaste(); }
void
ConsolePanel
::
start_blinker
()
{
void
ConsolePanel
::
start_blinker
()
{
if
(
new_errors_since_last_view
)
{
if
(
new_errors_since_last_view
)
{
blinker_state
=
0
;
blinker_state
=
0
;
blinker_timer
.
Start
(
BLINK_TIME
);
update_blinker
();
update_blinker
();
if
(
blinker_state
<
MAX_BLINKS
)
{
blinker_timer
.
Start
(
BLINK_TIME
);
}
}
}
}
}
void
ConsolePanel
::
stop_blinker
()
{
void
ConsolePanel
::
stop_blinker
()
{
...
@@ -432,7 +434,7 @@ void ConsolePanel::stop_blinker() {
...
@@ -432,7 +434,7 @@ void ConsolePanel::stop_blinker() {
}
}
void
ConsolePanel
::
onTimer
(
wxTimerEvent
&
)
{
void
ConsolePanel
::
onTimer
(
wxTimerEvent
&
)
{
blinker_state
++
;
blinker_state
++
;
if
(
blinker_state
>
MAX_BLINKS
)
{
if
(
blinker_state
>
=
MAX_BLINKS
)
{
blinker_timer
.
Stop
();
blinker_timer
.
Stop
();
}
}
update_blinker
();
update_blinker
();
...
...
src/gui/set/console_panel.hpp
View file @
da81a7c4
...
@@ -61,7 +61,7 @@ class ConsolePanel : public SetWindowPanel {
...
@@ -61,7 +61,7 @@ class ConsolePanel : public SetWindowPanel {
MessageType
new_errors_since_last_view
;
MessageType
new_errors_since_last_view
;
int
blinker_state
;
int
blinker_state
;
wxTimer
blinker_timer
;
wxTimer
blinker_timer
;
static
const
int
MAX_BLINKS
=
5
;
static
const
int
MAX_BLINKS
=
6
;
static
const
int
BLINK_TIME
=
1000
;
static
const
int
BLINK_TIME
=
1000
;
void
stop_blinker
();
void
stop_blinker
();
...
...
src/gui/set/window.cpp
View file @
da81a7c4
...
@@ -143,6 +143,12 @@ SetWindow::SetWindow(Window* parent, const SetP& set)
...
@@ -143,6 +143,12 @@ SetWindow::SetWindow(Window* parent, const SetP& set)
wxSizer
*
s
=
new
wxBoxSizer
(
wxVERTICAL
);
wxSizer
*
s
=
new
wxBoxSizer
(
wxVERTICAL
);
s
->
Add
(
tabBar
,
0
,
wxEXPAND
|
wxBOTTOM
,
3
);
s
->
Add
(
tabBar
,
0
,
wxEXPAND
|
wxBOTTOM
,
3
);
SetSizer
(
s
);
SetSizer
(
s
);
#if defined(__WXMSW__) && defined(TBSTYLE_EX_DOUBLEBUFFER)
// Use double buffering
HWND
hWND
=
(
HWND
)
tabBar
->
GetHWND
();
int
style
=
::
SendMessage
(
hWND
,
TB_GETEXTENDEDSTYLE
,
0
,
0
);
::
SendMessage
(
hWND
,
TB_SETEXTENDEDSTYLE
,
style
|
LVS_EX_DOUBLEBUFFER
,
0
);
#endif
// panels
// panels
addPanel
(
menuWindow
,
tabBar
,
new
CardsPanel
(
this
,
wxID_ANY
),
0
,
_
(
"window_cards"
),
_
(
"cards tab"
));
addPanel
(
menuWindow
,
tabBar
,
new
CardsPanel
(
this
,
wxID_ANY
),
0
,
_
(
"window_cards"
),
_
(
"cards tab"
));
...
@@ -255,6 +261,8 @@ void SetWindow::setPanelIcon(SetWindowPanel* panel, wxBitmap const& icon) {
...
@@ -255,6 +261,8 @@ void SetWindow::setPanelIcon(SetWindowPanel* panel, wxBitmap const& icon) {
if
(
panels
[
i
]
==
panel
)
{
if
(
panels
[
i
]
==
panel
)
{
wxToolBar
*
tabBar
=
(
wxToolBar
*
)
FindWindow
(
ID_TAB_BAR
);
wxToolBar
*
tabBar
=
(
wxToolBar
*
)
FindWindow
(
ID_TAB_BAR
);
tabBar
->
SetToolNormalBitmap
(
ID_WINDOW_MIN
+
i
,
icon
);
tabBar
->
SetToolNormalBitmap
(
ID_WINDOW_MIN
+
i
,
icon
);
// TODO: this could be done better, wx requires a full new Realize of the toolbar, but on win32 a single message would do
// if only we could set up the imagelist correctly.
return
;
return
;
}
}
}
}
...
...
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