mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-24 06:20:19 +00:00
Compare commits
18 Commits
theme-fixe
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2bfc9b7c9 | ||
|
|
5f3f91bf1c | ||
| 6527c08e4d | |||
| a57104469d | |||
| 94f450ba67 | |||
| b9e4113c81 | |||
| 65707f53b7 | |||
| 21c73e699b | |||
| 63226a7267 | |||
| fb37810367 | |||
|
|
2b66734fa6 | ||
| 380aae139f | |||
|
|
e4e823c4d6 | ||
| d4b16d5866 | |||
| b9cfd9a9f9 | |||
| 664aa150fb | |||
| aead92d9e4 | |||
|
|
7cc5d14045 |
@@ -1,6 +1,28 @@
|
|||||||
ZoiteChat ChangeLog
|
ZoiteChat ChangeLog
|
||||||
=================
|
=================
|
||||||
|
|
||||||
|
2.18.0~pre5 (2026-03-22)
|
||||||
|
------------------------
|
||||||
|
- Overhauled preferences/config saving: fully staged and transactional, debounced
|
||||||
|
with flush on close, write failures now surfaced.
|
||||||
|
- Overhauled GTK theme handling: live preview, correct colour reset persistence,
|
||||||
|
proper file:// import paths, consistent menubar CSS.
|
||||||
|
- Fixed GTK entry scroll artifact in the input box.
|
||||||
|
- Hardened tray menu lifetime; fixed stale pointer crash on menu destruction.
|
||||||
|
- Fixed AppIndicator tray init for Wayland/source builds; skip redundant X11
|
||||||
|
tray probe for AppIndicator builds.
|
||||||
|
- Split topic/mode rows in channel bar, tighten spacing, persist userlist column widths.
|
||||||
|
- Preserve saved right-pane size on first layout.
|
||||||
|
- Fixed sounds prefs section.
|
||||||
|
- Fixed chanview tree layout and header alignment; tighten topic URL hit-testing.
|
||||||
|
- Dropped realpath() in favour of GLib-only absolute path build.
|
||||||
|
- Made About dialog links explicit; added GPL licence URL.
|
||||||
|
- Added licence headers to new source files.
|
||||||
|
- Windows installer: fixed VC++ redist URL, added non-plugin download fallback,
|
||||||
|
switched to registry-based runtime detection.
|
||||||
|
- Made libayatana-appindicator a required dep in PKGBUILD.
|
||||||
|
- Cleaned up Meson libperl detection.
|
||||||
|
|
||||||
2.18.0~pre4 (2026-03-15)
|
2.18.0~pre4 (2026-03-15)
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,45 @@
|
|||||||
<id>zoitechat.desktop</id>
|
<id>zoitechat.desktop</id>
|
||||||
</provides>
|
</provides>
|
||||||
<releases>
|
<releases>
|
||||||
|
<release date="2026-03-22" version="2.18.0~pre5">
|
||||||
|
<description>
|
||||||
|
<p>Preferences and config saving:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Overhauled preferences/config saving: fully staged and transactional, debounced with flush on close, write failures now surfaced.</li>
|
||||||
|
</ul>
|
||||||
|
<p>GTK theme and UI:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Overhauled GTK theme handling: live preview, correct colour reset persistence, proper <code>file://</code> import paths, consistent menubar CSS.</li>
|
||||||
|
<li>Fixed GTK entry scroll artifact in the input box.</li>
|
||||||
|
<li>Split topic/mode rows in channel bar, tighten spacing, persist userlist column widths.</li>
|
||||||
|
<li>Preserve saved right-pane size on first layout.</li>
|
||||||
|
<li>Fixed sounds prefs section.</li>
|
||||||
|
<li>Fixed chanview tree layout and header alignment; tighten topic URL hit-testing.</li>
|
||||||
|
</ul>
|
||||||
|
<p>Tray:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Hardened tray menu lifetime; fixed stale pointer crash on menu destruction.</li>
|
||||||
|
<li>Fixed AppIndicator tray init for Wayland/source builds; skip redundant X11 tray probe for AppIndicator builds.</li>
|
||||||
|
</ul>
|
||||||
|
<p>Build and packaging:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Dropped <code>realpath()</code> in favour of GLib-only absolute path build.</li>
|
||||||
|
<li>Made About dialog links explicit; added GPL licence URL.</li>
|
||||||
|
<li>Added licence headers to new source files.</li>
|
||||||
|
<li>Windows installer: fixed VC++ redist URL, added non-plugin download fallback, switched to registry-based runtime detection.</li>
|
||||||
|
<li>Made <code>libayatana-appindicator</code> a required dep in PKGBUILD.</li>
|
||||||
|
<li>Cleaned up Meson libperl detection.</li>
|
||||||
|
</ul>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
<release date="2026-03-22" version="2.18.0~pre5">
|
||||||
|
<description>
|
||||||
|
<p>Version metadata update:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Bumped release version references to <code>2.18.0~pre5</code> across build and packaging files.</li>
|
||||||
|
</ul>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
<release date="2026-03-14" version="2.18.0~pre4">
|
<release date="2026-03-14" version="2.18.0~pre4">
|
||||||
<description>
|
<description>
|
||||||
<p>UI fixes, topic bar improvements, and selection styling updates:</p>
|
<p>UI fixes, topic bar improvements, and selection styling updates:</p>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
project('zoitechat', 'c',
|
project('zoitechat', 'c',
|
||||||
version: '2.18.0~pre4',
|
version: '2.18.0~pre5',
|
||||||
meson_version: '>= 0.55.0',
|
meson_version: '>= 0.55.0',
|
||||||
default_options: [
|
default_options: [
|
||||||
'c_std=c17',
|
'c_std=c17',
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ else:
|
|||||||
if not hasattr(sys, 'argv'):
|
if not hasattr(sys, 'argv'):
|
||||||
sys.argv = ['<zoitechat>']
|
sys.argv = ['<zoitechat>']
|
||||||
|
|
||||||
VERSION = b'2.18.0~pre4'
|
VERSION = b'2.18.0~pre5'
|
||||||
PLUGIN_NAME = ffi.new('char[]', b'Python')
|
PLUGIN_NAME = ffi.new('char[]', b'Python')
|
||||||
PLUGIN_DESC = ffi.new('char[]', b'Python %d.%d scripting interface' % (sys.version_info[0], sys.version_info[1]))
|
PLUGIN_DESC = ffi.new('char[]', b'Python %d.%d scripting interface' % (sys.version_info[0], sys.version_info[1]))
|
||||||
PLUGIN_VERSION = ffi.new('char[]', VERSION)
|
PLUGIN_VERSION = ffi.new('char[]', VERSION)
|
||||||
|
|||||||
2
po/de.po
2
po/de.po
@@ -1325,7 +1325,7 @@ msgstr "%C29*%O$t%C29MOTD übersprungen%O"
|
|||||||
|
|
||||||
#: src/common/textevents.h:277
|
#: src/common/textevents.h:277
|
||||||
msgid "%C23*%O$t%C28$1%C is already in use. Retrying with %C18$2%O..."
|
msgid "%C23*%O$t%C28$1%C is already in use. Retrying with %C18$2%O..."
|
||||||
msgstr "%C23*%O$t%C28$1%C wird bereits verwendet. Erneurter Versuch mit %C18$2%O …"
|
msgstr "%C23*%O$t%C28$1%C wird bereits verwendet. Erneuter Versuch mit %C18$2%O …"
|
||||||
|
|
||||||
#: src/common/textevents.h:280
|
#: src/common/textevents.h:280
|
||||||
msgid "%C23*%O$t%C28$1%C is erroneous. Retrying with %C18$2%O..."
|
msgid "%C23*%O$t%C28$1%C is erroneous. Retrying with %C18$2%O..."
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ For more information on ZoiteChat please read our [documentation](https://docs.z
|
|||||||
<sub>
|
<sub>
|
||||||
X-Chat ("xchat") Copyright (c) 1998-2010 By Peter Zelezny.
|
X-Chat ("xchat") Copyright (c) 1998-2010 By Peter Zelezny.
|
||||||
HexChat ("hexchat") Copyright (c) 2009-2014 By Berke Viktor.
|
HexChat ("hexchat") Copyright (c) 2009-2014 By Berke Viktor.
|
||||||
|
Hexchat ("hexchat") Copyright (c) 2015-2025 By Patrick Griffis.
|
||||||
ZoiteChat ("zoitechat") Copyright (c) 2026 By deepend.
|
ZoiteChat ("zoitechat") Copyright (c) 2026 By deepend.
|
||||||
</sub>
|
</sub>
|
||||||
|
|
||||||
|
|||||||
@@ -411,6 +411,7 @@ const struct prefs vars[] =
|
|||||||
{"gui_chanlist_width_topic", P_OFFINT (hex_gui_chanlist_width_topic), TYPE_INT},
|
{"gui_chanlist_width_topic", P_OFFINT (hex_gui_chanlist_width_topic), TYPE_INT},
|
||||||
{"gui_chanlist_width_users", P_OFFINT (hex_gui_chanlist_width_users), TYPE_INT},
|
{"gui_chanlist_width_users", P_OFFINT (hex_gui_chanlist_width_users), TYPE_INT},
|
||||||
{"gui_compact", P_OFFINT (hex_gui_compact), TYPE_BOOL},
|
{"gui_compact", P_OFFINT (hex_gui_compact), TYPE_BOOL},
|
||||||
|
{"gui_ctrlq_quit", P_OFFINT (hex_gui_ctrlq_quit), TYPE_BOOL},
|
||||||
{"gui_dialog_height", P_OFFINT (hex_gui_dialog_height), TYPE_INT},
|
{"gui_dialog_height", P_OFFINT (hex_gui_dialog_height), TYPE_INT},
|
||||||
{"gui_dialog_left", P_OFFINT (hex_gui_dialog_left), TYPE_INT},
|
{"gui_dialog_left", P_OFFINT (hex_gui_dialog_left), TYPE_INT},
|
||||||
{"gui_dialog_top", P_OFFINT (hex_gui_dialog_top), TYPE_INT},
|
{"gui_dialog_top", P_OFFINT (hex_gui_dialog_top), TYPE_INT},
|
||||||
@@ -765,6 +766,7 @@ load_default_config(void)
|
|||||||
#ifdef HAVE_GTK_MAC
|
#ifdef HAVE_GTK_MAC
|
||||||
prefs.hex_gui_hide_menu = 1;
|
prefs.hex_gui_hide_menu = 1;
|
||||||
#endif
|
#endif
|
||||||
|
prefs.hex_gui_ctrlq_quit = 1;
|
||||||
prefs.hex_gui_input_attr = 1;
|
prefs.hex_gui_input_attr = 1;
|
||||||
prefs.hex_gui_input_icon = 1;
|
prefs.hex_gui_input_icon = 1;
|
||||||
prefs.hex_gui_input_nick = 1;
|
prefs.hex_gui_input_nick = 1;
|
||||||
|
|||||||
226
src/common/url.c
226
src/common/url.c
@@ -35,20 +35,13 @@ GTree *url_btree = NULL;
|
|||||||
static gboolean regex_match (const GRegex *re, const char *word,
|
static gboolean regex_match (const GRegex *re, const char *word,
|
||||||
int *start, int *end);
|
int *start, int *end);
|
||||||
static const GRegex *re_url (void);
|
static const GRegex *re_url (void);
|
||||||
static const GRegex *re_url_no_scheme (void);
|
|
||||||
static const GRegex *re_host (void);
|
|
||||||
static const GRegex *re_host6 (void);
|
|
||||||
static const GRegex *re_email (void);
|
static const GRegex *re_email (void);
|
||||||
static const GRegex *re_nick (void);
|
static const GRegex *re_nick (void);
|
||||||
static const GRegex *re_channel (void);
|
static const GRegex *re_channel (void);
|
||||||
static const GRegex *re_path (void);
|
|
||||||
static gboolean match_nick (const char *word, int *start, int *end);
|
static gboolean match_nick (const char *word, int *start, int *end);
|
||||||
static gboolean match_channel (const char *word, int *start, int *end);
|
static gboolean match_channel (const char *word, int *start, int *end);
|
||||||
static gboolean match_email (const char *word, int *start, int *end);
|
|
||||||
static gboolean match_url (const char *word, int *start, int *end);
|
static gboolean match_url (const char *word, int *start, int *end);
|
||||||
static gboolean match_host (const char *word, int *start, int *end);
|
static gboolean match_email (const char *word, int *start, int *end);
|
||||||
static gboolean match_host6 (const char *word, int *start, int *end);
|
|
||||||
static gboolean match_path (const char *word, int *start, int *end);
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
url_free (char *url, void *data)
|
url_free (char *url, void *data)
|
||||||
@@ -116,12 +109,18 @@ url_add (char *urltext, int len)
|
|||||||
{
|
{
|
||||||
char *data;
|
char *data;
|
||||||
int size;
|
int size;
|
||||||
|
GUri *parsed;
|
||||||
|
|
||||||
if (!prefs.hex_url_grabber && !prefs.hex_url_logging)
|
if (!prefs.hex_url_grabber && !prefs.hex_url_logging)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (len <= 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
data = g_strndup (urltext, len);
|
data = g_strndup (urltext, len);
|
||||||
|
|
||||||
if (data[len - 1] == '.')
|
if (data[len - 1] == '.')
|
||||||
@@ -134,6 +133,16 @@ url_add (char *urltext, int len)
|
|||||||
data[len - 1] = 0;
|
data[len - 1] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parsed = g_uri_parse (data, G_URI_FLAGS_NONE, NULL);
|
||||||
|
if (parsed == NULL || g_uri_get_host (parsed) == NULL || *g_uri_get_host (parsed) == '\0')
|
||||||
|
{
|
||||||
|
if (parsed)
|
||||||
|
g_uri_unref (parsed);
|
||||||
|
g_free (data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
g_uri_unref (parsed);
|
||||||
|
|
||||||
if (prefs.hex_url_logging)
|
if (prefs.hex_url_logging)
|
||||||
{
|
{
|
||||||
url_save_node (data);
|
url_save_node (data);
|
||||||
@@ -193,9 +202,6 @@ url_check_word (const char *word)
|
|||||||
{ match_url, WORD_URL },
|
{ match_url, WORD_URL },
|
||||||
{ match_email, WORD_EMAIL },
|
{ match_email, WORD_EMAIL },
|
||||||
{ match_channel, WORD_CHANNEL },
|
{ match_channel, WORD_CHANNEL },
|
||||||
{ match_host6, WORD_HOST6 },
|
|
||||||
{ match_host, WORD_HOST },
|
|
||||||
{ match_path, WORD_PATH },
|
|
||||||
{ match_nick, WORD_NICK },
|
{ match_nick, WORD_NICK },
|
||||||
{ NULL, 0}
|
{ NULL, 0}
|
||||||
};
|
};
|
||||||
@@ -268,45 +274,18 @@ match_channel (const char *word, int *start, int *end)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
match_url (const char *word, int *start, int *end)
|
||||||
|
{
|
||||||
|
return regex_match (re_url (), word, start, end);
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
match_email (const char *word, int *start, int *end)
|
match_email (const char *word, int *start, int *end)
|
||||||
{
|
{
|
||||||
return regex_match (re_email (), word, start, end);
|
return regex_match (re_email (), word, start, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
match_url (const char *word, int *start, int *end)
|
|
||||||
{
|
|
||||||
if (regex_match (re_url (), word, start, end))
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
return regex_match (re_url_no_scheme (), word, start, end);
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
match_host (const char *word, int *start, int *end)
|
|
||||||
{
|
|
||||||
return regex_match (re_host (), word, start, end);
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
match_host6 (const char *word, int *start, int *end)
|
|
||||||
{
|
|
||||||
if (!regex_match (re_host6 (), word, start, end))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
if (word[*start] != '[')
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
match_path (const char *word, int *start, int *end)
|
|
||||||
{
|
|
||||||
return regex_match (re_path (), word, start, end);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* List of IRC commands for which contents (and thus possible URLs)
|
/* List of IRC commands for which contents (and thus possible URLs)
|
||||||
* are visible to the user. NOTE: Trailing blank required in each. */
|
* are visible to the user. NOTE: Trailing blank required in each. */
|
||||||
static char *commands[] = {
|
static char *commands[] = {
|
||||||
@@ -451,34 +430,7 @@ make_re (const char *grist)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* HOST description --- */
|
|
||||||
/* (see miscellaneous above) */
|
|
||||||
static const GRegex *
|
|
||||||
re_host (void)
|
|
||||||
{
|
|
||||||
static GRegex *host_ret;
|
|
||||||
|
|
||||||
if (host_ret) return host_ret;
|
|
||||||
|
|
||||||
host_ret = make_re ("(" "(" HOST_URL PORT ")|(" HOST ")" ")");
|
|
||||||
|
|
||||||
return host_ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const GRegex *
|
|
||||||
re_host6 (void)
|
|
||||||
{
|
|
||||||
static GRegex *host6_ret;
|
|
||||||
|
|
||||||
if (host6_ret) return host6_ret;
|
|
||||||
|
|
||||||
host6_ret = make_re ("(" "(" IPV6ADDR ")|(" "\\[" IPV6ADDR "\\]" PORT ")" ")");
|
|
||||||
|
|
||||||
return host6_ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* URL description --- */
|
/* URL description --- */
|
||||||
#define SCHEME "(%s)"
|
|
||||||
#define LPAR "\\("
|
#define LPAR "\\("
|
||||||
#define RPAR "\\)"
|
#define RPAR "\\)"
|
||||||
#define NOPARENS "[^() \t]*"
|
#define NOPARENS "[^() \t]*"
|
||||||
@@ -489,86 +441,20 @@ re_host6 (void)
|
|||||||
"(" NOPARENS ")" \
|
"(" NOPARENS ")" \
|
||||||
")*" /* Zero or more occurrences of either of these */ \
|
")*" /* Zero or more occurrences of either of these */ \
|
||||||
"(?<![.,?!\\]])" /* Not allowed to end with these */
|
"(?<![.,?!\\]])" /* Not allowed to end with these */
|
||||||
#define USERINFO "([-a-z0-9._~%]+(:[-a-z0-9._~%]*)?@)"
|
|
||||||
|
|
||||||
/* Flags used to describe URIs (RFC 3986)
|
|
||||||
*
|
|
||||||
* Bellow is an example of what the flags match.
|
|
||||||
*
|
|
||||||
* URI_AUTHORITY - http://example.org:80/foo/bar
|
|
||||||
* ^^^^^^^^^^^^^^^^
|
|
||||||
* URI_USERINFO/URI_OPT_USERINFO - http://user@example.org:80/foo/bar
|
|
||||||
* ^^^^^
|
|
||||||
* URI_PATH - http://example.org:80/foo/bar
|
|
||||||
* ^^^^^^^^
|
|
||||||
*/
|
|
||||||
#define URI_AUTHORITY (1 << 0)
|
|
||||||
#define URI_OPT_USERINFO (1 << 1)
|
|
||||||
#define URI_USERINFO (1 << 2)
|
|
||||||
#define URI_PATH (1 << 3)
|
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
const char *scheme; /* scheme name. e.g. http */
|
const char *scheme;
|
||||||
const char *path_sep; /* string that begins the path */
|
|
||||||
int flags; /* see above (flag macros) */
|
|
||||||
} uri[] = {
|
} uri[] = {
|
||||||
{ "irc", "/", URI_PATH },
|
{ "http" },
|
||||||
{ "ircs", "/", URI_PATH },
|
{ "https" },
|
||||||
{ "rtsp", "/", URI_AUTHORITY | URI_PATH },
|
{ "ftp" },
|
||||||
{ "feed", "/", URI_AUTHORITY | URI_PATH },
|
{ "gopher" },
|
||||||
{ "teamspeak", "?", URI_AUTHORITY | URI_PATH },
|
{ "gemini" },
|
||||||
{ "ftp", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
{ "irc" },
|
||||||
{ "sftp", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
{ "ircs" },
|
||||||
{ "ftps", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
{ NULL }
|
||||||
{ "http", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
|
||||||
{ "https", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
|
||||||
{ "cvs", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
|
||||||
{ "svn", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
|
||||||
{ "git", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
|
||||||
{ "bzr", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
|
||||||
{ "rsync", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
|
||||||
{ "mumble", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
|
||||||
{ "ventrilo", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
|
||||||
{ "xmpp", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
|
||||||
{ "h323", ";", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
|
||||||
{ "imap", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
|
||||||
{ "pop", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
|
||||||
{ "nfs", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
|
||||||
{ "smb", "/", URI_AUTHORITY | URI_OPT_USERINFO | URI_PATH },
|
|
||||||
{ "gopher", "/", URI_AUTHORITY | URI_PATH },
|
|
||||||
{ "gemini", "/", URI_AUTHORITY | URI_PATH },
|
|
||||||
{ "ssh", "", URI_AUTHORITY | URI_OPT_USERINFO },
|
|
||||||
{ "sip", "", URI_AUTHORITY | URI_USERINFO },
|
|
||||||
{ "sips", "", URI_AUTHORITY | URI_USERINFO },
|
|
||||||
{ "magnet", "?", URI_PATH },
|
|
||||||
{ "mailto", "", URI_PATH },
|
|
||||||
{ "bitcoin", "", URI_PATH },
|
|
||||||
{ "gtalk", "", URI_PATH },
|
|
||||||
{ "steam", "", URI_PATH },
|
|
||||||
{ "file", "/", URI_PATH },
|
|
||||||
{ "callto", "", URI_PATH },
|
|
||||||
{ "skype", "", URI_PATH },
|
|
||||||
{ "geo", "", URI_PATH },
|
|
||||||
{ "spotify", "", URI_PATH },
|
|
||||||
{ "lastfm", "/", URI_PATH },
|
|
||||||
{ "xfire", "", URI_PATH },
|
|
||||||
{ "ts3server", "", URI_PATH },
|
|
||||||
{ NULL, "", 0}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const GRegex *
|
|
||||||
re_url_no_scheme (void)
|
|
||||||
{
|
|
||||||
static GRegex *url_ret = NULL;
|
|
||||||
|
|
||||||
if (url_ret) return url_ret;
|
|
||||||
|
|
||||||
url_ret = make_re ("(" HOST_URL OPT_PORT "/" "(" PATH ")?" ")");
|
|
||||||
|
|
||||||
return url_ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const GRegex *
|
static const GRegex *
|
||||||
re_url (void)
|
re_url (void)
|
||||||
{
|
{
|
||||||
@@ -587,27 +473,9 @@ re_url (void)
|
|||||||
g_string_append (grist_gstr, "|");
|
g_string_append (grist_gstr, "|");
|
||||||
|
|
||||||
g_string_append (grist_gstr, "(");
|
g_string_append (grist_gstr, "(");
|
||||||
g_string_append_printf (grist_gstr, "%s:", uri[i].scheme);
|
g_string_append_printf (grist_gstr, "%s://", uri[i].scheme);
|
||||||
|
|
||||||
if (uri[i].flags & URI_AUTHORITY)
|
|
||||||
g_string_append (grist_gstr, "//");
|
|
||||||
|
|
||||||
if (uri[i].flags & URI_USERINFO)
|
|
||||||
g_string_append (grist_gstr, USERINFO);
|
|
||||||
else if (uri[i].flags & URI_OPT_USERINFO)
|
|
||||||
g_string_append (grist_gstr, USERINFO "?");
|
|
||||||
|
|
||||||
if (uri[i].flags & URI_AUTHORITY)
|
|
||||||
g_string_append (grist_gstr, HOST_URL_OPT_TLD OPT_PORT);
|
g_string_append (grist_gstr, HOST_URL_OPT_TLD OPT_PORT);
|
||||||
|
g_string_append_printf (grist_gstr, "(/" PATH ")?");
|
||||||
if (uri[i].flags & URI_PATH)
|
|
||||||
{
|
|
||||||
char *sep_escaped = g_regex_escape_string (uri[i].path_sep, strlen(uri[i].path_sep));
|
|
||||||
|
|
||||||
g_string_append_printf (grist_gstr, "(" "%s" PATH ")?", sep_escaped);
|
|
||||||
|
|
||||||
g_free (sep_escaped);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_string_append (grist_gstr, ")");
|
g_string_append (grist_gstr, ")");
|
||||||
}
|
}
|
||||||
@@ -620,8 +488,9 @@ re_url (void)
|
|||||||
return url_ret;
|
return url_ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EMAIL description --- */
|
#define EMAIL_LOCAL_ATOM "[\\pL\\pN!#$%&'*+/=?^_`{|}~-]+"
|
||||||
#define EMAIL "[a-z0-9][._%+-a-z0-9]+@" "(" HOST_URL ")"
|
#define EMAIL_LOCAL EMAIL_LOCAL_ATOM "(\\." EMAIL_LOCAL_ATOM ")*"
|
||||||
|
#define EMAIL EMAIL_LOCAL "@" DOMAIN TLD
|
||||||
|
|
||||||
static const GRegex *
|
static const GRegex *
|
||||||
re_email (void)
|
re_email (void)
|
||||||
@@ -680,24 +549,3 @@ re_channel (void)
|
|||||||
|
|
||||||
return channel_ret;
|
return channel_ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PATH description --- */
|
|
||||||
#ifdef WIN32
|
|
||||||
/* Windows path can be .\ ..\ or C: D: etc */
|
|
||||||
#define FS_PATH "^(\\.{1,2}\\\\|[a-z]:).*"
|
|
||||||
#else
|
|
||||||
/* Linux path can be / or ./ or ../ etc */
|
|
||||||
#define FS_PATH "^(/|\\./|\\.\\./).*"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static const GRegex *
|
|
||||||
re_path (void)
|
|
||||||
{
|
|
||||||
static GRegex *path_ret;
|
|
||||||
|
|
||||||
if (path_ret) return path_ret;
|
|
||||||
|
|
||||||
path_ret = make_re ("(" FS_PATH ")");
|
|
||||||
|
|
||||||
return path_ret;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ struct zoitechatprefs
|
|||||||
unsigned int hex_gui_autoopen_recv;
|
unsigned int hex_gui_autoopen_recv;
|
||||||
unsigned int hex_gui_autoopen_send;
|
unsigned int hex_gui_autoopen_send;
|
||||||
unsigned int hex_gui_compact;
|
unsigned int hex_gui_compact;
|
||||||
|
unsigned int hex_gui_ctrlq_quit;
|
||||||
unsigned int hex_gui_filesize_iec;
|
unsigned int hex_gui_filesize_iec;
|
||||||
unsigned int hex_gui_focus_omitalerts;
|
unsigned int hex_gui_focus_omitalerts;
|
||||||
unsigned int hex_gui_hide_menu;
|
unsigned int hex_gui_hide_menu;
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <dwmapi.h>
|
#include <dwmapi.h>
|
||||||
|
#include <glib/gwin32.h>
|
||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -301,9 +302,28 @@ fe_args (int argc, char *argv[])
|
|||||||
GOptionContext *context;
|
GOptionContext *context;
|
||||||
char *buffer;
|
char *buffer;
|
||||||
const char *desktop_id = "net.zoite.Zoitechat";
|
const char *desktop_id = "net.zoite.Zoitechat";
|
||||||
|
#ifdef WIN32
|
||||||
|
char *base_path = NULL;
|
||||||
|
char *locale_path = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_NLS
|
#ifdef ENABLE_NLS
|
||||||
|
#ifdef WIN32
|
||||||
|
base_path = g_win32_get_package_installation_directory_of_module (NULL);
|
||||||
|
if (base_path)
|
||||||
|
{
|
||||||
|
locale_path = g_build_filename (base_path, "share", "locale", NULL);
|
||||||
|
bindtextdomain (GETTEXT_PACKAGE, locale_path);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||||
|
}
|
||||||
|
g_free (locale_path);
|
||||||
|
g_free (base_path);
|
||||||
|
#else
|
||||||
|
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||||
|
#endif
|
||||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||||
textdomain (GETTEXT_PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ typedef struct session_gui
|
|||||||
GtkWidget *shbox, *shentry; /* search bar hbox */
|
GtkWidget *shbox, *shentry; /* search bar hbox */
|
||||||
gulong search_changed_signal; /* hook for search change event so blanking the box doesn't suck */
|
gulong search_changed_signal; /* hook for search change event so blanking the box doesn't suck */
|
||||||
|
|
||||||
#define MENU_ID_NUM 14
|
#define MENU_ID_NUM 15
|
||||||
GtkWidget *menu_item[MENU_ID_NUM+1]; /* some items we may change state of */
|
GtkWidget *menu_item[MENU_ID_NUM+1]; /* some items we may change state of */
|
||||||
|
|
||||||
void *chanview; /* chanview.h */
|
void *chanview; /* chanview.h */
|
||||||
|
|||||||
@@ -1802,6 +1802,44 @@ menu_change_layout (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
menu_update_quit_accel (void)
|
||||||
|
{
|
||||||
|
GSList *list;
|
||||||
|
|
||||||
|
list = sess_list;
|
||||||
|
while (list)
|
||||||
|
{
|
||||||
|
session *sess = list->data;
|
||||||
|
session_gui *gui = sess->gui;
|
||||||
|
GtkWidget *item;
|
||||||
|
GtkAccelGroup *accel_group;
|
||||||
|
int enabled;
|
||||||
|
|
||||||
|
list = list->next;
|
||||||
|
if (!gui)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
item = gui->menu_item[MENU_ID_QUIT];
|
||||||
|
if (!item)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
enabled = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "zc-ctrlq-enabled"));
|
||||||
|
if (enabled == (int)prefs.hex_gui_ctrlq_quit)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
accel_group = g_object_get_data (G_OBJECT (item), "zc-quit-accel-group");
|
||||||
|
if (!accel_group)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (prefs.hex_gui_ctrlq_quit)
|
||||||
|
gtk_widget_add_accelerator (item, "activate", accel_group, GDK_KEY_q, STATE_CTRL, GTK_ACCEL_VISIBLE);
|
||||||
|
else
|
||||||
|
gtk_widget_remove_accelerator (item, accel_group, GDK_KEY_q, STATE_CTRL);
|
||||||
|
g_object_set_data (G_OBJECT (item), "zc-ctrlq-enabled", GINT_TO_POINTER (prefs.hex_gui_ctrlq_quit));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
menu_layout_cb (GtkWidget *item, gpointer none)
|
menu_layout_cb (GtkWidget *item, gpointer none)
|
||||||
{
|
{
|
||||||
@@ -1879,25 +1917,46 @@ about_dialog_openurl (GtkAboutDialog *dialog, char *uri, gpointer data)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
about_dialog_button_openurl (GtkButton *button, gpointer data)
|
||||||
|
{
|
||||||
|
fe_open_url ((const char *)data);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
about_dialog_add_links (GtkAboutDialog *dialog)
|
about_dialog_add_links (GtkAboutDialog *dialog)
|
||||||
{
|
{
|
||||||
GtkWidget *content = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
GtkWidget *actions = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
|
||||||
GtkWidget *row = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
GtkWidget *website = gtk_button_new_with_label ("Website");
|
||||||
GtkWidget *website = gtk_link_button_new_with_label ("http://zoitechat.zoite.net", "Website");
|
GtkWidget *license = gtk_button_new_with_label ("License");
|
||||||
GtkWidget *license = gtk_link_button_new_with_label ("https://www.gnu.org/licenses/old-licenses/gpl-2.0.html", "License");
|
|
||||||
gtk_button_set_relief (GTK_BUTTON (website), GTK_RELIEF_NONE);
|
g_signal_connect (G_OBJECT (website), "clicked", G_CALLBACK (about_dialog_button_openurl), "http://zoitechat.zoite.net");
|
||||||
gtk_button_set_relief (GTK_BUTTON (license), GTK_RELIEF_NONE);
|
g_signal_connect (G_OBJECT (license), "clicked", G_CALLBACK (about_dialog_button_openurl), "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html");
|
||||||
gtk_box_pack_start (GTK_BOX (row), website, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (actions), website, FALSE, FALSE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (row), license, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (actions), license, FALSE, FALSE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (content), row, FALSE, FALSE, 0);
|
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (actions), website, TRUE);
|
||||||
gtk_widget_show_all (row);
|
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (actions), license, TRUE);
|
||||||
|
gtk_widget_show_all (actions);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
about_dialog_strip_actions (GtkDialog *dialog)
|
||||||
|
{
|
||||||
|
GtkWidget *area = gtk_dialog_get_action_area (dialog);
|
||||||
|
GList *children = gtk_container_get_children (GTK_CONTAINER (area));
|
||||||
|
GList *node;
|
||||||
|
|
||||||
|
for (node = children; node != NULL; node = node->next)
|
||||||
|
gtk_widget_destroy (GTK_WIDGET (node->data));
|
||||||
|
|
||||||
|
g_list_free (children);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
menu_about (GtkWidget *wid, gpointer sess)
|
menu_about (GtkWidget *wid, gpointer sess)
|
||||||
{
|
{
|
||||||
GtkAboutDialog *dialog = GTK_ABOUT_DIALOG(gtk_about_dialog_new());
|
GtkAboutDialog *dialog = GTK_ABOUT_DIALOG(gtk_about_dialog_new());
|
||||||
|
static const gchar *empty_people[] = { NULL };
|
||||||
theme_manager_attach_window (GTK_WIDGET (dialog));
|
theme_manager_attach_window (GTK_WIDGET (dialog));
|
||||||
char comment[512];
|
char comment[512];
|
||||||
g_snprintf (comment, sizeof(comment), ""
|
g_snprintf (comment, sizeof(comment), ""
|
||||||
@@ -1914,14 +1973,20 @@ menu_about (GtkWidget *wid, gpointer sess)
|
|||||||
|
|
||||||
gtk_about_dialog_set_program_name (dialog, _(DISPLAY_NAME));
|
gtk_about_dialog_set_program_name (dialog, _(DISPLAY_NAME));
|
||||||
gtk_about_dialog_set_version (dialog, PACKAGE_VERSION);
|
gtk_about_dialog_set_version (dialog, PACKAGE_VERSION);
|
||||||
gtk_about_dialog_set_authors (dialog, NULL);
|
gtk_about_dialog_set_authors (dialog, empty_people);
|
||||||
gtk_about_dialog_set_documenters (dialog, NULL);
|
gtk_about_dialog_set_documenters (dialog, empty_people);
|
||||||
gtk_about_dialog_set_artists (dialog, NULL);
|
gtk_about_dialog_set_artists (dialog, empty_people);
|
||||||
gtk_about_dialog_set_translator_credits (dialog, NULL);
|
gtk_about_dialog_set_translator_credits (dialog, "");
|
||||||
|
gtk_about_dialog_set_website (dialog, NULL);
|
||||||
|
gtk_about_dialog_set_website_label (dialog, NULL);
|
||||||
|
gtk_about_dialog_set_license (dialog, NULL);
|
||||||
|
gtk_about_dialog_set_wrap_license (dialog, FALSE);
|
||||||
gtk_about_dialog_set_logo (dialog, pix_zoitechat);
|
gtk_about_dialog_set_logo (dialog, pix_zoitechat);
|
||||||
gtk_about_dialog_set_copyright (dialog, "\302\251 1998-2010 Peter \305\275elezn\303\275\n\302\251 2009-2014 Berke Viktor\n\302\251 2026 deepend");
|
gtk_about_dialog_set_copyright (dialog, "\302\251 1998-2010 Peter \305\275elezn\303\275\n\302\251 2009-2014 Berke Viktor\n\302\251 2015-2025 Patrick Griffis\n\302\251 2026 deepend");
|
||||||
gtk_about_dialog_set_comments (dialog, comment);
|
gtk_about_dialog_set_comments (dialog, comment);
|
||||||
|
about_dialog_strip_actions (GTK_DIALOG (dialog));
|
||||||
about_dialog_add_links (dialog);
|
about_dialog_add_links (dialog);
|
||||||
|
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Close"), GTK_RESPONSE_CLOSE);
|
||||||
|
|
||||||
gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(parent_window));
|
gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(parent_window));
|
||||||
g_signal_connect (G_OBJECT(dialog), "response", G_CALLBACK(about_dialog_close), NULL);
|
g_signal_connect (G_OBJECT(dialog), "response", G_CALLBACK(about_dialog_close), NULL);
|
||||||
@@ -1950,7 +2015,7 @@ static struct mymenu mymenu[] = {
|
|||||||
#define CLOSE_OFFSET (13)
|
#define CLOSE_OFFSET (13)
|
||||||
{0, menu_close, 0, M_MENUITEM, 0, 0, 1},
|
{0, menu_close, 0, M_MENUITEM, 0, 0, 1},
|
||||||
{0, 0, 0, M_SEP, 0, 0, 0},
|
{0, 0, 0, M_SEP, 0, 0, 0},
|
||||||
{N_("_Quit"), menu_quit, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_q}, /* 15 */
|
{N_("_Quit"), menu_quit, 0, M_MENUITEM, MENU_ID_QUIT, 0, 1, GDK_KEY_q}, /* 15 */
|
||||||
|
|
||||||
{N_("_View"), 0, 0, M_NEWMENU, 0, 0, 1},
|
{N_("_View"), 0, 0, M_NEWMENU, 0, 0, 1},
|
||||||
#define MENUBAR_OFFSET (17)
|
#define MENUBAR_OFFSET (17)
|
||||||
@@ -2634,7 +2699,7 @@ menu_create_main (void *accel_group, int bar, int away, int toplevel,
|
|||||||
case M_MENUITEM:
|
case M_MENUITEM:
|
||||||
item = gtk_menu_item_new_with_mnemonic (_(mymenu[i].text));
|
item = gtk_menu_item_new_with_mnemonic (_(mymenu[i].text));
|
||||||
normalitem:
|
normalitem:
|
||||||
if (mymenu[i].key != 0)
|
if (mymenu[i].key != 0 && !(mymenu[i].id == MENU_ID_QUIT && !prefs.hex_gui_ctrlq_quit))
|
||||||
gtk_widget_add_accelerator (item, "activate", accel_group,
|
gtk_widget_add_accelerator (item, "activate", accel_group,
|
||||||
mymenu[i].key,
|
mymenu[i].key,
|
||||||
mymenu[i].key == GDK_KEY_F1 ? 0 :
|
mymenu[i].key == GDK_KEY_F1 ? 0 :
|
||||||
@@ -2644,6 +2709,11 @@ normalitem:
|
|||||||
STATE_SHIFT | STATE_CTRL :
|
STATE_SHIFT | STATE_CTRL :
|
||||||
STATE_CTRL,
|
STATE_CTRL,
|
||||||
GTK_ACCEL_VISIBLE);
|
GTK_ACCEL_VISIBLE);
|
||||||
|
if (mymenu[i].id == MENU_ID_QUIT)
|
||||||
|
{
|
||||||
|
g_object_set_data (G_OBJECT (item), "zc-quit-accel-group", accel_group);
|
||||||
|
g_object_set_data (G_OBJECT (item), "zc-ctrlq-enabled", GINT_TO_POINTER (prefs.hex_gui_ctrlq_quit));
|
||||||
|
}
|
||||||
if (mymenu[i].callback)
|
if (mymenu[i].callback)
|
||||||
g_signal_connect (G_OBJECT (item), "activate",
|
g_signal_connect (G_OBJECT (item), "activate",
|
||||||
G_CALLBACK (mymenu[i].callback), 0);
|
G_CALLBACK (mymenu[i].callback), 0);
|
||||||
@@ -2685,8 +2755,10 @@ togitem:
|
|||||||
goto togitem;
|
goto togitem;
|
||||||
|
|
||||||
case M_SEP:
|
case M_SEP:
|
||||||
item = gtk_menu_item_new ();
|
item = gtk_separator_menu_item_new ();
|
||||||
gtk_widget_set_sensitive (item, FALSE);
|
if (submenu)
|
||||||
|
gtk_menu_shell_append (GTK_MENU_SHELL (submenu), item);
|
||||||
|
else
|
||||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||||
gtk_widget_show (item);
|
gtk_widget_show (item);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ void menu_create (GtkWidget *menu, GSList *list, char *target, int check_path);
|
|||||||
void menu_bar_toggle (void);
|
void menu_bar_toggle (void);
|
||||||
void menu_add_plugin_items (GtkWidget *menu, char *root, char *target);
|
void menu_add_plugin_items (GtkWidget *menu, char *root, char *target);
|
||||||
void menu_change_layout (void);
|
void menu_change_layout (void);
|
||||||
|
void menu_update_quit_accel (void);
|
||||||
|
|
||||||
void menu_set_away (session_gui *gui, int away);
|
void menu_set_away (session_gui *gui, int away);
|
||||||
void menu_set_fullscreen (session_gui *gui, int fullscreen);
|
void menu_set_fullscreen (session_gui *gui, int fullscreen);
|
||||||
@@ -63,8 +64,9 @@ void menu_set_fullscreen (session_gui *gui, int fullscreen);
|
|||||||
#define MENU_ID_USERMENU 12
|
#define MENU_ID_USERMENU 12
|
||||||
#define MENU_ID_FULLSCREEN 13
|
#define MENU_ID_FULLSCREEN 13
|
||||||
#define MENU_ID_ZOITECHAT 14
|
#define MENU_ID_ZOITECHAT 14
|
||||||
|
#define MENU_ID_QUIT 15
|
||||||
|
|
||||||
#if (MENU_ID_NUM < MENU_ID_ZOITECHAT)
|
#if (MENU_ID_NUM < MENU_ID_QUIT)
|
||||||
#error MENU_ID_NUM is set wrong
|
#error MENU_ID_NUM is set wrong
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -536,6 +536,7 @@ static const setting general_settings[] =
|
|||||||
{ST_TOGGLE, N_("WHOIS on notify"), P_OFFINTNL(hex_notify_whois_online), N_("Sends a /WHOIS when a user comes online in your notify list."), 0, 0},
|
{ST_TOGGLE, N_("WHOIS on notify"), P_OFFINTNL(hex_notify_whois_online), N_("Sends a /WHOIS when a user comes online in your notify list."), 0, 0},
|
||||||
{ST_TOGGLE, N_("Hide join and part messages"), P_OFFINTNL(hex_irc_conf_mode), N_("Hide channel join/part messages by default."), 0, 0},
|
{ST_TOGGLE, N_("Hide join and part messages"), P_OFFINTNL(hex_irc_conf_mode), N_("Hide channel join/part messages by default."), 0, 0},
|
||||||
{ST_TOGGLE, N_("Hide nick change messages"), P_OFFINTNL(hex_irc_hide_nickchange), 0, 0, 0},
|
{ST_TOGGLE, N_("Hide nick change messages"), P_OFFINTNL(hex_irc_hide_nickchange), 0, 0, 0},
|
||||||
|
{ST_TOGGLE, N_("Enable Ctrl+Q to quit"), P_OFFINTNL(hex_gui_ctrlq_quit), 0, 0, 0},
|
||||||
|
|
||||||
{ST_END, 0, 0, 0, 0, 0}
|
{ST_END, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
@@ -2070,6 +2071,7 @@ setup_apply_real (const ThemeChangedEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
mg_apply_setup ();
|
mg_apply_setup ();
|
||||||
|
menu_update_quit_accel ();
|
||||||
tray_apply_setup ();
|
tray_apply_setup ();
|
||||||
zoitechat_reinit_timers ();
|
zoitechat_reinit_timers ();
|
||||||
|
|
||||||
|
|||||||
@@ -44,14 +44,29 @@
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
COL_PIX=0, /* GdkPixbuf * */
|
COL_PIX=0, /* GdkPixbuf * */
|
||||||
COL_NICK=1, /* char * */
|
COL_PREFIX=1, /* char * */
|
||||||
COL_HOST=2, /* char * */
|
COL_NICK=2, /* char * */
|
||||||
COL_USER=3, /* struct User * */
|
COL_HOST=3, /* char * */
|
||||||
COL_GDKCOLOR=4 /* GdkRGBA */
|
COL_USER=4, /* struct User * */
|
||||||
|
COL_GDKCOLOR=5 /* GdkRGBA */
|
||||||
};
|
};
|
||||||
|
|
||||||
static void userlist_store_color (GtkListStore *store, GtkTreeIter *iter, ThemeSemanticToken token, gboolean has_token);
|
static void userlist_store_color (GtkListStore *store, GtkTreeIter *iter, ThemeSemanticToken token, gboolean has_token);
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
userlist_prefix_color (char prefix)
|
||||||
|
{
|
||||||
|
switch (prefix)
|
||||||
|
{
|
||||||
|
case '~': return "#d46a6a";
|
||||||
|
case '@': return "#5ea36a";
|
||||||
|
case '%': return "#d39a5f";
|
||||||
|
case '&': return "#79aecd";
|
||||||
|
case '+': return "#d2bf6a";
|
||||||
|
default: return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
userlist_column_width_notify_cb (GtkTreeViewColumn *column, GParamSpec *pspec, gpointer userdata)
|
userlist_column_width_notify_cb (GtkTreeViewColumn *column, GParamSpec *pspec, gpointer userdata)
|
||||||
{
|
{
|
||||||
@@ -500,6 +515,11 @@ fe_userlist_insert (session *sess, struct User *newuser, gboolean sel)
|
|||||||
GdkPixbuf *pix = get_user_icon (sess->server, newuser);
|
GdkPixbuf *pix = get_user_icon (sess->server, newuser);
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
char *nick;
|
char *nick;
|
||||||
|
char *nick_escaped;
|
||||||
|
char *prefix = NULL;
|
||||||
|
char *prefix_escaped;
|
||||||
|
char prefix_text[2];
|
||||||
|
const char *prefix_color;
|
||||||
ThemeSemanticToken nick_token = THEME_TOKEN_TEXT_FOREGROUND;
|
ThemeSemanticToken nick_token = THEME_TOKEN_TEXT_FOREGROUND;
|
||||||
gboolean have_nick_token = FALSE;
|
gboolean have_nick_token = FALSE;
|
||||||
|
|
||||||
@@ -519,30 +539,36 @@ fe_userlist_insert (session *sess, struct User *newuser, gboolean sel)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nick = newuser->nick;
|
nick_escaped = g_markup_escape_text (newuser->nick, -1);
|
||||||
|
nick = nick_escaped;
|
||||||
if (!prefs.hex_gui_ulist_icons)
|
if (!prefs.hex_gui_ulist_icons)
|
||||||
{
|
{
|
||||||
nick = g_malloc (strlen (newuser->nick) + 2);
|
if (newuser->prefix[0] != '\0' && newuser->prefix[0] != ' ')
|
||||||
nick[0] = newuser->prefix[0];
|
{
|
||||||
if (nick[0] == '\0' || nick[0] == ' ')
|
prefix_text[0] = newuser->prefix[0];
|
||||||
strcpy (nick, newuser->nick);
|
prefix_text[1] = '\0';
|
||||||
|
prefix_escaped = g_markup_escape_text (prefix_text, -1);
|
||||||
|
prefix_color = userlist_prefix_color (newuser->prefix[0]);
|
||||||
|
if (prefix_color)
|
||||||
|
prefix = g_strdup_printf ("<b><span foreground=\"%s\">%s</span></b>", prefix_color, prefix_escaped);
|
||||||
else
|
else
|
||||||
strcpy (nick + 1, newuser->nick);
|
prefix = g_strdup_printf ("<b>%s</b>", prefix_escaped);
|
||||||
|
g_free (prefix_escaped);
|
||||||
|
}
|
||||||
pix = NULL;
|
pix = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_list_store_insert_with_values (GTK_LIST_STORE (model), &iter, 0,
|
gtk_list_store_insert_with_values (GTK_LIST_STORE (model), &iter, 0,
|
||||||
COL_PIX, pix,
|
COL_PIX, pix,
|
||||||
|
COL_PREFIX, prefix,
|
||||||
COL_NICK, nick,
|
COL_NICK, nick,
|
||||||
COL_HOST, newuser->hostname,
|
COL_HOST, newuser->hostname,
|
||||||
COL_USER, newuser,
|
COL_USER, newuser,
|
||||||
-1);
|
-1);
|
||||||
userlist_store_color (GTK_LIST_STORE (model), &iter, nick_token, have_nick_token);
|
userlist_store_color (GTK_LIST_STORE (model), &iter, nick_token, have_nick_token);
|
||||||
|
|
||||||
if (!prefs.hex_gui_ulist_icons)
|
g_free (prefix);
|
||||||
{
|
g_free (nick_escaped);
|
||||||
g_free (nick);
|
|
||||||
}
|
|
||||||
|
|
||||||
userlist_row_map_set (sess, model, newuser, &iter);
|
userlist_row_map_set (sess, model, newuser, &iter);
|
||||||
|
|
||||||
@@ -671,8 +697,8 @@ userlist_create_model (session *sess)
|
|||||||
GtkTreeIterCompareFunc cmp_func;
|
GtkTreeIterCompareFunc cmp_func;
|
||||||
GtkSortType sort_type;
|
GtkSortType sort_type;
|
||||||
|
|
||||||
store = gtk_list_store_new (5, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING,
|
store = gtk_list_store_new (6, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING,
|
||||||
G_TYPE_POINTER, THEME_GTK_COLOR_TYPE);
|
G_TYPE_STRING, G_TYPE_POINTER, THEME_GTK_COLOR_TYPE);
|
||||||
|
|
||||||
switch (prefs.hex_gui_ulist_sort)
|
switch (prefs.hex_gui_ulist_sort)
|
||||||
{
|
{
|
||||||
@@ -717,19 +743,29 @@ userlist_add_columns (GtkTreeView * treeview)
|
|||||||
g_object_set (G_OBJECT (renderer), "ypad", 0, NULL);
|
g_object_set (G_OBJECT (renderer), "ypad", 0, NULL);
|
||||||
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|
||||||
-1, NULL, renderer,
|
-1, NULL, renderer,
|
||||||
"pixbuf", 0, NULL);
|
"pixbuf", COL_PIX, NULL);
|
||||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), 0);
|
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), 0);
|
||||||
gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_FIXED);
|
gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_FIXED);
|
||||||
|
|
||||||
/* nick column */
|
/* nick column */
|
||||||
|
column = gtk_tree_view_column_new ();
|
||||||
|
gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
|
||||||
|
|
||||||
|
renderer = gtk_cell_renderer_text_new ();
|
||||||
|
if (prefs.hex_gui_compact)
|
||||||
|
g_object_set (G_OBJECT (renderer), "ypad", 0, NULL);
|
||||||
|
gtk_cell_renderer_text_set_fixed_height_from_font (GTK_CELL_RENDERER_TEXT (renderer), 1);
|
||||||
|
gtk_tree_view_column_pack_start (column, renderer, FALSE);
|
||||||
|
gtk_tree_view_column_add_attribute (column, renderer, "markup", COL_PREFIX);
|
||||||
|
|
||||||
renderer = gtk_cell_renderer_text_new ();
|
renderer = gtk_cell_renderer_text_new ();
|
||||||
if (prefs.hex_gui_compact)
|
if (prefs.hex_gui_compact)
|
||||||
g_object_set (G_OBJECT (renderer), "ypad", 0, NULL);
|
g_object_set (G_OBJECT (renderer), "ypad", 0, NULL);
|
||||||
g_object_set (G_OBJECT (renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
|
g_object_set (G_OBJECT (renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
|
||||||
gtk_cell_renderer_text_set_fixed_height_from_font (GTK_CELL_RENDERER_TEXT (renderer), 1);
|
gtk_cell_renderer_text_set_fixed_height_from_font (GTK_CELL_RENDERER_TEXT (renderer), 1);
|
||||||
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|
gtk_tree_view_column_pack_start (column, renderer, TRUE);
|
||||||
-1, NULL, renderer,
|
gtk_tree_view_column_add_attribute (column, renderer, "markup", COL_NICK);
|
||||||
"text", 1, THEME_GTK_FOREGROUND_PROPERTY, 4, NULL);
|
gtk_tree_view_column_add_attribute (column, renderer, THEME_GTK_FOREGROUND_PROPERTY, COL_GDKCOLOR);
|
||||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), 1);
|
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), 1);
|
||||||
gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_FIXED);
|
gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_FIXED);
|
||||||
gtk_tree_view_column_set_expand (column, TRUE);
|
gtk_tree_view_column_set_expand (column, TRUE);
|
||||||
@@ -750,7 +786,7 @@ userlist_add_columns (GtkTreeView * treeview)
|
|||||||
gtk_cell_renderer_text_set_fixed_height_from_font (GTK_CELL_RENDERER_TEXT (renderer), 1);
|
gtk_cell_renderer_text_set_fixed_height_from_font (GTK_CELL_RENDERER_TEXT (renderer), 1);
|
||||||
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|
||||||
-1, NULL, renderer,
|
-1, NULL, renderer,
|
||||||
"text", 2, NULL);
|
"text", COL_HOST, NULL);
|
||||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), 2);
|
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), 2);
|
||||||
gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_FIXED);
|
gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_FIXED);
|
||||||
gtk_tree_view_column_set_expand (column, TRUE);
|
gtk_tree_view_column_set_expand (column, TRUE);
|
||||||
|
|||||||
@@ -2640,6 +2640,11 @@ gtk_xtext_button_press (GtkWidget * widget, GdkEventButton * event)
|
|||||||
xtext->select_start_x = x;
|
xtext->select_start_x = x;
|
||||||
xtext->select_start_y = y;
|
xtext->select_start_y = y;
|
||||||
xtext->select_start_adj = xtext_adj_get_value (xtext->adj);
|
xtext->select_start_adj = xtext_adj_get_value (xtext->adj);
|
||||||
|
if (xtext->buffer->last_ent_start)
|
||||||
|
{
|
||||||
|
gtk_xtext_unselect (xtext);
|
||||||
|
xtext->mark_stamp = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
#include <glib/gwin32.h>
|
||||||
#define STDIN_FILENO 0
|
#define STDIN_FILENO 0
|
||||||
#define STDOUT_FILENO 1
|
#define STDOUT_FILENO 1
|
||||||
#else
|
#else
|
||||||
@@ -478,9 +479,28 @@ fe_args (int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GOptionContext *context;
|
GOptionContext *context;
|
||||||
|
#ifdef WIN32
|
||||||
|
char *base_path = NULL;
|
||||||
|
char *locale_path = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_NLS
|
#ifdef ENABLE_NLS
|
||||||
|
#ifdef WIN32
|
||||||
|
base_path = g_win32_get_package_installation_directory_of_module (NULL);
|
||||||
|
if (base_path)
|
||||||
|
{
|
||||||
|
locale_path = g_build_filename (base_path, "share", "locale", NULL);
|
||||||
|
bindtextdomain (GETTEXT_PACKAGE, locale_path);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||||
|
}
|
||||||
|
g_free (locale_path);
|
||||||
|
g_free (base_path);
|
||||||
|
#else
|
||||||
|
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||||
|
#endif
|
||||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||||
textdomain (GETTEXT_PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ Root: HKCR; Subkey: "ZoiteChat.Theme\shell\open\command"; ValueType: string; Val
|
|||||||
[Run]
|
[Run]
|
||||||
Filename: "{app}\zoitechat.exe"; Description: "Run ZoiteChat after closing the Wizard"; Flags: nowait postinstall skipifsilent
|
Filename: "{app}\zoitechat.exe"; Description: "Run ZoiteChat after closing the Wizard"; Flags: nowait postinstall skipifsilent
|
||||||
Filename: "http://docs.zoitechat.org/en/latest/changelog.html"; Description: "See what's changed"; Flags: shellexec runasoriginaluser postinstall skipifsilent unchecked
|
Filename: "http://docs.zoitechat.org/en/latest/changelog.html"; Description: "See what's changed"; Flags: shellexec runasoriginaluser postinstall skipifsilent unchecked
|
||||||
Filename: "{tmp}\vcredist.exe"; Parameters: "/install /quiet /norestart"; StatusMsg: "Installing Visual C++ Redistributable"; Components: deps\vcredist2015; Flags: skipifdoesntexist; Tasks: not portable
|
Filename: "{tmp}\vcredist.exe"; Parameters: "/install /quiet /norestart"; StatusMsg: "Installing Visual C++ Redistributable"; Components: deps\vcredist2015; Tasks: not portable
|
||||||
Filename: "{tmp}\perl.msi"; StatusMsg: "Installing Perl"; Components: langs\perl; Flags: shellexec skipifdoesntexist; Tasks: not portable
|
Filename: "{tmp}\perl.msi"; StatusMsg: "Installing Perl"; Components: langs\perl; Flags: shellexec skipifdoesntexist; Tasks: not portable
|
||||||
Filename: "{tmp}\python.msi"; StatusMsg: "Installing Python"; Components: langs\python; Flags: shellexec skipifdoesntexist; Tasks: not portable
|
Filename: "{tmp}\python.msi"; StatusMsg: "Installing Python"; Components: langs\python; Flags: shellexec skipifdoesntexist; Tasks: not portable
|
||||||
Filename: "{tmp}\python.exe"; Parameters: "InstallAllUsers=1 PrependPath=1"; StatusMsg: "Installing Python"; Components: langs\python; Flags: shellexec skipifdoesntexist; Tasks: not portable
|
Filename: "{tmp}\python.exe"; Parameters: "InstallAllUsers=1 PrependPath=1"; StatusMsg: "Installing Python"; Components: langs\python; Flags: shellexec skipifdoesntexist; Tasks: not portable
|
||||||
@@ -339,7 +339,7 @@ begin
|
|||||||
if not IsTaskSelected('portable') then
|
if not IsTaskSelected('portable') then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
REDIST := 'https://github.com/ZoiteChat/gvsbuild/releases/download/zoitechat-2.18.0-pre4/vc_redist.x64.exe';
|
REDIST := 'https://aka.ms/vs/17/release/vc_redist.x64.exe';
|
||||||
PERL := 'https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54201_64bit/strawberry-perl-5.42.0.1-64bit.msi';
|
PERL := 'https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54201_64bit/strawberry-perl-5.42.0.1-64bit.msi';
|
||||||
PY3 := 'https://www.python.org/ftp/python/3.14.3/python-3.14.3-amd64.exe';
|
PY3 := 'https://www.python.org/ftp/python/3.14.3/python-3.14.3-amd64.exe';
|
||||||
SPELL := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/ZoiteChat.Spelling.Dictionaries.r2.exe';
|
SPELL := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/ZoiteChat.Spelling.Dictionaries.r2.exe';
|
||||||
@@ -387,6 +387,14 @@ begin
|
|||||||
WizardForm.TasksList.Checked[1] := False
|
WizardForm.TasksList.Checked[1] := False
|
||||||
MsgBox('Portable mode is only intended for use on portable drives and has been disabled.', mbInformation, MB_OK)
|
MsgBox('Portable mode is only intended for use on portable drives and has been disabled.', mbInformation, MB_OK)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if CurPageID = wpReady then
|
||||||
|
if IsComponentSelected('deps\vcredist2015') and not CheckVCInstall() and not FileExists(ExpandConstant('{tmp}\vcredist.exe')) then
|
||||||
|
begin
|
||||||
|
MsgBox('Visual C++ Redistributable could not be downloaded. Please retry setup or install it manually and rerun setup.', mbError, MB_OK);
|
||||||
|
Result := False;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.18.0~pre4
|
2.18.0~pre5
|
||||||
|
|||||||
Reference in New Issue
Block a user