Re: override for GtkFileSelection::get_selections()

From: Date: Sat, 04 Mar 2006 20:46:27 +0000
Subject: Re: override for GtkFileSelection::get_selections()
References: 1  Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-2489@lists.php.net to get a copy of this message
Hi, I committed the patch, although it had to be modified heavily. Check the CVS commits list if you want. -Andrei On Mar 3, 2006, at 5:35 AM, xxoes wrote:
%% override gtk_file_selection_get_selections PHP_METHOD { gchar **selections; gchar *cp_ret; gsize cp_len; zend_bool free_result; int i = 0; NOT_STATIC_METHOD(); if (!php_gtk_parse_args(ZEND_NUM_ARGS(), ""))
     return;
array_init(return_value); selections = gtk_file_selection_get_selections(GTK_FILE_SELECTION(PHPG_GOBJECT(this_ptr))); if (selections) {
     while(selections[i] && selections[i][0]) {
         cp_ret = phpg_from_utf8(selections[i], strlen(selections[i]), &cp_len, &free_result TSRMLS_CC);
         if (cp_ret) {
             add_next_index_string(return_value, cp_ret, cp_len);
         } else {
             php_error(E_WARNING, "%s::%s(): could not convert return value from UTF-8", get_active_class_name(NULL TSRMLS_CC), get_active_function_name(TSRMLS_C));
         }
         if (free_result) {
             g_free(cp_ret);
         }
         i++;
     }
     g_strfreev(selections);
} else {
     RETVAL_NULL();
} }


« previous php.gtk.dev (#2489) next »