mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-23 14:00:21 +00:00
Compare commits
26 Commits
save-fixes
...
theme-fixe
| Author | SHA1 | Date | |
|---|---|---|---|
| 239ba62a9d | |||
| 33fce2af2a | |||
| d26fbb6e89 | |||
| cd93fe3b0e | |||
|
|
1208449322 | ||
| a11ec3a05b | |||
|
|
e39dfcf00c | ||
| 5f1e0fe7d8 | |||
|
|
57d0d92ecb | ||
| cf89d80765 | |||
|
|
758722ddeb | ||
| 182adba83c | |||
|
|
3c880216cf | ||
| e854153b88 | |||
| 416b8449b9 | |||
|
|
394de09cb1 | ||
| 5213669fbc | |||
| 8471e2feac | |||
|
|
dd53a92ecf | ||
| 0ff4c3608e | |||
|
|
909854ae12 | ||
| 725da0065b | |||
| c8801dd5d3 | |||
| 80c59795d7 | |||
| b1f74094f1 | |||
|
|
255089a0a5 |
@@ -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)
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "gtk3-theme-service.h"
|
#include "gtk3-theme-service.h"
|
||||||
|
|
||||||
#ifndef G_OS_WIN32
|
#ifndef G_OS_WIN32
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef ZOITECHAT_GTK3_THEME_SERVICE_H
|
#ifndef ZOITECHAT_GTK3_THEME_SERVICE_H
|
||||||
#define ZOITECHAT_GTK3_THEME_SERVICE_H
|
#define ZOITECHAT_GTK3_THEME_SERVICE_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "../zoitechat.h"
|
#include "../zoitechat.h"
|
||||||
#include "../gtk3-theme-service.h"
|
#include "../gtk3-theme-service.h"
|
||||||
#include "../cfgfiles.h"
|
#include "../cfgfiles.h"
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "zoitechat.h"
|
#include "zoitechat.h"
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef ZOITECHAT_THEME_SERVICE_H
|
#ifndef ZOITECHAT_THEME_SERVICE_H
|
||||||
#define ZOITECHAT_THEME_SERVICE_H
|
#define ZOITECHAT_THEME_SERVICE_H
|
||||||
|
|
||||||
|
|||||||
@@ -74,15 +74,11 @@ chanlistrow;
|
|||||||
|
|
||||||
#define GET_MODEL(xserv) (gtk_tree_view_get_model(GTK_TREE_VIEW(xserv->gui->chanlist_list)))
|
#define GET_MODEL(xserv) (gtk_tree_view_get_model(GTK_TREE_VIEW(xserv->gui->chanlist_list)))
|
||||||
|
|
||||||
#define CHANLIST_COL_WIDTH_MIN_CHANNEL 60
|
|
||||||
#define CHANLIST_COL_WIDTH_MIN_USERS 40
|
|
||||||
#define CHANLIST_COL_WIDTH_MIN_TOPIC 60
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
chanlist_clamp_width (int width, int min_width)
|
chanlist_normalize_width (int width)
|
||||||
{
|
{
|
||||||
if (width < min_width)
|
if (width < 1)
|
||||||
return min_width;
|
return 1;
|
||||||
|
|
||||||
return width;
|
return width;
|
||||||
}
|
}
|
||||||
@@ -823,17 +819,17 @@ chanlist_destroy_widget (GtkWidget *wid, server *serv)
|
|||||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (serv->gui->chanlist_list), COL_CHANNEL);
|
column = gtk_tree_view_get_column (GTK_TREE_VIEW (serv->gui->chanlist_list), COL_CHANNEL);
|
||||||
if (column)
|
if (column)
|
||||||
prefs.hex_gui_chanlist_width_channel =
|
prefs.hex_gui_chanlist_width_channel =
|
||||||
chanlist_clamp_width (gtk_tree_view_column_get_width (column), CHANLIST_COL_WIDTH_MIN_CHANNEL);
|
chanlist_normalize_width (gtk_tree_view_column_get_width (column));
|
||||||
|
|
||||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (serv->gui->chanlist_list), COL_USERS);
|
column = gtk_tree_view_get_column (GTK_TREE_VIEW (serv->gui->chanlist_list), COL_USERS);
|
||||||
if (column)
|
if (column)
|
||||||
prefs.hex_gui_chanlist_width_users =
|
prefs.hex_gui_chanlist_width_users =
|
||||||
chanlist_clamp_width (gtk_tree_view_column_get_width (column), CHANLIST_COL_WIDTH_MIN_USERS);
|
chanlist_normalize_width (gtk_tree_view_column_get_width (column));
|
||||||
|
|
||||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (serv->gui->chanlist_list), COL_TOPIC);
|
column = gtk_tree_view_get_column (GTK_TREE_VIEW (serv->gui->chanlist_list), COL_TOPIC);
|
||||||
if (column)
|
if (column)
|
||||||
prefs.hex_gui_chanlist_width_topic =
|
prefs.hex_gui_chanlist_width_topic =
|
||||||
chanlist_clamp_width (gtk_tree_view_column_get_width (column), CHANLIST_COL_WIDTH_MIN_TOPIC);
|
chanlist_normalize_width (gtk_tree_view_column_get_width (column));
|
||||||
|
|
||||||
if (!save_config ())
|
if (!save_config ())
|
||||||
fe_message (_("Could not save zoitechat.conf."), FE_MSG_WARN);
|
fe_message (_("Could not save zoitechat.conf."), FE_MSG_WARN);
|
||||||
@@ -983,7 +979,7 @@ chanlist_opengui (server *serv, int do_refresh)
|
|||||||
GtkTreeViewColumn *column = gtk_tree_view_get_column (GTK_TREE_VIEW (view), COL_CHANNEL);
|
GtkTreeViewColumn *column = gtk_tree_view_get_column (GTK_TREE_VIEW (view), COL_CHANNEL);
|
||||||
if (column)
|
if (column)
|
||||||
gtk_tree_view_column_set_fixed_width (column,
|
gtk_tree_view_column_set_fixed_width (column,
|
||||||
chanlist_clamp_width (prefs.hex_gui_chanlist_width_channel, CHANLIST_COL_WIDTH_MIN_CHANNEL));
|
chanlist_normalize_width (prefs.hex_gui_chanlist_width_channel));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prefs.hex_gui_chanlist_width_users > 0)
|
if (prefs.hex_gui_chanlist_width_users > 0)
|
||||||
@@ -993,7 +989,7 @@ chanlist_opengui (server *serv, int do_refresh)
|
|||||||
{
|
{
|
||||||
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_fixed_width (column,
|
gtk_tree_view_column_set_fixed_width (column,
|
||||||
chanlist_clamp_width (prefs.hex_gui_chanlist_width_users, CHANLIST_COL_WIDTH_MIN_USERS));
|
chanlist_normalize_width (prefs.hex_gui_chanlist_width_users));
|
||||||
gtk_tree_view_column_set_resizable (column, FALSE);
|
gtk_tree_view_column_set_resizable (column, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1005,7 +1001,7 @@ chanlist_opengui (server *serv, int do_refresh)
|
|||||||
{
|
{
|
||||||
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_fixed_width (column,
|
gtk_tree_view_column_set_fixed_width (column,
|
||||||
chanlist_clamp_width (prefs.hex_gui_chanlist_width_topic, CHANLIST_COL_WIDTH_MIN_TOPIC));
|
chanlist_normalize_width (prefs.hex_gui_chanlist_width_topic));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW (view), GTK_TREE_VIEW_GRID_LINES_HORIZONTAL);
|
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW (view), GTK_TREE_VIEW_GRID_LINES_HORIZONTAL);
|
||||||
|
|||||||
@@ -1120,7 +1120,9 @@ gtkutil_treeview_get_selected (GtkTreeView *view, GtkTreeIter *iter_ret, ...)
|
|||||||
gboolean
|
gboolean
|
||||||
gtkutil_tray_icon_supported (GtkWindow *window)
|
gtkutil_tray_icon_supported (GtkWindow *window)
|
||||||
{
|
{
|
||||||
#ifdef GDK_WINDOWING_X11
|
#if defined(HAVE_AYATANA_APPINDICATOR) || defined(HAVE_APPINDICATOR)
|
||||||
|
return TRUE;
|
||||||
|
#elif defined(GDK_WINDOWING_X11)
|
||||||
GdkScreen *screen = gtk_window_get_screen (window);
|
GdkScreen *screen = gtk_window_get_screen (window);
|
||||||
GdkDisplay *display = gdk_screen_get_display (screen);
|
GdkDisplay *display = gdk_screen_get_display (screen);
|
||||||
if (!GDK_IS_X11_DISPLAY (display))
|
if (!GDK_IS_X11_DISPLAY (display))
|
||||||
|
|||||||
@@ -2803,6 +2803,43 @@ mg_apply_entry_style (GtkWidget *entry)
|
|||||||
theme_manager_apply_entry_palette (entry, input_style->font_desc);
|
theme_manager_apply_entry_palette (entry, input_style->font_desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mg_apply_entry_scroll_artifact_fix (GtkWidget *entry)
|
||||||
|
{
|
||||||
|
GtkStyleContext *context;
|
||||||
|
GtkCssProvider *provider;
|
||||||
|
|
||||||
|
if (!entry || !GTK_IS_ENTRY (entry))
|
||||||
|
return;
|
||||||
|
|
||||||
|
context = gtk_widget_get_style_context (entry);
|
||||||
|
if (!context)
|
||||||
|
return;
|
||||||
|
|
||||||
|
provider = g_object_get_data (G_OBJECT (entry), "mg-entry-scroll-artifact-provider");
|
||||||
|
if (!provider)
|
||||||
|
{
|
||||||
|
provider = gtk_css_provider_new ();
|
||||||
|
g_object_set_data_full (G_OBJECT (entry), "mg-entry-scroll-artifact-provider", provider, g_object_unref);
|
||||||
|
gtk_css_provider_load_from_data (provider,
|
||||||
|
"entry.zoitechat-no-undershoot undershoot,\n"
|
||||||
|
"entry.zoitechat-no-undershoot undershoot.left,\n"
|
||||||
|
"entry.zoitechat-no-undershoot undershoot.right,\n"
|
||||||
|
".zoitechat-no-undershoot undershoot,\n"
|
||||||
|
".zoitechat-no-undershoot undershoot.left,\n"
|
||||||
|
".zoitechat-no-undershoot undershoot.right {\n"
|
||||||
|
" background-image: none;\n"
|
||||||
|
" background-color: transparent;\n"
|
||||||
|
" border: none;\n"
|
||||||
|
" box-shadow: none;\n"
|
||||||
|
"}\n",
|
||||||
|
-1, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
gtk_style_context_add_class (context, "zoitechat-no-undershoot");
|
||||||
|
theme_css_apply_widget_provider (entry, GTK_STYLE_PROVIDER (provider));
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
mg_entry_select_all (GtkWidget *entry, GdkEventKey *event, gpointer userdata)
|
mg_entry_select_all (GtkWidget *entry, GdkEventKey *event, gpointer userdata)
|
||||||
{
|
{
|
||||||
@@ -2842,6 +2879,7 @@ mg_create_chanmodebuttons (session_gui *gui, GtkWidget *box)
|
|||||||
|
|
||||||
if (prefs.hex_gui_input_style)
|
if (prefs.hex_gui_input_style)
|
||||||
mg_apply_entry_style (gui->key_entry);
|
mg_apply_entry_style (gui->key_entry);
|
||||||
|
mg_apply_entry_scroll_artifact_fix (gui->key_entry);
|
||||||
|
|
||||||
gui->flag_l = mg_create_flagbutton (_("User Limit"), box, "l");
|
gui->flag_l = mg_create_flagbutton (_("User Limit"), box, "l");
|
||||||
gui->limit_entry = gtk_entry_new ();
|
gui->limit_entry = gtk_entry_new ();
|
||||||
@@ -2858,6 +2896,7 @@ mg_create_chanmodebuttons (session_gui *gui, GtkWidget *box)
|
|||||||
|
|
||||||
if (prefs.hex_gui_input_style)
|
if (prefs.hex_gui_input_style)
|
||||||
mg_apply_entry_style (gui->limit_entry);
|
mg_apply_entry_style (gui->limit_entry);
|
||||||
|
mg_apply_entry_scroll_artifact_fix (gui->limit_entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*static void
|
/*static void
|
||||||
@@ -3376,6 +3415,23 @@ mg_rightpane_cb (GtkPaned *pane, GParamSpec *param, session_gui *gui)
|
|||||||
prefs.hex_gui_pane_right_size = allocation.width - gtk_paned_get_position (pane) - handle_size;
|
prefs.hex_gui_pane_right_size = allocation.width - gtk_paned_get_position (pane) - handle_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mg_restore_rightpane_cb (GtkWidget *widget, GtkAllocation *allocation, gpointer data)
|
||||||
|
{
|
||||||
|
int handle_size;
|
||||||
|
int saved_size;
|
||||||
|
/* only restore once, then disconnect */
|
||||||
|
g_signal_handlers_disconnect_by_func (widget, mg_restore_rightpane_cb, data);
|
||||||
|
/* use the value captured at connect time, since notify::position may
|
||||||
|
* have already overwritten prefs.hex_gui_pane_right_size during the
|
||||||
|
* initial layout pass */
|
||||||
|
saved_size = GPOINTER_TO_INT (data);
|
||||||
|
if (saved_size < 1)
|
||||||
|
return;
|
||||||
|
gtk_widget_style_get (widget, "handle-size", &handle_size, NULL);
|
||||||
|
gtk_paned_set_position (GTK_PANED (widget), allocation->width - saved_size - handle_size);
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
mg_add_pane_signals (session_gui *gui)
|
mg_add_pane_signals (session_gui *gui)
|
||||||
{
|
{
|
||||||
@@ -3409,6 +3465,13 @@ mg_create_center (session *sess, session_gui *gui, GtkWidget *box)
|
|||||||
/* sep between xtext and right side */
|
/* sep between xtext and right side */
|
||||||
gui->hpane_right = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
gui->hpane_right = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
|
||||||
|
/* restore right pane position after first allocation (needs widget width).
|
||||||
|
* capture the saved size now because notify::position will overwrite the
|
||||||
|
* pref during the initial layout before size-allocate fires. */
|
||||||
|
g_signal_connect (gui->hpane_right, "size-allocate",
|
||||||
|
G_CALLBACK (mg_restore_rightpane_cb),
|
||||||
|
GINT_TO_POINTER (prefs.hex_gui_pane_right_size));
|
||||||
|
|
||||||
if (prefs.hex_gui_win_swap)
|
if (prefs.hex_gui_win_swap)
|
||||||
{
|
{
|
||||||
gtk_paned_pack2 (GTK_PANED (gui->hpane_left), gui->vpane_left, FALSE, FALSE);
|
gtk_paned_pack2 (GTK_PANED (gui->hpane_left), gui->vpane_left, FALSE, FALSE);
|
||||||
@@ -3931,6 +3994,7 @@ mg_create_search(session *sess, GtkWidget *box)
|
|||||||
gtk_box_pack_start(GTK_BOX(gui->shbox), entry, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(gui->shbox), entry, FALSE, FALSE, 0);
|
||||||
gtk_widget_set_size_request (gui->shentry, 180, -1);
|
gtk_widget_set_size_request (gui->shentry, 180, -1);
|
||||||
mg_apply_emoji_fallback_widget (entry);
|
mg_apply_emoji_fallback_widget (entry);
|
||||||
|
mg_apply_entry_scroll_artifact_fix (entry);
|
||||||
gui->search_changed_signal = g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(search_handle_change), sess);
|
gui->search_changed_signal = g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(search_handle_change), sess);
|
||||||
g_signal_connect (G_OBJECT (entry), "key-press-event", G_CALLBACK (search_handle_esc), sess);
|
g_signal_connect (G_OBJECT (entry), "key-press-event", G_CALLBACK (search_handle_esc), sess);
|
||||||
g_signal_connect(G_OBJECT(entry), "activate", G_CALLBACK(mg_search_handle_next), sess);
|
g_signal_connect(G_OBJECT(entry), "activate", G_CALLBACK(mg_search_handle_next), sess);
|
||||||
@@ -4026,6 +4090,7 @@ mg_create_entry (session *sess, GtkWidget *box)
|
|||||||
|
|
||||||
if (prefs.hex_gui_input_style)
|
if (prefs.hex_gui_input_style)
|
||||||
mg_apply_entry_style (entry);
|
mg_apply_entry_style (entry);
|
||||||
|
mg_apply_entry_scroll_artifact_fix (entry);
|
||||||
|
|
||||||
g_object_set (G_OBJECT (entry), "show-emoji-icon", TRUE, NULL);
|
g_object_set (G_OBJECT (entry), "show-emoji-icon", TRUE, NULL);
|
||||||
|
|
||||||
@@ -4141,7 +4206,7 @@ mg_create_menu (session_gui *gui, GtkWidget *table, int away_state)
|
|||||||
gui->menu_item);
|
gui->menu_item);
|
||||||
gtk_widget_set_hexpand (gui->menu, TRUE);
|
gtk_widget_set_hexpand (gui->menu, TRUE);
|
||||||
gtk_widget_set_vexpand (gui->menu, FALSE);
|
gtk_widget_set_vexpand (gui->menu, FALSE);
|
||||||
gtk_widget_set_halign (gui->menu, GTK_ALIGN_FILL);
|
gtk_widget_set_halign (gui->menu, GTK_ALIGN_START);
|
||||||
gtk_widget_set_valign (gui->menu, GTK_ALIGN_FILL);
|
gtk_widget_set_valign (gui->menu, GTK_ALIGN_FILL);
|
||||||
gtk_grid_attach (GTK_GRID (table), gui->menu, 0, 0, 3, 1);
|
gtk_grid_attach (GTK_GRID (table), gui->menu, 0, 0, 3, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1879,6 +1879,21 @@ about_dialog_openurl (GtkAboutDialog *dialog, char *uri, gpointer data)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
about_dialog_add_links (GtkAboutDialog *dialog)
|
||||||
|
{
|
||||||
|
GtkWidget *content = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||||
|
GtkWidget *row = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||||
|
GtkWidget *website = gtk_link_button_new_with_label ("http://zoitechat.zoite.net", "Website");
|
||||||
|
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);
|
||||||
|
gtk_button_set_relief (GTK_BUTTON (license), GTK_RELIEF_NONE);
|
||||||
|
gtk_box_pack_start (GTK_BOX (row), website, FALSE, FALSE, 0);
|
||||||
|
gtk_box_pack_start (GTK_BOX (row), license, FALSE, FALSE, 0);
|
||||||
|
gtk_box_pack_start (GTK_BOX (content), row, FALSE, FALSE, 0);
|
||||||
|
gtk_widget_show_all (row);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
menu_about (GtkWidget *wid, gpointer sess)
|
menu_about (GtkWidget *wid, gpointer sess)
|
||||||
{
|
{
|
||||||
@@ -1899,12 +1914,14 @@ 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_license_type (GTK_ABOUT_DIALOG (dialog), GTK_LICENSE_GPL_2_0);
|
gtk_about_dialog_set_authors (dialog, NULL);
|
||||||
gtk_about_dialog_set_website (dialog, "http://zoitechat.zoite.net");
|
gtk_about_dialog_set_documenters (dialog, NULL);
|
||||||
gtk_about_dialog_set_website_label (dialog, "Website");
|
gtk_about_dialog_set_artists (dialog, NULL);
|
||||||
|
gtk_about_dialog_set_translator_credits (dialog, NULL);
|
||||||
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 2026 deepend");
|
||||||
gtk_about_dialog_set_comments (dialog, comment);
|
gtk_about_dialog_set_comments (dialog, comment);
|
||||||
|
about_dialog_add_links (dialog);
|
||||||
|
|
||||||
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);
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ if host_machine.system() != 'windows'
|
|||||||
if appindicator_dep.found()
|
if appindicator_dep.found()
|
||||||
zoitechat_gtk_deps += appindicator_dep
|
zoitechat_gtk_deps += appindicator_dep
|
||||||
zoitechat_gtk_cflags += '-DHAVE_APPINDICATOR'
|
zoitechat_gtk_cflags += '-DHAVE_APPINDICATOR'
|
||||||
elif appindicator_opt.enabled()
|
elif appindicator_opt.enabled() or (appindicator_opt.auto() and host_machine.system() == 'linux')
|
||||||
error('appindicator=enabled, but neither ayatana-appindicator3-0.1 nor appindicator3-0.1 was found')
|
error('tray support requires ayatana-appindicator3-0.1 or appindicator3-0.1 on Linux (use -Dappindicator=disabled to override)')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ static void tray_menu_notify_cb (GObject *tray, GParamSpec *pspec, gpointer user
|
|||||||
static void tray_update_toggle_item_label (void);
|
static void tray_update_toggle_item_label (void);
|
||||||
static gboolean tray_window_state_cb (GtkWidget *widget, GdkEventWindowState *event, gpointer userdata);
|
static gboolean tray_window_state_cb (GtkWidget *widget, GdkEventWindowState *event, gpointer userdata);
|
||||||
static void tray_window_visibility_cb (GtkWidget *widget, gpointer userdata);
|
static void tray_window_visibility_cb (GtkWidget *widget, gpointer userdata);
|
||||||
|
static void tray_toggle_item_destroy_cb (GtkWidget *widget, gpointer userdata);
|
||||||
#if HAVE_APPINDICATOR_BACKEND
|
#if HAVE_APPINDICATOR_BACKEND
|
||||||
static void tray_menu_show_cb (GtkWidget *menu, gpointer userdata) G_GNUC_UNUSED;
|
static void tray_menu_show_cb (GtkWidget *menu, gpointer userdata) G_GNUC_UNUSED;
|
||||||
#endif
|
#endif
|
||||||
@@ -364,8 +365,8 @@ tray_app_indicator_set_icon (TrayIcon icon)
|
|||||||
if (!icon_name)
|
if (!icon_name)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
app_indicator_set_icon_full (tray_indicator, icon_name, _(DISPLAY_NAME));
|
|
||||||
app_indicator_set_status (tray_indicator, APP_INDICATOR_STATUS_ACTIVE);
|
app_indicator_set_status (tray_indicator, APP_INDICATOR_STATUS_ACTIVE);
|
||||||
|
app_indicator_set_icon_full (tray_indicator, icon_name, _(DISPLAY_NAME));
|
||||||
|
|
||||||
g_free (icon_name_alloc);
|
g_free (icon_name_alloc);
|
||||||
}
|
}
|
||||||
@@ -408,7 +409,8 @@ tray_app_indicator_cleanup (void)
|
|||||||
|
|
||||||
if (tray_menu)
|
if (tray_menu)
|
||||||
{
|
{
|
||||||
gtk_widget_destroy (tray_menu);
|
if (GTK_IS_WIDGET (tray_menu))
|
||||||
|
gtk_widget_destroy (tray_menu);
|
||||||
tray_menu = NULL;
|
tray_menu = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -431,7 +433,6 @@ tray_app_indicator_init (void)
|
|||||||
g_signal_connect (G_OBJECT (tray_menu), "map",
|
g_signal_connect (G_OBJECT (tray_menu), "map",
|
||||||
G_CALLBACK (tray_menu_show_cb), NULL);
|
G_CALLBACK (tray_menu_show_cb), NULL);
|
||||||
app_indicator_set_menu (tray_indicator, GTK_MENU (tray_menu));
|
app_indicator_set_menu (tray_indicator, GTK_MENU (tray_menu));
|
||||||
app_indicator_set_status (tray_indicator, APP_INDICATOR_STATUS_ACTIVE);
|
|
||||||
|
|
||||||
klass = G_OBJECT_GET_CLASS (tray_indicator);
|
klass = G_OBJECT_GET_CLASS (tray_indicator);
|
||||||
if (klass && g_object_class_find_property (klass, "connected"))
|
if (klass && g_object_class_find_property (klass, "connected"))
|
||||||
@@ -1027,10 +1028,15 @@ blink_item (unsigned int *setting, GtkWidget *menu, char *label)
|
|||||||
static void
|
static void
|
||||||
tray_menu_destroy (GtkWidget *menu, gpointer userdata)
|
tray_menu_destroy (GtkWidget *menu, gpointer userdata)
|
||||||
{
|
{
|
||||||
(void)userdata;
|
GtkWidget **menu_ptr = userdata;
|
||||||
|
|
||||||
gtk_widget_destroy (menu);
|
if (menu_ptr && *menu_ptr == menu)
|
||||||
g_object_unref (menu);
|
*menu_ptr = NULL;
|
||||||
|
|
||||||
|
if (GTK_IS_WIDGET (menu))
|
||||||
|
gtk_widget_destroy (menu);
|
||||||
|
if (G_IS_OBJECT (menu))
|
||||||
|
g_object_unref (menu);
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
g_source_remove (tray_menu_timer);
|
g_source_remove (tray_menu_timer);
|
||||||
#endif
|
#endif
|
||||||
@@ -1090,6 +1096,8 @@ tray_menu_populate (GtkWidget *menu)
|
|||||||
zoitechat_set_context (ph, zoitechat_find_context (ph, NULL, NULL));
|
zoitechat_set_context (ph, zoitechat_find_context (ph, NULL, NULL));
|
||||||
|
|
||||||
tray_toggle_item = tray_make_item (menu, _("_Hide Window"), tray_menu_restore_cb, NULL);
|
tray_toggle_item = tray_make_item (menu, _("_Hide Window"), tray_menu_restore_cb, NULL);
|
||||||
|
g_signal_connect (G_OBJECT (tray_toggle_item), "destroy",
|
||||||
|
G_CALLBACK (tray_toggle_item_destroy_cb), NULL);
|
||||||
tray_update_toggle_item_label ();
|
tray_update_toggle_item_label ();
|
||||||
tray_make_item (menu, NULL, tray_menu_quit_cb, NULL);
|
tray_make_item (menu, NULL, tray_menu_quit_cb, NULL);
|
||||||
|
|
||||||
@@ -1130,12 +1138,22 @@ tray_menu_clear (GtkWidget *menu)
|
|||||||
|
|
||||||
children = gtk_container_get_children (GTK_CONTAINER (menu));
|
children = gtk_container_get_children (GTK_CONTAINER (menu));
|
||||||
for (iter = children; iter; iter = iter->next)
|
for (iter = children; iter; iter = iter->next)
|
||||||
gtk_widget_destroy (GTK_WIDGET (iter->data));
|
if (GTK_IS_WIDGET (iter->data))
|
||||||
|
gtk_widget_destroy (GTK_WIDGET (iter->data));
|
||||||
g_list_free (children);
|
g_list_free (children);
|
||||||
tray_toggle_item = NULL;
|
tray_toggle_item = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static void
|
||||||
|
tray_toggle_item_destroy_cb (GtkWidget *widget, gpointer userdata)
|
||||||
|
{
|
||||||
|
(void)userdata;
|
||||||
|
|
||||||
|
if (tray_toggle_item == widget)
|
||||||
|
tray_toggle_item = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tray_update_toggle_item_label (void)
|
tray_update_toggle_item_label (void)
|
||||||
{
|
{
|
||||||
@@ -1143,6 +1161,11 @@ tray_update_toggle_item_label (void)
|
|||||||
|
|
||||||
if (!tray_toggle_item)
|
if (!tray_toggle_item)
|
||||||
return;
|
return;
|
||||||
|
if (!GTK_IS_MENU_ITEM (tray_toggle_item))
|
||||||
|
{
|
||||||
|
tray_toggle_item = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (tray_get_window_status () == WS_HIDDEN)
|
if (tray_get_window_status () == WS_HIDDEN)
|
||||||
label = _("_Restore Window");
|
label = _("_Restore Window");
|
||||||
@@ -1195,10 +1218,9 @@ tray_menu_cb (GtkWidget *widget, guint button, guint time, gpointer userdata)
|
|||||||
(void)time;
|
(void)time;
|
||||||
(void)userdata;
|
(void)userdata;
|
||||||
|
|
||||||
/* close any old menu */
|
if (menu)
|
||||||
if (G_IS_OBJECT (menu))
|
|
||||||
{
|
{
|
||||||
tray_menu_destroy (menu, NULL);
|
tray_menu_destroy (menu, &menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
menu = gtk_menu_new ();
|
menu = gtk_menu_new ();
|
||||||
@@ -1208,8 +1230,9 @@ tray_menu_cb (GtkWidget *widget, guint button, guint time, gpointer userdata)
|
|||||||
g_object_ref (menu);
|
g_object_ref (menu);
|
||||||
g_object_ref_sink (menu);
|
g_object_ref_sink (menu);
|
||||||
g_object_unref (menu);
|
g_object_unref (menu);
|
||||||
|
g_object_add_weak_pointer (G_OBJECT (menu), (gpointer *)&menu);
|
||||||
g_signal_connect (G_OBJECT (menu), "selection-done",
|
g_signal_connect (G_OBJECT (menu), "selection-done",
|
||||||
G_CALLBACK (tray_menu_destroy), NULL);
|
G_CALLBACK (tray_menu_destroy), &menu);
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
g_signal_connect (G_OBJECT (menu), "leave-notify-event",
|
g_signal_connect (G_OBJECT (menu), "leave-notify-event",
|
||||||
G_CALLBACK (tray_menu_left_cb), NULL);
|
G_CALLBACK (tray_menu_left_cb), NULL);
|
||||||
@@ -1390,9 +1413,14 @@ tray_apply_setup (void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#if HAVE_APPINDICATOR_BACKEND
|
||||||
|
if (prefs.hex_gui_tray)
|
||||||
|
tray_init ();
|
||||||
|
#else
|
||||||
GtkWindow *window = GTK_WINDOW(zoitechat_get_info (ph, "gtkwin_ptr"));
|
GtkWindow *window = GTK_WINDOW(zoitechat_get_info (ph, "gtkwin_ptr"));
|
||||||
if (prefs.hex_gui_tray && gtkutil_tray_icon_supported (window))
|
if (prefs.hex_gui_tray && gtkutil_tray_icon_supported (window))
|
||||||
tray_init ();
|
tray_init ();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1439,7 +1467,11 @@ tray_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name,
|
|||||||
G_CALLBACK (tray_window_visibility_cb), NULL);
|
G_CALLBACK (tray_window_visibility_cb), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAVE_APPINDICATOR_BACKEND
|
||||||
|
if (prefs.hex_gui_tray)
|
||||||
|
#else
|
||||||
if (prefs.hex_gui_tray && gtkutil_tray_icon_supported (window))
|
if (prefs.hex_gui_tray && gtkutil_tray_icon_supported (window))
|
||||||
|
#endif
|
||||||
tray_init ();
|
tray_init ();
|
||||||
|
|
||||||
return 1; /* return 1 for success */
|
return 1; /* return 1 for success */
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "preferences-persistence.h"
|
#include "preferences-persistence.h"
|
||||||
|
|
||||||
#include "../common/cfgfiles.h"
|
#include "../common/cfgfiles.h"
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef ZOITECHAT_PREFERENCES_PERSISTENCE_H
|
#ifndef ZOITECHAT_PREFERENCES_PERSISTENCE_H
|
||||||
#define ZOITECHAT_PREFERENCES_PERSISTENCE_H
|
#define ZOITECHAT_PREFERENCES_PERSISTENCE_H
|
||||||
|
|
||||||
|
|||||||
@@ -1714,11 +1714,11 @@ setup_create_sound_page (void)
|
|||||||
|
|
||||||
vbox2 = gtkutil_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 0);
|
vbox2 = gtkutil_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 0);
|
||||||
gtk_widget_show (vbox2);
|
gtk_widget_show (vbox2);
|
||||||
gtk_container_add (GTK_CONTAINER (vbox1), vbox2);
|
gtk_box_pack_start (GTK_BOX (vbox1), vbox2, TRUE, TRUE, 0);
|
||||||
|
|
||||||
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
|
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
|
||||||
gtk_widget_show (scrolledwindow1);
|
gtk_widget_show (scrolledwindow1);
|
||||||
gtk_container_add (GTK_CONTAINER (vbox2), scrolledwindow1);
|
gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow1, TRUE, TRUE, 0);
|
||||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1),
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1),
|
||||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
|
GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
|
||||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow1),
|
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow1),
|
||||||
@@ -1793,7 +1793,7 @@ setup_add_page (const char *title, GtkWidget *book, GtkWidget *tab)
|
|||||||
gtk_widget_set_margin_bottom (label, 1);
|
gtk_widget_set_margin_bottom (label, 1);
|
||||||
gtk_box_pack_start (GTK_BOX (vvbox), label, FALSE, FALSE, 2);
|
gtk_box_pack_start (GTK_BOX (vvbox), label, FALSE, FALSE, 2);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (vvbox), tab);
|
gtk_box_pack_start (GTK_BOX (vvbox), tab, TRUE, TRUE, 0);
|
||||||
|
|
||||||
sw = GTK_SCROLLED_WINDOW(gtk_scrolled_window_new (NULL, NULL));
|
sw = GTK_SCROLLED_WINDOW(gtk_scrolled_window_new (NULL, NULL));
|
||||||
gtk_scrolled_window_set_shadow_type (sw, GTK_SHADOW_IN);
|
gtk_scrolled_window_set_shadow_type (sw, GTK_SHADOW_IN);
|
||||||
@@ -2197,8 +2197,8 @@ setup_ok_cb (GtkWidget *but, GtkWidget *win)
|
|||||||
char buffer[192];
|
char buffer[192];
|
||||||
|
|
||||||
memcpy (&old_prefs, &prefs, sizeof (prefs));
|
memcpy (&old_prefs, &prefs, sizeof (prefs));
|
||||||
theme_preferences_stage_apply ();
|
|
||||||
setup_apply (&setup_prefs);
|
setup_apply (&setup_prefs);
|
||||||
|
theme_preferences_stage_apply ();
|
||||||
save_result = preferences_persistence_save_all ();
|
save_result = preferences_persistence_save_all ();
|
||||||
if (save_result.success)
|
if (save_result.success)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "../../fe-gtk.h"
|
#include "../../fe-gtk.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "../../fe-gtk.h"
|
#include "../../fe-gtk.h"
|
||||||
|
|
||||||
#include "../theme-application.h"
|
#include "../theme-application.h"
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "../../../common/zoitechat.h"
|
#include "../../../common/zoitechat.h"
|
||||||
#include "../../../common/zoitechatc.h"
|
#include "../../../common/zoitechatc.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include "../theme-gtk3.h"
|
#include "../theme-gtk3.h"
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "../../fe-gtk.h"
|
#include "../../fe-gtk.h"
|
||||||
|
|
||||||
#include "../theme-manager.h"
|
#include "../theme-manager.h"
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "../../fe-gtk.h"
|
#include "../../fe-gtk.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "../../fe-gtk.h"
|
#include "../../fe-gtk.h"
|
||||||
|
|
||||||
#include "../theme-palette.h"
|
#include "../theme-palette.h"
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "../../fe-gtk.h"
|
#include "../../fe-gtk.h"
|
||||||
|
|
||||||
#include "../../../common/zoitechat.h"
|
#include "../../../common/zoitechat.h"
|
||||||
@@ -48,6 +68,16 @@ theme_get_color (ThemeSemanticToken token, GdkRGBA *color)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
theme_get_widget_style_values_for_widget (GtkWidget *widget, ThemeWidgetStyleValues *out_values)
|
||||||
|
{
|
||||||
|
(void)widget;
|
||||||
|
if (!out_values)
|
||||||
|
return;
|
||||||
|
gdk_rgba_parse (&out_values->foreground, "#111111");
|
||||||
|
gdk_rgba_parse (&out_values->background, "#f0f0f0");
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
theme_manager_set_token_color (unsigned int dark_mode, ThemeSemanticToken token, const GdkRGBA *color, gboolean *changed)
|
theme_manager_set_token_color (unsigned int dark_mode, ThemeSemanticToken token, const GdkRGBA *color, gboolean *changed)
|
||||||
{
|
{
|
||||||
@@ -72,6 +102,12 @@ theme_manager_save_preferences (void)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
theme_manager_dispatch_changed (ThemeChangedReason reasons)
|
||||||
|
{
|
||||||
|
(void)reasons;
|
||||||
|
}
|
||||||
|
|
||||||
ThemePaletteBehavior
|
ThemePaletteBehavior
|
||||||
theme_manager_get_userlist_palette_behavior (const PangoFontDescription *font_desc)
|
theme_manager_get_userlist_palette_behavior (const PangoFontDescription *font_desc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "../../../common/zoitechat.h"
|
#include "../../../common/zoitechat.h"
|
||||||
#include "../../../common/zoitechatc.h"
|
#include "../../../common/zoitechatc.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "theme-access.h"
|
#include "theme-access.h"
|
||||||
|
|
||||||
#include "theme-runtime.h"
|
#include "theme-runtime.h"
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef ZOITECHAT_THEME_ACCESS_H
|
#ifndef ZOITECHAT_THEME_ACCESS_H
|
||||||
#define ZOITECHAT_THEME_ACCESS_H
|
#define ZOITECHAT_THEME_ACCESS_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "theme-application.h"
|
#include "theme-application.h"
|
||||||
|
|
||||||
#include "../../common/fe.h"
|
#include "../../common/fe.h"
|
||||||
@@ -6,16 +26,29 @@
|
|||||||
#include "theme-runtime.h"
|
#include "theme-runtime.h"
|
||||||
#include "theme-gtk3.h"
|
#include "theme-gtk3.h"
|
||||||
#include "../maingui.h"
|
#include "../maingui.h"
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
|
extern char *theme_css_build_toplevel_classes (void) __attribute__ ((weak));
|
||||||
|
#else
|
||||||
|
extern char *theme_css_build_toplevel_classes (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static char *
|
||||||
|
theme_application_build_toplevel_css (void)
|
||||||
|
{
|
||||||
|
if (theme_css_build_toplevel_classes)
|
||||||
|
return theme_css_build_toplevel_classes ();
|
||||||
|
|
||||||
|
return g_strdup ("");
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
theme_application_apply_windows_theme (gboolean dark)
|
theme_application_apply_toplevel_theme (gboolean dark)
|
||||||
{
|
{
|
||||||
GtkSettings *settings = gtk_settings_get_default ();
|
GtkSettings *settings = gtk_settings_get_default ();
|
||||||
static GtkCssProvider *win_theme_provider = NULL;
|
static GtkCssProvider *theme_provider = NULL;
|
||||||
static gboolean win_theme_provider_installed = FALSE;
|
static gboolean theme_provider_installed = FALSE;
|
||||||
GdkScreen *screen;
|
GdkScreen *screen;
|
||||||
gboolean prefer_dark = dark;
|
gboolean prefer_dark = dark;
|
||||||
char *css;
|
char *css;
|
||||||
@@ -36,33 +69,21 @@ theme_application_apply_windows_theme (gboolean dark)
|
|||||||
if (!screen)
|
if (!screen)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (theme_gtk3_is_active ())
|
if (!theme_provider)
|
||||||
{
|
theme_provider = gtk_css_provider_new ();
|
||||||
if (win_theme_provider_installed && win_theme_provider)
|
|
||||||
{
|
|
||||||
gtk_style_context_remove_provider_for_screen (screen,
|
|
||||||
GTK_STYLE_PROVIDER (win_theme_provider));
|
|
||||||
win_theme_provider_installed = FALSE;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!win_theme_provider)
|
css = theme_application_build_toplevel_css ();
|
||||||
win_theme_provider = gtk_css_provider_new ();
|
gtk_css_provider_load_from_data (theme_provider, css, -1, NULL);
|
||||||
|
|
||||||
css = theme_css_build_toplevel_classes ();
|
|
||||||
gtk_css_provider_load_from_data (win_theme_provider, css, -1, NULL);
|
|
||||||
g_free (css);
|
g_free (css);
|
||||||
|
|
||||||
if (!win_theme_provider_installed)
|
if (!theme_provider_installed)
|
||||||
{
|
{
|
||||||
gtk_style_context_add_provider_for_screen (screen,
|
gtk_style_context_add_provider_for_screen (screen,
|
||||||
GTK_STYLE_PROVIDER (win_theme_provider),
|
GTK_STYLE_PROVIDER (theme_provider),
|
||||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION + 1);
|
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION + 1);
|
||||||
win_theme_provider_installed = TRUE;
|
theme_provider_installed = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
theme_application_apply_mode (unsigned int mode, gboolean *palette_changed)
|
theme_application_apply_mode (unsigned int mode, gboolean *palette_changed)
|
||||||
@@ -71,10 +92,7 @@ theme_application_apply_mode (unsigned int mode, gboolean *palette_changed)
|
|||||||
|
|
||||||
theme_runtime_load ();
|
theme_runtime_load ();
|
||||||
dark = theme_runtime_apply_mode (mode, palette_changed);
|
dark = theme_runtime_apply_mode (mode, palette_changed);
|
||||||
|
theme_application_apply_toplevel_theme (dark);
|
||||||
#ifdef G_OS_WIN32
|
|
||||||
theme_application_apply_windows_theme (dark);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
theme_application_reload_input_style ();
|
theme_application_reload_input_style ();
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef ZOITECHAT_THEME_APPLICATION_H
|
#ifndef ZOITECHAT_THEME_APPLICATION_H
|
||||||
#define ZOITECHAT_THEME_APPLICATION_H
|
#define ZOITECHAT_THEME_APPLICATION_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "theme-css.h"
|
#include "theme-css.h"
|
||||||
|
|
||||||
#include "theme-runtime.h"
|
#include "theme-runtime.h"
|
||||||
@@ -341,20 +361,22 @@ theme_css_build_toplevel_classes (void)
|
|||||||
"color: #f0f0f0;"
|
"color: #f0f0f0;"
|
||||||
"border-color: #202020;"
|
"border-color: #202020;"
|
||||||
"}"
|
"}"
|
||||||
"window.%s menubar, window.%s menubar:backdrop, window.%s menuitem, window.%s menuitem:backdrop {"
|
"window.%s menubar, window.%s menubar:backdrop, window.%s menubar box, window.%s menubar box:backdrop, window.%s menuitem, window.%s menuitem:backdrop {"
|
||||||
"background-color: #202020;"
|
"background-color: @theme_bg_color;"
|
||||||
"color: #f0f0f0;"
|
"background-image: none;"
|
||||||
"border-color: #202020;"
|
"color: @theme_fg_color;"
|
||||||
|
"border-color: @theme_bg_color;"
|
||||||
"}"
|
"}"
|
||||||
"window.%s, window.%s:backdrop, .%s {"
|
"window.%s, window.%s:backdrop, .%s {"
|
||||||
"background-color: #f6f6f6;"
|
"background-color: #f6f6f6;"
|
||||||
"color: #101010;"
|
"color: #101010;"
|
||||||
"border-color: #f6f6f6;"
|
"border-color: #f6f6f6;"
|
||||||
"}"
|
"}"
|
||||||
"window.%s menubar, window.%s menubar:backdrop, window.%s menuitem, window.%s menuitem:backdrop {"
|
"window.%s menubar, window.%s menubar:backdrop, window.%s menubar box, window.%s menubar box:backdrop, window.%s menuitem, window.%s menuitem:backdrop {"
|
||||||
"background-color: #f6f6f6;"
|
"background-color: @theme_bg_color;"
|
||||||
"color: #101010;"
|
"background-image: none;"
|
||||||
"border-color: #f6f6f6;"
|
"color: @theme_fg_color;"
|
||||||
|
"border-color: @theme_bg_color;"
|
||||||
"}",
|
"}",
|
||||||
theme_css_selector_dark_class,
|
theme_css_selector_dark_class,
|
||||||
theme_css_selector_dark_class,
|
theme_css_selector_dark_class,
|
||||||
@@ -363,6 +385,10 @@ theme_css_build_toplevel_classes (void)
|
|||||||
theme_css_selector_dark_class,
|
theme_css_selector_dark_class,
|
||||||
theme_css_selector_dark_class,
|
theme_css_selector_dark_class,
|
||||||
theme_css_selector_dark_class,
|
theme_css_selector_dark_class,
|
||||||
|
theme_css_selector_dark_class,
|
||||||
|
theme_css_selector_dark_class,
|
||||||
|
theme_css_selector_light_class,
|
||||||
|
theme_css_selector_light_class,
|
||||||
theme_css_selector_light_class,
|
theme_css_selector_light_class,
|
||||||
theme_css_selector_light_class,
|
theme_css_selector_light_class,
|
||||||
theme_css_selector_light_class,
|
theme_css_selector_light_class,
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef ZOITECHAT_THEME_CSS_H
|
#ifndef ZOITECHAT_THEME_CSS_H
|
||||||
#define ZOITECHAT_THEME_CSS_H
|
#define ZOITECHAT_THEME_CSS_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "theme-gtk3.h"
|
#include "theme-gtk3.h"
|
||||||
|
|
||||||
#include "../../common/zoitechat.h"
|
#include "../../common/zoitechat.h"
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef ZOITECHAT_THEME_GTK3_H
|
#ifndef ZOITECHAT_THEME_GTK3_H
|
||||||
#define ZOITECHAT_THEME_GTK3_H
|
#define ZOITECHAT_THEME_GTK3_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "../fe-gtk.h"
|
#include "../fe-gtk.h"
|
||||||
#include "theme-manager.h"
|
#include "theme-manager.h"
|
||||||
|
|
||||||
@@ -196,8 +216,6 @@ theme_manager_queue_auto_refresh (GtkSettings *settings, GParamSpec *pspec, gpoi
|
|||||||
void
|
void
|
||||||
theme_manager_init (void)
|
theme_manager_init (void)
|
||||||
{
|
{
|
||||||
GtkSettings *settings;
|
|
||||||
|
|
||||||
if (!theme_manager_listeners)
|
if (!theme_manager_listeners)
|
||||||
theme_manager_listeners = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL,
|
theme_manager_listeners = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL,
|
||||||
theme_listener_free);
|
theme_listener_free);
|
||||||
@@ -205,21 +223,10 @@ theme_manager_init (void)
|
|||||||
if (!theme_manager_setup_listener_id)
|
if (!theme_manager_setup_listener_id)
|
||||||
theme_manager_setup_listener_id = theme_listener_register ("setup.apply", theme_manager_setup_apply_listener, NULL);
|
theme_manager_setup_listener_id = theme_listener_register ("setup.apply", theme_manager_setup_apply_listener, NULL);
|
||||||
|
|
||||||
settings = gtk_settings_get_default ();
|
fe_set_auto_dark_mode_state (FALSE);
|
||||||
if (settings)
|
|
||||||
fe_set_auto_dark_mode_state (theme_policy_system_prefers_dark ());
|
|
||||||
|
|
||||||
theme_application_apply_mode (prefs.hex_gui_dark_mode, NULL);
|
theme_application_apply_mode (prefs.hex_gui_dark_mode, NULL);
|
||||||
theme_gtk3_init ();
|
theme_gtk3_init ();
|
||||||
zoitechat_set_theme_post_apply_callback (theme_manager_handle_theme_applied);
|
zoitechat_set_theme_post_apply_callback (theme_manager_handle_theme_applied);
|
||||||
|
|
||||||
if (settings)
|
|
||||||
{
|
|
||||||
g_signal_connect (settings, "notify::gtk-application-prefer-dark-theme",
|
|
||||||
G_CALLBACK (theme_manager_queue_auto_refresh), NULL);
|
|
||||||
g_signal_connect (settings, "notify::gtk-theme-name",
|
|
||||||
G_CALLBACK (theme_manager_queue_auto_refresh), NULL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
@@ -474,7 +481,6 @@ theme_manager_apply_wayland_kde_csd (GtkWidget *window)
|
|||||||
static void
|
static void
|
||||||
theme_manager_apply_platform_window_theme (GtkWidget *window)
|
theme_manager_apply_platform_window_theme (GtkWidget *window)
|
||||||
{
|
{
|
||||||
#ifdef G_OS_WIN32
|
|
||||||
GtkStyleContext *context;
|
GtkStyleContext *context;
|
||||||
gboolean dark;
|
gboolean dark;
|
||||||
|
|
||||||
@@ -496,6 +502,7 @@ theme_manager_apply_platform_window_theme (GtkWidget *window)
|
|||||||
gtk_style_context_remove_class (context, "zoitechat-light");
|
gtk_style_context_remove_class (context, "zoitechat-light");
|
||||||
gtk_style_context_add_class (context, dark ? "zoitechat-dark" : "zoitechat-light");
|
gtk_style_context_add_class (context, dark ? "zoitechat-dark" : "zoitechat-light");
|
||||||
}
|
}
|
||||||
|
#ifdef G_OS_WIN32
|
||||||
fe_win32_apply_native_titlebar (window, dark);
|
fe_win32_apply_native_titlebar (window, dark);
|
||||||
#else
|
#else
|
||||||
theme_manager_apply_wayland_kde_csd (window);
|
theme_manager_apply_wayland_kde_csd (window);
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef ZOITECHAT_THEME_MANAGER_H
|
#ifndef ZOITECHAT_THEME_MANAGER_H
|
||||||
#define ZOITECHAT_THEME_MANAGER_H
|
#define ZOITECHAT_THEME_MANAGER_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "theme-palette.h"
|
#include "theme-palette.h"
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef ZOITECHAT_THEME_PALETTE_H
|
#ifndef ZOITECHAT_THEME_PALETTE_H
|
||||||
#define ZOITECHAT_THEME_PALETTE_H
|
#define ZOITECHAT_THEME_PALETTE_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "theme-policy.h"
|
#include "theme-policy.h"
|
||||||
|
|
||||||
#include "../fe-gtk.h"
|
#include "../fe-gtk.h"
|
||||||
@@ -7,38 +27,7 @@
|
|||||||
gboolean
|
gboolean
|
||||||
theme_policy_system_prefers_dark (void)
|
theme_policy_system_prefers_dark (void)
|
||||||
{
|
{
|
||||||
GtkSettings *settings = gtk_settings_get_default ();
|
return FALSE;
|
||||||
gboolean prefer_dark = FALSE;
|
|
||||||
char *theme_name = NULL;
|
|
||||||
#ifdef G_OS_WIN32
|
|
||||||
gboolean have_win_pref = FALSE;
|
|
||||||
|
|
||||||
if (fe_win32_high_contrast_is_enabled ())
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
have_win_pref = fe_win32_try_get_system_dark (&prefer_dark);
|
|
||||||
if (!have_win_pref)
|
|
||||||
#endif
|
|
||||||
if (settings && g_object_class_find_property (G_OBJECT_GET_CLASS (settings),
|
|
||||||
"gtk-application-prefer-dark-theme"))
|
|
||||||
{
|
|
||||||
g_object_get (settings, "gtk-application-prefer-dark-theme", &prefer_dark, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (settings && !prefer_dark)
|
|
||||||
{
|
|
||||||
g_object_get (settings, "gtk-theme-name", &theme_name, NULL);
|
|
||||||
if (theme_name)
|
|
||||||
{
|
|
||||||
char *lower = g_ascii_strdown (theme_name, -1);
|
|
||||||
if (g_str_has_suffix (lower, "-dark") || g_strrstr (lower, "dark"))
|
|
||||||
prefer_dark = TRUE;
|
|
||||||
g_free (lower);
|
|
||||||
g_free (theme_name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return prefer_dark;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef ZOITECHAT_THEME_POLICY_H
|
#ifndef ZOITECHAT_THEME_POLICY_H
|
||||||
#define ZOITECHAT_THEME_POLICY_H
|
#define ZOITECHAT_THEME_POLICY_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -703,6 +723,7 @@ theme_preferences_manager_dialog_response_cb (GtkDialog *dialog, gint response_i
|
|||||||
if (theme_preferences_stage.active)
|
if (theme_preferences_stage.active)
|
||||||
{
|
{
|
||||||
ThemeSemanticToken token;
|
ThemeSemanticToken token;
|
||||||
|
ThemeWidgetStyleValues style_values;
|
||||||
|
|
||||||
for (token = THEME_TOKEN_MIRC_0; token < THEME_TOKEN_COUNT; token++)
|
for (token = THEME_TOKEN_MIRC_0; token < THEME_TOKEN_COUNT; token++)
|
||||||
{
|
{
|
||||||
@@ -713,6 +734,12 @@ theme_preferences_manager_dialog_response_cb (GtkDialog *dialog, gint response_i
|
|||||||
theme_preferences_stage.staged[token] = rgba;
|
theme_preferences_stage.staged[token] = rgba;
|
||||||
theme_preferences_stage.staged_valid[token] = TRUE;
|
theme_preferences_stage.staged_valid[token] = TRUE;
|
||||||
}
|
}
|
||||||
|
theme_get_widget_style_values_for_widget (GTK_WIDGET (dialog), &style_values);
|
||||||
|
theme_preferences_stage.staged[THEME_TOKEN_TEXT_FOREGROUND] = style_values.foreground;
|
||||||
|
theme_preferences_stage.staged_valid[THEME_TOKEN_TEXT_FOREGROUND] = TRUE;
|
||||||
|
theme_preferences_stage.staged[THEME_TOKEN_TEXT_BACKGROUND] = style_values.background;
|
||||||
|
theme_preferences_stage.staged_valid[THEME_TOKEN_TEXT_BACKGROUND] = TRUE;
|
||||||
|
theme_preferences_stage_sync_runtime_to_staged ();
|
||||||
theme_preferences_stage_recompute_changed ();
|
theme_preferences_stage_recompute_changed ();
|
||||||
if (ui->color_change_flag)
|
if (ui->color_change_flag)
|
||||||
*ui->color_change_flag = theme_preferences_stage.changed;
|
*ui->color_change_flag = theme_preferences_stage.changed;
|
||||||
@@ -1323,6 +1350,19 @@ theme_preferences_gtk3_sync_remove_state (theme_preferences_ui *ui)
|
|||||||
gtk_widget_set_sensitive (ui->gtk3_remove, source == ZOITECHAT_GTK3_THEME_SOURCE_USER);
|
gtk_widget_set_sensitive (ui->gtk3_remove, source == ZOITECHAT_GTK3_THEME_SOURCE_USER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
theme_preferences_gtk3_apply_and_refresh (GError **error)
|
||||||
|
{
|
||||||
|
if (!theme_gtk3_apply_current (error))
|
||||||
|
return FALSE;
|
||||||
|
theme_manager_dispatch_changed (THEME_CHANGED_REASON_THEME_PACK |
|
||||||
|
THEME_CHANGED_REASON_PALETTE |
|
||||||
|
THEME_CHANGED_REASON_WIDGET_STYLE |
|
||||||
|
THEME_CHANGED_REASON_USERLIST |
|
||||||
|
THEME_CHANGED_REASON_MODE);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
theme_preferences_gtk3_changed_cb (GtkComboBox *combo, gpointer user_data)
|
theme_preferences_gtk3_changed_cb (GtkComboBox *combo, gpointer user_data)
|
||||||
{
|
{
|
||||||
@@ -1353,7 +1393,7 @@ theme_preferences_gtk3_changed_cb (GtkComboBox *combo, gpointer user_data)
|
|||||||
ui->setup_prefs->hex_gui_gtk3_variant = prefs.hex_gui_gtk3_variant;
|
ui->setup_prefs->hex_gui_gtk3_variant = prefs.hex_gui_gtk3_variant;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selection_changed && !theme_gtk3_apply_current (&error))
|
if (selection_changed && !theme_preferences_gtk3_apply_and_refresh (&error))
|
||||||
{
|
{
|
||||||
theme_preferences_show_message (ui, GTK_MESSAGE_ERROR,
|
theme_preferences_show_message (ui, GTK_MESSAGE_ERROR,
|
||||||
error ? error->message : _("Failed to apply GTK3 theme."));
|
error ? error->message : _("Failed to apply GTK3 theme."));
|
||||||
@@ -1530,7 +1570,7 @@ theme_preferences_populate_gtk3 (theme_preferences_ui *ui)
|
|||||||
g_free (final_id);
|
g_free (final_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (should_apply && !theme_gtk3_apply_current (&error))
|
if (should_apply && !theme_preferences_gtk3_apply_and_refresh (&error))
|
||||||
{
|
{
|
||||||
theme_preferences_show_message (ui, GTK_MESSAGE_ERROR,
|
theme_preferences_show_message (ui, GTK_MESSAGE_ERROR,
|
||||||
error ? error->message : _("Failed to apply GTK3 theme."));
|
error ? error->message : _("Failed to apply GTK3 theme."));
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef ZOITECHAT_THEME_PREFERENCES_H
|
#ifndef ZOITECHAT_THEME_PREFERENCES_H
|
||||||
#define ZOITECHAT_THEME_PREFERENCES_H
|
#define ZOITECHAT_THEME_PREFERENCES_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* ZoiteChat
|
||||||
|
* Copyright (C) 1998-2010 Peter Zelezny.
|
||||||
|
* Copyright (C) 2009-2013 Berke Viktor.
|
||||||
|
* Copyright (C) 2026 deepend-tildeclub.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef ZOITECHAT_THEME_RUNTIME_H
|
#ifndef ZOITECHAT_THEME_RUNTIME_H
|
||||||
#define ZOITECHAT_THEME_RUNTIME_H
|
#define ZOITECHAT_THEME_RUNTIME_H
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ Name: "langs"; Description: "Language Interfaces"; Types: custom; Flags: disable
|
|||||||
Name: "langs\lua"; Description: "Lua"; Types: normal custom; Flags: disablenouninstallwarning
|
Name: "langs\lua"; Description: "Lua"; Types: normal custom; Flags: disablenouninstallwarning
|
||||||
Name: "langs\perl"; Description: "Perl (requires Perl 5.42)"; Types: custom; Flags: disablenouninstallwarning
|
Name: "langs\perl"; Description: "Perl (requires Perl 5.42)"; Types: custom; Flags: disablenouninstallwarning
|
||||||
Name: "langs\python"; Description: "Python (requires Python 3.14.3)"; Types: custom; Flags: disablenouninstallwarning
|
Name: "langs\python"; Description: "Python (requires Python 3.14.3)"; Types: custom; Flags: disablenouninstallwarning
|
||||||
|
Name: "deps"; Description: "Dependencies"; Types: custom; Flags: disablenouninstallwarning
|
||||||
|
Name: "deps\vcredist2015"; Description: "Visual C++ Redistributable 2015"; Types: normal minimal custom; Flags: disablenouninstallwarning
|
||||||
|
|
||||||
[Tasks]
|
[Tasks]
|
||||||
Name: portable; Description: "Yes"; GroupDescription: "Portable Mode: Stores configuration files within install directory for portable drives."; Flags: unchecked
|
Name: portable; Description: "Yes"; GroupDescription: "Portable Mode: Stores configuration files within install directory for portable drives."; Flags: unchecked
|
||||||
@@ -81,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"; Flags: skipifdoesntexist; Tasks: not portable
|
Filename: "{tmp}\vcredist.exe"; Parameters: "/install /quiet /norestart"; StatusMsg: "Installing Visual C++ Redistributable"; Components: deps\vcredist2015; Flags: skipifdoesntexist; 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
|
||||||
@@ -196,6 +198,13 @@ BeveledLabel= {#APPNAM}
|
|||||||
|
|
||||||
[Code]
|
[Code]
|
||||||
#ifndef USE_INNO_DOWNLOAD_PLUGIN
|
#ifndef USE_INNO_DOWNLOAD_PLUGIN
|
||||||
|
var
|
||||||
|
FallbackDownloadUrls: array of String;
|
||||||
|
FallbackDownloadFiles: array of String;
|
||||||
|
|
||||||
|
function URLDownloadToFile(Caller: Integer; URL: String; FileName: String; Reserved: Integer; StatusCB: Integer): Integer;
|
||||||
|
external 'URLDownloadToFileW@urlmon.dll stdcall delayload';
|
||||||
|
|
||||||
// The Inno Download Plugin isn't always installed in CI environments.
|
// The Inno Download Plugin isn't always installed in CI environments.
|
||||||
// Provide no-op fallback procedures so installer compilation still succeeds.
|
// Provide no-op fallback procedures so installer compilation still succeeds.
|
||||||
procedure idpDownloadAfter(PageID: Integer);
|
procedure idpDownloadAfter(PageID: Integer);
|
||||||
@@ -204,10 +213,40 @@ end;
|
|||||||
|
|
||||||
procedure idpClearFiles;
|
procedure idpClearFiles;
|
||||||
begin
|
begin
|
||||||
|
SetArrayLength(FallbackDownloadUrls, 0);
|
||||||
|
SetArrayLength(FallbackDownloadFiles, 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure idpAddFile(URL: String; Filename: String);
|
procedure idpAddFile(URL: String; Filename: String);
|
||||||
|
var
|
||||||
|
I: Integer;
|
||||||
begin
|
begin
|
||||||
|
I := GetArrayLength(FallbackDownloadUrls);
|
||||||
|
SetArrayLength(FallbackDownloadUrls, I + 1);
|
||||||
|
SetArrayLength(FallbackDownloadFiles, I + 1);
|
||||||
|
FallbackDownloadUrls[I] := URL;
|
||||||
|
FallbackDownloadFiles[I] := Filename;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function idpDownloadQueuedFiles(): Boolean;
|
||||||
|
var
|
||||||
|
I: Integer;
|
||||||
|
ResultCode: Integer;
|
||||||
|
begin
|
||||||
|
Result := True;
|
||||||
|
for I := 0 to GetArrayLength(FallbackDownloadUrls) - 1 do
|
||||||
|
begin
|
||||||
|
if not FileExists(FallbackDownloadFiles[I]) then
|
||||||
|
begin
|
||||||
|
ResultCode := URLDownloadToFile(0, FallbackDownloadUrls[I], FallbackDownloadFiles[I], 0, 0);
|
||||||
|
if ResultCode <> 0 then
|
||||||
|
begin
|
||||||
|
MsgBox('Unable to download required installer dependency:' + #13#10 + FallbackDownloadUrls[I], mbError, MB_OK);
|
||||||
|
Result := False;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -239,8 +278,30 @@ end;
|
|||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
function CheckVCInstall(): Boolean;
|
function CheckVCInstall(): Boolean;
|
||||||
|
var
|
||||||
|
Installed: Cardinal;
|
||||||
begin
|
begin
|
||||||
Result := FileExists(GetSysDir() + 'vcruntime140.dll');;
|
Result := False;
|
||||||
|
if RegQueryDWordValue(HKLM64, 'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64', 'Installed', Installed) then
|
||||||
|
Result := Installed = 1
|
||||||
|
else if RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64', 'Installed', Installed) then
|
||||||
|
Result := Installed = 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure UpdateVCRedistComponentState;
|
||||||
|
var
|
||||||
|
I: Integer;
|
||||||
|
Installed: Boolean;
|
||||||
|
begin
|
||||||
|
Installed := CheckVCInstall();
|
||||||
|
for I := 0 to WizardForm.ComponentsList.Items.Count - 1 do
|
||||||
|
begin
|
||||||
|
if WizardForm.ComponentsList.ItemCaption[I] = 'Visual C++ Redistributable 2015' then
|
||||||
|
begin
|
||||||
|
WizardForm.ComponentsList.Checked[I] := not Installed;
|
||||||
|
WizardForm.ComponentsList.ItemEnabled[I] := not Installed;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@@ -268,6 +329,9 @@ var
|
|||||||
PY3: String;
|
PY3: String;
|
||||||
SPELL: String;
|
SPELL: String;
|
||||||
begin
|
begin
|
||||||
|
if (CurPageID = wpSelectComponents) then
|
||||||
|
UpdateVCRedistComponentState();
|
||||||
|
|
||||||
if(CurPageID = wpReady) then
|
if(CurPageID = wpReady) then
|
||||||
begin
|
begin
|
||||||
idpClearFiles;
|
idpClearFiles;
|
||||||
@@ -275,12 +339,12 @@ begin
|
|||||||
if not IsTaskSelected('portable') then
|
if not IsTaskSelected('portable') then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
REDIST := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/vcredist_2015_x64.exe';
|
REDIST := 'https://github.com/ZoiteChat/gvsbuild/releases/download/zoitechat-2.18.0-pre4/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';
|
||||||
|
|
||||||
if not CheckVCInstall() then
|
if IsComponentSelected('deps\vcredist2015') and not CheckVCInstall() then
|
||||||
idpAddFile(REDIST, ExpandConstant('{tmp}\vcredist.exe'));
|
idpAddFile(REDIST, ExpandConstant('{tmp}\vcredist.exe'));
|
||||||
|
|
||||||
if IsComponentSelected('spell') and not CheckSpellInstall() then
|
if IsComponentSelected('spell') and not CheckSpellInstall() then
|
||||||
@@ -305,6 +369,17 @@ end;
|
|||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
function NextButtonClick(CurPageID: Integer): Boolean;
|
function NextButtonClick(CurPageID: Integer): Boolean;
|
||||||
begin
|
begin
|
||||||
|
Result := True;
|
||||||
|
|
||||||
|
#ifndef USE_INNO_DOWNLOAD_PLUGIN
|
||||||
|
if CurPageID = wpReady then
|
||||||
|
if not idpDownloadQueuedFiles() then
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (CurPageID = wpSelectTasks) then
|
if (CurPageID = wpSelectTasks) then
|
||||||
if (WizardForm.TasksList.Checked[1] = True) then
|
if (WizardForm.TasksList.Checked[1] = True) then
|
||||||
if (WizardDirValue() = ExpandConstant('{pf64}\ZoiteChat')) then
|
if (WizardDirValue() = ExpandConstant('{pf64}\ZoiteChat')) then
|
||||||
@@ -312,8 +387,6 @@ 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;
|
||||||
|
|
||||||
Result := True; // Always continue
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.18.0~pre4
|
2.18.0~pre5
|
||||||
|
|||||||
Reference in New Issue
Block a user