mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 10:43:24 +00:00
fix command line stuff
This commit is contained in:
parent
022a526f52
commit
f99343a1cf
@ -88,35 +88,27 @@ NS_METHOD nsAppShell::Create(int *bac, char **bav)
|
||||
gchar *home=nsnull;
|
||||
gchar *path=nsnull;
|
||||
|
||||
int *argc=nsnull;
|
||||
char **argv=nsnull;
|
||||
#if 0
|
||||
// why do i get an error if this is defined here??
|
||||
// nsICmdLineService *cmdLineArgs=nsnull;
|
||||
nsresult rv = NS_OK;
|
||||
int argc = bac ? *bac : 0;
|
||||
char **argv = bav;
|
||||
#if 1
|
||||
nsresult rv;
|
||||
|
||||
NS_WITH_SERVICE(nsICmdLineService, cmdLineArgs, kCmdLineServiceCID, &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
rv = cmdLineArgs->GetArgc(argc);
|
||||
rv = cmdLineArgs->GetArgc(&argc);
|
||||
if(NS_FAILED(rv))
|
||||
argc = bac;
|
||||
argc = bac ? *bac : 0;
|
||||
|
||||
rv = cmdLineArgs->GetArgv(&argv);
|
||||
if(NS_FAILED(rv))
|
||||
argv = bav;
|
||||
} else {
|
||||
argc = bac;
|
||||
argv = bav;
|
||||
}
|
||||
#else
|
||||
argc = bac;
|
||||
argv = bav;
|
||||
#endif
|
||||
|
||||
gtk_set_locale ();
|
||||
|
||||
gtk_init (argc, &argv);
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
// delete the cmdLineArgs thing?
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user