GNOME Bugzilla – Bug 666815
Use GtkApplication
Last modified: 2014-01-24 01:54:40 UTC
Created attachment 267004 [details] [review] Patch to use GtkApplication and GMenu Patch to port to GtkApplication and to GMenu.
Review of attachment 267004 [details] [review]: Looks great, thanks a bunch! Some nitpicks: ::: src/main.c @@ +374,3 @@ +GAction *undo_action; +GAction *hint_action; +GAction *fullscreen_action; Can you move these to the top of the file? @@ +413,3 @@ stop_anim (); + + g_simple_action_set_enabled (((GSimpleAction *) undo_action), FALSE); Instead of (GSimpleAction *) x, can you use G_SIMPLE_ACTION (x)? (Everywhere it occurs.) @@ +587,2 @@ stop_anim (); + g_application_quit (G_APPLICATION(application)); Missing a space @@ +677,3 @@ + gtk_window_fullscreen (app); + else + gtk_window_unfullscreen (app); According to my compiler warnings, we're missing a cast: should be GTK_WINDOW (app) @@ +1199,3 @@ + {"preferences", on_settings_preferences, NULL, NULL, NULL}, + {"help", on_help_contents, NULL, NULL, NULL}, + {"about", on_help_about, NULL, NULL, NULL} The function signatures on all of the callbacks is wrong; this only works because the parameters are never used. You'll want to update these, e.g. static void on_settings_preferences (GSimpleAction *action, GVariant *parameter, gpointer user_data) { prefsbox_open (); } @@ +1358,3 @@ } + g_application_run (G_APPLICATION (application), argc, argv); You should use the return value from g_application_run() as the exit status for the program.
Created attachment 267068 [details] [review] Update patch with suggestions I have update the patch with the suggestions. Also modify the parameters of on_game_new as per compilation warning.
Looks good, thanks!