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
3c418280
Commit
3c418280
authored
Dec 06, 2013
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge input dialog fix
parent
4736ff18
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
18 deletions
+5
-18
xtt/lib/ge/gtk/ge_gtk.cpp
xtt/lib/ge/gtk/ge_gtk.cpp
+5
-18
No files found.
xtt/lib/ge/gtk/ge_gtk.cpp
View file @
3c418280
...
@@ -150,11 +150,7 @@ void GeGtk::open_input_dialog( const char *text, const char *title,
...
@@ -150,11 +150,7 @@ void GeGtk::open_input_dialog( const char *text, const char *title,
const
char
*
init_text
,
const
char
*
init_text
,
void
(
*
x_india_ok_cb
)(
Ge
*
,
char
*
))
void
(
*
x_india_ok_cb
)(
Ge
*
,
char
*
))
{
{
g_object_set
(
india_widget
,
gtk_window_set_title
(
GTK_WINDOW
(
india_widget
),
title
);
"visible"
,
TRUE
,
"title"
,
title
,
NULL
);
gtk_label_set_text
(
GTK_LABEL
(
india_label
),
text
);
gtk_label_set_text
(
GTK_LABEL
(
india_label
),
text
);
gint
pos
=
0
;
gint
pos
=
0
;
...
@@ -162,6 +158,7 @@ void GeGtk::open_input_dialog( const char *text, const char *title,
...
@@ -162,6 +158,7 @@ void GeGtk::open_input_dialog( const char *text, const char *title,
gtk_editable_insert_text
(
GTK_EDITABLE
(
india_text
),
init_text
,
gtk_editable_insert_text
(
GTK_EDITABLE
(
india_text
),
init_text
,
strlen
(
init_text
),
&
pos
);
strlen
(
init_text
),
&
pos
);
india_ok_cb
=
x_india_ok_cb
;
india_ok_cb
=
x_india_ok_cb
;
gtk_dialog_run
(
GTK_DIALOG
(
india_widget
));
}
}
void
GeGtk
::
message
(
char
severity
,
const
char
*
message
)
void
GeGtk
::
message
(
char
severity
,
const
char
*
message
)
...
@@ -1516,13 +1513,6 @@ static gint delete_event( GtkWidget *w, GdkEvent *event, gpointer gectx)
...
@@ -1516,13 +1513,6 @@ static gint delete_event( GtkWidget *w, GdkEvent *event, gpointer gectx)
return
TRUE
;
return
TRUE
;
}
}
static
gint
india_delete_event
(
GtkWidget
*
w
,
GdkEvent
*
event
,
gpointer
gectx
)
{
// Hide
g_object_set
(
w
,
"visible"
,
FALSE
,
NULL
);
return
TRUE
;
}
static
gint
confirm_delete_event
(
GtkWidget
*
w
,
GdkEvent
*
event
,
gpointer
gectx
)
static
gint
confirm_delete_event
(
GtkWidget
*
w
,
GdkEvent
*
event
,
gpointer
gectx
)
{
{
// Hide
// Hide
...
@@ -3090,14 +3080,13 @@ GeGtk::GeGtk( void *x_parent_ctx,
...
@@ -3090,14 +3080,13 @@ GeGtk::GeGtk( void *x_parent_ctx,
wow
=
new
CoWowGtk
(
toplevel
);
wow
=
new
CoWowGtk
(
toplevel
);
// Create an input dialog
// Create an input dialog
india_widget
=
(
GtkWidget
*
)
g_object_new
(
GTK_TYPE_
WINDOW
,
india_widget
=
(
GtkWidget
*
)
g_object_new
(
GTK_TYPE_
DIALOG
,
"default-height"
,
150
,
"default-height"
,
150
,
"default-width"
,
350
,
"default-width"
,
350
,
"title"
,
"Input Dialog"
,
"window-position"
,
GTK_WIN_POS_CENTER
,
"window-position"
,
GTK_WIN_POS_CENTER
,
NULL
);
NULL
);
gtk_window_set_modal
(
GTK_WINDOW
(
india_widget
),
TRUE
);
g_signal_connect
(
india_widget
,
"delete_event"
,
G_CALLBACK
(
india_delete_event
),
this
);
india_text
=
gtk_entry_new
();
india_text
=
gtk_entry_new
();
g_signal_connect
(
india_text
,
"activate"
,
g_signal_connect
(
india_text
,
"activate"
,
G_CALLBACK
(
activate_india_ok
),
this
);
G_CALLBACK
(
activate_india_ok
),
this
);
...
@@ -3108,7 +3097,6 @@ GeGtk::GeGtk( void *x_parent_ctx,
...
@@ -3108,7 +3097,6 @@ GeGtk::GeGtk( void *x_parent_ctx,
"xalign"
,
0.5
,
"xalign"
,
0.5
,
"yalign"
,
1.0
,
"yalign"
,
1.0
,
NULL
);
NULL
);
GtkWidget
*
india_ok
=
gtk_button_new_with_label
(
"Ok"
);
GtkWidget
*
india_ok
=
gtk_button_new_with_label
(
"Ok"
);
gtk_widget_set_size_request
(
india_ok
,
70
,
25
);
gtk_widget_set_size_request
(
india_ok
,
70
,
25
);
g_signal_connect
(
india_ok
,
"clicked"
,
g_signal_connect
(
india_ok
,
"clicked"
,
...
@@ -3127,11 +3115,10 @@ GeGtk::GeGtk( void *x_parent_ctx,
...
@@ -3127,11 +3115,10 @@ GeGtk::GeGtk( void *x_parent_ctx,
gtk_box_pack_start
(
GTK_BOX
(
india_hboxbuttons
),
india_ok
,
FALSE
,
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
india_hboxbuttons
),
india_ok
,
FALSE
,
FALSE
,
0
);
gtk_box_pack_end
(
GTK_BOX
(
india_hboxbuttons
),
india_cancel
,
FALSE
,
FALSE
,
0
);
gtk_box_pack_end
(
GTK_BOX
(
india_hboxbuttons
),
india_cancel
,
FALSE
,
FALSE
,
0
);
GtkWidget
*
india_vbox
=
gtk_
vbox_new
(
FALSE
,
0
);
GtkWidget
*
india_vbox
=
gtk_
dialog_get_content_area
(
GTK_DIALOG
(
india_widget
)
);
gtk_box_pack_start
(
GTK_BOX
(
india_vbox
),
india_hboxtext
,
TRUE
,
TRUE
,
30
);
gtk_box_pack_start
(
GTK_BOX
(
india_vbox
),
india_hboxtext
,
TRUE
,
TRUE
,
30
);
gtk_box_pack_start
(
GTK_BOX
(
india_vbox
),
gtk_hseparator_new
(),
FALSE
,
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
india_vbox
),
gtk_hseparator_new
(),
FALSE
,
FALSE
,
0
);
gtk_box_pack_end
(
GTK_BOX
(
india_vbox
),
india_hboxbuttons
,
FALSE
,
FALSE
,
15
);
gtk_box_pack_end
(
GTK_BOX
(
india_vbox
),
india_hboxbuttons
,
FALSE
,
FALSE
,
15
);
gtk_container_add
(
GTK_CONTAINER
(
india_widget
),
india_vbox
);
gtk_widget_show_all
(
india_widget
);
gtk_widget_show_all
(
india_widget
);
g_object_set
(
india_widget
,
"visible"
,
FALSE
,
NULL
);
g_object_set
(
india_widget
,
"visible"
,
FALSE
,
NULL
);
gtk_window_set_transient_for
(
GTK_WINDOW
(
gtk_widget_get_toplevel
(
india_widget
)),
gtk_window_set_transient_for
(
GTK_WINDOW
(
gtk_widget_get_toplevel
(
india_widget
)),
...
...
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