Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
9a181729
Commit
9a181729
authored
17 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Change window stacking method.
parent
e54b48f1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/syncterm/htmlwin.cpp
+16
-3
16 additions, 3 deletions
src/syncterm/htmlwin.cpp
src/syncterm/htmlwin.h
+1
-0
1 addition, 0 deletions
src/syncterm/htmlwin.h
src/syncterm/term.c
+6
-4
6 additions, 4 deletions
src/syncterm/term.c
with
23 additions
and
7 deletions
src/syncterm/htmlwin.cpp
+
16
−
3
View file @
9a181729
...
...
@@ -49,6 +49,7 @@ static bool html_thread_running=false;
enum
html_window_state
{
HTML_WIN_STATE_RAISED
,
HTML_WIN_STATE_LOWERED
,
HTML_WIN_STATE_ICONIZED
,
HTML_WIN_STATE_HIDDEN
};
...
...
@@ -178,6 +179,13 @@ void MyHTML::OnState(wxCommandEvent &event)
htmlWindow
->
Raise
();
htmlWindow
->
SetFocus
();
break
;
case
HTML_WIN_STATE_LOWERED
:
if
(
!
frame
->
IsShown
())
frame
->
Show
();
if
(
frame
->
IsIconized
())
frame
->
Iconize
(
false
);
frame
->
Lower
();
break
;
case
HTML_WIN_STATE_ICONIZED
:
if
(
!
frame
->
IsShown
())
frame
->
Show
();
...
...
@@ -252,7 +260,7 @@ bool MyApp::OnInit()
,
wxT
(
"SyncTERM HTML"
)
,
wxPoint
(
window_xpos
,
window_ypos
)
,
wxSize
(
window_width
,
window_height
)
,
wx
CLOS
E_BOX
|
wxM
IN
IMIZE_BOX
|
wxCAPTION
|
wxCLIP_CHILDREN
,
wx
MINIMIZ
E_BOX
|
/*
wxM
AX
IMIZE_BOX
*/
|
wxRESIZE_BORDER
|
/* wxSYSTEM_MENU */
|
wxCAPTION
|
wxCLOSE_BOX
|
/*
wxCLIP_CHILDREN
*/
);
htmlWindow
=
new
MyHTML
(
frame
,
HTML_ID
);
htmlWindow
->
SetRelatedFrame
(
frame
,
wxT
(
"SyncTERM HTML : %s"
));
...
...
@@ -260,8 +268,6 @@ bool MyApp::OnInit()
wxInitAllImageHandlers
();
frame
->
Show
();
SetTopWindow
(
frame
);
while
(
wxTheApp
->
Pending
())
wxTheApp
->
Dispatch
();
sem_post
(
&
appstarted
);
return
true
;
}
...
...
@@ -330,6 +336,13 @@ extern "C" {
sem_wait
(
&
state_changed
);
}
void
lower_html
(
void
)
{
html_window_requested_state
=
HTML_WIN_STATE_LOWERED
;
send_html_event
(
state_event
);
sem_wait
(
&
state_changed
);
}
void
html_commit
(
void
)
{
pthread_mutex_lock
(
&
update_mutex
);
...
...
This diff is collapsed.
Click to expand it.
src/syncterm/htmlwin.h
+
1
−
0
View file @
9a181729
...
...
@@ -15,6 +15,7 @@ int run_html(int width, int height, int xpos, int ypos, void(*callback)(const ch
void
hide_html
(
void
);
void
iconize_html
(
void
);
void
raise_html
(
void
);
void
lower_html
(
void
);
void
add_html_char
(
char
ch
);
void
add_html
(
const
char
*
buf
);
void
html_commit
(
void
);
...
...
This diff is collapsed.
Click to expand it.
src/syncterm/term.c
+
6
−
4
View file @
9a181729
...
...
@@ -40,7 +40,7 @@ static struct text_info log_ti;
#ifdef WITH_WXWIDGETS
enum
html_mode
{
HTML_MODE_HIDDEN
,
HTML_MODE_
ICONIZ
ED
,
HTML_MODE_
LOWER
ED
,
HTML_MODE_RAISED
,
HTML_MODE_READING
};
...
...
@@ -1326,8 +1326,10 @@ BOOL doterm(struct bbslist *bbs)
else
html_supported
=
HTML_NOTSUPPORTED
;
}
if
(
html_supported
==
HTML_SUPPORTED
)
if
(
html_supported
==
HTML_SUPPORTED
)
{
conn_send
(
htmlresponse
,
sizeof
(
htmlresponse
)
-
1
,
0
);
hide_html
();
}
}
else
{
show_html
(
""
);
...
...
@@ -1384,8 +1386,8 @@ BOOL doterm(struct bbslist *bbs)
#ifdef WITH_WXWIDGETS
if
(
html_mode
==
HTML_MODE_RAISED
)
{
if
(
html_startx
!=
wherex
()
||
html_starty
!=
wherey
())
{
iconize
_html
();
html_mode
=
HTML_MODE_
ICONIZ
ED
;
lower
_html
();
html_mode
=
HTML_MODE_
LOWER
ED
;
}
}
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment