comparison gtk/gtkstatusbox.c @ 14705:05c34aabdcc3

[gaim-migrate @ 17458] I think we should let people know why we're not connecting... If someone can think of better (shorter) wording, feel free to change it committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Wed, 11 Oct 2006 03:13:33 +0000
parents beabf64760e8
children 63d5b71d0c68
comparison
equal deleted inserted replaced
14704:c1a308cc63f7 14705:05c34aabdcc3
41 41
42 #include <gdk/gdkkeysyms.h> 42 #include <gdk/gdkkeysyms.h>
43 43
44 #include "account.h" 44 #include "account.h"
45 #include "internal.h" 45 #include "internal.h"
46 #include "network.h"
46 #include "savedstatuses.h" 47 #include "savedstatuses.h"
47 #include "status.h" 48 #include "status.h"
48 #include "debug.h" 49 #include "debug.h"
49 50
50 #include "gtkgaim.h" 51 #include "gtkgaim.h"
551 /* Secondary */ 552 /* Secondary */
552 if (status_box->typing != 0) 553 if (status_box->typing != 0)
553 secondary = g_strdup(_("Typing")); 554 secondary = g_strdup(_("Typing"));
554 else if (status_box->connecting) 555 else if (status_box->connecting)
555 secondary = g_strdup(_("Connecting")); 556 secondary = g_strdup(_("Connecting"));
557 else if (!status_box->network_available)
558 secondary = g_strdup(_("Waiting for network connection"));
556 else if (gaim_savedstatus_is_transient(saved_status)) 559 else if (gaim_savedstatus_is_transient(saved_status))
557 secondary = NULL; 560 secondary = NULL;
558 else 561 else
559 { 562 {
560 const char *message; 563 const char *message;
1263 GtkCellRenderer *text_rend; 1266 GtkCellRenderer *text_rend;
1264 GtkCellRenderer *icon_rend; 1267 GtkCellRenderer *icon_rend;
1265 GtkTextBuffer *buffer; 1268 GtkTextBuffer *buffer;
1266 1269
1267 status_box->imhtml_visible = FALSE; 1270 status_box->imhtml_visible = FALSE;
1271 status_box->network_available = gaim_network_is_available();
1268 status_box->connecting = FALSE; 1272 status_box->connecting = FALSE;
1269 status_box->typing = 0; 1273 status_box->typing = 0;
1270 status_box->toggle_button = gtk_toggle_button_new(); 1274 status_box->toggle_button = gtk_toggle_button_new();
1271 status_box->hbox = gtk_hbox_new(FALSE, 6); 1275 status_box->hbox = gtk_hbox_new(FALSE, 6);
1272 status_box->cell_view = gtk_cell_view_new(); 1276 status_box->cell_view = gtk_cell_view_new();
1604 gtk_list_store_append(status_box->dropdown_store, &iter); 1608 gtk_list_store_append(status_box->dropdown_store, &iter);
1605 gtk_list_store_set(status_box->dropdown_store, &iter, 1609 gtk_list_store_set(status_box->dropdown_store, &iter,
1606 TYPE_COLUMN, GTK_GAIM_STATUS_BOX_TYPE_SEPARATOR, 1610 TYPE_COLUMN, GTK_GAIM_STATUS_BOX_TYPE_SEPARATOR,
1607 -1); 1611 -1);
1608 #endif 1612 #endif
1613 }
1614
1615 void
1616 gtk_gaim_status_box_set_network_available(GtkGaimStatusBox *status_box, gboolean available)
1617 {
1618 if (!status_box)
1619 return;
1620 status_box->network_available = available;
1621 gtk_gaim_status_box_refresh(status_box);
1609 } 1622 }
1610 1623
1611 void 1624 void
1612 gtk_gaim_status_box_set_connecting(GtkGaimStatusBox *status_box, gboolean connecting) 1625 gtk_gaim_status_box_set_connecting(GtkGaimStatusBox *status_box, gboolean connecting)
1613 { 1626 {