[aisleriot] Remove hildon platform support
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] Remove hildon platform support
- Date: Tue, 12 Apr 2011 16:46:48 +0000 (UTC)
commit f1e95fbcbc2454f0b26b384de28365bbaaea3571
Author: Christian Persch <chpe gnome org>
Date: Tue Apr 12 14:43:28 2011 +0200
Remove hildon platform support
Since it uses gtk+-2.0 which isn't supported anymore.
configure.ac | 119 +------
data/Makefile.am | 16 +-
data/icons/Makefile.am | 8 +-
data/icons/hildon/Makefile.am | 63 ----
.../hildon/hicolor_apps_16x16_gnome-aisleriot.png | Bin 699 -> 0 bytes
.../hildon/hicolor_apps_26x26_gnome-aisleriot.png | Bin 1238 -> 0 bytes
.../hildon/hicolor_apps_34x34_gnome-aisleriot.png | Bin 1458 -> 0 bytes
.../hildon/hicolor_apps_40x40_gnome-aisleriot.png | Bin 2092 -> 0 bytes
.../hildon/hicolor_apps_50x50_gnome-aisleriot.png | Bin 2707 -> 0 bytes
.../hicolor_apps_scalable_gnome-aisleriot.png | Bin 3757 -> 0 bytes
src/Makefile.am | 52 +---
src/aisleriot-backup.conf | 5 -
src/aisleriot-clean.sh | 6 -
src/ar-clutter-embed.c | 15 +-
src/ar-cursor.c | 8 -
src/ar-game-chooser.c | 66 +----
src/ar-stock.c | 44 +---
src/ar-style-private.h | 4 -
src/board-noclutter.c | 97 +------
src/board.c | 12 +-
src/conf.c | 4 -
src/gtkrc-maemo | 19 --
src/lib/Makefile.am | 24 +--
src/lib/ar-card-theme-fixed.c | 9 -
src/lib/ar-card-theme.c | 2 -
src/lib/ar-conf.c | 8 -
src/lib/ar-gsettings.c | 4 +-
src/lib/ar-runtime.c | 55 ----
src/lib/ar-runtime.h | 12 +-
src/lib/ar-show.c | 25 --
src/org.gnome.Games.AisleRiot.service.in | 3 -
src/sol.c | 174 -----------
src/stats-dialog.c | 8 +-
src/window.c | 327 ++------------------
src/window.h | 16 -
35 files changed, 76 insertions(+), 1129 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 74e26f1..1945ec5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,54 +66,19 @@ AC_DEFINE_UNQUOTED([LSB_DISTRIBUTION],["$LSB_DISTRIBUTION"],[The full distributi
AC_MSG_CHECKING([for which platform to build])
AC_ARG_WITH([platform],
- [AS_HELP_STRING([--with-platform=gnome|hildon|gtk-only (default: gnome)])],
+ [AS_HELP_STRING([--with-platform=gnome|gtk-only (default: gnome)])],
[case "$withval" in
- gnome|hildon|gtk-only) ;;
- maemo) with_platform=hildon with_platform_variant=maemo3 ;; # compat
+ gnome|gtk-only) ;;
*) AC_MSG_ERROR([invalid argument "$withval" for --with-platform]) ;;
esac],
[with_platform=gnome])
AC_MSG_RESULT([$with_platform])
-if test "$with_platform" = "hildon"; then
- # "maemo" is Maemo 4.x
- AC_MSG_CHECKING([for which platform variant to build])
- AC_ARG_WITH([platform-variant],
- [AS_HELP_STRING([--with-platform-variant=maemo3|maemo4|maemo5|mid (default: maemo4)])],
- [case "$withval" in
- maemo5|maemo4|maemo3|mid) ;;
- *) with_platform_variant=maemo4 ;;
- esac],
- [with_platform_variant=maemo3])
- AC_MSG_RESULT([$with_platform_variant])
-fi
-
AM_CONDITIONAL([HAVE_GNOME],[test "$with_platform" = "gnome"])
-AM_CONDITIONAL([HAVE_HILDON],[test "$with_platform" = "hildon"])
-AM_CONDITIONAL([HAVE_MAEMO],[test "$with_platform" = "hildon" -a "$with_platform_variant" != "mid"])
-AM_CONDITIONAL([HAVE_MAEMO_3],[test "$with_platform" = "hildon" -a "$with_platform_variant" = "maemo3"])
-AM_CONDITIONAL([HAVE_MAEMO_4],[test "$with_platform" = "hildon" -a "$with_platform_variant" = "maemo4"])
-AM_CONDITIONAL([HAVE_MAEMO_5],[test "$with_platform" = "hildon" -a "$with_platform_variant" = "maemo5"])
if test "$with_platform" = "gnome"; then
AC_DEFINE([HAVE_GNOME],[1],[Define if GNOME support is enabled])
fi
-if test "$with_platform" = "hildon"; then
- AC_DEFINE([HAVE_HILDON],[1],[Define if Hildon support is enabled])
-
- if test "$with_platform_variant" != "mid"; then
- AC_DEFINE([HAVE_MAEMO],[1],[Define if Maemo support is enabled])
- fi
- if test "$with_platform_variant" = "maemo3"; then
- AC_DEFINE([HAVE_MAEMO_3],[1],[Define if Maemo 3.x support is enabled])
- fi
- if test "$with_platform_variant" = "maemo4"; then
- AC_DEFINE([HAVE_MAEMO_4],[1],[Define if Maemo 4.x support is enabled])
- fi
- if test "$with_platform_variant" = "maemo5"; then
- AC_DEFINE([HAVE_MAEMO_5],[1],[Define if Maemo 5.x support is enabled])
- fi
-fi
# Check which gtk+ major version to use
@@ -178,13 +143,7 @@ AM_CONDITIONAL([PLATFORM_WIN32_NATIVE],[test "$os_win32" = "yes"])
AC_MSG_CHECKING([whether to enable sound support])
AC_ARG_ENABLE([sound],
[AS_HELP_STRING([--enable-sound],[Enable sound using libcanberra])],
- [],[case "$with_platform" in
- gnome|gtk-only) enable_sound=yes ;;
- hildon) case "$with_platform_variant" in
- maemo5) enable_sound=yes ;;
- *) enable_sound=no ;;
- esac
- esac])
+ [],[enable_sound=yes])
AC_MSG_RESULT([$enable_sound])
# *******
@@ -202,14 +161,6 @@ if test "$with_clutter" = "yes"; then
AC_MSG_NOTICE([Aisleriot/Clutter is experimental; do not enable this for distribution packages!])
fi
-case "$with_platform" in
- gnome|gtk-only) ;;
- hildon) if test "$with_clutter" = "yes"; then
- AC_MSG_ERROR([Clutter is not supported on hildon; disable Gnometris, Lights Off and Aisleriot/Clutter])
- fi
- ;;
-esac
-
# ******************
# Card theme formats
# ******************
@@ -220,11 +171,7 @@ AC_ARG_WITH([card-theme-formats],
[],[with_card_theme_formats=default])
case "$with_card_theme_formats" in
- default) case "$with_platform" in
- gnome|gtk-only) with_card_theme_formats="svg" ;;
- hildon) with_card_theme_formats="fixed" ;;
- esac
- ;;
+ default) with_card_theme_formats="svg" ;;
all) with_card_theme_formats="svg,kde,fixed,sliced,pysol" ;;
esac
@@ -308,11 +255,8 @@ fi
AC_MSG_CHECKING([which card theme to use by default])
AC_ARG_WITH([default-card-theme],
- [AS_HELP_STRING([--with-default-card-theme=NAME],[Which card theme to use by default (default: bonded)])],
- [],[case "$with_platform" in
- gnome|gtk-only) with_default_card_theme=bonded.svg ;;
- hildon) with_default_card_theme=paris.card-theme ;;
- esac])
+ [AS_HELP_STRING([--with-default-card-theme=NAME],[Which card theme to use by default (default: bonded.svg)])],
+ [],[with_default_card_theme="bonded.svg"])
AC_MSG_RESULT([$with_default_card_theme])
AC_DEFINE_UNQUOTED([AR_CARD_THEME_DEFAULT],["$with_default_card_theme"],[The default card theme])
@@ -320,10 +264,7 @@ AC_DEFINE_UNQUOTED([AR_CARD_THEME_DEFAULT],["$with_default_card_theme"],[The def
AC_MSG_CHECKING([which card theme format to use by default])
AC_ARG_WITH([default-card-theme-format],
[AS_HELP_STRING([--with-default-card-theme-format=NAME],[Which card theme format to use by default (default: platform dependent)])],
- [],[case "$with_platform" in
- gnome|gtk-only) with_default_card_theme_format=svg ;;
- hildon) with_default_card_theme_format=fixed ;;
- esac])
+ [],[with_default_card_theme_format=svg])
AC_MSG_RESULT([$with_default_card_theme_format])
case "$with_default_card_theme_format" in
@@ -365,8 +306,6 @@ GCONF_REQUIRED=2.0
GLIB_REQUIRED=2.26.0
GIO_REQUIRED=2.26.0
GSTREAMER_REQUIRED=0.10.11
-HILDON_LIBS_REQUIRED=0.14
-HILDON_1_REQUIRED=1.00
# Check for common modules
@@ -406,24 +345,6 @@ if test "$with_platform" = "gnome"; then
need_gthread=yes
fi
-# Check for Hildon modules
-
-if test "$with_platform" = "hildon"; then
- if test "$with_platform_variant" = "maemo3"; then
- PKG_CHECK_MODULES([HILDON],[
- libosso
- hildon-libs >= $HILDON_LIBS_REQUIRED])
- else
- PKG_CHECK_MODULES([HILDON],[
- libosso
- dbus-1
- hildon-1 >= $HILDON_1_REQUIRED])
- fi
-
- AC_SUBST([HILDON_CFLAGS])
- AC_SUBST([HILDON_LIBS])
-fi
-
# Check for librsvg
have_rsvg=no
@@ -505,14 +426,10 @@ AC_MSG_CHECKING([which smclient backend to use])
AC_ARG_WITH([smclient],
[AS_HELP_STRING([--with-smclient],[which smclient backend to use (xsmp|win32|quartz|no)])],
[],
- [case "$with_platform" in
- gnome|gtk-only) case "$GDK_TARGET" in
- x11) with_smclient=xsmp SMCLIENT_PKGS="sm ice" ;;
- win32|quartz) with_smclient=$GDK_TARGET ;;
- *) with_smclient=no ;;
- esac
- ;;
- hildon) with_smclient=no ;;
+ [case "$GDK_TARGET" in
+ x11) with_smclient=xsmp SMCLIENT_PKGS="sm ice" ;;
+ win32|quartz) with_smclient=$GDK_TARGET ;;
+ *) with_smclient=no ;;
esac])
AC_MSG_RESULT([$with_smclient])
@@ -671,14 +588,11 @@ AC_MSG_CHECKING([which help method to use])
AC_ARG_WITH([help-method],
[AS_HELP_STRING([--with-help-method],[which help method to use (ghelp|file|library; default: ghelp)])],
[],
- [case "$with_platform" in
- hildon) with_help_method=file ;;
- *) if test "$platform_win32" = "yes"; then
- with_help_method=file
- else
- with_help_method=ghelp
- fi ;;
- esac])
+ [if test "$platform_win32" = "yes"; then
+ with_help_method=file
+ else
+ with_help_method=ghelp
+ fi])
AC_MSG_RESULT([$with_help_method])
case "$with_help_method" in
@@ -727,7 +641,6 @@ cards/Makefile
data/Makefile
data/icons/Makefile
data/icons/gnome/Makefile
-data/icons/hildon/Makefile
data/sounds/Makefile
data/sol.desktop.in
data/freecell.desktop.in
diff --git a/data/Makefile.am b/data/Makefile.am
index 906fdb5..a618157 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,3 +1,5 @@
+NULL =
+
SUBDIRS = icons
if ENABLE_SOUND
@@ -13,19 +15,11 @@ themeinstalldir = $(pkgdatadir)
dist_themeinstall_DATA = theme-install.ini
desktop_in_files = \
- sol.desktop.in.in
-
-if !HAVE_HILDON
-desktop_in_files += \
- freecell.desktop.in.in
-endif
+ sol.desktop.in.in \
+ freecell.desktop.in.in \
+ $(NULL)
-if HAVE_MAEMO
-desktopdir = $(shell $(PKG_CONFIG) osso-af-settings --variable=desktopentrydir)
-else
desktopdir = $(datadir)/applications
-endif
-
desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
CLEANFILES = \
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index ba737d4..751f893 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -1,12 +1,6 @@
NULL =
-SUBDIRS =
-
-if HAVE_HILDON
-SUBDIRS += hildon
-else
-SUBDIRS += gnome
-endif
+SUBDIRS = gnome
private_icons = \
hicolor_actions_16x16_cards-deal.png \
diff --git a/src/Makefile.am b/src/Makefile.am
index 069f590..d5ad28d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -20,6 +20,8 @@ scm_DATA = \
bin_PROGRAMS = sol
sol_SOURCES = \
+ ar-clock.c \
+ ar-clock.h \
ar-cursor.c \
ar-cursor.h \
ar-game-chooser.c \
@@ -46,20 +48,6 @@ sol_SOURCES = \
window.h \
$(NULL)
-if !HAVE_HILDON
-sol_SOURCES += \
- ar-clock.c \
- ar-clock.h \
- $(NULL)
-endif
-
-if HAVE_MAEMO_5
-sol_SOURCES += \
- ar-fullscreen-button.c \
- ar-fullscreen-button.h \
- $(NULL)
-endif
-
if !HAVE_GUILE_1_8
sol_SOURCES += guile16-compat.h
endif
@@ -71,8 +59,6 @@ sol_SOURCES += \
$(NULL)
endif
-# FIXMEchpe: fix localedir for maemo? $PKG_CONFIG osso-af-settings --variable=localedir
-
sol_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/src/lib \
@@ -99,11 +85,6 @@ sol_CPPFLAGS += -I$(srcdir)/smclient -Ismclient
sol_LDADD += smclient/libsmclient.la
endif
-if HAVE_HILDON
-sol_CFLAGS += $(HILDON_CFLAGS)
-sol_LDADD += $(HILDON_LIBS)
-endif
-
if HAVE_GNOME
sol_CFLAGS += $(GNOME_CFLAGS)
sol_LDADD += $(GNOME_LIBS)
@@ -164,13 +145,6 @@ sol_clutter_SOURCES = \
window.h \
$(NULL)
-if HAVE_MAEMO_5
-sol_clutter_SOURCES += \
- ar-fullscreen-button.c \
- ar-fullscreen-button.h \
- $(NULL)
-endif
-
if !HAVE_GUILE_1_8
sol_clutter_SOURCES += guile16-compat.h
endif
@@ -197,28 +171,6 @@ endif
man_MANS = sol.6
-ossobackup_in_files = aisleriot-backup.conf
-ossoscript_in_files = aisleriot-clean.sh
-ossoservice_in_files = org.gnome.Games.AisleRiot.service.in
-
-if HAVE_MAEMO
-
-ossobackupdir = $(sysconfdir)/osso-backup/applications
-ossobackup_DATA = $(ossobackup_in_files)
-
-ossocuddir = $(sysconfdir)/osso-cud-scripts
-ossocud_SCRIPTS = $(ossoscript_in_files)
-
-servicedir = $(shell $(PKG_CONFIG) osso-af-settings --variable=dbusservicedir)
-service_DATA = $(ossoservice_in_files:.service.in=.service)
-
-if HAVE_MAEMO_5
-rcdir = $(pkgdatadir)/aisleriot
-dist_rc_DATA = gtkrc-maemo
-endif # HAVE_MAEMO_5
-
-endif # HAVE_MAEMO
-
%.service: %.service.in Makefile
$(AM_V_GEN) $(SED) -e "s|%bindir%|$(bindir)|" $< > $@
diff --git a/src/ar-clutter-embed.c b/src/ar-clutter-embed.c
index e09ee9b..9b257b0 100644
--- a/src/ar-clutter-embed.c
+++ b/src/ar-clutter-embed.c
@@ -54,15 +54,14 @@ ar_clutter_embed_realize (GtkWidget *widget)
{
ArClutterEmbed *embed = AR_CLUTTER_EMBED (widget);
ArClutterEmbedPrivate *priv = embed->priv;
-#ifndef HAVE_HILDON
+#ifndef NO_MOUSE
GdkDisplay *display;
GdkWindow *window;
#endif
GTK_WIDGET_CLASS (ar_clutter_embed_parent_class)->realize (widget);
- /* FIXMEchpe: this isn't really HILDON, but don't-support-mouse */
-#ifndef HAVE_HILDON
+#ifndef NO_MOUSE
/* Create cursors */
display = gtk_widget_get_display (widget);
window = gtk_widget_get_window (widget);
@@ -71,7 +70,7 @@ ar_clutter_embed_realize (GtkWidget *widget)
priv->cursor[AR_CURSOR_OPEN] = ar_cursor_new (window, AR_CURSOR_OPEN);
priv->cursor[AR_CURSOR_CLOSED] = ar_cursor_new (window, AR_CURSOR_CLOSED);
priv->cursor[AR_CURSOR_DROPPABLE] = gdk_cursor_new_for_display (display, GDK_DOUBLE_ARROW); /* FIXMEchpe: better cursor */
-#endif /* !HAVE_HILDON */
+#endif /* !NO_MOUSE */
ar_clutter_embed_set_cursor (embed, AR_CURSOR_DEFAULT);
}
@@ -80,7 +79,7 @@ static void
ar_clutter_embed_unrealize (GtkWidget *widget)
{
/* FIXMEchpe */
-#ifndef HAVE_HILDON
+#ifndef NO_MOUSE
ArClutterEmbed *embed = AR_CLUTTER_EMBED (widget);
ArClutterEmbedPrivate *priv = embed->priv;
guint i;
@@ -89,7 +88,7 @@ ar_clutter_embed_unrealize (GtkWidget *widget)
gdk_cursor_unref (priv->cursor[i]);
priv->cursor[i] = NULL;
}
-#endif /* !HAVE_HILDON*/
+#endif /* !NO_MOUSE*/
GTK_WIDGET_CLASS (ar_clutter_embed_parent_class)->unrealize (widget);
}
@@ -262,10 +261,10 @@ ar_clutter_embed_set_cursor (ArClutterEmbed *embed,
ArCursorType cursor)
{
/* FIXMEchpe */
-#ifndef HAVE_HILDON
+#ifndef NO_MOUSE
ArClutterEmbedPrivate *priv = embed->priv;
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (embed)),
priv->cursor[cursor]);
-#endif /* !HAVE_HILDON */
+#endif /* !NO_MOUSE */
}
diff --git a/src/ar-cursor.c b/src/ar-cursor.c
index a69a0be..eba94ec 100644
--- a/src/ar-cursor.c
+++ b/src/ar-cursor.c
@@ -22,8 +22,6 @@
#include <gtk/gtk.h>
-#ifndef HAVE_HILDON
-
/* These cursors borrowed from EOG */
/* FIXMEchpe use themeable cursors here! */
@@ -216,12 +214,9 @@ ar_cursor_new_from_data (GdkWindow *window,
return cursor;
}
-#endif /* !HAVE_HILDON */
-
GdkCursor *ar_cursor_new (GdkWindow *window,
ArCursorType cursor_type)
{
-#ifndef HAVE_HILDON
switch (cursor_type) {
case AR_CURSOR_OPEN:
return ar_cursor_new_from_data (window, hand_open_data, sizeof (hand_open_data));
@@ -232,7 +227,4 @@ GdkCursor *ar_cursor_new (GdkWindow *window,
default:
g_assert_not_reached ();
}
-#else
- return NULL;
-#endif /* !HAVE_HILDON */
}
diff --git a/src/ar-game-chooser.c b/src/ar-game-chooser.c
index bdd3b6b..17191a6 100644
--- a/src/ar-game-chooser.c
+++ b/src/ar-game-chooser.c
@@ -28,19 +28,9 @@
#include "ar-string-utils.h"
#include "ar-glib-compat.h"
-#ifdef HAVE_MAEMO_5
-#include <hildon/hildon-gtk.h>
-#include <hildon/hildon-pannable-area.h>
-#include <hildon/hildon-stackable-window.h>
-#endif
-
struct _ArGameChooser
{
-#ifdef HAVE_MAEMO_5
- HildonStackableWindow parent;
-#else
GtkDialog parent;
-#endif
/*< private >*/
ArGameChooserPrivate *priv;
@@ -48,11 +38,7 @@ struct _ArGameChooser
struct _ArGameChooserClass
{
-#ifdef HAVE_MAEMO_5
- HildonStackableWindowClass parent_class;
-#else
GtkDialogClass parent_class;
-#endif
};
struct _ArGameChooserPrivate {
@@ -76,45 +62,17 @@ enum {
#define SELECTED_PATH_DATA_KEY "selected-path"
/* private functions */
-
+
static void
row_activated_cb (GtkWidget *widget,
GtkTreePath *path,
GtkTreeViewColumn *column,
ArGameChooser *chooser)
{
-#ifdef HAVE_MAEMO_5
- ArGameChooserPrivate *priv = chooser->priv;
- GtkTreeIter iter;
-
- /* On maemo5 with a treeview in a pannable area, the selection
- * handling is special. There _never_ is any row selected!
- * Instead, we get a row-activated signal (which normally is only
- * emitted when double-clicking a row) when the user selects a row.
- */
- if (gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->store), &iter, path)) {
- char *game_file = NULL;
-
- gtk_tree_model_get (GTK_TREE_MODEL (priv->store), &iter,
- COL_GAME_FILE, &game_file,
- -1);
- g_assert (game_file != NULL);
-
- aisleriot_window_set_game (priv->window, game_file, 0);
-
- g_free (game_file);
-
- /* And close the subview */
- gtk_widget_destroy (GTK_WIDGET (chooser));
- }
-#else
/* Handle a double click by faking a click on the OK button. */
gtk_dialog_response (GTK_DIALOG (chooser), GTK_RESPONSE_OK);
-#endif /* HAVE_MAEMO_5 */
}
-#ifndef HAVE_MAEMO_5
-
static void
response_cb (GtkWidget *dialog,
int response,
@@ -141,15 +99,9 @@ response_cb (GtkWidget *dialog,
gtk_widget_destroy (dialog);
}
-#endif /* HAVE_MAEMO_5 */
-
/* GType impl */
-#ifdef HAVE_MAEMO_5
-G_DEFINE_TYPE (ArGameChooser, ar_game_chooser, HILDON_TYPE_STACKABLE_WINDOW)
-#else
G_DEFINE_TYPE (ArGameChooser, ar_game_chooser, GTK_TYPE_DIALOG)
-#endif
/* GObjectClass impl */
@@ -181,10 +133,8 @@ ar_game_chooser_constructor (GType type,
const char *current_game_file;
const char *games_dir;
GDir *dir;
-#ifndef HAVE_MAEMO_5
GtkWidget *content_area;
GtkDialog *dialog;
-#endif
object = G_OBJECT_CLASS (ar_game_chooser_parent_class)->constructor
(type, n_construct_properties, construct_params);
@@ -238,7 +188,6 @@ ar_game_chooser_constructor (GType type,
gtk_window_set_title (window, _("Select Game"));
gtk_window_set_modal (window, TRUE);
-#ifndef HAVE_MAEMO_5
dialog = GTK_DIALOG (object);
g_signal_connect (dialog, "response",
@@ -257,13 +206,8 @@ ar_game_chooser_constructor (GType type,
GTK_RESPONSE_CANCEL,
-1);
gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
-#endif /* HAVE_MAEMO_5 */
-#ifdef HAVE_MAEMO_5
- list_view = hildon_gtk_tree_view_new_with_model (HILDON_UI_MODE_NORMAL, GTK_TREE_MODEL (list));
-#else
list_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (list));
-#endif
g_object_unref (list);
g_signal_connect (list_view, "row-activated",
@@ -273,12 +217,8 @@ ar_game_chooser_constructor (GType type,
0, GTK_SORT_ASCENDING);
hbox = gtk_hbox_new (FALSE, 12);
-#ifdef HAVE_MAEMO_5
- gtk_container_add (GTK_CONTAINER (window), hbox);
-#else
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 0);
-#endif
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (list_view), FALSE);
@@ -292,15 +232,11 @@ ar_game_chooser_constructor (GType type,
priv->selection = selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list_view));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
-#ifdef HAVE_MAEMO_5
- scrolled_window = hildon_pannable_area_new ();
-#else
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_SHADOW_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
-#endif /* HAVE_MAEMO_5 */
gtk_container_add (GTK_CONTAINER (scrolled_window), list_view);
diff --git a/src/ar-stock.c b/src/ar-stock.c
index 2c33779..b9ed3a3 100644
--- a/src/ar-stock.c
+++ b/src/ar-stock.c
@@ -31,8 +31,6 @@
#include "ar-stock.h"
-#ifndef HAVE_HILDON
-
typedef struct {
const char *stock_id;
const char *tooltip;
@@ -164,8 +162,6 @@ ar_stock_prepare_for_statusbar_tooltips (GtkUIManager * ui_manager,
G_CALLBACK (disconnect_proxy_cb), statusbar);
}
-#endif /* !HAVE_HILDON */
-
/* This will become GTK_CHECK_VERSION (2, 15, x) once the patch from gtk+ bug 511332 is committed */
#undef HAVE_GTK_ICON_FACTORY_ADD_ALIAS
@@ -232,24 +228,18 @@ ar_stock_init (void)
{ AR_STOCK_START_NEW_GAME, GTK_STOCK_NEW },
{ AR_STOCK_RESET, GTK_STOCK_CLEAR },
{ AR_STOCK_RESTART_GAME, GTK_STOCK_REFRESH },
- /* This is used on hildon too, but only exists since 2.8 */
{ AR_STOCK_FULLSCREEN, GTK_STOCK_FULLSCREEN },
- /* This is used on maemo 5 */
{ AR_STOCK_LEAVE_FULLSCREEN, GTK_STOCK_LEAVE_FULLSCREEN },
#ifdef HAVE_GTK_ICON_FACTORY_ADD_ALIAS
{ AR_STOCK_REDO_MOVE, GTK_STOCK_REDO },
{ AR_STOCK_UNDO_MOVE, GTK_STOCK_UNDO },
-#ifndef HAVE_HILDON
{ AR_STOCK_RESUME_GAME, GTK_STOCK_MEDIA_PLAY },
-#endif /* HAVE_HILDON */
#endif
-#ifndef HAVE_HILDON
{ AR_STOCK_NETWORK_GAME, GTK_STOCK_NETWORK },
{ AR_STOCK_NETWORK_LEAVE, GTK_STOCK_STOP },
{ AR_STOCK_PLAYER_LIST, GTK_STOCK_INFO },
{ AR_STOCK_PAUSE_GAME, GTK_STOCK_MEDIA_PAUSE },
-#endif /* !HAVE_HILDON */
};
#ifndef HAVE_GTK_ICON_FACTORY_ADD_ALIAS
@@ -262,37 +252,27 @@ ar_stock_init (void)
/* Private icon names */
const char *private_icon_names[][2] = {
-#ifndef HAVE_HILDON
{ AR_STOCK_TELEPORT, "teleport" },
{ AR_STOCK_RTELEPORT, "teleport-random" },
{ AR_STOCK_SCORES, "scores" },
-#endif /* !HAVE_HILDON */
{ AR_STOCK_DEAL_CARDS, "cards-deal" }
};
-/* Use different accels on GTK/GNOME and Maemo */
-#ifdef HAVE_HILDON
-#define STOCK_ACCEL(normal,hildon) (hildon)
-#else
-#define STOCK_ACCEL(normal,hildon) (normal)
-#endif
-
static const GtkStockItem ar_stock_items[] = {
- { AR_STOCK_CONTENTS, N_("_Contents"), 0, STOCK_ACCEL (GDK_KEY_F1, 0), NULL },
- { AR_STOCK_FULLSCREEN, N_("_Fullscreen"), 0, STOCK_ACCEL (GDK_KEY_F11, GDK_KEY_F6), NULL },
- { AR_STOCK_HINT, N_("_Hint"), STOCK_ACCEL (GDK_CONTROL_MASK, 0), STOCK_ACCEL ('h', GDK_KEY_Return), NULL },
+ { AR_STOCK_CONTENTS, N_("_Contents"), 0, GDK_KEY_F1, NULL },
+ { AR_STOCK_FULLSCREEN, N_("_Fullscreen"), 0, GDK_KEY_F11, NULL },
+ { AR_STOCK_HINT, N_("_Hint"), GDK_CONTROL_MASK, 'h', NULL },
/* Translators: This "_New" is for the menu item 'Game->New', implies "New Game" */
- { AR_STOCK_NEW_GAME, N_("_New"), STOCK_ACCEL (GDK_CONTROL_MASK, 0), STOCK_ACCEL ('n', 0), NULL },
+ { AR_STOCK_NEW_GAME, N_("_New"), GDK_CONTROL_MASK, 'n', NULL },
/* Translators: This "_New Game" is for the game-over dialogue */
{ AR_STOCK_START_NEW_GAME, N_("_New Game"), 0, 0, NULL },
- { AR_STOCK_REDO_MOVE, N_("_Redo Move"), STOCK_ACCEL (GDK_CONTROL_MASK | GDK_SHIFT_MASK, 0), STOCK_ACCEL ('z', GDK_KEY_F7), NULL },
+ { AR_STOCK_REDO_MOVE, N_("_Redo Move"), GDK_CONTROL_MASK | GDK_SHIFT_MASK, 'z', NULL },
/* Translators: this is the "Reset" scores button in a scores dialogue */
{ AR_STOCK_RESET, N_("_Reset"), 0, 0, NULL },
/* Translators: "_Restart" is the menu item 'Game->Restart', implies "Restart Game" */
{ AR_STOCK_RESTART_GAME, N_("_Restart"), 0, 0, NULL },
- { AR_STOCK_UNDO_MOVE, N_("_Undo Move"), STOCK_ACCEL (GDK_CONTROL_MASK, 0), STOCK_ACCEL ('z', GDK_KEY_F8), NULL },
+ { AR_STOCK_UNDO_MOVE, N_("_Undo Move"), GDK_CONTROL_MASK, 'z', NULL },
{ AR_STOCK_DEAL_CARDS, N_("_Deal"), GDK_CONTROL_MASK, 'd', NULL },
-#ifndef HAVE_HILDON
{ AR_STOCK_LEAVE_FULLSCREEN, N_("_Leave Fullscreen"), 0, GDK_KEY_F11, NULL },
{ AR_STOCK_NETWORK_GAME, N_("Network _Game"), GDK_CONTROL_MASK, 'g', NULL },
{ AR_STOCK_NETWORK_LEAVE, N_("L_eave Game"), GDK_CONTROL_MASK, 'e', NULL },
@@ -301,20 +281,8 @@ ar_stock_init (void)
{ AR_STOCK_RESUME_GAME, N_("Res_ume"), 0, GDK_KEY_Pause, NULL },
{ AR_STOCK_SCORES, N_("_Scores"), 0, 0, NULL },
{ AR_STOCK_END_GAME, N_("_End Game"), 0, 0, NULL },
-#endif
-
-#ifdef HAVE_MAEMO_3
- /* Work around maemo brokenness wrt. stock item translations.
- * See https://bugs.maemo.org/show_bug.cgi?id=1449 . */
- { GTK_STOCK_ABOUT, N_("_About"), 0, 0, NULL },
- { GTK_STOCK_CANCEL, N_("_Cancel"), 0, 0, NULL },
- { GTK_STOCK_CLOSE, N_("_Close"), 0, 0, NULL },
- { GTK_STOCK_OK, N_("_OK"), 0, 0, NULL },
-#endif /* HAVE_MAEMO_3 */
};
-#undef STOCK_ACCEL
-
guint i;
GtkIconFactory *icon_factory;
diff --git a/src/ar-style-private.h b/src/ar-style-private.h
index 95ed1b9..356fd3b 100644
--- a/src/ar-style-private.h
+++ b/src/ar-style-private.h
@@ -24,11 +24,7 @@ static const GdkColor default_selection_color = { 0, 0 /* red */, 0 /* green */,
static const GdkColor default_baize_color = { 0, 0 /* red */, 0x5000 /* green */, 0x1000 /* blue */ };
/* The proportion of a slot dedicated to the card (horiz or vert). */
-#ifdef HAVE_HILDON
-#define DEFAULT_CARD_OVERHANG (0.5)
-#else
#define DEFAULT_CARD_OVERHANG (0.0)
-#endif
#define DEFAULT_CARD_SLOT_RATIO (0.95)
diff --git a/src/board-noclutter.c b/src/board-noclutter.c
index 0def415..d7861a1 100644
--- a/src/board-noclutter.c
+++ b/src/board-noclutter.c
@@ -47,10 +47,10 @@
#define AISLERIOT_BOARD_GET_PRIVATE(board)(G_TYPE_INSTANCE_GET_PRIVATE ((board), AISLERIOT_TYPE_BOARD, AisleriotBoardPrivate))
-/* Enable keynav on non-hildon by default */
-#if !defined(HAVE_HILDON) && !defined(DISABLE_KEYNAV)
+/* Enable keynav by default */
+#ifndef DISABLE_KEYNAV
#define ENABLE_KEYNAV
-#endif /* !HAVE_HILDON */
+#endif
/* The minimum size for the playing area. Almost completely arbitrary. */
#define BOARD_MIN_WIDTH 300
@@ -141,12 +141,6 @@ struct _AisleriotBoardPrivate
/* Highlight */
ArSlot *highlight_slot;
-#ifdef HAVE_MAEMO
- /* Tap-and-Hold */
- ArSlot *tap_and_hold_slot;
- int tap_and_hold_card_id;
-#endif
-
/* Status message */
const char *status_message; /* interned */
@@ -209,12 +203,10 @@ static void
set_cursor (AisleriotBoard *board,
ArCursorType cursor)
{
-#ifndef HAVE_HILDON
AisleriotBoardPrivate *priv = board->priv;
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (board)),
priv->cursor[cursor]);
-#endif /* !HAVE_HILDON */
}
/* If we are over a slot, set the cursor to the given cursor,
@@ -224,7 +216,6 @@ set_cursor_by_location (AisleriotBoard *board,
int x,
int y)
{
-#ifndef HAVE_HILDON
AisleriotBoardPrivate *priv = board->priv;
ArSlot *selection_slot = priv->selection_slot;
int selection_start_card_id = priv->selection_start_card_id;
@@ -263,7 +254,6 @@ set_cursor_by_location (AisleriotBoard *board,
}
set_cursor (board, cursor);
-#endif /* !HAVE_HILDON */
}
/* status message */
@@ -1289,8 +1279,6 @@ aisleriot_board_move_selected_cards_to_slot (AisleriotBoard *board,
/* Tooltips */
-#if !defined(HAVE_HILDON)
-
static gboolean
aisleriot_board_query_tooltip_cb (GtkWidget *widget,
int x,
@@ -1319,8 +1307,6 @@ aisleriot_board_query_tooltip_cb (GtkWidget *widget,
return TRUE;
}
-#endif /* !HAVE_HILDON */
-
/* Keynav */
#ifdef ENABLE_KEYNAV
@@ -2251,6 +2237,7 @@ aisleriot_board_realize (GtkWidget *widget)
AisleriotBoard *board = AISLERIOT_BOARD (widget);
AisleriotBoardPrivate *priv = board->priv;
GdkWindow *window;
+ GdkDisplay *display;
GTK_WIDGET_CLASS (aisleriot_board_parent_class)->realize (widget);
@@ -2258,10 +2245,6 @@ aisleriot_board_realize (GtkWidget *widget)
ar_card_surface_cache_set_drawable (priv->card_cache, window);
-#ifndef HAVE_HILDON
-{
- GdkDisplay *display;
-
display = gtk_widget_get_display (widget);
/* Create cursors */
@@ -2269,8 +2252,6 @@ aisleriot_board_realize (GtkWidget *widget)
priv->cursor[AR_CURSOR_OPEN] = ar_cursor_new (window, AR_CURSOR_OPEN);
priv->cursor[AR_CURSOR_CLOSED] = ar_cursor_new (window, AR_CURSOR_CLOSED);
priv->cursor[AR_CURSOR_DROPPABLE] = gdk_cursor_new_for_display (display, GDK_DOUBLE_ARROW); /* FIXMEchpe: better cursor */
-}
-#endif /* !HAVE_HILDON */
aisleriot_board_setup_geometry (board);
}
@@ -2280,21 +2261,17 @@ aisleriot_board_unrealize (GtkWidget *widget)
{
AisleriotBoard *board = AISLERIOT_BOARD (widget);
AisleriotBoardPrivate *priv = board->priv;
-#ifndef HAVE_HILDON
guint i;
-#endif
priv->geometry_set = FALSE;
ar_card_surface_cache_set_drawable (priv->card_cache, NULL);
priv->slot_surface = NULL;
-#ifndef HAVE_HILDON
for (i = 0; i < AR_LAST_CURSOR; ++i) {
gdk_cursor_unref (priv->cursor[i]);
priv->cursor[i] = NULL;
}
-#endif /* !HAVE_HILDON*/
clear_state (board);
@@ -2408,13 +2385,10 @@ aisleriot_board_sync_style (ArStyle *style,
queue_redraw = TRUE;
}
-#if !defined(HAVE_HILDON)
if (pspec_name == NULL || pspec_name == I_(AR_STYLE_PROP_SHOW_TOOLTIPS)) {
gtk_widget_set_has_tooltip (widget, ar_style_get_show_tooltips (priv->style));
}
-#endif
-#ifndef HAVE_HILDON
if (pspec_name == NULL || pspec_name == I_(AR_STYLE_PROP_SHOW_STATUS_MESSAGES)) {
gboolean show_status_messages;
@@ -2429,7 +2403,6 @@ aisleriot_board_sync_style (ArStyle *style,
}
}
}
-#endif /* !HAVE_HILDON */
if (update_geometry && realized) {
aisleriot_board_setup_geometry (board);
@@ -2831,7 +2804,6 @@ aisleriot_board_motion_notify (GtkWidget *widget,
* parent class has no class closure for this event.
*/
-#ifndef HAVE_HILDON
if (priv->show_status_messages) {
ArSlot *slot = NULL;
int cardid = -1;
@@ -2847,7 +2819,6 @@ aisleriot_board_motion_notify (GtkWidget *widget,
set_status_message (board, NULL);
}
}
-#endif /* !HAVE_HILDON */
if (priv->click_status == STATUS_IS_DRAG) {
ArSlot *slot;
@@ -2883,55 +2854,6 @@ aisleriot_board_key_press (GtkWidget *widget,
return GTK_WIDGET_CLASS (aisleriot_board_parent_class)->key_press_event (widget, event);
}
-#ifdef HAVE_MAEMO
-
-static gboolean
-aisleriot_board_tap_and_hold_query_cb (GtkWidget *widget,
- GdkEvent *_event,
- AisleriotBoard *board)
-{
- AisleriotBoardPrivate *priv = board->priv;
- /* BadDocs! should mention that this is a GdkEventButton! */
- GdkEventButton *event = (GdkEventButton *) _event;
- ArSlot *slot;
- int card_id;
-
- /* NOTE: Returning TRUE from this function means that tap-and-hold
- * is disallowed here; FALSE means to allow tap-and-hold.
- */
-
- /* In click-to-move mode, we always reveal with just the left click */
- if (priv->click_to_move)
- return TRUE;
-
- get_slot_and_card_from_point (board, event->x, event->y, &slot, &card_id);
- if (!slot ||
- card_id < 0 ||
- card_id == slot->cards->len - 1 ||
- CARD_GET_FACE_DOWN (CARD (slot->cards->data[card_id])))
- return TRUE;
-
- priv->tap_and_hold_slot = slot;
- priv->tap_and_hold_card_id = card_id;
-
- return FALSE; /* chain up to the default handler */
-}
-
-static void
-aisleriot_board_tap_and_hold_cb (GtkWidget *widget,
- AisleriotBoard *board)
-{
- AisleriotBoardPrivate *priv = board->priv;
-
- if (priv->tap_and_hold_slot == NULL ||
- priv->tap_and_hold_card_id < 0)
- return;
-
- reveal_card (board, priv->tap_and_hold_slot, priv->tap_and_hold_card_id);
-}
-
-#endif /* HAVE_MAEMO */
-
#ifdef OPTIMISED_EXPOSE
static cairo_region_t *
@@ -3336,20 +3258,9 @@ aisleriot_board_init (AisleriotBoard *board)
GDK_BUTTON_PRESS_MASK |
GDK_POINTER_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK);
- /* FIMXEchpe: no need for motion events on maemo, unless we explicitly activate drag mode */
-#ifdef HAVE_MAEMO
- gtk_widget_tap_and_hold_setup (widget, NULL, NULL, GTK_TAP_AND_HOLD_PASS_PRESS);
- g_signal_connect (widget, "tap-and-hold-query",
- G_CALLBACK (aisleriot_board_tap_and_hold_query_cb), board);
- g_signal_connect (widget, "tap-and-hold",
- G_CALLBACK (aisleriot_board_tap_and_hold_cb), board);
-#endif /* HAVE_MAEMO */
-
-#if !defined(HAVE_HILDON)
g_signal_connect (widget, "query-tooltip",
G_CALLBACK (aisleriot_board_query_tooltip_cb), board);
-#endif
}
static void
diff --git a/src/board.c b/src/board.c
index 352c688..a8f68b3 100644
--- a/src/board.c
+++ b/src/board.c
@@ -45,10 +45,10 @@
#define AISLERIOT_BOARD_GET_PRIVATE(board)(G_TYPE_INSTANCE_GET_PRIVATE ((board), AISLERIOT_TYPE_BOARD, AisleriotBoardPrivate))
-/* Enable keynav on non-hildon by default */
-#if !defined(HAVE_HILDON) && !defined(DISABLE_KEYNAV)
+/* Enable keynav by default */
+#ifndef DISABLE_KEYNAV
#define ENABLE_KEYNAV
-#endif /* !HAVE_HILDON */
+#endif
/* The limits for how much overlap there is between cards and
* how much is allowed to slip off the bottom or right.
@@ -263,7 +263,6 @@ set_cursor_by_location (AisleriotBoard *board,
int x,
int y)
{
-#ifndef HAVE_HILDON
AisleriotBoardPrivate *priv = board->priv;
ArSlot *selection_slot = priv->selection_slot;
int selection_start_card_id = priv->selection_start_card_id;
@@ -302,7 +301,6 @@ set_cursor_by_location (AisleriotBoard *board,
}
set_cursor (board, cursor);
-#endif /* !HAVE_HILDON */
}
/* status message */
@@ -2244,7 +2242,6 @@ aisleriot_board_sync_style (ArStyle *style,
}
}
-#ifndef HAVE_HILDON
if (pspec_name == NULL || pspec_name == I_(AR_STYLE_PROP_SHOW_STATUS_MESSAGES)) {
gboolean show_status_messages;
@@ -2259,7 +2256,6 @@ aisleriot_board_sync_style (ArStyle *style,
}
}
}
-#endif /* !HAVE_HILDON */
/* FIXMEchpe: queue a relayout instead? */
if (update_geometry) {
@@ -2997,7 +2993,6 @@ aisleriot_board_motion (ClutterActor *actor,
* parent classes have no class closure for this event.
*/
-#ifndef HAVE_HILDON
if (priv->show_status_messages) {
ArSlot *slot = NULL;
int cardid = -1;
@@ -3013,7 +3008,6 @@ aisleriot_board_motion (ClutterActor *actor,
set_status_message (board, NULL);
}
}
-#endif /* !HAVE_HILDON */
if (priv->click_status == STATUS_IS_DRAG) {
ArSlot *slot;
diff --git a/src/conf.c b/src/conf.c
index c0c3739..6524d87 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -180,10 +180,6 @@ aisleriot_conf_init (void)
ar_conf_set_boolean (NULL, aisleriot_conf_get_key (CONF_SHOW_STATUSBAR), TRUE);
ar_conf_set_boolean (NULL, aisleriot_conf_get_key (CONF_SOUND), TRUE);
ar_conf_set_boolean (NULL, aisleriot_conf_get_key (CONF_ANIMATIONS), TRUE);
-
-#ifdef HAVE_HILDON
- ar_conf_set_boolean (NULL, aisleriot_conf_get_key (CONF_CLICK_TO_MOVE), TRUE);
-#endif
}
#ifdef HAVE_GNOME
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index d2360db..0b1f78c 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -11,6 +11,8 @@ libaisleriot_la_SOURCES = \
ar-card.c \
ar-card.h \
ar-card-private.h \
+ ar-card-surface-cache.c \
+ ar-card-surface-cache.h \
ar-card-theme.c \
ar-card-theme.h \
ar-card-theme-private.h \
@@ -26,6 +28,9 @@ libaisleriot_la_SOURCES = \
ar-gtk-compat.h \
ar-help.c \
ar-help.h \
+ ar-preimage.c \
+ ar-preimage.h \
+ ar-preimage-private.h \
ar-profile.c \
ar-profile.h \
ar-runtime.c \
@@ -39,20 +44,6 @@ libaisleriot_la_SOURCES = \
$(BUILT_SOURCES) \
$(NULL)
-if !HAVE_HILDON
-libaisleriot_la_SOURCES += \
- ar-preimage.c \
- ar-preimage.h \
- ar-preimage-private.h \
- $(NULL)
-endif
-
-# FIXME conditional
-libaisleriot_la_SOURCES += \
- ar-card-surface-cache.c \
- ar-card-surface-cache.h \
- $(NULL)
-
if HAVE_CLUTTER
libaisleriot_la_SOURCES += \
ar-card-textures-cache.c \
@@ -117,11 +108,6 @@ libaisleriot_la_CFLAGS += $(CLUTTER_CFLAGS)
libaisleriot_la_LIBADD += $(CLUTTER_LIBS)
endif # HAVE_CLUTTER
-if HAVE_HILDON
-libaisleriot_la_CFLAGS += $(HILDON_CFLAGS)
-libaisleriot_la_LIBADD += $(HILDON_LIBS)
-endif
-
if HAVE_GNOME
libaisleriot_la_CFLAGS += $(GNOME_CFLAGS)
libaisleriot_la_LIBADD += $(GNOME_LIBS)
diff --git a/src/lib/ar-card-theme-fixed.c b/src/lib/ar-card-theme-fixed.c
index 08dfc00..637c317 100644
--- a/src/lib/ar-card-theme-fixed.c
+++ b/src/lib/ar-card-theme-fixed.c
@@ -310,16 +310,7 @@ ar_card_theme_fixed_class_get_theme_info (ArCardThemeClass *klass,
return NULL;
display_name = ar_filename_to_display_name (filename);
-
-#ifdef HAVE_HILDON
- /* On Hildon, fixed is the default. For pref backward compatibility,
- * we don't add the fixed: prefix there.
- */
- pref_name = g_strdup (filename);
- *(strrchr (pref_name, '.')) = '\0'; /* strip extension */
-#else
pref_name = g_strdup_printf ("fixed:%s", filename);
-#endif
info = _ar_card_theme_info_new (G_OBJECT_CLASS_TYPE (klass),
path,
diff --git a/src/lib/ar-card-theme.c b/src/lib/ar-card-theme.c
index 872df70..5be393e 100644
--- a/src/lib/ar-card-theme.c
+++ b/src/lib/ar-card-theme.c
@@ -473,14 +473,12 @@ theme_type_compare (GType a,
AR_TYPE_CARD_THEME_KDE,
#endif
#endif /* HAVE_RSVG */
-#ifndef HAVE_HILDON
#ifdef ENABLE_CARD_THEME_FORMAT_SLICED
AR_TYPE_CARD_THEME_SLICED,
#endif
#ifdef ENABLE_CARD_THEME_FORMAT_PYSOL
AR_TYPE_CARD_THEME_PYSOL,
#endif
-#endif /* !HAVE_HILDON */
#ifdef ENABLE_CARD_THEME_FORMAT_FIXED
AR_TYPE_CARD_THEME_FIXED
#endif
diff --git a/src/lib/ar-conf.c b/src/lib/ar-conf.c
index 712c29d..f5a4245 100644
--- a/src/lib/ar-conf.c
+++ b/src/lib/ar-conf.c
@@ -197,8 +197,6 @@ window_state_event_cb (GtkWidget *widget,
return FALSE;
}
-#ifndef HAVE_HILDON
-
static char *
ar_conf_get_accel_map_path (ArConf *conf,
gboolean ensure_dir_exists)
@@ -278,8 +276,6 @@ ar_conf_save_accel_map (ArConf *conf)
g_free (conf_file);
}
-#endif /* !HAVE_HILDON */
-
#ifdef HAVE_GNOME
static void
@@ -438,9 +434,7 @@ ar_conf_constructor (GType type,
#endif /* HAVE_GNOME */
-#ifndef HAVE_HILDON
ar_conf_load_accel_map (conf);
-#endif /* !HAVE_HILDON */
g_free (game_name);
@@ -453,10 +447,8 @@ ar_conf_finalize (GObject *object)
ArConf *conf = AR_CONF (object);
ArConfPrivate *priv = conf->priv;
-#ifndef HAVE_HILDON
/* Save the accel map */
ar_conf_save_accel_map (conf);
-#endif /* !HAVE_HILDON */
#ifdef HAVE_GNOME
gconf_client_remove_dir (priv->gconf_client, priv->base_path, NULL);
diff --git a/src/lib/ar-gsettings.c b/src/lib/ar-gsettings.c
index 8129d12..9176eba 100644
--- a/src/lib/ar-gsettings.c
+++ b/src/lib/ar-gsettings.c
@@ -107,7 +107,7 @@ window_state_event_cb (GtkWidget *widget,
return FALSE;
}
-#if 0 //#ifndef HAVE_HILDON
+#if 0
#define ACCELMAP_EXT "accels"
@@ -190,7 +190,7 @@ ar_conf_save_accel_map (GamesConf *conf)
g_free (conf_file);
}
-#endif /* !HAVE_HILDON */
+#endif /* 0 */
/**
* ar_gsettings_bind_window_state:
diff --git a/src/lib/ar-runtime.c b/src/lib/ar-runtime.c
index 0c90a54..a11875a 100644
--- a/src/lib/ar-runtime.c
+++ b/src/lib/ar-runtime.c
@@ -39,10 +39,6 @@
#include "ar-runtime.h"
-#ifdef HAVE_HILDON
-static osso_context_t *osso_context;
-#endif
-
#if defined(G_OS_WIN32) && !defined(ENABLE_BINRELOC)
#error binreloc must be enabled on win32
#endif
@@ -342,50 +338,6 @@ ar_runtime_init (const char *name)
return retval;
}
-#ifdef HAVE_HILDON
-
-/**
- * ar_runtime_init_with_osso:
- *
- * Like ar_runtime_init(), but also initialises the osso context.
- *
- * NOTE: This must be called before using ANY other glib/gtk/etc function!
- *
- * Returns: %TRUE iff initialisation succeeded
- */
-gboolean
-ar_runtime_init_with_osso (const char *name,
- const char *service_name)
-{
- if (!ar_runtime_init (name))
- return FALSE;
-
- osso_context = osso_initialize (service_name, VERSION, FALSE, NULL);
- if (osso_context == NULL) {
- g_printerr ("Failed to initialise osso\n");
- return FALSE;
- }
-
- return TRUE;
-}
-
-/**
- * ar_runtime_get_osso_context:
- *
- * Returns the osso context. May only be called after
- * ar_runtime_init_with_osso().
- *
- * Returns: a #osso_context_t
- */
-osso_context_t*
-ar_runtime_get_osso_context (void)
-{
- g_assert (osso_context != NULL);
- return osso_context;
-}
-
-#endif /* HAVE_HILDON */
-
/**
* ar_runtime_shutdown:
*
@@ -403,13 +355,6 @@ ar_runtime_shutdown (void)
g_free (app_name);
app_name = NULL;
-
-#ifdef HAVE_HILDON
- if (osso_context != NULL) {
- osso_deinitialize (osso_context);
- osso_context = NULL;
- }
-#endif /* HAVE_HILDON */
}
/**
diff --git a/src/lib/ar-runtime.h b/src/lib/ar-runtime.h
index a29aa41..a07d90c 100644
--- a/src/lib/ar-runtime.h
+++ b/src/lib/ar-runtime.h
@@ -21,10 +21,6 @@
#include <glib.h>
-#ifdef HAVE_HILDON
-#include <libosso.h>
-#endif
-
G_BEGIN_DECLS
typedef enum {
@@ -41,8 +37,7 @@ typedef enum {
AR_RUNTIME_ICON_THEME_DIRECTORY,
AR_RUNTIME_SOUND_DIRECTORY,
AR_RUNTIME_GAMES_DIRECTORY,
- /* FIXME On hildon and win32 help is created as html with gnome-doc-tool, and put manually in this directory */
- AR_RUNTIME_HELP_DIRECTORY,
+ AR_RUNTIME_HELP_DIRECTORY, /* On win32 help is created as html with gnome-doc-tool, and put manually in this directory */
AR_RUNTIME_LAST_DIRECTORY,
#ifdef ENABLE_BINRELOC
@@ -53,11 +48,6 @@ typedef enum {
} ArRuntimeDirectory;
gboolean ar_runtime_init (const char *name);
-#ifdef HAVE_HILDON
-gboolean ar_runtime_init_with_osso (const char *name,
- const char *service_name);
-osso_context_t* ar_runtime_get_osso_context (void);
-#endif /* HAVE_HILDON */
void ar_runtime_shutdown (void);
const char *ar_runtime_get_directory (ArRuntimeDirectory directory);
char *ar_runtime_get_file (ArRuntimeDirectory directory,
diff --git a/src/lib/ar-show.c b/src/lib/ar-show.c
index b6d4d16..821fed4 100644
--- a/src/lib/ar-show.c
+++ b/src/lib/ar-show.c
@@ -22,14 +22,6 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#ifdef HAVE_MAEMO
-#ifdef HAVE_MAEMO_3
-#include <osso-browser-interface.h>
-#else
-#include <tablet-browser-interface.h>
-#endif /* HAVE_MAEMO_3 */
-#endif /* HAVE_MAEMO */
-
#ifdef G_OS_WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -60,16 +52,6 @@ ar_show_uri (GdkScreen *screen,
guint32 timestamp,
GError **error)
{
-#ifdef HAVE_MAEMO
- osso_rpc_run_with_defaults (ar_runtime_get_osso_context (),
- "osso_browser",
- OSSO_BROWSER_OPEN_NEW_WINDOW_REQ,
- NULL,
- DBUS_TYPE_STRING, uri,
- DBUS_TYPE_INVALID);
- return TRUE;
-#else
-
#ifdef G_OS_WIN32
ShellExecute (NULL, "open", uri, NULL, NULL, SW_SHOWNORMAL);
return TRUE;
@@ -77,7 +59,6 @@ ar_show_uri (GdkScreen *screen,
return gtk_show_uri (screen, uri, timestamp, error);
#endif /* G_OS_WIN32 */
-#endif /* HAVE_MAEMO */
}
/**
@@ -113,13 +94,7 @@ ar_show_error (GtkWidget *window,
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
"%s", error->message);
-
-#ifdef HAVE_HILDON
- /* Empty title shows up as "<unnamed>" on maemo */
- gtk_window_set_title (GTK_WINDOW (dialog), _("Error"));
-#else
gtk_window_set_title (GTK_WINDOW (dialog), "");
-#endif /* HAVE_HILDON */
g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
diff --git a/src/sol.c b/src/sol.c
index 4e826b4..3ef0cf2 100644
--- a/src/sol.c
+++ b/src/sol.c
@@ -34,18 +34,6 @@
#include <clutter-gtk/clutter-gtk.h>
#endif
-#ifdef HAVE_HILDON
-#include <libosso.h>
-
-#ifdef HAVE_MAEMO_3
-#include <hildon-widgets/hildon-program.h>
-#else
-#include <hildon/hildon-program.h>
-#endif /* HAVE_MAEMO_3 */
-
-#define SERVICE_NAME "org.gnome.Games.AisleRiot"
-#endif /* HAVE_HILDON */
-
#include "ar-debug.h"
#include "ar-stock.h"
#include "ar-runtime.h"
@@ -72,9 +60,6 @@ typedef struct {
char *variation;
guint seed;
gboolean freecell;
-#ifdef HAVE_HILDON
- HildonProgram *program;
-#endif /* HAVE_HILDON */
} AppData;
#ifdef WITH_SMCLIENT
@@ -124,79 +109,6 @@ quit_cb (EggSMClient *client,
#endif /* WITH_SMCLIENT */
-#ifdef HAVE_MAEMO
-
-static void
-osso_hw_event_cb (osso_hw_state_t *state,
- gpointer user_data)
-{
- AppData *data = (AppData *) user_data;
-
- /* This callback can be called immediately upon registration.
- * So check if we're started up yet.
- */
- if (data->program == NULL)
- return;
-
- ar_conf_save ();
-
- if (state->memory_low_ind) {
- /* Run garbage collection */
- scm_gc ();
- }
-
-#if GNOME_ENABLE_DEBUG
- if (state->shutdown_ind) {
- g_print ("Going to shut down\n");
- } else if (state->save_unsaved_data_ind) {
- } else if (state->memory_low_ind) {
- g_print ("Should try to free some memory\n");
- } else if (state->system_inactivity_ind) {
- g_print ("System inactive\n");
- }
-#endif /* GNOME_ENABLE_DEBUG */
-}
-
-static int
-osso_rpc_cb (const char *interface,
- const char *method,
- GArray *args,
- gpointer user_data,
- osso_rpc_t *ret)
-{
- AppData *data = (AppData *) user_data;
-
-#if GNOME_ENABLE_DEBUG
- g_print ("OSSO RPC iface %s method %s\n", interface, method);
-#endif /* GNOME_ENABLE_DEBUG */
-
- if (strcmp (method, "top_application") == 0) {
- gtk_window_present (GTK_WINDOW (data->window));
- }
-
- ret->type = DBUS_TYPE_INVALID;
- return OSSO_OK;
-}
-
-static void
-sync_is_topmost_cb (HildonProgram *program,
- GParamSpec *pspec,
- AppData *data)
-{
- if (hildon_program_get_is_topmost (program)) {
- hildon_program_set_can_hibernate (program, FALSE);
- } else {
- /* Ensure settings are saved to disk */
- ar_conf_save ();
-
- /* FIXMEchpe: save state here */
-
- hildon_program_set_can_hibernate (program, TRUE);
- }
-}
-
-#endif /* HAVE_MAEMO */
-
static void
add_main_options (GOptionContext *option_context,
AppData *data)
@@ -225,35 +137,9 @@ main_prog (void *closure, int argc, char *argv[])
#ifdef WITH_SMCLIENT
EggSMClient *sm_client;
#endif /* WITH_SMCLIENT */
-#ifdef HAVE_MAEMO
- osso_hw_state_t hw_events = {
- TRUE /* shutdown */,
- TRUE /* save unsaved data */,
- TRUE /* low memory */,
- FALSE /* system inactivity */,
- OSSO_DEVMODE_NORMAL /* device mode */
- /* FIXMEchpe: or is OSSO_DEVMODE_INVALID the value to use
- * when not interested in this signal? The docs don't tell.
- */
- };
-#endif /* HAVE_MAEMO */
memset (&data, 0, sizeof (AppData));
-#ifdef HAVE_MAEMO
- /* Set OSSO callbacks */
- if (osso_rpc_set_default_cb_f (ar_runtime_get_osso_context (),
- osso_rpc_cb,
- &data) != OSSO_OK ||
- osso_hw_set_event_cb (ar_runtime_get_osso_context (),
- &hw_events,
- osso_hw_event_cb,
- &data) != OSSO_OK) {
- g_print ("Failed to connect OSSO handlers\n");
- goto cleanup;
- }
-#endif /* HAVE_MAEMO */
-
option_context = g_option_context_new (NULL);
g_option_context_set_translation_domain (option_context, GETTEXT_PACKAGE);
@@ -272,20 +158,6 @@ main_prog (void *closure, int argc, char *argv[])
g_option_context_add_group (option_context, gtk_clutter_get_option_group ());
#endif /* HAVE_CLUTTER */
-#if defined(HAVE_HILDON) && defined(HAVE_MAEMO_5)
- {
- char *rc_file;
-
- /* Note: we have to use gtk_rc_add_default_file() before calling gtk_init() (via
- * g_option_context_parse()) rather than parsing the file directly afterward, in
- * order to get priority over the theme.
- */
- rc_file = ar_runtime_get_file (AR_RUNTIME_GAME_DATA_DIRECTORY, "gtkrc-maemo");
- gtk_rc_add_default_file (rc_file);
- g_free (rc_file);
- }
-#endif /* HAVE_HILDON && HAVE_MAEMO_5 */
-
retval = g_option_context_parse (option_context, &argc, &argv, &error);
g_option_context_free (option_context);
@@ -295,13 +167,6 @@ main_prog (void *closure, int argc, char *argv[])
goto cleanup;
}
-#ifdef HAVE_MAEMO
- data.program = HILDON_PROGRAM (hildon_program_get_instance ());
-
- g_signal_connect (data.program, "notify::is-topmost",
- G_CALLBACK(sync_is_topmost_cb), &data);
-#endif /* HAVE_MAEMO */
-
g_set_application_name (data.freecell ? _("FreeCell Solitaire") : _("AisleRiot"));
aisleriot_conf_init ();
@@ -341,35 +206,6 @@ main_prog (void *closure, int argc, char *argv[])
G_CALLBACK (quit_cb), &data);
#endif /* WITH_SMCLIENT */
-#ifdef HAVE_HILDON
- hildon_program_add_window (data.program, HILDON_WINDOW (data.window));
-
- /* This is necessary since the setting is only installed
- * during class initialisation. See bug #585024.
- */
- /* For "gtk-menu-images" */
- g_type_class_unref (g_type_class_ref (GTK_TYPE_IMAGE_MENU_ITEM));
- /* For "gtk-button-images" */
- g_type_class_unref (g_type_class_ref (GTK_TYPE_BUTTON));
- /* For "gtk-toolbar-style" */
- g_type_class_unref (g_type_class_ref (GTK_TYPE_TOOLBAR));
-
- /* FIXMEchpe sort of strange that maemo doesn't all of this out-of-the-box... */
- g_object_set (gtk_widget_get_settings (GTK_WIDGET (data.window)),
- "gtk-alternative-button-order", TRUE,
- "gtk-toolbar-style", GTK_TOOLBAR_ICONS,
- "gtk-menu-images", FALSE,
- "gtk-button-images", FALSE,
- "gtk-enable-mnemonics", FALSE,
-
- /* We want the default of FALSE for this property, but to work
- * around https://bugs.maemo.org/show_bug.cgi?id=2278 we have
- * to set this to TRUE.
- */
- "gtk-enable-accels", TRUE,
- NULL);
-#endif /* HAVE_HILDON */
-
if (data.freecell) {
aisleriot_window_set_game (data.window, FREECELL_VARIATION, data.seed);
} else {
@@ -390,12 +226,6 @@ main_prog (void *closure, int argc, char *argv[])
cleanup:
g_free (data.variation);
-#ifdef HAVE_MAEMO
- if (data.program != NULL) {
- g_object_unref (data.program);
- }
-#endif /* HAVE_MAEMO */
-
g_settings_sync ();
ar_runtime_shutdown ();
@@ -404,11 +234,7 @@ cleanup:
int
main (int argc, char *argv[])
{
-#ifndef HAVE_HILDON
if (!ar_runtime_init ("aisleriot"))
-#else
- if (!ar_runtime_init_with_osso ("aisleriot", SERVICE_NAME))
-#endif /* !HAVE_HILDON */
return 1;
scm_boot_guile (argc, argv, main_prog, NULL); /* no return */
diff --git a/src/stats-dialog.c b/src/stats-dialog.c
index 2986c19..9019abb 100644
--- a/src/stats-dialog.c
+++ b/src/stats-dialog.c
@@ -75,10 +75,8 @@ pack_in_frame (GtkWidget *box,
gtk_box_pack_start (GTK_BOX (box), frame, FALSE, FALSE, 0);
gtk_widget_show_all (frame);
-#ifndef HAVE_HILDON
ar_atk_util_add_atk_relation (label, frame, ATK_RELATION_LABEL_FOR);
ar_atk_util_add_atk_relation (frame, label, ATK_RELATION_LABELLED_BY);
-#endif /* !HAVE_HILDON */
}
static GtkLabel *
@@ -100,10 +98,8 @@ add_row (GtkTable *table,
gtk_table_attach_defaults (table, data_label,
1, 2, row, row + 1);
-#ifndef HAVE_HILDON
ar_atk_util_add_atk_relation (label, data_label, ATK_RELATION_LABEL_FOR);
ar_atk_util_add_atk_relation (data_label, label, ATK_RELATION_LABELLED_BY);
-#endif /* !HAVE_HILDON */
return GTK_LABEL (data_label);
}
@@ -183,10 +179,8 @@ aisleriot_stats_dialog_init (AisleriotStatsDialog *stats_dialog)
-1);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
-#ifndef HAVE_MAEMO
- /* Empty title shows up as "<unnamed>" on maemo */
gtk_window_set_title (GTK_WINDOW (dialog), "");
-#endif
+ gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
}
static void
diff --git a/src/window.c b/src/window.c
index 6bfd8de..5eada13 100644
--- a/src/window.c
+++ b/src/window.c
@@ -30,14 +30,6 @@
#include <gdk/gdk.h>
#include <gtk/gtk.h>
-#ifdef HAVE_HILDON
-#ifdef HAVE_MAEMO_3
-#include <hildon-widgets/hildon-banner.h>
-#else
-#include <hildon/hildon-banner.h>
-#endif
-#endif /* HAVE_HILDON */
-
#include "ar-clock.h"
#include "ar-debug.h"
#include "ar-glib-compat.h"
@@ -79,23 +71,12 @@
#define MAIN_MENU_UI_PATH "/MainMenu"
#define RECENT_GAMES_MENU_PATH MAIN_MENU_UI_PATH "/GameMenu/RecentMenu"
#define OPTIONS_MENU_PATH MAIN_MENU_UI_PATH "/OptionsMenu"
-#ifdef HAVE_HILDON
-#define CARD_THEMES_MENU_PATH MAIN_MENU_UI_PATH "/ViewMenu/ThemeMenu"
-#else
#define CARD_THEMES_MENU_PATH MAIN_MENU_UI_PATH "/ViewMenu/ThemeMenu/ThemesPH"
-#endif
#define TOOLBAR_UI_PATH "/Toolbar"
/* The maximum number of recent games saved */
#define MAX_RECENT 5
-/* On maemo5, there's no hardware key to exit the fullscreen mode. So we show
- * an overlay button to restore normal mode, if the toolbar is hidden too.
- */
-#if defined(HAVE_HILDON) && defined(HAVE_MAEMO_5)
-#define LEAVE_FULLSCREEN_BUTTON
-#endif
-
#define AR_SETTINGS_PATH_PREFIX "/org/gnome/solitaire/"
#define AR_SETTINGS_WINDOW_STATE_PATH AR_SETTINGS_PATH_PREFIX "window-state/"
@@ -110,9 +91,6 @@ enum
ACTION_DEAL,
ACTION_HINT,
ACTION_LEAVE_FULLSCREEN,
-#ifdef HAVE_HILDON
- ACTION_ACCEL_UNDO_MOVE,
-#endif
LAST_ACTION
};
@@ -131,16 +109,12 @@ struct _AisleriotWindowPrivate
ArCardThemes *theme_manager;
ArCardTheme *theme;
-#ifdef HAVE_HILDON
- guint game_message_hash;
-#else
GtkStatusbar *statusbar;
guint game_message_id;
guint board_message_id;
GtkWidget *score_box;
GtkWidget *score_label;
GtkWidget *clock;
-#endif /* HAVE_HILDON */
GtkUIManager *ui_manager;
GtkActionGroup *action_group;
@@ -161,9 +135,7 @@ struct _AisleriotWindowPrivate
GtkWidget *game_choice_dialog;
AisleriotStatsDialog *stats_dialog;
-#ifndef HAVE_HILDON
GtkWidget *hint_dialog;
-#endif
#ifdef LEAVE_FULLSCREEN_BUTTON
GtkWidget *fullscreen_button;
@@ -262,13 +234,7 @@ show_game_over_dialog (AisleriotWindow *window)
"<b>%s</b>",
message);
-#ifdef HAVE_HILDON
- /* Empty title shows up as "<unnamed>" on maemo */
- gtk_window_set_title (GTK_WINDOW (dialog), _("Game Over"));
-#else
gtk_window_set_title (GTK_WINDOW (dialog), "");
-#endif /* HAVE_HILDON */
-
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
if (game_won) {
@@ -450,15 +416,12 @@ help_about_cb (GtkAction *action,
"version", VERSION,
"title", priv->freecell_mode ? _("About FreeCell Solitaire")
: _("About AisleRiot"),
-#ifndef HAVE_HILDON
- /* The long text makes the dialogue too large under maemo */
"comments",
priv->freecell_mode ?
NULL :
_("AisleRiot provides a rule-based solitaire "
"card engine that allows many different "
"games to be played."),
-#endif
"copyright", "Copyright © 1998-2006 Jonathan Blandford\n"
"Copyright © 2007, 2008, 2009, 2010, 2011 Christian Persch",
"license", licence,
@@ -549,8 +512,6 @@ statistics_cb (GtkAction *action,
gtk_window_present (GTK_WINDOW (priv->stats_dialog));
}
-#ifndef HAVE_HILDON
-
static void
install_themes_cb (GtkAction *action,
AisleriotWindow *window)
@@ -562,12 +523,8 @@ install_themes_cb (GtkAction *action,
gtk_get_current_event_time ());
}
-#endif /* !HAVE_HILDON */
-
#ifdef ENABLE_DEBUG_UI
-#ifndef HAVE_HILDON
-
static void
move_to_next_screen_cb (GtkAction *action,
GtkWidget *widget)
@@ -770,8 +727,6 @@ debug_game_prev (GtkAction *action,
aisleriot_window_set_game (data->window, (const char *) data->current_game->data, 0);
}
-#endif /* !HAVE_HILDON */
-
static void
debug_choose_seed_response_cb (GtkWidget *dialog,
int response,
@@ -910,8 +865,6 @@ toolbar_toggled_cb (GtkToggleAction *action,
set_fullscreen_button_active (window);
}
-#ifndef HAVE_HILDON
-
static void
statusbar_toggled_cb (GtkToggleAction *action,
AisleriotWindow *window)
@@ -931,8 +884,6 @@ statusbar_toggled_cb (GtkToggleAction *action,
ar_conf_set_boolean (NULL, aisleriot_conf_get_key (CONF_SHOW_STATUSBAR), state);
}
-#endif /* !HAVE_HILDON */
-
static void
set_fullscreen_actions (AisleriotWindow *window,
gboolean is_fullscreen)
@@ -941,9 +892,7 @@ set_fullscreen_actions (AisleriotWindow *window,
priv->fullscreen = is_fullscreen;
-#ifndef HAVE_MAEMO
g_object_set (priv->main_menu, "visible", !is_fullscreen, NULL);
-#endif /* HAVE_MAEMO */
gtk_action_set_visible (priv->action[ACTION_LEAVE_FULLSCREEN], is_fullscreen);
g_object_set (gtk_ui_manager_get_widget (priv->ui_manager, "/Toolbar/LeaveFullscreenSep"),
@@ -1034,19 +983,15 @@ show_hint_cb (GtkAction *action,
{
AisleriotWindowPrivate *priv = window->priv;
char *message;
-#ifndef HAVE_HILDON
GtkWidget *dialog;
-#endif
/* If the game hasn't started yet, getting a hint starts it */
aisleriot_game_start (priv->game);
-#ifndef HAVE_HILDON
if (priv->hint_dialog) {
gtk_widget_destroy (priv->hint_dialog);
priv->hint_dialog = NULL;
}
-#endif
/* Only can show hints for running games */
if (aisleriot_game_get_state (priv->game) != GAME_RUNNING)
@@ -1056,12 +1001,6 @@ show_hint_cb (GtkAction *action,
if (!message)
return;
-#ifdef HAVE_HILDON
- hildon_banner_show_information (GTK_WIDGET (window),
- NULL,
- message);
-#else
-
dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW (window),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
@@ -1077,7 +1016,6 @@ show_hint_cb (GtkAction *action,
G_CALLBACK (gtk_widget_destroy), NULL);
g_signal_connect (dialog, "destroy",
G_CALLBACK (gtk_widget_destroyed), &priv->hint_dialog);
-#endif /* HAVE_HILDON */
g_free (message);
}
@@ -1350,11 +1288,7 @@ install_recently_played_menu (AisleriotWindow *window)
g_snprintf (actionname, sizeof (actionname), "Recent%"G_GSIZE_FORMAT, i);
game_name = ar_filename_to_display_name (recent_games[i]);
-#ifdef HAVE_HILDON
- tooltip = NULL;
-#else
tooltip = g_strdup_printf (_("Play â??%sâ??"), game_name);
-#endif /* HAVE_HILDON */
action = gtk_action_new (actionname, game_name, tooltip, NULL);
g_free (game_name);
g_free (tooltip);
@@ -1515,11 +1449,7 @@ install_card_theme_menu (ArCardThemes *theme_manager,
display_name = g_strdup (ar_card_theme_info_get_display_name (info));
g_snprintf (actionname, sizeof (actionname), "Theme%d", i);
-#ifdef HAVE_HILDON
- tooltip = NULL;
-#else
tooltip = g_strdup_printf (_("Display cards with â??%sâ?? card theme"), display_name);
-#endif
action = gtk_radio_action_new (actionname, display_name, tooltip, NULL, i);
g_free (display_name);
g_free (tooltip);
@@ -1555,15 +1485,9 @@ install_card_theme_menu (ArCardThemes *theme_manager,
g_list_free (list);
}
-#ifdef HAVE_HILDON
-static void
-main_menu_show_cb (GtkMenu *menu,
- AisleriotWindow *window)
-#else
static void
view_menu_activate_cb (GtkAction *action,
AisleriotWindow *window)
-#endif
{
AisleriotWindowPrivate *priv = window->priv;
@@ -1575,29 +1499,8 @@ view_menu_activate_cb (GtkAction *action,
/* Callbacks */
-#ifdef HAVE_HILDON
-
-static void
-sync_window_topmost_cb (AisleriotWindow *window,
- GParamSpec *pspec,
- gpointer user_data)
-{
- AisleriotWindowPrivate *priv = window->priv;
- gboolean is_topmost;
-
- if (aisleriot_game_get_state (priv->game) == GAME_RUNNING) {
- is_topmost = hildon_window_get_is_topmost (HILDON_WINDOW (window));
-
- aisleriot_game_set_paused (priv->game, !is_topmost);
- }
-}
-
-#endif /* HAVE_HILDON */
-
/* Game state synchronisation */
-#ifndef HAVE_HILDON
-
static void
sync_game_score (AisleriotGame *game,
GParamSpec *pspec,
@@ -1617,8 +1520,6 @@ sync_game_score (AisleriotGame *game,
gtk_label_set_text (GTK_LABEL (priv->score_label), str);
}
-#endif /* !HAVE_HILDON */
-
static void
sync_game_state (AisleriotGame *game,
GParamSpec *pspec,
@@ -1641,13 +1542,11 @@ sync_game_state (AisleriotGame *game,
gtk_action_set_sensitive (priv->action[ACTION_HINT],
state == GAME_BEGIN || state == GAME_RUNNING);
-#ifndef HAVE_HILDON
if (state == GAME_RUNNING) {
ar_clock_start (AR_CLOCK (priv->clock));
} else {
ar_clock_stop (AR_CLOCK (priv->clock));
}
-#endif
if (state >= GAME_OVER) {
update_statistics_display (window);
@@ -1666,9 +1565,6 @@ sync_game_undoable (AisleriotGame *game,
g_object_get (game, "can-undo", &enabled, NULL);
gtk_action_set_sensitive (priv->action[ACTION_UNDO_MOVE], enabled);
-#ifdef HAVE_HILDON
- gtk_action_set_sensitive (priv->action[ACTION_ACCEL_UNDO_MOVE], enabled);
-#endif
/* The restart game validity condition is the same as for undo. */
gtk_action_set_sensitive (priv->action[ACTION_RESTART_GAME], enabled);
@@ -1708,9 +1604,7 @@ game_type_changed_cb (AisleriotGame *game,
char *game_name;
guint features;
gboolean dealable;
-#ifndef HAVE_HILDON
gboolean show_scores;
-#endif /* !HAVE_HILDON */
priv->changing_game_type = TRUE;
@@ -1739,8 +1633,6 @@ game_type_changed_cb (AisleriotGame *game,
dealable = (features & FEATURE_DEALABLE) != 0;
gtk_action_set_visible (priv->action[ACTION_DEAL], dealable);
-#ifdef HAVE_HILDON
-#else
ar_clock_reset (AR_CLOCK (priv->clock));
gtk_statusbar_pop (priv->statusbar, priv->game_message_id);
@@ -1748,7 +1640,6 @@ game_type_changed_cb (AisleriotGame *game,
show_scores = (features & FEATURE_SCORE_HIDDEN) == 0;
g_object_set (priv->score_box, "visible", show_scores, NULL);
-#endif /* HAVE_HILDON */
priv->changing_game_type = FALSE;
}
@@ -1757,18 +1648,14 @@ static void
game_new_cb (AisleriotGame *game,
AisleriotWindow *window)
{
-#ifndef HAVE_HILDON
AisleriotWindowPrivate *priv = window->priv;
-#endif
update_statistics_display (window);
-#ifndef HAVE_HILDON
ar_clock_reset (AR_CLOCK (priv->clock));
gtk_statusbar_pop (priv->statusbar, priv->game_message_id);
gtk_statusbar_pop (priv->statusbar, priv->board_message_id);
-#endif /* !HAVE_HILDON */
}
static void
@@ -1777,33 +1664,12 @@ game_statusbar_message_cb (AisleriotGame *game,
AisleriotWindow *window)
{
AisleriotWindowPrivate *priv = window->priv;
-#ifdef HAVE_HILDON
-
- /* The banners are annoying, but until I get a better idea, use them */
- {
- guint hash;
-
- if (message != NULL && message[0] != '\0') {
- /* Check that the message is different from the last one;
- * otherwise this becomes too annoying.
- */
- hash = g_str_hash (message);
- if (hash != priv->game_message_hash) {
- priv->game_message_hash = hash;
- hildon_banner_show_information (GTK_WIDGET (window),
- NULL,
- message);
- }
- }
- }
-#else
guint id = priv->game_message_id;
gtk_statusbar_pop (priv->statusbar, id);
if (message != NULL) {
gtk_statusbar_push (priv->statusbar, id, message);
}
-#endif /* HAVE_HILDON */
}
static void
@@ -1875,13 +1741,7 @@ game_exception_cb (AisleriotGame *game,
(GTK_MESSAGE_DIALOG (dialog),
"%s", _("Please report this bug to the developers."));
-#ifdef HAVE_HILDON
- /* Empty title shows up as "<unnamed>" on maemo */
- gtk_window_set_title (GTK_WINDOW (dialog), _("Error"));
-#else
gtk_window_set_title (GTK_WINDOW (dialog), "");
-#endif /* HAVE_HILDON */
-
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
@@ -2005,8 +1865,6 @@ aisleriot_window_set_freecell_mode (AisleriotWindow *window,
}
}
-#ifndef HAVE_HILDON
-
static void
board_status_message_cb (AisleriotBoard *board,
const char *status_message,
@@ -2021,8 +1879,6 @@ board_status_message_cb (AisleriotBoard *board,
}
}
-#endif /* !HAVE_HILDON */
-
#ifdef HAVE_CLUTTER
static void
@@ -2054,11 +1910,7 @@ embed_size_allocate_cb (ArClutterEmbed *embed,
/* Class implementation */
-#ifdef HAVE_HILDON
-G_DEFINE_TYPE (AisleriotWindow, aisleriot_window, HILDON_TYPE_WINDOW);
-#else
-G_DEFINE_TYPE (AisleriotWindow, aisleriot_window, GTK_TYPE_WINDOW);
-#endif
+G_DEFINE_TYPE (AisleriotWindow, aisleriot_window, GTK_TYPE_WINDOW)
static void
aisleriot_window_style_set (GtkWidget *widget,
@@ -2087,9 +1939,7 @@ aisleriot_window_state_event (GtkWidget *widget,
GdkEventWindowState *event)
{
AisleriotWindow *window = AISLERIOT_WINDOW (widget);
-#ifndef HAVE_HILDON
AisleriotWindowPrivate *priv = window->priv;
-#endif
if (event->changed_mask & (GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_MAXIMIZED)) {
gboolean is_fullscreen, is_maximised;
@@ -2102,7 +1952,6 @@ aisleriot_window_state_event (GtkWidget *widget,
set_fullscreen_button_active (window);
}
-#ifndef HAVE_HILDON
if (event->changed_mask & GDK_WINDOW_STATE_ICONIFIED) {
if (aisleriot_game_get_state (priv->game) == GAME_RUNNING) {
gboolean is_iconified;
@@ -2117,7 +1966,6 @@ aisleriot_window_state_event (GtkWidget *widget,
}
}
}
-#endif /* !HAVE_HILDON */
if (GTK_WIDGET_CLASS (aisleriot_window_parent_class)->window_state_event) {
return GTK_WIDGET_CLASS (aisleriot_window_parent_class)->window_state_event (widget, event);
@@ -2126,23 +1974,6 @@ aisleriot_window_state_event (GtkWidget *widget,
return FALSE;
}
-#ifdef HAVE_HILDON
-/* We never show tooltips, no need to put them into the binary */
-#define ACTION_TOOLTIP(string) (NULL)
-#else
-#define ACTION_TOOLTIP(string) (string)
-#endif
-
-/* The maemo5 device (N900) doesn't have these extra hardware keys,
- * so we only re-define the accels for maemo[34]. The N900 does have
- * a slide-out keyboard, so using the regular accels should work fine.
- */
-#if defined(HAVE_HILDON) && (defined(HAVE_MAEMO_3) || defined(HAVE_MAEMO_4))
-#define ACTION_ACCEL(string1,string2) (string2)
-#else
-#define ACTION_ACCEL(string1,string2) (string1)
-#endif
-
static void
aisleriot_window_init (AisleriotWindow *window)
{
@@ -2156,64 +1987,59 @@ aisleriot_window_init (AisleriotWindow *window)
/* Menu item actions */
{ "NewGame", AR_STOCK_NEW_GAME, NULL,
- ACTION_ACCEL ("<ctrl>N", NULL),
- ACTION_TOOLTIP (N_("Start a new game")),
+ "<ctrl>N",
+ N_("Start a new game"),
G_CALLBACK (new_game_cb) },
{ "RestartGame", AR_STOCK_RESTART_GAME, NULL, NULL,
- ACTION_TOOLTIP (N_("Restart the game")),
+ N_("Restart the game"),
G_CALLBACK (restart_game) },
{ "Select", GTK_STOCK_INDEX, N_("_Select Game..."),
- ACTION_ACCEL ("<ctrl>O", NULL),
- ACTION_TOOLTIP (N_("Play a different game")),
+ "<ctrl>O",
+ N_("Play a different game"),
G_CALLBACK (select_game_cb) },
{ "RecentMenu", NULL, N_("_Recently Played") },
{ "Statistics", NULL, N_("S_tatistics"), NULL,
- ACTION_TOOLTIP (N_("Show gameplay statistics")),
+ N_("Show gameplay statistics"),
G_CALLBACK (statistics_cb) },
{ "CloseWindow", GTK_STOCK_CLOSE, NULL, NULL,
- ACTION_TOOLTIP (N_("Close this window")),
+ N_("Close this window"),
G_CALLBACK (close_window_cb) },
{ "UndoMove", AR_STOCK_UNDO_MOVE, NULL, NULL,
- ACTION_TOOLTIP (N_("Undo the last move")),
+ N_("Undo the last move"),
G_CALLBACK (undo_cb) },
{ "RedoMove", AR_STOCK_REDO_MOVE, NULL, NULL,
- ACTION_TOOLTIP (N_("Redo the undone move")),
+ N_("Redo the undone move"),
G_CALLBACK (redo_cb) },
{ "Deal", AR_STOCK_DEAL_CARDS, NULL, NULL,
- ACTION_TOOLTIP (N_("Deal next card or cards")),
+ N_("Deal next card or cards"),
G_CALLBACK (deal_cb) },
{ "Hint", AR_STOCK_HINT, NULL, NULL,
- ACTION_TOOLTIP (N_("Get a hint for your next move")),
+ N_("Get a hint for your next move"),
G_CALLBACK (show_hint_cb) },
{ "Contents", AR_STOCK_CONTENTS, NULL, NULL,
- ACTION_TOOLTIP (N_("View help for Aisleriot")),
+ N_("View help for Aisleriot"),
G_CALLBACK (help_general_cb) },
{ "HelpGame", AR_STOCK_CONTENTS, NULL,
- ACTION_ACCEL ("<shift>F1", NULL),
- ACTION_TOOLTIP (N_("View help for this game")),
+ "<shift>F1",
+ N_("View help for this game"),
G_CALLBACK (help_on_game_cb) },
{ "About", GTK_STOCK_ABOUT, NULL, NULL,
- ACTION_TOOLTIP (N_("About this game")),
+ N_("About this game"),
G_CALLBACK (help_about_cb) },
-#ifndef HAVE_HILDON
{ "InstallThemes", NULL, N_("Install card themesâ?¦"), NULL,
- ACTION_TOOLTIP (N_("Install new card themes from the distribution packages repositories")),
+ N_("Install new card themes from the distribution packages repositories"),
G_CALLBACK (install_themes_cb) },
-#endif /* HAVE_HILDON */
/* Toolbar-only actions */
{ "LeaveFullscreen", AR_STOCK_LEAVE_FULLSCREEN, NULL, NULL, NULL,
G_CALLBACK (leave_fullscreen_cb) },
-#ifndef HAVE_HILDON
{ "ThemeMenu", NULL, N_("_Card Style"), NULL, NULL, NULL },
-#endif /* !HAVE_HILDON */
#ifdef ENABLE_DEBUG_UI
/* Debug UI actions */
{ "DebugMenu", NULL, "_Debug" },
{ "DebugChooseSeed", NULL, "_Choose seed", NULL, NULL,
G_CALLBACK (debug_choose_seed_cb) },
-#ifndef HAVE_HILDON
{ "DebugMoveNextScreen", NULL, "_Move to next screen", NULL, NULL,
G_CALLBACK (move_to_next_screen_cb) },
{ "DebugDelayedMoveNextScreen", NULL, "_Delayed move to next screen", NULL, NULL,
@@ -2230,18 +2056,11 @@ aisleriot_window_init (AisleriotWindow *window)
G_CALLBACK (debug_game_next) },
{ "DebugGamePrev", GTK_STOCK_GO_BACK, NULL, NULL, NULL,
G_CALLBACK (debug_game_prev) },
-#endif /* !HAVE_HILDON */
{ "DebugTweakStyle", NULL, "_Tweak Style", NULL, NULL,
G_CALLBACK (debug_tweak_style_cb) },
{ "DebugTweakSettings", NULL, "_Tweak GtkSettings", NULL, NULL,
G_CALLBACK (debug_tweak_settings_cb) },
#endif /* ENABLE_DEBUG_UI */
-
- /* Accel actions */
-#ifdef HAVE_HILDON
- { "AccelUndoMove", NULL, "AccelUndoMove", "Escape", NULL,
- G_CALLBACK (undo_cb) },
-#endif
};
const GtkToggleActionEntry toggle_actions[] = {
@@ -2249,30 +2068,28 @@ aisleriot_window_init (AisleriotWindow *window)
G_CALLBACK (fullscreen_toggled_cb),
FALSE },
{ "Toolbar", NULL, N_("_Toolbar"), NULL,
- ACTION_TOOLTIP (N_("Show or hide the toolbar")),
+ N_("Show or hide the toolbar"),
G_CALLBACK (toolbar_toggled_cb),
TRUE /* active by default since the UI manager creates the toolbar visible */
},
-#ifndef HAVE_HILDON
{ "Statusbar", NULL, N_("_Statusbar"), NULL,
- ACTION_TOOLTIP (N_("Show or hide statusbar")),
+ N_("Show or hide statusbar"),
G_CALLBACK (statusbar_toggled_cb),
FALSE
},
-#endif /* !HAVE_HILDON */
{ "ClickToMove", NULL, N_("_Click to Move"), NULL,
- ACTION_TOOLTIP (N_("Pick up and drop cards by clicking")),
+ N_("Pick up and drop cards by clicking"),
G_CALLBACK (clickmove_toggle_cb),
FALSE /* not active by default */ },
#ifdef ENABLE_SOUND
{ "Sound", NULL, N_("_Sound"), NULL,
- ACTION_TOOLTIP (N_("Whether or not to play event sounds")),
+ N_("Whether or not to play event sounds"),
G_CALLBACK (sound_toggle_cb),
FALSE /* not active by default */ },
#endif /* ENABLE_SOUND */
#ifdef HAVE_CLUTTER
{ "Animations", NULL, N_("_Animations"), NULL,
- ACTION_TOOLTIP (N_("Whether or not to animate card moves")),
+ N_("Whether or not to animate card moves"),
G_CALLBACK (animations_toggle_cb),
FALSE /* not active by default */ },
#endif /* HAVE_CLUTTER */
@@ -2288,58 +2105,10 @@ aisleriot_window_init (AisleriotWindow *window)
"Deal",
"Hint",
"LeaveFullscreen",
-#ifdef HAVE_HILDON
- "AccelUndoMove",
-#endif /* HAVE_HILDON */
};
static const char ui_description[] =
"<ui>"
-#ifdef HAVE_HILDON
- "<popup name='MainMenu'>"
- "<menu action='GameMenu'>"
- "<menuitem action='NewGame'/>"
- "<menuitem action='RestartGame'/>"
- "<menuitem action='Statistics'/>"
- "<menuitem action='Select'/>"
- "<separator />"
- "<placeholder name='RecentMenu'/>"
- "<separator/>"
- "</menu>"
- "<menu action='ViewMenu'>"
- "<menuitem action='Fullscreen'/>"
- "<menuitem action='Toolbar'/>"
- "<separator/>"
- "<placeholder name='ThemeMenu'/>"
- "</menu>"
- "<menu action='ControlMenu'>"
- "<menuitem action='UndoMove'/>"
- "<menuitem action='RedoMove'/>"
- "<menuitem action='Deal'/>"
- "<menuitem action='Hint'/>"
- "<separator/>"
- "<menuitem action='ClickToMove'/>"
-#ifdef ENABLE_SOUND
- "<menuitem action='Sound'/>"
-#endif
- "</menu>"
- "<menu action='OptionsMenu'/>"
- "<menu action='HelpMenu'>"
- "<menuitem action='Contents'/>"
- "<menuitem action='HelpGame'/>"
- "<separator/>"
- "<menuitem action='About'/>"
- "</menu>"
-#ifdef ENABLE_DEBUG_UI
- "<menu action='DebugMenu'>"
- "<menuitem action='DebugChooseSeed'/>"
- "<menuitem action='DebugTweakStyle'/>"
- "<menuitem action='DebugTweakSettings'/>"
- "</menu>"
-#endif /* ENABLE_DEBUG_UI */
- "<menuitem action='CloseWindow'/>"
- "</popup>"
-#else /* !HAVE_HILDON */
"<menubar name='MainMenu'>"
"<menu action='GameMenu'>"
"<menuitem action='NewGame'/>"
@@ -2357,10 +2126,8 @@ aisleriot_window_init (AisleriotWindow *window)
"<separator/>"
"<menu action='ThemeMenu'>"
"<placeholder name='ThemesPH'/>"
-#ifndef HAVE_HILDON
"<separator/>"
"<menuitem action='InstallThemes'/>"
-#endif
"</menu>"
"</menu>"
"<menu action='ControlMenu'>"
@@ -2402,7 +2169,6 @@ aisleriot_window_init (AisleriotWindow *window)
"</menu>"
#endif /* ENABLE_DEBUG_UI */
"</menubar>"
-#endif /* HAVE_HILDON */
"<toolbar name='Toolbar'>"
"<toolitem action='NewGame'/>"
"<toolitem action='RestartGame'/>"
@@ -2420,13 +2186,7 @@ aisleriot_window_init (AisleriotWindow *window)
"<toolitem action='DebugGameNext'/>"
"<toolitem action='DebugGameLast'/>"
#endif
-#ifdef HAVE_MAEMO
- "<separator/>"
-#endif
"</toolbar>"
-#ifdef HAVE_HILDON
- "<accelerator action='AccelUndoMove'/>"
-#endif
"</ui>";
AisleriotWindowPrivate *priv;
@@ -2436,10 +2196,8 @@ aisleriot_window_init (AisleriotWindow *window)
char *theme_name;
ArCardTheme *theme;
guint i;
-#ifndef HAVE_HILDON
GtkStatusbar *statusbar;
GtkWidget *statusbar_hbox, *label, *time_box;
-#endif
#ifdef HAVE_CLUTTER
ClutterContainer *stage;
#endif
@@ -2527,7 +2285,6 @@ aisleriot_window_init (AisleriotWindow *window)
action = gtk_action_group_get_action (priv->action_group, "Select");
g_object_set (action, "short-label", _("Select Game"), NULL);
-#ifndef HAVE_HILDON
statusbar = priv->statusbar = GTK_STATUSBAR (gtk_statusbar_new ());
priv->game_message_id = gtk_statusbar_get_context_id (priv->statusbar, "game-message");
ar_stock_prepare_for_statusbar_tooltips (priv->ui_manager,
@@ -2571,7 +2328,6 @@ aisleriot_window_init (AisleriotWindow *window)
ar_atk_util_add_atk_relation (label, priv->clock, ATK_RELATION_LABEL_FOR);
ar_atk_util_add_atk_relation (priv->clock, label, ATK_RELATION_LABELLED_BY);
-#endif /* !HAVE_HILDON */
/* Load the UI after we've connected the statusbar,
* otherwise not all actions will have statusbar help.
@@ -2588,11 +2344,6 @@ aisleriot_window_init (AisleriotWindow *window)
#endif
/* Defer building the card themes menu until its parent's menu is opened */
-#ifdef HAVE_HILDON
- /* FIXMEchpe check this works! */
- g_signal_connect (priv->main_menu, "show",
- G_CALLBACK (main_menu_show_cb), window);
-#else
action = gtk_action_group_get_action (priv->action_group, "ViewMenu");
g_signal_connect (action, "activate",
G_CALLBACK (view_menu_activate_cb), window);
@@ -2605,7 +2356,6 @@ aisleriot_window_init (AisleriotWindow *window)
action = gtk_action_group_get_action (priv->action_group, "ThemeMenu");
g_object_set (action, "hide-if-empty", GINT_TO_POINTER (FALSE), NULL);
#endif
-#endif
/* It's possible that the themes list has already been loaded (e.g.
* if the theme loading above involved the fallback); in that case
@@ -2643,16 +2393,10 @@ aisleriot_window_init (AisleriotWindow *window)
gtk_action_set_visible (action, ar_sound_is_available ());
#endif /* ENABLE_SOUND */
-#ifndef HAVE_HILDON
action = gtk_action_group_get_action (priv->action_group, "Statusbar");
priv->statusbar_visible = ar_conf_get_boolean (NULL, aisleriot_conf_get_key (CONF_SHOW_STATUSBAR), NULL) != FALSE;
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
priv->statusbar_visible);
-#endif /* !HAVE_HILDON */
-
-#ifndef HAVE_HILDON
- action = gtk_action_group_get_action (priv->action_group, "InstallThemes");
-#endif /* HAVE_HILDON */
set_fullscreen_actions (window, FALSE);
@@ -2675,24 +2419,17 @@ aisleriot_window_init (AisleriotWindow *window)
gtk_container_add (GTK_CONTAINER (window), main_vbox);
gtk_widget_show (main_vbox);
-#ifdef HAVE_HILDON
- hildon_window_set_menu (HILDON_WINDOW (window), GTK_MENU (priv->main_menu));
- hildon_window_add_toolbar (HILDON_WINDOW (window), GTK_TOOLBAR (priv->toolbar));
-#else
gtk_box_pack_start (GTK_BOX (main_vbox), priv->main_menu, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (main_vbox), priv->toolbar, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (main_vbox), GTK_WIDGET (priv->statusbar), FALSE, FALSE, 0);
-#endif /* HAVE_HILDON */
gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (priv->board), TRUE, TRUE, 0);
gtk_widget_show (GTK_WIDGET (priv->board));
/* Synchronise */
-#ifndef HAVE_HILDON
sync_game_score (priv->game, NULL, window);
g_signal_connect (priv->game, "notify::score",
G_CALLBACK (sync_game_score), window);
-#endif /* !HAVE_HILDON */
sync_game_state (priv->game, NULL, window);
g_signal_connect (priv->game, "notify::state",
@@ -2724,24 +2461,6 @@ aisleriot_window_init (AisleriotWindow *window)
/* Initial focus is in the board */
gtk_widget_grab_focus (GTK_WIDGET (priv->board));
-
- /* FIXMEchpe: make this #ifdef HAVE_MAEMO_3 after testing that it is indeed fixed */
-#ifdef HAVE_HILDON
- /* Bug alert! maemo#615 and maemo#875
- * Thank you, maemo developers! This bug just cost me 2 hours of my life.
- */
- /* FIXMEchpe: find out if this is fixed on maemo4 or maemo5 */
- gtk_widget_set_no_show_all (main_vbox, TRUE);
- gtk_widget_show_all (GTK_WIDGET (window));
- if (!priv->toolbar_visible) {
- gtk_widget_hide (GTK_WIDGET (priv->toolbar));
- }
-#endif
-
-#ifdef HAVE_HILDON
- g_signal_connect (window, "notify::is-topmost",
- G_CALLBACK (sync_window_topmost_cb), NULL);
-#endif
}
static void
@@ -2756,12 +2475,10 @@ aisleriot_window_dispose (GObject *object)
window);
#endif /* HAVE_CLUTTER */
-#ifndef HAVE_HILDON
if (priv->hint_dialog) {
gtk_widget_destroy (priv->hint_dialog);
g_assert (priv->hint_dialog == NULL);
}
-#endif
if (priv->game_over_dialog) {
gtk_widget_destroy (priv->game_over_dialog);
g_assert (priv->game_over_dialog == NULL);
diff --git a/src/window.h b/src/window.h
index f4e8efe..6922127 100644
--- a/src/window.h
+++ b/src/window.h
@@ -20,14 +20,6 @@
#include <gtk/gtk.h>
-#ifdef HAVE_HILDON
-#ifdef HAVE_MAEMO_3
-#include <hildon-widgets/hildon-window.h>
-#else
-#include <hildon/hildon-window.h>
-#endif
-#endif /* HAVE_HILDON */
-
#include "game.h"
G_BEGIN_DECLS
@@ -43,21 +35,13 @@ typedef struct _AisleriotWindow AisleriotWindow;
typedef struct _AisleriotWindowPrivate AisleriotWindowPrivate;
struct _AisleriotWindow {
-#ifdef HAVE_HILDON
- HildonWindow parent_instance;
-#else
GtkWindow parent_instance;
-#endif /* HAVE_HILDON */
/*< private >*/
AisleriotWindowPrivate *priv;
};
-#ifdef HAVE_HILDON
-typedef HildonWindowClass AisleriotWindowClass;
-#else
typedef GtkWindowClass AisleriotWindowClass;
-#endif /* HAVE_HILDON */
GType aisleriot_window_get_type (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]