Mercurial > pidgin
comparison src/gtkconn.c @ 10643:868aafbe859b
[gaim-migrate @ 12153]
GtkGaimStatusBox, a new status selection widget.
It currently sucks. Pretty much just the UI code with enough copy/paste
code hacked in from gtkstatusselector to minimally work.
Minimally work provided you're only using protocol which have already been
updated to handle offline/online as statuses. Which I think is limited to
AIM and Yahoo! right now. Anyway, it's cool.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 27 Feb 2005 08:35:11 +0000 |
parents | 1a97d5e88d12 |
children | 55af3fa46329 |
comparison
equal
deleted
inserted
replaced
10642:0376d4c84b9f | 10643:868aafbe859b |
---|---|
27 | 27 |
28 #include "account.h" | 28 #include "account.h" |
29 #include "debug.h" | 29 #include "debug.h" |
30 #include "notify.h" | 30 #include "notify.h" |
31 #include "prefs.h" | 31 #include "prefs.h" |
32 #include "gtkblist.h" | |
33 #include "gtkstatusbox.h" | |
32 #include "gtkstock.h" | 34 #include "gtkstock.h" |
33 #include "util.h" | 35 #include "util.h" |
34 | 36 |
35 #include "gtkblist.h" | 37 #include "gtkblist.h" |
36 #include "gtkdialogs.h" | 38 #include "gtkdialogs.h" |
37 #include "gtkutils.h" | 39 #include "gtkutils.h" |
38 | 40 |
39 static void gaim_gtk_connection_connect_progress(GaimConnection *gc, | 41 static void gaim_gtk_connection_connect_progress(GaimConnection *gc, |
40 const char *text, size_t step, size_t step_count) | 42 const char *text, size_t step, size_t step_count) |
41 { | 43 { |
42 /* SME - Pulse the statusselector */ | 44 GaimGtkBuddyList *gtkblist = gaim_gtk_blist_get_default_gtk_blist(); |
45 if (!gtkblist) | |
46 return; | |
47 gtk_gaim_status_box_set_connecting(GTK_GAIM_STATUS_BOX(gtkblist->statusbox), | |
48 (gaim_connections_get_connecting() != NULL)); | |
49 gtk_gaim_status_box_pulse_connecting(GTK_GAIM_STATUS_BOX(gtkblist->statusbox)); | |
43 } | 50 } |
44 | 51 |
45 static void gaim_gtk_connection_connected(GaimConnection *gc) | 52 static void gaim_gtk_connection_connected(GaimConnection *gc) |
46 { | 53 { |
47 | 54 GaimGtkBuddyList *gtkblist = gaim_gtk_blist_get_default_gtk_blist(); |
48 #if 0 /* XXX CORE/UI */ | 55 if (!gtkblist) |
49 do_away_menu(); | 56 return; |
50 #endif | 57 gtk_gaim_status_box_set_connecting(GTK_GAIM_STATUS_BOX(gtkblist->statusbox), |
58 (gaim_connections_get_connecting() != NULL)); | |
51 gaim_gtk_blist_update_protocol_actions(); | 59 gaim_gtk_blist_update_protocol_actions(); |
52 | 60 |
53 } | 61 } |
54 | 62 |
55 static void gaim_gtk_connection_disconnected(GaimConnection *gc) | 63 static void gaim_gtk_connection_disconnected(GaimConnection *gc) |
56 { | 64 { |
57 #if 0 /* XXX CORE/UI */ | 65 GaimGtkBuddyList *gtkblist = gaim_gtk_blist_get_default_gtk_blist(); |
58 do_away_menu(); | 66 if (!gtkblist) |
59 #endif | 67 return; |
68 gtk_gaim_status_box_set_connecting(GTK_GAIM_STATUS_BOX(gtkblist->statusbox), | |
69 (gaim_connections_get_connecting() != NULL)); | |
60 gaim_gtk_blist_update_protocol_actions(); | 70 gaim_gtk_blist_update_protocol_actions(); |
61 | 71 |
62 if (gaim_connections_get_all() != NULL) | 72 if (gaim_connections_get_all() != NULL) |
63 return; | 73 return; |
64 | 74 |