gnome-games r8974 - trunk/gnobots2
- From: thomashpa svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8974 - trunk/gnobots2
- Date: Wed, 1 Apr 2009 06:35:06 +0000 (UTC)
Author: thomashpa
Date: Wed Apr 1 06:35:06 2009
New Revision: 8974
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8974&view=rev
Log:
remove 'Enable splats' option. We should not have an option to disable a single sound. If it sucks so much we should just get rid of the sound. Patch by Diego LÃpez LeÃn. Fixes bug #577408
Modified:
trunk/gnobots2/game.c
trunk/gnobots2/gnobots2.schemas.in
trunk/gnobots2/properties.c
Modified: trunk/gnobots2/game.c
==============================================================================
--- trunk/gnobots2/game.c (original)
+++ trunk/gnobots2/game.c Wed Apr 1 06:35:06 2009
@@ -517,18 +517,14 @@
if ((temp_arena[i][j] == OBJECT_HEAP) &&
(push_xpos == i) && (push_ypos == j)) {
if (arena[i][j] == OBJECT_ROBOT1) {
- if (properties_splats ()) {
- add_splat_bubble (i, j);
- play_sound (SOUND_SPLAT);
- }
+ add_splat_bubble (i, j);
+ play_sound (SOUND_SPLAT);
push_xpos = push_ypos = -1;
score += game_config ()->score_type1_splatted;
}
if (arena[i][j] == OBJECT_ROBOT2) {
- if (properties_splats ()) {
- add_splat_bubble (i, j);
- play_sound (SOUND_SPLAT);
- }
+ add_splat_bubble (i, j);
+ play_sound (SOUND_SPLAT);
push_xpos = push_ypos = -1;
score += game_config ()->score_type2_splatted;
}
Modified: trunk/gnobots2/gnobots2.schemas.in
==============================================================================
--- trunk/gnobots2/gnobots2.schemas.in (original)
+++ trunk/gnobots2/gnobots2.schemas.in Wed Apr 1 06:35:06 2009
@@ -87,18 +87,6 @@
</schema>
<schema>
- <key>/schemas/apps/gnobots2/preferences/enable_splats</key>
- <applyto>/apps/gnobots2/preferences/enable_splats</applyto>
- <owner>gnobots2</owner>
- <type>bool</type>
- <default>TRUE</default>
- <locale name="C">
- <short>Enable splats</short>
- <long>Enable splats. Play a sound and show a "Splat!" on the screen.</long>
- </locale>
- </schema>
-
- <schema>
<key>/schemas/apps/gnobots2/preferences/key00</key>
<applyto>/apps/gnobots2/preferences/key00</applyto>
<owner>gnobots2</owner>
Modified: trunk/gnobots2/properties.c
==============================================================================
--- trunk/gnobots2/properties.c (original)
+++ trunk/gnobots2/properties.c Wed Apr 1 06:35:06 2009
@@ -57,7 +57,6 @@
#define KEY_BACKGROUND_COLOR "background_color"
#define KEY_CONFIGURATION "configuration"
#define KEY_ENABLE_SOUND "enable_sound"
-#define KEY_ENABLE_SPLATS "enable_splats"
#define KEY_SAFE_MOVES "use_safe_moves"
#define KEY_SHOW_TOOLBAR "show_toolbar"
#define KEY_SUPER_SAFE_MOVES "use_super_safe_moves"
@@ -78,7 +77,6 @@
gboolean safe_moves;
gboolean super_safe_moves;
gboolean sound;
- gboolean splats;
gboolean show_toolbar;
GdkColor bgcolour;
gint selected_config;
@@ -118,7 +116,6 @@
static void type_selection (GtkWidget *, gpointer);
static void safe_cb (GtkWidget *, gpointer);
static void sound_cb (GtkWidget *, gpointer);
-static void splat_cb (GtkWidget *, gpointer);
static void defkey_cb (GtkWidget *, gpointer);
static void fill_typemenu (GtkWidget *);
static void conf_set_background_color (GdkColor * c);
@@ -278,22 +275,6 @@
/**
- * splat_cb
- * @widget: widget
- * @data: callback data
- *
- * Description:
- * handles message from the 'splat' checkbox
- **/
-static void
-splat_cb (GtkWidget * widget, gpointer data)
-{
- properties.splats = GTK_TOGGLE_BUTTON (widget)->active;
- conf_set_enable_splats (properties.splats);
-}
-
-
-/**
* defkey_cb
* @widget: widget
* @data: callback data
@@ -507,15 +488,6 @@
gtk_widget_set_tooltip_text (chkbox,
_("Play sounds for events like winning a level and dying."));
- chkbox = gtk_check_button_new_with_mnemonic (_("E_nable splats"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (chkbox),
- properties.splats);
- g_signal_connect (G_OBJECT (chkbox), "clicked", (GCallback) splat_cb,
- NULL);
- gtk_box_pack_start (GTK_BOX (vbox), chkbox, TRUE, TRUE, 0);
- gtk_widget_set_tooltip_text (chkbox,
- _("Play the most common, and potentially the most annoying, sound."));
-
label = gtk_label_new_with_mnemonic (_("Game"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), cpage, label);
@@ -652,8 +624,6 @@
NULL);
properties.sound = games_conf_get_boolean (KEY_PREFERENCES_GROUP,
KEY_ENABLE_SOUND, NULL);
- properties.splats = games_conf_get_boolean (KEY_PREFERENCES_GROUP,
- KEY_ENABLE_SPLATS, NULL);
properties.show_toolbar = games_conf_get_boolean (KEY_PREFERENCES_GROUP,
KEY_SHOW_TOOLBAR, NULL);
@@ -721,12 +691,6 @@
}
void
-conf_set_enable_splats (gboolean value)
-{
- games_conf_set_boolean (KEY_PREFERENCES_GROUP, KEY_ENABLE_SPLATS, value);
-}
-
-void
conf_set_show_toolbar (gboolean value)
{
games_conf_set_boolean (KEY_PREFERENCES_GROUP, KEY_SHOW_TOOLBAR, value);
@@ -763,7 +727,6 @@
conf_set_use_safe_moves (properties.safe_moves);
conf_set_use_super_safe_moves (properties.super_safe_moves);
conf_set_enable_sound (properties.sound);
- conf_set_enable_splats (properties.splats);
return TRUE;
}
@@ -818,22 +781,6 @@
/**
- * properties_splats
- *
- * Description:
- * returns splat setting
- *
- * Returns:
- * TRUE if splats are selected
- **/
-gboolean
-properties_splats (void)
-{
- return properties.splats;
-}
-
-
-/**
* properties_show_toolbar
*
* Description:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]