码迷,mamicode.com
首页 > 其他好文 > 详细

A general "About" dialog src code paragraph in Gtk+ programming

时间:2015-01-02 10:59:02      阅读:233      评论:0      收藏:0      [点我收藏+]

标签:

GTK_CALLBACK void on_toolbutton_about_clicked(GtkWidget *btn, gpointer user_data)
{
 
   GtkWidget *about_dialog;
    GdkPixbuf *logo;
    GError *error=NULL;
    const gchar *author[]={"Guan Jiaying"};

    about_dialog=gtk_about_dialog_new();

    logo=gdk_pixbuf_new_from_file("k.ico",&error);
    if(!error)
        gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about_dialog),logo);
    else
    {
        g_print("Error:%s\n",error->message);
        g_error_free(error);
    }

    gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about_dialog),"Chinese Certification Document Editor");
    gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about_dialog),"v1.0");
    gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about_dialog),author);
    
    gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about_dialog),"Free license under Guan‘s approval");
    gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about_dialog),"(C) 2014 Guan");

    

    gtk_dialog_run(GTK_DIALOG(about_dialog));
    gtk_widget_destroy(about_dialog);

}

 

A general "About" dialog src code paragraph in Gtk+ programming

标签:

原文地址:http://www.cnblogs.com/kozmers/p/4198168.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!