/[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.27 by pa4tu, Fri Mar 7 18:11:43 2003 UTC revision 1.28 by pa4tu, Sat Mar 8 20:41:06 2003 UTC
# Line 123  xlogdircheck (void) Line 123  xlogdircheck (void)
123    if (stat (xlogdir, &statdir) == -1)    if (stat (xlogdir, &statdir) == -1)
124      {      {
125        if (mkdir (xlogdir, S_IRUSR | S_IWUSR | S_IXUSR) == -1)        if (mkdir (xlogdir, S_IRUSR | S_IWUSR | S_IXUSR) == -1)
126          g_error (_("Creating ~%s directory."), packagedir->str);              g_error (_("Creating ~%s directory."), packagedir->str);
127        else        else
128          {            {
129            labeltext = g_strdup_printf (_("Xlog has created %s,\n\              labeltext = g_strdup_printf (_(
130  this is the directory where your log will be saved.\n\n\                    "Xlog has created %s,\n"
131  You can change the default path for your logs\n\            "this is the directory where your log will be saved.\n\n"
132  in the preferences dialog."), xlogdir);            "You can change the default path for your logs\n"
133            gtk_label_set_text (GTK_LABEL (setuplabel), labeltext);            "in the preferences dialog."), xlogdir);
134            g_free (labeltext);              gtk_label_set_text (GTK_LABEL (setuplabel), labeltext);
135            g_string_free (packagedir, TRUE);              g_free (labeltext);
136            gtk_widget_show (setupdialog);              g_string_free (packagedir, TRUE);
137            return (FALSE);                  gtk_widget_show(setupdialog);
138          }              return FALSE;
139              }
140      }      }
141    else if (!S_ISDIR (statdir.st_mode))    else if (!S_ISDIR (statdir.st_mode))
142      g_error (_("~%s is not a directory."), packagedir->str);      g_error (_("~%s is not a directory."), packagedir->str);
143    g_string_free (packagedir, TRUE);    g_string_free (packagedir, TRUE);
144    return (TRUE);    return TRUE;
145  }  }
146    
147  /* defaults for program state */  /* defaults for program state */
# Line 218  main (int argc, char *argv[]) Line 219  main (int argc, char *argv[])
219    add_pixmap_directory (PACKAGE_SOURCE_DIR G_DIR_SEPARATOR_S "pixmaps");    add_pixmap_directory (PACKAGE_SOURCE_DIR G_DIR_SEPARATOR_S "pixmaps");
220    
221    mainwindow = create_mainwindow ();    mainwindow = create_mainwindow ();
222    showmainwindow = xlogdircheck ();    showmainwindow = xlogdircheck();
223    
224    loadpreferences ();    loadpreferences ();
225    loadhistory ();    loadhistory ();
# Line 481  main (int argc, char *argv[]) Line 482  main (int argc, char *argv[])
482    g_free (temp);    g_free (temp);
483    
484    if (showmainwindow)    if (showmainwindow)
485      {    {
486        gtk_widget_show (mainwindow);      gtk_widget_show (mainwindow);
487        /* position the main window */      /* position the main window */
488        gdk_window_move_resize (mainwindow->window, preferences.x,      gdk_window_move_resize (mainwindow->window, preferences.x,
489                                preferences.y, preferences.width,        preferences.y, preferences.width,  preferences.height);
490                                preferences.height);    }
     }  
491    
492    gtk_main ();    gtk_main ();
493    return 0;    return 0;

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

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