Mercurial > pidgin
comparison src/multi.c @ 3472:d33ec392a5e1
[gaim-migrate @ 3523]
Rob McQueen went and removed all the GTK version preprocessor statements.
Thanks!
committer: Tailor Script <tailor@pidgin.im>
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Thu, 29 Aug 2002 21:40:08 +0000 |
| parents | 7a3f16a375a5 |
| children | cfbdfe334975 |
comparison
equal
deleted
inserted
replaced
| 3471:7fb93ecd631c | 3472:d33ec392a5e1 |
|---|---|
| 23 #include <ctype.h> | 23 #include <ctype.h> |
| 24 #include <gtk/gtk.h> | 24 #include <gtk/gtk.h> |
| 25 #include "prpl.h" | 25 #include "prpl.h" |
| 26 #include "multi.h" | 26 #include "multi.h" |
| 27 #include "gaim.h" | 27 #include "gaim.h" |
| 28 #ifdef USE_APPLET | |
| 29 #include "applet.h" | |
| 30 #endif | |
| 31 | 28 |
| 32 #include "pixmaps/gnome_add.xpm" | 29 #include "pixmaps/gnome_add.xpm" |
| 33 #include "pixmaps/gnome_preferences.xpm" | 30 #include "pixmaps/gnome_preferences.xpm" |
| 34 #include "pixmaps/join.xpm" | 31 #include "pixmaps/join.xpm" |
| 35 #include "pixmaps/gnome_remove.xpm" | 32 #include "pixmaps/gnome_remove.xpm" |
| 127 while (g) { | 124 while (g) { |
| 128 g_free(g->data); | 125 g_free(g->data); |
| 129 g = g_slist_remove(g, g->data); | 126 g = g_slist_remove(g, g->data); |
| 130 } | 127 } |
| 131 g_free(gc); | 128 g_free(gc); |
| 132 #ifndef USE_APPLET | 129 /* fixme: docklet */ |
| 133 if (!connections && mainwindow) | 130 if (!connections && mainwindow) |
| 134 gtk_widget_show(mainwindow); | 131 gtk_widget_show(mainwindow); |
| 135 #endif | |
| 136 } | 132 } |
| 137 | 133 |
| 138 static void delete_acctedit(GtkWidget *w, gpointer d) | 134 static void delete_acctedit(GtkWidget *w, gpointer d) |
| 139 { | 135 { |
| 140 if (acctedit) { | 136 if (acctedit) { |
| 844 | 840 |
| 845 static void pass_signon(GtkWidget *w, struct pass_prompt *p) | 841 static void pass_signon(GtkWidget *w, struct pass_prompt *p) |
| 846 { | 842 { |
| 847 const char *txt = gtk_entry_get_text(GTK_ENTRY(p->entry)); | 843 const char *txt = gtk_entry_get_text(GTK_ENTRY(p->entry)); |
| 848 g_snprintf(p->u->password, sizeof(p->u->password), "%s", txt); | 844 g_snprintf(p->u->password, sizeof(p->u->password), "%s", txt); |
| 849 #ifdef USE_APPLET | |
| 850 set_user_state(signing_on); | |
| 851 #endif | |
| 852 serv_login(p->u); | 845 serv_login(p->u); |
| 853 gtk_widget_destroy(p->win); | 846 gtk_widget_destroy(p->win); |
| 854 } | 847 } |
| 855 | 848 |
| 856 static void do_pass_dlg(struct aim_user *u) | 849 static void do_pass_dlg(struct aim_user *u) |
| 933 struct prpl *p = find_prpl(u->protocol); | 926 struct prpl *p = find_prpl(u->protocol); |
| 934 if (p && !(p->options & OPT_PROTO_NO_PASSWORD) && !u->password[0]) { | 927 if (p && !(p->options & OPT_PROTO_NO_PASSWORD) && !u->password[0]) { |
| 935 do_pass_dlg(u); | 928 do_pass_dlg(u); |
| 936 } else { | 929 } else { |
| 937 serv_login(u); | 930 serv_login(u); |
| 938 #ifdef USE_APPLET | |
| 939 set_user_state(signing_on); | |
| 940 #endif /* USE_APPLET */ | |
| 941 gtk_clist_set_text(GTK_CLIST(list), row, 1, "Attempting"); | 931 gtk_clist_set_text(GTK_CLIST(list), row, 1, "Attempting"); |
| 942 } | 932 } |
| 943 } else if (u->gc) { | 933 } else if (u->gc) { |
| 944 u->gc->wants_to_die = TRUE; | 934 u->gc->wants_to_die = TRUE; |
| 945 signoff(u->gc); | 935 signoff(u->gc); |
| 1014 GtkWidget *vbox2; | 1004 GtkWidget *vbox2; |
| 1015 GtkWidget *sw; | 1005 GtkWidget *sw; |
| 1016 GtkWidget *button; /* used for many things */ | 1006 GtkWidget *button; /* used for many things */ |
| 1017 | 1007 |
| 1018 if (acctedit) { | 1008 if (acctedit) { |
| 1019 gtk_widget_show(acctedit); | 1009 gtk_window_present(GTK_WINDOW(acctedit)); |
| 1020 return; | 1010 return; |
| 1021 } | 1011 } |
| 1022 | 1012 |
| 1023 acctedit = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 1013 acctedit = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
| 1024 gtk_window_set_title(GTK_WINDOW(acctedit), _("Gaim - Account Editor")); | 1014 gtk_window_set_title(GTK_WINDOW(acctedit), _("Gaim - Account Editor")); |
| 1142 | 1132 |
| 1143 /* then we do the buddy list stuff */ | 1133 /* then we do the buddy list stuff */ |
| 1144 if (mainwindow) | 1134 if (mainwindow) |
| 1145 gtk_widget_hide(mainwindow); | 1135 gtk_widget_hide(mainwindow); |
| 1146 | 1136 |
| 1147 #ifdef USE_APPLET | 1137 /* fixme: docklet |
| 1148 if (blist_options & OPT_BLIST_APP_BUDDY_SHOW) { | 1138 if (blist_options & OPT_BLIST_APP_BUDDY_SHOW) { |
| 1149 show_buddy_list(); | 1139 show_buddy_list(); |
| 1150 refresh_buddy_window(); | 1140 refresh_buddy_window(); |
| 1151 createOnlinePopup(); | 1141 createOnlinePopup(); |
| 1152 applet_buddy_show = TRUE; | 1142 applet_buddy_show = TRUE; |
| 1156 gtk_widget_hide(blist); | 1146 gtk_widget_hide(blist); |
| 1157 applet_buddy_show = FALSE; | 1147 applet_buddy_show = FALSE; |
| 1158 } else { | 1148 } else { |
| 1159 build_edit_tree(); | 1149 build_edit_tree(); |
| 1160 } | 1150 } |
| 1161 set_user_state(online); | 1151 set_user_state(online); */ |
| 1162 #else | 1152 |
| 1163 show_buddy_list(); | 1153 show_buddy_list(); |
| 1164 refresh_buddy_window(); | 1154 refresh_buddy_window(); |
| 1165 #endif | |
| 1166 | 1155 |
| 1167 update_privacy_connections(); | 1156 update_privacy_connections(); |
| 1168 do_away_menu(); | 1157 do_away_menu(); |
| 1169 do_proto_menu(); | 1158 do_proto_menu(); |
| 1170 redo_convo_menus(); | 1159 redo_convo_menus(); |
| 1218 struct aim_user *a = NULL; | 1207 struct aim_user *a = NULL; |
| 1219 | 1208 |
| 1220 while (u) { | 1209 while (u) { |
| 1221 a = (struct aim_user *)u->data; | 1210 a = (struct aim_user *)u->data; |
| 1222 if ((a->options & OPT_USR_AUTO) && (a->options & OPT_USR_REM_PASS)) { | 1211 if ((a->options & OPT_USR_AUTO) && (a->options & OPT_USR_REM_PASS)) { |
| 1223 #ifdef USE_APPLET | |
| 1224 set_user_state(signing_on); | |
| 1225 #endif /* USE_APPLET */ | |
| 1226 serv_login(a); | 1212 serv_login(a); |
| 1227 } | 1213 } |
| 1228 u = u->next; | 1214 u = u->next; |
| 1229 } | 1215 } |
| 1230 } | 1216 } |
| 1467 redo_buddy_list(); | 1453 redo_buddy_list(); |
| 1468 build_edit_tree(); | 1454 build_edit_tree(); |
| 1469 do_away_menu(); | 1455 do_away_menu(); |
| 1470 do_proto_menu(); | 1456 do_proto_menu(); |
| 1471 redo_convo_menus(); | 1457 redo_convo_menus(); |
| 1472 #ifdef USE_APPLET | |
| 1473 if (connections) | |
| 1474 set_user_state(online); | |
| 1475 #endif | |
| 1476 update_privacy_connections(); | 1458 update_privacy_connections(); |
| 1477 | 1459 |
| 1478 if (connections) | 1460 if (connections) |
| 1479 return; | 1461 return; |
| 1480 | 1462 |
| 1481 destroy_all_dialogs(); | 1463 destroy_all_dialogs(); |
| 1482 destroy_buddy(); | 1464 destroy_buddy(); |
| 1483 #ifdef USE_APPLET | 1465 /* fixme: docklet |
| 1484 set_user_state(offline); | 1466 set_user_state(offline); |
| 1485 applet_buddy_show = FALSE; | 1467 applet_buddy_show = FALSE; |
| 1486 | 1468 |
| 1487 if (applet) { | 1469 if (applet) { |
| 1488 /* These don't have any purpose if the applet is gone :-P */ | 1470 /* These don't have any purpose if the applet is gone :-P |
| 1489 applet_widget_unregister_callback(APPLET_WIDGET(applet), "signoff"); | 1471 applet_widget_unregister_callback(APPLET_WIDGET(applet), "signoff"); |
| 1490 applet_widget_register_callback(APPLET_WIDGET(applet), | 1472 applet_widget_register_callback(APPLET_WIDGET(applet), |
| 1491 "autologin", _("Auto-login"), (AppletCallbackFunc)auto_login, NULL); | 1473 "autologin", _("Auto-login"), (AppletCallbackFunc)auto_login, NULL); |
| 1492 remove_applet_away(); | 1474 remove_applet_away(); |
| 1493 } | 1475 } */ |
| 1494 #else | 1476 |
| 1495 show_login(); | 1477 show_login(); |
| 1496 #endif /* USE_APPLET */ | |
| 1497 } | 1478 } |
| 1498 | 1479 |
| 1499 struct aim_user *new_user(const char *name, int proto, int opts) | 1480 struct aim_user *new_user(const char *name, int proto, int opts) |
| 1500 { | 1481 { |
| 1501 char *titles[4]; | 1482 char *titles[4]; |
