Mercurial > pidgin.yaz
comparison pidgin/gtkutils.c @ 21354:fcb848b2d669
merge of '1037fab539d2a95db4fc657f42420566f7e53440'
and 'd1b14e76c499bc5d99b77e71539d5ebb0e14b965'
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 16 Nov 2007 23:32:17 +0000 |
parents | 51cf02dbdb0e 8ae227dca885 |
children | 665e04562de0 |
comparison
equal
deleted
inserted
replaced
21099:51cf02dbdb0e | 21354:fcb848b2d669 |
---|---|
109 if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/use_theme_font")) { | 109 if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/use_theme_font")) { |
110 const char *font = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/custom_font"); | 110 const char *font = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/custom_font"); |
111 desc = pango_font_description_from_string(font); | 111 desc = pango_font_description_from_string(font); |
112 } else if (purple_running_gnome()) { | 112 } else if (purple_running_gnome()) { |
113 /* Use the GNOME "document" font, if applicable */ | 113 /* Use the GNOME "document" font, if applicable */ |
114 char *path, *font; | 114 char *path; |
115 | 115 |
116 if ((path = g_find_program_in_path("gconftool-2"))) { | 116 if ((path = g_find_program_in_path("gconftool-2"))) { |
117 char *font = NULL; | |
117 g_free(path); | 118 g_free(path); |
118 if (!g_spawn_command_line_sync( | 119 if (g_spawn_command_line_sync( |
119 "gconftool-2 -g /desktop/gnome/interface/document_font_name", | 120 "gconftool-2 -g /desktop/gnome/interface/document_font_name", |
120 &font, NULL, NULL, NULL)) | 121 &font, NULL, NULL, NULL)) { |
121 return; | 122 desc = pango_font_description_from_string(font); |
122 } | 123 } |
123 desc = pango_font_description_from_string(font); | 124 g_free(font); |
124 g_free(font); | 125 } |
125 } | 126 } |
126 | 127 |
127 if (desc) { | 128 if (desc) { |
128 gtk_widget_modify_font(imhtml, desc); | 129 gtk_widget_modify_font(imhtml, desc); |
129 pango_font_description_free(desc); | 130 pango_font_description_free(desc); |
130 } | 131 } |
131 } | 132 } |
1523 if (prpl_info && prpl_info->options & OPT_PROTO_IM_IMAGE) | 1524 if (prpl_info && prpl_info->options & OPT_PROTO_IM_IMAGE) |
1524 im = TRUE; | 1525 im = TRUE; |
1525 | 1526 |
1526 if (prpl_info && prpl_info->can_receive_file) | 1527 if (prpl_info && prpl_info->can_receive_file) |
1527 ft = prpl_info->can_receive_file(gc, who); | 1528 ft = prpl_info->can_receive_file(gc, who); |
1529 else if (prpl_info && prpl_info->send_file) | |
1530 ft = TRUE; | |
1528 | 1531 |
1529 if (im && ft) | 1532 if (im && ft) |
1530 purple_request_choice(NULL, NULL, | 1533 purple_request_choice(NULL, NULL, |
1531 _("You have dragged an image"), | 1534 _("You have dragged an image"), |
1532 _("You can send this image as a file transfer, " | 1535 _("You can send this image as a file transfer, " |
1556 account, who, NULL, | 1559 account, who, NULL, |
1557 data, | 1560 data, |
1558 _("Set as buddy icon"), DND_BUDDY_ICON, | 1561 _("Set as buddy icon"), DND_BUDDY_ICON, |
1559 (ft ? _("Send image file") : _("Insert in message")), (ft ? DND_FILE_TRANSFER : DND_IM_IMAGE), | 1562 (ft ? _("Send image file") : _("Insert in message")), (ft ? DND_FILE_TRANSFER : DND_IM_IMAGE), |
1560 NULL); | 1563 NULL); |
1564 gdk_pixbuf_unref(pb); | |
1561 return; | 1565 return; |
1562 } | 1566 } |
1563 | 1567 |
1564 #ifndef _WIN32 | 1568 #ifndef _WIN32 |
1565 /* Are we trying to send a .desktop file? */ | 1569 /* Are we trying to send a .desktop file? */ |