comparison src/aim.c @ 109:45bcfa3b584c

[gaim-migrate @ 119] Added an option to not play 'login' sounds when people first sign on. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 12 Apr 2000 21:30:29 +0000
parents 55faf2e3a134
children e277d5f0c1dd
comparison
equal deleted inserted replaced
108:9a544c677ab7 109:45bcfa3b584c
107 usleep(10); 107 usleep(10);
108 while (gtk_events_pending()) 108 while (gtk_events_pending())
109 gtk_main_iteration(); 109 gtk_main_iteration();
110 } 110 }
111 111
112 static int snd_tmout;
113 static void sound_timeout() {
114 sound_options += OPT_SOUND_LOGIN;
115 gtk_timeout_remove(snd_tmout);
116 }
117
112 void dologin(GtkWidget *widget, GtkWidget *w) 118 void dologin(GtkWidget *widget, GtkWidget *w)
113 { 119 {
114 static gboolean running = FALSE; 120 static gboolean running = FALSE;
115 char *username = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(name)->entry)); 121 char *username = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(name)->entry));
116 char *password = gtk_entry_get_text(GTK_ENTRY(pass)); 122 char *password = gtk_entry_get_text(GTK_ENTRY(pass));
136 running = TRUE; 142 running = TRUE;
137 143
138 if (serv_login(username, password) < 0) { 144 if (serv_login(username, password) < 0) {
139 running = FALSE; 145 running = FALSE;
140 return; 146 return;
147 }
148
149 if (sound_options & OPT_SOUND_LOGIN &&
150 sound_options & OPT_SOUND_SILENT_SIGNON) {
151 sound_options -= OPT_SOUND_LOGIN;
152 snd_tmout = gtk_timeout_add(10000, (GtkFunction)sound_timeout,
153 NULL);
141 } 154 }
142 155
143 #ifdef USE_APPLET 156 #ifdef USE_APPLET
144 applet_widget_unregister_callback(APPLET_WIDGET(applet),"signon"); 157 applet_widget_unregister_callback(APPLET_WIDGET(applet),"signon");
145 applet_widget_register_callback(APPLET_WIDGET(applet), 158 applet_widget_register_callback(APPLET_WIDGET(applet),