Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / libedataserverui / e-name-selector-dialog.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
3 /* e-name-selector-dialog.c - Dialog that lets user pick EDestinations.
4  *
5  * Copyright (C) 2004 Novell, Inc.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of version 2 of the GNU Lesser General Public
9  * License as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  * Authors: Hans Petter Jansson <hpj@novell.com>
22  */
23
24 #ifndef E_NAME_SELECTOR_DIALOG_H
25 #define E_NAME_SELECTOR_DIALOG_H
26
27 #include <gtk/gtkbox.h>
28 #include <gtk/gtkdialog.h>
29 #include <gtk/gtkentry.h>
30 #include <gtk/gtklabel.h>
31 #include <gtk/gtktreeview.h>
32 #include <gtk/gtktreemodelsort.h>
33 #include <gtk/gtksizegroup.h>
34 #include <glade/glade.h>
35 #include <libebook/e-book.h>
36 #include <libedataserverui/e-contact-store.h>
37 #include <libedataserverui/e-name-selector-model.h>
38
39 G_BEGIN_DECLS
40
41 #define E_TYPE_NAME_SELECTOR_DIALOG            (e_name_selector_dialog_get_type ())
42 #define E_NAME_SELECTOR_DIALOG(obj)            (GTK_CHECK_CAST ((obj), e_name_selector_dialog_get_type (), ENameSelectorDialog))
43 #define E_NAME_SELECTOR_DIALOG_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), e_name_selector_dialog_get_type (), ENameSelectorDialogClass))
44 #define E_IS_NAME_SELECTOR_DIALOG(obj)         (GTK_CHECK_TYPE (obj, e_name_selector_dialog_get_type ()))
45 #define E_IS_NAME_SELECTOR_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), e_name_selector_dialog_get_type ()))
46 #define E_NAME_SELECTOR_DIALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), E_NAME_SELECTOR_DIALOG_TYPE, ENameSelectorDialogClass))
47
48 typedef struct _ENameSelectorDialog      ENameSelectorDialog;
49 typedef struct _ENameSelectorDialogClass ENameSelectorDialogClass;
50
51 struct _ENameSelectorDialogClass {
52         GtkDialogClass parent_class;
53 };
54
55 struct _ENameSelectorDialog {
56         GtkDialog           parent;
57
58         /* Private */
59
60         EBook              *pending_book;
61         ESourceList        *source_list;
62         ENameSelectorModel *name_selector_model;
63         GtkTreeModelSort   *contact_sort;
64
65         GladeXML           *gui;
66         GtkTreeView        *contact_view;
67         GtkLabel           *status_label;
68         GtkBox             *destination_box;
69         GtkEntry           *search_entry;
70         GtkSizeGroup       *button_size_group;
71
72         GArray             *sections;
73 };
74
75 GType                e_name_selector_dialog_get_type   (void);
76 ENameSelectorDialog *e_name_selector_dialog_new        (void);
77
78 ENameSelectorModel  *e_name_selector_dialog_peek_model (ENameSelectorDialog *name_selector_dialog);
79 void                 e_name_selector_dialog_set_model  (ENameSelectorDialog *name_selector_dialog,
80                                                         ENameSelectorModel  *model);
81 void                 e_name_selector_dialog_set_destination_index (ENameSelectorDialog *name_selector_dialog,
82                                                                    guint                index);
83
84
85 G_END_DECLS
86
87 #endif /* E_NAME_SELECTOR_DIALOG_H */