for (i = 0; i < (int)N_SELECTION_TARGETS; ++i)
{
-#ifdef FEAT_MBYTE
+#if defined(FEAT_MBYTE) && defined(HAVE_GTK2)
/* OpenOffice tries to use TARGET_HTML and fails when it doesn't
* return something, instead of trying another target. Therefore only
* offer TARGET_HTML when it works. */
targets[j++] = selection_targets[i];
}
+#ifdef HAVE_GTK2 /* GTK 1 doesn't have this function */
gtk_selection_clear_targets(gui.drawarea, (GdkAtom)GDK_SELECTION_PRIMARY);
gtk_selection_clear_targets(gui.drawarea, (GdkAtom)clip_plus.gtk_sel_atom);
+#endif
gtk_selection_add_targets(gui.drawarea,
(GdkAtom)GDK_SELECTION_PRIMARY,
targets, n_targets);
clip_html = new_html;
vim_free(clip_exclude_prog);
clip_exclude_prog = new_exclude_prog;
-#ifdef FEAT_GUI_GTK
+#ifdef HAVE_GTK2 /* for GTK 1 we can't change the list of targets */
if (gui.in_use)
{
gui_gtk_set_selection_targets();