update copyright year
[claws.git] / src / plugins / vcalendar / vcal_prefs.c
index 16c7f7669a2f5c5ca1487895eb26d515dfd32d17..5877a06f6c60eabc083c6d898bac5eeb8b04b221 100644 (file)
@@ -1,7 +1,6 @@
 /*
- * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2007 Colin Leroy <colin@colino.net> and 
- * the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2021 the Claws Mail team and Colin Leroy
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -141,7 +140,8 @@ static void set_auth_sensitivity(struct VcalendarPage *page)
            (!strncmp(export_path, "http://", 7) ||
             !strncmp(export_path, "ftp://", 6) ||
             !strncmp(export_path, "https://", 8) ||
-            !strncmp(export_path, "sftp://", 5) ||
+            !strncmp(export_path, "ftps://", 7) ||
+            !strncmp(export_path, "sftp://", 7) ||
             !strncmp(export_path, "webcal://", 9) ||
             !strncmp(export_path, "webcals://", 10))) {
                gtk_widget_set_sensitive(page->export_user_label, TRUE);        
@@ -158,7 +158,8 @@ static void set_auth_sensitivity(struct VcalendarPage *page)
            (!strncmp(export_freebusy_path, "http://", 7) ||
             !strncmp(export_freebusy_path, "ftp://", 6) ||
             !strncmp(export_freebusy_path, "https://", 8) ||
-            !strncmp(export_freebusy_path, "sftp://", 5) ||
+            !strncmp(export_freebusy_path, "ftps://", 7) ||
+            !strncmp(export_freebusy_path, "sftp://", 7) ||
             !strncmp(export_freebusy_path, "webcal://", 9) ||
             !strncmp(export_freebusy_path, "webcals://", 10))) {
                gtk_widget_set_sensitive(page->export_freebusy_user_label, TRUE);       
@@ -249,7 +250,7 @@ static void vcal_prefs_create_widget_func(PrefsPage * _page,
        
        GtkWidget *frame_alert;
        GtkWidget *alert_enable_checkbtn;
-       GtkObject *alert_enable_spinbtn_adj;
+       GtkAdjustment *alert_enable_spinbtn_adj;
        GtkWidget *alert_enable_h_spinbtn;
        GtkWidget *alert_enable_m_spinbtn;
        GtkWidget *label_alert_enable;
@@ -287,22 +288,22 @@ static void vcal_prefs_create_widget_func(PrefsPage * _page,
        gchar *export_pass = NULL;
        gchar *export_freebusy_pass = NULL;
 
-       vbox1 = gtk_vbox_new (FALSE, VSPACING);
+       vbox1 = gtk_box_new(GTK_ORIENTATION_VERTICAL, VSPACING);
        gtk_widget_show (vbox1);
        gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
 
-       vbox2 = gtk_vbox_new (FALSE, 4);
+       vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
        gtk_widget_show (vbox2);
        gtk_box_pack_start(GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0);
 
 
 /* alert stuff */
        PACK_FRAME(vbox2, frame_alert, _("Reminders"));
-       vbox3 = gtk_vbox_new (FALSE, 8);
+       vbox3 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8);
        gtk_widget_show (vbox3);
        gtk_container_add (GTK_CONTAINER (frame_alert), vbox3);
        gtk_container_set_border_width (GTK_CONTAINER (vbox3), VBOX_BORDER);
-       hbox1 = gtk_hbox_new (FALSE, 8);
+       hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
        gtk_widget_show (hbox1);
        gtk_box_pack_start(GTK_BOX (vbox3), hbox1, TRUE, TRUE, 0);
 
@@ -359,13 +360,13 @@ static void vcal_prefs_create_widget_func(PrefsPage * _page,
 /* calendar export */
 /* export enable + path stuff */
        PACK_FRAME(vbox2, frame_export, _("Calendar export"));
-       vbox3 = gtk_vbox_new (FALSE, 8);
+       vbox3 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8);
        gtk_widget_show (vbox3);
        gtk_container_add (GTK_CONTAINER (frame_export), vbox3);
        gtk_container_set_border_width (GTK_CONTAINER (vbox3), VBOX_BORDER);
 
 /* export path */
