aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/gossip-group-chat.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-group-chat.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-group-chat.c')
-rw-r--r--libempathy-gtk/gossip-group-chat.c103
1 files changed, 52 insertions, 51 deletions
diff --git a/libempathy-gtk/gossip-group-chat.c b/libempathy-gtk/gossip-group-chat.c
index 6cf897d67..f16bee0de 100644
--- a/libempathy-gtk/gossip-group-chat.c
+++ b/libempathy-gtk/gossip-group-chat.c
@@ -92,7 +92,6 @@ static void group_chat_topic_entry_activate_cb (GtkWidget *ent
static void group_chat_topic_response_cb (GtkWidget *dialog,
gint response,
GossipGroupChat *chat);
-void gossip_group_chat_set_topic (GossipGroupChat *chat);
static const gchar * group_chat_get_name (GossipChat *chat);
static gchar * group_chat_get_tooltip (GossipChat *chat);
static const gchar * group_chat_get_status_icon_name (GossipChat *chat);
@@ -209,7 +208,7 @@ gossip_group_chat_new (McAccount *account,
}
gboolean
-gossip_group_chat_get_show_contacts (GossipChat *chat)
+gossip_group_chat_get_show_contacts (GossipGroupChat *chat)
{
GossipGroupChat *group_chat;
GossipGroupChatPriv *priv;
@@ -223,8 +222,8 @@ gossip_group_chat_get_show_contacts (GossipChat *chat)
}
void
-gossip_group_chat_set_show_contacts (GossipChat *chat,
- gboolean show)
+gossip_group_chat_set_show_contacts (GossipGroupChat *chat,
+ gboolean show)
{
GossipGroupChat *group_chat;
GossipGroupChatPriv *priv;
@@ -246,6 +245,55 @@ gossip_group_chat_set_show_contacts (GossipChat *chat,
}
}
+void
+gossip_group_chat_set_topic (GossipGroupChat *chat)
+{
+ GossipGroupChatPriv *priv;
+ GossipChatWindow *chat_window;
+ GtkWidget *chat_dialog;
+ GtkWidget *dialog;
+ GtkWidget *entry;
+ GtkWidget *hbox;
+ const gchar *topic;
+
+ g_return_if_fail (GOSSIP_IS_GROUP_CHAT (chat));
+
+ priv = GET_PRIV (chat);
+
+ chat_window = gossip_chat_get_window (GOSSIP_CHAT (chat));
+ chat_dialog = gossip_chat_window_get_dialog (chat_window);
+
+ dialog = gtk_message_dialog_new (GTK_WINDOW (chat_dialog),
+ 0,
+ GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_OK_CANCEL,
+ _("Enter the new topic you want to set for this room:"));
+
+ topic = gtk_label_get_text (GTK_LABEL (priv->label_topic));
+
+ hbox = gtk_hbox_new (FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ hbox, FALSE, TRUE, 4);
+
+ entry = gtk_entry_new ();
+ gtk_entry_set_text (GTK_ENTRY (entry), topic);
+ gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
+
+ gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 4);
+
+ g_object_set (GTK_MESSAGE_DIALOG (dialog)->label, "use-markup", TRUE, NULL);
+ g_object_set_data (G_OBJECT (dialog), "entry", entry);
+
+ g_signal_connect (entry, "activate",
+ G_CALLBACK (group_chat_topic_entry_activate_cb),
+ dialog);
+ g_signal_connect (dialog, "response",
+ G_CALLBACK (group_chat_topic_response_cb),
+ chat);
+
+ gtk_widget_show_all (dialog);
+}
+
static void
group_chat_create_ui (GossipGroupChat *chat)
{
@@ -402,53 +450,6 @@ group_chat_topic_response_cb (GtkWidget *dialog,
gtk_widget_destroy (dialog);
}
-void
-gossip_group_chat_set_topic (GossipGroupChat *chat)
-{
- GossipGroupChatPriv *priv;
- GossipChatWindow *chat_window;
- GtkWidget *chat_dialog;
- GtkWidget *dialog;
- GtkWidget *entry;
- GtkWidget *hbox;
- const gchar *topic;
-
- priv = GET_PRIV (chat);
-
- chat_window = gossip_chat_get_window (GOSSIP_CHAT (chat));
- chat_dialog = gossip_chat_window_get_dialog (chat_window);
-
- dialog = gtk_message_dialog_new (GTK_WINDOW (chat_dialog),
- 0,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_OK_CANCEL,
- _("Enter the new topic you want to set for this room:"));
-
- topic = gtk_label_get_text (GTK_LABEL (priv->label_topic));
-
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
- hbox, FALSE, TRUE, 4);
-
- entry = gtk_entry_new ();
- gtk_entry_set_text (GTK_ENTRY (entry), topic);
- gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
-
- gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 4);
-
- g_object_set (GTK_MESSAGE_DIALOG (dialog)->label, "use-markup", TRUE, NULL);
- g_object_set_data (G_OBJECT (dialog), "entry", entry);
-
- g_signal_connect (entry, "activate",
- G_CALLBACK (group_chat_topic_entry_activate_cb),
- dialog);
- g_signal_connect (dialog, "response",
- G_CALLBACK (group_chat_topic_response_cb),
- chat);
-
- gtk_widget_show_all (dialog);
-}
-
static const gchar *
group_chat_get_name (GossipChat *chat)
{