Commit a4b94a12235f13825a13db9571a3c432ce3ea74b
1 parent
86e2ac3d
Exists in
master
and in
1 other branch
Adding option for paste unformatted text.
Showing
2 changed files
with
14 additions
and
0 deletions
Show diff stats
src/include/v3270.h
@@ -212,6 +212,7 @@ | @@ -212,6 +212,7 @@ | ||
212 | LIB3270_EXPORT void v3270_append_selection(GtkWidget *widget, gboolean cut); | 212 | LIB3270_EXPORT void v3270_append_selection(GtkWidget *widget, gboolean cut); |
213 | 213 | ||
214 | LIB3270_EXPORT void v3270_paste(GtkWidget *widget); | 214 | LIB3270_EXPORT void v3270_paste(GtkWidget *widget); |
215 | + LIB3270_EXPORT void v3270_paste_text(GtkWidget *widget); | ||
215 | LIB3270_EXPORT void v3270_input_text(GtkWidget *widget, const gchar *text, const gchar *encoding); | 216 | LIB3270_EXPORT void v3270_input_text(GtkWidget *widget, const gchar *text, const gchar *encoding); |
216 | 217 | ||
217 | // Colors | 218 | // Colors |
src/selection/linux/paste.c
@@ -182,3 +182,16 @@ LIB3270_EXPORT void v3270_paste(GtkWidget *widget) | @@ -182,3 +182,16 @@ LIB3270_EXPORT void v3270_paste(GtkWidget *widget) | ||
182 | 182 | ||
183 | } | 183 | } |
184 | 184 | ||
185 | +LIB3270_EXPORT void v3270_paste_text(GtkWidget *widget) | ||
186 | +{ | ||
187 | + g_return_if_fail(GTK_IS_V3270(widget)); | ||
188 | + GtkClipboard * clipboard = gtk_widget_get_clipboard(widget,GTK_V3270(widget)->selection.target); | ||
189 | + | ||
190 | + gtk_clipboard_request_text( | ||
191 | + clipboard, | ||
192 | + (GtkClipboardTextReceivedFunc) text_received, | ||
193 | + (gpointer) widget | ||
194 | + ); | ||
195 | + | ||
196 | +} | ||
197 | + |