]> git.0d.be Git - empathy.git/commitdiff
Disable join button when protocol irc is selected
authorJovanka Gulicoska <jovanka.gulicoska@gmail.com>
Mon, 9 Jan 2012 23:12:03 +0000 (00:12 +0100)
committerDanielle Madeley <danielle.madeley@collabora.co.uk>
Mon, 9 Jan 2012 23:26:44 +0000 (10:26 +1100)
src/empathy-new-chatroom-dialog.c

index 9a846f074152c77419f81a776daf3ab2fab905bc..df30c2a85394060cbe629af9f402d0ea9ef28211 100644 (file)
@@ -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;