diff --git a/data/glade-translations b/data/glade-translations
index 020d0e77..0d636dd9 100644
--- a/data/glade-translations
+++ b/data/glade-translations
@@ -69,3 +69,8 @@ gchar *s = N_("Change...");
gchar *s = N_("Change...");
gchar *s = N_("Change...");
gchar *s = N_("Change...");
+gchar *s = N_("Sound settings");
+gchar *s = N_("Sound enabled");
+gchar *s = N_("Sample volume:");
+gchar *s = N_("Music volume:");
+gchar *s = N_("Enable samles");
diff --git a/data/pysolfc.glade b/data/pysolfc.glade
index cd69eb3d..39103dba 100644
--- a/data/pysolfc.glade
+++ b/data/pysolfc.glade
@@ -1850,7 +1850,7 @@
1
GTK_UPDATE_CONTINUOUS
False
- 1 0.2 10 0.1 1 1
+ 1 0.2 10 0.1 1 0
@@ -1872,7 +1872,7 @@
1
GTK_UPDATE_CONTINUOUS
False
- 1 0.2 10 0.1 1 1
+ 1 0.2 10 0.1 1 0
@@ -1894,7 +1894,7 @@
1
GTK_UPDATE_CONTINUOUS
False
- 1 0.2 10 0.1 1 1
+ 1 0.2 10 0.1 1 0
@@ -1916,7 +1916,7 @@
1
GTK_UPDATE_CONTINUOUS
False
- 1 0.2 10 0.1 1 1
+ 1 0.2 10 0.1 1 0
@@ -1938,7 +1938,7 @@
1
GTK_UPDATE_CONTINUOUS
False
- 1 0.2 10 0.1 1 1
+ 1 0.2 10 0.1 1 0
@@ -1960,7 +1960,7 @@
1
GTK_UPDATE_CONTINUOUS
False
- 1 0.2 10 0.1 1 1
+ 1 0.2 10 0.1 1 0
@@ -4121,4 +4121,305 @@
+
+ Sound settings
+ GTK_WINDOW_TOPLEVEL
+ GTK_WIN_POS_CENTER_ON_PARENT
+ True
+ True
+ False
+ True
+ False
+ False
+ GDK_WINDOW_TYPE_HINT_DIALOG
+ GDK_GRAVITY_NORTH_WEST
+ True
+
+
+
+ True
+ False
+ 0
+
+
+
+ True
+ GTK_BUTTONBOX_END
+
+
+
+ True
+ True
+ True
+ gtk-cancel
+ True
+ GTK_RELIEF_NORMAL
+ True
+ -6
+
+
+
+
+
+ True
+ True
+ True
+ gtk-apply
+ True
+ GTK_RELIEF_NORMAL
+ True
+ -10
+
+
+
+
+
+ True
+ True
+ True
+ gtk-ok
+ True
+ GTK_RELIEF_NORMAL
+ True
+ -5
+
+
+
+
+ 0
+ False
+ True
+ GTK_PACK_END
+
+
+
+
+
+ True
+ 4
+ 3
+ False
+ 0
+ 0
+
+
+
+ 4
+ True
+ True
+ Sound enabled
+ True
+ GTK_RELIEF_NORMAL
+ True
+ False
+ False
+ True
+
+
+ 0
+ 3
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Sample volume:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 4
+ 4
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Music volume:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 4
+ 4
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 1 0 128 1 10 10
+
+
+
+ 2
+ 3
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ 120
+ True
+ True
+ False
+ GTK_POS_TOP
+ 0
+ GTK_UPDATE_CONTINUOUS
+ False
+ 0 0 128 1 10 0
+
+
+
+ 1
+ 2
+ 2
+ 3
+ 4
+ fill
+
+
+
+
+
+ 120
+ True
+ True
+ False
+ GTK_POS_TOP
+ 0
+ GTK_UPDATE_CONTINUOUS
+ False
+ 0 0 128 1 10 0
+
+
+
+ 1
+ 2
+ 1
+ 2
+ 4
+ fill
+
+
+
+
+
+ True
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 1 0 128 1 10 10
+
+
+
+ 2
+ 3
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ 4
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 10
+ 2
+ False
+ 0
+ 0
+
+
+
+
+
+ True
+ Enable samles
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+ label_item
+
+
+
+
+ 0
+ 3
+ 3
+ 4
+ fill
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+
+
diff --git a/pysollib/actions.py b/pysollib/actions.py
index a91fa60d..2fd02925 100644
--- a/pysollib/actions.py
+++ b/pysollib/actions.py
@@ -58,7 +58,6 @@ from pysoltk import MfxMessageDialog, MfxSimpleEntry
from pysoltk import MfxExceptionDialog
from pysoltk import MfxRadioMenuItem, MfxCheckMenuItem, StringVar
from pysoltk import PlayerOptionsDialog
-from pysoltk import SoundOptionsDialog
#from pysoltk import HintOptionsDialog
from pysoltk import TimeoutsDialog
from pysoltk import ColorsDialog
@@ -805,15 +804,20 @@ class PysolMenubarActions:
self.game.updateStatus(player=self.app.opt.player)
self.game.updateStatus(stats=self.app.stats.getStats(self.app.opt.player, self.game.id))
- def mOptSoundDialog(self, *args):
- if self._cancelDrag(break_pause=False): return
- d = SoundOptionsDialog(self.top, _("Sound settings"), self.app)
- self.tkopt.sound.set(self.app.opt.sound)
-
## def mOptIrregularPiles(self, *args):
## if self._cancelDrag(): return
## self.app.opt.irregular_piles = self.tkopt.irregular_piles.get()
+ def _mOptTableTile(self, i):
+ if self.app.setTile(i):
+ self.tkopt.tabletile.set(i)
+
+ def _mOptTableColor(self, color):
+ tile = self.app.tabletile_manager.get(0)
+ tile.color = color
+ if self.app.setTile(0):
+ self.tkopt.tabletile.set(0)
+
def mOptColors(self, *args):
if self._cancelDrag(break_pause=False): return
d = ColorsDialog(self.top, _("Set colors"), self.app)
diff --git a/pysollib/pysolgtk/menubar.py b/pysollib/pysolgtk/menubar.py
index 26f817af..f833c920 100644
--- a/pysollib/pysolgtk/menubar.py
+++ b/pysollib/pysolgtk/menubar.py
@@ -44,6 +44,7 @@ from pysollib.settings import PACKAGE
# toolkit imports
from tkutil import setTransient
from tkutil import color_tk2gtk, color_gtk2tk
+from soundoptionsdialog import SoundOptionsDialog
from selectcardset import SelectCardsetDialogWithPreview
from selecttile import SelectTileDialogWithPreview
@@ -190,12 +191,15 @@ class PysolMenubar(PysolMenubarActions):
('playeroptions', None,
ltk2gtk('&Player options...'), None,
None,self.mOptPlayerOptions),
- ('tabletile', None,
- ltk2gtk('Table t&ile...'), None,
- None,self.mOptTableTile),
+ ('sound', None,
+ ltk2gtk('&Sound...'), None,
+ None, self.mOptSoundDialog),
('cardset', None,
ltk2gtk('Cards&et...'), 'E',
None, self.mSelectCardsetDialog),
+ ('tabletile', None,
+ ltk2gtk('Table t&ile...'), None,
+ None, self.mOptTableTile),
('fonts', None,
ltk2gtk('&Fonts...'), None,
None, self.mOptFonts),
@@ -360,8 +364,9 @@ class PysolMenubar(PysolMenubarActions):
-
+
+