changeset 24104:60c23887a665

propagate from branch 'im.pidgin.pidgin' (head b14102a6c681b35084d2c3f7726de34d4f859fe1) to branch 'im.pidgin.xmpp.custom_smiley' (head 8b901ad4ba6c969957644156f9786ec84de1897c)
author Marcus Lundblad <ml@update.uu.se>
date Sat, 13 Sep 2008 16:13:48 +0000
parents 463240455f55 (current diff) 3b4dfbcabbf9 (diff)
children bc10a2129be4 4f8fce83b4aa
files
diffstat 8 files changed, 67 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/AUTHORS	Thu Sep 11 19:12:39 2008 +0000
+++ b/AUTHORS	Sat Sep 13 16:13:48 2008 +0000
@@ -36,6 +36,7 @@
 Crazy Patch Writers:
 -------------------
 Felipe 'shx' Contreras
+Marcus 'malu' Lundblad
 Dennis 'EvilDennisR' Ristuccia
 Peter 'Fmoo' Ruibal
 Gabriel 'Nix' Schulhof
--- a/doc/pidgin.1.in	Thu Sep 11 19:12:39 2008 +0000
+++ b/doc/pidgin.1.in	Sat Sep 13 16:13:48 2008 +0000
@@ -643,6 +643,8 @@
 .br
   Felipe 'shx' Contreras
 .br
+  Marcus 'malu' Lundblad
+.br
   Dennis 'EvilDennisR' Ristuccia
 .br
   Peter 'fmoo' Ruibal
--- a/finch/libgnt/wms/Makefile.am	Thu Sep 11 19:12:39 2008 +0000
+++ b/finch/libgnt/wms/Makefile.am	Sat Sep 13 16:13:48 2008 +0000
@@ -1,6 +1,7 @@
+wms = irssi.la
 if PURPLE_AVAILABLE
 # These custom wms depend on libpurple
-purple_wms = s.la irssi.la
+purple_wms = s.la
 else
 purple_wms =
 endif
@@ -9,6 +10,7 @@
 irssi_la_LDFLAGS         = -module -avoid-version
 
 plugin_LTLIBRARIES = \
+	$(wms) \
 	$(purple_wms)
  
 plugindir = $(libdir)/gnt
@@ -16,12 +18,12 @@
 irssi_la_SOURCES = irssi.c
 irssi_la_LIBADD =  \
   $(GLIB_LIBS) \
-  $(top_builddir)/finch/libgnt/libgnt.la
+  ../libgnt.la
 
 s_la_SOURCES = s.c
 s_la_LIBADD =  \
   $(GLIB_LIBS) \
-  $(top_builddir)/finch/libgnt/libgnt.la \
+  ../libgnt.la \
   $(top_builddir)/libpurple/libpurple.la
 
 EXTRA_DIST = 
--- a/libpurple/plugins/autoaccept.c	Thu Sep 11 19:12:39 2008 +0000
+++ b/libpurple/plugins/autoaccept.c	Sat Sep 13 16:13:48 2008 +0000
@@ -117,6 +117,9 @@
 			{
 				int count = 1;
 				const char *escape;
+				gchar **name_and_ext;
+				const gchar *name;
+				gchar *ext;
 
 				if (purple_prefs_get_bool(PREF_NEWDIR))
 					dirname = g_build_filename(pref, purple_normalize(account, xfer->who), NULL);
@@ -132,9 +135,24 @@
 				escape = purple_escape_filename(xfer->filename);
 				filename = g_build_filename(dirname, escape, NULL);
 
+				/* Split at the first dot, to avoid uniquifying "foo.tar.gz" to "foo.tar-2.gz" */
+				name_and_ext = g_strsplit(escape, ".", 2);
+				name = name_and_ext[0];
+				g_return_if_fail(name != NULL);
+				if (name_and_ext[1] != NULL) {
+					/* g_strsplit does not include the separator in each chunk. */
+					ext = g_strdup_printf(".%s", name_and_ext[1]);
+				} else {
+					ext = g_strdup("");
+				}
+
 				/* Make sure the file doesn't exist. Do we want some better checking than this? */
+				/* FIXME: There is a race here: if the newly uniquified file name gets created between
+				 *        this g_file_test and the transfer starting, the file created in the meantime
+				 *        will be clobbered. But it's not at all straightforward to fix.
+				 */
 				while (g_file_test(filename, G_FILE_TEST_EXISTS)) {
-					char *file = g_strdup_printf("%s-%d", escape, count++);
+					char *file = g_strdup_printf("%s-%d%s", name, count++, ext);
 					g_free(filename);
 					filename = g_build_filename(dirname, file, NULL);
 					g_free(file);
@@ -142,6 +160,8 @@
 
 				purple_xfer_request_accepted(xfer, filename);
 
+				g_strfreev(name_and_ext);
+				g_free(ext);
 				g_free(dirname);
 				g_free(filename);
 			}
--- a/libpurple/sslconn.h	Thu Sep 11 19:12:39 2008 +0000
+++ b/libpurple/sslconn.h	Sat Sep 13 16:13:48 2008 +0000
@@ -67,7 +67,7 @@
 	int fd;
 	/** Glib event source ID; used to refer to the received data callback 
 	 * in the glib eventloop */
-	int inpa;
+	guint inpa;
 	/** Data related to the underlying TCP connection */
 	PurpleProxyConnectData *connect_data;
 
--- a/pidgin/gtkconv.c	Thu Sep 11 19:12:39 2008 +0000
+++ b/pidgin/gtkconv.c	Sat Sep 13 16:13:48 2008 +0000
@@ -5253,8 +5253,7 @@
 	if (conv && PIDGIN_IS_PIDGIN_CONVERSATION(conv) && !hide) {
 		PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
 		if (gtkconv->win == hidden_convwin) {
-			pidgin_conv_window_remove_gtkconv(gtkconv->win, gtkconv);
-			pidgin_conv_placement_place(gtkconv);
+			pidgin_conv_attach_to_conversation(gtkconv->active_conv);
 		}
 		return;
 	}
@@ -7183,6 +7182,14 @@
 			pidgin_conv_update_buddy_icon(conv);
 		}
 	}
