Fix GtkPlug constructor (was not using the right object for

gtk_plug_construct()).
This commit is contained in:
Andrei Zmievski
2007-02-02 02:15:26 +00:00
parent 989e3cdfd8
commit d6eba797ba
2 changed files with 11 additions and 9 deletions
+9 -7
View File
@@ -4127,16 +4127,18 @@ PHP_METHOD
wrapped_obj = g_object_new(phpg_gtype_from_zval(this_ptr), NULL);
if (display) {
gtk_plug_construct_for_display(GTK_PLUG(PHPG_GOBJECT(this_ptr)),
GDK_DISPLAY(PHPG_GOBJECT(display)), socket_id);
} else {
gtk_plug_construct(GTK_PLUG(PHPG_GOBJECT(this_ptr)), socket_id);
}
if (!wrapped_obj) {
PHPG_THROW_CONSTRUCT_EXCEPTION(GtkPlug);
}
if (display) {
gtk_plug_construct_for_display(GTK_PLUG(wrapped_obj),
GDK_DISPLAY(PHPG_GOBJECT(display)), socket_id);
} else {
gtk_plug_construct(GTK_PLUG(wrapped_obj), socket_id);
}
phpg_gobject_set_wrapper(this_ptr, wrapped_obj TSRMLS_CC);
}
%% }}}
+2 -2
View File
@@ -23,13 +23,13 @@
#ifndef _PHP_GTK_H
#define _PHP_GTK_H
#include "php.h"
#include "php_ini.h"
#ifdef PHP_WIN32
#include "config.w32.h"
#else
#include "config.h"
#endif
#include "php.h"
#include "php_ini.h"
/* workaround for expat-related declaration in PHP compat file */
#ifdef lookup