aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shortcut.c
blob: 767f9e40670c0365a22830995a4b1eee0c4e2a4b (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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
/*
 * Shortcut.c: implements shortcuts and shortcut group models
 *
 * Author:
 *   Miguel de Icaza (miguel@kernel.org)
 *
 * (C) 2000 Helix Code, Inc.
 *
 */
#include <config.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkmisc.h>
#include <libgnome/libgnome.h>
#include "e-util/e-util.h"
#include "e-shortcut.h"
#include "shortcut-bar/e-shortcut-bar.h"
#include "shortcut-bar/e-clipped-label.h"

#define SHORTCUT_PARENT_TYPE gtk_object_get_type ()
#define SHORTCUT_BAR_MODEL_PARENT_TYPE gtk_object_get_type ()
#define SHORTCUT_GROUP_PARENT_TYPE gtk_object_get_type ()

static GtkObjectClass *shortcut_parent_class;
static GtkObjectClass *shortcut_group_parent_class;
static GtkObjectClass *shortcut_bar_model_parent_class;

enum {
    STRUCTURE_CHANGED,
    LAST_SIGNAL
};

static void
es_destroy (GtkObject *object)
{
    EShortcut *ef = E_SHORTCUT (object);
    
    gtk_object_unref (GTK_OBJECT (ef->efolder));
              
    shortcut_parent_class->destroy (object);
}

static void
e_shortcut_class_init (GtkObjectClass *object_class)
{
    object_class->destroy = es_destroy;
    shortcut_parent_class = gtk_type_class (SHORTCUT_PARENT_TYPE);
}

static void
esg_destroy (GtkObject *object)
{
    EShortcutGroup *efg = E_SHORTCUT_GROUP (object);
    const int shortcut_count = efg->shortcuts->len;
    int i;
        
    g_free (efg->title);

    for (i = 0; i < shortcut_count; i++){
        EShortcut *es = g_array_index (efg->shortcuts, EShortcut *, i);
        
        gtk_object_unref (GTK_OBJECT (es));
    }
    
    g_array_free (efg->shortcuts, TRUE);
    efg->model = NULL;
    
    shortcut_group_parent_class->destroy (object);
}

static void
e_shortcut_group_class_init (GtkObjectClass *object_class)
{
    object_class->destroy = esg_destroy;
    shortcut_parent_class = gtk_type_class (SHORTCUT_GROUP_PARENT_TYPE);
}

static void
e_shortcut_group_init (GtkObject *object)
{
    EShortcutGroup *esg = E_SHORTCUT_GROUP (object);

    GTK_OBJECT_UNSET_FLAGS (GTK_OBJECT (object), GTK_FLOATING);
    
    esg->shortcuts = g_array_new (FALSE, FALSE, sizeof (EShortcut *));
}

EShortcut *
e_shortcut_new (EFolder *efolder)
{
    EShortcut *shortcut = gtk_type_new (e_shortcut_get_type ());

    shortcut->efolder = efolder;
    gtk_object_ref (GTK_OBJECT (efolder));

    return shortcut;
}

EShortcutGroup *
e_shortcut_group_new (const char *title, EIconBarViewType type)
{
    EShortcutGroup *shortcut_group = gtk_type_new (e_shortcut_group_get_type ());

    shortcut_group->title = g_strdup (title);
    shortcut_group->type = type;
    return shortcut_group;
}

void
e_shortcut_group_append (EShortcutGroup *sg, EShortcut *shortcut)
{
    g_return_if_fail (sg != NULL);
    g_return_if_fail (E_IS_SHORTCUT_GROUP (sg));
    g_return_if_fail (shortcut != NULL);
    g_return_if_fail (E_IS_SHORTCUT (shortcut));

    gtk_object_ref (GTK_OBJECT (shortcut));
    gtk_object_sink (GTK_OBJECT (shortcut));
    
    g_array_append_val (sg->shortcuts, shortcut);

    /* FIXME: Broadcast change */
}

void
e_shortcut_group_remove (EShortcutGroup *sg, EShortcut *shortcut)
{
    g_return_if_fail (sg != NULL);
    g_return_if_fail (E_IS_SHORTCUT_GROUP (sg));
    g_return_if_fail (shortcut != NULL);
    g_return_if_fail (E_IS_SHORTCUT (sg));

    {
        const int len = sg->shortcuts->len;
        int i;
        
        for (i = 0; i < len; i++){
            EShortcut *es = g_array_index (sg->shortcuts, EShortcut *, i);

            if (es == shortcut){
                g_array_remove_index (sg->shortcuts, i);
                /* FIXME: Broadcast change */
                return;
            }
        }
    }
}

void
e_shortcut_group_move (EShortcutGroup *sg, int from, int to)
{
    EShortcut *t;
    
    g_return_if_fail (sg != NULL);
    g_return_if_fail (E_IS_SHORTCUT_GROUP (sg));

    g_return_if_fail (from < sg->shortcuts->len);
    g_return_if_fail (to < sg->shortcuts->len);
    g_return_if_fail (from >= 0);
    g_return_if_fail (to >= 0);
    
    if (from == to)
        return;

    t = g_array_index (sg->shortcuts, EShortcut *, from);
    g_array_index (sg->shortcuts, EShortcut *, from) =
        g_array_index (sg->shortcuts, EShortcut *, to);
    g_array_index (sg->shortcuts, EShortcut *, to) = t;
    
    /* FIXME: Broadcast change */
}

void
e_shortcut_group_rename (EShortcutGroup *sg, const char *text)
{
    GSList *l;
    int id;
    
    g_return_if_fail (sg != NULL);
    g_return_if_fail (E_IS_SHORTCUT_GROUP (sg));

    id = e_group_num_from_group_ptr (sg->model, sg);
    for (l = sg->model->views; l; l = l->next){
        EShortcutBar *shortcut_bar = l->data;
        GtkWidget *label;

        label = e_clipped_label_new (text);

        gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
        gtk_widget_show (label);

        e_group_bar_set_group_button_label (
            E_GROUP_BAR (shortcut_bar), id, label);
    }
}

static void
esb_destroy (GtkObject *object)
{
    EShortcutBarModel *esb = E_SHORTCUT_BAR_MODEL (object);
    const int count = esb->groups->len;
    int i;
    
    for (i = 0; i < count; i++){
        EShortcutGroup *esg = g_array_index (esb->groups, EShortcutGroup *, i);
        
        gtk_object_destroy (GTK_OBJECT (esg));
    }

    g_array_free (esb->groups, TRUE);
    shortcut_bar_model_parent_class->destroy (object);
}

static void
e_shortcut_bar_model_class_init (GtkObjectClass *object_class)
{
    object_class->destroy = esb_destroy;
    shortcut_bar_model_parent_class = gtk_type_class (SHORTCUT_BAR_MODEL_PARENT_TYPE);
}

static void
e_shortcut_bar_model_init (GtkObject *object)
{
    EShortcutBarModel *esb = E_SHORTCUT_BAR_MODEL (object);

    /* The shortcut bar model is self owned */
    GTK_OBJECT_UNSET_FLAGS (object, GTK_FLOATING);
    
    esb->groups = g_array_new (FALSE, FALSE, sizeof (EShortcutGroup *));
}

EShortcutBarModel *
e_shortcut_bar_model_new (void)
{
    EShortcutBarModel *bm;

    bm = gtk_type_new (e_shortcut_bar_model_get_type ());

    return bm;
}

void
e_shortcut_bar_model_append (EShortcutBarModel *bm, EShortcutGroup *sg)
{
    g_return_if_fail (bm != NULL);
    g_return_if_fail (sg != NULL);
    g_return_if_fail (E_IS_SHORTCUT_BAR_MODEL (bm));
    g_return_if_fail (E_IS_SHORTCUT_GROUP (sg));

    gtk_object_ref (GTK_OBJECT (sg));
    gtk_object_sink (GTK_OBJECT (sg));

    sg->model = bm;
    
    g_array_append_val (bm->groups, sg);
}

EShortcutGroup *
e_shortcut_group_from_pos (EShortcutBarModel *bm, int group_num)
{
    EShortcutGroup *group;
    
    if (group_num == -1)
        return NULL;

    group = g_array_index (bm->groups, EShortcutGroup *, group_num);
    return group;
}

EShortcut *
e_shortcut_from_pos (EShortcutGroup *group, int item_num)
{
    EShortcut *shortcut;

    g_return_val_if_fail (group != NULL, NULL);
    g_return_val_if_fail (E_IS_SHORTCUT_GROUP (group), NULL);
    
    if (item_num == -1)
        return NULL;

    g_return_val_if_fail (item_num < group->shortcuts->len, NULL);

    shortcut = g_array_index (group->shortcuts, EShortcut *, item_num);
    return shortcut;
}

static void
populate_group (EShortcutBarModel *bm, EShortcutGroup *esg, EShortcutBar *shortcut_bar)
{
    int group_num, i;
    const int items = esg->shortcuts->len;

    group_num = e_shortcut_bar_add_group (shortcut_bar, esg->title);
    e_shortcut_bar_set_view_type (shortcut_bar, group_num, esg->type);

    for (i = 0; i < items; i++){
        EShortcut *shortcut = E_SHORTCUT (g_array_index (esg->shortcuts, EShortcut *, i));
        EFolder *folder = shortcut->efolder;
        char *type = NULL;
        
        switch (folder->type){
        case E_FOLDER_MAIL:
            type = "folder:";
            break;
            
        case E_FOLDER_CONTACTS:
            type = "contacts:";
            break;
            
        case E_FOLDER_CALENDAR:
            type = "calendar:";
            break;
            
        case E_FOLDER_TASKS:
            type = "todo:";
            break;
            
        case E_FOLDER_OTHER:
            type = "file:";
            break;

        default:
            g_assert_not_reached ();
        }
        
        e_shortcut_bar_add_item (shortcut_bar, group_num, type, folder->name);
    }
}

static void
populate_from_model (EShortcutBarModel *bm, EShortcutBar *shortcut_bar)
{
    const int groups = bm->groups->len;
    int i;
    
    for (i = 0; i < groups; i++){
        EShortcutGroup *esg;

        esg = g_array_index (bm->groups, EShortcutGroup *, i);

        populate_group (bm, esg, shortcut_bar);
    }
    
}

static void
view_destroyed (EShortcutBar *shortcut_bar, EShortcutBarModel *bm)
{
    bm->views = g_slist_remove (bm->views, shortcut_bar);
}
    
GtkWidget *
e_shortcut_bar_view_new (EShortcutBarModel *bm)
{
    GtkWidget *shortcut_bar;
    
    gtk_widget_push_visual (gdk_rgb_get_visual ());
    gtk_widget_push_colormap (gdk_rgb_get_cmap ());

    shortcut_bar = e_shortcut_bar_new ();

    gtk_widget_pop_visual ();
    gtk_widget_pop_colormap ();

    populate_from_model (bm, E_SHORTCUT_BAR (shortcut_bar));

    bm->views = g_slist_prepend (bm->views, shortcut_bar);
    gtk_signal_connect (GTK_OBJECT (shortcut_bar), "destroy", GTK_SIGNAL_FUNC (view_destroyed), bm);
    
    return shortcut_bar;
}

int
e_group_num_from_group_ptr (EShortcutBarModel *bm, EShortcutGroup *group)
{
    const int n = bm->groups->len;
    int i;
    
    for (i = 0; i < n; i++)
        if (g_array_index (bm->groups, EShortcutGroup *, i) == group)
            return i;
    return -1;
}

/*
 * Sets the view mode in all the views
 */
void
e_shortcut_group_set_view_type (EShortcutGroup *group, EIconBarViewType type)
{
    GSList *l;
    int group_num;
    
    g_return_if_fail (group != NULL);
    g_return_if_fail (E_IS_SHORTCUT_GROUP (group));

    group_num = e_group_num_from_group_ptr (group->model, group);

    g_assert (group_num != -1);
    
    group->type = type;
    
    for (l = group->model->views; l ; l = l->next){
        EShortcutBar *shortcut_bar = l->data;

        e_shortcut_bar_set_view_type (shortcut_bar, group_num, type);
    }
}

gint
e_shortcut_bar_model_add_group (EShortcutBarModel *model)
{
    int id = -1;
    GSList *l = NULL;
    
    g_return_val_if_fail (model != NULL, -1);
    g_return_val_if_fail (E_IS_SHORTCUT_BAR_MODEL (model), -1);

    for (l = model->views; l; l = l->next){
        EShortcutBar *shortcut_bar = l->data;
        
        id = e_shortcut_bar_add_group (shortcut_bar, _("New group"));
    }

    return id;
}

void
e_shortcut_bar_model_remove_group (EShortcutBarModel *model, EShortcutGroup *sg)
{
    GSList *l = NULL;
    int group_num;
    
    g_return_if_fail (model != NULL);
    g_return_if_fail (E_IS_SHORTCUT_BAR_MODEL (model));
    g_return_if_fail (sg != NULL);
    g_return_if_fail (E_IS_SHORTCUT_GROUP (sg));

    group_num = e_group_num_from_group_ptr (model, sg);
    
    for (l = model->views; l; l = l->next){
        EShortcutBar *shortcut_bar = l->data;
        
        e_shortcut_bar_remove_group (shortcut_bar, group_num);
    }
    
}

E_MAKE_TYPE (e_shortcut, "EShortcut", EShortcut, e_shortcut_class_init, NULL, SHORTCUT_PARENT_TYPE);
E_MAKE_TYPE (e_shortcut_group, "EShortcutGroup", EShortcutGroup, e_shortcut_group_class_init, e_shortcut_group_init, SHORTCUT_GROUP_PARENT_TYPE);
E_MAKE_TYPE (e_shortcut_bar_model, "EShortcutBarModel", EShortcutBarModel, e_shortcut_bar_model_class_init, e_shortcut_bar_model_init, SHORTCUT_BAR_MODEL_PARENT_TYPE);

n title='2003-10-30 20:34:10 +0800'>2003-10-302-49/+18 | | | | | | | | | | | | | | 2003-10-30 Rodrigo Moya <rodrigo@ximian.com> * pcs/cal-backend-file.c (mark_dirty, save_idle): removed, since we dont save the file anymore in idle callbacks. (cal_backend_file_dispose): removed all traces of the idle saving. (check_dup_uid, create_cal, cal_backend_file_add_timezone, cal_backend_file_create_object, cal_backend_file_modify_object, cal_backend_file_remove_object, cal_backend_file_receive_objects): call save() directly instead of mark_dirty(). svn path=/trunk/; revision=23132 * implemented THIS and ALL recurrences cases, blowing away or detachingRodrigo Moya2003-10-302-40/+195 | | | | | | | | | | | | | | | | | | | 2003-10-30 Rodrigo Moya <rodrigo@ximian.com> * pcs/cal-backend-file.c (cal_backend_file_modify_object): implemented THIS and ALL recurrences cases, blowing away or detaching recurrences from the main component as required. (get_rid_string): make it return const. (get_rid_timetype): new convenience function for getting libical's recurrence ID from a CalComponent. (cal_backend_file_is_read_only, remove_recurrence_cb, remove_component): fixed warnings. (remove_object_instance_cb): callback to remove the instances from the hash on the THISANDPRIOR and THISANDFUTURE cases. (cal_backend_file_remove_object): replaced mismatched if/else statement with proper management of each of the recurrence cases. svn path=/trunk/; revision=23131 * implement something basic.Not Zed2003-10-302-2/+17 | | | | | | | | 2003-10-30 Not Zed <NotZed@Ximian.com> * camel-smime-context.c (sm_get_passwd): implement something basic. svn path=/trunk/; revision=23130 * show application/x-pkcs7-mime inline always by default.Not Zed2003-10-304-20/+111 | | | | | | | | | | | | | | | | | | | | | | 2003-10-30 Not Zed <NotZed@Ximian.com> * em-format.c (em_format_is_inline): show application/x-pkcs7-mime inline always by default. 2003-10-30 Not Zed <NotZed@Ximian.com> * em-format.c (emf_multipart_signed): handle application/x-pkcs7-signature. 2003-10-29 Not Zed <NotZed@Ximian.com> * em-format-html.c (em_format_html_multipart_signed_sign): handle application/x-pkcs7-signature. * em-format.c (emf_application_xpkcs7mime): Handle application/x-pkcs7-mime. svn path=/trunk/; revision=23129 * Turn on SMIME_SUPPORTED. (build_message): move some of the security codeNot Zed2003-10-302-202/+188 | | | | | | | | | | 2003-10-30 Not Zed <NotZed@Ximian.com> * e-msg-composer.c: Turn on SMIME_SUPPORTED. (build_message): move some of the security code around, and fix up smime code. svn path=/trunk/; revision=23128 * Added a note about api inconsistencies.Not Zed2003-10-3012-1301/+1253 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-10-30 Not Zed <NotZed@Ximian.com> * camel-cipher-context.h: Added a note about api inconsistencies. 2003-10-30 Not Zed <NotZed@Ximian.com> * camel-multipart-encrypted.c (camel_multipart_encrypted_decrypt): fix for cipher_decrypt changes. * camel-gpg-context.c, camel-cipher-context.c: moved all the init code to the end to save having to keep forward declarations around. (camel_cipher_decrypt): changed to take mimepart input and return a mimepart. (gpg_decrypt): fix for changed args. 2003-10-29 Not Zed <NotZed@Ximian.com> * camel-smime-context.[ch]: replaced entirely with a new implementation which inherits from camel-cipher-context, and add to build. * camel-multipart-encrypted.c (camel_multipart_encrypted_encrypt): fix for cipher_encrypt api changes. (camel_multipart_encrypted_decrypt): use g_ascii_strcasecmp. * camel-gpg-context.c (gpg_encrypt): Fix to handle input/output as parts not streams * camel-cipher-context.c (camel_cipher_encrypt): change to take mimeparts rather than streams as input/output. And remove the 'sign' argument, it is implied if userid is supplied. 2003-10-28 Not Zed <NotZed@Ximian.com> * tests/smime/pgp.c (main): fix for ciphercontext api changes. * camel-multipart-signed.c (camel_multipart_signed_verify): pass in the part to cipher_verify directly. (camel_multipart_signed_sign): let the cipher context setup the part details. * camel-gpg-context.c (gpg_sign): put the signature stream into a mimepart, with appropriate headers/encoding. (swrite): write out a mimepart rather than a stream. (gpg_verify): handle changed args. * camel-cipher-context.c (camel_cipher_sign): write the signature to a mimepart rather than a simple stream. (camel_cipher_verify): take the signature as a mimepart not a stream. 2003-10-22 Not Zed <NotZed@Ximian.com> * camel-utf8.c (camel_ucs2_utf8, camel_utf8_ucs2): helpers for ucs2 stuff. ucs2 is 16 bit truncated unicode. svn path=/trunk/; revision=23127 * add the S/MIME config control here.Chris Toshok2003-10-302-0/+29 | | | | | | | | | 2003-10-29 Chris Toshok <toshok@ximian.com> * gui/component/GNOME_Evolution_Addressbook.server.in.in: add the S/MIME config control here. svn path=/trunk/; revision=23126 * change the poa hint to PER_REQUEST. fixes a couple of deadlocks.Chris Toshok2003-10-302-1/+6 | | | | | | | | | 2003-10-29 Chris Toshok <toshok@ximian.com> * backend/ebook/e-book-listener.c (e_book_listener_new): change the poa hint to PER_REQUEST. fixes a couple of deadlocks. svn path=/trunk/; revision=23125 * ifdef the smime code with HAVE_NSS.Chris Toshok2003-10-303-2/+17 | | | | | | | | | | | | 2003-10-29 Chris Toshok <toshok@ximian.com> * gui/component/component-factory.c (factory): ifdef the smime code with HAVE_NSS. * gui/component/Makefile.am (libevolution_addressbook_la_LIBADD): conditionally include libevolution-smime.la. svn path=/trunk/; revision=23124 * use $SMIME_DIR. instead of explicitly including smime.Chris Toshok2003-10-303-1/+21 | | | | | | | | | | | | 2003-10-29 Chris Toshok <toshok@ximian.com> * Makefile.am (SUBDIRS): use $SMIME_DIR. instead of explicitly including smime. * configure.in: add some smime foo - a status message, an AM_CONDITIONAL (ENABLE_SMIME) svn path=/trunk/; revision=23123 * build new filesJP Rosevear2003-10-305-4/+353 | | | | | | | | | | | | | | | 2003-10-29 JP Rosevear <jpr@ximian.com> * gui/Makefile.am: build new files * gui/dialogs/comp-editor-util.c (date_edit_destroy_cb): unref the config manager (comp_editor_new_date_edit): set up a config manager for the date editor * gui/e-date-edit-config.[hc]: config manager for e-date-edit svn path=/trunk/; revision=23122 * set an exception if we fail, so evo won't crash.Dan Winship2003-10-302-0/+11 | | | | | | | * gui/calendar-component.c (impl_createControls): set an exception if we fail, so evo won't crash. svn path=/trunk/; revision=23121 * declare an exception for createControls to return, so we don't have toDan Winship2003-10-302-1/+9 | | | | | | | * Evolution-Component.idl: declare an exception for createControls to return, so we don't have to just crash if it fails. svn path=/trunk/; revision=23120 * Changed the OAFIID.Jeffrey Stedfast2003-10-306-9/+20 | | | | | | | | | | | | | | | 2003-10-29 Jeffrey Stedfast <fejj@ximian.com> * em-account-prefs.h: Changed the OAFIID. * em-composer-prefs.h: Changed the OAFIID. * em-mailer-prefs.h: Changed the OAFIID. * GNOME_Evolution_Mail.server.in.in: Changed OAFIIDs for the prefs controls. svn path=/trunk/; revision=23119 * Nuked the MailConfig interface stuff.Jeffrey Stedfast2003-10-307-568/+16 | | | | | | | | | | | | | | | | | | | 2003-10-29 Jeffrey Stedfast <fejj@ximian.com> * GNOME_Evolution_Mail.server.in.in: Nuked the MailConfig interface stuff. * Mailer.idl: Removed. None of the interfaces are needed/used anymore. * folder-info.[c,h]: Removed. The summary was the only thing that needed/used this code and it has been nuked into oblivion, so these interfaces are no longer needed. * mail-config.c: Removed old crufty CORBA interface snot that is no longer needed or used. svn path=/trunk/; revision=23118 * no need to update config settings everywhere explicitlyJP Rosevear2003-10-2913-201/+144 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-10-29 JP Rosevear <jpr@ximian.com> * gui/dialogs/cal-prefs-dialog.c (update_config): no need to update config settings everywhere explicitly * gui/tasks-component.c (update_uris_for_selection): cast the widget * gui/gnome-cal.h: remove proto * gui/gnome-cal.c (setup_widgets): don't update config settings explicitly (gnome_calendar_update_config_settings): kill * gui/e-week-view.c: remove null chars * gui/e-tasks.h: remove proto * gui/e-tasks.c (set_timezone): set the timezone on the client (timezone_changed_cb): changed timezone callback (setup_config): setup config stuff (e_tasks_init): setup config and widgets here (e_tasks_new): construct is dead, no need to track all widgets (cal_opened_cb): set the timezone upon opening (e_tasks_update_all_config_settings): kill * gui/control-factory.c (control_factory_new_control): create the calendar ourselves * gui/calendar-config.c (on_timezone_set): don't update the settings everywhere here, we have config managers now * gui/calendar-component.c (impl_createControls): create the calendar ourselves * gui/calendar-commands.h: remove protos * gui/calendar-commands.c: remove dead functions svn path=/trunk/; revision=23117 * set the format on the cal viewJP Rosevear2003-10-294-2/+41 | | | | | | | | | | | | | | | | 2003-10-29 JP Rosevear <jpr@ximian.com> * gui/e-day-view-config.c (set_twentyfour_hour): set the format on the cal view * gui/e-week-view-config.c (set_twentyfour_hour): ditto * gui/e-cal-list-view-config.c (set_twentyfour_hour): set the 24 hour format on the view (twentyfour_hour_changed_cb): 24 hour format change callback (e_cal_list_view_config_set_view): handle 24 hour format change svn path=/trunk/; revision=23116 * unref config manager (init_widgets): create config manager for theJP Rosevear2003-10-294-111/+38 | | | | | | | | | | | | | | | | | | | | 2003-10-29 JP Rosevear <jpr@ximian.com> * gui/dialogs/recurrence-page.c (recurrence_page_finalize): unref config manager (init_widgets): create config manager for the e-calendar * gui/e-tasks.c (setup_widgets): create config manager for the table view (e_tasks_destroy): unref config manager (e_tasks_open): return FALSE not NULL (e_tasks_update_all_config_settings): don't configure the calendar table here, we have a manager * gui/calendar-config.c: remove dead config functions (handled by config managers now) svn path=/trunk/; revision=23115 * set the timezone for all clients (timezone_changed_cb): callback forJP Rosevear2003-10-2919-64/+1537 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-10-29 JP Rosevear <jpr@ximian.com> * gui/gnome-cal.c (set_timezone): set the timezone for all clients (timezone_changed_cb): callback for changes (setup_config): setup the configuration (setup_widgets): setup up configuration managers for the list view, task list and date navigator (gnome_calendar_init): setup config (gnome_calendar_destroy): destroy configuration managers and notifications (gnome_calendar_update_config_settings): remove dead bits * gui/e-mini-calendar-config.[hc]: manage configuration of an e-calendar * gui/e-day-view-config.h: remove extraneous comment, type the parent class correctly * gui/e-week-view-config.h: ditto * gui/e-day-view-config.c (e_day_view_config_class_init): type the class correctly (set_timezone): set timezone (timezone_changed_cb): timezone changed callback (e_day_view_config_set_view): track timezone changes * gui/e-week-view-config.c: ditto * gui/e-cell-date-edit-config.[hc]: manage configuration of a date edit cell * gui/e-calendar-table-config.[hc]: manage configuration of a e-calendar-table * gui/e-cal-list-view.c (get_current_time_cb): use the view timezone to compute * gui/e-cal-list-view-config.[hc]: manage configuration of a list view * gui/calendar-config.h: update protos * gui/calendar-config.c (calendar_config_add_notification_timezone): notify of timezone change (calendar_config_add_notification_dnav_show_week_no): notify of show week number setting change * gui/calendar-component.c (calendar_component_peek): remove bad comma * gui/Makefile.am: build new config classes svn path=/trunk/; revision=23114 * fixed typo in menu item label.Rodrigo Moya2003-10-2915-91/+119 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-10-29 Rodrigo Moya <rodrigo@ximian.com> * gui/calendar-component.c (fill_popup_menu_callback): fixed typo in menu item label. * gui/e-cal-model.[ch] (e_cal_model_get_use_24_hour_format): new function. * gui/e-cal-view.[ch]: no need to keep the 'use_24_hour' setting, it's already in the model. (e_cal_view_get_use_24_hour_format, e_cal_view_set_use_24_hour_format): new functions. * gui/e-day-view.[ch] (e_day_view_get_24_hour_format, (e_day_view_set_24_hour_format): removed. (e_day_view_convert_time_to_display, e_day_view_update_event_label, e_day_view_get_time_string_width): use the ECalView's function to get the 24 hour format. * gui/e-week-view.[ch] (e_week_view_get_24_hour_format, e_week_view_set_24_hour_format): removed. (e_week_view_convert_time_to_display, e_week_view_get_time_string_width): use the ECalView's function to get the 24 hour format. * gui/e-day-view-top-item.c (e_day_view_top_item_draw_long_event): * gui/e-day-view-time-item.c (e_day_view_time_item_draw): * gui/e-week-view-event-item.c (e_week_view_draw_time): don't use the view's use_24_hour_format, but the ECalView method. svn path=/trunk/; revision=23113 * add certificate-manager.hChris Toshok2003-10-292-1/+7 | | | | | | | | | 2003-10-28 Chris Toshok <toshok@ximian.com> * gui/Makefile.am (libevolution_smime_la_SOURCES): add certificate-manager.h svn path=/trunk/; revision=23112 * We should check List-Post before List-Id (List-Post has to contain theJeffrey Stedfast2003-10-292-10/+17 | | | | | | | | | | | 2003-10-28 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c: We should check List-Post before List-Id (List-Post has to contain the mailing-list posting address, whereas List-Id does not.) WAlso moved X-Loop to after List-Id to make FreeBSD lusers happy. Fixes bug #32297. svn path=/trunk/; revision=23111 * Fixes bug #35083Jeffrey Stedfast2003-10-294-12/+57 | | | | | | | | | | | | | | | | | | | 2003-10-28 Jeffrey Stedfast <fejj@ximian.com> * Fixes bug #35083 * providers/imap/camel-imap-store.c (connect_to_server): Same here. * providers/pop3/camel-pop3-store.c (connect_to_server): Same as the smtp changes. * providers/smtp/camel-smtp-transport.c (connect_to_server): If HAVE_SSL is undefined, don't default to raw connections if the option to connect via ssl is set. Instead set an exception and return fail. svn path=/trunk/; revision=23110 * fill_popup_menu signal has 2 arguments.Rodrigo Moya2003-10-292-1/+6 | | | | | | | | | 2003-10-28 Rodrigo Moya <rodrigo@ximian.com> * e-source-selector.c (class_init): fill_popup_menu signal has 2 arguments. svn path=/trunk/; revision=23109 * connect to "fill_popup_menu" on the ESourceSelector.Rodrigo Moya2003-10-292-1/+9 | | | | | | | | | | | | | 2003-10-28 Rodrigo Moya <rodrigo@ximian.com> * gui/calendar-component.c (impl_createControls): connect to "fill_popup_menu" on the ESourceSelector. (fill_popup_menu_callback): add popup menu items here. (add_popup_menu_item): new function to add items to the popup menu. (new_calendar_cb): callbacks for the popup menu items. svn path=/trunk/; revision=23108 * connect to "fill_popup_menu" on the ESourceSelector.Rodrigo Moya2003-10-292-0/+44 | | | | | | | | | | | | 2003-10-28 Rodrigo Moya <rodrigo@ximian.com> * gui/calendar-component.c (impl_createControls): connect to "fill_popup_menu" on the ESourceSelector. (fill_popup_menu_callback): add popup menu items here. (add_popup_menu_item): new function to add items to the popup menu. svn path=/trunk/; revision=23107 * added "fill_popup_menu" signal, to allow the addition of new items to theRodrigo Moya2003-10-293-1/+42 | | | | | | | | | | | | | 2003-10-28 Rodrigo Moya <rodrigo@ximian.com> * e-source-selector.[ch]: added "fill_popup_menu" signal, to allow the addition of new items to the popup menu. (class_init): create new signal. (init): connect to "button_press_event" for the tree view. (selector_button_press_event): callback for "button_press_event". (e_source_selector_selection_shown): use g_return_val_if_fail. svn path=/trunk/; revision=23106 * Add e-shell-view.h to evolution_SOURCESRodney Dawes2003-10-292-0/+5 | | | | | | | | 2003-10-28 Rodney Dawes <dobey@ximian.com> * Makefile.am: Add e-shell-view.h to evolution_SOURCES svn path=/trunk/; revision=23105 * Fix automake warning, and add e-shell-user-creatable-items-handler.h toRodney Dawes2003-10-282-4/+6 | | | | | | | | | 2003-10-28 Rodney Dawes <dobey@ximian.com> * Makefile.am: Fix automake warning, and add e-shell-user-creatable-items-handler.h to evolution_SOURCES svn path=/trunk/; revision=23104 * no need to keep the timezone here, it is already stored in the model.Rodrigo Moya2003-10-283-22/+24 | | | | | | | | | | | | 2003-10-28 Rodrigo Moya <rodrigo@ximian.com> * gui/e-cal-view.c: no need to keep the timezone here, it is already stored in the model. (e_cal_view_get_timezone): call e_cal_model_get_timezone(). (e_cal_view_set_timezone): call e_cal_model_set_timezone(). (e_cal_view_new_appointment_for): use the model's timezone. svn path=/trunk/; revision=23103 * New; tell each query about a created/modified/removed object.Dan Winship2003-10-288-118/+171 | | | | | | | | | | | | | | | | | | | | | | | | | | | * pcs/cal-backend.c (cal_backend_notify_object_created, cal_backend_notify_object_modified, cal_backend_notify_object_removed): New; tell each query about a created/modified/removed object. * pcs/cal.c (cal_notify_object_created): Use cal_backend_notify_object_created. (cal_notify_object_modified, cal_notify_object_removed): Likewise for modified/removed (cal_notify_objects_received): we need both the before and after forms for the modified objects so they can be resolved as adds/modifies/removes per-query. But the caller can just call the cal_backend_* routines for each object anyway, so just remove the created/modified/removed lists. * pcs/cal-backend-sync.c (cal_backend_sync_receive_objects): Remove created/modified/removed list arguments. (_cal_backend_receive_objects): Likewise. * pcs/cal-backend-file.c (cal_backend_file_receive_objects): Remove created/modified/removed list arguments. Replace the one use of *removed with a call to cal_backend_notify_object_removed. svn path=/trunk/; revision=23102 * better detection of broken date to give to broken_date_parser.Frédéric Crozat2003-10-282-0/+20 | | | | | | | * camel-mime-utils.c: (camel_header_decode_date): better detection of broken date to give to broken_date_parser. svn path=/trunk/; revision=23101 * add new file for toggle cell a11y object. new a11y object toggle cellYuedong Du2003-10-285-0/+431 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-10-26 Yuedong Du <yuedong.du@sun.com> * gal/a11y/e-table/Makefile.am: add new file for toggle cell a11y object. * gal/a11y/e-table/gal-a11y-e-cell-toggle.c: new a11y object toggle cell (gal_a11y_e_cell_toggle_get_type), (gal_a11y_e_cell_toggle_class_init), (toggle_cell_action), the implementation of toggle cell action. (gal_a11y_e_cell_toggle_new): * gal/a11y/e-table/gal-a11y-e-cell-toggle.h: ditto * gal/a11y/e-table/gal-a11y-e-cell.c: (_gal_a11y_e_cell_get_action_info), (_gal_a11y_e_cell_destroy_action_info), (gal_a11y_e_cell_add_action), (gal_a11y_e_cell_remove_action), (gal_a11y_e_cell_remove_action_by_name), (gal_a11y_e_cell_action_get_n_actions), (gal_a11y_e_cell_action_get_name), (gal_a11y_e_cell_action_get_description), (gal_a11y_e_cell_action_set_description), (gal_a11y_e_cell_action_get_keybinding), (idle_do_action), (gal_a11y_e_cell_action_do_action), (gal_a11y_e_cell_atk_action_interface_init), (gal_a11y_e_cell_type_add_action_interface), (gal_a11y_e_cell_add_state): helper functions for add a action, stealed from gailcell.c * gal/a11y/e-table/gal-a11y-e-cell.h: * gal/e-table/e-cell-toggle.c: (e_cell_toggle_class_init): register toggle's a11y object. svn path=/trunk/; revision=23095 * store config objects as well (gnome_calendar_set_default_uri): returnJP Rosevear2003-10-2812-180/+1158 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-10-27 JP Rosevear <jpr@ximian.com> * gui/gnome-cal.c (setup_widgets): store config objects as well (gnome_calendar_set_default_uri): return FALSE if the pre-condition fails (gnome_calendar_update_config_settings): remove settings that are now handled by the config objects * gui/e-week-view.c (e_week_view_set_compress_weekend): queue a draw * gui/e-itip-control.c (start_default_server): comment out * gui/e-day-view-config.[hc]: a class to track config changes of interest to day views * gui/e-week-view.[hc]: ditto for week views * gui/calendar-config.h: add protos * gui/calendar-config.c: use the #defines for the keys and add notification routines * gui/calendar-config-keys.h: a list of defines for gconf keys * gui/Makefile.am: build new files svn path=/trunk/; revision=23094 * Fix for "50065 chinese locales Input method hangs after a task entry andSuresh Chandrasekharan2003-10-281-0/+3 | | | | | | | | | | * Fix for "50065 chinese locales Input method hangs after a task entry and new folder creation" * gal/e-table/e-cell-text.c: (ect_event) Added check to return if preedit_length == 0 and E_CELL_PREEDIT flag is set. svn path=/trunk/; revision=23093 * Fixes bug #49816Jeffrey Stedfast2003-10-286-141/+155 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-10-27 Jeffrey Stedfast <fejj@ximian.com> * Fixes bug #49816 * em-popup.c (emp_part_popup_reply_sender): No need to pass a parent window arg anymore. (emp_part_popup_reply_list): Same. (emp_part_popup_reply_all): Here too. (emp_part_popup_forward): Same. (emp_uri_popup_address_send): Here too. * em-folder-browser.c (emfb_mail_compose): No need to pass a parent window arg anymore. (emfb_mail_post): Same. * em-folder-view.c (emfv_message_reply): Don't pass a parent window argument anymore. (emfv_popup_forward): Same. (emfv_popup_resend): Same here. (em_folder_view_open_selected): Same. (emfv_message_forward_attached): Here too. (emfv_message_forward_inline): And here. (emfv_message_forward_quoted): Same. (emfv_message_redirect): Here too. (emfv_message_post_reply): And here. (emfv_format_link_clicked): ANd finally here. * em-utils.c (create_new_composer): Don't set_transient_for() anymore. (em_utils_compose_new_message): No longer takes a parent window argument. (em_utils_forward_attached): No longer takes a parent window arg. (em_utils_forward_inline): Same. (em_utils_forward_quoted): Same. (em_utils_forward_message): Same. (em_utils_forward_messages): Here too. (redirect_get_composer): Don't set_transient_for() here either. (em_utils_redirect_message): No longer takes a parent window arg. (em_utils_redirect_message_by_uid): Same. (reply_get_composer): Don't set_transient_for() here. (em_utils_reply_to_message): No longer takes a parent window arg. (em_utils_reply_to_message_by_uid): Same. (post_reply_to_message): Don't set_transient_for() here. (em_utils_post_reply_to_message_by_uid): No longer takes a parent window arg. (em_utils_compose_new_message_with_mailto): Don't set_transient_for() here. (em_utils_post_to_url): Same. (em_utils_edit_message): No longer takes a parent window arg. (em_utils_edit_messages): Same. svn path=/trunk/; revision=23092 * If a word is longer than CAMEL_TEXT_INDEX_MAX_WORDLEN, then ignore it.Jeffrey Stedfast2003-10-282-2/+11 | | | | | | | | | | 2003-10-24 Jeffrey Stedfast <fejj@ximian.com> * camel-text-index.c (text_index_name_add_buffer): If a word is longer than CAMEL_TEXT_INDEX_MAX_WORDLEN, then ignore it. This fixes bug #50096. svn path=/trunk/; revision=23091 * changed fill_component_from_model virtual method to get an ETableModel,Rodrigo Moya2003-10-275-20/+32 | | | | | | | | | | | | | | | | | 2003-10-27 Rodrigo Moya <rodrigo@ximian.com> * gui/e-cal-model.h: changed fill_component_from_model virtual method to get an ETableModel, not an ECalModel. * gui/e-cal-model.c (ecm_append_row): the source model sent from ETable is an ETableModel, not an ECalModel. * gui/e-cal-model-calendar.c (ecmc_fill_component_from_model): get an ETableModel for the 'source_model' argument. * gui/e-cal-model-tasks.c (ecmt_fill_component_from_model): ditto. svn path=/trunk/; revision=23082 * pass FALSE as the 'only_if_exists' parameter, so that the calendar getsRodrigo Moya2003-10-272-1/+7 | | | | | | | | | | 2003-10-27 Rodrigo Moya <rodrigo@ximian.com> * gui/tasks-component.c (add_uri_for_source): pass FALSE as the 'only_if_exists' parameter, so that the calendar gets created when it still does not exist. svn path=/trunk/; revision=23080 * initialize private structure on TasksComponent.Rodrigo Moya2003-10-252-0/+7 | | | | | | | | | 2003-10-24 Rodrigo Moya <rodrigo@ximian.com> * gui/tasks-component.c (tasks_component_init): initialize private structure on TasksComponent. svn path=/trunk/; revision=23078 * If the system defines AI_ADDRCONFIG, set this flag on the hints.ai_flagsJeffrey Stedfast2003-10-252-2/+13 | | | | | | | | | | | 2003-10-17 Jeffrey Stedfast <fejj@ximian.com> * e-host-utils.c (e_gethostbyname_r): If the system defines AI_ADDRCONFIG, set this flag on the hints.ai_flags member as well so that we don't resolve a host to an IPv6 addr when the node doesn't have any IPv6 source addresses. svn path=/trunk/; revision=23077 * added a configure check for AI_ADDRCONFIGJeffrey Stedfast2003-10-252-1/+19 | | | | | | | | 2003-10-17 Jeffrey Stedfast <fejj@ximian.com> * configure.in: added a configure check for AI_ADDRCONFIG svn path=/trunk/; revision=23076 * removed mail-summary.cJeffrey Stedfast2003-10-251-1/+0 | | | | svn path=/trunk/; revision=23073 * get rid of this bloody file...Jeffrey Stedfast2003-10-251-0/+0 | | | | svn path=/trunk/; revision=23072 * more cruft gone to the bit bucket...Jeffrey Stedfast2003-10-252-551/+0 | | | | svn path=/trunk/; revision=23071 * good bye...Jeffrey Stedfast2003-10-251-130/+0 | | | | svn path=/trunk/; revision=23070 * removed more cruftJeffrey Stedfast2003-10-257-5503/+0 | | | | svn path=/trunk/; revision=23069 * removed unused filesJeffrey Stedfast2003-10-252-3372/+0 | | | | svn path=/trunk/; revision=23068 * fixed POTFILES.inJeffrey Stedfast2003-10-251-3/+3 | | | | svn path=/trunk/; revision=23067 * Re-Namespaced mail-accounts.cJeffrey Stedfast2003-10-2517-240/+264 | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-10-24 Jeffrey Stedfast <fejj@ximian.com> * em-account-prefs.[c,h]: Re-Namespaced mail-accounts.c * em-composer-prefs.[c,h]: Re-Namespaced mail-composer-prefs.c * em-mailer-prefs.[c,h]: Re-Namespaced mail-preferences.c * mail-accounts.[c,h]: Removed. * mail-composer-prefs.[c,h]: Removed. * mail-preferences.[c,h]: Removed. * mail-account-editor.c: Updated. * mail-account-gui.c: Updated. * mail-config-factory.c: Updated. * mail-component-factory.c: Updated. svn path=/trunk/; revision=23066 * removed repeated initialization. (calendar_component_peek): use G_STRLOCRodrigo Moya2003-10-259-12/+455 | | | | | | | | | | | | | | | | | | | | | 2003-10-24 Rodrigo Moya <rodrigo@ximian.com> * gui/calendar-component.c (calendar_component_class_init): removed repeated initialization. (calendar_component_peek): use G_STRLOC for g_warning's. * gui/tsaks-control.[ch] (tasks_control_activate, tasks_control_deactivate): made these 2 functions public. * gui/tasks-component.[ch]: implementation of the tasks component. * gui/Makefile.am: * gui/GNOME_Evolution_Calendar.server.in.in: added tasks component. * gui/main.c: ditto. (factory): added code to create the tasks component when requested. svn path=/trunk/; revision=23065 * add AM_DISABLE_STATIC here too.Dan Winship2003-10-252-0/+5 | | | | | | * configure.in: add AM_DISABLE_STATIC here too. svn path=/trunk/; revision=23064 * put back the conditional libpasldap stuff, and make evolution-wombatDan Winship2003-10-242-7/+17 | | | | | | | | | | | * Makefile.am (evolution_wombat_LDADD): put back the conditional libpasldap stuff, and make evolution-wombat explicitly depend on the specific backends again; libpas itself cannot depend on the backends. Use libpcsfile.la for the calendar dependency, and remove libebook, libcal-util, libedb3util and libeutil, since they're properly pulled in by libtool now. svn path=/trunk/; revision=23063 * libpas should depend on libebook, but NOT on libpasfile, etc, since itDan Winship2003-10-242-2/+34 | | | | | | | | | | | * backend/pas/Makefile.am (libpas_la_LIBADD): libpas should depend on libebook, but NOT on libpasfile, etc, since it needs to be linked into all backends, not just the wombat. (libpasfile_la_LIBADD): depend on libpas.la and libedb3util.la (libpasvcf_la_LIBADD): depend on libpas.la (libpasldap_la_LIBADD): depend on libpas.la and $(LDAP_LIBS) svn path=/trunk/; revision=23062 * build libpcs.la and libpcsfile.la instead of just .a. (libpcs_la_LIBADD):Dan Winship2003-10-242-4/+16 | | | | | | | | | * pcs/Makefile.am: build libpcs.la and libpcsfile.la instead of just .a. (libpcs_la_LIBADD): depend on libcal-util.la and libeutil.la (libpcsfile_la_LIBADD): depend on libpcs.la svn path=/trunk/; revision=23061 * add $(DB3_LDADD)Dan Winship2003-10-242-0/+7 | | | | | | * Makefile.am (libedb3util_la_LIBADD): add $(DB3_LDADD) svn path=/trunk/; revision=23060 * Remove type argDan Winship2003-10-24