aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/gossip-new-chatroom-dialog.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-05-25 05:58:26 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-05-25 05:58:26 +0800
commit654ac27bdf5aaac64c9a3ed4e2bfa55eccdd6557 (patch)
tree206ef8e29eb82baceaaa22281554ecaee58ee221 /libempathy-gtk/gossip-new-chatroom-dialog.c
parentdfaa395ba24f5ab5d309d30e7f16acd8bb106255 (diff)
downloadgsoc2013-empathy-654ac27bdf5aaac64c9a3ed4e2bfa55eccdd6557.tar
gsoc2013-empathy-654ac27bdf5aaac64c9a3ed4e2bfa55eccdd6557.tar.gz
gsoc2013-empathy-654ac27bdf5aaac64c9a3ed4e2bfa55eccdd6557.tar.bz2
gsoc2013-empathy-654ac27bdf5aaac64c9a3ed4e2bfa55eccdd6557.tar.lz
gsoc2013-empathy-654ac27bdf5aaac64c9a3ed4e2bfa55eccdd6557.tar.xz
gsoc2013-empathy-654ac27bdf5aaac64c9a3ed4e2bfa55eccdd6557.tar.zst
gsoc2013-empathy-654ac27bdf5aaac64c9a3ed4e2bfa55eccdd6557.zip
Preset the server only for jabber protocol to conference.server. This
2007-05-25 Xavier Claessens <xclaesse@gmail.com> * libempathy-gtk/gossip-new-chatroom-dialog.c: Preset the server only for jabber protocol to conference.server. This fixes a warning. * libempathy-gtk/gossip-group-chat.h: * libempathy-gtk/gossip-group-chat.c: gossip_group_chat_set_topic() is a public function. * libempathy-gtk/empathy-images.h: * libempathy-gtk/empathy-main-window.glade: * libempathy-gtk/empathy-status-icon.glade: Make use of empathy-new-message icon name. * libempathy-gtk/gossip-contact-list-store.c: By default we sort by contacts names. * libempathy-gtk/gossip-chat.c: Do not display composing state if it's our own contact that is composing. * src/empathy-chat-main.c: * libempathy/empathy-tp-chat.c: * libempathy/empathy-tp-chat.h: Make possible to build the id based on the account and the channel's name. For private chats that means the contact's id. * libempathy-gtk/gossip-chat-window.c: Un-comment the code related to chatrooms that is now implemented. We can now Show/Hide contact list for group chats, DnD contact on the window to begin a discussion, join a new chatroom. * libempathy-gtk/gossip-account-chooser.c: Add a FIXME message. * data/22x22/empathy-new-message.png: * data/22x22/empathy-proto-irc.png: * data/22x22/Makefile.am: * data/32x32/empathy-proto-irc.png: * data/32x32/Makefile.am: * data/gtalk.profile: * data/16x16/empathy-new-message: * data/16x16/empathy-message-new.png: * data/16x16/empathy-proto-irc.png: * data/16x16/Makefile.am: * data/scalable/empathy-proto-irc.svg: * data/scalable/Makefile.am: * data/irc.profile: Adding icons for empathy-new-message and IRC protocol. Make use of the irc icon in the irc profile. svn path=/trunk/; revision=91
Diffstat (limited to 'libempathy-gtk/gossip-new-chatroom-dialog.c')
-rw-r--r--libempathy-gtk/gossip-new-chatroom-dialog.c51
1 files changed, 20 insertions, 31 deletions
diff --git a/libempathy-gtk/gossip-new-chatroom-dialog.c b/libempathy-gtk/gossip-new-chatroom-dialog.c
index 3200d543d..33c6f723e 100644
--- a/libempathy-gtk/gossip-new-chatroom-dialog.c
+++ b/libempathy-gtk/gossip-new-chatroom-dialog.c
@@ -127,7 +127,6 @@ static void new_chatroom_dialog_model_row_deleted_cb (GtkTreeMode
GossipNewChatroomDialog *dialog);
static void new_chatroom_dialog_model_selection_changed (GtkTreeSelection *selection,
GossipNewChatroomDialog *dialog);
-static void new_chatroom_dialog_set_defaults (GossipNewChatroomDialog *dialog);
static void new_chatroom_dialog_join (GossipNewChatroomDialog *dialog);
static void new_chatroom_dialog_request_handles_cb (DBusGProxy *proxy,
GArray *handles,
@@ -418,11 +417,29 @@ new_chatroom_dialog_update_widgets (GossipNewChatroomDialog *dialog)
protocol = mc_profile_get_protocol_name (profile);
/* hardcode here known protocols */
- if (strcmp (protocol, "jabber") == 0 ||
- strcmp (protocol, "salut") == 0) {
+ if (strcmp (protocol, "jabber") == 0) {
+ const gchar *server;
+
+ server = mc_profile_get_default_account_domain (profile);
+ if (server) {
+ gchar *conference_server;
+
+ conference_server = g_strconcat ("conference.",
+ server, NULL);
+ gtk_entry_set_text (GTK_ENTRY (dialog->entry_server),
+ conference_server);
+ g_free (conference_server);
+ }
+
gtk_widget_show (dialog->hbox_server);
gtk_widget_show (dialog->hbox_nick);
gtk_widget_show (dialog->vbox_browse);
+
+ }
+ else if (strcmp (protocol, "salut") == 0) {
+ gtk_widget_hide (dialog->hbox_server);
+ gtk_widget_show (dialog->hbox_nick);
+ gtk_widget_show (dialog->vbox_browse);
}
else if (strcmp (protocol, "irc") == 0) {
gtk_widget_hide (dialog->hbox_server);
@@ -434,7 +451,6 @@ new_chatroom_dialog_update_widgets (GossipNewChatroomDialog *dialog)
gtk_widget_hide (dialog->vbox_browse);
}
- new_chatroom_dialog_set_defaults (dialog);
new_chatroom_dialog_update_buttons (dialog);
/* Final set up of the dialog */
@@ -583,33 +599,6 @@ new_chatroom_dialog_model_selection_changed (GtkTreeSelection *selection,
}
static void
-new_chatroom_dialog_set_defaults (GossipNewChatroomDialog *dialog)
-{
- McAccount *account;
- McProfile *profile;
- GossipAccountChooser *account_chooser;
- const gchar *server;
-
- account_chooser = GOSSIP_ACCOUNT_CHOOSER (dialog->account_chooser);
- account = gossip_account_chooser_get_account (account_chooser);
- profile = mc_account_get_profile (account);
- server = mc_profile_get_default_account_domain (profile);
-
- if (server) {
- gchar *conference_server;
-
- conference_server = g_strconcat ("conference.",
- server, NULL);
- gtk_entry_set_text (GTK_ENTRY (dialog->entry_server),
- conference_server);
- g_free (conference_server);
- }
-
- g_object_unref (account);
- g_object_unref (profile);
-}
-
-static void
new_chatroom_dialog_join (GossipNewChatroomDialog *dialog)
{
McAccount *account;