comparison pidgin/gtkutils.c @ 16991:1d7e0acc8a3e

Fix #459 - Choose buddy icon UI doesn't list the current directory. The "update-preview" signal cb must call gtk_file_chooser_set_preview_widget_active().
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 09 May 2007 21:12:23 +0000
parents a728447e4e72
children 87e6707b512f
comparison
equal deleted inserted replaced
16988:563a42d98e3a 16991:1d7e0acc8a3e
101 101
102 /* Use the GNOME "document" font, if applicable */ 102 /* Use the GNOME "document" font, if applicable */
103 if (purple_running_gnome()) { 103 if (purple_running_gnome()) {
104 char *path, *font; 104 char *path, *font;
105 PangoFontDescription *desc = NULL; 105 PangoFontDescription *desc = NULL;
106 106
107 if ((path = g_find_program_in_path("gconftool-2"))) { 107 if ((path = g_find_program_in_path("gconftool-2"))) {
108 g_free(path); 108 g_free(path);
109 if (!g_spawn_command_line_sync( 109 if (!g_spawn_command_line_sync(
110 "gconftool-2 -g /desktop/gnome/interface/document_font_name", 110 "gconftool-2 -g /desktop/gnome/interface/document_font_name",
111 &font, NULL, NULL, NULL)) 111 &font, NULL, NULL, NULL))
112 return; 112 return;
113 } 113 }
114 desc = pango_font_description_from_string(font); 114 desc = pango_font_description_from_string(font);
115 g_free(font); 115 g_free(font);
116 116
117 if (desc) { 117 if (desc) {
118 gtk_widget_modify_font(imhtml, desc); 118 gtk_widget_modify_font(imhtml, desc);
119 pango_font_description_free(desc); 119 pango_font_description_free(desc);
120 } 120 }
121 } 121 }
2277 GTK_FILE_SELECTION(dialog->icon_filesel))); 2277 GTK_FILE_SELECTION(dialog->icon_filesel)));
2278 #endif /* FILECHOOSER */ 2278 #endif /* FILECHOOSER */
2279 2279
2280 if (!filename || g_stat(filename, &st)) 2280 if (!filename || g_stat(filename, &st))
2281 { 2281 {
2282 #if GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */
2283 gtk_file_chooser_set_preview_widget_active(
2284 GTK_FILE_CHOOSER(dialog->icon_filesel), FALSE);
2285 #endif /* FILECHOOSER */
2282 g_free(filename); 2286 g_free(filename);
2283 return; 2287 return;
2284 } 2288 }
2285 2289
2286 pixbuf = gdk_pixbuf_new_from_file(filename, NULL); 2290 pixbuf = gdk_pixbuf_new_from_file(filename, NULL);