changeset 9929:24550263874d

[gaim-migrate @ 10821] (21:33:38) datallah: LSchiere: can i just IM you a ChangeLog.API patch or do you want me to update the patch in the tracker? committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 01 Sep 2004 01:34:47 +0000
parents 5d8d73c2eebe
children 45a49b01dc03
files .todo plugins/ChangeLog.API plugins/autorecon.c
diffstat 3 files changed, 147 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/.todo	Wed Sep 01 01:13:21 2004 +0000
+++ b/.todo	Wed Sep 01 01:34:47 2004 +0000
@@ -1,31 +1,10 @@
-<!-- Automagically generated by the ToDo program on Thu Aug 19 14:26:19 2004 -->
+<!-- Automagically generated by the ToDo program on Tue Aug 31 21:35:07 2004 -->
 <todo version="0.1.17">
     <title>
         Gaim TODO List
     </title>
     <note priority="high" time="1036029816">
         UI stuff
-        <note priority="high" time="1053306672" done="1089237474">
-            need to be able to copy/paste smilies
-            <comment>
-                done some time ago
-            </comment>
-        </note>
-        <note priority="medium" time="1035996189" done="1089237564">
-            resizing text entry area below default doesn't work well.
-            <comment>
-                wysiwyg and changes from that time period fixed this
-            </comment>
-            <note priority="medium" time="1035996380" done="0">
-                some people report being unable to shrink it at all
-            </note>
-        </note>
-        <note priority="verylow" time="1036039515" done="1092939361">
-            copy grabs html as well as text.
-            <comment>
-                wysiwyg solved this
-            </comment>
-        </note>
         <note priority="veryhigh" time="1035996049">
             kicking someone in #name-extension causes a kick to display in #name as well and vice-versa
         </note>
@@ -38,18 +17,27 @@
         <note priority="high" time="1036028245">
             fix crash when someone writes just as you close the chat window.
         </note>
+        <note priority="high" time="1053306672" done="1089237474">
+            need to be able to copy/paste smilies
+            <comment>
+                done some time ago
+            </comment>
+        </note>
         <note priority="high" time="1066444991">
             Save buddy icon option does not work, it saves a screenname.icon file which is not openable.
         </note>
+        <note priority="medium" time="1035996189" done="1089237564">
+            resizing text entry area below default doesn't work well.
+            <comment>
+                wysiwyg and changes from that time period fixed this
+            </comment>
+            <note priority="medium" time="1035996380" done="0">
+                some people report being unable to shrink it at all
+            </note>
+        </note>
         <note priority="medium" time="1036028206">
             status report w/out being on own list
         </note>
-        <note priority="medium" time="1036039877">
-            right click on url gives browser choice (preference option)
-        </note>
-        <note priority="medium" time="1036039928">
-            make output of /list searchable
-        </note>
         <note priority="medium" time="1036039939">
             option not to raise windows on event while away
         </note>
@@ -95,6 +83,12 @@
         <note priority="verylow" time="1036039472">
             option to have input box scroll instead of line wrap. input box only.
         </note>
+        <note priority="verylow" time="1036039515" done="1092939361">
+            copy grabs html as well as text.
+            <comment>
+                wysiwyg solved this
+            </comment>
+        </note>
         <note priority="verylow" time="1036040093">
             Transparency for GtkIMHtml
         </note>
@@ -159,14 +153,14 @@
             Away needs to be modified to include "show" and "status", i.e. you can have an away state, and an away message. This is exactly what ICQ does - you're "N/A" (show in Jabber) and your away message is "I'm gone." (status in Jabber). Since it only applies to ICQ and Jabber (and actually, currently only Jabber, since icqlib doesn't handle away messages yet), there should be some way of indicating that it can do both without breaking the others. My suggestion is to put "/" at the end of the "state", and when that's there, have it be a menu with all of the custom messages, e.g. in Jabber it'd return "Away/" as one of the states, and you'd see "Away" with a menu of all the away messages you have.
         </note>
     </note>
