~ubuntu-branches/ubuntu/precise/evolution/precise

« back to all changes in this revision

Viewing changes to plugins/calendar-file/calendar-file.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2011-06-24 00:27:53 UTC
  • mfrom: (1.1.80 upstream)
  • Revision ID: james.westby@ubuntu.com-20110624002753-2vh1vjavlya7r103
Tags: 3.1.2-0ubuntu1
* New upstream release 3.1.2.
* debian/control: adjust Build-Depends to match new upstream requirements for
  the new release.
* debian/control: update evolution and evolution-dev Depends to require the
  right versions of e-d-s (>= 3.1, << 3.2), and drop libunique-3.0-dev.
* debian/control,
  debian/evolution.install: remove groupwise-features from the plugin list,
  it's now split out into a separate module.
* debian/patches/03_lpi.patch: refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 *
20
20
 */
21
21
 
 
22
#ifdef HAVE_CONFIG_H
 
23
#include <config.h>
 
24
#endif
 
25
 
22
26
#include <gtk/gtk.h>
23
27
#include <e-util/e-config.h>
24
28
#include <e-util/e-plugin-util.h>
123
127
                GTK_EXPAND | GTK_FILL, 0, 0, 0);
124
128
 
125
129
        maincheck = gtk_check_button_new_with_mnemonic (_("_Customize options"));
126
 
        gtk_box_pack_start ((GtkBox *)mainbox, maincheck, TRUE, TRUE, 2);
 
130
        gtk_box_pack_start ((GtkBox *) mainbox, maincheck, TRUE, TRUE, 2);
127
131
 
128
132
        box1 = gtk_hbox_new (FALSE, 2);
129
 
        gtk_box_pack_start ((GtkBox *)mainbox, box1, TRUE, TRUE, 2);
 
133
        gtk_box_pack_start ((GtkBox *) mainbox, box1, TRUE, TRUE, 2);
130
134
 
131
135
        g_object_set_data ((GObject*)maincheck, "child", box1);
132
136
 
133
137
        /* left-most space, the first one */
134
138
        w1 = gtk_label_new ("");
135
 
        gtk_box_pack_start ((GtkBox *)box1, w1, FALSE, TRUE, 8);
 
139
        gtk_box_pack_start ((GtkBox *) box1, w1, FALSE, TRUE, 8);
136
140
 
137
141
        box2 = gtk_vbox_new (FALSE, 2);
138
 
        gtk_box_pack_start ((GtkBox *)box1, box2, TRUE, TRUE, 2);
 
142
        gtk_box_pack_start ((GtkBox *) box1, box2, TRUE, TRUE, 2);
139
143
 
140
144
        box1 = box2;
141
145
        box2 = gtk_hbox_new (FALSE, 2);
142
 
        gtk_box_pack_start ((GtkBox *)box1, box2, TRUE, TRUE, 2);
 
146
        gtk_box_pack_start ((GtkBox *) box1, box2, TRUE, TRUE, 2);
143
147
 
144
148
        w1 = gtk_label_new_with_mnemonic (_("File _name:"));
145
149
        gtk_misc_set_alignment (GTK_MISC (w1), 0.0, 0.5);
146
 
        gtk_box_pack_start ((GtkBox *)box2, w1, FALSE, TRUE, 2);
 
150
        gtk_box_pack_start ((GtkBox *) box2, w1, FALSE, TRUE, 2);
147
151
 
148
152
        w2 = gtk_file_chooser_button_new (_("Choose calendar file"), GTK_FILE_CHOOSER_ACTION_OPEN);
149
153
        gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (w2), TRUE);
150
154
        gtk_label_set_mnemonic_widget (GTK_LABEL (w1), w2);
151
 
        gtk_box_pack_start ((GtkBox *)box2, w2, TRUE, TRUE, 2);
 
155
        gtk_box_pack_start ((GtkBox *) box2, w2, TRUE, TRUE, 2);
152
156
 
153
157
        g_object_set_data (G_OBJECT (maincheck), "file-chooser", w2);
154
158
 
186
190
        g_signal_connect (G_OBJECT (maincheck), "toggled", G_CALLBACK (maincheck_toggled), source);
187
191
 
188
192
        box2 = gtk_hbox_new (FALSE, 2);
189
 
        gtk_box_pack_start ((GtkBox *)box1, box2, FALSE, TRUE, 2);
 
193
        gtk_box_pack_start ((GtkBox *) box1, box2, FALSE, TRUE, 2);
190
194
 
191
195
        w1 = gtk_label_new_with_mnemonic (_("Re_fresh:"));
192
196
        gtk_misc_set_alignment (GTK_MISC (w1), 0.0, 0.5);
193
 
        gtk_box_pack_start ((GtkBox *)box2, w1, FALSE, TRUE, 2);
 
197
        gtk_box_pack_start ((GtkBox *) box2, w1, FALSE, TRUE, 2);
194
198
 
195
199
        w2 = gtk_combo_box_text_new ();
196
200
        gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w2), _("On open"));
197
201
        gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w2), _("On file change"));
198
202
        gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w2), _("Periodically"));
199
203
        gtk_label_set_mnemonic_widget (GTK_LABEL (w1), w2);
200
 
        gtk_box_pack_start ((GtkBox *)box2, w2, FALSE, TRUE, 2);
 
204
        gtk_box_pack_start ((GtkBox *) box2, w2, FALSE, TRUE, 2);
201
205
 
202
206
        value = e_source_get_property (source, "refresh-type");
203
 
        gtk_combo_box_set_active ((GtkComboBox *)w2, (value && *value && !value[1] && value[0] >= '0' && value[0] <= '2') ? value[0] - '0' : 0);
 
207
        gtk_combo_box_set_active ((GtkComboBox *) w2, (value && *value && !value[1] && value[0] >= '0' && value[0] <= '2') ? value[0] - '0' : 0);
204
208
 
205
209
        w1 = w2;
206
210
        w2 = e_plugin_util_add_refresh (NULL, NULL, source, "refresh");
211
215
        g_signal_connect (G_OBJECT (w1), "changed", G_CALLBACK (refresh_type_changed), source);
212
216
 
213
217
        w2 = e_plugin_util_add_check (NULL, _("Force read _only"), source, "custom-file-readonly", "1", NULL);
214
 
        gtk_box_pack_start ((GtkBox *)box1, w2, TRUE, TRUE, 2);
 
218
        gtk_box_pack_start ((GtkBox *) box1, w2, TRUE, TRUE, 2);
215
219
 
216
220
        gtk_widget_show_all (mainbox);
217
221