Karsten Hopp 0908f1
To: vim-dev@vim.org
Karsten Hopp 0908f1
Subject: Patch 7.2.444
Karsten Hopp 0908f1
Fcc: outbox
Karsten Hopp 0908f1
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 0908f1
Mime-Version: 1.0
Karsten Hopp 0908f1
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 0908f1
Content-Transfer-Encoding: 8bit
Karsten Hopp 0908f1
------------
Karsten Hopp 0908f1
Karsten Hopp 0908f1
Patch 7.2.444 (after 7.2.442)
Karsten Hopp 0908f1
Problem:    Can't build with GTK 1, gtk_selection_clear_targets() is not
Karsten Hopp 0908f1
            available. (Patrick Texier)
Karsten Hopp 0908f1
Solution:   Don't change the targets for GTK 1, set them once.
Karsten Hopp 0908f1
Files:      src/gui_gtk_x11.c, src/option.c
Karsten Hopp 0908f1
Karsten Hopp 0908f1
Karsten Hopp 0908f1
*** ../vim-7.2.443/src/gui_gtk_x11.c	2010-06-05 12:49:40.000000000 +0200
Karsten Hopp 0908f1
--- src/gui_gtk_x11.c	2010-06-13 02:26:24.000000000 +0200
Karsten Hopp 0908f1
***************
Karsten Hopp 0908f1
*** 3478,3484 ****
Karsten Hopp 0908f1
  
Karsten Hopp 0908f1
      for (i = 0; i < (int)N_SELECTION_TARGETS; ++i)
Karsten Hopp 0908f1
      {
Karsten Hopp 0908f1
! #ifdef FEAT_MBYTE
Karsten Hopp 0908f1
  	/* OpenOffice tries to use TARGET_HTML and fails when it doesn't
Karsten Hopp 0908f1
  	 * return something, instead of trying another target. Therefore only
Karsten Hopp 0908f1
  	 * offer TARGET_HTML when it works. */
Karsten Hopp 0908f1
--- 3478,3484 ----
Karsten Hopp 0908f1
  
Karsten Hopp 0908f1
      for (i = 0; i < (int)N_SELECTION_TARGETS; ++i)
Karsten Hopp 0908f1
      {
Karsten Hopp 0908f1
! #if defined(FEAT_MBYTE) && defined(HAVE_GTK2)
Karsten Hopp 0908f1
  	/* OpenOffice tries to use TARGET_HTML and fails when it doesn't
Karsten Hopp 0908f1
  	 * return something, instead of trying another target. Therefore only
Karsten Hopp 0908f1
  	 * offer TARGET_HTML when it works. */
Karsten Hopp 0908f1
***************
Karsten Hopp 0908f1
*** 3489,3496 ****
Karsten Hopp 0908f1
--- 3489,3498 ----
Karsten Hopp 0908f1
  	    targets[j++] = selection_targets[i];
Karsten Hopp 0908f1
      }
Karsten Hopp 0908f1
  
Karsten Hopp 0908f1
+ #ifdef HAVE_GTK2  /* GTK 1 doesn't have this function */
Karsten Hopp 0908f1
      gtk_selection_clear_targets(gui.drawarea, (GdkAtom)GDK_SELECTION_PRIMARY);
Karsten Hopp 0908f1
      gtk_selection_clear_targets(gui.drawarea, (GdkAtom)clip_plus.gtk_sel_atom);
Karsten Hopp 0908f1
+ #endif
Karsten Hopp 0908f1
      gtk_selection_add_targets(gui.drawarea,
Karsten Hopp 0908f1
  			      (GdkAtom)GDK_SELECTION_PRIMARY,
Karsten Hopp 0908f1
  			      targets, n_targets);
Karsten Hopp 0908f1
*** ../vim-7.2.443/src/option.c	2010-06-05 12:49:40.000000000 +0200
Karsten Hopp 0908f1
--- src/option.c	2010-06-13 02:27:36.000000000 +0200
Karsten Hopp 0908f1
***************
Karsten Hopp 0908f1
*** 7112,7118 ****
Karsten Hopp 0908f1
  	clip_html = new_html;
Karsten Hopp 0908f1
  	vim_free(clip_exclude_prog);
Karsten Hopp 0908f1
  	clip_exclude_prog = new_exclude_prog;
Karsten Hopp 0908f1
! #ifdef FEAT_GUI_GTK
Karsten Hopp 0908f1
  	if (gui.in_use)
Karsten Hopp 0908f1
  	{
Karsten Hopp 0908f1
  	    gui_gtk_set_selection_targets();
Karsten Hopp 0908f1
--- 7112,7118 ----
Karsten Hopp 0908f1
  	clip_html = new_html;
Karsten Hopp 0908f1
  	vim_free(clip_exclude_prog);
Karsten Hopp 0908f1
  	clip_exclude_prog = new_exclude_prog;
Karsten Hopp 0908f1
! #ifdef HAVE_GTK2  /* for GTK 1 we can't change the list of targets */
Karsten Hopp 0908f1
  	if (gui.in_use)
Karsten Hopp 0908f1
  	{
Karsten Hopp 0908f1
  	    gui_gtk_set_selection_targets();
Karsten Hopp 0908f1
*** ../vim-7.2.443/src/version.c	2010-06-12 20:11:53.000000000 +0200
Karsten Hopp 0908f1
--- src/version.c	2010-06-13 02:29:18.000000000 +0200
Karsten Hopp 0908f1
***************
Karsten Hopp 0908f1
*** 683,684 ****
Karsten Hopp 0908f1
--- 683,686 ----
Karsten Hopp 0908f1
  {   /* Add new patch number below this line */
Karsten Hopp 0908f1
+ /**/
Karsten Hopp 0908f1
+     444,
Karsten Hopp 0908f1
  /**/
Karsten Hopp 0908f1
Karsten Hopp 0908f1
-- 
Karsten Hopp 0908f1
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 0908f1
195. Your cat has its own home page.
Karsten Hopp 0908f1
Karsten Hopp 0908f1
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 0908f1
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 0908f1
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 0908f1
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///