account_widget_build_jabber: add few comments
[empathy-mirror.git] / src / empathy-invite-participant-dialog.c
blob70332d1ffe5d2c9724d243978df2022af030f5cf
1 /*
2 * empathy-invite-participant-dialog.c
4 * EmpathyInviteParticipantDialog
6 * (c) 2009, Collabora Ltd.
8 * Authors:
9 * Danielle Madeley <danielle.madeley@collabora.co.uk>
12 #include <glib/gi18n.h>
14 #include "empathy-invite-participant-dialog.h"
16 G_DEFINE_TYPE (EmpathyInviteParticipantDialog,
17 empathy_invite_participant_dialog, EMPATHY_TYPE_CONTACT_SELECTOR_DIALOG);
19 static void
20 empathy_invite_participant_dialog_class_init (EmpathyInviteParticipantDialogClass *klass)
24 static void
25 empathy_invite_participant_dialog_init (EmpathyInviteParticipantDialog *self)
27 EmpathyContactSelectorDialog *parent = EMPATHY_CONTACT_SELECTOR_DIALOG (self);
28 GtkWidget *label;
29 char *str;
31 label = gtk_label_new (NULL);
32 str = g_strdup_printf (
33 "<span size=\"x-large\" weight=\"bold\">%s</span>\n\n%s",
34 _("Invite Participant"),
35 _("Choose a contact to invite into the conversation:"));
36 gtk_label_set_markup (GTK_LABEL (label), str);
37 g_free (str);
39 gtk_box_pack_start (GTK_BOX (parent->vbox), label, FALSE, TRUE, 0);
40 /* move to the top -- wish there was a better way to do this */
41 gtk_box_reorder_child (GTK_BOX (parent->vbox), label, 0);
42 gtk_widget_show (label);
44 parent->button_action = gtk_dialog_add_button (GTK_DIALOG (self),
45 "Invite", GTK_RESPONSE_ACCEPT);
46 gtk_widget_set_sensitive (parent->button_action, FALSE);
48 gtk_window_set_title (GTK_WINDOW (self), _("Invite Participant"));
49 gtk_window_set_role (GTK_WINDOW (self), "invite_participant");
50 empathy_contact_selector_dialog_set_show_account_chooser (
51 EMPATHY_CONTACT_SELECTOR_DIALOG (self), FALSE);
54 GtkWidget *
55 empathy_invite_participant_dialog_new (GtkWindow *parent)
57 GtkWidget *self = g_object_new (EMPATHY_TYPE_INVITE_PARTICIPANT_DIALOG, NULL);
59 if (parent != NULL)
61 gtk_window_set_transient_for (GTK_WINDOW (self), parent);
64 return self;