"Fossies" - the Fresh Open Source Software Archive

Member "sitecopy-0.16.6/gnome/site_widgets.c" (24 Apr 2005, 34649 Bytes) of archive /linux/www/sitecopy-0.16.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "site_widgets.c" see the Fossies "Dox" file reference documentation.

    1 /* 
    2  *      XSitecopy, for managing remote web sites with a GNOME interface.
    3  *      Copyright (C) 2000, Lee Mallabone <lee@fonicmonkey.net>
    4  *                                                                        
    5  *      This program is free software; you can redistribute it and/or modify
    6  *      it under the terms of the GNU General Public License as published by
    7  *      the Free Software Foundation; either version 2 of the License, or
    8  *      (at your option) any later version.
    9  *     
   10  *      This program is distributed in the hope that it will be useful,
   11  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
   12  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13  *      GNU General Public License for more details.
   14  *     
   15  *      You should have received a copy of the GNU General Public License
   16  *      along with this program; if not, write to the Free Software
   17  *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   18  *  
   19  */
   20 
   21 #include "site_widgets.h"
   22 
   23 extern struct site *all_sites;
   24 extern GtkWidget *site_list, *status_bar;
   25 
   26 extern GtkWidget *main_area_box, *area_data;
   27 extern GtkWidget *the_tree;
   28 
   29 extern struct site *selected_site;
   30 extern gboolean rcfile_saved;
   31 struct slist_gui *the_excludes, *the_ignores, *ascii_files;
   32 GtkWidget *main_panel;
   33 int last_notepage = 0;
   34 
   35 /* These widgets are global due to the freak deadlock bugs seen when using my
   36  * `get_widget' macro to retrieve per-instance pointers.
   37  */
   38 
   39 GtkWidget *sym_follow;
   40 GtkWidget *sym_ignore;
   41 GtkWidget *sym_maintain;
   42 GtkWidget *port;
   43 GtkWidget *perms_ignore;
   44 GtkWidget *perms_exec;
   45 GtkWidget *perms_all;
   46 GtkWidget *ftp_mode;
   47 GtkWidget *nooverwrite;
   48 
   49 void record_notepage(GtkNotebook * note, GtkNotebookPage * page,
   50              gint pagenum, gpointer data)
   51 {
   52 /*    last_notepage = pagenum;*/
   53     NE_DEBUG(DEBUG_GNOME, "Recording notebook page number, %d.\n", pagenum);
   54 }
   55 
   56 GtkWidget *
   57  make_site_info_area(struct site *the_site)
   58 {
   59     int files_on_site;
   60     char *tmp;
   61     gboolean current_rcfile_saved;
   62     
   63     GtkWidget *container;
   64     GtkWidget *vbox21;
   65     GtkWidget *frame14;
   66     GtkWidget *table4;
   67     GtkWidget *label33;
   68     GtkWidget *label34;
   69     GtkWidget *label35;
   70     GtkWidget *username;
   71     GtkWidget *combo_entry3;
   72     GtkWidget *label36;
   73     GtkWidget *password;
   74     GtkWidget *hbox15;
   75     GtkWidget *servername;
   76     GtkWidget *combo_entry2;
   77     GtkWidget *label50;
   78     GtkObject *port_adj;
   79     GtkWidget *hbox8;
   80     GSList *protocol_group = NULL;
   81     GtkWidget *proto_ftp;
   82     GtkWidget *proto_dav;
   83     GtkWidget *stats_frame;
   84     GtkWidget *stats_label;
   85     GtkWidget *label26;
   86     GtkWidget *vbox22;
   87     GtkWidget *frame16;
   88     GtkWidget *table5;
   89     GtkWidget *label40;
   90     GtkWidget *url;
   91     GtkWidget *remote_dir;
   92     GtkWidget *combo_entry5;
   93     GtkWidget *label38;
   94     GtkWidget *label39;
   95     GtkWidget *local_dir;
   96     GtkWidget *combo_entry4;
   97     GtkWidget *frame17;
   98     GtkWidget *table6;
   99     GtkWidget *label41;
  100     GtkWidget *label42;
  101     GtkWidget *label43;
  102     GtkWidget *hbox10;
  103     GSList *sym_link_group = NULL;
  104     GtkWidget *hbox9;
  105     GSList *perms_group = NULL;
  106     GtkWidget *hbox11;
  107     GtkWidget *detection_mode;
  108     GtkWidget *detection_button;
  109     GtkWidget *label27;
  110     GtkWidget *frame18;
  111     GtkWidget *vbox23;
  112     GtkWidget *nodelete;
  113     GtkWidget *checkmoved;
  114     GtkWidget *lowercase;
  115     GtkWidget *use_safemode;
  116     GtkWidget *label28;
  117     GtkWidget *vbox24;
  118     GtkWidget *scrolledwindow2;
  119 
  120     GtkWidget *label44;
  121     GtkWidget *hbox12;
  122     GtkWidget *label45;
  123     GtkWidget *exclude_gentry;
  124     GtkWidget *excludes_new;
  125     GtkWidget *exclude_remove;
  126     GtkWidget *label30;
  127     GtkWidget *vbox25;
  128     GtkWidget *scrolledwindow3;
  129 
  130     GtkWidget *label46;
  131     GtkWidget *hbox13;
  132     GtkWidget *label47;
  133 
  134     GtkWidget *ascii_gentry;
  135     GtkWidget *ascii_new;
  136     GtkWidget *ascii_remove;
  137     GtkWidget *label31;
  138     GtkWidget *vbox26;
  139     GtkWidget *scrolledwindow4;
  140     GtkWidget *label48;
  141     GtkWidget *hbox14;
  142     GtkWidget *label49;
  143     GtkWidget *ignores_gentry;
  144     GtkWidget *ignores_label;
  145     GtkWidget *ignore_new;
  146     GtkWidget *ignore_remove;
  147 
  148     
  149     current_rcfile_saved = rcfile_saved;
  150     
  151     main_panel = gtk_hbox_new(FALSE, 0);
  152 
  153     container = gtk_notebook_new();
  154     gtk_widget_show(container);
  155     gtk_container_add(GTK_CONTAINER(main_panel), container);
  156 
  157     vbox21 = gtk_vbox_new(FALSE, 4);
  158     gtk_widget_show(vbox21);
  159     gtk_container_add(GTK_CONTAINER(container), vbox21);
  160     gtk_container_set_border_width(GTK_CONTAINER(vbox21), 3);
  161 
  162     frame14 = gtk_frame_new("Server Details");
  163     gtk_widget_show(frame14);
  164     gtk_box_pack_start(GTK_BOX(vbox21), frame14, TRUE, TRUE, 0);
  165 
  166     table4 = gtk_table_new(4, 2, FALSE);
  167 
  168     gtk_widget_show(table4);
  169     gtk_container_add(GTK_CONTAINER(frame14), table4);
  170     gtk_container_set_border_width(GTK_CONTAINER(table4), 5);
  171     gtk_table_set_row_spacings(GTK_TABLE(table4), 2);
  172     gtk_table_set_col_spacings(GTK_TABLE(table4), 2);
  173 
  174     label33 = gtk_label_new("Host Name: ");
  175     gtk_widget_show(label33);
  176     gtk_table_attach(GTK_TABLE(table4), label33, 0, 1, 0, 1,
  177              (GtkAttachOptions) (GTK_FILL),
  178              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  179     gtk_label_set_justify(GTK_LABEL(label33), GTK_JUSTIFY_LEFT);
  180     gtk_misc_set_alignment(GTK_MISC(label33), 0, 0.5);
  181 
  182     label34 = gtk_label_new("Protocol: ");
  183     gtk_widget_show(label34);
  184     gtk_table_attach(GTK_TABLE(table4), label34, 0, 1, 1, 2,
  185              (GtkAttachOptions) (GTK_FILL),
  186              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  187     gtk_label_set_justify(GTK_LABEL(label34), GTK_JUSTIFY_LEFT);
  188     gtk_misc_set_alignment(GTK_MISC(label34), 0, 0.5);
  189 
  190     label35 = gtk_label_new("Username: ");
  191 
  192     gtk_widget_show(label35);
  193     gtk_table_attach(GTK_TABLE(table4), label35, 0, 1, 2, 3,
  194              (GtkAttachOptions) (GTK_FILL),
  195              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  196     gtk_label_set_justify(GTK_LABEL(label35), GTK_JUSTIFY_LEFT);
  197     gtk_misc_set_alignment(GTK_MISC(label35), 0, 0.5);
  198 
  199     username = gnome_entry_new("user_history");
  200     gtk_widget_show(username);
  201     gtk_table_attach(GTK_TABLE(table4), username, 1, 2, 2, 3,
  202              (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
  203              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  204 
  205     combo_entry3 = gnome_entry_gtk_entry(GNOME_ENTRY(username));
  206     gtk_entry_set_text(GTK_ENTRY(combo_entry3), selected_site->server.username);
  207     gtk_widget_show(combo_entry3);
  208 
  209     label36 = gtk_label_new("Password: ");
  210     gtk_widget_show(label36);
  211     gtk_table_attach(GTK_TABLE(table4), label36, 0, 1, 3, 4,
  212              (GtkAttachOptions) (GTK_SHRINK | GTK_FILL),
  213              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  214     gtk_label_set_justify(GTK_LABEL(label36), GTK_JUSTIFY_LEFT);
  215     gtk_misc_set_alignment(GTK_MISC(label36), 0, 0.5);
  216 
  217     password = gtk_entry_new();
  218     gtk_entry_set_text(GTK_ENTRY(password), selected_site->server.password);
  219     gtk_entry_set_visibility(GTK_ENTRY(password), FALSE);
  220 
  221     gtk_widget_show(password);
  222     gtk_table_attach(GTK_TABLE(table4), password, 1, 2, 3, 4,
  223              (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
  224              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  225 
  226     hbox15 = gtk_hbox_new(FALSE, 3);
  227     gtk_widget_show(hbox15);
  228     gtk_table_attach(GTK_TABLE(table4), hbox15, 1, 2, 0, 1,
  229              (GtkAttachOptions) (GTK_FILL),
  230              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  231 
  232     servername = gnome_entry_new("host_history");
  233     gtk_widget_show(servername);
  234     gtk_box_pack_start(GTK_BOX(hbox15), servername, TRUE, TRUE, 0);
  235 
  236     combo_entry2 = gnome_entry_gtk_entry(GNOME_ENTRY(servername));
  237     gtk_entry_set_text(GTK_ENTRY(combo_entry2), selected_site->server.hostname);
  238     gtk_widget_show(combo_entry2);
  239 
  240     label50 = gtk_label_new("Port: ");
  241     gtk_widget_show(label50);
  242     gtk_box_pack_start(GTK_BOX(hbox15), label50, FALSE, FALSE, 0);
  243 
  244     port_adj = gtk_adjustment_new(65532, 1, 65536, 1, 10, 10);
  245     port = gtk_spin_button_new(GTK_ADJUSTMENT(port_adj), 1, 0);
  246 
  247     gtk_widget_show(port);
  248     gtk_box_pack_start(GTK_BOX(hbox15), port, TRUE, TRUE, 0);
  249     gtk_widget_set_usize(port, 12, -2);
  250     gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(port), TRUE);
  251     gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(port), TRUE);
  252 
  253     hbox8 = gtk_hbox_new(FALSE, 0);
  254     gtk_widget_show(hbox8);
  255     gtk_table_attach(GTK_TABLE(table4), hbox8, 1, 2, 1, 2,
  256              (GtkAttachOptions) (GTK_FILL),
  257              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  258 
  259     proto_ftp = gtk_radio_button_new_with_label(protocol_group, "FTP");
  260     gtk_signal_connect(GTK_OBJECT(proto_ftp), "toggled",
  261                GTK_SIGNAL_FUNC(change_protocol),
  262                "ftp");
  263 
  264     protocol_group = gtk_radio_button_group(GTK_RADIO_BUTTON(proto_ftp));
  265     gtk_widget_show(proto_ftp);
  266     gtk_box_pack_start(GTK_BOX(hbox8), proto_ftp, FALSE, FALSE, 0);
  267     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(proto_ftp), TRUE);
  268 #ifdef USE_DAV
  269     proto_dav = gtk_radio_button_new_with_label(protocol_group, "WebDAV");
  270     gtk_signal_connect(GTK_OBJECT(proto_dav), "toggled",
  271                GTK_SIGNAL_FUNC(change_protocol),
  272                "dav");
  273     protocol_group = gtk_radio_button_group(GTK_RADIO_BUTTON(proto_dav));
  274 
  275     gtk_widget_show(proto_dav);
  276     gtk_box_pack_start(GTK_BOX(hbox8), proto_dav, FALSE, FALSE, 0);
  277 #endif              /* USE_DAV */
  278     stats_frame = gtk_frame_new("Site Statistics");
  279     gtk_widget_show(stats_frame);
  280     gtk_box_pack_start(GTK_BOX(vbox21), stats_frame, TRUE, TRUE, 0);
  281 
  282     stats_label = gtk_label_new("\n\n\n\n\n");
  283     files_on_site = selected_site->numnew + selected_site->numchanged + selected_site->numdeleted + selected_site->nummoved + selected_site->numunchanged;
  284 
  285     if (!selected_site->remote_is_different) {
  286     tmp = g_strdup_printf("\nThe local site contains %d files, none of which\nhave changed since the last update.\n\n", files_on_site);
  287     } else {
  288     tmp = g_strdup_printf("The local site has changed since the last update:\n%d files have been added, %d files have changed,\n%d files have been deleted, %d files have been moved,\n%d remain unchanged. There are currently %d files on the local site.",
  289                   selected_site->numnew,
  290                   selected_site->numchanged,
  291                   selected_site->numdeleted,
  292                   selected_site->nummoved,
  293                   selected_site->numunchanged,
  294                   files_on_site);
  295     }
  296     gtk_label_set(GTK_LABEL(stats_label), tmp);
  297 
  298     gtk_widget_show(stats_label);
  299     gtk_container_add(GTK_CONTAINER(stats_frame), stats_label);
  300 
  301     label26 = gtk_label_new("Basic Details");
  302     gtk_widget_show(label26);
  303     gtk_notebook_set_tab_label(GTK_NOTEBOOK(container), gtk_notebook_get_nth_page(GTK_NOTEBOOK(container), 0), label26);
  304 
  305     vbox22 = gtk_vbox_new(FALSE, 4);
  306     gtk_widget_show(vbox22);
  307     gtk_container_add(GTK_CONTAINER(container), vbox22);
  308     gtk_container_set_border_width(GTK_CONTAINER(vbox22), 3);
  309 
  310     frame16 = gtk_frame_new("Locations");
  311     gtk_widget_show(frame16);
  312     gtk_box_pack_start(GTK_BOX(vbox22), frame16, TRUE, TRUE, 0);
  313 
  314     table5 = gtk_table_new(3, 2, FALSE);
  315     gtk_widget_show(table5);
  316     gtk_container_add(GTK_CONTAINER(frame16), table5);
  317     gtk_container_set_border_width(GTK_CONTAINER(table5), 5);
  318     gtk_table_set_row_spacings(GTK_TABLE(table5), 2);
  319     gtk_table_set_col_spacings(GTK_TABLE(table5), 2);
  320 
  321     label40 = gtk_label_new("Root URL of the remote site: ");
  322 
  323     gtk_widget_show(label40);
  324     gtk_table_attach(GTK_TABLE(table5), label40, 0, 1, 2, 3,
  325              (GtkAttachOptions) (GTK_FILL),
  326              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  327     gtk_label_set_justify(GTK_LABEL(label40), GTK_JUSTIFY_LEFT);
  328     gtk_misc_set_alignment(GTK_MISC(label40), 0, 0.5);
  329 
  330     url = gtk_entry_new();
  331     if (selected_site->url)
  332     gtk_entry_set_text(GTK_ENTRY(url), selected_site->url);
  333     gtk_widget_show(url);
  334     gtk_table_attach(GTK_TABLE(table5), url, 1, 2, 2, 3,
  335              (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
  336              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  337 
  338     remote_dir = gnome_entry_new(NULL);
  339 
  340     gtk_widget_show(remote_dir);
  341     gtk_table_attach(GTK_TABLE(table5), remote_dir, 1, 2, 1, 2,
  342              (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
  343              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  344 
  345     combo_entry5 = gnome_entry_gtk_entry(GNOME_ENTRY(remote_dir));
  346     if (selected_site->remote_root_user)
  347     gtk_entry_set_text(GTK_ENTRY(combo_entry5),
  348                selected_site->remote_root_user);
  349 
  350     gtk_widget_show(combo_entry5);
  351 
  352     label38 = gtk_label_new("Directory for remote files: ");
  353 
  354     gtk_widget_show(label38);
  355     gtk_table_attach(GTK_TABLE(table5), label38, 0, 1, 1, 2,
  356              (GtkAttachOptions) (GTK_FILL),
  357              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  358     gtk_label_set_justify(GTK_LABEL(label38), GTK_JUSTIFY_LEFT);
  359     gtk_misc_set_alignment(GTK_MISC(label38), 0, 0.5);
  360 
  361     label39 = gtk_label_new("Directory for local files: ");
  362     gtk_widget_show(label39);
  363     gtk_table_attach(GTK_TABLE(table5), label39, 0, 1, 0, 1,
  364              (GtkAttachOptions) (GTK_FILL),
  365              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  366     gtk_label_set_justify(GTK_LABEL(label39), GTK_JUSTIFY_LEFT);
  367     gtk_misc_set_alignment(GTK_MISC(label39), 0, 0.5);
  368 
  369     local_dir = gnome_file_entry_new(NULL, NULL);
  370     gtk_widget_show(local_dir);
  371     gtk_table_attach(GTK_TABLE(table5), local_dir, 1, 2, 0, 1,
  372              (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
  373              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  374 
  375     combo_entry4 = gnome_file_entry_gtk_entry(GNOME_FILE_ENTRY(local_dir));
  376     if (selected_site->local_root_user)
  377     gtk_entry_set_text(GTK_ENTRY(combo_entry4),
  378                selected_site->local_root_user);
  379     gtk_widget_show(combo_entry4);
  380 
  381     frame17 = gtk_frame_new("File Attributes");
  382 
  383     gtk_widget_show(frame17);
  384     gtk_box_pack_start(GTK_BOX(vbox22), frame17, TRUE, TRUE, 0);
  385 
  386     table6 = gtk_table_new(3, 2, FALSE);
  387     gtk_widget_show(table6);
  388     gtk_container_add(GTK_CONTAINER(frame17), table6);
  389     gtk_container_set_border_width(GTK_CONTAINER(table6), 5);
  390     gtk_table_set_row_spacings(GTK_TABLE(table6), 2);
  391     gtk_table_set_col_spacings(GTK_TABLE(table6), 2);
  392 
  393     label41 = gtk_label_new("Permissions mode: ");
  394 
  395     gtk_widget_show(label41);
  396     gtk_table_attach(GTK_TABLE(table6), label41, 0, 1, 0, 1,
  397              (GtkAttachOptions) (GTK_FILL),
  398              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  399     gtk_label_set_justify(GTK_LABEL(label41), GTK_JUSTIFY_LEFT);
  400     gtk_misc_set_alignment(GTK_MISC(label41), 0, 0.5);
  401 
  402     label42 = gtk_label_new("Symbolic links: ");
  403 
  404     gtk_widget_show(label42);
  405     gtk_table_attach(GTK_TABLE(table6), label42, 0, 1, 1, 2,
  406              (GtkAttachOptions) (GTK_FILL),
  407              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  408     gtk_label_set_justify(GTK_LABEL(label42), GTK_JUSTIFY_LEFT);
  409     gtk_misc_set_alignment(GTK_MISC(label42), 0, 0.5);
  410 
  411     label43 = gtk_label_new("Detect changes using: ");
  412 
  413     gtk_widget_show(label43);
  414     gtk_table_attach(GTK_TABLE(table6), label43, 0, 1, 2, 3,
  415              (GtkAttachOptions) (GTK_FILL),
  416              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  417     gtk_label_set_justify(GTK_LABEL(label43), GTK_JUSTIFY_LEFT);
  418     gtk_misc_set_alignment(GTK_MISC(label43), 0, 0.5);
  419 
  420     hbox10 = gtk_hbox_new(FALSE, 0);
  421 
  422     gtk_widget_show(hbox10);
  423     gtk_table_attach(GTK_TABLE(table6), hbox10, 1, 2, 1, 2,
  424              (GtkAttachOptions) (GTK_FILL),
  425              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  426 
  427     sym_follow = gtk_radio_button_new_with_label(sym_link_group, "Follow all");
  428     sym_link_group = gtk_radio_button_group(GTK_RADIO_BUTTON(sym_follow));
  429 
  430     gtk_widget_show(sym_follow);
  431     gtk_box_pack_start(GTK_BOX(hbox10), sym_follow, FALSE, FALSE, 0);
  432 
  433     sym_ignore = gtk_radio_button_new_with_label(sym_link_group, "Ignore links");
  434     sym_link_group = gtk_radio_button_group(GTK_RADIO_BUTTON(sym_ignore));
  435 
  436     gtk_widget_show(sym_ignore);
  437     gtk_box_pack_start(GTK_BOX(hbox10), sym_ignore, FALSE, FALSE, 0);
  438     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sym_ignore), TRUE);
  439 
  440     sym_maintain = gtk_radio_button_new_with_label(sym_link_group, "Maintain links");
  441     sym_link_group = gtk_radio_button_group(GTK_RADIO_BUTTON(sym_maintain));
  442 
  443     gtk_widget_show(sym_maintain);
  444     gtk_box_pack_start(GTK_BOX(hbox10), sym_maintain, FALSE, FALSE, 0);
  445 
  446     hbox9 = gtk_hbox_new(FALSE, 0);
  447 
  448     gtk_widget_show(hbox9);
  449     gtk_table_attach(GTK_TABLE(table6), hbox9, 1, 2, 0, 1,
  450              (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
  451              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  452 
  453     perms_ignore = gtk_radio_button_new_with_label(perms_group, "Ignore all");
  454     perms_group = gtk_radio_button_group(GTK_RADIO_BUTTON(perms_ignore));
  455 
  456     gtk_widget_show(perms_ignore);
  457     gtk_box_pack_start(GTK_BOX(hbox9), perms_ignore, FALSE, FALSE, 0);
  458 
  459     perms_exec = gtk_radio_button_new_with_label(perms_group, "Executables only");
  460     perms_group = gtk_radio_button_group(GTK_RADIO_BUTTON(perms_exec));
  461 
  462     gtk_widget_show(perms_exec);
  463     gtk_box_pack_start(GTK_BOX(hbox9), perms_exec, FALSE, FALSE, 0);
  464     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(perms_exec), TRUE);
  465 
  466     perms_all = gtk_radio_button_new_with_label(perms_group, "Maintain all");
  467     perms_group = gtk_radio_button_group(GTK_RADIO_BUTTON(perms_all));
  468 
  469     gtk_widget_show(perms_all);
  470 
  471     gtk_box_pack_start(GTK_BOX(hbox9), perms_all, FALSE, FALSE, 0);
  472 
  473     hbox11 = gtk_hbox_new(FALSE, 0);
  474     gtk_widget_show(hbox11);
  475     gtk_table_attach(GTK_TABLE(table6), hbox11, 1, 2, 2, 3,
  476              (GtkAttachOptions) (GTK_FILL | GTK_EXPAND),
  477              (GtkAttachOptions) (GTK_EXPAND), 0, 0);
  478     
  479     /* Detection mode status */
  480     detection_mode = gtk_label_new("");
  481     gtk_label_set_justify(GTK_LABEL(detection_mode), GTK_JUSTIFY_LEFT);
  482     gtk_misc_set_alignment(GTK_MISC(detection_mode), 0, 0.5);
  483 
  484     gtk_box_pack_start(GTK_BOX(hbox11), detection_mode, TRUE, TRUE, 4);
  485     gtk_widget_show(detection_mode);
  486     
  487     /* Change button */
  488     detection_button = gtk_button_new_with_label("Change");
  489     gtk_signal_connect(GTK_OBJECT(detection_button), "clicked",
  490                GTK_SIGNAL_FUNC(change_detection_mode), NULL);
  491     gtk_box_pack_start(GTK_BOX(hbox11), detection_button, TRUE, FALSE, 4);
  492     gtk_widget_show(detection_button);
  493     
  494 /* Added */
  495     if (the_site->state_method == state_timesize)
  496       gtk_label_set(GTK_LABEL(detection_mode), "File size & modification time");
  497     else
  498       gtk_label_set(GTK_LABEL(detection_mode), "File checksum");
  499 /*      gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(detect_sizetime), TRUE);*/
  500 /* End */
  501     label27 = gtk_label_new("Locations & Files");
  502 
  503     gtk_widget_show(label27);
  504     gtk_notebook_set_tab_label(GTK_NOTEBOOK(container), gtk_notebook_get_nth_page(GTK_NOTEBOOK(container), 1), label27);
  505 
  506     frame18 = gtk_frame_new("Operations checklist");
  507     gtk_widget_show(frame18);
  508     gtk_container_add(GTK_CONTAINER(container), frame18);
  509     gtk_container_set_border_width(GTK_CONTAINER(frame18), 3);
  510 
  511     vbox23 = gtk_vbox_new(FALSE, 0);
  512 
  513     gtk_widget_show(vbox23);
  514     gtk_container_add(GTK_CONTAINER(frame18), vbox23);
  515 
  516     nodelete = gtk_check_button_new_with_label("Delete a file from the server if it is deleted locally");
  517 
  518     gtk_widget_show(nodelete);
  519     gtk_box_pack_start(GTK_BOX(vbox23), nodelete, TRUE, FALSE, 0);
  520 
  521     checkmoved = gtk_check_button_new_with_label("Move a remote file if it is moved locally");
  522 
  523     gtk_widget_show(checkmoved);
  524     gtk_box_pack_start(GTK_BOX(vbox23), checkmoved, TRUE, FALSE, 0);
  525 
  526     nooverwrite = gtk_check_button_new_with_label("When uploading changed files, first delete them");
  527 
  528     gtk_widget_show(nooverwrite);
  529     gtk_box_pack_start(GTK_BOX(vbox23), nooverwrite, TRUE, FALSE, 0);
  530 
  531     lowercase = gtk_check_button_new_with_label("Convert all filenames to lowercase when uploading");
  532 
  533     gtk_widget_show(lowercase);
  534     gtk_box_pack_start(GTK_BOX(vbox23), lowercase, TRUE, FALSE, 0);
  535 
  536     use_safemode = gtk_check_button_new_with_label("Use \"safe mode\"");
  537 
  538     gtk_widget_show(use_safemode);
  539     gtk_box_pack_start(GTK_BOX(vbox23), use_safemode, TRUE, FALSE, 0);
  540 
  541     ftp_mode = gtk_check_button_new_with_label("Use passive mode FTP");
  542 
  543     gtk_widget_show(ftp_mode);
  544     gtk_box_pack_start(GTK_BOX(vbox23), ftp_mode, TRUE, FALSE, 0);
  545 
  546     label28 = gtk_label_new("Update Options");
  547 
  548     gtk_widget_show(label28);
  549     gtk_notebook_set_tab_label(GTK_NOTEBOOK(container), gtk_notebook_get_nth_page(GTK_NOTEBOOK(container), 2), label28);
  550 
  551     vbox24 = gtk_vbox_new(FALSE, 4);
  552 
  553     gtk_widget_show(vbox24);
  554     gtk_container_add(GTK_CONTAINER(container), vbox24);
  555     gtk_container_set_border_width(GTK_CONTAINER(vbox24), 3);
  556 
  557     scrolledwindow2 = gtk_scrolled_window_new(NULL, NULL);
  558 
  559     gtk_widget_show(scrolledwindow2);
  560     gtk_box_pack_start(GTK_BOX(vbox24), scrolledwindow2, TRUE, TRUE, 0);
  561     gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow2), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
  562 
  563     the_excludes = malloc(sizeof(struct slist_gui));
  564     the_excludes->data = the_site->excludes;
  565     the_excludes->type = list_exclude;
  566     the_excludes->chosen_row = -1;
  567     the_excludes->list = gtk_clist_new(1);
  568 
  569     gtk_widget_show(the_excludes->list);
  570     gtk_container_add(GTK_CONTAINER(scrolledwindow2), the_excludes->list);
  571     gtk_clist_set_column_width(GTK_CLIST(the_excludes->list), 0, 80);
  572     gtk_clist_column_titles_show(GTK_CLIST(the_excludes->list));
  573 
  574     label44 = gtk_label_new("Files and regular expressions to exclude from the site");
  575 
  576     gtk_widget_show(label44);
  577     gtk_clist_set_column_widget(GTK_CLIST(the_excludes->list), 0, label44);
  578 
  579     hbox12 = gtk_hbox_new(FALSE, 2);
  580 
  581     gtk_widget_show(hbox12);
  582     gtk_box_pack_start(GTK_BOX(vbox24), hbox12, FALSE, TRUE, 0);
  583     gtk_container_set_border_width(GTK_CONTAINER(hbox12), 1);
  584 
  585     label45 = gtk_label_new("Exclude: ");
  586 
  587     gtk_widget_show(label45);
  588     gtk_box_pack_start(GTK_BOX(hbox12), label45, FALSE, FALSE, 0);
  589 
  590     exclude_gentry = gnome_entry_new("excludes_history");
  591 
  592     gtk_widget_show(exclude_gentry);
  593     gtk_box_pack_start(GTK_BOX(hbox12), exclude_gentry, TRUE, TRUE, 0);
  594 
  595     the_excludes->entry = gnome_entry_gtk_entry(GNOME_ENTRY(exclude_gentry));
  596 
  597     gtk_widget_show(the_excludes->entry);
  598 
  599     excludes_new = gtk_button_new_with_label("New");
  600 
  601     gtk_widget_show(excludes_new);
  602     gtk_box_pack_start(GTK_BOX(hbox12), excludes_new, FALSE, FALSE, 0);
  603 
  604     exclude_remove = gtk_button_new_with_label("Remove");
  605 
  606     gtk_widget_show(exclude_remove);
  607     gtk_box_pack_start(GTK_BOX(hbox12), exclude_remove, FALSE, FALSE, 0);
  608 
  609     label30 = gtk_label_new("Excludes");
  610 
  611     gtk_widget_show(label30);
  612     gtk_notebook_set_tab_label(GTK_NOTEBOOK(container), gtk_notebook_get_nth_page(GTK_NOTEBOOK(container), 3), label30);
  613     /* Actually fill in the excludes list */
  614     populate_minilist(the_excludes);
  615     vbox25 = gtk_vbox_new(FALSE, 4);
  616 
  617     gtk_widget_show(vbox25);
  618     gtk_container_add(GTK_CONTAINER(container), vbox25);
  619     gtk_container_set_border_width(GTK_CONTAINER(vbox25), 3);
  620 
  621     scrolledwindow3 = gtk_scrolled_window_new(NULL, NULL);
  622 
  623     gtk_widget_show(scrolledwindow3);
  624     gtk_box_pack_start(GTK_BOX(vbox25), scrolledwindow3, TRUE, TRUE, 0);
  625     gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow3), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
  626 
  627     ascii_files = malloc(sizeof(struct slist_gui));
  628     ascii_files->data = the_site->asciis;
  629     ascii_files->type = list_ascii;
  630     ascii_files->chosen_row = -1;
  631     ascii_files->list = gtk_clist_new(1);
  632     gtk_widget_show(ascii_files->list);
  633     gtk_container_add(GTK_CONTAINER(scrolledwindow3), ascii_files->list);
  634     gtk_clist_set_column_width(GTK_CLIST(ascii_files->list), 0, 80);
  635     gtk_clist_column_titles_show(GTK_CLIST(ascii_files->list));
  636 
  637     label46 = gtk_label_new("Files to transfer in 'ASCII' mode");
  638 
  639     gtk_widget_show(label46);
  640     gtk_clist_set_column_widget(GTK_CLIST(ascii_files->list), 0, label46);
  641 
  642     hbox13 = gtk_hbox_new(FALSE, 2);
  643 
  644     gtk_widget_show(hbox13);
  645     gtk_box_pack_start(GTK_BOX(vbox25), hbox13, FALSE, TRUE, 0);
  646     gtk_container_set_border_width(GTK_CONTAINER(hbox13), 1);
  647 
  648     label47 = gtk_label_new("Filename: ");
  649     gtk_widget_show(label47);
  650     gtk_box_pack_start(GTK_BOX(hbox13), label47, FALSE, FALSE, 0);
  651 
  652     ascii_gentry = gnome_entry_new(NULL);
  653     gtk_widget_show(ascii_gentry);
  654     gtk_box_pack_start(GTK_BOX(hbox13), ascii_gentry, TRUE, TRUE, 0);
  655 
  656     ascii_files->entry = gnome_entry_gtk_entry(GNOME_ENTRY(ascii_gentry));
  657 
  658     gtk_widget_show(ascii_files->entry);
  659 
  660     ascii_new = gtk_button_new_with_label("New");
  661 
  662     gtk_widget_show(ascii_new);
  663     gtk_box_pack_start(GTK_BOX(hbox13), ascii_new, FALSE, FALSE, 0);
  664 
  665     ascii_remove = gtk_button_new_with_label("Remove");
  666 
  667     gtk_widget_show(ascii_remove);
  668     gtk_box_pack_start(GTK_BOX(hbox13), ascii_remove, FALSE, FALSE, 0);
  669 
  670     label31 = gtk_label_new("ASCII");
  671 
  672     gtk_widget_show(label31);
  673     gtk_notebook_set_tab_label(GTK_NOTEBOOK(container), gtk_notebook_get_nth_page(GTK_NOTEBOOK(container), 4), label31);
  674 
  675     populate_minilist(ascii_files);
  676 
  677     vbox26 = gtk_vbox_new(FALSE, 4);
  678 
  679     gtk_widget_show(vbox26);
  680     gtk_container_add(GTK_CONTAINER(container), vbox26);
  681     gtk_container_set_border_width(GTK_CONTAINER(vbox26), 3);
  682 
  683     scrolledwindow4 = gtk_scrolled_window_new(NULL, NULL);
  684 
  685     gtk_widget_show(scrolledwindow4);
  686     gtk_box_pack_start(GTK_BOX(vbox26), scrolledwindow4, TRUE, TRUE, 0);
  687     gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow4), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
  688 
  689     the_ignores = malloc(sizeof(struct slist_gui));
  690     the_ignores->data = the_site->ignores;
  691     the_ignores->type = list_ignore;
  692     the_ignores->chosen_row = -1;
  693     the_ignores->list = gtk_clist_new(1);
  694 
  695     gtk_widget_show(the_ignores->list);
  696     gtk_container_add(GTK_CONTAINER(scrolledwindow4), the_ignores->list);
  697     gtk_clist_set_column_width(GTK_CLIST(the_ignores->list), 0, 80);
  698     gtk_clist_column_titles_show(GTK_CLIST(the_ignores->list));
  699 
  700     label48 = gtk_label_new("Files whose *changes* should not be transferred to the remote site");
  701 
  702     gtk_widget_show(label48);
  703     gtk_clist_set_column_widget(GTK_CLIST(the_ignores->list), 0, label48);
  704 
  705     populate_minilist(the_ignores);
  706 
  707     hbox14 = gtk_hbox_new(FALSE, 2);
  708 
  709     gtk_widget_show(hbox14);
  710     gtk_box_pack_start(GTK_BOX(vbox26), hbox14, FALSE, TRUE, 0);
  711     gtk_container_set_border_width(GTK_CONTAINER(hbox14), 1);
  712 
  713     label49 = gtk_label_new("Ignore: ");
  714 
  715     gtk_widget_show(label49);
  716     gtk_box_pack_start(GTK_BOX(hbox14), label49, FALSE, FALSE, 0);
  717 
  718     ignores_gentry = gnome_entry_new(NULL);
  719     gtk_widget_show(ignores_gentry);
  720     gtk_box_pack_start(GTK_BOX(hbox14), ignores_gentry, TRUE, TRUE, 0);
  721 
  722     the_ignores->entry = gnome_entry_gtk_entry(GNOME_ENTRY(ignores_gentry));
  723 
  724     gtk_widget_show(the_ignores->entry);
  725 
  726     ignore_new = gtk_button_new_with_label("New");
  727     gtk_widget_show(ignore_new);
  728     gtk_box_pack_start(GTK_BOX(hbox14), ignore_new, FALSE, FALSE, 0);
  729 
  730     ignore_remove = gtk_button_new_with_label("Remove");
  731 
  732     gtk_widget_show(ignore_remove);
  733     gtk_box_pack_start(GTK_BOX(hbox14), ignore_remove, FALSE, FALSE, 0);
  734 
  735     ignores_label = gtk_label_new("Ignore");
  736 
  737     gtk_widget_show(ignores_label);
  738     gtk_notebook_set_tab_label(GTK_NOTEBOOK(container), gtk_notebook_get_nth_page(GTK_NOTEBOOK(container), 5), ignores_label);
  739 
  740     if (selected_site->protocol == siteproto_ftp)
  741     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(proto_ftp), TRUE);
  742 #ifdef USE_DAV
  743     if (selected_site->protocol == siteproto_dav)
  744     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(proto_dav), TRUE);
  745 #endif /* USE_DAV */
  746 
  747     gtk_signal_connect(GTK_OBJECT(combo_entry3), "changed",
  748                GTK_SIGNAL_FUNC(change_username),
  749                NULL);
  750     gtk_signal_connect(GTK_OBJECT(password), "changed",
  751                GTK_SIGNAL_FUNC(change_password),
  752                NULL);
  753     gtk_signal_connect(GTK_OBJECT(combo_entry2), "changed",
  754                GTK_SIGNAL_FUNC(change_host_name),
  755                NULL);
  756     gtk_signal_connect(GTK_OBJECT(port), "changed",
  757                GTK_SIGNAL_FUNC(change_port),
  758                NULL);
  759     gtk_signal_connect(GTK_OBJECT(url), "changed",
  760                GTK_SIGNAL_FUNC(change_url),
  761                NULL);
  762     gtk_signal_connect(GTK_OBJECT(combo_entry5), "changed",
  763                GTK_SIGNAL_FUNC(change_remote_dir),
  764                NULL);
  765     /* Sets the local dir, but doesn't do a rescan. */
  766     gtk_signal_connect(GTK_OBJECT(combo_entry4), "changed",
  767                GTK_SIGNAL_FUNC(set_local_dir),
  768                NULL);
  769     /* If activated do a rescan. focus out can get kinda icky if the dir
  770      * is not readable.
  771      */
  772     gtk_signal_connect(GTK_OBJECT(combo_entry4), "activate",
  773                GTK_SIGNAL_FUNC(change_local_dir),
  774                NULL);
  775 /*    gtk_signal_connect(GTK_OBJECT(combo_entry4), "focus_out_event",
  776                GTK_SIGNAL_FUNC(change_local_dir),
  777                NULL);*/
  778     gtk_signal_connect(GTK_OBJECT(sym_follow), "toggled",
  779                GTK_SIGNAL_FUNC(change_sym_mode),
  780                "follow");
  781     gtk_signal_connect(GTK_OBJECT(sym_ignore), "toggled",
  782                GTK_SIGNAL_FUNC(change_sym_mode),
  783                "ignore");
  784     gtk_signal_connect(GTK_OBJECT(sym_maintain), "toggled",
  785                GTK_SIGNAL_FUNC(change_sym_mode),
  786                "maintain");
  787     gtk_signal_connect(GTK_OBJECT(perms_ignore), "toggled",
  788                GTK_SIGNAL_FUNC(change_perms),
  789                "ignore");
  790     gtk_signal_connect(GTK_OBJECT(perms_exec), "toggled",
  791                GTK_SIGNAL_FUNC(change_perms),
  792                "exec");
  793     gtk_signal_connect(GTK_OBJECT(perms_all), "toggled",
  794                GTK_SIGNAL_FUNC(change_perms),
  795                "all");
  796     gtk_signal_connect(GTK_OBJECT(nodelete), "toggled",
  797                GTK_SIGNAL_FUNC(change_delete),
  798                NULL);
  799     gtk_signal_connect(GTK_OBJECT(checkmoved), "toggled",
  800                GTK_SIGNAL_FUNC(change_move_status),
  801                NULL);
  802     gtk_signal_connect(GTK_OBJECT(nooverwrite), "toggled",
  803                GTK_SIGNAL_FUNC(change_nooverwrite),
  804                NULL);
  805     gtk_signal_connect(GTK_OBJECT(lowercase), "toggled",
  806                GTK_SIGNAL_FUNC(change_lowercase),
  807                NULL);
  808     gtk_signal_connect(GTK_OBJECT(use_safemode), "toggled",
  809                GTK_SIGNAL_FUNC(change_safemode),
  810                NULL);
  811     gtk_signal_connect(GTK_OBJECT(ftp_mode), "toggled",
  812                GTK_SIGNAL_FUNC(change_passive_ftp),
  813                NULL);
  814     gtk_signal_connect(GTK_OBJECT(the_excludes->list), "select_row",
  815                GTK_SIGNAL_FUNC(select_minilist_item),
  816                the_excludes);
  817     gtk_signal_connect(GTK_OBJECT(the_excludes->entry), "changed",
  818                GTK_SIGNAL_FUNC(change_minilist_entry),
  819                the_excludes);
  820     gtk_signal_connect(GTK_OBJECT(excludes_new), "clicked",
  821                GTK_SIGNAL_FUNC(add_minilist_item),
  822                the_excludes);
  823     gtk_signal_connect(GTK_OBJECT(exclude_remove), "clicked",
  824                GTK_SIGNAL_FUNC(remove_minilist_item),
  825                the_excludes);
  826     gtk_signal_connect(GTK_OBJECT(ascii_files->list), "select_row",
  827                GTK_SIGNAL_FUNC(select_minilist_item),
  828                ascii_files);
  829     gtk_signal_connect(GTK_OBJECT(ascii_files->entry), "changed",
  830                GTK_SIGNAL_FUNC(change_minilist_entry),
  831                ascii_files);
  832     gtk_signal_connect(GTK_OBJECT(ascii_new), "clicked",
  833                GTK_SIGNAL_FUNC(add_minilist_item),
  834                ascii_files);
  835     gtk_signal_connect(GTK_OBJECT(ascii_remove), "clicked",
  836                GTK_SIGNAL_FUNC(remove_minilist_item),
  837                ascii_files);
  838     gtk_signal_connect(GTK_OBJECT(the_ignores->list), "select_row",
  839                GTK_SIGNAL_FUNC(select_minilist_item),
  840                the_ignores);
  841     gtk_signal_connect(GTK_OBJECT(the_ignores->entry), "changed",
  842                GTK_SIGNAL_FUNC(change_minilist_entry),
  843                the_ignores);
  844     gtk_signal_connect(GTK_OBJECT(ignore_new), "clicked",
  845                GTK_SIGNAL_FUNC(add_minilist_item),
  846                the_ignores);
  847     gtk_signal_connect(GTK_OBJECT(ignore_remove), "clicked",
  848                GTK_SIGNAL_FUNC(remove_minilist_item),
  849                the_ignores);
  850     gtk_widget_show(main_panel);
  851     /* if (main_prefs->remember_notebook_pos) */
  852     /* Why doesn't this work? */
  853     NE_DEBUG(DEBUG_GNOME, "Setting notebook page to page %d.\n", last_notepage);
  854     gtk_notebook_set_page(GTK_NOTEBOOK(container), last_notepage);
  855     gtk_signal_connect(GTK_OBJECT(container), "switch-page",
  856                GTK_SIGNAL_FUNC(record_notepage), NULL);
  857 
  858 /*******************************************/
  859 /**** Setup the permissions GUI widgets ****/
  860 /*******************************************/
  861 
  862     switch (selected_site->perms) {
  863     case sitep_ignore:
  864     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(perms_ignore), TRUE);
  865     break;
  866     case sitep_exec:
  867     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(perms_exec), TRUE);
  868     break;
  869     case sitep_all:
  870     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(perms_all), TRUE);
  871     break;
  872     }
  873 
  874 #ifdef USE_DAV
  875     if (selected_site->protocol == siteproto_dav) {
  876     gtk_widget_set_sensitive(perms_all, FALSE);
  877     gtk_widget_set_sensitive(perms_exec, FALSE);
  878     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(perms_ignore), TRUE);
  879     }
  880 #endif              /* USE_DAV */
  881 
  882 /*****************************************/
  883 /**** Setup the sym links GUI widgets ****/
  884 /*****************************************/
  885 
  886     switch (selected_site->symlinks) {
  887     case sitesym_ignore:
  888     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sym_ignore), TRUE);
  889     break;
  890     case sitesym_maintain:
  891     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sym_maintain), TRUE);
  892     break;
  893     case sitesym_follow:
  894     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sym_follow), TRUE);
  895     break;
  896     }
  897     if (selected_site->protocol == siteproto_ftp) {
  898     gtk_widget_set_sensitive(sym_maintain, FALSE);
  899     if (selected_site->symlinks == sitesym_maintain)
  900         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sym_ignore), TRUE);
  901     }
  902 /************/
  903 /*** Port ***/
  904 /************/
  905     gtk_spin_button_set_value(GTK_SPIN_BUTTON(port),
  906                   (float) selected_site->server.port);
  907 
  908 /***************/
  909 /*** Options ***/
  910 /***************/
  911 
  912     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(nodelete),
  913                  !(selected_site->nodelete));
  914     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(nooverwrite),
  915                  selected_site->nooverwrite);
  916     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkmoved),
  917                  selected_site->checkmoved);
  918     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lowercase),
  919                  selected_site->lowercase);
  920     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(use_safemode),
  921                  selected_site->safemode);
  922     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ftp_mode),
  923                  selected_site->ftp_pasv_mode);
  924 
  925     /* Restore rcfile_saved status after bastardization by the various signal
  926      * handlers that will have gone off.
  927      */
  928     rcfile_saved = current_rcfile_saved;
  929     return main_panel;
  930 }
  931 
  932    /* TODO: Add a config option for more stats, like how much space the new
  933     * files take up, how many excludes, etc. */