gtk: move _gtk_modules_has_mixed_deps() to gtkmodlesprivate.h

and remove gtkmainprivate.h completely.
This commit is contained in:
Michael Natterer 2011-10-23 13:57:07 +02:00
parent 2688ccdbc4
commit 5c4f2ef0c1
25 changed files with 39 additions and 86 deletions

View File

@ -416,7 +416,6 @@ gtk_private_h_sources = \
gtkimcontextsimpleseqs.h \
gtkintl.h \
gtkkeyhash.h \
gtkmainprivate.h \
gtkmenuprivate.h \
gtkmenuitemprivate.h \
gtkmenushellprivate.h \

View File

@ -49,7 +49,7 @@
#include "gtktextview.h"
#include "gtkiconfactory.h"
#include "gtkshow.h"
#include "gtkmainprivate.h"
#include "gtkmain.h"
#include "gtkmessagedialog.h"
#include "gtktogglebutton.h"
#include "gtktypebuiltins.h"

View File

@ -33,7 +33,6 @@
#include "gtkaccellabel.h"
#include "gtkaccelmap.h"
#include "gtkintl.h"
#include "gtkmainprivate.h"
#include "gtkmarshalers.h"
#include "gtkprivate.h"

View File

@ -41,7 +41,6 @@
#include "gtkseparator.h"
#include "gtkwindow.h"
#include "gtktypebuiltins.h"
#include "gtkmainprivate.h"
#include "gtkprivate.h"
#include <gobject/gvaluecollector.h>

View File

@ -82,7 +82,7 @@
#include "gtkbox.h"
#include "gtkwindow.h"
#include "gtkentry.h"
#include "gtkmainprivate.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkprivate.h"

View File

@ -35,7 +35,6 @@
#include "gtkimmodule.h"
#include "gtkimcontextsimple.h"
#include "gtksettings.h"
#include "gtkmainprivate.h"
#include "gtkprivate.h"
#include "gtkintl.h"

View File

@ -31,7 +31,6 @@
#include "gtklabel.h"
#include "gtkaccellabel.h"
#include "gtkdnd.h"
#include "gtkmainprivate.h"
#include "gtkmarshalers.h"
#include "gtkpango.h"
#include "gtkwindow.h"

View File

@ -55,7 +55,7 @@
#include "gtkdnd.h"
#include "gtkimagemenuitem.h"
#include "gtklabel.h"
#include "gtkmainprivate.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkmenu.h"
#include "gtkmenuitem.h"

View File

@ -91,9 +91,6 @@
#include "config.h"
#include "gtkmainprivate.h"
#include <glib.h>
#include "gdk/gdk.h"
#include <locale.h>
@ -117,19 +114,20 @@
#include "gtkaccelmap.h"
#include "gtkbox.h"
#include "gtkclipboard.h"
#include "gtkdebug.h"
#include "gtkdnd.h"
#include "gtkversion.h"
#include "gtkmain.h"
#include "gtkmenu.h"
#include "gtkmodules.h"
#include "gtkmodulesprivate.h"
#include "gtkprivate.h"
#include "gtkrecentmanager.h"
#include "gtkselectionprivate.h"
#include "gtksettingsprivate.h"
#include "gtktooltip.h"
#include "gtkversion.h"
#include "gtkwidgetprivate.h"
#include "gtkwindowprivate.h"
#include "gtktooltip.h"
#include "gtkdebug.h"
#include "gtkmenu.h"
#include "gtkprivate.h"
/* Private type definitions
@ -622,32 +620,6 @@ setlocale_initialization (void)
}
}
/* Return TRUE if module_to_check causes version conflicts.
* If module_to_check is NULL, check the main module.
*/
gboolean
_gtk_module_has_mixed_deps (GModule *module_to_check)
{
GModule *module;
gpointer func;
gboolean result;
if (!module_to_check)
module = g_module_open (NULL, 0);
else
module = module_to_check;
if (g_module_symbol (module, "gtk_progress_get_type", &func))
result = TRUE;
else
result = FALSE;
if (!module_to_check)
g_module_close (module);
return result;
}
static void
do_pre_parse_initialization (int *argc,
char ***argv)

View File

@ -1,30 +0,0 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2011 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __GTK_MAIN_PRIVATE_H__
#define __GTK_MAIN_PRIVATE_H__
#include "gtkmain.h"
G_BEGIN_DECLS
gboolean _gtk_module_has_mixed_deps (GModule *module);
G_END_DECLS
#endif /* __GTK_MAIN_PRIVATE_H__ */

