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
64680351
Commit
64680351
authored
Sep 18, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow:CreateList, cancel backcall added
parent
2b81f4d3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
6 deletions
+26
-6
src/lib/co/gtk/co_wow_gtk.cpp
src/lib/co/gtk/co_wow_gtk.cpp
+14
-2
src/lib/co/gtk/co_wow_gtk.h
src/lib/co/gtk/co_wow_gtk.h
+2
-1
src/lib/co/motif/co_wow_motif.cpp
src/lib/co/motif/co_wow_motif.cpp
+6
-1
src/lib/co/motif/co_wow_motif.h
src/lib/co/motif/co_wow_motif.h
+2
-1
src/lib/co/src/co_wow.h
src/lib/co/src/co_wow.h
+2
-1
No files found.
src/lib/co/gtk/co_wow_gtk.cpp
View file @
64680351
/**
* Proview $Id: co_wow_gtk.cpp,v 1.1
2 2008-02-27 06:23:43
claes Exp $
* Proview $Id: co_wow_gtk.cpp,v 1.1
3 2008-09-18 15:07:38
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -189,6 +189,7 @@ class WowListCtx {
GtkWidget
*
list
;
char
*
texts
;
void
(
*
action_cb
)
(
void
*
,
char
*
);
void
(
*
cancel_cb
)
(
void
*
);
void
*
parent_ctx
;
};
...
...
@@ -240,6 +241,9 @@ void CoWowGtk::list_cancel_cb (
{
WowListCtx
*
ctx
=
(
WowListCtx
*
)
data
;
if
(
ctx
->
cancel_cb
)
(
ctx
->
cancel_cb
)(
ctx
->
parent_ctx
);
gtk_widget_destroy
(
ctx
->
toplevel
);
free
(
ctx
->
texts
);
delete
ctx
;
...
...
@@ -251,10 +255,17 @@ static gboolean list_action_inputfocus( GtkWidget *w, GdkEvent *event, gpointer
return
FALSE
;
}
static
gboolean
list_delete_event
(
GtkWidget
*
w
,
GdkEvent
*
event
,
gpointer
data
)
{
CoWowGtk
::
list_cancel_cb
(
w
,
data
);
return
TRUE
;
}
void
*
CoWowGtk
::
CreateList
(
char
*
title
,
char
*
texts
,
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
parent_ctx
)
{
...
...
@@ -268,6 +279,7 @@ void *CoWowGtk::CreateList (
ctx
=
new
WowListCtx
();
ctx
->
action_cb
=
action_cb
;
ctx
->
cancel_cb
=
cancel_cb
;
ctx
->
parent_ctx
=
parent_ctx
;
...
...
@@ -279,7 +291,7 @@ void *CoWowGtk::CreateList (
NULL
);
g_signal_connect
(
ctx
->
toplevel
,
"focus-in-event"
,
G_CALLBACK
(
list_action_inputfocus
),
ctx
);
g_signal_connect
(
ctx
->
toplevel
,
"delete_event"
,
G_CALLBACK
(
list_delete_event
),
ctx
);
store
=
gtk_list_store_new
(
1
,
G_TYPE_STRING
);
name_p
=
texts
;
...
...
src/lib/co/gtk/co_wow_gtk.h
View file @
64680351
/**
* Proview $Id: co_wow_gtk.h,v 1.
5 2008-06-25 07:47:17
claes Exp $
* Proview $Id: co_wow_gtk.h,v 1.
6 2008-09-18 15:07:38
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -97,6 +97,7 @@ class CoWowGtk : public CoWow {
void
DisplayError
(
char
*
title
,
char
*
text
);
void
*
CreateList
(
char
*
title
,
char
*
texts
,
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
ctx
);
void
CreateFileSelDia
(
char
*
title
,
void
*
parent_ctx
,
void
(
*
file_selected_cb
)(
void
*
,
char
*
,
wow_eFileSelType
),
...
...
src/lib/co/motif/co_wow_motif.cpp
View file @
64680351
/**
* Proview $Id: co_wow_motif.cpp,v 1.
1 2007-01-04 07:51:41
claes Exp $
* Proview $Id: co_wow_motif.cpp,v 1.
2 2008-09-18 15:07:38
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -263,6 +263,9 @@ void CoWowMotif::list_cancel_cb( Widget w, XtPointer data,
{
wow_tListCtx
ctx
=
(
wow_tListCtx
)
data
;
if
(
ctx
->
cancel_cb
)
(
ctx
->
cancel_cb
)(
ctx
->
parent_ctx
);
XtDestroyWidget
(
ctx
->
toplevel
);
free
(
ctx
->
texts
);
free
(
ctx
);
...
...
@@ -294,6 +297,7 @@ void CoWowMotif::list_action_cb( Widget w, XtPointer data,
void
*
CoWowMotif
::
CreateList
(
char
*
title
,
char
*
texts
,
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
parent_ctx
)
{
Arg
args
[
15
];
...
...
@@ -311,6 +315,7 @@ void *CoWowMotif::CreateList( char *title, char *texts,
ctx
=
(
wow_tListCtx
)
calloc
(
1
,
sizeof
(
*
ctx
));
ctx
->
action_cb
=
action_cb
;
ctx
->
cancel_cb
=
cancel_cb
;
ctx
->
parent_ctx
=
parent_ctx
;
i
=
0
;
...
...
src/lib/co/motif/co_wow_motif.h
View file @
64680351
/**
* Proview $Id: co_wow_motif.h,v 1.
1 2007-01-04 07:51:41
claes Exp $
* Proview $Id: co_wow_motif.h,v 1.
2 2008-09-18 15:07:38
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -92,6 +92,7 @@ class CoWowMotif : public CoWow {
void
DisplayError
(
char
*
title
,
char
*
text
);
void
*
CreateList
(
char
*
title
,
char
*
texts
,
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
ctx
);
void
CreateFileSelDia
(
char
*
title
,
void
*
parent_ctx
,
void
(
*
file_selected_cb
)(
void
*
,
char
*
,
wow_eFileSelType
),
...
...
src/lib/co/src/co_wow.h
View file @
64680351
/**
* Proview $Id: co_wow.h,v 1.1
3 2007-01-17 10:27:06
claes Exp $
* Proview $Id: co_wow.h,v 1.1
4 2008-09-18 15:07:38
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -80,6 +80,7 @@ class CoWow {
virtual
void
DisplayError
(
char
*
title
,
char
*
text
)
{}
virtual
void
*
CreateList
(
char
*
title
,
char
*
texts
,
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
ctx
)
{
return
NULL
;}
virtual
void
CreateFileSelDia
(
char
*
title
,
void
*
parent_ctx
,
void
(
*
file_selected_cb
)(
void
*
,
char
*
,
wow_eFileSelType
),
...
...
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