Fri Oct 1 13:35:50 PDT 1999
(Mandrake) wrote some code for "first time initialization" cruft. should generate the user menus in ~/.enlightenment, as well as run dox for the first time. SVN revision: 542
This commit is contained in:
parent
58368f5833
commit
c15dba1b5a
|
@ -2651,3 +2651,12 @@ Fri Oct 1 12:52:19 PDT 1999
|
|||
(Mandrake)
|
||||
|
||||
fixed the bug in dox, removed from TODO list.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Fri Oct 1 13:35:50 PDT 1999
|
||||
(Mandrake)
|
||||
|
||||
wrote some code for "first time initialization" cruft.
|
||||
should generate the user menus in ~/.enlightenment, as well as run dox for the
|
||||
first time.
|
||||
|
|
2
src/E.h
2
src/E.h
|
@ -1194,6 +1194,7 @@ typedef struct _emode
|
|||
int kde_support;
|
||||
char clickalways;
|
||||
char keybinds_changed;
|
||||
char firsttime;
|
||||
}
|
||||
EMode;
|
||||
|
||||
|
@ -1715,6 +1716,7 @@ void SetupX(void);
|
|||
void SetupDirs(void);
|
||||
void SetupEnv(void);
|
||||
Window MakeExtInitWin(void);
|
||||
void SetupUserInitialization(void);
|
||||
|
||||
void HandleSigHup(int num);
|
||||
void HandleSigInt(int num);
|
||||
|
|
1
src/TODO
1
src/TODO
|
@ -3,7 +3,6 @@ raster: need to investigate "The icons in the iconbox have garbage three
|
|||
cK: keeping the groups file in sync with the existing groups that need to be remembered. I'm sure there are bugs in that.
|
||||
cK hammering on this whole raise/lower/raiselower stuff in groups.
|
||||
mandrake: expose events in the dialog boxes aren't handled right.
|
||||
mandrake: need a "first time you ran enlightenment" feature to pop up Help and generate the initial menus using e_gen_menu
|
||||
|
||||
FEATURES FOR DR 0.17:
|
||||
kainx: reduce need for tooltip text to have auto gened tooltips work
|
||||
|
|
22
src/main.c
22
src/main.c
|
@ -1,6 +1,23 @@
|
|||
#include "E.h"
|
||||
#include "timestamp.h"
|
||||
|
||||
static void
|
||||
runDocBrowser(void)
|
||||
{
|
||||
|
||||
char file[FILEPATH_LEN_MAX];
|
||||
|
||||
if (fork())
|
||||
EDBUG_RETURN_;
|
||||
|
||||
Esnprintf(file, sizeof(file), "exec %s/dox %s/E-docs",
|
||||
ENLIGHTENMENT_BIN, ENLIGHTENMENT_ROOT);
|
||||
execl(usershell(getuid()), usershell(getuid()), "-c",
|
||||
(char *)file, NULL);
|
||||
exit(0);
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
|
@ -177,6 +194,7 @@ main(int argc, char **argv)
|
|||
CommsSetup();
|
||||
CommsFindCommsWindow();
|
||||
GrabX();
|
||||
SetupUserInitialization();
|
||||
LoadGroups();
|
||||
LoadSnapInfo();
|
||||
MapUnmap(0);
|
||||
|
@ -339,6 +357,10 @@ main(int argc, char **argv)
|
|||
"modifying your themes now if they use Color Modifiers\n"
|
||||
);
|
||||
}
|
||||
if (mode.firsttime)
|
||||
{
|
||||
runDocBrowser();
|
||||
}
|
||||
|
||||
/* The primary event loop */
|
||||
for (;;)
|
||||
|
|
46
src/setup.c
46
src/setup.c
|
@ -2,7 +2,7 @@
|
|||
#include "E.h"
|
||||
#include <X11/keysym.h>
|
||||
|
||||
void
|
||||
void
|
||||
MapUnmap(int start)
|
||||
{
|
||||
/* this function will map and unmap all the windows based on the progress
|
||||
|
@ -82,7 +82,7 @@ MapUnmap(int start)
|
|||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
SetupSignals()
|
||||
{
|
||||
|
||||
|
@ -165,7 +165,7 @@ SetupSignals()
|
|||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
SetupX()
|
||||
{
|
||||
|
||||
|
@ -583,7 +583,7 @@ SetupX()
|
|||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
SetupDirs()
|
||||
{
|
||||
char s[1024], ss[1024];
|
||||
|
@ -625,7 +625,7 @@ SetupDirs()
|
|||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
SetupEnv()
|
||||
{
|
||||
char s[1024];
|
||||
|
@ -830,3 +830,39 @@ MakeExtInitWin(void)
|
|||
* } */
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void
|
||||
SetupUserInitialization()
|
||||
{
|
||||
|
||||
FILE *f;
|
||||
char file[FILEPATH_LEN_MAX];
|
||||
|
||||
EDBUG(3, "SetupUserInitialization");
|
||||
|
||||
Esnprintf(file, sizeof(file), "%s/.initialized", UserEDir());
|
||||
if (isfile(file))
|
||||
{
|
||||
mode.firsttime = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
mode.firsttime = 1;
|
||||
f = fopen(file, "w");
|
||||
fprintf(f, "Congradulations, you have run enlightenment before.\n");
|
||||
fprintf(f, "Removing this file and *.menu in this directory\n");
|
||||
fprintf(f, "will cause enlightenment to regenerate them, as\n");
|
||||
fprintf(f, "run the documentation browser\n");
|
||||
fclose(f);
|
||||
if (fork())
|
||||
EDBUG_RETURN_;
|
||||
Esnprintf(file, sizeof(file), "exec %s/e_gen_menu", ENLIGHTENMENT_BIN);
|
||||
execl(usershell(getuid()), usershell(getuid()), "-c",
|
||||
(char *)file, NULL);
|
||||
exit(0);
|
||||
|
||||
}
|
||||
|
||||
EDBUG_RETURN_;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue