[empathy] Disable join button when protocol irc is selected



commit e321b0ea9020482db3df359b6c4c4a645d6eaf64
Author: Jovanka Gulicoska <jovanka gulicoska gmail com>
Date:   Tue Jan 10 00:12:03 2012 +0100

    Disable join button when protocol irc is selected

 src/empathy-new-chatroom-dialog.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c
index 9a846f0..df30c2a 100644
--- a/src/empathy-new-chatroom-dialog.c
+++ b/src/empathy-new-chatroom-dialog.c
@@ -395,13 +395,21 @@ static void
 update_join_button_sensitivity (EmpathyNewChatroomDialog *dialog)
 {
 	const gchar           *room;
+	const gchar	      *protocol;
 	gboolean               sensitive = FALSE;
 
 
 	room = gtk_entry_get_text (GTK_ENTRY (dialog->entry_room));
+	protocol = tp_account_get_protocol (dialog->account);
 	if (EMP_STR_EMPTY (room))
 		goto out;
 
+	if (!tp_strdiff (protocol, "irc") && (!tp_strdiff (room, "#") ||
+	                                      !tp_strdiff (room, "&")))
+	{
+		goto out;
+	}
+
 	if (dialog->account == NULL)
 		goto out;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]