From d2fce2d24a722dfc8ac90d2e510f24d63589b56e Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 2 Feb 2006 07:33:30 +0000 Subject: [PATCH] sound preview button. Fixes #1476 --- src/config.py | 7 ++++++ src/gtkgui.glade | 63 +++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/src/config.py b/src/config.py index 5ac4b9f6b..31176c965 100644 --- a/src/config.py +++ b/src/config.py @@ -956,6 +956,13 @@ class PreferencesWindow: model.set_value(iter, 2, path_to_file) model.set_value(iter, 1, 1) + def on_play_button_clicked(self, widget): + model, iter = self.sound_tree.get_selection().get_selected() + if not iter: + return + event = model[iter][0] + helpers.play_sound(event) + def on_open_advanced_editor_button_clicked(self, widget, data = None): if gajim.interface.instances.has_key('advanced_config'): gajim.interface.instances['advanced_config'].window.present() diff --git a/src/gtkgui.glade b/src/gtkgui.glade index cd020aae6..39515cfa6 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -20,6 +20,7 @@ GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -34,6 +35,8 @@ True + GTK_PACK_DIRECTION_LTR + GTK_PACK_DIRECTION_LTR @@ -420,6 +423,7 @@ GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -684,6 +688,7 @@ GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -1864,6 +1869,7 @@ GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -2333,6 +2339,7 @@ GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -2676,6 +2683,7 @@ GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -3048,6 +3056,7 @@ Agent JID - node GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -3277,6 +3286,7 @@ Agent JID - node GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -5157,7 +5167,33 @@ Disabled 0 False False - GTK_PACK_END + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + gtk-media-play + 4 + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False @@ -6496,6 +6532,7 @@ Custom GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -9081,6 +9118,7 @@ Custom GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -9400,6 +9438,7 @@ Custom GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -9791,6 +9830,7 @@ Custom GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True + False True @@ -9936,6 +9976,7 @@ Custom GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True + False True @@ -10072,6 +10113,7 @@ Custom GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True + False True @@ -10330,6 +10372,7 @@ Custom GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False True @@ -10513,6 +10556,7 @@ Custom GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True + False True @@ -10834,6 +10878,7 @@ Custom GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_SOUTH_EAST True + False @@ -10992,6 +11037,7 @@ Custom GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True + False @@ -11182,6 +11228,7 @@ Static GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -11365,6 +11412,7 @@ Static GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -11624,6 +11672,7 @@ Static GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -11848,6 +11897,7 @@ Static GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True + False False @@ -12151,6 +12201,7 @@ Static GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -13344,6 +13395,7 @@ Please wait... GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -13788,6 +13840,7 @@ Please wait... GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -14399,6 +14452,7 @@ Please wait... GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -15319,6 +15373,7 @@ Banner GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -16017,6 +16072,7 @@ Banner GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -16540,6 +16596,7 @@ Maybe I'll refactor later GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -17023,6 +17080,7 @@ Maybe I'll refactor later GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False File Transfers Shows a list of file transfers between you and other @@ -17408,6 +17466,7 @@ Maybe I'll refactor later GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True + False True @@ -17622,6 +17681,7 @@ Maybe I'll refactor later GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True + False True @@ -17752,6 +17812,7 @@ Maybe I'll refactor later GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False