/[xlog]/xlog/src/callbacks_printdialog.c
ViewVC logotype

Diff of /xlog/src/callbacks_printdialog.c

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

revision 1.9 by pa4tu, Fri Oct 10 19:25:11 2003 UTC revision 1.10 by pa4tu, Wed Oct 15 17:23:30 2003 UTC
# Line 130  on_printokbutton_clicked (GtkButton * bu Line 130  on_printokbutton_clicked (GtkButton * bu
130  {  {
131    GtkWidget *printallradiobutton, *printrangeradiobutton, *printlowentry,    GtkWidget *printallradiobutton, *printrangeradiobutton, *printlowentry,
132      *printhighentry, *sizecomboentry, *pointcomboentry, *orientationcomboentry,      *printhighentry, *sizecomboentry, *pointcomboentry, *orientationcomboentry,
133      *filedestinationradiobutton, *printerdestinationradiobutton;      *filedestinationradiobutton, *printerdestinationradiobutton,
134        *contestcheckbutton;
135    GtkWidget *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9, *p10,    GtkWidget *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9, *p10,
136      *p11, *p12, *p13, *p14, *p15, *p16, *p17, *p18;      *p11, *p12, *p13, *p14, *p15, *p16, *p17, *p18;
137    gboolean nrok = FALSE, dateok = FALSE, gmtok = FALSE, gmtendok = FALSE,    gboolean nrok = FALSE, dateok = FALSE, gmtok = FALSE, gmtendok = FALSE,
# Line 142  on_printokbutton_clicked (GtkButton * bu Line 143  on_printokbutton_clicked (GtkButton * bu
143          *latexstring = NULL, **item, *pathstr;          *latexstring = NULL, **item, *pathstr;
144    FILE *fp;    FILE *fp;
145    gint i, j, k = 0, printhigh, printlow, lastcol = 0;    gint i, j, k = 0, printhigh, printlow, lastcol = 0;
146    gboolean printok = FALSE;    gboolean printok = FALSE, contest;
147    logtype *logwindow;    logtype *logwindow;
148    GtkTreeIter iter;    GtkTreeIter iter;
149    GtkTreeModel *model;    GtkTreeModel *model;
# Line 160  on_printokbutton_clicked (GtkButton * bu Line 161  on_printokbutton_clicked (GtkButton * bu
161    printerdestinationradiobutton =    printerdestinationradiobutton =
162      lookup_widget (printdialog, "printerdestinationradiobutton");      lookup_widget (printdialog, "printerdestinationradiobutton");
163    orientationcomboentry = lookup_widget (printdialog, "orientationcomboentry");    orientationcomboentry = lookup_widget (printdialog, "orientationcomboentry");
164      contestcheckbutton = lookup_widget (printdialog, "contestcheckbutton");
165    /* toggle buttons */    /* toggle buttons */
166    p1 = lookup_widget (printdialog, "p1");    p1 = lookup_widget (printdialog, "p1");
167    p2 = lookup_widget (printdialog, "p2");    p2 = lookup_widget (printdialog, "p2");
# Line 327  on_printokbutton_clicked (GtkButton * bu Line 329  on_printokbutton_clicked (GtkButton * bu
329    else    else
330      texpoint = g_strdup ("12pt");      texpoint = g_strdup ("12pt");
331    
332      contest = gtk_toggle_button_get_active
333        (GTK_TOGGLE_BUTTON(contestcheckbutton));
334      if (contest) lastcol = 19;
335    
336    logwindow = g_list_nth_data (logwindowlist,    logwindow = g_list_nth_data (logwindowlist,
337      gtk_notebook_get_current_page (GTK_NOTEBOOK(mainnotebook)));      gtk_notebook_get_current_page (GTK_NOTEBOOK(mainnotebook)));
338    
# Line 366  on_printokbutton_clicked (GtkButton * bu Line 372  on_printokbutton_clicked (GtkButton * bu
372      if (u1ok) fprintf (fp, "l|");      if (u1ok) fprintf (fp, "l|");
373      if (u2ok) fprintf (fp, "l|");      if (u2ok) fprintf (fp, "l|");
374      if (remarksok) fprintf (fp, "l|");      if (remarksok) fprintf (fp, "l|");
375        if (contest) fprintf (fp, "l|l|");
376            fprintf (fp, "|}\n");            fprintf (fp, "|}\n");
377      fprintf (fp, "\\hline\n");      fprintf (fp, "\\hline\n");
378    
# Line 494  on_printokbutton_clicked (GtkButton * bu Line 501  on_printokbutton_clicked (GtkButton * bu
501                fprintf (fp, "} &");                fprintf (fp, "} &");
502      }      }
503      if (remarksok)      if (remarksok)
504        fprintf (fp, "\\textbf{Remarks}");      {
505          if (lastcol == 18)
506            fprintf (fp, "\\textbf{Remarks}");
507          else
508            fprintf (fp, "\\textbf{Remarks} &");
509        }
510        if (contest)
511          fprintf (fp, "\\textbf{Multiplier} &\\textbf{Points}");
512    
513            fprintf (fp, "\\\\\n");            fprintf (fp, "\\\\\n");
514      fprintf (fp, "\\hline\n");      fprintf (fp, "\\hline\n");
# Line 644  on_printokbutton_clicked (GtkButton * bu Line 658  on_printokbutton_clicked (GtkButton * bu
658                  if (g_strrstr (item[REMARKS], "#"))                  if (g_strrstr (item[REMARKS], "#"))
659            {            {
660                                            temp = strreplace (item[REMARKS], "#", "\\#");                                            temp = strreplace (item[REMARKS], "#", "\\#");
661              fprintf (fp, "%s", temp);              if (lastcol == 18)
662                  fprintf (fp, "%s", temp);
663                else
664                  fprintf (fp, "%s&", temp);
665            }            }
666            else            else
667              fprintf (fp, "%s", item[REMARKS]);              if (lastcol == 18)
668                  fprintf (fp, "%s", item[REMARKS]);
669                else
670                  fprintf (fp, "%s&", item[REMARKS]);
671          }          }
672            if (contest)
673              fprintf (fp, "~&~");
674                      fprintf (fp, "\\\\\n");                      fprintf (fp, "\\\\\n");
675          k++; /* QSO's per page counter */          k++; /* QSO's per page counter */
676          if ((k % 30 == 0 && preferences.printorientation == 1          if ((k % 30 == 0 && preferences.printorientation == 1
# Line 683  on_printokbutton_clicked (GtkButton * bu Line 705  on_printokbutton_clicked (GtkButton * bu
705            if (u1ok) fprintf (fp, "l|");            if (u1ok) fprintf (fp, "l|");
706            if (u2ok) fprintf (fp, "l|");            if (u2ok) fprintf (fp, "l|");
707            if (remarksok) fprintf (fp, "l|");            if (remarksok) fprintf (fp, "l|");
708              if (contest) fprintf (fp, "l|l|");
709                  fprintf (fp, "|}\n");                  fprintf (fp, "|}\n");
710            fprintf (fp, "\\hline\n");            fprintf (fp, "\\hline\n");
711    
# Line 811  on_printokbutton_clicked (GtkButton * bu Line 834  on_printokbutton_clicked (GtkButton * bu
834                      fprintf (fp, "} &");                      fprintf (fp, "} &");
835            }            }
836            if (remarksok)            if (remarksok)
837              fprintf (fp, "\\textbf{Remarks}");            {
838                if (lastcol == 18)
839                  fprintf (fp, "\\textbf{Remarks}");
840                else
841                  fprintf (fp, "\\textbf{Remarks} &");
842              }
843              if (contest)
844                fprintf (fp, "\\textbf{Multiplier} &\\textbf{Points}");
845    
846                  fprintf (fp, "\\\\\n");                  fprintf (fp, "\\\\\n");
847            fprintf (fp, "\\hline\n");            fprintf (fp, "\\hline\n");

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

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