A general "About" dialog src code paragraph in Gtk+ programming
2015-01-02 10:14
211 查看
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 messagebox src code paragraph for debug in Gtk+ programming
- the solution about "messy code" in elicpse
- CodeProject: EasySize - Dialog resizing in no time!. Free source code and programming help
- the solution about "messy code" in elicpse
- CodeProject: EasySize - Dialog resizing in no time!. Free source code and programming help
- 音乐频谱显示 FFT of waveIn audio signals. Free source code and programming help
- "Thinking in Code" Audio Interviews now Available铪
- "Thinking in Code" Audio Interviews now Available
- "Thinking in Code" Audio Interviews now Available
- "Thinking in Code" Audio Interviews now Available
- Beginning Linux Programming----Knowledge about compiling the C files in Linux
- "Thinking in Code" Audio Interviews now Available铪
- General issues in using variables -- Code complete reading notes(10)
- About OK Code Values in SAP
- "Thinking in Code" Audio Interviews now Available铪
- "Thinking in Code" Audio Interviews now Available铪
- 啃"创建线程"一章的疑难解析: 通读Concurrent Programming in Java: Design Principles and Patterns (2)
- Thinking about a paper "A Refinement Approach to Handling Model Misfit in Text Categorization"
- use MyButton is simple,only add two file and then add some code just bellow in any dlg src declear the button control and will ok!
- Nullsoft Winamp Plug-in With Bitmapped UI, Docking and Restrictive Resizing - The Code Project - Dialog and Windows