diff --git a/discover_overlay/glade/settings.glade b/discover_overlay/glade/settings.glade index 2daa2e0..e96a84a 100644 --- a/discover_overlay/glade/settings.glade +++ b/discover_overlay/glade/settings.glade @@ -124,6 +124,11 @@ + + 360 + 1 + 10 + 10 100 @@ -135,13 +140,6 @@ 4000 1 8 - - - 0 - 360 - 0 - 1 - 10 10 @@ -701,7 +699,7 @@ - + voice_advanced_grid True @@ -709,6 +707,46 @@ 1 5 True + + + voice_display_icon_only_label + True + False + Show Names + 0 + + + 2 + 0 + + + + + voice_display_icon_only + True + True + False + True + + + + 3 + 0 + + + + + voice_font_label + True + False + Font + 0 + + + 2 + 1 + + voice_font @@ -720,11 +758,119 @@ + + 3 + 1 + + + + + voice_text_padding_label + True + False + Text Padding + 0 + + + 2 + 2 + + + + + voice_text_padding + True + True + 0 + text_padding_adj + + + + 3 + 2 + + + + + voice_text_vertical_offset_label + True + False + Text Vertical Offset + 0 + + + 2 + 3 + + + + + voice_text_vertical_offset + True + True + 0 + voice_text_offset + + + + 3 + 3 + + + + + voice_show_title_label + True + False + Show Title + 0 + + + 0 + 0 + + + + + voice_show_title + True + True + False + True + + 1 0 + + + voice_show_connection_status_label + True + False + Show Connection Status + 0 + + + 0 + 2 + + + + + voice_show_connection_status + True + True + False + True + + + + 1 + 2 + + voice_title_font @@ -741,19 +887,6 @@ 1 - - - voice_font_label - True - False - Font - 0 - - - 0 - 0 - - voice_title_font_label @@ -769,82 +902,18 @@ - voice_icon_spacing + voice_vertical_padding True True - icon_spacing_adj - + 0 + voice_vertical_padding_adj + 1 - 2 - - - - - voice_icon_spacing_label - True - False - Icon Spacing - 0 - - - 0 - 2 - - - - - voice_text_padding_label - True - False - Text Padding - 0 - - - 0 - 3 - - - - - voice_text_padding - True - True - text_padding_adj - - - - 1 - 3 - - - - - voice_text_vertical_offset_label - True - False - Text Vertical Offset - 0 - - - 0 4 - - - voce_vertical_padding_label - True - False - Verticle Edge Padding - 0 - - - 0 - 5 - - voice_horizontal_padding_label @@ -855,141 +924,7 @@ 0 - 6 - - - - - voice_avatar_opacity_label - True - False - Avatar Opacity - 0 - - - 2 - 0 - - - - - voice_avatar_size_label - True - False - Avatar Size - 0 - - - 2 - 1 - - - - - voice_display_icon_only_label - True - False - Display Icon Only - 0 - - - 2 - 2 - - - - - voice_square_avatar_label - True - False - Square Avatar - 0 - - - 2 - 3 - - - - - voice_fancy_avatar_shapes_label - True - False - Fancy Avatar Shapes - 0 - - - 2 - 4 - - - - - voice_avatar_opacity - True - True - ava_opacity_adj - 1 - - - - 3 - 0 - - - - - voice_avatar_size - True - True - avatar_size_adj - - - - 3 - 1 - - - - - voice_display_icon_only - True - True - False - True - - - - 3 - 2 - - - - - voice_square_avatar - True - True - False - True - - - - 3 - 3 - - - - - voice_fancy_avatar_shapes - True - True - False - True - - - - 3 - 4 + 5 @@ -997,234 +932,15 @@ voice_horizontal_padding True True + 0 voice_horizontal_padding_adj - - 1 - 6 - - - - - voice_vertical_padding - True - True - voice_vertical_padding_adj - - 1 5 - - - voice_text_vertical_offset - True - True - voice_text_offset - - - - 1 - 4 - - - - - voice_overflow_style_label - True - False - Overflow Style - 0 - - - 4 - 0 - - - - - voice_overflow_style - True - False - - None - Wrap - Shrink - - - - - 5 - 0 - - - - - voice_order_avatars_by_label - True - False - Order Avatars By - 0 - - - 4 - 1 - - - - - voice_order_avatars_by - True - False - - Alphabetically - ID - Last Spoken - - - - - 5 - 1 - - - - - voice_border_width_label - True - False - Border width - 0 - - - 2 - 5 - - - - - voice_border_width - True - True - border_width_adj - - - - 3 - 5 - - - - - voice_show_title_label - True - False - Show Title - 0 - - - 4 - 2 - - - - - voice_show_title - True - True - False - True - - - - 5 - 2 - - - - - voice_show_connection_status_label - True - False - Show Connection Status - 0 - - - 4 - 3 - - - - - voice_show_connection_status - True - True - False - True - - - - 5 - 3 - - - - - voice_show_disconnected_label - True - False - Show While Disconnected - 0 - - - 4 - 4 - - - - - voice_show_disconnected - True - True - False - True - - - - 5 - 4 - - - - - voice_highlight_self_label - True - False - Highlight Self - 0 - - - 2 - 6 - - - - - voice_highlight_self - True - True - False - True - - - - 3 - 6 - - voice_show_test_content_label @@ -1257,7 +973,157 @@ voice_dummy_count_label True False - Dummy Count + Test Data Count + 0 + + + 0 + 8 + + + + + voice_dummy_count + True + True + 50 + voice_dummy_count_adj + 50 + + + + 1 + 8 + + + + + voice_show_disconnected_label + True + False + Show While Disconnected + 0 + + + 0 + 9 + + + + + voice_show_disconnected + True + True + False + True + + + + 1 + 9 + + + + + voce_vertical_padding_label + True + False + Verticle Edge Padding + 0 + + + 0 + 4 + + + + + voice_nick_length_label + True + False + Limit text length + 0 + + + 2 + 4 + + + + + voice_nick_length + True + True + 32 + voice_nick_lenght_adj + 32 + + + + 3 + 4 + + + + + voice_avatar_label + True + False + Show Avatar + 0 + + + 2 + 5 + + + + + voice_show_avatar + True + True + False + True + + + + 3 + 5 + + + + + voice_square_avatar_label + True + False + Square Avatar + 0 + + + 2 + 6 + + + + + voice_square_avatar + True + True + False + True + + + + 3 + 6 + + + + + voice_fancy_avatar_shapes_label + True + False + Fancy Avatar Shapes 0 @@ -1266,18 +1132,74 @@ - - voice_dummy_count + + voice_fancy_avatar_shapes True True - voice_dummy_count_adj - + False + True + 3 7 + + + voice_avatar_size_label + True + False + Avatar Size + 0 + + + 2 + 8 + + + + + voice_avatar_size + True + True + 48 + avatar_size_adj + 48 + + + + 3 + 8 + + + + + voice_avatar_opacity_label + True + False + Avatar Opacity + 0 + + + 2 + 9 + + + + + voice_avatar_opacity + True + True + ava_opacity_adj + 1 + + + + 3 + 9 + + voice_display_speakers_only_label @@ -1288,7 +1210,7 @@ 4 - 5 + 0 @@ -1302,7 +1224,7 @@ 5 - 5 + 0 @@ -1315,7 +1237,7 @@ 4 - 6 + 1 @@ -1323,65 +1245,174 @@ voice_display_speakers_grace_period True True + 0 voice_display_speakers_grace_period_adj + + 5 + 1 + + + + + voice_overflow_style_label + True + False + Overflow Style + 0 + + + 4 + 2 + + + + + voice_overflow_style + True + False + + None + Wrap + Shrink + + + + + 5 + 2 + + + + + voice_order_avatars_by_label + True + False + Order Users By + 0 + + + 4 + 3 + + + + + voice_order_avatars_by + True + False + + Alphabetically + ID + Last Spoken + + + + + 5 + 3 + + + + + voice_highlight_self_label + True + False + Highlight Self + 0 + + + 4 + 4 + + + + + voice_highlight_self + True + True + False + True + + + + 5 + 4 + + + + + voice_border_width_label + True + False + Border width + 0 + + + 4 + 5 + + + + + voice_border_width + True + True + 1 + border_width_adj + 1 + + + + 5 + 5 + + + + + voice_icon_spacing_label + True + False + Padding between users + 0 + + + 4 + 6 + + + + + voice_icon_spacing + True + True + 0 + icon_spacing_adj + + 5 6 - - voice_nick_length_label - True - False - Limit text length - 0 - - - 4 - 7 - + - - voice_nick_length - True - True - voice_nick_lenght_adj - - - - 5 - 7 - + - - voice_avatar_label - True - False - Show Avatar - - - 0 - 8 - + - - voice_avatar - True - True - False - True - - - - 1 - 8 - + + + + + + + diff --git a/discover_overlay/settings_window.py b/discover_overlay/settings_window.py index 32a8b00..9ec8e2c 100644 --- a/discover_overlay/settings_window.py +++ b/discover_overlay/settings_window.py @@ -352,8 +352,9 @@ class MainSettingsWindow(): self.widget['voice_avatar_size'].set_value( config.getint("main", "avatar_size", fallback=48)) - self.widget['voice_display_icon_only'].set_active(config.getboolean( - "main", "icon_only", fallback=False)) + show_name = not config.getboolean("main", "icon_only", fallback=False) + self.widget['voice_display_icon_only'].set_active(show_name) + self.voice_show_name_hide_others(show_name) self.widget['voice_square_avatar'].set_active(config.getboolean( "main", "square_avatar", fallback=True)) @@ -373,6 +374,11 @@ class MainSettingsWindow(): self.widget['voice_show_title'].set_active(config.getboolean( "main", "show_title", fallback=False)) + show_avatar = config.getboolean( + "main", "show_avatar", fallback=True) + self.widget['voice_show_avatar'].set_active(show_avatar) + self.voice_show_avatar_hide_others(show_avatar) + self.widget['voice_show_connection_status'].set_active(config.getboolean( "main", "show_connection", fallback=False)) @@ -873,7 +879,8 @@ class MainSettingsWindow(): (int(button.get_value()))) def voice_display_icon_only_changed(self, button): - self.config_set("main", "icon_only", "%s" % (button.get_active())) + self.config_set("main", "icon_only", "%s" % (not button.get_active())) + self.voice_show_name_hide_others(button.get_active()) def voice_square_avatar_changed(self, button): self.config_set("main", "square_avatar", "%s" % (button.get_active())) @@ -908,6 +915,35 @@ class MainSettingsWindow(): def voice_show_avatar_changed(self, button): self.config_set("main", "show_avatar", "%s" % (button.get_active())) + self.voice_show_avatar_hide_others(button.get_active()) + + def voice_show_name_hide_others(self, val): + if val: + # Show name options + self.widget['voice_font'].set_sensitive(True) + self.widget['voice_text_padding'].set_sensitive(True) + self.widget['voice_text_vertical_offset'].set_sensitive(True) + self.widget['voice_nick_length'].set_sensitive(True) + else: + # Hide name options + self.widget['voice_font'].set_sensitive(False) + self.widget['voice_text_padding'].set_sensitive(False) + self.widget['voice_text_vertical_offset'].set_sensitive(False) + self.widget['voice_nick_length'].set_sensitive(False) + + def voice_show_avatar_hide_others(self, val): + if val: + # Show avatar options + self.widget['voice_square_avatar'].set_sensitive(True) + self.widget['voice_fancy_avatar_shapes'].set_sensitive(True) + self.widget['voice_avatar_size'].set_sensitive(True) + self.widget['voice_avatar_opacity'].set_sensitive(True) + else: + # Hide avatar options + self.widget['voice_square_avatar'].set_sensitive(False) + self.widget['voice_fancy_avatar_shapes'].set_sensitive(False) + self.widget['voice_avatar_size'].set_sensitive(False) + self.widget['voice_avatar_opacity'].set_sensitive(False) def text_enable_changed(self, button): self.config_set("text", "enabled", "%s" % (button.get_active()))