summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2015-10-26 22:50:52 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2015-10-26 22:50:52 +0000
commit0d4e511c524d9102d90adbf2defea4f644eb3edd (patch)
treeffd9da7dadc59fa46ca91fa123659f5271214614 /src
parentExtensions. Fixed 'none' setting in flow control dropdown. Fixes bug #1509580 (diff)
downloadinkscape-0d4e511c524d9102d90adbf2defea4f644eb3edd.tar.gz
inkscape-0d4e511c524d9102d90adbf2defea4f644eb3edd.zip
add gtk3 experimental support in CMake
Fixed bugs: - https://launchpad.net/bugs/1509969 (bzr r14430)
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt5
-rw-r--r--src/libgdl/CMakeLists.txt87
-rw-r--r--src/ui/dialog/text-edit.cpp14
3 files changed, 63 insertions, 43 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ec7713464..30af55925 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -531,6 +531,10 @@ endif()
add_dependencies(inkscape inkscape_version)
+if (NOT "${WITH_EXT_GDL}")
+ list (APPEND INKSCAPE_LIBS "gdl_LIB")
+endif()
+
set(INKSCAPE_TARGET_LIBS
# order from automake
#sp_LIB
@@ -542,7 +546,6 @@ set(INKSCAPE_TARGET_LIBS
croco_LIB
avoid_LIB
- gdl_LIB
cola_LIB
vpsc_LIB
livarot_LIB
diff --git a/src/libgdl/CMakeLists.txt b/src/libgdl/CMakeLists.txt
index d59d017f0..a452320f7 100644
--- a/src/libgdl/CMakeLists.txt
+++ b/src/libgdl/CMakeLists.txt
@@ -1,47 +1,50 @@
+if (NOT "${WITH_EXT_GDL}")
-set(libgdl_SRC
- gdl-dock-bar.c
- gdl-dock-item-button-image.c
- gdl-dock-item-grip.c
- gdl-dock-item.c
- gdl-dock-master.c
- gdl-dock-notebook.c
- gdl-dock-object.c
- gdl-dock-paned.c
- gdl-dock-placeholder.c
- gdl-dock-tablabel.c
- gdl-dock.c
- gdl-i18n.c
- gdl-switcher.c
- libgdlmarshal.c
- libgdltypebuiltins.c
+ set(libgdl_SRC
+ gdl-dock-bar.c
+ gdl-dock-item-button-image.c
+ gdl-dock-item-grip.c
+ gdl-dock-item.c
+ gdl-dock-master.c
+ gdl-dock-notebook.c
+ gdl-dock-object.c
+ gdl-dock-paned.c
+ gdl-dock-placeholder.c
+ gdl-dock-tablabel.c
+ gdl-dock.c
+ gdl-i18n.c
+ gdl-switcher.c
+ libgdlmarshal.c
+ libgdltypebuiltins.c
- # -------
- # Headers
- gdl-dock-bar.h
- gdl-dock-item-button-image.h
- gdl-dock-item-grip.h
- gdl-dock-item.h
- gdl-dock-master.h
- gdl-dock-notebook.h
- gdl-dock-object.h
- gdl-dock-paned.h
- gdl-dock-placeholder.h
- gdl-dock-tablabel.h
- gdl-dock.h
- gdl-i18n.h
- gdl-switcher.h
- gdl.h
- libgdlmarshal.h
- libgdltypebuiltins.h
-)
+ # -------
+ # Headers
+ gdl-dock-bar.h
+ gdl-dock-item-button-image.h
+ gdl-dock-item-grip.h
+ gdl-dock-item.h
+ gdl-dock-master.h
+ gdl-dock-notebook.h
+ gdl-dock-object.h
+ gdl-dock-paned.h
+ gdl-dock-placeholder.h
+ gdl-dock-tablabel.h
+ gdl-dock.h
+ gdl-i18n.h
+ gdl-switcher.h
+ gdl.h
+ libgdlmarshal.h
+ libgdltypebuiltins.h
+ )
-if(WIN32)
- list(APPEND libgdl_SRC
- gdl-win32.c
- gdl-win32.h
- )
-endif()
+ if(WIN32)
+ list(APPEND libgdl_SRC
+ gdl-win32.c
+ gdl-win32.h
+ )
+ endif()
+
+ add_inkscape_lib(gdl_LIB "${libgdl_SRC}")
-add_inkscape_lib(gdl_LIB "${libgdl_SRC}")
+endif()
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp
index 7575cc854..cf53e1441 100644
--- a/src/ui/dialog/text-edit.cpp
+++ b/src/ui/dialog/text-edit.cpp
@@ -175,6 +175,19 @@ TextEdit::TextEdit()
gtk_text_view_set_wrap_mode ((GtkTextView *) text_view, GTK_WRAP_WORD);
#ifdef WITH_GTKSPELL
+#ifdef WITH_GTKMM_3_0
+/*
+ TODO: Use computed xml:lang attribute of relevant element, if present, to specify the
+ language (either as 2nd arg of gtkspell_new_attach, or with explicit
+ gtkspell_set_language call in; see advanced.c example in gtkspell docs).
+ onReadSelection looks like a suitable place.
+*/
+ GtkSpellChecker * speller = gtk_spell_checker_new();
+
+ if (! gtk_spell_checker_attach(speller, GTK_TEXT_VIEW(text_view))) {
+ g_print("gtkspell error:\n");
+ }
+#else
GError *error = NULL;
/*
@@ -188,6 +201,7 @@ TextEdit::TextEdit()
g_error_free(error);
}
#endif
+#endif
gtk_widget_set_size_request (text_view, -1, 64);
gtk_text_view_set_editable (GTK_TEXT_VIEW (text_view), TRUE);