changeset 19124:7e0379a41a44

propagate from branch 'im.pidgin.pidgin' (head 89468df5d1cdb033902c9f7e41cfdf3a348d97bc) to branch 'im.pidgin.soc.2007.finchfeat' (head aa0595d32b99d229dafb41c7c83e1d1944175f99)
author Eric Polino <aluink@pidgin.im>
date Fri, 29 Jun 2007 20:05:17 +0000
parents 700b642631bc (diff) 576edd9c4f72 (current diff)
children 915ef65d68e3
files finch/libgnt/gntwidget.c pidgin/sounds/Makefile.am pidgin/sounds/Makefile.mingw pidgin/sounds/alert.wav pidgin/sounds/login.wav pidgin/sounds/logout.wav pidgin/sounds/receive.wav pidgin/sounds/send.wav
diffstat 16 files changed, 50 insertions(+), 61 deletions(-) [+]
line wrap: on
line diff
--- a/doc/notify-signals.dox	Fri Jun 29 12:45:08 2007 +0000
+++ b/doc/notify-signals.dox	Fri Jun 29 20:05:17 2007 +0000
@@ -1,4 +1,4 @@
-/** @page conversation-signals Notification Signals
+/** @page notify-signals Notification Signals
 
  @signals
   @signal displaying-userinfo
--- a/finch/libgnt/gntslider.c	Fri Jun 29 12:45:08 2007 +0000
+++ b/finch/libgnt/gntslider.c	Fri Jun 29 20:05:17 2007 +0000
@@ -70,11 +70,9 @@
 	int position, size = 0;
 
 	if (slider->vertical)
-		mvwvline(widget->window, 0, 0, ACS_VLINE | COLOR_PAIR(GNT_COLOR_NORMAL),
-				(size = widget->priv.height));
+		size = widget->priv.height;
 	else
-		mvwhline(widget->window, 0, 0, ACS_HLINE | COLOR_PAIR(GNT_COLOR_NORMAL),
-				(size = widget->priv.width));
+		size = widget->priv.width;
 
 	if (gnt_widget_has_focus(widget))
 		attr |= GNT_COLOR_HIGHLIGHT;
@@ -85,10 +83,22 @@
 		position = ((size - 1) * (slider->current - slider->min)) / (slider->max - slider->min);
 	else
 		position = 0;
+	if (slider->vertical) {
+		mvwvline(widget->window, size-position, 0, ACS_VLINE | COLOR_PAIR(GNT_COLOR_NORMAL) | A_BOLD,
+				position);
+		mvwvline(widget->window, 0, 0, ACS_VLINE | COLOR_PAIR(GNT_COLOR_NORMAL),
+				size-position);
+	} else {
+		mvwhline(widget->window, 0, 0, ACS_HLINE | COLOR_PAIR(GNT_COLOR_NORMAL) | A_BOLD,
+				position);
+		mvwhline(widget->window, 0, position, ACS_HLINE | COLOR_PAIR(GNT_COLOR_NORMAL),
+				size - position);
+	}
+
 	mvwaddch(widget->window,
 			slider->vertical ? (size - position - 1) : 0,
 			slider->vertical ? 0 : position,
-			ACS_BLOCK | COLOR_PAIR(attr));
+			ACS_CKBOARD | COLOR_PAIR(attr));
 }
 
 static void
@@ -117,10 +127,7 @@
 	GntSlider *slider = GNT_SLIDER(bindable);
 	if (slider->current <= slider->min)
 		return FALSE;
-	slider->current -= slider->step;
-	sanitize_value(slider);
-	redraw_slider(slider);
-	slider_value_changed(slider);
+	gnt_slider_advance_step(slider, -1);
 	return TRUE;
 }
 
@@ -130,10 +137,7 @@
 	GntSlider *slider = GNT_SLIDER(bindable);
 	if (slider->current >= slider->max)
 		return FALSE;
-	slider->current += slider->step;
-	sanitize_value(slider);
-	redraw_slider(slider);
-	slider_value_changed(slider);
+	gnt_slider_advance_step(slider, 1);
 	return TRUE;
 }
 
--- a/finch/libgnt/gntwidget.c	Fri Jun 29 12:45:08 2007 +0000
+++ b/finch/libgnt/gntwidget.c	Fri Jun 29 20:05:17 2007 +0000
@@ -389,7 +389,7 @@
 
 	g_signal_emit(widget, signals[SIG_DRAW], 0);
 	gnt_widget_queue_update(widget);
-	GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_DRAWING | GNT_WIDGET_INVISIBLE);
+	GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_DRAWING);
 }
 
 gboolean
--- a/libpurple/blist.h	Fri Jun 29 12:45:08 2007 +0000
+++ b/libpurple/blist.h	Fri Jun 29 20:05:17 2007 +0000
@@ -21,6 +21,8 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * @see @ref blist-signals
  */
 #ifndef _PURPLE_BLIST_H_
 #define _PURPLE_BLIST_H_
