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
197c2348
Commit
197c2348
authored
Dec 01, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply button added in list window
parent
c587f32a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
15 deletions
+41
-15
src/lib/co/gtk/co_wow_gtk.cpp
src/lib/co/gtk/co_wow_gtk.cpp
+24
-3
src/lib/co/gtk/co_wow_gtk.h
src/lib/co/gtk/co_wow_gtk.h
+4
-2
src/lib/co/motif/co_wow_motif.cpp
src/lib/co/motif/co_wow_motif.cpp
+5
-4
src/lib/co/motif/co_wow_motif.h
src/lib/co/motif/co_wow_motif.h
+5
-4
src/lib/co/src/co_wow.h
src/lib/co/src/co_wow.h
+3
-2
No files found.
src/lib/co/gtk/co_wow_gtk.cpp
View file @
197c2348
/**
* Proview $Id: co_wow_gtk.cpp,v 1.1
4 2008-10-31 12:51:30
claes Exp $
* Proview $Id: co_wow_gtk.cpp,v 1.1
5 2008-12-01 16:42:35
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -201,7 +201,7 @@ void CoWowGtk::list_row_activated_cb( GtkTreeView *tree_view,
list_ok_cb
(
0
,
data
);
}
void
CoWowGtk
::
list_
ok
_cb
(
void
CoWowGtk
::
list_
apply
_cb
(
GtkWidget
*
w
,
gpointer
data
)
...
...
@@ -229,6 +229,17 @@ void CoWowGtk::list_ok_cb (
(
ctx
->
action_cb
)(
ctx
->
parent_ctx
,
selected_text
);
}
}
void
CoWowGtk
::
list_ok_cb
(
GtkWidget
*
w
,
gpointer
data
)
{
WowListCtx
*
ctx
=
(
WowListCtx
*
)
data
;
list_apply_cb
(
w
,
data
);
gtk_widget_destroy
(
ctx
->
toplevel
);
free
(
ctx
->
texts
);
delete
ctx
;
...
...
@@ -266,7 +277,8 @@ void *CoWowGtk::CreateList (
const
char
*
texts
,
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
parent_ctx
void
*
parent_ctx
,
int
show_apply_button
)
{
char
*
name_p
;
...
...
@@ -334,12 +346,21 @@ void *CoWowGtk::CreateList (
g_signal_connect
(
ok_button
,
"clicked"
,
G_CALLBACK
(
CoWowGtk
::
list_ok_cb
),
ctx
);
GtkWidget
*
apply_button
;
if
(
show_apply_button
)
{
apply_button
=
gtk_button_new_with_label
(
translate_utf8
(
"Apply"
));
gtk_widget_set_size_request
(
apply_button
,
70
,
28
);
g_signal_connect
(
apply_button
,
"clicked"
,
G_CALLBACK
(
CoWowGtk
::
list_apply_cb
),
ctx
);
}
GtkWidget
*
cancel_button
=
gtk_button_new_with_label
(
translate_utf8
(
"Cancel"
));
gtk_widget_set_size_request
(
cancel_button
,
70
,
28
);
g_signal_connect
(
cancel_button
,
"clicked"
,
G_CALLBACK
(
CoWowGtk
::
list_cancel_cb
),
ctx
);
GtkWidget
*
hboxbuttons
=
gtk_hbox_new
(
TRUE
,
40
);
if
(
show_apply_button
)
gtk_box_pack_start
(
GTK_BOX
(
hboxbuttons
),
apply_button
,
FALSE
,
FALSE
,
20
);
gtk_box_pack_start
(
GTK_BOX
(
hboxbuttons
),
ok_button
,
FALSE
,
FALSE
,
20
);
gtk_box_pack_end
(
GTK_BOX
(
hboxbuttons
),
cancel_button
,
FALSE
,
FALSE
,
20
);
...
...
src/lib/co/gtk/co_wow_gtk.h
View file @
197c2348
/**
* Proview $Id: co_wow_gtk.h,v 1.
7 2008-10-31 12:51:30
claes Exp $
* Proview $Id: co_wow_gtk.h,v 1.
8 2008-12-01 16:42:35
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -98,7 +98,8 @@ class CoWowGtk : public CoWow {
void
*
CreateList
(
const
char
*
title
,
const
char
*
texts
,
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
ctx
);
void
*
ctx
,
int
show_apply_button
=
0
);
void
CreateFileSelDia
(
const
char
*
title
,
void
*
parent_ctx
,
void
(
*
file_selected_cb
)(
void
*
,
char
*
,
wow_eFileSelType
),
wow_eFileSelType
file_type
);
...
...
@@ -129,6 +130,7 @@ class CoWowGtk : public CoWow {
GtkTreePath
*
path
,
GtkTreeViewColumn
*
column
,
gpointer
data
);
static
void
list_apply_cb
(
GtkWidget
*
w
,
gpointer
data
);
static
void
list_ok_cb
(
GtkWidget
*
w
,
gpointer
data
);
static
void
list_cancel_cb
(
GtkWidget
*
w
,
gpointer
data
);
};
...
...
src/lib/co/motif/co_wow_motif.cpp
View file @
197c2348
/**
* Proview $Id: co_wow_motif.cpp,v 1.
3 2008-10-31 12:51:30
claes Exp $
* Proview $Id: co_wow_motif.cpp,v 1.
4 2008-12-01 16:42:35
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -296,9 +296,10 @@ void CoWowMotif::list_action_cb( Widget w, XtPointer data,
}
void
*
CoWowMotif
::
CreateList
(
const
char
*
title
,
const
char
*
texts
,
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
parent_ctx
)
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
parent_ctx
,
int
show_apply_button
)
{
Arg
args
[
15
];
XmString
cstr
;
...
...
src/lib/co/motif/co_wow_motif.h
View file @
197c2348
/**
* Proview $Id: co_wow_motif.h,v 1.
3 2008-10-31 12:51:30
claes Exp $
* Proview $Id: co_wow_motif.h,v 1.
4 2008-12-01 16:42:35
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -92,9 +92,10 @@ class CoWowMotif : public CoWow {
void
*
data
);
void
DisplayError
(
const
char
*
title
,
const
char
*
text
);
void
*
CreateList
(
const
char
*
title
,
const
char
*
texts
,
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
ctx
);
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
ctx
,
int
show_apply_button
=
0
);
void
CreateFileSelDia
(
const
char
*
title
,
void
*
parent_ctx
,
void
(
*
file_selected_cb
)(
void
*
,
char
*
,
wow_eFileSelType
),
wow_eFileSelType
file_type
);
...
...
src/lib/co/src/co_wow.h
View file @
197c2348
/**
* Proview $Id: co_wow.h,v 1.1
5 2008-10-31 12:51:30
claes Exp $
* Proview $Id: co_wow.h,v 1.1
6 2008-12-01 16:42:35
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -81,7 +81,8 @@ class CoWow {
virtual
void
*
CreateList
(
const
char
*
title
,
const
char
*
texts
,
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
ctx
)
{
return
NULL
;}
void
*
ctx
,
int
show_apply_button
=
0
)
{
return
NULL
;}
virtual
void
CreateFileSelDia
(
const
char
*
title
,
void
*
parent_ctx
,
void
(
*
file_selected_cb
)(
void
*
,
char
*
,
wow_eFileSelType
),
wow_eFileSelType
file_type
)
{}
...
...
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