1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: GTK gives an error when selecting a non-existent file.
12 Solution: Add a handler to avoid the error. (Christian Brabandt)
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
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);
30 #if defined(FEAT_TOOLBAR)
37 char_u dirbuf[MAXPATHL];
39 + const gchar *domain = "Gtk";
41 title = CONVERT_TO_UTF8(title);
46 /* If our pointer is currently hidden, then we should show it. */
47 gui_mch_mousehide(FALSE);
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);
54 #ifdef USE_FILE_CHOOSER
55 /* We create the dialog each time, so that the button text can be "Open"
56 * or "Save" according to the action. */
60 gtk_widget_show(gui.filedlg);
63 + g_log_remove_handler(domain, log_handler);
65 CONVERT_TO_UTF8_FREE(title);
66 if (gui.browse_fname == NULL)
70 * backwards compatibility anyway. */
71 do_cmdline_cmd((char_u *)"emenu ToolBar.FindHelp");
75 + recent_func_log_func(const gchar *log_domain UNUSED,
76 + GLogLevelFlags log_level UNUSED,
77 + const gchar *message UNUSED,
78 + gpointer user_data UNUSED)
80 + /* We just want to suppress the warnings. */
81 + /* http://bugzilla.gnome.org/show_bug.cgi?id=664587 */
84 *** ../vim-7.3.505/src/version.c 2012-04-25 16:50:44.000000000 +0200
85 --- src/version.c 2012-04-25 17:08:28.000000000 +0200
89 { /* Add new patch number below this line */
95 Compilation process failed successfully.
97 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
98 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
99 \\\ an exciting new programming language -- http://www.Zimbu.org ///
100 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///