aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/publish-calendar/url-editor-dialog.h
blob: 2fd7c19a4e392ee6ddebc7543a584b110277fe95 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) version 3.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with the program; if not, see <http://www.gnu.org/licenses/>
 *
 *
 * Authors:
 *      David Trowbridge <trowbrds@cs.colorado.edu>
 *
 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
 *
 */

#ifndef URL_EDITOR_DIALOG_H
#define URL_EDITOR_DIALOG_H

#include <gtk/gtk.h>
#include <glade/glade.h>
#include <libedataserverui/e-source-selector.h>
#include "publish-location.h"

G_BEGIN_DECLS

#define URL_EDITOR_DIALOG_TYPE            (url_editor_dialog_get_type ())
#define URL_EDITOR_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), URL_EDITOR_DIALOG_TYPE, UrlEditorDialog))
#define URL_EDITOR_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), URL_EDITOR_DIALOG_TYPE, UrlEditorDialogClass))
#define IS_URL_EDITOR_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), URL_EDITOR_DIALOG_TYPE))
#define IS_URL_EDITOR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), URL_EDITOR_DIALOG_TYPE))

enum {
    URL_LIST_ENABLED_COLUMN,
    URL_LIST_LOCATION_COLUMN,
    URL_LIST_URL_COLUMN,
    URL_LIST_N_COLUMNS
};

enum {
    TYPE_SFTP,
    TYPE_ANON_FTP,
    TYPE_FTP,
    TYPE_SMB,
    TYPE_DAV,
    TYPE_DAVS,
    TYPE_URI
};

typedef struct _UrlEditorDialog UrlEditorDialog;
typedef struct _UrlEditorDialogClass UrlEditorDialogClass;

struct _UrlEditorDialog {
    GtkDialog parent;

    GtkTreeModel *url_list_model;
    EPublishUri *uri;

    GladeXML *gui;

    GtkWidget *type_selector;
    GtkWidget *fb_duration_label;
    GtkWidget *fb_duration_spin;
    GtkWidget *fb_duration_combo;
    GtkWidget *publish_frequency;

    GtkWidget *events_swin;

    ESourceList *events_source_list;
    GtkWidget *events_selector;

    GtkWidget *publish_service;
    GtkWidget *server_entry;
    GtkWidget *file_entry;

    GtkWidget *port_entry;
    GtkWidget *username_entry;
    GtkWidget *password_entry;
    GtkWidget *remember_pw;

    GtkWidget *optional_label;

    GtkWidget *port_hbox;
    GtkWidget *username_hbox;
    GtkWidget *password_hbox;
    GtkWidget *server_hbox;
    GtkWidget *file_hbox;

    GtkWidget *port_label;
    GtkWidget *username_label;
    GtkWidget *password_label;
    GtkWidget *server_label;
    GtkWidget *file_label;

    GtkWidget *ok;
    GtkWidget *cancel;
};

struct _UrlEditorDialogClass {
    GtkDialogClass parent_class;
};

GtkWidget *url_editor_dialog_new (GtkTreeModel *url_list_model, EPublishUri *uri);
GType      url_editor_dialog_get_type (void);
gboolean   url_editor_dialog_run (UrlEditorDialog *dialog);

G_END_DECLS

#endif /* _URL_EDITOR_DIALOG_H_ */