Commit d2503b0ab8668eb6e71d7dcebc53fd7f4633f6c2

Authored by Perry Werneck
1 parent 2f4fa0d5
Exists in master and in 1 other branch develop

Fixing issue with smart paste toggle.

Showing 1 changed file with 2 additions and 3 deletions   Show diff stats
src/selection/linux/paste.c
... ... @@ -152,8 +152,8 @@ static void targets_received(GtkClipboard *clipboard, GdkAtom *atoms, gint n_ato
152 152 {
153 153  
154 154 // If smart paste is enabled try to get formatted clipboard.
155   - debug("%s: Smart paste is %s", __FUNCTION__, (lib3270_toggle(GTK_V3270(widget)->host,LIB3270_TOGGLE_SMART_PASTE) ? "enabled" : "disabled"));
156   - if(lib3270_toggle(GTK_V3270(widget)->host,LIB3270_TOGGLE_SMART_PASTE) && has_target(GTK_V3270_GET_CLASS(widget)->clipboard_formatted,atoms,n_atoms))
  155 + debug("%s: Smart paste is %s", __FUNCTION__, (lib3270_get_toggle(GTK_V3270(widget)->host,LIB3270_TOGGLE_SMART_PASTE) ? "enabled" : "disabled"));
  156 + if(lib3270_get_toggle(GTK_V3270(widget)->host,LIB3270_TOGGLE_SMART_PASTE) && has_target(GTK_V3270_GET_CLASS(widget)->clipboard_formatted,atoms,n_atoms))
157 157 {
158 158 debug("Clipboard as TN3270 \"%s\" data",gdk_atom_name(GTK_V3270_GET_CLASS(widget)->clipboard_formatted));
159 159  
... ... @@ -181,7 +181,6 @@ LIB3270_EXPORT void v3270_paste(GtkWidget *widget)
181 181 g_return_if_fail(GTK_IS_V3270(widget));
182 182  
183 183 GtkClipboard * clipboard = gtk_widget_get_clipboard(widget,GTK_V3270(widget)->selection.target);
184   -
185 184 gtk_clipboard_request_targets(clipboard, (GtkClipboardTargetsReceivedFunc) targets_received, (gpointer) widget);
186 185  
187 186 }
... ...