Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
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
Esteban Blanc
proview
Commits
97cbbe7d
Commit
97cbbe7d
authored
Dec 18, 2013
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wb history log, recall in input entry added
parent
0698cb78
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
12 deletions
+39
-12
xtt/lib/cow/gtk/cow_wow_gtk.cpp
xtt/lib/cow/gtk/cow_wow_gtk.cpp
+21
-4
xtt/lib/cow/gtk/cow_wow_gtk.h
xtt/lib/cow/gtk/cow_wow_gtk.h
+2
-1
xtt/lib/cow/src/cow_log.cpp
xtt/lib/cow/src/cow_log.cpp
+2
-1
xtt/lib/cow/src/cow_log.h
xtt/lib/cow/src/cow_log.h
+12
-5
xtt/lib/cow/src/cow_wow.h
xtt/lib/cow/src/cow_wow.h
+2
-1
No files found.
xtt/lib/cow/gtk/cow_wow_gtk.cpp
View file @
97cbbe7d
...
...
@@ -1347,9 +1347,17 @@ static gboolean modaldia_keypress_cb( GtkWidget *w, GdkEvent *event, gpointer da
return
sts
;
}
static
gboolean
modaldia_activate_cb
(
GtkWidget
*
w
,
gpointer
data
)
{
*
(
int
*
)
data
=
wow_eModalDialogReturn_ReturnPressed
;
gtk_main_quit
();
return
FALSE
;
}
wow_sModalInputDialog
*
CoWowGtk
::
CreateModalInputDialog
(
const
char
*
title
,
const
char
*
text
,
const
char
*
button1
,
const
char
*
button2
,
const
char
*
button3
,
const
char
*
image
,
int
input_length
)
const
char
*
image
,
int
input_length
,
CoWowRecall
*
recall
)
{
int
status
=
0
;
GtkWidget
*
image_w
;
...
...
@@ -1380,9 +1388,18 @@ wow_sModalInputDialog *CoWowGtk::CreateModalInputDialog( const char *title, cons
NULL
);
}
GtkWidget
*
textinput
=
gtk_entry_new_with_max_length
(
input_length
);
g_signal_connect
(
textinput
,
"key-press-event"
,
G_CALLBACK
(
modaldia_keypress_cb
),
&
status
);
GtkWidget
*
textinput
;
if
(
!
recall
)
{
textinput
=
gtk_entry_new_with_max_length
(
input_length
);
g_signal_connect
(
textinput
,
"key-press-event"
,
G_CALLBACK
(
modaldia_keypress_cb
),
&
status
);
}
else
{
CoWowEntryGtk
*
entry
=
new
CoWowEntryGtk
(
recall
);
textinput
=
entry
->
widget
();
g_signal_connect
(
textinput
,
"activate"
,
G_CALLBACK
(
modaldia_activate_cb
),
&
status
);
}
GtkWidget
*
hboxtext
=
gtk_hbox_new
(
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
hboxtext
),
image_w
,
FALSE
,
FALSE
,
15
);
...
...
xtt/lib/cow/gtk/cow_wow_gtk.h
View file @
97cbbe7d
...
...
@@ -147,7 +147,8 @@ class CoWowGtk : public CoWow {
wow_sModalInputDialog
*
CreateModalInputDialog
(
const
char
*
title
,
const
char
*
text
,
const
char
*
button1
,
const
char
*
button2
,
const
char
*
button3
,
const
char
*
image
,
int
input_length
);
int
input_length
,
CoWowRecall
*
recall
=
0
);
int
DisplayWarranty
();
void
DisplayLicense
();
pwr_tStatus
CreateMenuItem
(
const
char
*
name
,
void
*
menu
,
int
pixmap
,
int
append
,
void
*
w
);
...
...
xtt/lib/cow/src/cow_log.cpp
View file @
97cbbe7d
...
...
@@ -68,7 +68,8 @@ void CoLog::log( const char *category, const char *str, const char *cmt, unsigne
else
if
(
m_level
==
1
&&
m_wow
&&
opt
&
log_mOption_Comment
)
{
wow_sModalInputDialog
*
ret
;
ret
=
m_wow
->
CreateModalInputDialog
(
"Log Comment"
,
"Comment"
,
"Ok"
,
"Cancel"
,
0
,
0
,
sizeof
(
comment
)
-
1
);
ret
=
m_wow
->
CreateModalInputDialog
(
"Log Comment"
,
"Comment"
,
"Ok"
,
"Cancel"
,
0
,
0
,
sizeof
(
comment
)
-
1
,
m_recall
);
if
(
ret
->
status
==
wow_eModalDialogReturn_Button1
||
ret
->
status
==
wow_eModalDialogReturn_ReturnPressed
)
strncpy
(
comment
,
ret
->
input_str
,
sizeof
(
comment
));
...
...
xtt/lib/cow/src/cow_log.h
View file @
97cbbe7d
...
...
@@ -41,6 +41,7 @@
#include "pwr.h"
#include "co_dcli.h"
#include "co_syi.h"
#include "cow_wow.h"
typedef
enum
{
log_mOption_Comment
=
1
...
...
@@ -57,13 +58,19 @@ class CoLog
CoWow
*
m_wow
;
static
CoLog
*
m_default_log
;
int
m_level
;
CoWowRecall
*
m_recall
;
public:
CoLog
(
const
char
*
filename
)
:
m_wow
(
0
),
m_level
(
1
)
{
dcli_translate_filename
(
m_filename
,
filename
);
strncpy
(
m_pid
,
syi_ProcessId
(),
sizeof
(
m_pid
));}
~
CoLog
()
{
if
(
this
==
m_default_log
)
m_default_log
=
0
;}
CoLog
(
const
char
*
filename
)
:
m_wow
(
0
),
m_level
(
1
)
{
dcli_translate_filename
(
m_filename
,
filename
);
strncpy
(
m_pid
,
syi_ProcessId
(),
sizeof
(
m_pid
));
m_recall
=
new
CoWowRecall
();
}
~
CoLog
()
{
if
(
this
==
m_default_log
)
m_default_log
=
0
;
delete
m_recall
;
}
void
set_default
()
{
m_default_log
=
this
;}
void
log
(
const
char
*
category
,
const
char
*
str
,
const
char
*
cmt
,
unsigned
int
opt
=
0
);
...
...
xtt/lib/cow/src/cow_wow.h
View file @
97cbbe7d
...
...
@@ -137,7 +137,8 @@ class CoWow {
virtual
wow_sModalInputDialog
*
CreateModalInputDialog
(
const
char
*
title
,
const
char
*
text
,
const
char
*
button1
,
const
char
*
button2
,
const
char
*
button3
,
const
char
*
image
,
int
input_length
)
{
return
0
;}
int
input_length
,
CoWowRecall
*
recall
=
0
)
{
return
0
;}
virtual
void
Wait
(
float
time
)
{}
static
int
HideWarranty
();
...
...
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