Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2015-11-20 11:24:54 +0000
committerAlexander Kurtakov2015-11-24 06:58:02 +0000
commiteec69d54257dd905a06e43fb705f40df9326414e (patch)
tree74e29f267ddc3286d8673e0af5e725a60a49bb1f /bundles/org.eclipse.swt/Eclipse SWT PI/gtk
parentf8e8584cb1a590148f14543c32110ca9558f1e35 (diff)
downloadeclipse.platform.swt-eec69d54257dd905a06e43fb705f40df9326414e.tar.gz
eclipse.platform.swt-eec69d54257dd905a06e43fb705f40df9326414e.tar.xz
eclipse.platform.swt-eec69d54257dd905a06e43fb705f40df9326414e.zip
Bug 466314 - [GTK3] Text in Forms abbreviated
Switching from gtk_text_view_scroll_mark_onscreen to gtk_text_view_scroll_to_mark gives us total control over the alignment allowing us to alway position to the 0 0. Change-Id: I4fc141980e96c81cf65ef076a0224f0e4eee47ba Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java10
4 files changed, 19 insertions, 15 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
index 7e937f08ae..c0dff7fa6a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
@@ -16167,16 +16167,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1text_1view_1new)
}
#endif
-#ifndef NO__1gtk_1text_1view_1scroll_1mark_1onscreen
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1text_1view_1scroll_1mark_1onscreen)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- OS_NATIVE_ENTER(env, that, _1gtk_1text_1view_1scroll_1mark_1onscreen_FUNC);
- gtk_text_view_scroll_mark_onscreen((GtkTextView *)arg0, (GtkTextMark *)arg1);
- OS_NATIVE_EXIT(env, that, _1gtk_1text_1view_1scroll_1mark_1onscreen_FUNC);
-}
-#endif
-
#ifndef NO__1gtk_1text_1view_1scroll_1to_1iter
JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1text_1view_1scroll_1to_1iter)
(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jdouble arg2, jboolean arg3, jdouble arg4, jdouble arg5)
@@ -16193,6 +16183,16 @@ fail:
}
#endif
+#ifndef NO__1gtk_1text_1view_1scroll_1to_1mark
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1text_1view_1scroll_1to_1mark)
+ (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jboolean arg3, jdouble arg4, jdouble arg5)
+{
+ OS_NATIVE_ENTER(env, that, _1gtk_1text_1view_1scroll_1to_1mark_FUNC);
+ gtk_text_view_scroll_to_mark((GtkTextView *)arg0, (GtkTextMark *)arg1, (gdouble)arg2, (gboolean)arg3, (gdouble)arg4, (gdouble)arg5);
+ OS_NATIVE_EXIT(env, that, _1gtk_1text_1view_1scroll_1to_1mark_FUNC);
+}
+#endif
+
#ifndef NO__1gtk_1text_1view_1set_1editable
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1text_1view_1set_1editable)
(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
index 82775bd269..bd9d7b56f5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
@@ -1183,8 +1183,8 @@ char * OS_nativeFunctionNames[] = {
"_1gtk_1text_1view_1get_1visible_1rect",
"_1gtk_1text_1view_1get_1window",
"_1gtk_1text_1view_1new",
- "_1gtk_1text_1view_1scroll_1mark_1onscreen",
"_1gtk_1text_1view_1scroll_1to_1iter",
+ "_1gtk_1text_1view_1scroll_1to_1mark",
"_1gtk_1text_1view_1set_1editable",
"_1gtk_1text_1view_1set_1justification",
"_1gtk_1text_1view_1set_1tabs",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
index a1d68ed817..016b4721db 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
@@ -1193,8 +1193,8 @@ typedef enum {
_1gtk_1text_1view_1get_1visible_1rect_FUNC,
_1gtk_1text_1view_1get_1window_FUNC,
_1gtk_1text_1view_1new_FUNC,
- _1gtk_1text_1view_1scroll_1mark_1onscreen_FUNC,
_1gtk_1text_1view_1scroll_1to_1iter_FUNC,
+ _1gtk_1text_1view_1scroll_1to_1mark_FUNC,
_1gtk_1text_1view_1set_1editable_FUNC,
_1gtk_1text_1view_1set_1justification_FUNC,
_1gtk_1text_1view_1set_1tabs_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index cf8cda6d9f..0ee6dda387 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -12528,12 +12528,16 @@ public static final long /*int*/ gtk_text_view_new() {
/**
* @param text_view cast=(GtkTextView *)
* @param mark cast=(GtkTextMark *)
+ * @param within_margin cast=(gdouble)
+ * @param use_align cast=(gboolean)
+ * @param xalign cast=(gdouble)
+ * @param yalign cast=(gdouble)
*/
-public static final native void _gtk_text_view_scroll_mark_onscreen(long /*int*/ text_view, long /*int*/ mark);
-public static final void gtk_text_view_scroll_mark_onscreen(long /*int*/ text_view, long /*int*/ mark) {
+public static final native void _gtk_text_view_scroll_to_mark(long /*int*/ text_view, long /*int*/ mark, double within_margin, boolean use_align, double xalign, double yalign);
+public static final void gtk_text_view_scroll_to_mark(long /*int*/ text_view, long /*int*/ mark, double within_margin, boolean use_align, double xalign, double yalign) {
lock.lock();
try {
- _gtk_text_view_scroll_mark_onscreen(text_view, mark);
+ _gtk_text_view_scroll_to_mark(text_view, mark, within_margin, use_align, xalign, yalign);
} finally {
lock.unlock();
}

Back to the top