]> git.0d.be Git - empathy.git/blob - src/empathy-invite-participant-dialog.c
Updated Polish translation
[empathy.git] / src / empathy-invite-participant-dialog.c
1 /*
2  * empathy-invite-participant-dialog.c
3  *
4  * EmpathyInviteParticipantDialog
5  *
6  * (c) 2009, Collabora Ltd.
7  *
8  * Authors:
9  *    Danielle Madeley <danielle.madeley@collabora.co.uk>
10  */
11
12 #include <glib/gi18n.h>
13
14 #include "empathy-invite-participant-dialog.h"
15
16 G_DEFINE_TYPE (EmpathyInviteParticipantDialog,
17     empathy_invite_participant_dialog, EMPATHY_TYPE_CONTACT_SELECTOR_DIALOG);
18
19 static void
20 empathy_invite_participant_dialog_class_init (EmpathyInviteParticipantDialogClass *klass)
21 {
22 }
23
24 static void
25 empathy_invite_participant_dialog_init (EmpathyInviteParticipantDialog *self)
26 {
27   EmpathyContactSelectorDialog *parent = EMPATHY_CONTACT_SELECTOR_DIALOG (self);
28   GtkWidget *label;
29   char *str;
30
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);
38
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);
43
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);
47
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);
52 }
53
54 GtkWidget *
55 empathy_invite_participant_dialog_new (GtkWindow *parent)
56 {
57   GtkWidget *self = g_object_new (EMPATHY_TYPE_INVITE_PARTICIPANT_DIALOG, NULL);
58
59   if (parent != NULL)
60     {
61       gtk_window_set_transient_for (GTK_WINDOW (self), parent);
62     }
63
64   return self;
65 }