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
f0e769ea
Commit
f0e769ea
authored
Sep 26, 2017
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wb dataarithm and text editor, ctrl+T addded for save and close
parent
5320883f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
wb/lib/wb/gtk/wb_watttext_gtk.cpp
wb/lib/wb/gtk/wb_watttext_gtk.cpp
+18
-1
wb/lib/wb/gtk/wb_watttext_gtk.h
wb/lib/wb/gtk/wb_watttext_gtk.h
+2
-1
No files found.
wb/lib/wb/gtk/wb_watttext_gtk.cpp
View file @
f0e769ea
...
@@ -107,6 +107,15 @@ void WAttTextGtk::activate_save( GtkWidget *w, gpointer data)
...
@@ -107,6 +107,15 @@ void WAttTextGtk::activate_save( GtkWidget *w, gpointer data)
watttext
->
modified
=
0
;
watttext
->
modified
=
0
;
}
}
void
WAttTextGtk
::
activate_saveandclose
(
GtkWidget
*
w
,
gpointer
data
)
{
WAttText
*
watttext
=
(
WAttText
*
)
data
;
watttext
->
set_attr_value
();
watttext
->
modified
=
0
;
watttext
->
activate_exit
();
}
void
WAttTextGtk
::
activate_copy
(
GtkWidget
*
w
,
gpointer
data
)
void
WAttTextGtk
::
activate_copy
(
GtkWidget
*
w
,
gpointer
data
)
{
{
WAttTextGtk
*
watttext
=
(
WAttTextGtk
*
)
data
;
WAttTextGtk
*
watttext
=
(
WAttTextGtk
*
)
data
;
...
@@ -306,8 +315,16 @@ WAttTextGtk::WAttTextGtk(
...
@@ -306,8 +315,16 @@ WAttTextGtk::WAttTextGtk(
GtkWidget
*
file_save
=
gtk_image_menu_item_new_from_stock
(
GTK_STOCK_SAVE
,
accel_g
);
GtkWidget
*
file_save
=
gtk_image_menu_item_new_from_stock
(
GTK_STOCK_SAVE
,
accel_g
);
g_signal_connect
(
file_save
,
"activate"
,
G_CALLBACK
(
activate_save
),
this
);
g_signal_connect
(
file_save
,
"activate"
,
G_CALLBACK
(
activate_save
),
this
);
GtkWidget
*
file_saveandclose
=
gtk_menu_item_new_with_mnemonic
(
"S_ave and close"
);
g_signal_connect
(
file_saveandclose
,
"activate"
,
G_CALLBACK
(
activate_saveandclose
),
this
);
gtk_widget_add_accelerator
(
file_saveandclose
,
"activate"
,
accel_g
,
't'
,
GdkModifierType
(
GDK_CONTROL_MASK
),
GTK_ACCEL_VISIBLE
);
GtkMenu
*
file_menu
=
(
GtkMenu
*
)
g_object_new
(
GTK_TYPE_MENU
,
NULL
);
GtkMenu
*
file_menu
=
(
GtkMenu
*
)
g_object_new
(
GTK_TYPE_MENU
,
NULL
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_save
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_save
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_saveandclose
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_close
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_close
);
GtkWidget
*
file
=
gtk_menu_item_new_with_mnemonic
(
"_File"
);
GtkWidget
*
file
=
gtk_menu_item_new_with_mnemonic
(
"_File"
);
...
...
wb/lib/wb/gtk/wb_watttext_gtk.h
View file @
f0e769ea
...
@@ -77,6 +77,7 @@ class WAttTextGtk : public WAttText {
...
@@ -77,6 +77,7 @@ class WAttTextGtk : public WAttText {
static
void
activate_exit
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_exit
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_save
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_save
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_saveandclose
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_copy
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_copy
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_cut
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_cut
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_paste
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_paste
(
GtkWidget
*
w
,
gpointer
data
);
...
...
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