Mercurial > pidgin
comparison src/aim.c @ 84:51943f1a97a0
[gaim-migrate @ 94]
Changed how some of the applet away and callbacks work so that you can't
open the buddy list or be away without signing on first. Also made it so
you can't try to sign on *while* signing on, by clicking "signon" while
already signing on. Apparently, this had caused segfaults and other bad
things to happen to some people.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 05 Apr 2000 21:46:07 +0000 |
parents | 05077cb276d4 |
children | 2cae618a91e2 |
comparison
equal
deleted
inserted
replaced
83:8a98f129c849 | 84:51943f1a97a0 |
---|---|
109 gtk_main_iteration(); | 109 gtk_main_iteration(); |
110 } | 110 } |
111 | 111 |
112 void dologin(GtkWidget *widget, GtkWidget *w) | 112 void dologin(GtkWidget *widget, GtkWidget *w) |
113 { | 113 { |
114 static gboolean running = FALSE; | |
114 char *username = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(name)->entry)); | 115 char *username = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(name)->entry)); |
115 char *password = gtk_entry_get_text(GTK_ENTRY(pass)); | 116 char *password = gtk_entry_get_text(GTK_ENTRY(pass)); |
116 | 117 |
117 if (query_state() != STATE_OFFLINE) | 118 if (query_state() != STATE_OFFLINE) |
118 return; | 119 return; |
129 #ifdef USE_APPLET | 130 #ifdef USE_APPLET |
130 set_applet_draw_closed(); | 131 set_applet_draw_closed(); |
131 setUserState(signing_on); | 132 setUserState(signing_on); |
132 #endif /* USE_APPLET */ | 133 #endif /* USE_APPLET */ |
133 | 134 |
134 | 135 if (running) return; |
135 if (serv_login(username, password) < 0) | 136 running = TRUE; |
137 | |
138 if (serv_login(username, password) < 0) { | |
139 running = FALSE; | |
136 return; | 140 return; |
137 | 141 } |
138 return; | 142 |
143 #ifdef USE_APPLET | |
144 applet_widget_unregister_callback(APPLET_WIDGET(applet),"signon"); | |
145 applet_widget_register_callback(APPLET_WIDGET(applet), | |
146 "buddy", | |
147 _("Buddy List"), | |
148 (AppletCallbackFunc)make_buddy, | |
149 NULL); | |
150 applet_widget_register_callback(APPLET_WIDGET(applet), | |
151 "signoff", | |
152 _("Signoff"), | |
153 signoff, | |
154 NULL); | |
155 #endif | |
156 running = FALSE; | |
157 return; | |
139 } | 158 } |
140 | 159 |
141 | 160 |
142 | 161 |
143 | 162 |