Re: Patches: GtkNotebook::query_tab_label_packing(), GtkBox::query_child_packing()
| From: | Andrei Zmievski | Date: | Mon, 23 Jan 2006 22:59:16 +0000 |
| Subject: | Re: Patches: GtkNotebook::query_tab_label_packing(), GtkBox::query_child_packing() | ||
| References: | 1 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-2287@lists.php.net to get a copy of this message | ||
This is not quite correct. You want this:
if (!model) {
wrapped_obj = (GObject *) g_object_new(phpg_gtype_from_zval(this_ptr), NULL);
} else {
wrapped_obj = (GObject *) g_object_new(phpg_gtype_from_zval(this_ptr), "model", GTK_TREE_MODEL(PHPG_GOBJECT(model)), NULL);
}
When you use an explicit constructor like gtk_combo_box_new_with_model() you basically disallow users to inherit classes from this one and make them work properly..
-Andrei
On Jan 22, 2006, at 1:18 PM, Christian Weiske wrote:
+ if (!model) {
+ wrapped_obj = (GObject *) g_object_newv(phpg_gtype_from_zval(this_ptr), 0, NULL);
+ } else {
+ wrapped_obj = (GObject *) gtk_combo_box_new_with_model(GTK_TREE_MODEL(PHPG_GOBJECT(model)));
+ }