diff 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
line wrap: on
line diff
--- a/gtk/gtkstatusbox.c	Tue Oct 10 17:58:40 2006 +0000
+++ b/gtk/gtkstatusbox.c	Wed Oct 11 03:13:33 2006 +0000
@@ -43,6 +43,7 @@
 
 #include "account.h"
 #include "internal.h"
+#include "network.h"
 #include "savedstatuses.h"
 #include "status.h"
 #include "debug.h"
@@ -553,6 +554,8 @@
 		secondary = g_strdup(_("Typing"));
 	else if (status_box->connecting)
 		secondary = g_strdup(_("Connecting"));
+	else if (!status_box->network_available)
+		secondary = g_strdup(_("Waiting for network connection"));
 	else if (gaim_savedstatus_is_transient(saved_status))
 		secondary = NULL;
 	else
@@ -1265,6 +1268,7 @@
 	GtkTextBuffer *buffer;
 
 	status_box->imhtml_visible = FALSE;
+	status_box->network_available = gaim_network_is_available();
 	status_box->connecting = FALSE;
 	status_box->typing = 0;
 	status_box->toggle_button = gtk_toggle_button_new();
@@ -1609,6 +1613,15 @@
 }
 
 void
+gtk_gaim_status_box_set_network_available(GtkGaimStatusBox *status_box, gboolean available)
+{
+	if (!status_box)
+		return;
+	status_box->network_available = available;
+	gtk_gaim_status_box_refresh(status_box);
+}
+
+void
 gtk_gaim_status_box_set_connecting(GtkGaimStatusBox *status_box, gboolean connecting)
 {
 	if (!status_box)