2 * empathy-invite-participant-dialog.c
4 * EmpathyInviteParticipantDialog
6 * (c) 2009, Collabora Ltd.
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);
20 empathy_invite_participant_dialog_class_init (EmpathyInviteParticipantDialogClass *klass)
25 empathy_invite_participant_dialog_init (EmpathyInviteParticipantDialog *self)
27 EmpathyContactSelectorDialog *parent = EMPATHY_CONTACT_SELECTOR_DIALOG (self);
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);
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);
55 empathy_invite_participant_dialog_new (GtkWindow *parent,
58 GtkWidget *self = g_object_new (EMPATHY_TYPE_INVITE_PARTICIPANT_DIALOG,
59 "filter-account", account,
64 gtk_window_set_transient_for (GTK_WINDOW (self), parent);