mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-10-17 18:37:14 +00:00
Compare commits
25
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ad7b3c03e | ||
|
|
8db6e7569f | ||
|
|
edf268dc0f | ||
|
|
e03ea59f3c | ||
|
|
f0b2840668 | ||
|
|
4f2fc49475 | ||
|
|
2e4155bbfc | ||
|
|
ca2456cbc6 | ||
|
|
222b4868f5 | ||
|
|
2cf1f7e833 | ||
|
|
776d24695e | ||
|
|
64a9c6e5d7 | ||
|
|
66196013bc | ||
|
|
61ff308c9f | ||
|
|
2672f9b087 | ||
|
|
4315a75a12 | ||
|
|
15905bebb1 | ||
|
|
fc4a7454ad | ||
|
|
87410aea50 | ||
|
|
de98d00a1c | ||
|
|
e94ffd9d79 | ||
|
|
d7aebb784d | ||
|
|
20b8cb939d | ||
|
|
ff4217c3d1 | ||
|
|
4fb72d30d8 |
@@ -29,6 +29,22 @@
|
||||
<id>zoitechat.desktop</id>
|
||||
</provides>
|
||||
<releases>
|
||||
<release date="2026-09-15" version="2.19.1">
|
||||
<description>
|
||||
<ul>
|
||||
<li>Fixed /msg messages showing twice on servers using IRCv3 <code>echo-message</code>.</li>
|
||||
<li>Fixed escaping a leading command slash so <code>//text</code> sends <code>/text</code> as normal chat.</li>
|
||||
<li>Fixed automatic away clearing when sending messages on servers using <code>echo-message</code>.</li>
|
||||
<li>Fixed other users' away status not updating until rejoining a channel when <code>away-notify</code> updates are missed.</li>
|
||||
<li>Fixed private messages and <code>/me</code> actions being routed to the wrong window when using WeeChat's IRC relay, while preserving channel ACTION routing.</li>
|
||||
<li>Fixed a Flatpak startup error caused by the D-Bus service still using the old HexChat app ID.</li>
|
||||
<li>Fixed optional Windows 10 theme downloads in the Windows installer.</li>
|
||||
<li>Fixed the GTK warning when switching from channel tabs to the channel tree.</li>
|
||||
<li>Fixed GTK3 theme archive root detection so themes with an <code>index.theme</code> file are preferred correctly.</li>
|
||||
<li>Fixed source-build configuration when plugin AppStream metadata installation is disabled, and corrected the minimum Meson version to 0.59.</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release date="2026-07-28" version="2.19.0">
|
||||
<description>
|
||||
<ul>
|
||||
|
||||
Vendored
+153
@@ -78,6 +78,11 @@ a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: var(--accent);
|
||||
color: #fff8ea;
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
textarea,
|
||||
@@ -139,6 +144,7 @@ select {
|
||||
z-index: 2000;
|
||||
border-bottom: 3px solid var(--rule);
|
||||
background: rgba(238, 229, 211, 0.94);
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
@@ -231,6 +237,17 @@ select {
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.site-nav a[aria-current="page"] {
|
||||
border-block-color: var(--rule);
|
||||
background: var(--panel-dark);
|
||||
color: var(--paper-warm);
|
||||
box-shadow: inset 0 -0.3rem 0 var(--accent);
|
||||
}
|
||||
|
||||
.site-nav a[aria-current="page"]::before {
|
||||
color: #d19b25;
|
||||
}
|
||||
|
||||
.site-nav a:hover,
|
||||
.site-nav a:focus-visible {
|
||||
border-block-color: var(--rule);
|
||||
@@ -511,6 +528,7 @@ select {
|
||||
font-weight: 900;
|
||||
line-height: 1.18;
|
||||
box-shadow: 4px 4px 0 var(--rule);
|
||||
touch-action: manipulation;
|
||||
transition: transform 0.12s ease, background-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
|
||||
}
|
||||
|
||||
@@ -527,6 +545,11 @@ select {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.button:active {
|
||||
transform: translate(3px, 3px);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.button-primary {
|
||||
background: var(--accent);
|
||||
color: #fff8ea;
|
||||
@@ -1176,6 +1199,11 @@ select {
|
||||
color: rgba(255, 248, 234, 0.82);
|
||||
}
|
||||
|
||||
.footer-links a {
|
||||
width: fit-content;
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
|
||||
.footer-links a::before {
|
||||
color: #d19b25;
|
||||
content: "↳ ";
|
||||
@@ -1184,6 +1212,7 @@ select {
|
||||
.footer-links a:hover,
|
||||
.footer-links a:focus-visible {
|
||||
color: #fff8ea;
|
||||
border-bottom-color: currentColor;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
@@ -1346,6 +1375,70 @@ select {
|
||||
animation-iteration-count: 1 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Automatic dark appearance, matching the main ZoiteChat site palette. */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
color-scheme: dark;
|
||||
--paper: #161514;
|
||||
--paper-warm: #f4ead9;
|
||||
--paper-cool: #1c2522;
|
||||
--ink: #f2eadb;
|
||||
--ink-soft: #ddd2c1;
|
||||
--muted: #bdb19f;
|
||||
--quiet: #928777;
|
||||
--rule: #080706;
|
||||
--rule-soft: rgba(242, 234, 219, 0.16);
|
||||
--rule-mid: rgba(242, 234, 219, 0.3);
|
||||
--panel: #211e1a;
|
||||
--panel-alt: #2b261f;
|
||||
--panel-dark: #0b0c0c;
|
||||
--accent: #c34720;
|
||||
--accent-dark: #ff966d;
|
||||
--accent-soft: rgba(195, 71, 32, 0.17);
|
||||
--green: #367662;
|
||||
--blue: #386b8d;
|
||||
--warning: #9b6508;
|
||||
--success: #43856a;
|
||||
--shadow: 8px 8px 0 rgba(0, 0, 0, 0.82);
|
||||
--shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.36);
|
||||
}
|
||||
|
||||
html {
|
||||
background: var(--paper);
|
||||
}
|
||||
|
||||
body {
|
||||
background:
|
||||
linear-gradient(90deg, rgba(242, 234, 219, 0.025) 1px, transparent 1px) 0 0 / 68px 68px,
|
||||
linear-gradient(180deg, rgba(242, 234, 219, 0.022) 1px, transparent 1px) 0 0 / 68px 68px,
|
||||
radial-gradient(circle at 11% 18%, rgba(195, 71, 32, 0.15), transparent 24rem),
|
||||
radial-gradient(circle at 86% 4%, rgba(54, 118, 98, 0.16), transparent 28rem),
|
||||
linear-gradient(180deg, #181715 0%, #111311 58%, #191714 100%);
|
||||
}
|
||||
|
||||
body::before {
|
||||
background:
|
||||
repeating-linear-gradient(90deg, transparent 0 17px, rgba(242, 234, 219, 0.025) 17px 18px),
|
||||
repeating-linear-gradient(0deg, transparent 0 5px, rgba(255, 255, 255, 0.025) 5px 6px);
|
||||
mix-blend-mode: screen;
|
||||
}
|
||||
|
||||
.site-header {
|
||||
background: rgba(22, 21, 20, 0.94);
|
||||
}
|
||||
|
||||
.site-nav a,
|
||||
.nav-menu summary {
|
||||
background: rgba(39, 35, 30, 0.52);
|
||||
}
|
||||
|
||||
.eyebrow::before,
|
||||
.footer-links a::before {
|
||||
color: #e0aa3c;
|
||||
}
|
||||
}
|
||||
|
||||
/* Sphinx/Read the Docs bridge: aggressively map documentation onto the main ZoiteChat site skin. */
|
||||
html {
|
||||
font-size: 16px !important;
|
||||
@@ -1485,6 +1578,17 @@ body a {
|
||||
font-weight: 900 !important;
|
||||
}
|
||||
|
||||
#navbar-top .site-nav a[aria-current="page"] {
|
||||
border-block-color: var(--rule) !important;
|
||||
background: var(--panel-dark) !important;
|
||||
color: var(--paper-warm) !important;
|
||||
box-shadow: inset 0 -0.3rem 0 var(--accent) !important;
|
||||
}
|
||||
|
||||
#navbar-top .site-nav a[aria-current="page"]::before {
|
||||
color: #d19b25 !important;
|
||||
}
|
||||
|
||||
#navbar-top .site-nav a:hover,
|
||||
#navbar-top .site-nav a:focus-visible,
|
||||
#navbar-top .site-nav summary:hover,
|
||||
@@ -1671,6 +1775,7 @@ footer.site-footer-lite {
|
||||
}
|
||||
|
||||
.document .body p {
|
||||
max-width: 78ch;
|
||||
margin: 0 0 1rem !important;
|
||||
}
|
||||
|
||||
@@ -1716,6 +1821,7 @@ ul.search a:focus-visible {
|
||||
|
||||
.document .body ul,
|
||||
.document .body ol {
|
||||
max-width: 78ch;
|
||||
margin: 0.75rem 0 1.4rem !important;
|
||||
padding-left: 1.35rem !important;
|
||||
}
|
||||
@@ -1865,6 +1971,11 @@ ul.search a:focus-visible {
|
||||
text-transform: uppercase !important;
|
||||
}
|
||||
|
||||
.document .body table tbody tr:hover td,
|
||||
.document .body table tbody tr:focus-within td {
|
||||
background: var(--accent-soft) !important;
|
||||
}
|
||||
|
||||
.admonition,
|
||||
.note,
|
||||
.warning,
|
||||
@@ -2004,6 +2115,7 @@ input[type="submit"],
|
||||
line-height: 1.18 !important;
|
||||
text-shadow: none !important;
|
||||
box-shadow: 4px 4px 0 var(--rule) !important;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
.btn:hover,
|
||||
@@ -2019,6 +2131,13 @@ input[type="submit"]:focus-visible {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
.btn:active,
|
||||
button:active,
|
||||
input[type="submit"]:active {
|
||||
transform: translate(3px, 3px) !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
#navbar-related {
|
||||
min-height: auto !important;
|
||||
margin: 1rem 0 1.5rem !important;
|
||||
@@ -2275,3 +2394,37 @@ footer:not(.site-footer) {
|
||||
letter-spacing: -0.04em !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Keep basicstrap's stronger overrides readable with the main site's dark palette. */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
#navbar-top.site-header {
|
||||
background: rgba(22, 21, 20, 0.94) !important;
|
||||
}
|
||||
|
||||
#navbar-top .site-nav a,
|
||||
#navbar-top .site-nav summary {
|
||||
background: rgba(39, 35, 30, 0.52) !important;
|
||||
}
|
||||
|
||||
.document::after,
|
||||
.sidebar::after,
|
||||
#navbar-related::after {
|
||||
background: linear-gradient(135deg, transparent 50%, rgba(242, 234, 219, 0.09) 50%) !important;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="search"],
|
||||
.search-query,
|
||||
.form-control,
|
||||
textarea,
|
||||
select {
|
||||
background: var(--panel) !important;
|
||||
box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.32) !important;
|
||||
}
|
||||
|
||||
.warning,
|
||||
.caution,
|
||||
.danger {
|
||||
background: #3a2e19 !important;
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+5
-1
@@ -209,6 +209,8 @@
|
||||
{%- endif %}
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<meta name="theme-color" content="#eee5d3" media="(prefers-color-scheme: light)">
|
||||
<meta name="theme-color" content="#161514" media="(prefers-color-scheme: dark)">
|
||||
|
||||
{{ css() }}
|
||||
{%- if not embedded %}
|
||||
@@ -260,8 +262,9 @@
|
||||
<nav class="site-nav" aria-label="Primary">
|
||||
<a href="https://zoitechat.org/">Home</a>
|
||||
<a href="https://zoitechat.org/addons.php">Addons</a>
|
||||
<a href="https://zoitechat.org/announcements.php">Announcements</a>
|
||||
<a href="https://zoitechat.org/download.php">Download</a>
|
||||
<a href="{{ pathto(master_doc) }}">Docs</a>
|
||||
<a href="{{ pathto(master_doc) }}" aria-current="page">Docs</a>
|
||||
<a href="https://github.com/ZoiteChat/zoitechat" target="_blank" rel="noopener">GitHub</a>
|
||||
<details class="nav-menu">
|
||||
<summary>IRC Support</summary>
|
||||
@@ -336,6 +339,7 @@
|
||||
<div class="footer-links">
|
||||
<a href="https://zoitechat.org/download.php">Download</a>
|
||||
<a href="https://zoitechat.org/addons.php">Addons</a>
|
||||
<a href="https://zoitechat.org/announcements.php">Announcements</a>
|
||||
<a href="https://zoitechat.org/privacy.php">Privacy Policy</a>
|
||||
<a href="{{ pathto(master_doc) }}">Documentation</a>
|
||||
<a href="https://github.com/ZoiteChat/zoitechat" target="_blank" rel="noopener">Source code</a>
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
ZoiteChat ChangeLog
|
||||
=================
|
||||
|
||||
2.19.1 (2026-09-15)
|
||||
-------------------
|
||||
|
||||
- Fixed ``/msg`` messages showing twice on servers using IRCv3 ``echo-message``.
|
||||
- Fixed escaping a leading command slash so ``//text`` sends ``/text`` as normal chat.
|
||||
- Fixed automatic away clearing when sending messages on servers using ``echo-message``.
|
||||
- Fixed other users' away status not updating until rejoining a channel when ``away-notify`` updates are missed.
|
||||
- Fixed private messages and ``/me`` actions being routed to the wrong window when using WeeChat's IRC relay, while preserving channel ACTION routing.
|
||||
- Fixed a Flatpak startup error caused by the D-Bus service still using the old HexChat app ID.
|
||||
- Fixed optional Windows 10 theme downloads in the Windows installer.
|
||||
- Fixed the GTK warning when switching from channel tabs to the channel tree.
|
||||
- Fixed GTK3 theme archive root detection so themes with an ``index.theme`` file are preferred correctly.
|
||||
- Fixed source-build configuration when plugin AppStream metadata installation is disabled, and corrected the minimum Meson version to 0.59.
|
||||
|
||||
2.19.0 (2026-07-28)
|
||||
-------------------
|
||||
|
||||
|
||||
@@ -430,6 +430,8 @@ const struct prefs vars[] =
|
||||
{"gui_lang", P_OFFINT (hex_gui_lang), TYPE_INT},
|
||||
{"gui_mode_buttons", P_OFFINT (hex_gui_mode_buttons), TYPE_BOOL},
|
||||
{"gui_mode_buttons_inline", P_OFFINT (hex_gui_mode_buttons_inline), TYPE_BOOL},
|
||||
{"gui_onboarding_disable", P_OFFINT (hex_gui_onboarding_disable), TYPE_BOOL},
|
||||
{"gui_onboarding_pending", P_OFFINT (hex_gui_onboarding_pending), TYPE_BOOL},
|
||||
{"gui_pane_divider_position", P_OFFINT (hex_gui_pane_divider_position), TYPE_INT},
|
||||
{"gui_pane_left_size", P_OFFINT (hex_gui_pane_left_size), TYPE_INT},
|
||||
{"gui_pane_right_size", P_OFFINT (hex_gui_pane_right_size), TYPE_INT},
|
||||
@@ -443,6 +445,7 @@ const struct prefs vars[] =
|
||||
{"gui_tab_chans", P_OFFINT (hex_gui_tab_chans), TYPE_BOOL},
|
||||
{"gui_tab_dialogs", P_OFFINT (hex_gui_tab_dialogs), TYPE_BOOL},
|
||||
{"gui_tab_dots", P_OFFINT (hex_gui_tab_dots), TYPE_BOOL},
|
||||
{"gui_tab_font", P_OFFSET (hex_gui_tab_font), TYPE_STR},
|
||||
{"gui_tab_icons", P_OFFINT (hex_gui_tab_icons), TYPE_BOOL},
|
||||
{"gui_dark_mode", P_OFFINT (hex_gui_dark_mode), TYPE_INT},
|
||||
{"gui_gtk3_variant", P_OFFINT (hex_gui_gtk3_variant), TYPE_INT},
|
||||
|
||||
@@ -70,6 +70,9 @@ void fe_add_rawlog (struct server *serv, char *text, int len, int outbound);
|
||||
#define FE_MSG_ERROR 8
|
||||
#define FE_MSG_MARKUP 16
|
||||
void fe_message (char *msg, int flags);
|
||||
#ifdef __linux__
|
||||
void fe_root_warning (void);
|
||||
#endif
|
||||
#define FIA_READ 1
|
||||
#define FIA_WRITE 2
|
||||
#define FIA_EX 4
|
||||
|
||||
@@ -858,8 +858,10 @@ path_depth_from_root (const char *base, const char *path)
|
||||
static gint
|
||||
theme_root_candidate_compare (gconstpointer a, gconstpointer b)
|
||||
{
|
||||
const ThemeRootCandidate *ca = a;
|
||||
const ThemeRootCandidate *cb = b;
|
||||
/* g_ptr_array_sort() passes pointers to the array slots, not the values
|
||||
* stored in those slots. Dereference once before comparing candidates. */
|
||||
const ThemeRootCandidate *ca = *(ThemeRootCandidate * const *) a;
|
||||
const ThemeRootCandidate *cb = *(ThemeRootCandidate * const *) b;
|
||||
if (ca->has_index_theme != cb->has_index_theme)
|
||||
return ca->has_index_theme ? -1 : 1;
|
||||
if (ca->depth != cb->depth)
|
||||
|
||||
@@ -2826,6 +2826,7 @@ static gboolean
|
||||
client_tag_allowed (server *serv, const char *tag)
|
||||
{
|
||||
char **deny;
|
||||
gboolean blocked = FALSE;
|
||||
int i;
|
||||
|
||||
if (!serv->have_message_tags)
|
||||
@@ -2837,15 +2838,16 @@ client_tag_allowed (server *serv, const char *tag)
|
||||
deny = g_strsplit (serv->clienttagdeny, ",", 0);
|
||||
for (i = 0; deny[i]; i++)
|
||||
{
|
||||
if (!strcmp (deny[i], "*") || !strcmp (deny[i], tag) || (deny[i][0] == '+' && !strcmp (deny[i] + 1, tag)))
|
||||
{
|
||||
g_strfreev (deny);
|
||||
return FALSE;
|
||||
}
|
||||
if (!strcmp (deny[i], "*"))
|
||||
blocked = TRUE;
|
||||
else if (deny[i][0] == '-' && !strcmp (deny[i] + 1, tag))
|
||||
blocked = FALSE;
|
||||
else if (!strcmp (deny[i], tag) || (deny[i][0] == '+' && !strcmp (deny[i] + 1, tag)))
|
||||
blocked = TRUE;
|
||||
}
|
||||
|
||||
g_strfreev (deny);
|
||||
return TRUE;
|
||||
return !blocked;
|
||||
}
|
||||
|
||||
static char *
|
||||
|
||||
+16
-1
@@ -191,6 +191,8 @@ struct defaultserver
|
||||
gboolean ssl;
|
||||
};
|
||||
|
||||
static gboolean servlist_needs_onboarding_flag;
|
||||
|
||||
static const struct defaultserver def[] =
|
||||
{
|
||||
{"2600net", 0},
|
||||
@@ -1181,7 +1183,10 @@ servlist_load (void)
|
||||
|
||||
fp = zoitechat_fopen_file ("servlist.conf", "r", 0);
|
||||
if (!fp)
|
||||
{
|
||||
servlist_needs_onboarding_flag = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
while (fgets (buf, sizeof (buf) - 2, fp))
|
||||
{
|
||||
@@ -1245,6 +1250,7 @@ servlist_load (void)
|
||||
net = servlist_net_add (buf + 2, NULL, FALSE);
|
||||
}
|
||||
fclose (fp);
|
||||
servlist_needs_onboarding_flag = (network_list == NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1253,8 +1259,16 @@ void
|
||||
servlist_init (void)
|
||||
{
|
||||
if (!network_list)
|
||||
if (!servlist_load ())
|
||||
{
|
||||
if (!servlist_load () || !network_list)
|
||||
servlist_load_defaults ();
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
servlist_needs_onboarding (void)
|
||||
{
|
||||
return servlist_needs_onboarding_flag;
|
||||
}
|
||||
|
||||
/* check if a charset is known by Iconv */
|
||||
@@ -1395,6 +1409,7 @@ servlist_save (void)
|
||||
}
|
||||
|
||||
fclose (fp);
|
||||
servlist_needs_onboarding_flag = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ extern GSList *network_list;
|
||||
#define IRC_DEFAULT_CHARSET "UTF-8 (Unicode)"
|
||||
|
||||
void servlist_init (void);
|
||||
gboolean servlist_needs_onboarding (void);
|
||||
int servlist_save (void);
|
||||
int servlist_cycle (server *serv);
|
||||
void servlist_connect (session *sess, ircnet *net, gboolean join);
|
||||
|
||||
+21
-2
@@ -95,6 +95,7 @@ int zoitechat_is_quitting = FALSE;
|
||||
/* command-line args */
|
||||
int arg_dont_autoconnect = FALSE;
|
||||
int arg_skip_plugins = FALSE;
|
||||
gint arg_run_as_root = FALSE;
|
||||
char *arg_url = NULL;
|
||||
char **arg_urls = NULL;
|
||||
char *arg_command = NULL;
|
||||
@@ -463,7 +464,6 @@ doover:
|
||||
while (list)
|
||||
{
|
||||
sess = list->data;
|
||||
if (!sess->server->have_awaynotify)
|
||||
sess->done_away_check = FALSE;
|
||||
list = list->next;
|
||||
}
|
||||
@@ -1176,6 +1176,25 @@ main (int argc, char *argv[])
|
||||
HRESULT coinit_result;
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
if (strcmp (argv[i], "--") == 0)
|
||||
break;
|
||||
if (strcmp (argv[i], "--run-as-root") == 0)
|
||||
{
|
||||
arg_run_as_root = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (geteuid () == 0 && !arg_run_as_root)
|
||||
{
|
||||
fe_root_warning ();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
srand ((unsigned int) time (NULL)); /* CL: do this only once! */
|
||||
|
||||
/* We must check for the config dir parameter, otherwise load_config() will behave incorrectly.
|
||||
@@ -1264,7 +1283,7 @@ main (int argc, char *argv[])
|
||||
#ifndef WIN32
|
||||
#ifndef __EMX__
|
||||
/* OS/2 uses UID 0 all the time */
|
||||
if (getuid () == 0)
|
||||
if (getuid () == 0 && !arg_run_as_root)
|
||||
fe_message (_("* Running IRC as root is stupid! You should\n"
|
||||
" create a User Account and use that to login.\n"), FE_MSG_WARN|FE_MSG_WAIT);
|
||||
#endif
|
||||
|
||||
@@ -134,6 +134,8 @@ struct zoitechatprefs
|
||||
unsigned int hex_gui_join_dialog;
|
||||
unsigned int hex_gui_mode_buttons;
|
||||
unsigned int hex_gui_mode_buttons_inline;
|
||||
unsigned int hex_gui_onboarding_disable;
|
||||
unsigned int hex_gui_onboarding_pending;
|
||||
unsigned int hex_gui_quit_dialog;
|
||||
/* unsigned int hex_gui_single; */
|
||||
unsigned int hex_gui_slist_fav;
|
||||
@@ -315,6 +317,7 @@ struct zoitechatprefs
|
||||
char hex_dcc_completed_dir[PATHLEN + 1];
|
||||
char hex_dcc_dir[PATHLEN + 1];
|
||||
char hex_dcc_ip[DOMAINLEN + 1];
|
||||
char hex_gui_tab_font[FONTNAMELEN + 1];
|
||||
char hex_gui_ulist_doubleclick[256];
|
||||
char hex_input_command_char[4];
|
||||
char hex_irc_extra_hilight[300];
|
||||
@@ -449,6 +452,7 @@ typedef struct session
|
||||
int mode_timeout_tag;
|
||||
int typing_timeout_tag;
|
||||
int typing_status;
|
||||
gint64 typing_last_sent;
|
||||
int typing_animation_tag;
|
||||
int typing_animation_frame;
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ extern struct zoitechatprefs prefs;
|
||||
extern int zoitechat_is_quitting;
|
||||
extern gint arg_skip_plugins; /* command-line args */
|
||||
extern gint arg_dont_autoconnect;
|
||||
extern gint arg_run_as_root;
|
||||
extern char *arg_url;
|
||||
extern char **arg_urls;
|
||||
extern char *arg_command;
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
/* file included in chanview.c */
|
||||
|
||||
#include "theme/theme-css.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GtkWidget *outer; /* outer box */
|
||||
@@ -690,6 +692,7 @@ cv_tabs_add (chanview *cv, chan *ch, char *name, GtkTreeIter *parent)
|
||||
GtkWidget *label;
|
||||
GtkWidget *close_button;
|
||||
GtkWidget *close_icon;
|
||||
GtkCssProvider *close_css;
|
||||
|
||||
but = gtk_toggle_button_new ();
|
||||
gtk_widget_set_name (but, "zoitechat-tab");
|
||||
@@ -698,9 +701,27 @@ cv_tabs_add (chanview *cv, chan *ch, char *name, GtkTreeIter *parent)
|
||||
cv_add_scroll_events (but);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
||||
label = gtk_label_new (name);
|
||||
if (prefs.hex_gui_tab_font[0])
|
||||
{
|
||||
PangoFontDescription *font_desc;
|
||||
|
||||
/* Keep activity colours and the Smaller text scale in the label attributes. */
|
||||
font_desc = pango_font_description_from_string (prefs.hex_gui_tab_font);
|
||||
gtkutil_apply_palette (label, NULL, NULL, font_desc);
|
||||
pango_font_description_free (font_desc);
|
||||
}
|
||||
close_button = gtk_button_new ();
|
||||
cv_add_scroll_events (close_button);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (close_button), "flat");
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (close_button), "zoitechat-tab-close");
|
||||
/* Theme button minimums and padding must not determine the tab height. */
|
||||
close_css = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_data (close_css,
|
||||
".zoitechat-tab-close { min-width: 0; min-height: 0; padding: 1px; margin: 0; }",
|
||||
-1, NULL);
|
||||
theme_css_apply_widget_provider (close_button, GTK_STYLE_PROVIDER (close_css));
|
||||
g_object_unref (close_css);
|
||||
gtk_widget_set_valign (close_button, GTK_ALIGN_CENTER);
|
||||
close_icon = gtk_image_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_MENU);
|
||||
gtk_image_set_pixel_size (GTK_IMAGE (close_icon), 8);
|
||||
gtk_button_set_always_show_image (GTK_BUTTON (close_button), TRUE);
|
||||
|
||||
@@ -300,6 +300,14 @@ cv_tree_focus (chan *ch)
|
||||
|
||||
path = gtk_tree_model_get_path (model, &ch->iter);
|
||||
if (path)
|
||||
{
|
||||
if (!gtk_widget_get_realized (GTK_WIDGET (tree)))
|
||||
{
|
||||
/* Layout changes can restore focus before the new tree is realized.
|
||||
* Let GTK track the row and scroll once its geometry is available. */
|
||||
gtk_tree_view_scroll_to_cell (tree, path, NULL, TRUE, 0.5, 0.5);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* This full section does what
|
||||
* gtk_tree_view_scroll_to_cell (tree, path, NULL, TRUE, 0.5, 0.5);
|
||||
@@ -322,6 +330,7 @@ cv_tree_focus (chan *ch)
|
||||
dest_y = 0;
|
||||
gtk_tree_view_scroll_to_point (tree, -1, dest_y);
|
||||
}
|
||||
}
|
||||
/* theft done, now make it focused like */
|
||||
gtk_tree_view_set_cursor (tree, path, NULL, FALSE);
|
||||
gtk_tree_path_free (path);
|
||||
|
||||
@@ -90,6 +90,9 @@ static const GOptionEntry gopt_entries[] =
|
||||
{"no-auto", 'a', 0, G_OPTION_ARG_NONE, &arg_dont_autoconnect, N_("Don't auto connect to servers"), NULL},
|
||||
{"cfgdir", 'd', 0, G_OPTION_ARG_STRING, &arg_cfgdir, N_("Use a different config directory"), "PATH"},
|
||||
{"no-plugins", 'n', 0, G_OPTION_ARG_NONE, &arg_skip_plugins, N_("Don't auto load any plugins"), NULL},
|
||||
#ifdef __linux__
|
||||
{"run-as-root", 0, 0, G_OPTION_ARG_NONE, &arg_run_as_root, N_("Allow ZoiteChat to run as root (unsafe)"), NULL},
|
||||
#endif
|
||||
{"plugindir", 'p', 0, G_OPTION_ARG_NONE, &arg_show_autoload, N_("Show plugin/script auto-load directory"), NULL},
|
||||
{"configdir", 'u', 0, G_OPTION_ARG_NONE, &arg_show_config, N_("Show user config directory"), NULL},
|
||||
{"url", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &arg_url, N_("Open an irc://server:port/channel?key URL"), "URL"},
|
||||
@@ -103,6 +106,33 @@ static const GOptionEntry gopt_entries[] =
|
||||
{NULL}
|
||||
};
|
||||
|
||||
#ifdef __linux__
|
||||
void
|
||||
fe_root_warning (void)
|
||||
{
|
||||
const char *message =
|
||||
"ZoiteChat refuses to run as root on Linux.\n\n"
|
||||
"Run it as a normal user, or pass --run-as-root to override this protection.";
|
||||
GtkWidget *dialog;
|
||||
|
||||
g_printerr ("%s\n", message);
|
||||
|
||||
/* A graphical session may not be accessible to root, particularly under
|
||||
* Wayland. Keep stderr as the fallback if GTK cannot open the display. */
|
||||
if (!gtk_init_check (NULL, NULL))
|
||||
return;
|
||||
|
||||
dialog = gtk_message_dialog_new (NULL,
|
||||
GTK_DIALOG_MODAL,
|
||||
GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
"%s", message);
|
||||
gtk_window_set_title (GTK_WINDOW (dialog), "ZoiteChat");
|
||||
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
static void
|
||||
create_msg_dialog (gchar *title, gchar *message)
|
||||
|
||||
+26
-13
@@ -778,10 +778,13 @@ mg_inputbox_focus (GtkWidget *widget, GdkEventFocus *event, session_gui *gui)
|
||||
}
|
||||
|
||||
|
||||
#define TYPING_THROTTLE_USEC (3 * G_USEC_PER_SEC)
|
||||
|
||||
static gboolean
|
||||
mg_client_tag_allowed (server *serv, const char *tag)
|
||||
{
|
||||
char **deny;
|
||||
gboolean blocked = FALSE;
|
||||
int i;
|
||||
|
||||
if (!serv->have_message_tags)
|
||||
@@ -793,30 +796,42 @@ mg_client_tag_allowed (server *serv, const char *tag)
|
||||
deny = g_strsplit (serv->clienttagdeny, ",", 0);
|
||||
for (i = 0; deny[i]; i++)
|
||||
{
|
||||
if (!strcmp (deny[i], "*") || !strcmp (deny[i], tag) || (deny[i][0] == '+' && !strcmp (deny[i] + 1, tag)))
|
||||
{
|
||||
g_strfreev (deny);
|
||||
return FALSE;
|
||||
}
|
||||
if (!strcmp (deny[i], "*"))
|
||||
blocked = TRUE;
|
||||
else if (deny[i][0] == '-' && !strcmp (deny[i] + 1, tag))
|
||||
blocked = FALSE;
|
||||
else if (!strcmp (deny[i], tag) || (deny[i][0] == '+' && !strcmp (deny[i] + 1, tag)))
|
||||
blocked = TRUE;
|
||||
}
|
||||
|
||||
g_strfreev (deny);
|
||||
return TRUE;
|
||||
return !blocked;
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
mg_typing_can_send (session *sess)
|
||||
{
|
||||
gint64 now = g_get_monotonic_time ();
|
||||
|
||||
return sess->typing_last_sent == 0 ||
|
||||
now - sess->typing_last_sent >= TYPING_THROTTLE_USEC;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
mg_send_typing (session *sess, const char *state)
|
||||
{
|
||||
char tags[32];
|
||||
|
||||
if (!sess || !sess->server->connected || !mg_client_tag_allowed (sess->server, "typing") || !sess->channel[0])
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if (sess->type != SESS_CHANNEL && sess->type != SESS_DIALOG)
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
g_snprintf (tags, sizeof (tags), "+typing=%s", state);
|
||||
sess->server->p_tagmsg (sess->server, tags, sess->channel);
|
||||
sess->typing_last_sent = g_get_monotonic_time ();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -845,17 +860,15 @@ mg_typing_update (session *sess, const char *text)
|
||||
|
||||
if (!text || !*text || text[0] == prefs.hex_input_command_char[0])
|
||||
{
|
||||
if (sess->typing_status)
|
||||
if (sess->typing_status && mg_typing_can_send (sess))
|
||||
mg_send_typing (sess, "done");
|
||||
sess->typing_status = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (sess->typing_status != 1)
|
||||
{
|
||||
if (mg_typing_can_send (sess))
|
||||
mg_send_typing (sess, "active");
|
||||
sess->typing_status = 1;
|
||||
}
|
||||
sess->typing_timeout_tag = fe_timeout_add_seconds (6, mg_typing_pause_cb, sess);
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ zoitechat_gtk_ldflags = []
|
||||
if host_machine.system() == 'windows'
|
||||
zoitechat_gtk_sources += 'notifications/notification-windows.c'
|
||||
zoitechat_gtk_deps += cc.find_library('dwmapi', required: true)
|
||||
zoitechat_gtk_deps += cc.find_library('winhttp', required: true)
|
||||
zoitechat_theme_deps += cc.find_library('dwmapi', required: true)
|
||||
|
||||
else
|
||||
|
||||
+2828
-18
File diff suppressed because it is too large
Load Diff
@@ -340,6 +340,9 @@ static const setting tabs_settings[] =
|
||||
{ST_TOGGLE, N_("Show close button on tabs"), P_OFFINTNL(hex_gui_tab_closebuttons), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Middle click to close tab"), P_OFFINTNL(hex_gui_tab_middleclose), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Smaller text"), P_OFFINTNL(hex_gui_tab_small), 0, 0, 0},
|
||||
{ST_EFONT, N_("Tab font:"), P_OFFSETNL(hex_gui_tab_font),
|
||||
N_("Font for server and channel tabs in the Tabs layout. Leave blank to use the theme font. Smaller text still applies."),
|
||||
0, sizeof prefs.hex_gui_tab_font},
|
||||
{ST_MENU, N_("Focus new tabs:"), P_OFFINTNL(hex_gui_tab_newtofront), 0, focusnewtabsmenu, 0},
|
||||
{ST_MENU, N_("Placement of notices:"), P_OFFINTNL(hex_irc_notice_pos), 0, noticeposmenu, 0},
|
||||
{ST_MENU, N_("Show channel switcher at:"), P_OFFINTNL(hex_gui_tab_pos), 0, cspos, 1},
|
||||
@@ -645,6 +648,9 @@ static const char *const proxyuse[] =
|
||||
|
||||
static const setting network_settings[] =
|
||||
{
|
||||
{ST_HEADER, N_("Startup"), 0, 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Disable first-run assistant"), P_OFFINTNL(hex_gui_onboarding_disable), 0, 0, 0},
|
||||
|
||||
{ST_HEADER, N_("Your Address"), 0, 0, 0, 0},
|
||||
{ST_ENTRY, N_("Bind to:"), P_OFFSETNL(hex_net_bind_host), 0, 0, sizeof prefs.hex_net_bind_host},
|
||||
{ST_LABEL, N_("Only useful for computers with multiple addresses.")},
|
||||
@@ -2335,6 +2341,9 @@ setup_apply (struct zoitechatprefs *pr)
|
||||
if (DIFF (hex_gui_tab_icons) || DIFF (hex_gui_tab_closebuttons) ||
|
||||
DIFF (hex_gui_tab_small))
|
||||
live_changes.chanview = TRUE;
|
||||
if (pr->hex_gui_tab_layout == 0 &&
|
||||
strcmp (pr->hex_gui_tab_font, prefs.hex_gui_tab_font) != 0)
|
||||
live_changes.chanview = TRUE;
|
||||
if (DIFF (hex_gui_tab_sort))
|
||||
live_changes.tab_resort = TRUE;
|
||||
if (DIFF (hex_gui_tab_trunc))
|
||||
|
||||
@@ -1266,8 +1266,6 @@ attr_list_has_attrs (PangoAttrList *attrs)
|
||||
static void
|
||||
sexy_spell_entry_recheck_all(SexySpellEntry *entry)
|
||||
{
|
||||
GdkRectangle rect;
|
||||
GtkAllocation allocation;
|
||||
GtkWidget *widget = GTK_WIDGET(entry);
|
||||
int length, i, text_len;
|
||||
const char *text;
|
||||
@@ -1299,15 +1297,8 @@ sexy_spell_entry_recheck_all(SexySpellEntry *entry)
|
||||
|
||||
gtk_entry_set_attributes (GTK_ENTRY (entry), attr_list_has_attrs (entry->priv->attr_list) ? entry->priv->attr_list : NULL);
|
||||
|
||||
if (gtk_widget_get_realized (GTK_WIDGET(entry)))
|
||||
{
|
||||
gtk_widget_get_allocation (GTK_WIDGET(entry), &allocation);
|
||||
|
||||
rect.x = 0; rect.y = 0;
|
||||
rect.width = allocation.width;
|
||||
rect.height = allocation.height;
|
||||
gdk_window_invalidate_rect(gtk_widget_get_window (widget), &rect, TRUE);
|
||||
}
|
||||
/* GtkEntry shares its parent's GdkWindow in GTK3; redraw the widget area. */
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
||||
@@ -683,7 +683,7 @@ theme_manager_get_userlist_palette_behavior (const PangoFontDescription *font_de
|
||||
|
||||
behavior.font_desc = font_desc;
|
||||
behavior.apply_background = TRUE;
|
||||
behavior.apply_foreground = (prefs.hex_gui_ulist_color || prefs.hex_text_color_nicks) ? FALSE : TRUE;
|
||||
behavior.apply_foreground = prefs.hex_gui_ulist_color ? FALSE : TRUE;
|
||||
|
||||
return behavior;
|
||||
}
|
||||
|
||||
@@ -594,7 +594,7 @@ fe_userlist_rehash (session *sess, struct User *user)
|
||||
nick_token = THEME_TOKEN_TAB_AWAY;
|
||||
have_nick_token = TRUE;
|
||||
}
|
||||
else if (prefs.hex_gui_ulist_color || prefs.hex_text_color_nicks)
|
||||
else if (prefs.hex_gui_ulist_color)
|
||||
{
|
||||
int mirc_index = text_color_of (user->nick);
|
||||
|
||||
@@ -635,7 +635,7 @@ fe_userlist_insert (session *sess, struct User *newuser, gboolean sel)
|
||||
nick_token = THEME_TOKEN_TAB_AWAY;
|
||||
have_nick_token = TRUE;
|
||||
}
|
||||
else if (prefs.hex_gui_ulist_color || prefs.hex_text_color_nicks)
|
||||
else if (prefs.hex_gui_ulist_color)
|
||||
{
|
||||
int mirc_index = text_color_of (newuser->nick);
|
||||
|
||||
|
||||
+57
-3
@@ -273,6 +273,8 @@ static void gtk_xtext_render_page (GtkXText * xtext);
|
||||
static void gtk_xtext_calc_lines (xtext_buffer *buf, int);
|
||||
static gboolean gtk_xtext_is_selecting (GtkXText *xtext);
|
||||
static char *gtk_xtext_selection_get_text (GtkXText *xtext, int *len_ret);
|
||||
static void gtk_xtext_clipboard_get (GtkClipboard *, GtkSelectionData *, guint, gpointer);
|
||||
static void gtk_xtext_clipboard_clear (GtkClipboard *, gpointer);
|
||||
static textentry *gtk_xtext_nth (GtkXText *xtext, int line, int *subline);
|
||||
static void gtk_xtext_adjustment_changed (GtkAdjustment * adj,
|
||||
GtkXText * xtext);
|
||||
@@ -1082,9 +1084,29 @@ gtk_xtext_new (const XTextColor *palette, int separator)
|
||||
return GTK_WIDGET (xtext);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_xtext_release_selections (GtkXText *xtext)
|
||||
{
|
||||
GdkAtom selections[] = { GDK_SELECTION_PRIMARY, GDK_SELECTION_SECONDARY };
|
||||
guint i;
|
||||
|
||||
if (!gtk_widget_has_screen (GTK_WIDGET (xtext)))
|
||||
return;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (selections); i++)
|
||||
{
|
||||
GtkClipboard *clipboard = gtk_widget_get_clipboard (GTK_WIDGET (xtext), selections[i]);
|
||||
|
||||
if (gtk_clipboard_get_owner (clipboard) == G_OBJECT (xtext))
|
||||
gtk_clipboard_clear (clipboard);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_xtext_cleanup (GtkXText *xtext)
|
||||
{
|
||||
gtk_xtext_release_selections (xtext);
|
||||
|
||||
if (xtext->add_io_tag)
|
||||
{
|
||||
g_source_remove (xtext->add_io_tag);
|
||||
@@ -1179,6 +1201,7 @@ gtk_xtext_finalize (GObject *object)
|
||||
static void
|
||||
gtk_xtext_unrealize (GtkWidget * widget)
|
||||
{
|
||||
gtk_xtext_release_selections (GTK_XTEXT (widget));
|
||||
backend_deinit (GTK_XTEXT (widget));
|
||||
|
||||
/*
|
||||
@@ -2743,8 +2766,16 @@ gtk_xtext_set_clip_owner (GtkWidget * xtext, GdkEventButton * event)
|
||||
{
|
||||
gtk_clipboard_set_text (gtk_widget_get_clipboard (xtext, GDK_SELECTION_CLIPBOARD), str, len);
|
||||
|
||||
gtk_selection_owner_set (xtext, GDK_SELECTION_PRIMARY, event ? event->time : GDK_CURRENT_TIME);
|
||||
gtk_selection_owner_set (xtext, GDK_SELECTION_SECONDARY, event ? event->time : GDK_CURRENT_TIME);
|
||||
/* Let GtkClipboard own the X11 selection window. Making xtext
|
||||
* the selection owner forces its window native and bypasses
|
||||
* GTK's toplevel backing buffer on subsequent redraws.
|
||||
*/
|
||||
gtk_clipboard_set_with_owner (gtk_widget_get_clipboard (xtext, GDK_SELECTION_PRIMARY),
|
||||
gtk_xtext_selection_targets, G_N_ELEMENTS (gtk_xtext_selection_targets),
|
||||
gtk_xtext_clipboard_get, gtk_xtext_clipboard_clear, G_OBJECT (xtext));
|
||||
gtk_clipboard_set_with_owner (gtk_widget_get_clipboard (xtext, GDK_SELECTION_SECONDARY),
|
||||
gtk_xtext_selection_targets, G_N_ELEMENTS (gtk_xtext_selection_targets),
|
||||
gtk_xtext_clipboard_get, gtk_xtext_clipboard_clear, G_OBJECT (xtext));
|
||||
}
|
||||
|
||||
g_free (str);
|
||||
@@ -3172,7 +3203,7 @@ gtk_xtext_selection_get (GtkWidget * widget,
|
||||
if (!window || !GDK_IS_WINDOW (window))
|
||||
break;
|
||||
display = gdk_window_get_display (window);
|
||||
if (!display)
|
||||
if (!display || !GDK_IS_X11_DISPLAY (display))
|
||||
break;
|
||||
GdkAtom encoding;
|
||||
gint format;
|
||||
@@ -3197,6 +3228,29 @@ gtk_xtext_selection_get (GtkWidget * widget,
|
||||
g_free (stripped);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_xtext_clipboard_get (GtkClipboard *clipboard, GtkSelectionData *selection_data,
|
||||
guint info, gpointer owner)
|
||||
{
|
||||
int len;
|
||||
char *text = gtk_xtext_selection_get_text (GTK_XTEXT (owner), &len);
|
||||
|
||||
if (text)
|
||||
{
|
||||
gtk_selection_data_set_text (selection_data, text, len);
|
||||
g_free (text);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_xtext_clipboard_clear (GtkClipboard *clipboard, gpointer owner)
|
||||
{
|
||||
GtkXText *xtext = GTK_XTEXT (owner);
|
||||
|
||||
if (xtext->orig_buffer)
|
||||
gtk_xtext_selection_kill (xtext, NULL);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_xtext_scroll (GtkWidget *widget, GdkEventScroll *event)
|
||||
{
|
||||
|
||||
@@ -467,6 +467,9 @@ static const GOptionEntry gopt_entries[] =
|
||||
{"no-auto", 'a', 0, G_OPTION_ARG_NONE, &arg_dont_autoconnect, N_("Don't auto connect to servers"), NULL},
|
||||
{"cfgdir", 'd', 0, G_OPTION_ARG_STRING, &arg_cfgdir, N_("Use a different config directory"), "PATH"},
|
||||
{"no-plugins", 'n', 0, G_OPTION_ARG_NONE, &arg_skip_plugins, N_("Don't auto load any plugins"), NULL},
|
||||
#ifdef __linux__
|
||||
{"run-as-root", 0, 0, G_OPTION_ARG_NONE, &arg_run_as_root, N_("Allow ZoiteChat to run as root (unsafe)"), NULL},
|
||||
#endif
|
||||
{"plugindir", 'p', 0, G_OPTION_ARG_NONE, &arg_show_autoload, N_("Show plugin/script auto-load directory"), NULL},
|
||||
{"configdir", 'u', 0, G_OPTION_ARG_NONE, &arg_show_config, N_("Show user config directory"), NULL},
|
||||
{"url", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &arg_url, N_("Open an irc://server:port/channel URL"), "URL"},
|
||||
@@ -475,6 +478,16 @@ static const GOptionEntry gopt_entries[] =
|
||||
{NULL}
|
||||
};
|
||||
|
||||
#ifdef __linux__
|
||||
void
|
||||
fe_root_warning (void)
|
||||
{
|
||||
fputs ("ZoiteChat refuses to run as root on Linux.\n"
|
||||
"Run it as a normal user, or pass --run-as-root to override this protection.\n",
|
||||
stderr);
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
fe_args (int argc, char *argv[])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user