-    <link filename="src/protocols/gg/.todo" priority="medium" time="0"/>
-    <link filename="src/protocols/irc/.todo" priority="medium" time="0"/>
-    <link filename="src/protocols/jabber/.todo" priority="medium" time="0"/>
+    <link filename="src/protocols/zephyr/.todo" priority="medium" time="0"/>
+    <link filename="src/protocols/yahoo/.todo" priority="medium" time="0"/>
+    <link filename="src/protocols/oscar/.todo" priority="medium" time="0"/>
+    <link filename="src/protocols/napster/.todo" priority="medium" time="0"/>
     <link filename="src/protocols/msn/.todo" priority="medium" time="0"/>
-    <link filename="src/protocols/napster/.todo" priority="medium" time="0"/>
-    <link filename="src/protocols/oscar/.todo" priority="medium" time="0"/>
-    <link filename="src/protocols/yahoo/.todo" priority="medium" time="0"/>
-    <link filename="src/protocols/zephyr/.todo" priority="medium" time="0"/>
+    <link filename="src/protocols/jabber/.todo" priority="medium" time="0"/>
+    <link filename="src/protocols/irc/.todo" priority="medium" time="0"/>
+    <link filename="src/protocols/gg/.todo" priority="medium" time="0"/>
     <note priority="medium" time="1036029726">
         WinGaim specific stuff
         <note priority="high" time="1035995058">
@@ -202,12 +196,6 @@
                 libao fixed this, there is no "internal" option
             </comment>
         </note>
-        <note priority="medium" time="1036039588" done="1063208189">
-            person support
-            <comment>
-                faceprint added it
-            </comment>
-        </note>
         <note priority="high" time="1036027886">
             fix memory leaks
         </note>
@@ -220,6 +208,12 @@
         <note priority="medium" time="1036028352">
             throwaway away message (unsaved) for single account (vs. set all away)
         </note>
+        <note priority="medium" time="1036039588" done="1063208189">
+            person support
+            <comment>
+                faceprint added it
+            </comment>
+        </note>
         <note priority="medium" time="1037924676">
             add state saving and hook it to session management and user dialogs
         </note>
@@ -271,15 +265,15 @@
         <comment>
             makes more sense to put this in with specific items at this point
         </comment>