View File

@ -42,7 +42,6 @@
#include "gtkbindings.h"
#include "gtkkeyhash.h"
#include "gtklabel.h"
#include "gtkmainprivate.h"
#include "gtkmarshalers.h"
#include "gtkmenubar.h"
#include "gtkmenuitemprivate.h"

View File

@ -27,7 +27,7 @@
#include "gtksettings.h"
#include "gtkdebug.h"
#include "gtkprivate.h"
#include "gtkmainprivate.h"
#include "gtkmodulesprivate.h"
#include "gtkintl.h"
#include <gmodule.h>
@ -599,3 +599,29 @@ _gtk_modules_settings_changed (GtkSettings *settings,
new_modules,
settings_destroy_notify);
}
/* Return TRUE if module_to_check causes version conflicts.
* If module_to_check is NULL, check the main module.
*/
gboolean
_gtk_module_has_mixed_deps (GModule *module_to_check)
{
GModule *module;
gpointer func;
gboolean result;
if (!module_to_check)
module = g_module_open (NULL, 0);
else
module = module_to_check;
if (g_module_symbol (module, "gtk_progress_get_type", &func))
result = TRUE;
else
result = FALSE;
if (!module_to_check)
g_module_close (module);
return result;
}

View File

@ -39,6 +39,8 @@ void _gtk_modules_init (gint *argc,
void _gtk_modules_settings_changed (GtkSettings *settings,
const gchar *modules);
gboolean _gtk_module_has_mixed_deps (GModule *module);
G_END_DECLS
#endif /* __GTK_MODULES_PRIVATE_H__ */

View File

@ -25,7 +25,6 @@
#include "gtkoverlay.h"
#include "gtkbuildable.h"
#include "gtkscrolledwindow.h"
#include "gtkmainprivate.h"
#include "gtkmarshalers.h"
#include "gtkprivate.h"

View File

@ -31,7 +31,6 @@
#include "gtkmarshalers.h"
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkmainprivate.h"
#include "gtkmessagedialog.h"
#include "gtktypebuiltins.h"

View File

@ -30,7 +30,6 @@
#include <stdio.h>
#include <math.h>
#include "gtkmainprivate.h"
#include "gtkmarshalers.h"
#include "gtkorientableprivate.h"
#include "gtkrange.h"

View File

@ -41,7 +41,6 @@
#include "gtkintl.h"
#include "gtkbuildable.h"
#include "gtkbuilderprivate.h"
#include "gtkmainprivate.h"
#include "a11y/gtkscaleaccessible.h"

View File

@ -31,7 +31,6 @@
#include <string.h>
#include "gtkmainprivate.h"
#include "gtkmarshalers.h"
#include "gtksizerequest.h"
#include "gtkplug.h"

View File

@ -38,7 +38,6 @@
#include "gtkbindings.h"
#include "gtkspinbutton.h"
#include "gtkentryprivate.h"
#include "gtkmainprivate.h"
#include "gtkmarshalers.h"
#include "gtksettings.h"
#include "gtkprivate.h"

View File

@ -51,7 +51,6 @@
#include "gtktextattributes.h"
#include "gtkmainprivate.h"
#include "gtktexttag.h"
#include "gtktexttypes.h"

View File

@ -68,7 +68,6 @@
#include <stdlib.h>
#include <string.h>
#include "gtkmainprivate.h"
#include "gtktexttag.h"
#include "gtktexttypes.h"
#include "gtktexttagtable.h"

View File

@ -42,7 +42,7 @@
#include "gtkcontainerprivate.h"
#include "gtkimage.h"
#include "gtklabel.h"
#include "gtkmainprivate.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkmenu.h"
#include "gtkorientable.h"

View File

@ -32,7 +32,6 @@
#include "gtksizerequest.h"
#include "gtkactivatable.h"
#include "gtkintl.h"
#include "gtkmainprivate.h"
#include "gtkprivate.h"

View File

@ -28,7 +28,6 @@
#include "gtktreednd.h"
#include "gtktreeprivate.h"
#include "gtkcellrenderer.h"
#include "gtkmainprivate.h"
#include "gtkmarshalers.h"
#include "gtkbuildable.h"
#include "gtkbutton.h"

View File

@ -39,7 +39,6 @@
#include "gtkclipboard.h"
#include "gtkiconfactory.h"
#include "gtkintl.h"
#include "gtkmainprivate.h"
#include "gtkmarshalers.h"
#include "gtkselectionprivate.h"
#include "gtksettingsprivate.h"