diff --git a/gajim/data/gui/preferences_window.ui b/gajim/data/gui/preferences_window.ui
index 1c5f6a9fc..3e4571f53 100644
--- a/gajim/data/gui/preferences_window.ui
+++ b/gajim/data/gui/preferences_window.ui
@@ -354,83 +354,6 @@
6
6
12
-
-
-
- 0
- 0
-
-
-
-
- True
- False
- end
- _Window behavior
- True
- right
-
-
-
- 0
- 1
-
-
-
-
- True
- False
- end
- _Show roster on startup
- True
- right
-
-
-
- 0
- 2
-
-
-
-
- _Ignore rich content in incoming messages
- True
- True
- False
- Some messages may include rich content (formatting, colors etc). If checked, Gajim will just display the raw message text.
- start
- 18
- True
- True
-
-
-
- 0
- 3
- 2
-
-
_Highlight misspelled words
@@ -444,7 +367,7 @@
0
- 4
+ 3
2
@@ -458,6 +381,22 @@
True
+
+ 0
+ 4
+ 2
+
+
+
+
+ Show avatar in chat tabs
+ True
+ True
+ False
+ start
+ True
+
+
0
5
@@ -465,22 +404,20 @@
-
- 50
+
True
False
- liststore7
-
-
-
-
- 0
-
-
+ end
+ _Window behavior
+ True
+ right
+
- 1
- 2
+ 0
+ 0
@@ -497,42 +434,70 @@
+
+ 1
+ 0
+
+
+
+
+ 50
+ True
+ False
+ liststore7
+
+
+
+
+ 0
+
+
+
1
1
-
- Show avatar in chat tabs
+
True
- True
- False
- start
- True
-
+ False
+ end
+ _Show roster on startup
+ True
+ right
+
0
- 6
- 2
+ 1
-
+
+ _Ignore rich content in incoming messages
True
- False
-
+ True
+ False
+ Some messages may include rich content (formatting, colors etc). If checked, Gajim will just display the raw message text.
+ start
+ 18
+ True
+ True
+
- 1
- 0
+ 0
+ 2
+ 2
-
+
True
False
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
@@ -1499,7 +1464,7 @@ $T will be replaced by auto-not-available timeout
-
+
True
False
18
@@ -1509,170 +1474,300 @@ $T will be replaced by auto-not-available timeout
vertical
12
-
+
True
False
- GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- 0
- none
+ 6
+ 12
-
- True
- False
- 12
- 6
- 6
- 12
-
-
- True
- False
- end
- T_heme
- True
- right
-
-
-
- 0
- 0
-
-
-
-
- 200
- True
- False
-
-
- 1
- 0
-
-
-
-
- True
- False
-
-
-
- 1
- 1
-
-
-
-
- Ma_nage...
- 120
- True
- True
- False
- Configure color and font of the interface
- True
-
-
-
- 2
- 0
-
-
-
-
- Use _transports icons
- True
- True
- False
- If checked, Gajim will use protocol-specific status icons. (e.g. A contact from ICQ will have the equivalent ICQ icon for status online, away, busy, etc...)
- start
- True
- True
-
-
-
- 1
- 3
-
-
-
-
- True
- False
- end
- Status _iconset
- True
- right
-
-
-
- 0
- 1
-
-
-
-
- True
- False
- end
- Dark Theme
- True
- right
-
-
-
- 0
- 2
-
-
-
-
- True
- False
-
- - System
- - Enabled
- - Disabled
-
-
-
-
- 1
- 2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
True
False
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- <b>Themes</b>
- True
+ start
+ Themes
+
+
+ 0
+ 0
+ 2
+
+
+
+
+ True
+ False
+ end
+ Theme
+ True
+ right
+
+
+
+ 1
+ 1
+
+
+
+
+ 200
+ True
+ False
+
+
+ 2
+ 1
+
+
+
+
+ Ma_nage...
+ 120
+ True
+ True
+ False
+ Configure color and font of the interface
+ True
+
+
+
+ 3
+ 1
+
+
+
+
+ True
+ False
+ end
+ Dark Theme
+ True
+ right
+
+
+
+ 1
+ 2
+
+
+
+
+ True
+ False
+
+ - System
+ - Enabled
+ - Disabled
+
+
+
+
+ 2
+ 2
+
+
+
+
+ True
+ False
+ start
+ Emojis
+
+
+
+ 0
+ 3
+ 2
+
+
+
+
+ True
+ False
+ end
+ Emoji Theme
+ True
+ right
+
+
+
+ 1
+ 4
+
+
+
+
+ True
+ False
+
+
+
+ 2
+ 4
+
+
+
+
+ True
+ False
+ start
+ Icons
+
+
+
+ 0
+ 6
+ 2
+
+
+
+
+ True
+ False
+ end
+ Status iconset
+ True
+ right
+
+
+
+ 1
+ 7
+
+
+
+
+ True
+ False
+
+
+
+ 2
+ 7
+
+
+
+
+ Use _transports icons
+ True
+ True
+ False
+ If checked, Gajim will use protocol-specific status icons. (e.g. A contact from ICQ will have the equivalent ICQ icon for status online, away, busy, etc...)
+ start
+ True
+ True
+
+
+
+ 2
+ 8
+
+
+
+
+ True
+ False
+ end
+
+
+
+ 1
+ 5
+
+
+
+
+ _Convert ASCII Emojis
+ True
+ True
+ False
+ True
+ True
+
+
+
+ 2
+ 5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
False
True
- 1
+ 0
diff --git a/gajim/data/style/gajim.css b/gajim/data/style/gajim.css
index e79fe5559..f95340fd7 100644
--- a/gajim/data/style/gajim.css
+++ b/gajim/data/style/gajim.css
@@ -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; }
diff --git a/gajim/gtk/preferences.py b/gajim/gtk/preferences.py
index 5517174d9..723f97d4a 100644
--- a/gajim/gtk/preferences.py
+++ b/gajim/gtk/preferences.py
@@ -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()
diff --git a/gajim/gui_interface.py b/gajim/gui_interface.py
index f61c1b2d0..41d2e0d5d 100644
--- a/gajim/gui_interface.py
+++ b/gajim/gui_interface.py
@@ -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\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]"\