gnome-games r8191 - trunk/gnometris
- From: thomashpa svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8191 - trunk/gnometris
- Date: Thu, 23 Oct 2008 22:12:13 +0000 (UTC)
Author: thomashpa
Date: Thu Oct 23 22:12:12 2008
New Revision: 8191
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8191&view=rev
Log:
remove last bits of libgnome in gnometris and some indentation/includes cleanup
Modified:
trunk/gnometris/highscores.h
trunk/gnometris/main.cpp
trunk/gnometris/preview.h
trunk/gnometris/scoreframe.cpp
trunk/gnometris/tetris.h
Modified: trunk/gnometris/highscores.h
==============================================================================
--- trunk/gnometris/highscores.h (original)
+++ trunk/gnometris/highscores.h Thu Oct 23 22:12:12 2008
@@ -22,9 +22,8 @@
#ifndef HIGH_SCORES_H
#define HIGH_SCORES_H
-#include <gnome.h>
-#include <games-scores.h>
-#include <games-scores-dialog.h>
+#include <libgames-support/games-scores.h>
+#include <libgames-support/games-scores-dialog.h>
class HighScores {
protected:
Modified: trunk/gnometris/main.cpp
==============================================================================
--- trunk/gnometris/main.cpp (original)
+++ trunk/gnometris/main.cpp Thu Oct 23 22:12:12 2008
@@ -19,24 +19,29 @@
*/
#include <config.h>
+
+#include <libgames-support/games-scores.h>
+#include <libgames-support/games-sound.h>
+#include <libgames-support/games-conf.h>
+#include <libgames-support/games-runtime.h>
+
#include "tetris.h"
-#include <games-scores.h>
-#include <games-sound.h>
-#include <games-conf.h>
-#include <games-runtime.h>
int
main(int argc, char *argv[])
{
- g_thread_init (NULL);
+ gboolean retval;
+ GError *error = NULL;
+
+ g_thread_init (NULL);
- if (!games_runtime_init ("gnometris"))
- return 1;
+ if (!games_runtime_init ("gnometris"))
+ return 1;
setgid_io_init ();
- bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ bindtextdomain (GETTEXT_PACKAGE, games_runtime_get_directory (GAMES_RUNTIME_LOCALE_DIRECTORY));
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain(GETTEXT_PACKAGE);
int cmdlineLevel = 0;
@@ -49,19 +54,23 @@
GOptionContext *context = g_option_context_new (NULL);
+ g_option_context_add_group (context, gtk_get_option_group (TRUE));
g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
- games_sound_add_option_group (context);
+ games_sound_add_option_group (context);
- GnomeProgram *program = gnome_program_init ("gnometris", VERSION,
- LIBGNOMEUI_MODULE,
- argc, argv,
- GNOME_PARAM_GOPTION_CONTEXT, context,
- GNOME_PARAM_APP_DATADIR, DATADIR,
- NULL);
+ retval = g_option_context_parse (context, &argc, &argv, &error);
+ g_option_context_free (context);
+ if (!retval) {
+ g_print ("%s", error->message);
+ g_error_free (error);
+ return 1;
+ }
+
+ g_set_application_name (_("Five or More"));
gtk_window_set_default_icon_name ("gnome-gnometris");
- games_conf_initialise ("Gnometris");
+ games_conf_initialise ("Gnometris");
Tetris *t = new Tetris(cmdlineLevel);
@@ -69,11 +78,9 @@
delete t;
- games_conf_shutdown ();
-
- g_object_unref (program);
+ games_conf_shutdown ();
- games_runtime_shutdown ();
+ games_runtime_shutdown ();
return 0;
}
Modified: trunk/gnometris/preview.h
==============================================================================
--- trunk/gnometris/preview.h (original)
+++ trunk/gnometris/preview.h Thu Oct 23 22:12:12 2008
@@ -21,7 +21,6 @@
* For more details see the file COPYING.
*/
-#include <gnome.h>
#include "tetris.h"
#include "blockops.h"
#include "renderer.h"
Modified: trunk/gnometris/scoreframe.cpp
==============================================================================
--- trunk/gnometris/scoreframe.cpp (original)
+++ trunk/gnometris/scoreframe.cpp Thu Oct 23 22:12:12 2008
@@ -21,13 +21,12 @@
*/
#include <config.h>
-#include <gnome.h>
-#include <games-conf.h>
-#include <games-frame.h>
-#include "scoreframe.h"
-#include <games-sound.h>
+#include <libgames-support/games-conf.h>
+#include <libgames-support/games-frame.h>
+#include <libgames-support/games-sound.h>
+#include "scoreframe.h"
#include "tetris.h"
ScoreFrame::ScoreFrame(int cmdlLevel)
Modified: trunk/gnometris/tetris.h
==============================================================================
--- trunk/gnometris/tetris.h (original)
+++ trunk/gnometris/tetris.h Thu Oct 23 22:12:12 2008
@@ -22,9 +22,12 @@
*/
#include <config.h>
-#include <gnome.h>
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <games-conf.h>
+
+#include <libgames-support/games-conf.h>
#define KEY_OPTIONS_GROUP "options"
#define KEY_BG_COLOUR "bgcolor"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]