/[gtktalog]/gtktalog/src/gtktalog/report.c
ViewVC logotype

Diff of /gtktalog/src/gtktalog/report.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.55.2.2 by ymettier, Mon Jun 16 21:52:10 2003 UTC revision 1.55.2.3 by ymettier, Tue Jun 17 19:31:43 2003 UTC
# Line 249  char *html_td_start = "<TD>"; Line 249  char *html_td_start = "<TD>";
249  char *html_td_end = "</TD>";  char *html_td_end = "</TD>";
250  char *xml_report_st = "<report>";  char *xml_report_st = "<report>";
251  char *xml_report_ed = "</report>";  char *xml_report_ed = "</report>";
252  char *xml_disc_name_st = "\t<disc_name>";  char *xml_disc_name_st = "\t<disc_name><![CDATA[";
253  char *xml_disc_name_ed = "</disc_name>\n";  char *xml_disc_name_ed = "]]></disc_name>\n";
254  char *xml_legend_st = "<legend>";  char *xml_legend_st = "<legend><![CDATA[";
255  char *xml_legend_ed = "</legend>";  char *xml_legend_ed = "]]></legend>";
256  char *xml_directory_st = "<directory>\n";  char *xml_directory_st = "<directory>\n";
257  char *xml_directory_ed = "</directory>";  char *xml_directory_ed = "</directory>";
258  char *xml_file_st = "\t<file_name>";  char *xml_file_st = "\t<file_name><![CDATA[";
259  char *xml_file_ed = "</file_name>\n";  char *xml_file_ed = "]]></file_name>\n";
260  char *xml_size_st = "\t<file_size>";  char *xml_size_st = "\t<file_size><![CDATA[";
261  char *xml_size_ed = "</file_size>\n";  char *xml_size_ed = "]]></file_size>\n";
262  char *xml_date_st = "\t<file_date>";  char *xml_date_st = "\t<file_date><![CDATA[";
263  char *xml_date_ed = "</file_date>\n";  char *xml_date_ed = "]]></file_date>\n";
264  char *xml_description_st = "\t<description>";  char *xml_description_st = "\t<description><![CDATA[";
265  char *xml_description_ed = "</description>\n";  char *xml_description_ed = "]]></description>\n";
266  char *xml_information_st = "\t<information>";  char *xml_information_st = "\t<information><![CDATA[";
267  char *xml_information_ed = "</information>\n";  char *xml_information_ed = "]]></information>\n";
268  char *xml_category_st = "\t<category>";  char *xml_category_st = "\t<category><![CDATA[";
269  char *xml_category_ed = "</category>\n";  char *xml_category_ed = "]]></category>\n";
270  char *xml_location_st = "\t<directory_name>";  char *xml_location_st = "\t<directory_name><![CDATA[";
271  char *xml_location_ed = "</directory_name>\n";  char *xml_location_ed = "]]></directory_name>\n";
272  char *td_st;  char *td_st;
273  char *td_ed;  char *td_ed;
274    
# Line 283  set_quotes_and_separator () Line 283  set_quotes_and_separator ()
283      quot = double_quotes;      quot = double_quotes;
284    else    else
285      quot = nothing;      quot = nothing;
286    
287    if (gb_html_report)    if (gb_html_report)
288      {      {
289        td_st = html_td_start;        td_st = html_td_start;
290        td_ed = html_td_end;        td_ed = html_td_end;
291        separator = nothing;        separator = nothing;
292      }      }
293    else    else if (gb_xml_report)
294      if ( gb_xml_report )      {
295        separator = nothing;        separator = nothing;
296      else      }
297      else
298      {      {
299        td_st = nothing;        td_st = nothing;
300        td_ed = nothing;        td_ed = nothing;
# Line 346  print_file (FILE_DATA * fd, FILE * file) Line 348  print_file (FILE_DATA * fd, FILE * file)
348    
349    if (gb_check_folders)    if (gb_check_folders)
350      {      {
351        if ( gb_xml_report )        if (gb_xml_report)
352          {          {
353            td_st = xml_location_st;            td_st = xml_location_st;
354            td_ed = xml_location_ed;            td_ed = xml_location_ed;
# Line 402  print_file (FILE_DATA * fd, FILE * file) Line 404  print_file (FILE_DATA * fd, FILE * file)
404          }          }
405        if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (no_newline)))        if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (no_newline)))
406          strswap (gdescr, '\n', ' ');          strswap (gdescr, '\n', ' ');
407        if ( gb_xml_report )        if (gb_xml_report)
408          {          {
409            td_st = xml_file_st;            td_st = xml_file_st;
410            td_ed = xml_file_ed;            td_ed = xml_file_ed;
# Line 479  print_file (FILE_DATA * fd, FILE * file) Line 481  print_file (FILE_DATA * fd, FILE * file)
481    
482    if (gb_check_description)    if (gb_check_description)
483      {      {
484        if ( gb_xml_report )        if (gb_xml_report)
485          {          {
486            td_st = xml_description_st;            td_st = xml_description_st;
487            td_ed = xml_description_ed;            td_ed = xml_description_ed;
# Line 499  print_file (FILE_DATA * fd, FILE * file) Line 501  print_file (FILE_DATA * fd, FILE * file)
501    
502    if (gb_check_information)    if (gb_check_information)
503      {      {
504        if ( gb_xml_report )        if (gb_xml_report)
505          {          {
506            td_st = xml_information_st;            td_st = xml_information_st;
507            td_ed = xml_information_ed;            td_ed = xml_information_ed;
# Line 1095  begin_report_orig (GtkWidget * w, gpoint Line 1097  begin_report_orig (GtkWidget * w, gpoint
1097      gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_only_desc));      gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_only_desc));
1098    if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_sortbyfile)))    if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_sortbyfile)))
1099      {      {
1100      gb_html_report = FALSE;        gb_html_report = FALSE;
1101        gb_xml_report = FALSE;        gb_xml_report = FALSE;
1102      } else {      }
1103      gb_html_report =    else
1104        gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_html));      {
1105          gb_html_report =
1106            gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_html));
1107        gb_xml_report = !gb_html_report;        gb_xml_report = !gb_html_report;
1108      }      }
1109    
# Line 1108  begin_report_orig (GtkWidget * w, gpoint Line 1112  begin_report_orig (GtkWidget * w, gpoint
1112      {      {
1113        fprintf (stderr, "gb_check_disks_only = TRUE\n");        fprintf (stderr, "gb_check_disks_only = TRUE\n");
1114        gb_check_disks_only = TRUE;        gb_check_disks_only = TRUE;
1115      } else {      }
1116      else
1117        {
1118        gb_check_disks_only = FALSE;        gb_check_disks_only = FALSE;
1119      }      }
1120    gb_manydirs_report =    gb_manydirs_report =
# Line 1120  begin_report_orig (GtkWidget * w, gpoint Line 1126  begin_report_orig (GtkWidget * w, gpoint
1126      }      }
1127    if (gb_html_report)    if (gb_html_report)
1128      {      {
       fprintf (file, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">");  
1129        fprintf (file,        fprintf (file,
1130                 "<HTML><HEAD><TITLE>%s</TITLE></HEAD><BODY>",                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">");
1131          fprintf (file, "<HTML><HEAD><TITLE>%s</TITLE></HEAD><BODY>",
1132                 _("GTKtalog's Catalog"));                 _("GTKtalog's Catalog"));
1133        fprintf (file, "<STYLE TYPE=\"text/css\"><!--\n");        fprintf (file, "<STYLE TYPE=\"text/css\"><!--\n");
1134        fprintf (file, "body { background: white; color: black: margin: 0.5em; font-size: 9pt;}\n");        fprintf (file,
1135                   "body { background: white; color: black: margin: 0.5em; font-size: 9pt;}\n");
1136        fprintf (file, "TT { font-family: courier; }\n");        fprintf (file, "TT { font-family: courier; }\n");
1137        fprintf (file, "TD { font-family: helvetica, sans-serif; font-size: 9pt; border-bottom: thin solid #000000; border-left: thin solid #000000;}\n");        fprintf (file,
1138                   "TD { font-family: helvetica, sans-serif; font-size: 9pt; border-bottom: thin solid #000000; border-left: thin solid #000000;}\n");
1139        fprintf (file, "CAPTION {\n");        fprintf (file, "CAPTION {\n");
1140        fprintf (file, "  font-family: helvetica, sans-serif;\n");        fprintf (file, "  font-family: helvetica, sans-serif;\n");
1141        fprintf (file, "  font-size: 12pt;\n");        fprintf (file, "  font-size: 12pt;\n");
# Line 1137  begin_report_orig (GtkWidget * w, gpoint Line 1145  begin_report_orig (GtkWidget * w, gpoint
1145    if (gb_xml_report)    if (gb_xml_report)
1146      {      {
1147        fprintf (file, "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n");        fprintf (file, "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n");
1148        fprintf (file, "<?xml-stylesheet type=\"text/css\" href=\"gtktalog.css\"?>\n");        fprintf (file,
1149                   "<?xml-stylesheet type=\"text/css\" href=\"gtktalog.css\"?>\n");
1150        fprintf (file, "<report>\n");        fprintf (file, "<report>\n");
1151        fprintf (file, "<name>%s</name>\n", _("GTKtalog's Catalog"));        fprintf (file, "<name>%s</name>\n", _("GTKtalog's Catalog"));
1152      }      }
# Line 1147  begin_report_orig (GtkWidget * w, gpoint Line 1156  begin_report_orig (GtkWidget * w, gpoint
1156        if (gb_html_report)        if (gb_html_report)
1157          fprintf (file, "<PRE>");          fprintf (file, "<PRE>");
1158        if (gb_xml_report)        if (gb_xml_report)
1159          fprintf (file, "<legend>\n");          fprintf (file, "%s\n", xml_legend_st);
1160        fprintf (file, _("This report was generated by GTKtalog.\n"));        fprintf (file, _("This report was generated by GTKtalog.\n"));
1161        fprintf (file, GTKTALOGWEB "\n\n");        fprintf (file, GTKTALOGWEB "\n\n");
1162    
# Line 1199  begin_report_orig (GtkWidget * w, gpoint Line 1208  begin_report_orig (GtkWidget * w, gpoint
1208        if (gb_html_report)        if (gb_html_report)
1209          fprintf (file, "</PRE>");          fprintf (file, "</PRE>");
1210        if (gb_xml_report)        if (gb_xml_report)
1211          fprintf (file, "</legend>\n");          fprintf (file, "%s\n", xml_legend_ed);
1212      }      }
1213    
1214    if (gb_html_report)    if (gb_html_report)
# Line 1580  open_report_dialog (FOLDER * racine) Line 1589  open_report_dialog (FOLDER * racine)
1589    gtk_container_add (GTK_CONTAINER (vbox2), hbox);    gtk_container_add (GTK_CONTAINER (vbox2), hbox);
1590    gtk_container_border_width (GTK_CONTAINER (hbox), 3);    gtk_container_border_width (GTK_CONTAINER (hbox), 3);
1591    gtk_widget_show (hbox);    gtk_widget_show (hbox);
1592      
1593    button_html = gtk_radio_button_new_with_label (NULL , _("HTML"));    button_html = gtk_radio_button_new_with_label (NULL, _("HTML"));
1594    gtk_box_pack_start (GTK_BOX (hbox), button_html, TRUE, TRUE, 0);    gtk_box_pack_start (GTK_BOX (hbox), button_html, TRUE, TRUE, 0);
1595    gtk_widget_show (button_html);    gtk_widget_show (button_html);
1596    
# Line 1595  open_report_dialog (FOLDER * racine) Line 1604  open_report_dialog (FOLDER * racine)
1604    gtk_box_pack_start (GTK_BOX (hbox), button_txt, TRUE, TRUE, 0);    gtk_box_pack_start (GTK_BOX (hbox), button_txt, TRUE, TRUE, 0);
1605    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button_txt), TRUE);    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button_txt), TRUE);
1606    gtk_widget_show (button_txt);    gtk_widget_show (button_txt);
1607      
1608    gtk_signal_connect (GTK_OBJECT (button_sortbyfile), "clicked",    gtk_signal_connect (GTK_OBJECT (button_sortbyfile), "clicked",
1609                        GTK_SIGNAL_FUNC (switch_size), button_html);                        GTK_SIGNAL_FUNC (switch_size), button_html);
1610    switch_size (button_sortbyfile, button_html);    switch_size (button_sortbyfile, button_html);
# Line 1610  open_report_dialog (FOLDER * racine) Line 1619  open_report_dialog (FOLDER * racine)
1619    // Should connect the HTML / XML / txt radio buttons to switch_report_name-function    // Should connect the HTML / XML / txt radio buttons to switch_report_name-function
1620    // to set the default report-name.    // to set the default report-name.
1621    // gtk_signal_connect (GTK_OBJECT (button_html), "clicked",    // gtk_signal_connect (GTK_OBJECT (button_html), "clicked",
1622    //                  GTK_SIGNAL_FUNC (switch_report_name), "html");    //                  GTK_SIGNAL_FUNC (switch_report_name), "html");
1623    
1624    button_manydirs =    button_manydirs =
1625      gtk_check_button_new_with_label (_("dir1/dir2 becomes dir1,dir2"));      gtk_check_button_new_with_label (_("dir1/dir2 becomes dir1,dir2"));

Legend:
Removed from v.1.55.2.2  
changed lines
  Added in v.1.55.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26