标签:
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