+
+	/* Make the tabs show/hide correctly */
+	for (l = pidgin_conv_windows_get_list(); l != NULL; l = l->next) {
+		PidginWindow *win = l->data;
+		if (pidgin_conv_window_get_gtkconv_count(win) == 1)
+			gtk_notebook_set_show_tabs(GTK_NOTEBOOK(win->notebook),
+						   GPOINTER_TO_INT(value) == 0);
+	}
 }
 
 static void
@@ -7231,8 +7238,7 @@
 		if (!l)
 			break;
 
-		pidgin_conv_window_remove_gtkconv(hidden_convwin, gtkconv);
-		pidgin_conv_placement_place(gtkconv);
+		pidgin_conv_attach_to_conversation(conv);
 
 		/* TODO: do we need to do anything for any other conversations that are in the same gtkconv here?
 		 * I'm a little concerned that not doing so will cause the "pending" indicator in the gtkblist not to be cleared. -DAA*/
@@ -7272,8 +7278,7 @@
 							purple_conversation_get_account(conv)))))
 			continue;
 
-		pidgin_conv_window_remove_gtkconv(hidden_convwin, gtkconv);
-		pidgin_conv_placement_place(gtkconv);
+		pidgin_conv_attach_to_conversation(conv);
 	}
 }
 
--- a/pidgin/gtkdialogs.c	Thu Sep 11 19:12:39 2008 +0000
+++ b/pidgin/gtkdialogs.c	Sat Sep 13 16:13:48 2008 +0000
@@ -100,6 +100,7 @@
 /* Order: Alphabetical by Last Name */
 static const struct developer patch_writers[] = {
 	{"Felipe 'shx' Contreras",		NULL,	NULL},
+	{"Marcus 'malu' Lundblad", NULL, NULL},
 	{"Dennis 'EvilDennisR' Ristuccia",	N_("Senior Contributor/QA"),	NULL},
 	{"Peter 'Fmoo' Ruibal",		NULL,	NULL},
 	{"Gabriel 'Nix' Schulhof", 	NULL, 	NULL},
--- a/pidgin/gtkprefs.c	Thu Sep 11 19:12:39 2008 +0000
+++ b/pidgin/gtkprefs.c	Sat Sep 13 16:13:48 2008 +0000
@@ -1828,6 +1828,25 @@
 	g_value_unset (&val);
 }
 
+
+static void
+mute_changed_cb(const char *pref_name,
+                PurplePrefType pref_type,
+                gconstpointer val,
+                gpointer data)
+{
+	GtkToggleButton *button = data;
+	gboolean muted = val;
+
+	g_return_if_fail(!strcmp (pref_name, PIDGIN_PREFS_ROOT "/sound/mute"));
+
+	/* Block the handler that re-sets the preference. */
+	g_signal_handlers_block_matched(button, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, pref_name);
+	gtk_toggle_button_set_active (button, muted);
+	g_signal_handlers_unblock_matched(button, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, pref_name);
+}
+
+
 static GtkWidget *
 sound_page(void)
 {
@@ -1889,9 +1908,13 @@
 #endif /* _WIN32 */
 
 	vbox = pidgin_make_frame (ret, _("Sound Options"));
+
+	button = pidgin_prefs_checkbox(_("M_ute sounds"), PIDGIN_PREFS_ROOT "/sound/mute", vbox);
+	purple_prefs_connect_callback(prefs, PIDGIN_PREFS_ROOT "/sound/mute", mute_changed_cb, button);
+
 	pidgin_prefs_checkbox(_("Sounds when conversation has _focus"),
 				   PIDGIN_PREFS_ROOT "/sound/conv_focus", vbox);
-	pidgin_prefs_dropdown(vbox, _("Enable sounds:"),
+	pidgin_prefs_dropdown(vbox, _("_Enable sounds:"),
 				 PURPLE_PREF_INT, "/purple/sound/while_status",
 				_("Only when available"), 1,
 				_("Only when not available"), 2,
@@ -1908,7 +1931,7 @@
 	g_signal_connect (G_OBJECT (sw), "value-changed",
 			  G_CALLBACK (prefs_sound_volume_changed),
 			  NULL);
-	hbox = pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("Volume:"), NULL, sw, TRUE, NULL);
+	hbox = pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("V_olume:"), NULL, sw, TRUE, NULL);
 
 	purple_prefs_connect_callback(prefs, PIDGIN_PREFS_ROOT "/sound/method",
 								sound_changed3_cb, hbox);