home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.3 / 7.3.506 < prev    next >
Encoding:
Internet Message Format  |  2012-11-20  |  3.0 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.506
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.506
  11. Problem:    GTK gives an error when selecting a non-existent file.
  12. Solution:   Add a handler to avoid the error. (Christian Brabandt)
  13. Files:        src/gui_gtk.c
  14.  
  15.  
  16. *** ../vim-7.3.505/src/gui_gtk.c    2011-06-26 04:48:56.000000000 +0200
  17. --- src/gui_gtk.c    2012-04-25 17:08:58.000000000 +0200
  18. ***************
  19. *** 90,95 ****
  20. --- 90,100 ----
  21.   static void entry_activate_cb(GtkWidget *widget, gpointer data);
  22.   static void entry_changed_cb(GtkWidget *entry, GtkWidget *dialog);
  23.   static void find_replace_cb(GtkWidget *widget, gpointer data);
  24. + static void recent_func_log_func(
  25. +     const gchar *log_domain,
  26. +     GLogLevelFlags log_level,
  27. +     const gchar *message,
  28. +     gpointer user_data);
  29.   
  30.   #if defined(FEAT_TOOLBAR)
  31.   /*
  32. ***************
  33. *** 839,844 ****
  34. --- 844,851 ----
  35.       GtkWidget        *fc;
  36.   #endif
  37.       char_u        dirbuf[MAXPATHL];
  38. +     guint        log_handler;
  39. +     const gchar        *domain = "Gtk";
  40.   
  41.       title = CONVERT_TO_UTF8(title);
  42.   
  43. ***************
  44. *** 853,858 ****
  45. --- 860,870 ----
  46.       /* If our pointer is currently hidden, then we should show it. */
  47.       gui_mch_mousehide(FALSE);
  48.   
  49. +     /* Hack: The GTK file dialog warns when it can't access a new file, this
  50. +      * makes it shut up. http://bugzilla.gnome.org/show_bug.cgi?id=664587 */
  51. +     log_handler = g_log_set_handler(domain, G_LOG_LEVEL_WARNING,
  52. +                           recent_func_log_func, NULL);
  53.   #ifdef USE_FILE_CHOOSER
  54.       /* We create the dialog each time, so that the button text can be "Open"
  55.        * or "Save" according to the action. */
  56. ***************
  57. *** 916,921 ****
  58. --- 928,934 ----
  59.       gtk_widget_show(gui.filedlg);
  60.       gtk_main();
  61.   #endif
  62. +     g_log_remove_handler(domain, log_handler);
  63.   
  64.       CONVERT_TO_UTF8_FREE(title);
  65.       if (gui.browse_fname == NULL)
  66. ***************
  67. *** 1882,1884 ****
  68. --- 1895,1908 ----
  69.        * backwards compatibility anyway. */
  70.       do_cmdline_cmd((char_u *)"emenu ToolBar.FindHelp");
  71.   }
  72. +     static void
  73. + recent_func_log_func(const gchar *log_domain UNUSED,
  74. +              GLogLevelFlags log_level UNUSED,
  75. +              const gchar *message UNUSED,
  76. +              gpointer user_data UNUSED)
  77. + {
  78. +     /* We just want to suppress the warnings. */
  79. +     /* http://bugzilla.gnome.org/show_bug.cgi?id=664587 */
  80. + }
  81. *** ../vim-7.3.505/src/version.c    2012-04-25 16:50:44.000000000 +0200
  82. --- src/version.c    2012-04-25 17:08:28.000000000 +0200
  83. ***************
  84. *** 716,717 ****
  85. --- 716,719 ----
  86.   {   /* Add new patch number below this line */
  87. + /**/
  88. +     506,
  89.   /**/
  90.  
  91. -- 
  92. Compilation process failed successfully.
  93.  
  94.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  95. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  96. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  97.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  98.