Consolidate gtk initialization to main(), which fixes inconsistencies with not calling gtk_set_locale(). We can do this now that we're not worrying about drop-in toolkit support. Bug 118478, patch by gelsoft@mx4.tiki.ne.jp, r=me, sr=blizzard.

This commit is contained in:
bryner%netscape.com 2003-03-03 08:57:12 +00:00
parent d2f3e65fc5
commit 9c58a59069
4 changed files with 8 additions and 16 deletions

View File

@ -238,14 +238,6 @@ NS_IMETHODIMP nsAppShell::Create(int *bac, char **bav)
gdk_rgb_set_install(TRUE);
}
gtk_set_locale ();
gtk_init (&argc, &argv);
#ifdef MOZ_GLE
gle_init (&argc, &argv);
#endif
gdk_rgb_init();
return NS_OK;

View File

@ -112,8 +112,6 @@ nsAppShell::Create(int *argc, char **argv)
// XXX add all of the command line handling
gtk_init(argc, &argv);
#ifdef ACCESSIBILITY
nsAccessibilityInterface::Init();
#endif

View File

@ -956,10 +956,6 @@ static void ShowOSAlertFromFile(int argc, char **argv, const char *alert_filenam
}
}
#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
gtk_init(&argc, &argv);
#endif
ShowOSAlert(messageToShow);
}
@ -1544,6 +1540,14 @@ int main(int argc, char* argv[])
InitializeMacOSXApp(argc, argv);
#endif
#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
// Initialize GTK+1/2 here for splash
#if defined(MOZ_WIDGET_GTK)
gtk_set_locale();
#endif
gtk_init(&argc, &argv);
#endif /* MOZ_WIDGET_GTK || MOZ_WIDGET_GTK2 */
#ifdef _BUILD_STATIC_BIN
// Initialize XPCOM's module info table
NSGetStaticModuleInfo = app_getModuleInfo;

View File

@ -53,8 +53,6 @@ NS_IMPL_ISUPPORTS1(nsSplashScreenGtk, nsISplashScreen)
nsSplashScreenGtk::nsSplashScreenGtk()
{
// if this fails, we exit
gdk_init(0, NULL);
}
nsSplashScreenGtk::~nsSplashScreenGtk()