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

Diff of /xlog/src/main.c

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

revision 1.63 by pa4tu, Mon Jan 24 10:52:11 2005 UTC revision 1.64 by pa4tu, Mon Jan 24 13:42:32 2005 UTC
# Line 193  main (int argc, char *argv[]) Line 193  main (int argc, char *argv[])
193                  *hpaned, *powerlabel, *powerbutton, *locatorframe, *unknownlabel1,                  *hpaned, *powerlabel, *powerbutton, *locatorframe, *unknownlabel1,
194                  *unknownlabel2, *handlebox;                  *unknownlabel2, *handlebox;
195          gchar *xlogfile, *xlogbackupfile, *temp, *logstoload, **loglist = NULL;          gchar *xlogfile, *xlogbackupfile, *temp, *logstoload, **loglist = NULL;
196          gint i, ctyresult;          gint i, j, ctyresult;
197          gboolean showmainwindow = TRUE, logsfromprefs = FALSE, gtk_mismatch = FALSE;          gboolean showmainwindow = TRUE, logsfromprefs = FALSE, gtk_mismatch = FALSE;
198          logtype *logwindow = NULL;          logtype *logwindow = NULL;
199          LOGDB *lp = NULL;          LOGDB *lp = NULL;
# Line 285  main (int argc, char *argv[]) Line 285  main (int argc, char *argv[])
285                  loglist = g_strsplit (logs->str, "\n", -1);                  loglist = g_strsplit (logs->str, "\n", -1);
286    
287          state.utf8error = FALSE;          state.utf8error = FALSE;
288            j = 0;
289          for (i = 0;; i++)          for (i = 0;; i++)
290          {          {
291                  if (!loglist || !loglist[i] || (strlen(loglist[i]) == 0))                  if (!loglist || !loglist[i] || (strlen(loglist[i]) == 0))
# Line 303  main (int argc, char *argv[]) Line 304  main (int argc, char *argv[])
304                  lp = log_file_open (xlogfile, TYPE_FLOG);                  lp = log_file_open (xlogfile, TYPE_FLOG);
305                  if (lp)                  if (lp)
306                  {                  {
307                          logwindow = openlog (lp, loglist[i], i);                          logwindow = openlog (lp, loglist[i], j);
308                          log_file_qso_foreach (lp, fillin_list, logwindow);                          log_file_qso_foreach (lp, fillin_list, logwindow);
309                          log_file_close (lp);                          log_file_close (lp);
310                          logwindow->filename = g_strdup (xlogfile);                          logwindow->filename = g_strdup (xlogfile);
# Line 312  main (int argc, char *argv[]) Line 313  main (int argc, char *argv[])
313                          xlogbackupfile = g_strconcat (xlogfile, ".backup", NULL);                          xlogbackupfile = g_strconcat (xlogfile, ".backup", NULL);
314                          backuplog (xlogfile, xlogbackupfile);                          backuplog (xlogfile, xlogbackupfile);
315                          g_free (xlogbackupfile);                          g_free (xlogbackupfile);
316                            j++;
317                  }                  }
318                  g_free (xlogfile);                  g_free (xlogfile);
319          }          }
320          state.logwindows = i;          state.logwindows = j;
321          g_strfreev (loglist);          g_strfreev (loglist);
322          g_string_free (logs, TRUE);          g_string_free (logs, TRUE);
323          set_tabs_menu ();          set_tabs_menu ();
# Line 494  trace hamlib menu is disabled in gui_mai Line 496  trace hamlib menu is disabled in gui_mai
496                          "from a terminal and see what the errors are. Please check your "                          "from a terminal and see what the errors are. Please check your "
497                          "language settings and your log fields!"));                          "language settings and your log fields!"));
498          }          }
499            if (j < i)
500            {
501                    warningdialog (_("xlog - error"),
502                            _("There was an error while loading one of your logs, "
503                            "you may want to start xlog from a terminal "
504                            "to see what the errors are."));
505            }
506    
507          gtk_main ();          gtk_main ();
508          return 0;          return 0;

Legend:
Removed from v.1.63  
changed lines
  Added in v.1.64

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