} else {\r
this.$el.find('.setting-show_timestamps').attr('checked', true);\r
}\r
+\r
+ if (typeof settings.get('mute_sounds') === 'undefined' || settings.get('mute_sounds')) {\r
+ this.$el.find('.setting-mute_sounds').attr('checked', true);\r
+ } else {\r
+ this.$el.find('.setting-mute_sounds').attr('checked', false);\r
+ }\r
},\r
\r
\r
settings.set('scrollback', $('.setting-scrollback', this.$el).val());\r
settings.set('show_joins_parts', $('.setting-show_joins_parts', this.$el).is(':checked'));\r
settings.set('show_timestamps', $('.setting-show_timestamps', this.$el).is(':checked'));\r
+ settings.set('mute_sounds', $('.setting-mute_sounds', this.$el).is(':checked'));\r
\r
settings.save();\r
\r
<td class="label">Show timestamps</td>\r
<td class="setting"><input type="checkbox" class="setting-show_timestamps" /></td>\r
</tr>\r
+ \r
+ <tr>\r
+ <td class="label">Mute sounds</td>\r
+ <td class="setting"><input type="checkbox" class="setting-mute_sounds" /></td>\r
+ </tr>\r
\r
<tr class="save">\r
<td colspan="2"><button class="save">Save</button><br/><span class="feedback">Saved!</span></td>\r
\r
playSound: function (sound_id) {\r
if (!this.sound_object) return;\r
+\r
+ if (_kiwi.global.settings.get('mute_sounds'))\r
+ return;\r
+ \r
soundManager.play(sound_id);\r
}\r
});\r