changeset 9958:de25b23933fa

[gaim-migrate @ 10864] (21:02:12) Me: think you can find time and interest to get the docklet functional? (21:02:26) Me: if you think it unlikely tell me and i'll find someone else (21:04:01) Robot101: I already updated HEAD (21:22:57) Robot101: there we go, compiles committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Tue, 07 Sep 2004 01:40:50 +0000
parents b229d6fade9d
children b6a74cbfd182
files plugins/docklet/docklet.c src/away.h
diffstat 2 files changed, 26 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/docklet/docklet.c	Mon Sep 06 02:37:02 2004 +0000
+++ b/plugins/docklet/docklet.c	Tue Sep 07 01:40:50 2004 +0000
@@ -58,12 +58,14 @@
 GaimPlugin *handle = NULL;
 static struct docklet_ui_ops *ui_ops = NULL;
 static enum docklet_status status = offline;
+#if 0 /* XXX CUI */
 #ifdef _WIN32
 __declspec(dllimport) GSList *unread_message_queue;
 __declspec(dllimport) GSList *away_messages;
 __declspec(dllimport) struct away_message *awaymessage;
 __declspec(dllimport) GSList *message_queue;
 #endif
+#endif
 
 /* private functions */
 
@@ -86,6 +88,7 @@
 }
 
 #ifdef _WIN32
+#if 0 /* XXX NEW STATUS */
 /* This is workaround for a bug in windows GTK+. Clicking outside of the
    parent menu (including on a submenu-item) close the whole menu before
    the "activate" event is thrown for the given submenu-item. Fixed by
@@ -103,6 +106,7 @@
 	create_away_mess(widget, user_data);
 	return FALSE;
 }
+#endif
 
 /* This is a workaround for a bug in windows GTK+. Clicking outside of the
    menu does not get rid of it, so instead we get rid of it as soon as the
@@ -146,6 +150,7 @@
 		case online:
 		case online_connecting:
 		case online_pending: {
+#if 0 /* XXX NEW STATUS */
 			GtkWidget *docklet_awaymenu;
 			GSList *awy = NULL;
 			struct away_message *a = NULL;
@@ -181,12 +186,15 @@
 			entry = gtk_menu_item_new_with_label(_("Away"));
 			gtk_menu_item_set_submenu(GTK_MENU_ITEM(entry), docklet_awaymenu);
 			gtk_menu_shell_append(GTK_MENU_SHELL(menu), entry);
+#endif
 			} break;
 		case away:
 		case away_pending:
+#if 0 /* XXX NEW STATUS */
 			entry = gtk_menu_item_new_with_label(_("Back"));
 			g_signal_connect(G_OBJECT(entry), "activate", G_CALLBACK(do_im_back), NULL);
 			gtk_menu_shell_append(GTK_MENU_SHELL(menu), entry);
+#endif
 			break;
 	}
 
@@ -261,6 +269,7 @@
 	oldstatus = status;
 
 	if (gaim_connections_get_all()) {
+#if 0 /* XXX NEW STATUS */
 		if (unread_message_queue) {
 			status = online_pending;
 		} else if (awaymessage) {
@@ -270,6 +279,9 @@
 				status = away;
 			}
 		} else if (gaim_connections_get_connecting()) {
+#else
+		if (gaim_connections_get_connecting()) {
+#endif
 			status = online_connecting;
 		} else {
 			status = online;
@@ -296,15 +308,17 @@
 	return FALSE; /* for when we're called by the glib idle handler */
 }
 
-void
+#if 0 /* XXX CUI */
+static void
 docklet_flush_queue()
 {
 	if (unread_message_queue) {
 		purge_away_queue(&unread_message_queue);
 	}
 }
+#endif
 
-void
+static void
 docklet_remove_callbacks()
 {
 	gaim_debug(GAIM_DEBUG_INFO, "tray icon", "removing callbacks");
@@ -323,11 +337,15 @@
 {
 	switch (button_type) {
 		case 1:
+#if 0 /* XXX CUI */
 			if (unread_message_queue) {
 				docklet_flush_queue();
 			} else {
+#endif
 				gaim_gtk_blist_docklet_toggle();
+#if 0 /* XXX CUI */
 			}
+#endif
 			break;
 		case 2:
 			switch (status) {
@@ -361,7 +379,9 @@
 	if (visible)
 		gaim_gtk_blist_docklet_remove();
 
+#if 0 /* XXX CUI */
 	docklet_flush_queue();
+#endif
 }
 
 void
@@ -428,7 +448,9 @@
    plugin is unloaded, when quitting */
 static void gaim_quit_cb() {
 	gaim_debug(GAIM_DEBUG_INFO, "tray icon", "dealing with queued messages on exit\n");
+#if 0 /* XXX CUI */
 	docklet_flush_queue();
+#endif
 }
 
 
--- a/src/away.h	Mon Sep 06 02:37:02 2004 +0000
+++ b/src/away.h	Tue Sep 07 01:40:50 2004 +0000
@@ -31,6 +31,7 @@
  * for the UI so that people can name their away messages when they save them. So these
  * are really a UI function and struct away_message should be removed from the core. */
 /* WTF?  How does having a title for something mean that it is part of the UI? */
+#if 0 /* XXX CUI */
 struct away_message {
 	char name[80];
 	char message[2048];
@@ -49,5 +50,6 @@
 extern void purge_away_queue(GSList **);
 extern void do_im_back(GtkWidget *, GtkWidget *);
 void create_away_mess(GtkWidget *, void *);
+#endif
 
 #endif /* _GAIM_AWAY_H_ */