--- a/libpurple/cipher.h	Fri Jun 29 12:45:08 2007 +0000
+++ b/libpurple/cipher.h	Fri Jun 29 20:05:17 2007 +0000
@@ -21,6 +21,8 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * @see @ref cipher-signals
  */
 #ifndef PURPLE_CIPHER_H
 #define PURPLE_CIPHER_H
--- a/libpurple/core.h	Fri Jun 29 12:45:08 2007 +0000
+++ b/libpurple/core.h	Fri Jun 29 20:05:17 2007 +0000
@@ -20,6 +20,8 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * @see @ref core-signals
  */
 #ifndef _PURPLE_CORE_H_
 #define _PURPLE_CORE_H_
--- a/libpurple/dbus-server.h	Fri Jun 29 12:45:08 2007 +0000
+++ b/libpurple/dbus-server.h	Fri Jun 29 20:05:17 2007 +0000
@@ -22,6 +22,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
+ * @see @ref dbus-server-signals
  */
 
 #ifndef _PURPLE_DBUS_SERVER_H_
--- a/libpurple/imgstore.c	Fri Jun 29 12:45:08 2007 +0000
+++ b/libpurple/imgstore.c	Fri Jun 29 20:05:17 2007 +0000
@@ -55,8 +55,8 @@
 {
 	PurpleStoredImage *img;
 
-	g_return_val_if_fail(data != NULL, 0);
-	g_return_val_if_fail(size > 0, 0);
+	g_return_val_if_fail(data != NULL, NULL);
+	g_return_val_if_fail(size > 0, NULL);
 
 	img = g_new(PurpleStoredImage, 1);
 	PURPLE_DBUS_REGISTER_POINTER(img, PurpleStoredImage);
@@ -73,11 +73,13 @@
 purple_imgstore_add_with_id(gpointer data, size_t size, const char *filename)
 {
 	PurpleStoredImage *img = purple_imgstore_add(data, size, filename);
-	img->id = ++nextid;
+	if (img) {
+		img->id = ++nextid;
 
-	g_hash_table_insert(imgstore, &(img->id), img);
+		g_hash_table_insert(imgstore, &(img->id), img);
+	}
 
-	return img->id;
+	return (img ? img->id : 0);
 }
 
 PurpleStoredImage *purple_imgstore_find_by_id(int id) {
--- a/libpurple/imgstore.h	Fri Jun 29 12:45:08 2007 +0000
+++ b/libpurple/imgstore.h	Fri Jun 29 20:05:17 2007 +0000
@@ -22,6 +22,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
+ * @see @ref imgstore-signals
  */
 #ifndef _PURPLE_IMGSTORE_H_
 #define _PURPLE_IMGSTORE_H_
--- a/libpurple/log.h	Fri Jun 29 12:45:08 2007 +0000
+++ b/libpurple/log.h	Fri Jun 29 20:05:17 2007 +0000
@@ -21,6 +21,8 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * @see @ref log-signals
  */
 #ifndef _PURPLE_LOG_H_
 #define _PURPLE_LOG_H_
--- a/libpurple/notify.h	Fri Jun 29 12:45:08 2007 +0000
+++ b/libpurple/notify.h	Fri Jun 29 20:05:17 2007 +0000
@@ -21,6 +21,8 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * @see @ref notify-signals
  */
 #ifndef _PURPLE_NOTIFY_H_
 #define _PURPLE_NOTIFY_H_
--- a/libpurple/plugin.h	Fri Jun 29 12:45:08 2007 +0000
+++ b/libpurple/plugin.h	Fri Jun 29 20:05:17 2007 +0000
@@ -21,6 +21,10 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * @see @ref plugin-signals
+ * @see @ref plugin-ids
+ * @see @ref plugin-i18n
  */
 #ifndef _PURPLE_PLUGIN_H_
 #define _PURPLE_PLUGIN_H_
--- a/libpurple/protocols/yahoo/yahoochat.c	Fri Jun 29 12:45:08 2007 +0000
+++ b/libpurple/protocols/yahoo/yahoochat.c	Fri Jun 29 20:05:17 2007 +0000
@@ -785,44 +785,6 @@
 	g_free(eroom);
 }
 
-/* borrowed from gtkconv.c */
-static gboolean
-meify(char *message, size_t len)
-{
-	/*
-	 * Read /me-ify: If the message (post-HTML) starts with /me,
-	 * remove the "/me " part of it (including that space) and return TRUE.
-	 */
-	char *c;
-	gboolean inside_html = 0;
-
-	/* Umm.. this would be very bad if this happens. */
-	g_return_val_if_fail(message != NULL, FALSE);
-
-	if (len == -1)
-		len = strlen(message);
-
-	for (c = message; *c != '\0'; c++, len--) {
-		if (inside_html) {
-			if (*c == '>')
-				inside_html = FALSE;
-		}
-		else {
-			if (*c == '<')
-				inside_html = TRUE;
-			else
-				break;
-		}
-	}
-
-	if (*c != '\0' && !g_ascii_strncasecmp(c, "/me ", 4)) {
-		memmove(c, c + 4, len - 3);
-		return TRUE;
-	}
-
-	return FALSE;
-}
-
 static int yahoo_chat_send(PurpleConnection *gc, const char *dn, const char *room, const char *what, PurpleMessageFlags flags)
 {
 	struct yahoo_data *yd = gc->proto_data;
@@ -839,7 +801,7 @@
 
 	msg1 = g_strdup(what);
 
-	if (meify(msg1, -1))
+	if (purple_message_meify(msg1, -1))
 		me = 1;
 
 	msg2 = yahoo_html_to_codes(msg1);
--- a/libpurple/savedstatuses.h	Fri Jun 29 12:45:08 2007 +0000
+++ b/libpurple/savedstatuses.h	Fri Jun 29 20:05:17 2007 +0000
@@ -21,6 +21,8 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * @see @ref savedstatus-signals
  */
 #ifndef _PURPLE_SAVEDSTATUSES_H_
 #define _PURPLE_SAVEDSTATUSES_H_
--- a/libpurple/sound.h	Fri Jun 29 12:45:08 2007 +0000
+++ b/libpurple/sound.h	Fri Jun 29 20:05:17 2007 +0000
@@ -21,6 +21,8 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * @see @ref sound-signals
  */
 #ifndef _PURPLE_SOUND_H_
 #define _PURPLE_SOUND_H_
--- a/libpurple/util.h	Fri Jun 29 12:45:08 2007 +0000
+++ b/libpurple/util.h	Fri Jun 29 20:05:17 2007 +0000
@@ -1105,12 +1105,13 @@
 void purple_print_utf8_to_console(FILE *filestream, char *message);
 
 /**
- * Checks for messages starting with "/me "
+ * Checks for messages starting (post-HTML) with "/me ", including the space.
  *
  * @param message The message to check
  * @param len     The message length, or -1
  *
- * @return TRUE if it starts with /me, and it has been removed, otherwise FALSE
+ * @return TRUE if it starts with "/me ", and it has been removed, otherwise
+ *         FALSE
  */
 gboolean purple_message_meify(char *message, size_t len);