logo       

Re: More Patches: GtkAboutDialog: msg#00205

Subject: Re: More Patches: GtkAboutDialog
No, I meant, patch.diff.txt, so that mailing list software lets it through.

-Andrei

On Mar 23, 2006, at 9:07 AM, Anant Narayanan wrote:

Andrei,

I just realised that by ".txt" attachment you might have meant: "not a
diff", and so I'm attaching a plain txt attachment just in case.

Regards,
-- Anant

Find Freedom, Go Open Source!
http://www.kix.in/
%% {{{ GtkAboutDialog

%%
override gtk_about_dialog_get_artists
PHP_METHOD
{
    gchar **artists;

    NOT_STATIC_METHOD();

    if (!php_gtk_parse_args(ZEND_NUM_ARGS(), ""))
        return;

artists = (gchar **)gtk_about_dialog_get_artists(GTK_ABOUT_DIALOG(PHPG_GOBJECT(this_ptr) ));

    if (artists) {
        array_init(return_value);
        while (*artists) {
            add_next_index_string(return_value, *artists, 1);
            *artists++;
        }
    } else {
        RETURN_NULL();
    }
}

%%
override gtk_about_dialog_get_authors
PHP_METHOD
{
    gchar **authors;

    NOT_STATIC_METHOD();

    if (!php_gtk_parse_args(ZEND_NUM_ARGS(), ""))
        return;

authors = (gchar **)gtk_about_dialog_get_authors(GTK_ABOUT_DIALOG(PHPG_GOBJECT(this_ptr) ));

    if (authors) {
        array_init(return_value);
        while (*authors) {
            add_next_index_string(return_value, *authors, 1);
            *authors++;
        }
    } else {
        RETURN_NULL();
    }
}

%%
override gtk_about_dialog_get_documenters
PHP_METHOD
{
    gchar **doccers;

    NOT_STATIC_METHOD();

    if (!php_gtk_parse_args(ZEND_NUM_ARGS(), ""))
        return;

doccers = (gchar **)gtk_about_dialog_get_documenters(GTK_ABOUT_DIALOG(PHPG_GOBJECT(this_ ptr)));

    if (doccers) {
        array_init(return_value);
        while (*doccers) {
            add_next_index_string(return_value, *doccers, 1);
            *doccers++;
        }
    } else {
        RETURN_NULL();
    }
}

%%
override gtk_about_dialog_set_artists
PHP_METHOD
{
    gchar **artists;
    zval *arr = NULL;
    zval **data;
    int i, arr_count;

    if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a", &arr)) {
        return;
    }

    if (arr) {
        arr_count = zend_hash_num_elements(Z_ARRVAL_P(arr));
            artists = safe_emalloc(arr_count+1, sizeof (gchar *), 0);
        
        for (i=0, zend_hash_internal_pointer_reset(Z_ARRVAL_P(arr));
zend_hash_get_current_data(Z_ARRVAL_P(arr), (void **)&data) == SUCCESS;
             zend_hash_move_forward(Z_ARRVAL_P(arr))) {

                convert_to_string_ex(data);
                artists[i++] = Z_STRVAL_PP(data);

        }

        artists[i] = NULL;
gtk_about_dialog_set_artists(GTK_ABOUT_DIALOG(PHPG_GOBJECT(this_ptr)), (const gchar **)artists);
        efree(artists);
        
    } else {
        RETURN_NULL();
    }
}

%%
override gtk_about_dialog_set_authors
PHP_METHOD
{
    gchar **authors;
    zval *arr = NULL;
    zval **data;
    int i, arr_count;

    if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a", &arr)) {
        return;
    }

    if (arr) {
        arr_count = zend_hash_num_elements(Z_ARRVAL_P(arr));
            authors = safe_emalloc(arr_count+1, sizeof (gchar *), 0);
        
        for (i=0, zend_hash_internal_pointer_reset(Z_ARRVAL_P(arr));
zend_hash_get_current_data(Z_ARRVAL_P(arr), (void **)&data) == SUCCESS;
             zend_hash_move_forward(Z_ARRVAL_P(arr))) {

                convert_to_string_ex(data);
                authors[i++] = Z_STRVAL_PP(data);

        }

        authors[i] = NULL;
gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(PHPG_GOBJECT(this_ptr)), (const gchar **)authors);
        efree(authors);
        
    } else {
        RETURN_NULL();
    }
}

%%
override gtk_about_dialog_set_documenters
PHP_METHOD
{
    gchar **doccers;
    zval *arr = NULL;
    zval **data;
    int i, arr_count;

    if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a", &arr)) {
        return;
    }

    if (arr) {
        arr_count = zend_hash_num_elements(Z_ARRVAL_P(arr));
            doccers = safe_emalloc(arr_count+1, sizeof (gchar *), 0);
        
        for (i=0, zend_hash_internal_pointer_reset(Z_ARRVAL_P(arr));
zend_hash_get_current_data(Z_ARRVAL_P(arr), (void **)&data) == SUCCESS;
             zend_hash_move_forward(Z_ARRVAL_P(arr))) {

                convert_to_string_ex(data);
                doccers[i++] = Z_STRVAL_PP(data);

        }

        doccers[i] = NULL;
gtk_about_dialog_set_documenters(GTK_ABOUT_DIALOG(PHPG_GOBJECT(this_ptr )), (const gchar **)doccers);
        efree(doccers);
        
    } else {
        RETURN_NULL();
    }
}

%% }}}


--
PHP-GTK Development Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe