| 920 g_object_set_data(G_OBJECT(optmenu), "filter_func", filter_func); |
920 g_object_set_data(G_OBJECT(optmenu), "filter_func", filter_func); |
| 921 |
921 |
| 922 return optmenu; |
922 return optmenu; |
| 923 } |
923 } |
| 924 |
924 |
| 925 gboolean |
|
| 926 pidgin_check_if_dir(const char *path, GtkFileSelection *filesel) |
|
| 927 { |
|
| 928 char *dirname = NULL; |
|
| 929 |
|
| 930 if (g_file_test(path, G_FILE_TEST_IS_DIR)) { |
|
| 931 /* append a / if needed */ |
|
| 932 if (path[strlen(path) - 1] != G_DIR_SEPARATOR) { |
|
| 933 dirname = g_strconcat(path, G_DIR_SEPARATOR_S, NULL); |
|
| 934 } |
|
| 935 gtk_file_selection_set_filename(filesel, (dirname != NULL) ? dirname : path); |
|
| 936 g_free(dirname); |
|
| 937 return TRUE; |
|
| 938 } |
|
| 939 |
|
| 940 return FALSE; |
|
| 941 } |
|
| 942 |
|
| 943 void |
925 void |
| 944 pidgin_setup_gtkspell(GtkTextView *textview) |
926 pidgin_setup_gtkspell(GtkTextView *textview) |
| 945 { |
927 { |
| 946 #ifdef USE_GTKSPELL |
928 #ifdef USE_GTKSPELL |
| 947 GError *error = NULL; |
929 GError *error = NULL; |
| 1000 |
982 |
| 1001 static void |
983 static void |
| 1002 show_retrieveing_info(PurpleConnection *conn, const char *name) |
984 show_retrieveing_info(PurpleConnection *conn, const char *name) |
| 1003 { |
985 { |
| 1004 PurpleNotifyUserInfo *info = purple_notify_user_info_new(); |
986 PurpleNotifyUserInfo *info = purple_notify_user_info_new(); |
| 1005 purple_notify_user_info_add_pair(info, _("Information"), _("Retrieving...")); |
987 purple_notify_user_info_add_pair_plaintext(info, _("Information"), _("Retrieving...")); |
| 1006 purple_notify_userinfo(conn, name, info, NULL, NULL); |
988 purple_notify_userinfo(conn, name, info, NULL, NULL); |
| 1007 purple_notify_user_info_destroy(info); |
989 purple_notify_user_info_destroy(info); |
| 1008 } |
990 } |
| 1009 |
991 |
| 1010 void pidgin_retrieve_user_info(PurpleConnection *conn, const char *name) |
992 void pidgin_retrieve_user_info(PurpleConnection *conn, const char *name) |
| 1306 */ |
1288 */ |
| 1307 gtk_widget_size_request (widget, &requisition); |
1289 gtk_widget_size_request (widget, &requisition); |
| 1308 |
1290 |
| 1309 monitor_num = gdk_screen_get_monitor_at_point (screen, *x, *y); |
1291 monitor_num = gdk_screen_get_monitor_at_point (screen, *x, *y); |
| 1310 |
1292 |
| 1311 push_in = FALSE; |
1293 *push_in = FALSE; |
| 1312 |
1294 |
| 1313 /* |
1295 /* |
| 1314 * The placement of popup menus horizontally works like this (with |
1296 * The placement of popup menus horizontally works like this (with |
| 1315 * RTL in parentheses) |
1297 * RTL in parentheses) |
| 1316 * |
1298 * |
| 2179 } else { |
2161 } else { |
| 2180 return all || (completion_entry->entry.logged_buddy->account != NULL && purple_account_is_connected(completion_entry->entry.logged_buddy->account)); |
2162 return all || (completion_entry->entry.logged_buddy->account != NULL && purple_account_is_connected(completion_entry->entry.logged_buddy->account)); |
| 2181 } |
2163 } |
| 2182 } |
2164 } |
| 2183 |
2165 |
| 2184 void |
|
| 2185 pidgin_setup_screenname_autocomplete(GtkWidget *entry, GtkWidget *accountopt, gboolean all) { |
|
| 2186 pidgin_setup_screenname_autocomplete_with_filter(entry, accountopt, pidgin_screenname_autocomplete_default_filter, GINT_TO_POINTER(all)); |
|
| 2187 } |
|
| 2188 |
|
| 2189 |
|
| 2190 |
|
| 2191 void pidgin_set_cursor(GtkWidget *widget, GdkCursorType cursor_type) |
2166 void pidgin_set_cursor(GtkWidget *widget, GdkCursorType cursor_type) |
| 2192 { |
2167 { |
| 2193 GdkCursor *cursor; |
2168 GdkCursor *cursor; |
| 2194 |
2169 |
| 2195 g_return_if_fail(widget != NULL); |
2170 g_return_if_fail(widget != NULL); |
| 2529 path, plugin->info->name); |
2504 path, plugin->info->name); |
| 2530 purple_notify_error(NULL, _("Icon Error"), _("Could not set icon"), tmp); |
2505 purple_notify_error(NULL, _("Icon Error"), _("Could not set icon"), tmp); |
| 2531 g_free(tmp); |
2506 g_free(tmp); |
| 2532 |
2507 |
| 2533 return NULL; |
2508 return NULL; |
| 2534 } |
|
| 2535 |
|
| 2536 void pidgin_set_custom_buddy_icon(PurpleAccount *account, const char *who, const char *filename) |
|
| 2537 { |
|
| 2538 PurpleBuddy *buddy; |
|
| 2539 PurpleContact *contact; |
|
| 2540 |
|
| 2541 buddy = purple_find_buddy(account, who); |
|
| 2542 if (!buddy) { |
|
| 2543 purple_debug_info("custom-icon", "You can only set custom icon for someone in your buddylist.\n"); |
|
| 2544 return; |
|
| 2545 } |
|
| 2546 |
|
| 2547 contact = purple_buddy_get_contact(buddy); |
|
| 2548 purple_buddy_icons_node_set_custom_icon_from_file((PurpleBlistNode*)contact, filename); |
|
| 2549 } |
2509 } |
| 2550 |
2510 |
| 2551 char *pidgin_make_pretty_arrows(const char *str) |
2511 char *pidgin_make_pretty_arrows(const char *str) |
| 2552 { |
2512 { |
| 2553 char *ret; |
2513 char *ret; |