pidgin: 90398d85: Add a hold button to the media window.

maiku at pidgin.im maiku at pidgin.im
Mon Oct 19 18:12:06 EDT 2009


-----------------------------------------------------------------
Revision: 90398d851589be62bbfdc1c1b3dcc4e40bc50a01
Ancestor: 6a7768514466292d4922a09b4250b2df00c22e97
Author: maiku at pidgin.im
Date: 2009-10-19T22:03:48
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/90398d851589be62bbfdc1c1b3dcc4e40bc50a01

Modified files:
        pidgin/gtkmedia.c

ChangeLog: 

Add a hold button to the media window.

-------------- next part --------------
============================================================
--- pidgin/gtkmedia.c	8c99aa9577259faeb46fc038c9737776c4483170
+++ pidgin/gtkmedia.c	e11fc02604ea58e718b2d34561d5d5afedb08c5a
@@ -89,6 +89,7 @@ struct _PidginMediaPrivate
 	GtkWidget *menubar;
 	GtkWidget *statusbar;
 
+	GtkWidget *hold;
 	GtkWidget *mute;
 	GtkWidget *pause;
 
@@ -187,6 +188,15 @@ static void
 }
 
 static void
+pidgin_media_hold_toggled(GtkToggleButton *toggle, PidginMedia *media)
+{
+	purple_media_stream_info(media->priv->media,
+			gtk_toggle_button_get_active(toggle) ?
+			PURPLE_MEDIA_INFO_HOLD : PURPLE_MEDIA_INFO_UNHOLD,
+			NULL, NULL, TRUE);
+}
+
+static void
 pidgin_media_mute_toggled(GtkToggleButton *toggle, PidginMedia *media)
 {
 	purple_media_stream_info(media->priv->media,
@@ -633,6 +643,16 @@ pidgin_media_ready_cb(PurpleMedia *media
 				FALSE, FALSE, 0);
 		gtk_widget_show(GTK_WIDGET(button_widget));
 		gtk_widget_show(send_widget);
+
+		/* Hold button */
+		gtkmedia->priv->hold =
+				gtk_toggle_button_new_with_mnemonic("_Hold");
+		g_signal_connect(gtkmedia->priv->hold, "toggled",
+				G_CALLBACK(pidgin_media_hold_toggled),
+				gtkmedia);
+		gtk_box_pack_end(GTK_BOX(button_widget), gtkmedia->priv->hold,
+				FALSE, FALSE, 0);
+		gtk_widget_show(gtkmedia->priv->hold);
 	} else {
 		send_widget = gtkmedia->priv->send_widget;
 		button_widget = gtkmedia->priv->button_widget;


More information about the Commits mailing list