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
2285f881
Commit
2285f881
authored
Jul 03, 2019
by
Victor Ananjevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use gspell for spell checking
parent
942573c7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
14 deletions
+15
-14
configure.ac
configure.ac
+1
-1
form.c
src/form.c
+2
-3
text.c
src/text.c
+6
-7
util.c
src/util.c
+5
-2
yad.h
src/yad.h
+1
-1
No files found.
configure.ac
View file @
2285f881
...
...
@@ -61,7 +61,7 @@ AC_ARG_ENABLE([spell],
[Build YAD with Spell check support (default - yes)])],
[with_spell=$enableval], [with_spell=yes])
if test x$with_spell = xyes; then
PKG_CHECK_MODULES([SPELL], [g
tkspell-3.0
], [have_spell=yes], [have_spell=no])
PKG_CHECK_MODULES([SPELL], [g
spell-1
], [have_spell=yes], [have_spell=no])
else
have_spell=no
fi
...
...
src/form.c
View file @
2285f881
...
...
@@ -975,9 +975,8 @@ form_create_widget (GtkWidget * dlg)
#ifdef HAVE_SPELL
if
(
options
.
common_data
.
enable_spell
)
{
GtkSpellChecker
*
spell
=
gtk_spell_checker_new
();
gtk_spell_checker_set_language
(
spell
,
options
.
common_data
.
spell_lang
,
NULL
);
gtk_spell_checker_attach
(
spell
,
GTK_TEXT_VIEW
(
e
));
GspellTextView
*
spell_view
=
gspell_text_view_get_from_gtk_text_view
(
GTK_TEXT_VIEW
(
e
));
gspell_text_view_basic_setup
(
spell_view
);
}
#endif
...
...
src/text.c
View file @
2285f881
...
...
@@ -426,7 +426,7 @@ fill_buffer_from_stdin ()
GtkWidget
*
text_create_widget
(
GtkWidget
*
dlg
)
{
GtkWidget
*
w
;
GtkWidget
*
w
,
*
tv
;
w
=
gtk_scrolled_window_new
(
NULL
,
NULL
);
gtk_scrolled_window_set_shadow_type
(
GTK_SCROLLED_WINDOW
(
w
),
GTK_SHADOW_ETCHED_IN
);
...
...
@@ -434,10 +434,10 @@ text_create_widget (GtkWidget * dlg)
#ifdef HAVE_SOURCEVIEW
text_buffer
=
(
GObject
*
)
gtk_source_buffer_new
(
NULL
);
text_view
=
gtk_source_view_new_with_buffer
(
GTK_SOURCE_BUFFER
(
text_buffer
));
t
v
=
t
ext_view
=
gtk_source_view_new_with_buffer
(
GTK_SOURCE_BUFFER
(
text_buffer
));
#else
text_buffer
=
(
GObject
*
)
gtk_text_buffer_new
(
NULL
);
text_view
=
gtk_text_view_new_with_buffer
(
GTK_TEXT_BUFFER
(
text_buffer
));
t
v
=
t
ext_view
=
gtk_text_view_new_with_buffer
(
GTK_TEXT_BUFFER
(
text_buffer
));
#endif
gtk_widget_set_name
(
text_view
,
"yad-text-widget"
);
gtk_text_view_set_justification
(
GTK_TEXT_VIEW
(
text_view
),
options
.
text_data
.
justify
);
...
...
@@ -492,9 +492,8 @@ text_create_widget (GtkWidget * dlg)
#ifdef HAVE_SPELL
if
(
options
.
common_data
.
enable_spell
)
{
GtkSpellChecker
*
spell
=
gtk_spell_checker_new
();
gtk_spell_checker_set_language
(
spell
,
options
.
common_data
.
spell_lang
,
NULL
);
gtk_spell_checker_attach
(
spell
,
GTK_TEXT_VIEW
(
text_view
));
GspellTextView
*
spell_view
=
gspell_text_view_get_from_gtk_text_view
(
GTK_TEXT_VIEW
(
text_view
));
gspell_text_view_basic_setup
(
spell_view
);;
}
#endif
...
...
@@ -525,7 +524,7 @@ text_create_widget (GtkWidget * dlg)
g_signal_connect_after
(
G_OBJECT
(
text_buffer
),
"changed"
,
G_CALLBACK
(
linkify_cb
),
regex
);
}
gtk_container_add
(
GTK_CONTAINER
(
w
),
t
ext_view
);
gtk_container_add
(
GTK_CONTAINER
(
w
),
t
v
);
if
(
options
.
common_data
.
uri
)
fill_buffer_from_file
();
...
...
src/util.c
View file @
2285f881
...
...
@@ -712,8 +712,11 @@ show_langs ()
{
GList
*
lng
;
for
(
lng
=
gtk_spell_checker_get_language_list
();
lng
;
lng
=
lng
->
next
)
g_print
(
"%s
\n
"
,
(
gchar
*
)
lng
->
data
);
for
(
lng
=
gspell_language_get_available
();
lng
;
lng
=
lng
->
next
)
{
const
GspellLanguage
*
l
=
lng
->
data
;
g_print
(
"%s
\n
"
,
gspell_language_get_code
(
l
));
}
}
#endif
...
...
src/yad.h
View file @
2285f881
...
...
@@ -34,7 +34,7 @@
#include <glib/gi18n.h>
#ifdef HAVE_SPELL
#include <g
tkspell/gtk
spell.h>
#include <g
spell/g
spell.h>
#endif
#ifdef HAVE_SOURCEVIEW
...
...
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