gnome-games r8050 - trunk/blackjack/src



Author: thomashpa
Date: Wed Oct 15 20:18:09 2008
New Revision: 8050
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8050&view=rev

Log:
rip out optional libgnome parts

Modified:
   trunk/blackjack/src/blackjack.cpp
   trunk/blackjack/src/menu.cpp

Modified: trunk/blackjack/src/blackjack.cpp
==============================================================================
--- trunk/blackjack/src/blackjack.cpp	(original)
+++ trunk/blackjack/src/blackjack.cpp	Wed Oct 15 20:18:09 2008
@@ -25,14 +25,11 @@
 #include <stdlib.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
+
 #include <games-conf.h>
 #include <games-stock.h>
 #include <games-runtime.h>
 
-#ifdef HAVE_GNOME
-#include <gnome.h>
-#endif
-
 #include "blackjack.h"
 #include "events.h"
 #include "draw.h"
@@ -665,10 +662,6 @@
                 { NULL }
         };
 
-        bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
-        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-        textdomain (GETTEXT_PACKAGE);
-
 #if defined(HAVE_GNOME) || defined(HAVE_RSVG_GNOMEVFS)
   /* If we're going to use gnome-vfs, we need to init threads before
    * calling any glib functions.
@@ -679,22 +672,17 @@
         if (!games_runtime_init ("blackjack"))
                 return 1;
 
+        bindtextdomain (GETTEXT_PACKAGE, games_runtime_get_directory (GAMES_RUNTIME_LOCALE_DIRECTORY));
+        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+        textdomain (GETTEXT_PACKAGE);
+
+
         context = g_option_context_new (NULL);
 #if GLIB_CHECK_VERSION (2, 12, 0)
         g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
 #endif
         g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
 
-
-#ifdef HAVE_GNOME
-        GnomeProgram *program;
-        program = gnome_program_init ("Blackjack", VERSION,
-                                      LIBGNOMEUI_MODULE,
-                                      argc, argv,
-                                      GNOME_PARAM_GOPTION_CONTEXT, context,
-                                      GNOME_PARAM_APP_DATADIR, DATADIR,
-                                      NULL);
-#else
         g_option_context_add_group (context, gtk_get_option_group (TRUE));
         retval = g_option_context_parse (context, &argc, &argv, &error);
         if (!retval) {
@@ -702,7 +690,6 @@
                 g_error_free (error);
                 goto cleanup;
         }
-#endif
 
         gtk_widget_push_colormap (gdk_rgb_get_colormap ());
 
@@ -727,10 +714,6 @@
 
         games_conf_shutdown ();
 
-#ifdef HAVE_GNOME
-        g_object_unref (program);
-#endif
-
         games_runtime_shutdown ();
 
         return 0;

Modified: trunk/blackjack/src/menu.cpp
==============================================================================
--- trunk/blackjack/src/menu.cpp	(original)
+++ trunk/blackjack/src/menu.cpp	Wed Oct 15 20:18:09 2008
@@ -25,9 +25,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <glib/gi18n.h>
-#ifdef HAVE_GNOME
-#include <gnome.h>
-#endif
+#include <gtk/gtk.h>
 
 using namespace std;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]