+        <note priority="medium" time="1036028041" done="0">
+            sounds/Makefile needs to use host CC, not target (that's the only part that seems broken for cross-compiling --Disconnect)
+        </note>
         <note priority="low" time="1035996506" done="1057532505">
             i18n: icq i18n
             <comment>
                 I consider this as good as it will get.  utf8 works well.
             </comment>
         </note>
-        <note priority="medium" time="1036028041" done="0">
-            sounds/Makefile needs to use host CC, not target (that's the only part that seems broken for cross-compiling --Disconnect)
-        </note>
         <note priority="low" time="1035996519" done="0">
             i18n: info dialog
         </note>
@@ -292,21 +286,15 @@
                 .gaim is now configurable at run time
             </comment>
         </note>
+        <note priority="low" time="1036026508">
+            "console beep" sound option should use different frequency beeps for different events, or at least give some way to allow this behavior.
+        </note>
         <note priority="low" time="1036026529" done="1089237962">
             do we really need some of the preferences? (Ignore TIK messages. Does anyone use that method of retrieving Away messages anymore? no, but it is small and it would be a piece of history lost ;-))
             <comment>
                 prefsslash04
             </comment>
         </note>
-        <note priority="verylow" time="1036026575" done="1063208296">
-            timestamp on debug messages?
-            <comment>
-                done some time ago
-            </comment>
-        </note>
-        <note priority="low" time="1036026508">
-            "console beep" sound option should use different frequency beeps for different events, or at least give some way to allow this behavior.
-        </note>
         <note priority="low" time="1036026609">
             ximian serial numbers in rpms cause... problems.
         </note>
@@ -328,6 +316,12 @@
         <note priority="verylow" time="1036026552">
             tab complete to alias, translate to nick on send for chat
         </note>
+        <note priority="verylow" time="1036026575" done="1063208296">
+            timestamp on debug messages?
+            <comment>
+                done some time ago
+            </comment>
+        </note>
         <note priority="verylow" time="1036026597">
             sorting of conversation tabs, if the ordering of left-to-right order by opening isn't good enough for you
         </note>
--- a/plugins/ChangeLog.API	Wed Sep 01 01:13:21 2004 +0000
+++ b/plugins/ChangeLog.API	Wed Sep 01 01:34:47 2004 +0000
@@ -3,6 +3,8 @@
 version 0.83:
 	Protocol Plugin API: v8
 	* Added: get_chat_name to the GaimPluginProtocolInfo struct
+	* Changed: gaim_blist_update_buddy_presence(), presence changed to
+		type gboolean
 
 version 0.82 (08/26/2004):
 	Gaim API:
--- a/plugins/autorecon.c	Wed Sep 01 01:13:21 2004 +0000
+++ b/plugins/autorecon.c	Wed Sep 01 01:34:47 2004 +0000
@@ -29,12 +29,13 @@
 
 static GHashTable *hash = NULL;
 static GHashTable *awayStates = NULL;
-
+static GSList *accountReconnecting = NULL;
 
 #define AUTORECON_OPT  "/plugins/core/autorecon"
-#define OPT_HIDE_CONNECTED   AUTORECON_OPT "/hide_connected_error"
-#define OPT_HIDE_CONNECTING  AUTORECON_OPT "/hide_connecting_error"
-#define OPT_RESTORE_STATE    AUTORECON_OPT "/restore_state"
+#define OPT_HIDE_CONNECTED           AUTORECON_OPT "/hide_connected_error"
+#define OPT_HIDE_CONNECTING          AUTORECON_OPT "/hide_connecting_error"
+#define OPT_RESTORE_STATE            AUTORECON_OPT "/restore_state"
+#define OPT_HIDE_RECONNECTING_DIALOG AUTORECON_OPT "/hide_reconnecting_dialog"
 
 
 /* storage of original (old_ops) and modified (new_ops) ui ops to allow us to
@@ -42,6 +43,69 @@
 static GaimConnectionUiOps *old_ops = NULL;
 static GaimConnectionUiOps *new_ops = NULL;
 
+static void connect_progress(GaimConnection *gc, const char *text,
+							 size_t step, size_t step_count) {
+	if(old_ops == NULL || old_ops->connect_progress == NULL) {
+		/* there's nothing to call through to, so don't bother
+		   checking prefs */
+		return;
+	} else if(gaim_prefs_get_bool(OPT_HIDE_RECONNECTING_DIALOG) && accountReconnecting && 
+			g_slist_find(accountReconnecting, gc->account)) {
+		/* this is a reconnecting, and we're hiding those */
+		gaim_debug(GAIM_DEBUG_INFO, "autorecon",
+			"hide connecting dialog while reconnecting\n");
+		return;
+	}
+	
+	old_ops->connect_progress(gc, text, step, step_count);
+}
+
+static void connected(GaimConnection *gc) {
+	if(old_ops == NULL || old_ops->connected == NULL) {
+		/* there's nothing to call through to, so don't bother
+		   checking prefs */
+		return;
+	} else if(gaim_prefs_get_bool(OPT_HIDE_RECONNECTING_DIALOG) && accountReconnecting && 
+			g_slist_find(accountReconnecting, gc->account)) {
+		/* this is a reconnecting, and we're hiding those */
+		gaim_debug(GAIM_DEBUG_INFO, "autorecon",
+			"hide connecting dialog while reconnecting\n");
+		return;
+	}
+	
+	old_ops->connected(gc);
+}
+
+static void disconnected(GaimConnection *gc) {
+	if(old_ops == NULL || old_ops->disconnected == NULL) {
+		/* there's nothing to call through to, so don't bother
+		   checking prefs */
+		return;
+	} else if(gaim_prefs_get_bool(OPT_HIDE_RECONNECTING_DIALOG) && accountReconnecting && 
+			g_slist_find(accountReconnecting, gc->account)) {
+		/* this is a reconnecting, and we're hiding those */
+		gaim_debug(GAIM_DEBUG_INFO, "autorecon",
+			"hide connecting dialog while reconnecting\n");
+		return;
+	}
+	
+	old_ops->disconnected(gc);
+}
+
+static void notice(GaimConnection *gc, const char *text) {
+	if(old_ops == NULL || old_ops->notice == NULL) {
+		/* there's nothing to call through to, so don't bother
+		   checking prefs */
+		return;
+	} else if(gaim_prefs_get_bool(OPT_HIDE_RECONNECTING_DIALOG) && accountReconnecting && 
+			g_slist_find(accountReconnecting, gc->account)) {
+		/* this is a reconnecting, and we're hiding those */
+		gaim_debug(GAIM_DEBUG_INFO, "autorecon",
+			"hide connecting dialog while reconnecting\n");
+	}
+	
+	old_ops->notice(gc, text);
+}
 
 static void report_disconnect(GaimConnection *gc, const char *text) {
 
@@ -96,10 +160,15 @@
 static void reconnect(GaimConnection *gc, void *m) {
 	GaimAccount *account;
 	GaimAutoRecon *info;
+	GSList* listAccount;
 
 	g_return_if_fail(gc != NULL);
 	account = gaim_connection_get_account(gc);
 	info = g_hash_table_lookup(hash, account);
+	if (accountReconnecting)
+		listAccount = g_slist_find(accountReconnecting, account);
+	else
+		listAccount = NULL;
 
 	if (!gc->wants_to_die) {
 		if (info == NULL) {
@@ -112,8 +181,14 @@
 				g_source_remove(info->timeout);
 		}
 		info->timeout = g_timeout_add(info->delay, do_signon, account);
+		
+		if (!listAccount)
+			accountReconnecting = g_slist_prepend(accountReconnecting, account);
 	} else if (info != NULL) {
 		g_hash_table_remove(hash, account);
+		
+		if (listAccount)
+			accountReconnecting = g_slist_delete_link(accountReconnecting, listAccount);
 	}
 
 	if (gc->wants_to_die) 
@@ -146,6 +221,9 @@
 	info = g_hash_table_lookup(awayStates, account);
 	if (info)
 		serv_set_away(gc, info->state, info->message);
+		
+	if (accountReconnecting)
+		accountReconnecting = g_slist_remove(accountReconnecting, account);
 }
 
 static void
@@ -178,6 +256,10 @@
 	old_ops = gaim_connections_get_ui_ops();
 	new_ops = (GaimConnectionUiOps *) g_memdup(old_ops,
 			sizeof(GaimConnectionUiOps));
+	new_ops->connect_progress = connect_progress;
+	new_ops->connected = connected;
+	new_ops->disconnected = disconnected;
+	new_ops->notice = notice;
 	new_ops->report_disconnect = report_disconnect;
 	gaim_connections_set_ui_ops(new_ops);
 
@@ -185,6 +267,8 @@
 			free_auto_recon);
 
 	awayStates = g_hash_table_new(g_int_hash, g_int_equal);
