diff src/gtkstatusselector.c @ 10447:6feef0a9098a

[gaim-migrate @ 11712] A few minor improvements and some documentation updates. Conscious evolution in the back of your mind... committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 29 Dec 2004 21:53:59 +0000
parents ce098e226486
children 6d4f02da1cef
line wrap: on
line diff
--- a/src/gtkstatusselector.c	Wed Dec 29 20:01:48 2004 +0000
+++ b/src/gtkstatusselector.c	Wed Dec 29 21:53:59 2004 +0000
@@ -25,6 +25,7 @@
 #include "internal.h"
 #include "gtkgaim.h"
 #include "gtkimhtml.h"
+#include "gtksavedstatuses.h"
 #include "gtkstatusselector.h"
 #include "gtkutils.h"
 
@@ -262,6 +263,10 @@
 	return FALSE;
 }
 
+/*
+ * TODO: Get rid of the duplication in this function and
+ * insert_text_timeout_cb()
+ */
 static void
 status_switched_cb(GtkWidget *combo, GaimGtkStatusSelector *selector)
 {
@@ -275,7 +280,7 @@
 	{
 		if (!strcmp(text, _("New Status")))
 		{
-			/* TODO */
+			gaim_gtk_status_editor_show(NULL);
 		}
 	}
 	else
@@ -344,7 +349,7 @@
 	{
 		if (!strcmp(text, _("New Status")))
 		{
-			/* TODO */
+			gaim_gtk_status_editor_show(NULL);
 		}
 	}
 	else
@@ -518,14 +523,17 @@
 	 * If no accounts are enabled then gray ourself out and get
 	 * outta hee.
 	 */
-	for(accounts = gaim_accounts_get_all(); accounts; accounts = accounts->next) {
+	for (accounts = gaim_accounts_get_all(); accounts != NULL;
+		 accounts = accounts->next)
+	{
 		GaimAccount *a = accounts->data;
-		if (gaim_account_get_enabled(a, GAIM_GTK_UI)) {
+		if (gaim_account_get_enabled(a, GAIM_GTK_UI))
+		{
 			enabled = TRUE;
 			break;
 		}
 	}
-			
+
 	if (enabled == FALSE)
 	{
 		gtk_widget_set_sensitive(GTK_WIDGET(selector), FALSE);
@@ -580,7 +588,7 @@
 				continue;
 
 			/*
-			 * TODO Find a way to fallback to the GaimStatusPrimitive
+			 * TODO: Find a way to fallback to the GaimStatusPrimitive
 			 * if an icon for this id does not exist.
 			 */
 			g_snprintf(filename, sizeof(filename), "%s.png",
@@ -594,6 +602,7 @@
 	}
 	else
 	{
+		/* TODO: Add "online" and "offline" here? */
 		add_item(selector, "available", _("Available"),
 				 load_icon("online.png"));
 		add_item(selector, "away", _("Away"), load_icon("away.png"));