mirror of
https://github.com/php/php-gtk-src.git
synced 2026-04-28 19:43:19 +02:00
Fix GtkPlug constructor (was not using the right object for
gtk_plug_construct()).
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user