+	
+	accountReconnecting = NULL;
 
 	gaim_signal_connect(gaim_connections_get_handle(), "signed-off",
 			plugin, GAIM_CALLBACK(reconnect), NULL);
@@ -217,6 +301,11 @@
 
 	g_hash_table_destroy(awayStates);
 	awayStates = NULL;
+	
+	if (accountReconnecting) {
+		g_slist_free(accountReconnecting);
+		accountReconnecting = NULL;
+	}
 
 	gaim_connections_set_ui_ops(old_ops);
 	g_free(new_ops);
@@ -245,6 +334,10 @@
 		_("Restore Away State On Reconnect"));
 	gaim_plugin_pref_frame_add(frame, pref);
 
+	pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_RECONNECTING_DIALOG,
+		_("Hide Reconnecting Dialog"));
+	gaim_plugin_pref_frame_add(frame, pref);
+
 	return frame;
 }
 
@@ -291,6 +384,7 @@
 	gaim_prefs_add_bool(OPT_HIDE_CONNECTED, FALSE);
 	gaim_prefs_add_bool(OPT_HIDE_CONNECTING, FALSE);
 	gaim_prefs_add_bool(OPT_RESTORE_STATE, TRUE);
+	gaim_prefs_add_bool(OPT_HIDE_RECONNECTING_DIALOG, FALSE);
 }
 
 GAIM_INIT_PLUGIN(autorecon, init_plugin, info)