ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/Frodo4/Src/main_x.h
(Generate patch)

Comparing Frodo4/Src/main_x.h (file contents):
Revision 1.4 by cebix, 2004-01-12T15:13:20Z vs.
Revision 1.6 by cebix, 2004-01-14T17:24:19Z

# Line 20 | Line 20
20  
21   #include "Version.h"
22  
23 + #ifdef HAVE_GLADE
24 + #include <gnome.h>
25 + #endif
26 +
27  
28   extern int init_graphics(void);
29  
# Line 34 | Line 38 | char Frodo::prefs_path[256] = "";
38  
39   int main(int argc, char **argv)
40   {
41 <        Frodo *the_app;
41 > #ifdef HAVE_GLADE
42 >        gnome_program_init(PACKAGE_NAME, PACKAGE_VERSION, LIBGNOMEUI_MODULE, argc, argv,
43 >                           GNOME_PARAM_APP_DATADIR, DATADIR, NULL);
44 > #endif
45  
46          timeval tv;
47          gettimeofday(&tv, NULL);
# Line 42 | Line 49 | int main(int argc, char **argv)
49  
50          printf("%s by Christian Bauer\n", VERSION_STRING);
51          if (!init_graphics())
52 <                return 0;
52 >                return 1;
53          fflush(stdout);
54  
55 <        the_app = new Frodo();
55 >        Frodo *the_app = new Frodo();
56          the_app->ArgvReceived(argc, argv);
57          the_app->ReadyToRun();
58          delete the_app;
# Line 94 | Line 101 | void Frodo::ReadyToRun(void)
101          }
102          ThePrefs.Load(prefs_path);
103  
104 <        // Create and start C64
105 <        TheC64 = new C64;
106 <        load_rom_files();
107 <        TheC64->Run();
108 <        delete TheC64;
104 >        // Show preferences editor
105 >        if (ThePrefs.ShowEditor(true, prefs_path)) {
106 >
107 >                // Create and start C64
108 >                TheC64 = new C64;
109 >                load_rom_files();
110 >                TheC64->Run();
111 >                delete TheC64;
112 >        }
113   }
114  
115  
# Line 108 | Line 119 | Prefs *Frodo::reload_prefs(void)
119          newprefs.Load(prefs_path);
120          return &newprefs;
121   }
122 +
123 +
124 + /*
125 + *  Determine whether path name refers to a directory
126 + */
127 +
128 + bool IsDirectory(const char *path)
129 + {
130 +        struct stat st;
131 +        return stat(path, &st) == 0 && S_ISDIR(st.st_mode);
132 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines