Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
yad
Commits
391317ad
Commit
391317ad
authored
May 31, 2023
by
Victor Ananjevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix --in-place options (make it works always when --editable is specified)
parent
8808867e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
text.c
src/text.c
+6
-6
No files found.
src/text.c
View file @
391317ad
...
...
@@ -157,7 +157,7 @@ save_file_cb (GtkWidget *w, gpointer d)
gtk_text_buffer_get_bounds
(
GTK_TEXT_BUFFER
(
text_buffer
),
&
start
,
&
end
);
text
=
gtk_text_buffer_get_text
(
GTK_TEXT_BUFFER
(
text_buffer
),
&
start
,
&
end
,
0
);
/* g_file_set_contents changes the file permissions. so it must be kept and restore after file saving */
/* g_file_set_contents changes the file permissions. so it must be kept and restore
d
after file saving */
if
(
g_stat
(
options
.
common_data
.
uri
,
&
st
)
==
0
)
mode
=
st
.
st_mode
;
...
...
@@ -170,7 +170,7 @@ save_file_cb (GtkWidget *w, gpointer d)
{
/* restore permissions */
if
(
mode
!=
-
1
)
g_chmod
(
options
.
common_data
.
uri
,
st
.
st_
mode
);
g_chmod
(
options
.
common_data
.
uri
,
mode
);
text_changed
=
FALSE
;
}
...
...
@@ -795,11 +795,11 @@ text_create_widget (GtkWidget * dlg)
/* Add keyboard handler */
g_signal_connect
(
text_view
,
"key-press-event"
,
G_CALLBACK
(
key_press_cb
),
dlg
);
if
(
options
.
common_data
.
editable
)
g_signal_connect
(
G_OBJECT
(
text_buffer
),
"changed"
,
G_CALLBACK
(
text_changed_cb
),
NULL
);
if
(
options
.
common_data
.
file_op
)
{
g_signal_connect
(
G_OBJECT
(
text_buffer
),
"changed"
,
G_CALLBACK
(
text_changed_cb
),
NULL
);
g_signal_connect_after
(
G_OBJECT
(
text_view
),
"populate-popup"
,
G_CALLBACK
(
menu_popup_cb
),
dlg
);
}
g_signal_connect_after
(
G_OBJECT
(
text_view
),
"populate-popup"
,
G_CALLBACK
(
menu_popup_cb
),
dlg
);
/* Initialize linkifying */
if
(
options
.
text_data
.
uri
)
...
...
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