don't include "gtkprivate.h" to avoid differing definitions of

2007-01-13  Hans Breuer <hans@breuer.org>

	* gtk/gtkimmulticontext.c : don't include "gtkprivate.h" to avoid
	differing definitions of GTK_LOCALEDIR (bug #396175).

	* gtk/gtktreeview.c : use g_snprintf instead of snprintf, which is
	not available everywhere

	* gtk/makefile.msc.in : updated

svn path=/trunk/; revision=17137
This commit is contained in:
Hans Breuer 2007-01-13 21:13:28 +00:00 committed by Hans Breuer
parent adcdfcd59f
commit 3f403cde24
4 changed files with 48 additions and 12 deletions

View File

@ -1,3 +1,13 @@
2007-01-13 Hans Breuer <hans@breuer.org>
* gtk/gtkimmulticontext.c : don't include "gtkprivate.h" to avoid
differing definitions of GTK_LOCALEDIR (bug #396175).
* gtk/gtktreeview.c : use g_snprintf instead of snprintf, which is
not available everywhere
* gtk/makefile.msc.in : updated
2007-01-12 Michael Natterer <mitch@imendio.com> 2007-01-12 Michael Natterer <mitch@imendio.com>
* gtk/gtkentry.c (gtk_entry_button_press): don't add * gtk/gtkentry.c (gtk_entry_button_press): don't add

View File

@ -27,9 +27,17 @@
#include "gtkmain.h" #include "gtkmain.h"
#include "gtkradiomenuitem.h" #include "gtkradiomenuitem.h"
#include "gtkintl.h" #include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkalias.h" #include "gtkalias.h"
/* Do *not* include "gtkprivate.h" in this file. If you do, the
* the two definitions of GTK_LOCALEDIR will trigger a wrong
* warning in gtk_im_multicontext_append_menuitems()
*/
#ifdef __GTK_PRIVATE_H__
#error gtkprivate.h should not be included in this file
#endif
struct _GtkIMMulticontextPrivate struct _GtkIMMulticontextPrivate
{ {
GdkWindow *client_window; GdkWindow *client_window;

View File

@ -4390,13 +4390,13 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
* less messy way). * less messy way).
*/ */
if (is_first && is_last) if (is_first && is_last)
snprintf (new_detail, 127, "%s", detail); g_snprintf (new_detail, 127, "%s", detail);
else if (is_first) else if (is_first)
snprintf (new_detail, 127, "%s_start", detail); g_snprintf (new_detail, 127, "%s_start", detail);
else if (is_last) else if (is_last)
snprintf (new_detail, 127, "%s_end", detail); g_snprintf (new_detail, 127, "%s_end", detail);
else else
snprintf (new_detail, 128, "%s_middle", detail); g_snprintf (new_detail, 128, "%s_middle", detail);
gtk_paint_flat_box (widget->style, gtk_paint_flat_box (widget->style,
event->window, event->window,

View File

@ -37,7 +37,9 @@ DEFINES = \
-DPANGO_ENABLE_BACKEND \ -DPANGO_ENABLE_BACKEND \
-DGTK_VERSION=\"$(GTK_VER)\" -DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\" \ -DGTK_VERSION=\"$(GTK_VER)\" -DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\" \
-DGTK_HOST=\"win32\" \ -DGTK_HOST=\"win32\" \
-DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED \
-DGTK_PRINT_BACKENDS=\"file,lpr\" \
-DGTK_PRINT_PREVIEW_COMMAND="\"evince --unlink-tempfile --preview %f\""
TOUCH = copy makefile.msc+nul TOUCH = copy makefile.msc+nul
@ -135,6 +137,7 @@ gtk_OBJECTS = \
gtkfilechooserdialog.obj \ gtkfilechooserdialog.obj \
gtkfilechooserembed.obj \ gtkfilechooserembed.obj \
gtkfilechooserentry.obj \ gtkfilechooserentry.obj \
gtkfilechoosersettings.obj \
gtkfilechooserutils.obj \ gtkfilechooserutils.obj \
gtkfilechooserwidget.obj \ gtkfilechooserwidget.obj \
gtkfilefilter.obj \ gtkfilefilter.obj \
@ -194,12 +197,21 @@ gtk_OBJECTS = \
gtkobject.obj \ gtkobject.obj \
gtkoldeditable.obj \ gtkoldeditable.obj \
gtkoptionmenu.obj \ gtkoptionmenu.obj \
gtkpagesetup.obj \
gtkpaned.obj \ gtkpaned.obj \
gtkpapersize.obj \
gtkpathbar.obj \ gtkpathbar.obj \
gtkpixmap.obj \ gtkpixmap.obj \
gtkplug.obj \ gtkplug.obj \
gtkplug-win32.obj \ gtkplug-win32.obj \
gtkpreview.obj \ gtkpreview.obj \
gtkprint-win32.obj \
gtkprintcontext.obj \
gtkprintoperation.obj \
gtkprintoperationpreview.obj \
gtkprintoperation-win32.obj \
gtkprintsettings.obj \
gtkprintutils.obj \
gtkprogress.obj \ gtkprogress.obj \
gtkprogressbar.obj \ gtkprogressbar.obj \
gtkradioaction.obj \ gtkradioaction.obj \
@ -289,6 +301,7 @@ gtk_OBJECTS = \
gtkvseparator.obj \ gtkvseparator.obj \
gtkwidget.obj \ gtkwidget.obj \
gtkwin32embed.obj \ gtkwin32embed.obj \
gtkwin32embedwidget.obj \
gtkwindow.obj \ gtkwindow.obj \
gtkwindow-decorate.obj gtkwindow-decorate.obj
@ -399,10 +412,15 @@ gtk_public_h_sources = \
gtkobject.h \ gtkobject.h \
gtkoldeditable.h \ gtkoldeditable.h \
gtkoptionmenu.h \ gtkoptionmenu.h \
gtkpagesetup.h \
gtkpaned.h \ gtkpaned.h \
gtkpapersize.h \
gtkpixmap.h \ gtkpixmap.h \
gtkplug.h \ gtkplug.h \
gtkpreview.h \ gtkpreview.h \
gtkprintcontext.h \
gtkprintoperation.h \
gtkprintsettings.h \
gtkprivate.h \ gtkprivate.h \
gtkprogress.h \ gtkprogress.h \
gtkprogressbar.h \ gtkprogressbar.h \
@ -503,8 +521,8 @@ generated : $(GENERATED)
gtk.def: gtk.symbols makefile.msc gtk.def: gtk.symbols makefile.msc
echo EXPORTS > gtk.def echo EXPORTS > gtk.def
cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES \ cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES \
-DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= \ -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \
gtk.symbols >> gtk.def -DG_GNUC_PRINTF=;G_GNUC_PRINTF gtk.symbols >> gtk.def
gtkalias.h: gtk.symbols gtkalias.h: gtk.symbols
cl /EP -DG_OS_WIN32 -DGTK_WINDOWING_WIN32 -DINCLUDE_INTERNAL_SYMBOLS gtk.symbols | $(PERL) makegtkalias.pl > gtkalias.h cl /EP -DG_OS_WIN32 -DGTK_WINDOWING_WIN32 -DINCLUDE_INTERNAL_SYMBOLS gtk.symbols | $(PERL) makegtkalias.pl > gtkalias.h
@ -564,7 +582,7 @@ libgtk-win32-$(GTK_VER)-0.dll : $(gtk_OBJECTS) gtk.def gtk-win32.res
$(CC) $(CFLAGS) -LD -Fm -Fe$@ $(gtk_OBJECTS) gtk-win32.res \ $(CC) $(CFLAGS) -LD -Fm -Fe$@ $(gtk_OBJECTS) gtk-win32.res \
$(GDK_LIBS) $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(INTL_LIBS) $(GLIB_LIBS) $(GMODULE_LIBS) \ $(GDK_LIBS) $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(INTL_LIBS) $(GLIB_LIBS) $(GMODULE_LIBS) \
$(CAIRO_LIBS) $(PANGOCAIRO_LIBS) \ $(CAIRO_LIBS) $(PANGOCAIRO_LIBS) \
gdi32.lib user32.lib advapi32.lib wsock32.lib shell32.lib ole32.lib \ gdi32.lib user32.lib advapi32.lib wsock32.lib shell32.lib ole32.lib comdlg32.lib winspool.lib comctl32.lib \
$(LDFLAGS) /implib:gtk-win32-$(GTK_VER).lib /def:gtk.def $(LDFLAGS) /implib:gtk-win32-$(GTK_VER).lib /def:gtk.def
gtk-win32-$(GTK_VER)s.lib : $(gtk_OBJECTS) gtk-win32-$(GTK_VER)s.lib : $(gtk_OBJECTS)
@ -574,14 +592,14 @@ gtk-query-immodules-$(GTK_VER).exe : queryimmodules.obj
$(CC) $(CFLAGS) -Fe$@ queryimmodules.obj $(GTK_LIBS) $(GLIB_LIBS) $(PANGO_LIBS) $(LDFLAGS) $(CC) $(CFLAGS) -Fe$@ queryimmodules.obj $(GTK_LIBS) $(GLIB_LIBS) $(PANGO_LIBS) $(LDFLAGS)
gtk-update-icon-cache.exe : updateiconcache.obj gtk-update-icon-cache.exe : updateiconcache.obj
$(CC) $(CFLAGS) -Fe$@ updateiconcache.obj $(GDK_PIXBUF_LIBS) $(GLIB_LIBS) $(PANGO_LIBS) $(LDFLAGS) $(CC) $(CFLAGS) -Fe$@ updateiconcache.obj $(GDK_PIXBUF_LIBS) $(GLIB_LIBS) $(INTL_LIBS) $(PANGO_LIBS) $(LDFLAGS)
gtk-x11-$(GTK_VER).dll : $(gtk_OBJECTS) gtk.def gtk-x11-$(GTK_VER).dll : $(gtk_OBJECTS) gtk.def
$(CC) $(CFLAGS) -LD -Fm -Fegtk-x11-$(GTK_VER).dll $(gtk_OBJECTS) ../gdk/gdk-x11-$(GTK_VER).lib $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(INTL_LIBS) $(GLIB_LIBS) gdi32.lib user32.lib advapi32.lib $(LDFLAGS) /def:gtk.def $(CC) $(CFLAGS) -LD -Fm -Fegtk-x11-$(GTK_VER).dll $(gtk_OBJECTS) ../gdk/gdk-x11-$(GTK_VER).lib $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(INTL_LIBS) $(GLIB_LIBS) gdi32.lib user32.lib advapi32.lib $(LDFLAGS) /def:gtk.def
# General rule for compiling the objects into the DLL # General rule for compiling the objects into the DLL
.c.obj : .c.obj :
$(CC) $(CFLAGS) -Gf -Zm400 -GD -c -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\" $< $(CC) $(CFLAGS) -GF -Zm400 -GD -c -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\" $<
$(EXAMPLE).obj : ..\examples\$(EXAMPLE)\$(EXAMPLE).c $(EXAMPLE).obj : ..\examples\$(EXAMPLE)\$(EXAMPLE).c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"$(EXAMPLE)\" ..\examples\$(EXAMPLE)\$(EXAMPLE).c $(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"$(EXAMPLE)\" ..\examples\$(EXAMPLE)\$(EXAMPLE).c