From 583a78ba352d4fef8f71ec3fcebfb4b21da51250 Mon Sep 17 00:00:00 2001 From: Reto Zingg Date: Fri, 25 Dec 2009 23:36:49 +0200 Subject: [PATCH] refraction 3 --- Makefile | 2 +- data/mancala.conf | 2 +- src/launcher/mancala-launcher.c | 4 ++-- src/play.c | 1 + src/plugin/mancala-ui-plugin.c | 40 ++------------------------------------- 5 files changed, 7 insertions(+), 42 deletions(-) diff --git a/Makefile b/Makefile index 986e0e9..e06e0e8 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ install: cp data/com.nokia.mancala.service $(DESTDIR)/usr/share/dbus-1/services/ cp data/com.nokia.mancala_startup.service $(DESTDIR)/usr/share/dbus-1/services/ cp data/mancala.conf $(DESTDIR)/home/opt/mancala/data/ + cp data/mancala.game $(DESTDIR)/home/opt/mancala/data/ cp data/mancala.sh $(DESTDIR)/home/opt/mancala/bin/ clean: @@ -32,4 +33,3 @@ maemo-bin: clean dpkg-buildpackage -rfakeroot -b -us -uc .PHONY: clobber clean install subsystem maemo-source maemo-bin - diff --git a/data/mancala.conf b/data/mancala.conf index 96fa283..a9b89ff 100644 --- a/data/mancala.conf +++ b/data/mancala.conf @@ -6,7 +6,7 @@ Version=0.2 # the title that is used, if not specified by the GettextPackage Title=Mancala # the GettextPackage to be used to locate the title string -# GettextPackage=example +GettextPackage=mancala # if the TitleId is defined, it searches for it inside the gettext package # TitleId=example_title # if the game has a plug-in diff --git a/src/launcher/mancala-launcher.c b/src/launcher/mancala-launcher.c index 136b9af..9bdf039 100644 --- a/src/launcher/mancala-launcher.c +++ b/src/launcher/mancala-launcher.c @@ -17,8 +17,8 @@ char *argh[] = { "/usr/games/wrapper/wrapper", int main(int argc, char *argv[]) { - fprintf(stderr, "exec laucher...\n"); - + fprintf(stderr, "mancala launcher...\n"); + if (execv ("/usr/games/wrapper/wrapper", argh) == -1) { fprintf(stderr, "can not execute wrapper\n"); } diff --git a/src/play.c b/src/play.c index f8b6639..51b88a9 100644 --- a/src/play.c +++ b/src/play.c @@ -400,6 +400,7 @@ int play() { int main(int argc, char **argv) { + fprintf(stderr, "mancala main loop\n"); // #if HGW_FUNC hgw_context = hgw_context_compat_init(argc, argv); if (!hgw_context) { diff --git a/src/plugin/mancala-ui-plugin.c b/src/plugin/mancala-ui-plugin.c index 50e0ef4..2e23565 100644 --- a/src/plugin/mancala-ui-plugin.c +++ b/src/plugin/mancala-ui-plugin.c @@ -31,28 +31,19 @@ static GtkWidget *load_plugin (void); static void unload_plugin (void); static void write_config (void); -static GtkWidget **load_menu (guint *); -static void update_menu (void); static GameStartupInfo gs; - -GtkWidget *settings_item; -GtkWidget *settings_menu; -GtkWidget *difficulty_item; -GtkWidget *difficulty_menu; -GtkWidget *menu_items[2]; - static StartupPluginInfo plugin_info = { load_plugin, unload_plugin, write_config, - load_menu, - update_menu, NULL }; + + STARTUP_INIT_PLUGIN(plugin_info, gs, FALSE, FALSE) static GtkWidget *load_plugin (void) @@ -103,31 +94,4 @@ write_config (void) } -static GtkWidget **load_menu (guint *nitems) -{ - - int enable_sound; - //number of entries in osso-games-startup main menu for this game - *nitems = 1; - - settings_item = gtk_menu_item_new_with_label ("Settings"); - settings_menu = gtk_menu_new (); - menu_items[0] = settings_item; - gtk_menu_item_set_submenu (GTK_MENU_ITEM (settings_item), settings_menu); - - //difficulty settings - difficulty_menu = gtk_menu_new (); - difficulty_item = gtk_menu_item_new_with_label ("Difficulty"); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (difficulty_item), difficulty_menu); - gtk_menu_append (GTK_MENU (settings_menu), difficulty_item); - - - return GTK_WIDGET(menu_items); -} - - - -static void update_menu (void) -{ -} \ No newline at end of file -- 1.7.9.5