Commit 58796d22 authored by Philipp Hörist's avatar Philipp Hörist

Preferences: Update layout and some options

- Add a 'convert ascii emoji' checkbutton
- Remove 'Disabled' from Emoji theme
- Change the layout of the style tab
parent 34e93bba
This diff is collapsed.
......@@ -190,6 +190,7 @@ list.settings > row > box {
/* Text style */
.bold { font-weight: bold; }
.bold16 { font-size: 16px; font-weight: bold; }
.bold24 { font-size: 24px; font-weight: bold; }
.large-header { font-size: 20px; font-weight: bold; }
......@@ -197,6 +198,9 @@ list.settings > row > box {
.status-dnd { color: #e62e00;}
.status-online { color: #66bf10;}
/* Padding/Margins */
.margin-top6 { margin-top: 6px; }
/* Treeview */
treeview.space { padding: 6px; }
......
......@@ -110,20 +110,6 @@ class Preferences(Gtk.ApplicationWindow):
st = app.config.get('sort_by_show_in_muc')
self.xml.get_object('sort_by_show_in_muc_checkbutton').set_active(st)
# emoticons
emoticons_combobox = self.xml.get_object('emoticons_combobox')
emoticon_themes = helpers.get_available_emoticon_themes()
emoticons_combobox.append_text(_('Disabled'))
for theme in emoticon_themes:
emoticons_combobox.append_text(theme)
config_theme = app.config.get('emoticons_theme')
if config_theme not in emoticon_themes:
config_theme = _('Disabled')
emoticons_combobox.set_id_column(0)
emoticons_combobox.set_active_id(config_theme)
# Set default for single window type
choices = c_config.opt_one_window_types
type_ = app.config.get('one_message_window')
......@@ -213,6 +199,21 @@ class Preferences(Gtk.ApplicationWindow):
dark_theme_combo = self.xml.get_object('dark_theme_combobox')
dark_theme_combo.set_active_id(str(app.config.get('dark_theme')))
# Emoticons
emoticons_combobox = self.xml.get_object('emoticons_combobox')
emoticon_themes = helpers.get_available_emoticon_themes()
for theme in emoticon_themes:
emoticons_combobox.append_text(theme)
config_theme = app.config.get('emoticons_theme')
if config_theme not in emoticon_themes:
config_theme = 'font'
emoticons_combobox.set_id_column(0)
emoticons_combobox.set_active_id(config_theme)
self.xml.ascii_emoticons.set_active(app.config.get('ascii_emoticons'))
### Personal Events tab ###
# outgoing send chat state notifications
st = app.config.get('outgoing_chat_state_notifications')
......@@ -564,11 +565,7 @@ class Preferences(Gtk.ApplicationWindow):
active = widget.get_active()
model = widget.get_model()
emot_theme = model[active][0]
if emot_theme == _('Disabled'):
app.config.set('emoticons_theme', '')
else:
app.config.set('emoticons_theme', emot_theme)
app.config.set('emoticons_theme', emot_theme)
from gajim.gtk.emoji_chooser import emoji_chooser
emoji_chooser.load()
self.toggle_emoticons()
......@@ -657,6 +654,10 @@ class Preferences(Gtk.ApplicationWindow):
app.config.set('iconset', icon_string)
gtkgui_helpers.reload_jabber_state_images()
def on_convert_ascii_toggle(self, widget):
app.config.set('ascii_emoticons', widget.get_active())
app.interface.make_regexps()
def on_transports_iconsets_checkbutton_toggled(self, widget):
self.on_checkbutton_toggled(widget, 'use_transports_iconsets')
gtkgui_helpers.reload_jabber_state_images()
......
......@@ -1819,6 +1819,11 @@ class Interface:
# so http://be) will match http://be and http://be)be) will match
# http://be)be
self._basic_pattern_re = None
self._emot_and_basic_re = None
self._sth_at_sth_dot_sth_re = None
self._invalid_XML_chars_re = None
legacy_prefixes = r"((?<=\()(www|ftp)\.([A-Za-z0-9\.\-_~:/\?#\[\]@!\$"\
r"&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+(?=\)))"\
r"|((www|ftp)\.([A-Za-z0-9\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]"\
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment