Mercurial > pidgin.yaz
comparison pidgin/gtkutils.c @ 32322:58e0e310ef2e
Remove a few deprecated functions
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 21 Aug 2011 02:56:19 +0000 |
parents | 70ff869a74d1 |
children | 9aee8493db7f 3322201b446f |
comparison
equal
deleted
inserted
replaced
32321:67f8717477ea | 32322:58e0e310ef2e |
---|---|
918 g_object_set_data(G_OBJECT(optmenu), "user_data", user_data); | 918 g_object_set_data(G_OBJECT(optmenu), "user_data", user_data); |
919 g_object_set_data(G_OBJECT(optmenu), "show_all", GINT_TO_POINTER(show_all)); | 919 g_object_set_data(G_OBJECT(optmenu), "show_all", GINT_TO_POINTER(show_all)); |
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 } | |
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 } | 923 } |
942 | 924 |
943 void | 925 void |
944 pidgin_setup_gtkspell(GtkTextView *textview) | 926 pidgin_setup_gtkspell(GtkTextView *textview) |
945 { | 927 { |
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; |