3
* Osmo - a handy personal organizer
5
* Copyright (C) 2007 Tomasz Maka <pasp@users.sourceforge.net>
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
#include <glib/gprintf.h>
32
#include <libxml/xmlmemory.h>
33
#include <libxml/parser.h>
36
#include "gui_utils.h"
38
#include "calendar_notes.h"
39
#include "calendar_widget.h"
42
#include "options_gui.h"
43
#include "options_gui_calendar.h"
44
#include "options_gui_tasks.h"
45
#include "options_gui_contacts.h"
46
#include "options_gui_notes.h"
47
#include "options_gui_general.h"
48
#include "options_prefs.h"
50
#include "stock_icons.h"
53
struct osmo_prefs config;
55
/*------------------------------------------------------------------------------*/
58
options_get_first_active_page (GUI *appGUI) {
60
if (!config.hide_calendar)
61
return OPT_PAGE_CALENDAR;
62
if (!config.hide_tasks)
63
return OPT_PAGE_TASKS;
64
if (!config.hide_contacts)
65
return OPT_PAGE_CONTACTS;
66
#ifdef HAVE_LIBGRINGOTTS
67
if (!config.hide_notes)
68
return OPT_PAGE_NOTES;
69
#endif /* HAVE_LIBGRINGOTTS */
71
return OPT_PAGE_GENERAL;
74
/*------------------------------------------------------------------------------*/
77
options_switch_buttons(gboolean left, GUI *appGUI) {
82
if (left == TRUE) n = -1;
84
appGUI->opt->options_counter += n;
92
switch (appGUI->opt->options_counter) {
93
case OPT_PAGE_CALENDAR:
94
if (config.hide_calendar) {
95
appGUI->opt->options_counter += n;
100
if (config.hide_tasks) {
101
appGUI->opt->options_counter += n;
105
case OPT_PAGE_CONTACTS:
106
if (config.hide_contacts) {
107
appGUI->opt->options_counter += n;
111
#ifdef HAVE_LIBGRINGOTTS
113
if (config.hide_notes) {
114
appGUI->opt->options_counter += n;
118
#endif /* HAVE_LIBGRINGOTTS */
123
appGUI->opt->options_counter = (appGUI->opt->options_counter < OPT_PAGE_CALENDAR) ? options_get_first_active_page(appGUI):appGUI->opt->options_counter;
125
appGUI->opt->options_counter = (appGUI->opt->options_counter > OPT_PAGE_GENERAL) ? OPT_PAGE_GENERAL:appGUI->opt->options_counter;
128
if (appGUI->opt->options_counter == OPT_PAGE_CALENDAR){
129
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->calendar_options_radiobutton), TRUE);
130
g_signal_emit_by_name(G_OBJECT(appGUI->opt->calendar_options_radiobutton), "released");
131
} else if (appGUI->opt->options_counter == OPT_PAGE_TASKS) {
132
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->tasks_options_radiobutton), TRUE);
133
g_signal_emit_by_name(G_OBJECT(appGUI->opt->tasks_options_radiobutton), "released");
134
} else if (appGUI->opt->options_counter == OPT_PAGE_CONTACTS) {
135
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->contacts_options_radiobutton), TRUE);
136
g_signal_emit_by_name(G_OBJECT(appGUI->opt->contacts_options_radiobutton), "released");
137
#ifdef HAVE_LIBGRINGOTTS
138
} else if (appGUI->opt->options_counter == OPT_PAGE_NOTES) {
139
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->notes_options_radiobutton), TRUE);
140
g_signal_emit_by_name(G_OBJECT(appGUI->opt->notes_options_radiobutton), "released");
141
#endif /* HAVE_LIBGRINGOTTS */
143
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->general_options_radiobutton), TRUE);
144
g_signal_emit_by_name(G_OBJECT(appGUI->opt->general_options_radiobutton), "released");
148
/*------------------------------------------------------------------------------*/
151
options_button_released_cb (GtkButton *button, gpointer user_data) {
153
GUI *appGUI = (GUI *)user_data;
155
gtk_widget_hide (appGUI->opt->calendar_vbox);
156
gtk_widget_hide (appGUI->opt->tasks_vbox);
157
gtk_widget_hide (appGUI->opt->contacts_vbox);
158
#ifdef HAVE_LIBGRINGOTTS
159
gtk_widget_hide (appGUI->opt->notes_vbox);
160
#endif /* HAVE_LIBGRINGOTTS */
161
gtk_widget_hide (appGUI->opt->general_vbox);
163
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(appGUI->opt->calendar_options_radiobutton)) == TRUE) {
165
gtk_widget_show (appGUI->opt->calendar_vbox);
166
appGUI->opt->options_counter = OPT_PAGE_CALENDAR;
168
} else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(appGUI->opt->tasks_options_radiobutton)) == TRUE) {
170
gtk_widget_show (appGUI->opt->tasks_vbox);
171
appGUI->opt->options_counter = OPT_PAGE_TASKS;
173
} else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(appGUI->opt->contacts_options_radiobutton)) == TRUE) {
175
gtk_widget_show (appGUI->opt->contacts_vbox);
176
appGUI->opt->options_counter = OPT_PAGE_CONTACTS;
178
#ifdef HAVE_LIBGRINGOTTS
179
} else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(appGUI->opt->notes_options_radiobutton)) == TRUE) {
181
gtk_widget_show (appGUI->opt->notes_vbox);
182
appGUI->opt->options_counter = OPT_PAGE_NOTES;
183
#endif /* HAVE_LIBGRINGOTTS */
185
} else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(appGUI->opt->general_options_radiobutton)) == TRUE) {
187
gtk_widget_show (appGUI->opt->general_vbox);
188
appGUI->opt->options_counter = OPT_PAGE_GENERAL;
192
/*------------------------------------------------------------------------------*/
195
gui_create_options(GUI *appGUI) {
197
GtkWidget *vbox1, *vbox2;
198
GtkWidget *hseparator;
199
GtkWidget *hbuttonbox;
200
GtkWidget *scrolledwindow;
202
GSList *radiobutton_group = NULL;
204
vbox1 = gtk_vbox_new (FALSE, 0);
205
gtk_widget_show (vbox1);
206
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 8);
207
gui_add_to_notebook (vbox1, _("Options"), appGUI);
209
appGUI->opt->vbox = GTK_BOX(vbox1);
211
hseparator = gtk_hseparator_new ();
212
gtk_widget_show (hseparator);
213
gtk_box_pack_start (GTK_BOX (vbox1), hseparator, FALSE, TRUE, 4);
215
/*--------------------------------------------------------------------------*/
217
hbuttonbox = gtk_hbutton_box_new ();
218
gtk_widget_show (hbuttonbox);
219
gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox, FALSE, TRUE, 0);
220
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox), GTK_BUTTONBOX_END);
222
appGUI->opt->calendar_options_radiobutton = gui_stock_label_radio_button(_("Calendar"),
223
OSMO_STOCK_CALENDAR, GTK_ICON_SIZE_LARGE_TOOLBAR);
224
gtk_widget_show (appGUI->opt->calendar_options_radiobutton);
225
gtk_button_set_relief (GTK_BUTTON (appGUI->opt->calendar_options_radiobutton), GTK_RELIEF_NONE);
226
GTK_WIDGET_UNSET_FLAGS(appGUI->opt->calendar_options_radiobutton, GTK_CAN_FOCUS);
227
gtk_radio_button_set_group (GTK_RADIO_BUTTON (appGUI->opt->calendar_options_radiobutton), radiobutton_group);
228
radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (appGUI->opt->calendar_options_radiobutton));
229
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (appGUI->opt->calendar_options_radiobutton), TRUE);
230
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (appGUI->opt->calendar_options_radiobutton), FALSE);
231
gtk_container_add (GTK_CONTAINER (hbuttonbox), appGUI->opt->calendar_options_radiobutton);
233
g_signal_connect (G_OBJECT (appGUI->opt->calendar_options_radiobutton), "released",
234
G_CALLBACK(options_button_released_cb), appGUI);
236
appGUI->opt->tasks_options_radiobutton = gui_stock_label_radio_button(_("Tasks"),
237
OSMO_STOCK_TASKS, GTK_ICON_SIZE_LARGE_TOOLBAR);
238
gtk_widget_show (appGUI->opt->tasks_options_radiobutton);
239
gtk_button_set_relief (GTK_BUTTON (appGUI->opt->tasks_options_radiobutton), GTK_RELIEF_NONE);
240
GTK_WIDGET_UNSET_FLAGS(appGUI->opt->tasks_options_radiobutton, GTK_CAN_FOCUS);
241
gtk_radio_button_set_group (GTK_RADIO_BUTTON (appGUI->opt->tasks_options_radiobutton), radiobutton_group);
242
radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (appGUI->opt->tasks_options_radiobutton));
243
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (appGUI->opt->tasks_options_radiobutton), FALSE);
244
gtk_container_add (GTK_CONTAINER (hbuttonbox), appGUI->opt->tasks_options_radiobutton);
246
g_signal_connect (G_OBJECT (appGUI->opt->tasks_options_radiobutton), "released",
247
G_CALLBACK(options_button_released_cb), appGUI);
249
appGUI->opt->contacts_options_radiobutton = gui_stock_label_radio_button(_("Contacts"),
250
OSMO_STOCK_CONTACTS, GTK_ICON_SIZE_LARGE_TOOLBAR);
251
gtk_widget_show (appGUI->opt->contacts_options_radiobutton);
252
gtk_button_set_relief (GTK_BUTTON (appGUI->opt->contacts_options_radiobutton), GTK_RELIEF_NONE);
253
GTK_WIDGET_UNSET_FLAGS(appGUI->opt->contacts_options_radiobutton, GTK_CAN_FOCUS);
254
gtk_radio_button_set_group (GTK_RADIO_BUTTON (appGUI->opt->contacts_options_radiobutton), radiobutton_group);
255
radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (appGUI->opt->contacts_options_radiobutton));
256
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (appGUI->opt->contacts_options_radiobutton), FALSE);
257
gtk_container_add (GTK_CONTAINER (hbuttonbox), appGUI->opt->contacts_options_radiobutton);
259
g_signal_connect (G_OBJECT (appGUI->opt->contacts_options_radiobutton), "released",
260
G_CALLBACK(options_button_released_cb), appGUI);
262
#ifdef HAVE_LIBGRINGOTTS
264
appGUI->opt->notes_options_radiobutton = gui_stock_label_radio_button(_("Notes"),
265
OSMO_STOCK_NOTES, GTK_ICON_SIZE_LARGE_TOOLBAR);
266
gtk_widget_show (appGUI->opt->notes_options_radiobutton);
267
gtk_button_set_relief (GTK_BUTTON (appGUI->opt->notes_options_radiobutton), GTK_RELIEF_NONE);
268
GTK_WIDGET_UNSET_FLAGS(appGUI->opt->notes_options_radiobutton, GTK_CAN_FOCUS);
269
gtk_radio_button_set_group (GTK_RADIO_BUTTON (appGUI->opt->notes_options_radiobutton), radiobutton_group);
270
radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (appGUI->opt->notes_options_radiobutton));
271
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (appGUI->opt->notes_options_radiobutton), FALSE);
272
gtk_container_add (GTK_CONTAINER (hbuttonbox), appGUI->opt->notes_options_radiobutton);
274
g_signal_connect (G_OBJECT (appGUI->opt->notes_options_radiobutton), "released",
275
G_CALLBACK(options_button_released_cb), appGUI);
277
#endif /* HAVE_LIBGRINGOTTS */
279
appGUI->opt->general_options_radiobutton = gui_stock_label_radio_button(_("General"),
280
OSMO_STOCK_PREFERENCES, GTK_ICON_SIZE_LARGE_TOOLBAR);
281
gtk_widget_show (appGUI->opt->general_options_radiobutton);
282
gtk_button_set_relief (GTK_BUTTON (appGUI->opt->general_options_radiobutton), GTK_RELIEF_NONE);
283
GTK_WIDGET_UNSET_FLAGS(appGUI->opt->general_options_radiobutton, GTK_CAN_FOCUS);
284
gtk_radio_button_set_group (GTK_RADIO_BUTTON (appGUI->opt->general_options_radiobutton), radiobutton_group);
285
radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (appGUI->opt->general_options_radiobutton));
286
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (appGUI->opt->general_options_radiobutton), FALSE);
287
gtk_container_add (GTK_CONTAINER (hbuttonbox), appGUI->opt->general_options_radiobutton);
289
g_signal_connect (G_OBJECT (appGUI->opt->general_options_radiobutton), "released",
290
G_CALLBACK(options_button_released_cb), appGUI);
292
/*--------------------------------------------------------------------------*/
294
hseparator = gtk_hseparator_new ();
295
gtk_widget_show (hseparator);
296
gtk_box_pack_start (GTK_BOX (vbox1), hseparator, FALSE, TRUE, 4);
298
scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
299
gtk_widget_show (scrolledwindow);
300
gtk_box_pack_start (GTK_BOX (vbox1), scrolledwindow, TRUE, TRUE, 0);
301
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_NONE);
302
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
304
viewport = gtk_viewport_new (NULL, NULL);
305
gtk_widget_show (viewport);
306
gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_IN);
307
gtk_container_add (GTK_CONTAINER (scrolledwindow), viewport);
309
vbox2 = gtk_vbox_new (FALSE, 0);
310
gtk_widget_show (vbox2);
311
gtk_container_add (GTK_CONTAINER (viewport), vbox2);
313
gui_create_calendar_options_page (vbox2, appGUI);
314
gui_create_tasks_options_page (vbox2, appGUI);
315
gui_create_contacts_options_page (vbox2, appGUI);
316
#ifdef HAVE_LIBGRINGOTTS
317
gui_create_notes_options_page (vbox2, appGUI);
318
#endif /* HAVE_LIBGRINGOTTS */
319
gui_create_general_options_page (vbox2, appGUI);
321
appGUI->opt->callback_active = FALSE;
323
if(config.display_options & GUI_CALENDAR_SHOW_DAY_NAMES)
324
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->show_day_names_checkbutton), TRUE);
325
if(config.display_options & GUI_CALENDAR_NO_MONTH_CHANGE)
326
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->no_month_change_checkbutton), TRUE);
327
if(config.display_options & GUI_CALENDAR_SHOW_WEEK_NUMBERS)
328
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->show_week_numbers_checkbutton), TRUE);
329
if(config.display_options & GUI_CALENDAR_WEEK_START_MONDAY)
330
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->week_start_monday_checkbutton), TRUE);
332
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->simple_view_in_fy_calendar_checkbutton), config.fy_simple_view);
333
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->enable_block_cursor_checkbutton), !config.cursor_type);
334
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->enable_auxilary_calendars_checkbutton), config.enable_auxilary_calendars);
335
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->strikethrough_past_notes_checkbutton), config.strikethrough_past_notes);
337
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->di_show_current_time_checkbutton),
338
config.di_show_current_time);
339
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->di_show_day_number_checkbutton),
340
config.di_show_day_number);
341
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->di_show_marked_days_checkbutton),
342
config.di_show_marked_days);
343
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->di_show_week_number_checkbutton),
344
config.di_show_week_number);
345
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->di_show_weekend_days_checkbutton),
346
config.di_show_weekend_days);
347
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->di_show_moon_phase_checkbutton),
348
config.di_show_moon_phase);
349
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->di_show_notes_checkbutton),
350
config.di_show_notes);
351
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->di_show_zodiac_sign_checkbutton),
352
config.di_show_zodiac_sign);
354
if (config.enable_auxilary_calendars == TRUE) {
355
gtk_widget_show (appGUI->cal->aux_cal_expander);
357
gtk_widget_hide (appGUI->cal->aux_cal_expander);
360
calendar_cursor_settings_enable_disable(appGUI);
362
gtk_range_set_value (GTK_RANGE (appGUI->opt->cft_hscale), config.frame_cursor_thickness);
364
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->default_stock_icons_checkbutton),
365
config.default_stock_icons);
366
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->disable_underline_in_links_checkbutton),
367
config.disable_underline_links);
368
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->enable_tooltips_checkbutton),
369
config.enable_tooltips);
370
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->enable_systray_checkbutton),
371
config.enable_systray);
372
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->start_minimised_checkbutton),
373
config.start_minimised_in_systray);
374
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->remember_latest_tab_checkbutton),
375
config.remember_latest_tab);
376
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->tasks_enable_rules_hint_checkbutton),
377
config.tasks_rules_hint);
378
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->ct_bold_items_checkbutton),
379
config.tasks_high_in_bold);
380
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->ct_hide_items_checkbutton),
381
config.hide_completed);
382
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->ct_delete_items_checkbutton),
383
config.delete_completed);
384
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->vc_due_date_checkbutton),
385
config.visible_due_date_column);
386
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->vc_priority_checkbutton),
387
config.visible_priority_column);
388
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->vc_category_checkbutton),
389
config.visible_category_column);
390
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->contacts_enable_rules_hint_checkbutton),
391
config.contacts_rules_hint);
392
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->contacts_select_first_entry_checkbutton),
393
config.show_after_search);
394
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->contacts_hide_group_column_checkbutton),
395
config.hide_group_column);
397
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->hide_calendar_checkbutton),
398
config.hide_calendar);
399
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->hide_tasks_checkbutton),
401
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->hide_contacts_checkbutton),
402
config.hide_contacts);
404
#ifdef HAVE_LIBGRINGOTTS
405
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->hide_notes_checkbutton),
407
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->notes_enable_rules_hint_checkbutton),
408
config.notes_rules_hint);
409
#endif /* HAVE_LIBGRINGOTTS */
411
gtk_tree_view_column_set_visible (appGUI->cnt->contacts_columns[COLUMN_GROUP], !config.hide_group_column);
413
gtk_entry_set_text (GTK_ENTRY(appGUI->opt->day_name_font_entry), config.day_name_font);
414
gtk_entry_set_text (GTK_ENTRY(appGUI->opt->calendar_font_entry), config.calendar_font);
415
gtk_entry_set_text (GTK_ENTRY(appGUI->opt->notes_font_entry), config.notes_font);
417
gtk_entry_set_text (GTK_ENTRY(appGUI->opt->ti_font_entry), config.task_info_font);
419
#ifdef HAVE_LIBGRINGOTTS
420
gtk_entry_set_text (GTK_ENTRY(appGUI->opt->editor_font_entry), config.notes_editor_font);
421
#endif /* HAVE_LIBGRINGOTTS */
423
gtk_entry_set_text (GTK_ENTRY(appGUI->opt->entry_web_browser), config.web_browser);
424
gtk_entry_set_text (GTK_ENTRY(appGUI->opt->entry_email_client), config.email_client);
426
gtk_spin_button_set_value (GTK_SPIN_BUTTON(appGUI->opt->name_font_size_spinbutton), config.name_font_size);
427
gtk_spin_button_set_value (GTK_SPIN_BUTTON(appGUI->opt->tags_font_size_spinbutton), config.tags_font_size);
429
appGUI->opt->callback_active = TRUE;
431
if (config.hide_calendar) {
432
gtk_widget_hide (appGUI->opt->calendar_vbox);
433
gtk_widget_hide (appGUI->opt->calendar_options_radiobutton);
435
if (config.hide_tasks) {
436
gtk_widget_hide (appGUI->opt->tasks_vbox);
437
gtk_widget_hide (appGUI->opt->tasks_options_radiobutton);
439
if (config.hide_contacts) {
440
gtk_widget_hide (appGUI->opt->contacts_vbox);
441
gtk_widget_hide (appGUI->opt->contacts_options_radiobutton);
443
#ifdef HAVE_LIBGRINGOTTS
444
if (config.hide_notes) {
445
gtk_widget_hide (appGUI->opt->notes_vbox);
446
gtk_widget_hide (appGUI->opt->notes_options_radiobutton);
448
#endif /* HAVE_LIBGRINGOTTS */
450
switch(options_get_first_active_page (appGUI)) {
451
case OPT_PAGE_CALENDAR:
452
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->calendar_options_radiobutton), TRUE);
455
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->tasks_options_radiobutton), TRUE);
457
case OPT_PAGE_CONTACTS:
458
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->contacts_options_radiobutton), TRUE);
460
#ifdef HAVE_LIBGRINGOTTS
462
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->notes_options_radiobutton), TRUE);
464
#endif /* HAVE_LIBGRINGOTTS */
467
gtk_widget_show (appGUI->opt->calendar_vbox);
469
options_button_released_cb (NULL, appGUI);
472
/*------------------------------------------------------------------------------*/