pidgin: c0a4f0ab: Finally get around to committing charkin...

deryni at pidgin.im deryni at pidgin.im
Wed Apr 30 23:17:41 EDT 2008


-----------------------------------------------------------------
Revision: c0a4f0ab190b75af3dd06de77efc3ac462a4d6c7
Ancestor: 0a7f4849f49b45459231087fa690ba9937eae03c
Author: deryni at pidgin.im
Date: 2008-04-29T03:27:34
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/c0a4f0ab190b75af3dd06de77efc3ac462a4d6c7

Modified files:
        ChangeLog pidgin/plugins/notify.c

ChangeLog: 

Finally get around to committing charkin's version of the patch from #2145.
Closes #2145.

-------------- next part --------------
============================================================
--- ChangeLog	478b9eea11ac37c65949365d165ed768398d3b0f
+++ ChangeLog	6b91fa7ea2e6d2a135ce44ba88e7034c3038f814
@@ -14,8 +14,12 @@ version 2.x.x:
 	* Added a plugin (not built by default) which adds a Send button back
 	  to the conversation window. People without physical keyboards have a
 	  hard time with the lack of the button.
-	* Clicking on the buddyicon in the conversation window toggles the size of
-	  the icon between small and large.
+	* Clicking on the buddyicon in the conversation window toggles the
+	  size of the icon between small and large.
+	* Add a "Present conversation window" preference to the Message
+	  Notification plugin, the "Raise conversation window" option does not
+	  unminimize windows or draw attention to them when they are on other
+	  workspaces the "Present" option should.
 
 	General:
 	* The configure script now dies on more absent dependencies.  The
============================================================
--- pidgin/plugins/notify.c	5475a462cbd14a4f47f8129516cc4587a5d8814c
+++ pidgin/plugins/notify.c	f4e85e74036905236779342487646678ca929d3d
@@ -112,7 +112,7 @@ static int notify(PurpleConversation *co
 
 /* notification set/unset */
 static int notify(PurpleConversation *conv, gboolean increment);
-static void notify_win(PidginWindow *purplewin);
+static void notify_win(PidginWindow *purplewin, PurpleConversation *conv);
 static void unnotify(PurpleConversation *conv, gboolean reset);
 static int unnotify_cb(GtkWidget *widget, gpointer data,
                        PurpleConversation *conv);
@@ -141,6 +141,9 @@ static void handle_raise(PidginWindow *p
 /* raise function */
 static void handle_raise(PidginWindow *purplewin);
 
+/* present function */
+static void handle_present(PurpleConversation *conv);
+
 /****************************************/
 /* Begin doing stuff below this line... */
 /****************************************/
@@ -193,14 +196,14 @@ notify(PurpleConversation *conv, gboolea
 			purple_conversation_set_data(conv, "notify-message-count", GINT_TO_POINTER(count));
 		}
 
-		notify_win(purplewin);
+		notify_win(purplewin, conv);
 	}
 
 	return 0;
 }
 
 static void
-notify_win(PidginWindow *purplewin)
+notify_win(PidginWindow *purplewin, PurpleConversation *conv)
 {
 	if (count_messages(purplewin) <= 0)
 		return;
@@ -215,6 +218,8 @@ notify_win(PidginWindow *purplewin)
 		handle_urgent(purplewin, TRUE);
 	if (purple_prefs_get_bool("/plugins/gtk/X11/notify/method_raise"))
 		handle_raise(purplewin);
+	if (purple_prefs_get_bool("/plugins/gtk/X11/notify/method_present"))
+		handle_present(conv);
 }
 
 static void
@@ -564,6 +569,12 @@ static void
 }
 
 static void
+handle_present(PurpleConversation *conv)
+{
+	purple_conversation_present(conv);
+}
+
+static void
 type_toggle_cb(GtkWidget *widget, gpointer data)
 {
 	gboolean on = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
@@ -771,6 +782,14 @@ get_config_frame(PurplePlugin *plugin)
 	g_signal_connect(G_OBJECT(toggle), "toggled",
 	                 G_CALLBACK(method_toggle_cb), "method_raise");
 
+	/* Present conversation method button */
+	toggle = gtk_check_button_new_with_mnemonic(_("_Present conversation window"));
+	gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0);
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle),
+	                             purple_prefs_get_bool("/plugins/gtk/X11/notify/method_present"));
+	g_signal_connect(G_OBJECT(toggle), "toggled",
+	                 G_CALLBACK(method_toggle_cb), "method_present");
+
 	/*---------- "Notification Removals" ----------*/
 	frame = pidgin_make_frame(ret, _("Notification Removal"));
 	vbox = gtk_vbox_new(FALSE, 5);
@@ -945,6 +964,7 @@ init_plugin(PurplePlugin *plugin)
 	purple_prefs_add_bool("/plugins/gtk/X11/notify/method_count", FALSE);
 	purple_prefs_add_bool("/plugins/gtk/X11/notify/method_count_xprop", FALSE);
 	purple_prefs_add_bool("/plugins/gtk/X11/notify/method_raise", FALSE);
+	purple_prefs_add_bool("/plugins/gtk/X11/notify/method_present", FALSE);
 	purple_prefs_add_bool("/plugins/gtk/X11/notify/notify_focus", TRUE);
 	purple_prefs_add_bool("/plugins/gtk/X11/notify/notify_click", FALSE);
 	purple_prefs_add_bool("/plugins/gtk/X11/notify/notify_type", TRUE);


More information about the Commits mailing list