Skip to content

Commit

Permalink
Some general GUI tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed May 18, 2007
1 parent 436aff0 commit ed6bf2a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions gui.h
Expand Up @@ -22,6 +22,7 @@ typedef enum
MOJOGUI_PRIORITY_TRY_FIRST,
MOJOGUI_PRIORITY_TRY_NORMAL,
MOJOGUI_PRIORITY_TRY_LAST,
MOJOGUI_PRIORITY_TRY_ABSOLUTELY_LAST,
MOJOGUI_PRIORITY_TOTAL
} MojoGuiPluginPriority;

Expand Down
7 changes: 6 additions & 1 deletion gui_gtkplus2.c
Expand Up @@ -171,7 +171,12 @@ static boolean MojoGui_gtkplus2_init(void)
int tmpargc = 0;
char *args[] = { NULL, NULL };
char **tmpargv = args;
return gtk_init_check(&tmpargc, &tmpargv) ? true : false;
if (!gtk_init_check(&tmpargc, &tmpargv))
{
entry->logInfo("gtkplus2: gtk_init_check() failed, use another UI.");
return false;
} // if
return true;
} // MojoGui_gtkplus2_init


Expand Down
7 changes: 6 additions & 1 deletion gui_macosx.c
Expand Up @@ -27,6 +27,7 @@ CREATE_MOJOGUI_ENTRY_POINT(macosx)

static uint8 MojoGui_macosx_priority(void)
{
// obviously this is the thing you want on Mac OS X.
return MOJOGUI_PRIORITY_TRY_FIRST;
} // MojoGui_macosx_priority

Expand All @@ -43,7 +44,11 @@ static boolean MojoGui_macosx_init(void)
SetFrontProcess(&psn);
} // if

return true;
// !!! FIXME: make sure we have access to the desktop...may be ssh'd in
// !!! FIXME: as another user that doesn't have the Finder loaded or
// !!! FIXME: something.

return true; // always succeeds.
} // MojoGui_macosx_init

static void MojoGui_macosx_deinit(void)
Expand Down
2 changes: 1 addition & 1 deletion gui_stdio.c
Expand Up @@ -75,7 +75,7 @@ static int readstr(const char *prompt, char *buf, int len,

static uint8 MojoGui_stdio_priority(void)
{
return MOJOGUI_PRIORITY_TRY_LAST; // always a last resort.
return MOJOGUI_PRIORITY_TRY_ABSOLUTELY_LAST; // always a last resort.
} // MojoGui_stdio_priority


Expand Down

0 comments on commit ed6bf2a

Please sign in to comment.