Use gdk_screen_init as instance_init, not base_init! (Fix from Frederic

2005-08-25  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkscreen.c (gdk_screen_get_type): Use gdk_screen_init
        as instance_init, not base_init! (Fix from Frederic Crozat,
        reported by Joe Marcus Clarke). Trivial cleanup: use -1.
        rather than -1 for a negative flag value.
This commit is contained in:
Owen Taylor 2005-08-25 17:53:15 +00:00 committed by Owen Taylor
parent 43a1b6e44b
commit 715b0e870a
3 changed files with 19 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2005-08-25 Owen Taylor <otaylor@redhat.com>
* gdk/gdkscreen.c (gdk_screen_get_type): Use gdk_screen_init
as instance_init, not base_init! (Fix from Frederic Crozat,
reported by Joe Marcus Clarke). Trivial cleanup: use -1.
rather than 1 for a negative flag value.
2005-08-24 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpango.c (draw_error_underline): Add a note about

View File

@ -1,3 +1,10 @@
2005-08-25 Owen Taylor <otaylor@redhat.com>
* gdk/gdkscreen.c (gdk_screen_get_type): Use gdk_screen_init
as instance_init, not base_init! (Fix from Frederic Crozat,
reported by Joe Marcus Clarke). Trivial cleanup: use -1.
rather than 1 for a negative flag value.
2005-08-24 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpango.c (draw_error_underline): Add a note about

View File

@ -53,14 +53,14 @@ gdk_screen_get_type (void)
static const GTypeInfo object_info =
{
sizeof (GdkScreenClass),
(GBaseInitFunc) gdk_screen_init,
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gdk_screen_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GdkScreen),
0, /* n_preallocs */
(GInstanceInitFunc) NULL,
(GInstanceInitFunc) gdk_screen_init,
};
object_type = g_type_register_static (G_TYPE_OBJECT,
@ -103,7 +103,7 @@ gdk_screen_class_init (GdkScreenClass *klass)
static void
gdk_screen_init (GdkScreen *screen)
{
screen->resolution = -1;
screen->resolution = -1.;
}
static void
@ -407,7 +407,7 @@ gdk_screen_set_resolution_libgtk_only (GdkScreen *screen,
if (dpi >= 0)
screen->resolution = dpi;
else
screen->resolution = -1;
screen->resolution = -1.;
}
/**
@ -423,7 +423,7 @@ gdk_screen_set_resolution_libgtk_only (GdkScreen *screen,
gdouble
gdk_screen_get_resolution_libgtk_only (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), -1);
g_return_val_if_fail (GDK_IS_SCREEN (screen), -1.);
return screen->resolution;
}