-       hbox2 = gtk_hbox_new (FALSE, 8);
+       hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
        gtk_widget_show (hbox2);
        gtk_box_pack_start(GTK_BOX (vbox3), hbox2, TRUE, TRUE, 0);
 
@@ -384,7 +385,7 @@ static void vcal_prefs_create_widget_func(PrefsPage * _page,
                              "(http://server/path/file.ics)"));
 
 /* export auth */
-       hbox2 = gtk_hbox_new (FALSE, 8);
+       hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
        gtk_widget_show (hbox2);
        gtk_box_pack_start(GTK_BOX (vbox3), hbox2, TRUE, TRUE, 0);
 
@@ -406,7 +407,7 @@ static void vcal_prefs_create_widget_func(PrefsPage * _page,
        gtk_box_pack_start(GTK_BOX (hbox2), export_pass_entry, FALSE, FALSE, 0);
 
 /* export subscriptions too */
-       hbox2 = gtk_hbox_new (FALSE, 8);
+       hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
        gtk_widget_show (hbox2);
        gtk_box_pack_start(GTK_BOX (vbox3), hbox2, TRUE, TRUE, 0);
 
@@ -416,7 +417,7 @@ static void vcal_prefs_create_widget_func(PrefsPage * _page,
        SET_TOGGLE_SENSITIVITY(export_enable_checkbtn, export_subs_checkbtn);
 
 /* run-command after export stuff */
-       hbox3 = gtk_hbox_new (FALSE, 8);
+       hbox3 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
        gtk_widget_show (hbox3);
        gtk_box_pack_start(GTK_BOX (vbox3), hbox3, TRUE, TRUE, 0);
 
@@ -446,7 +447,7 @@ static void vcal_prefs_create_widget_func(PrefsPage * _page,
        gtk_entry_set_text(GTK_ENTRY(export_command_entry), 
                        vcalprefs.export_command);
 
-       hbox3 = gtk_hbox_new (FALSE, 8);
+       hbox3 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
        gtk_widget_show (hbox3);
        gtk_box_pack_start(GTK_BOX (vbox3), hbox3, TRUE, TRUE, 0);
        register_orage_checkbtn = gtk_check_button_new_with_label(_("Register Claws' calendar in XFCE's Orage clock"));
@@ -461,7 +462,7 @@ static void vcal_prefs_create_widget_func(PrefsPage * _page,
        gtk_widget_show (register_orage_checkbtn);
        gtk_box_pack_start(GTK_BOX (hbox3), register_orage_checkbtn, TRUE, TRUE, 0);
 
-       hbox3 = gtk_hbox_new (FALSE, 8);
+       hbox3 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
        gtk_widget_show (hbox3);
        gtk_box_pack_start(GTK_BOX (vbox3), hbox3, TRUE, TRUE, 0);
        calendar_server_checkbtn = gtk_check_button_new_with_label(_("Export as GNOME shell calendar server"));
@@ -477,13 +478,13 @@ static void vcal_prefs_create_widget_func(PrefsPage * _page,
 /* freebusy export */
 /* export enable + path stuff */
        PACK_FRAME(vbox2, frame_freebusy_export, _("Free/Busy information"));
-       vbox3 = gtk_vbox_new (FALSE, 8);
+       vbox3 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8);
        gtk_widget_show (vbox3);
        gtk_container_add (GTK_CONTAINER (frame_freebusy_export), vbox3);
        gtk_container_set_border_width (GTK_CONTAINER (vbox3), VBOX_BORDER);
 
 /* export */
-       hbox2 = gtk_hbox_new (FALSE, 8);
+       hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
        gtk_widget_show (hbox2);
        gtk_box_pack_start(GTK_BOX (vbox3), hbox2, TRUE, TRUE, 0);
 
@@ -503,7 +504,7 @@ static void vcal_prefs_create_widget_func(PrefsPage * _page,
                              "(http://server/path/file.ifb)"));
 
 /* auth */
-       hbox2 = gtk_hbox_new (FALSE, 8);
+       hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
        gtk_widget_show (hbox2);
        gtk_box_pack_start(GTK_BOX (vbox3), hbox2, TRUE, TRUE, 0);
 
@@ -525,7 +526,7 @@ static void vcal_prefs_create_widget_func(PrefsPage * _page,
        gtk_box_pack_start(GTK_BOX (hbox2), export_freebusy_pass_entry, FALSE, FALSE, 0);
 
 /* run-command after export stuff */
-       hbox3 = gtk_hbox_new (FALSE, 8);
+       hbox3 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
        gtk_widget_show (hbox3);
        gtk_box_pack_start(GTK_BOX (vbox3), hbox3, TRUE, TRUE, 0);
 
@@ -551,7 +552,7 @@ static void vcal_prefs_create_widget_func(PrefsPage * _page,
                vcalprefs.freebusy_get_url = g_strdup("");
 
 /* free/busy import */
-       hbox2 = gtk_hbox_new (FALSE, 8);
+       hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
        gtk_widget_show (hbox2);
        gtk_box_pack_start(GTK_BOX (vbox3), hbox2, TRUE, TRUE, 0);
 
@@ -578,19 +579,19 @@ static void vcal_prefs_create_widget_func(PrefsPage * _page,
                        vcalprefs.freebusy_get_url);
 
 /* SSL frame */
-       PACK_FRAME(vbox2, frame_ssl_options, _("SSL options"));
-       vbox3 = gtk_vbox_new (FALSE, 8);
+       PACK_FRAME(vbox2, frame_ssl_options, _("TLS options"));
+       vbox3 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8);
        gtk_widget_show (vbox3);
        gtk_container_add (GTK_CONTAINER (frame_ssl_options), vbox3);
        gtk_container_set_border_width (GTK_CONTAINER (vbox3), VBOX_BORDER);
 
 /* SSL peer verification */
-       hbox2 = gtk_hbox_new (FALSE, 8);
+       hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
        gtk_widget_show (hbox2);
        gtk_box_pack_start(GTK_BOX (vbox3), hbox2, TRUE, TRUE, 0);
 
        ssl_verify_peer_checkbtn = gtk_check_button_new_with_label(
-               _("Verify SSL certificate validity"));
+               _("Verify TLS certificate validity"));
        gtk_widget_show(ssl_verify_peer_checkbtn);
        gtk_box_pack_start(GTK_BOX (hbox2), ssl_verify_peer_checkbtn, FALSE, FALSE, 0);
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ssl_verify_peer_checkbtn), 
@@ -772,7 +773,7 @@ void vcal_prefs_init(void)
        gboolean passwords_migrated = FALSE;
 
        path[0] = _("Plugins");
-       path[1] = _("vCalendar");
+       path[1] = _(PLUGIN_NAME);
        path[2] = NULL;
 
        prefs_set_default(param);
@@ -783,7 +784,7 @@ void vcal_prefs_init(void)
        /* Move passwords that are still in main config to password store. */
        if (vcalprefs.export_pass != NULL &&
                        strlen(vcalprefs.export_pass) > 0) {
-               passwd_store_set(PWS_PLUGIN, "vCalendar", "export",
+               passwd_store_set(PWS_PLUGIN, PLUGIN_NAME, "export",
                                vcalprefs.export_pass, TRUE);
                passwords_migrated = TRUE;
                memset(vcalprefs.export_pass, 0, strlen(vcalprefs.export_pass));
@@ -791,7 +792,7 @@ void vcal_prefs_init(void)
        }
        if (vcalprefs.export_freebusy_pass != NULL &&
                        strlen(vcalprefs.export_freebusy_pass) > 0) {
-               passwd_store_set(PWS_PLUGIN, "vCalendar", "export",
+               passwd_store_set(PWS_PLUGIN, PLUGIN_NAME, "export",
                                vcalprefs.export_freebusy_pass, TRUE);
                passwords_migrated = TRUE;
                memset(vcalprefs.export_freebusy_pass, 0, strlen(vcalprefs.export_freebusy_pass));