Created
May 24, 2013 22:43
-
-
Save dheaney/5646995 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static void spawnAboutDialog(GtkWidget *emitter, GtkWidget *aboutDialog); | |
| GtkWidget *help; | |
| GtkWidget *helpmenu; | |
| GtkWidget *aboutButton; | |
| GtkWidget *aboutDialog; | |
| helpmenu = gtk_menu_new(); | |
| help = gtk_menu_item_new_with_mnemonic("_Help"); | |
| aboutDialog = gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT, accel_group); | |
| gtk_menu_item_set_submenu(GTK_MENU_ITEM(help), helpmenu); | |
| gtk_menu_shell_append(GTK_MENU_SHELL(helpmenu), aboutButton); | |
| gtk_menu_shell_append(GTK_MENU_SHELL(menubar), help); | |
| g_signal_connect(aboutButton, "activate", G_CALLBACK(spawnAboutDialog), &aboutDialog); | |
| static void spawnAboutDialog(GtkWidget *emitter, GtkWidget *aboutDialog) { | |
| char version[5]; | |
| char *authors[] = { {"Mason Fabel"}, {"David Heaney"}, NULL }; | |
| sprintf(version, "%d.%d.%d", VERSION, MAJ_REV, MIN_REV); | |
| /* Create and configure the dialog */ | |
| aboutDialog = gtk_about_dialog_new(); | |
| gtk_about_dialog_set_program_name(aboutDialog, "GTKTacToe"); | |
| gtk_about_dialog_set_version(aboutDialog, version); | |
| gtk_about_dialog_set_copyright(aboutDialog, "Copyright (C) 2013 - Mason Fabel"); | |
| gtk_about_dialog_set_license_type(aboutDialog, GTK_LICENSE_GPL_2_0); | |
| gtk_about_dialog_set_website(aboutDialog, "https://github.com/mfabel/gtktactoe"); | |
| gtk_about_dialog_set_authors(aboutDialog, authors); | |
| /* Run the dialog and destroy it */ | |
| gtk_dialog_run(aboutDialog); | |
| gtk_widget_destroy(aboutDialog); | |
| return; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment