Mercurial > pidgin
comparison gtk/gtkaccount.c @ 14251:0fdd320a0235
[gaim-migrate @ 16933]
Don't do icon stuff if the protocol doesn't support icons.
Most of this is indentation changes.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 21 Aug 2006 02:49:42 +0000 |
parents | ec2cd563da47 |
children | c7a1dc62b312 |
comparison
equal
deleted
inserted
replaced
14250:1f963d406bb4 | 14251:0fdd320a0235 |
---|---|
1093 const char *value; | 1093 const char *value; |
1094 char *username; | 1094 char *username; |
1095 char *tmp; | 1095 char *tmp; |
1096 gboolean new = FALSE, icon_change = FALSE; | 1096 gboolean new = FALSE, icon_change = FALSE; |
1097 GaimAccount *account; | 1097 GaimAccount *account; |
1098 GaimPluginProtocolInfo *prpl_info; | |
1098 | 1099 |
1099 if (dialog->account == NULL) | 1100 if (dialog->account == NULL) |
1100 { | 1101 { |
1101 const char *screenname; | 1102 const char *screenname; |
1102 | 1103 |
1119 gaim_account_set_alias(account, value); | 1120 gaim_account_set_alias(account, value); |
1120 else | 1121 else |
1121 gaim_account_set_alias(account, NULL); | 1122 gaim_account_set_alias(account, NULL); |
1122 | 1123 |
1123 /* Buddy Icon */ | 1124 /* Buddy Icon */ |
1124 if (new || gaim_account_get_ui_bool(account, GAIM_GTK_UI, "use-global-buddyicon", TRUE) == | 1125 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(dialog->plugin); |
1125 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->icon_check))) { | 1126 if ((prpl_info != NULL) && (prpl_info->options & OPT_PROTO_IM_IMAGE)) |
1126 icon_change = TRUE; | 1127 { |
1127 } | 1128 if (new || gaim_account_get_ui_bool(account, GAIM_GTK_UI, "use-global-buddyicon", TRUE) == |
1128 gaim_account_set_ui_bool(account, GAIM_GTK_UI, "use-global-buddyicon", !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->icon_check))); | 1129 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->icon_check))) |
1129 gaim_account_set_ui_string(account, GAIM_GTK_UI, "non-global-buddyicon", dialog->icon_path); | 1130 { |
1130 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->icon_check))) { | 1131 icon_change = TRUE; |
1131 gaim_account_set_buddy_icon(account, dialog->icon_path); | 1132 } |
1132 } else if (gaim_prefs_get_string("/gaim/gtk/accounts/buddyicon") && icon_change) { | 1133 gaim_account_set_ui_bool(account, GAIM_GTK_UI, "use-global-buddyicon", !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->icon_check))); |
1133 char *icon = gaim_gtk_convert_buddy_icon(dialog->plugin, gaim_prefs_get_string("/gaim/gtk/accounts/buddyicon")); | 1134 gaim_account_set_ui_string(account, GAIM_GTK_UI, "non-global-buddyicon", dialog->icon_path); |
1134 gaim_account_set_buddy_icon(account, icon); | 1135 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->icon_check))) |
1135 g_free(icon); | 1136 { |
1136 } | 1137 gaim_account_set_buddy_icon(account, dialog->icon_path); |
1137 | 1138 } |
1139 else if (gaim_prefs_get_string("/gaim/gtk/accounts/buddyicon") && icon_change) | |
1140 { | |
1141 char *icon = gaim_gtk_convert_buddy_icon(dialog->plugin, gaim_prefs_get_string("/gaim/gtk/accounts/buddyicon")); | |
1142 gaim_account_set_buddy_icon(account, icon); | |
1143 g_free(icon); | |
1144 } | |
1145 } | |
1146 | |
1138 | 1147 |
1139 /* Remember Password */ | 1148 /* Remember Password */ |
1140 gaim_account_set_remember_password(account, | 1149 gaim_account_set_remember_password(account, |
1141 gtk_toggle_button_get_active( | 1150 gtk_toggle_button_get_active( |
1142 GTK_TOGGLE_BUTTON(dialog->remember_pass_check))); | 1151 GTK_TOGGLE_BUTTON(dialog->remember_pass_check))); |