From e321b0ea9020482db3df359b6c4c4a645d6eaf64 Mon Sep 17 00:00:00 2001 From: Jovanka Gulicoska Date: Tue, 10 Jan 2012 00:12:03 +0100 Subject: Disable join button when protocol irc is selected --- src/empathy-new-chatroom-dialog.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c index 9a846f074..df30c2a85 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; -- cgit v1.2.3