com gtk/php-gtk: GtkWidget::list_mnemonic_labels() and a (probably) win32 fix for list_to plevels(): ext/gtk+/gtk.overrides

[email protected] (David Soria Parra)
Newsgroups php.gtk.cvs
Message-ID <[email protected]>
Commit:    1c77b99cd68d16d9edfd960b777f8196c0a66814
Author:    Christian Weiske <[email protected]>         Tue, 13 Jun 2006 13:23:11 +0000
Parents:   78d25dd9387bffbf53e44d98b5b6dfc4cd18593c
Branches:  master

Link:       http://git.php.net/?p=gtk/php-gtk.git;a=commitdiff;h=1c77b99cd68d16d9edfd960b777f8196c0a66814

Log:
GtkWidget::list_mnemonic_labels()
and a (probably) win32 fix for list_toplevels()

Changed paths:
  M  ext/gtk+/gtk.overrides


Diff:
1c77b99cd68d16d9edfd960b777f8196c0a66814
diff --git a/ext/gtk+/gtk.overrides b/ext/gtk+/gtk.overrides
index 0b095d8..55d41fe 100644
--- a/ext/gtk+/gtk.overrides
+++ b/ext/gtk+/gtk.overrides
@@ -3521,6 +3521,27 @@ PHP_METHOD
 }
 
 %%
+override gtk_widget_list_mnemonic_labels
+PHP_METHOD
+{
+    GList *labels;
+    gint i, len;
+    zval *php_item = NULL;
+
+    labels = gtk_widget_list_mnemonic_labels(GTK_WIDGET(PHPG_GOBJECT(this_ptr)));
+    len = g_list_length(labels);
+
+    array_init(return_value);
+    for (i = 0; i < len; i++) {
+        MAKE_STD_ZVAL(php_item);
+        phpg_gobject_new(&php_item, (GObject *)g_list_nth_data(labels, i) TSRMLS_CC);
+        add_next_index_zval(return_value, php_item);
+    }
+
+    g_list_free(labels);
+}
+
+%%
 override gtk_widget_path
 PHP_METHOD
 {
@@ -3750,12 +3771,13 @@ override gtk_window_list_toplevels
 PHP_METHOD
 {
     GList *list, *tmp;
+    zval *php_item = NULL;
 
     list = gtk_window_list_toplevels();
 
     array_init(return_value);
     for (tmp = list; tmp != NULL; tmp = tmp->next) {
-        zval *php_item = NULL;
+        MAKE_STD_ZVAL(php_item);
         phpg_gobject_new(&php_item, G_OBJECT(tmp->data) TSRMLS_CC);
         if (php_item == NULL) {
             g_list_free(list);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.