mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-07-17 08:59:25 +00:00
Compare commits
9 Commits
cacc8fcafe
...
56ac55806d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56ac55806d | ||
| 47f53c14db | |||
| a47d40b914 | |||
| be33ae30bb | |||
| 6d5f1306bf | |||
| ad3dc716e7 | |||
|
|
089b125a89 | ||
| dfd4554a11 | |||
| 1b98297881 |
@@ -1,6 +1,24 @@
|
||||
ZoiteChat ChangeLog
|
||||
=================
|
||||
|
||||
2.18.2 (2026-06-20)
|
||||
-------------------
|
||||
|
||||
- Improved security and connection handling with stronger TLS defaults,
|
||||
safer certificate/hostname validation, FiSHLiM OpenSSL fixes, keyring support,
|
||||
and getaddrinfo-based DCC lookups.
|
||||
- Expanded FiSHLiM usability with a GTK key manager, context-menu access, and clearer
|
||||
channel/private-message key handling.
|
||||
- Improved keyboard and navigation behavior with customizable keybinds, reset support,
|
||||
channel-name switching, /server -noproxy, and configurable stale-link ping checks.
|
||||
- Refined the GTK interface with native file chooser dialogs, topic layout preferences,
|
||||
timestamp/date hover tooltips, better restore-down relayout, text scroll speed controls,
|
||||
and aligned network meters.
|
||||
- Added privacy and display options, including hiding join/part hostmasks and improved
|
||||
topic/multiline mode layout controls.
|
||||
- Fixed several platform/UI edge cases, including tray restore from iconified state, DBus unload
|
||||
handling, GTK3 theme refresh/saving, and tab switcher compatibility.
|
||||
|
||||
2.18.1 (2026-05-21)
|
||||
-------------------
|
||||
|
||||
|
||||
@@ -29,6 +29,29 @@
|
||||
<id>zoitechat.desktop</id>
|
||||
</provides>
|
||||
<releases>
|
||||
<release date="2026-06-20" version="2.18.2">
|
||||
<description>
|
||||
<p>Security and connections:</p>
|
||||
<ul>
|
||||
<li>Improved TLS, certificate and hostname validation, FiSHLiM OpenSSL handling, keyring support, and DCC host lookups.</li>
|
||||
</ul>
|
||||
<p>FiSHLiM:</p>
|
||||
<ul>
|
||||
<li>Added a GTK key manager with context-menu access and clearer channel/private-message key handling.</li>
|
||||
</ul>
|
||||
<p>Interface and preferences:</p>
|
||||
<ul>
|
||||
<li>Improved keybind customization, reset support, channel-name switching, <code>/server -noproxy</code>, and stale-link ping checks.</li>
|
||||
<li>Refined GTK behavior with native file choosers, topic layout preferences, timestamp/date tooltips, text scroll controls, and aligned network meters.</li>
|
||||
<li>Added privacy and display options for hiding join/part hostmasks and controlling topic/multiline layout.</li>
|
||||
</ul>
|
||||
<p>Fixes:</p>
|
||||
<ul>
|
||||
<li>Fixed tray restore, DBus unload handling, GTK3 theme refresh/saving, topic relayout, and tab switcher compatibility.</li>
|
||||
<li>Updated project documentation.</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release date="2026-05-21" version="2.18.1">
|
||||
<description>
|
||||
<ul>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
project('zoitechat', 'c',
|
||||
version: '2.18.1',
|
||||
version: '2.18.2',
|
||||
meson_version: '>= 0.55.0',
|
||||
default_options: [
|
||||
'c_std=c17',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Name: zoitechat
|
||||
Version: 2.18.1
|
||||
Version: 2.18.2
|
||||
Release: %autorelease
|
||||
Summary: HexChat-based IRC client
|
||||
License: GPL-2.0-or-later WITH cryptsetup-OpenSSL-exception
|
||||
@@ -74,7 +74,6 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/net.zoite
|
||||
xwfb-run -- /usr/bin/meson test -C %{_vpath_builddir} --num-processes %{_smp_build_ncpus} --print-errorlogs \
|
||||
"Theme Manager Dispatch Routing Tests" \
|
||||
"Validate net.zoite.Zoitechat.desktop" \
|
||||
"Theme GTK3 Settings Tests" \
|
||||
"Validate translations" \
|
||||
"Fishlim Tests"
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ else:
|
||||
if not hasattr(sys, 'argv'):
|
||||
sys.argv = ['<zoitechat>']
|
||||
|
||||
VERSION = b'2.18.1'
|
||||
VERSION = b'2.18.2'
|
||||
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_VERSION = ffi.new('char[]', VERSION)
|
||||
|
||||
@@ -428,6 +428,7 @@ const struct prefs vars[] =
|
||||
{"gui_lagometer", P_OFFINT (hex_gui_lagometer), TYPE_INT},
|
||||
{"gui_lang", P_OFFINT (hex_gui_lang), TYPE_INT},
|
||||
{"gui_mode_buttons", P_OFFINT (hex_gui_mode_buttons), TYPE_BOOL},
|
||||
{"gui_mode_buttons_inline", P_OFFINT (hex_gui_mode_buttons_inline), TYPE_BOOL},
|
||||
{"gui_pane_divider_position", P_OFFINT (hex_gui_pane_divider_position), TYPE_INT},
|
||||
{"gui_pane_left_size", P_OFFINT (hex_gui_pane_left_size), TYPE_INT},
|
||||
{"gui_pane_right_size", P_OFFINT (hex_gui_pane_right_size), TYPE_INT},
|
||||
@@ -458,6 +459,7 @@ const struct prefs vars[] =
|
||||
{"gui_tab_utils", P_OFFINT (hex_gui_tab_utils), TYPE_BOOL},
|
||||
{"gui_throttlemeter", P_OFFINT (hex_gui_throttlemeter), TYPE_INT},
|
||||
{"gui_topicbar", P_OFFINT (hex_gui_topicbar), TYPE_BOOL},
|
||||
{"gui_topicbar_multiline", P_OFFINT (hex_gui_topicbar_multiline), TYPE_BOOL},
|
||||
{"gui_transparency", P_OFFINT (hex_gui_transparency), TYPE_INT},
|
||||
{"gui_tray", P_OFFINT (hex_gui_tray), TYPE_BOOL},
|
||||
{"gui_tray_away", P_OFFINT (hex_gui_tray_away), TYPE_BOOL},
|
||||
@@ -791,6 +793,7 @@ load_default_config(void)
|
||||
prefs.hex_gui_tab_scrollchans = 1;
|
||||
prefs.hex_gui_mouse_scroll_speed = 10;
|
||||
prefs.hex_gui_topicbar = 1;
|
||||
prefs.hex_gui_topicbar_multiline = 1;
|
||||
prefs.hex_gui_transparency = 255;
|
||||
prefs.hex_gui_tray = 1;
|
||||
prefs.hex_gui_tray_blink = 1;
|
||||
|
||||
@@ -350,14 +350,13 @@ _SSL_close (SSL * ssl)
|
||||
{
|
||||
SSL_set_shutdown (ssl, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN);
|
||||
SSL_free (ssl);
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#ifdef HAVE_ERR_REMOVE_THREAD_STATE
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L && OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
/* OpenSSL handles this itself in 1.1+ and this is a no-op */
|
||||
ERR_remove_thread_state (NULL);
|
||||
#endif
|
||||
#else
|
||||
ERR_remove_state (0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Hostname validation code based on OpenBSD's libtls. */
|
||||
|
||||
@@ -133,6 +133,7 @@ struct zoitechatprefs
|
||||
unsigned int hex_gui_input_style;
|
||||
unsigned int hex_gui_join_dialog;
|
||||
unsigned int hex_gui_mode_buttons;
|
||||
unsigned int hex_gui_mode_buttons_inline;
|
||||
unsigned int hex_gui_quit_dialog;
|
||||
/* unsigned int hex_gui_single; */
|
||||
unsigned int hex_gui_slist_fav;
|
||||
@@ -148,6 +149,7 @@ struct zoitechatprefs
|
||||
unsigned int hex_gui_tab_sort;
|
||||
unsigned int hex_gui_tab_utils;
|
||||
unsigned int hex_gui_topicbar;
|
||||
unsigned int hex_gui_topicbar_multiline;
|
||||
unsigned int hex_gui_tray;
|
||||
unsigned int hex_gui_tray_away;
|
||||
unsigned int hex_gui_tray_blink;
|
||||
|
||||
@@ -812,18 +812,19 @@ fe_set_topic (session *sess, char *topic, char *stripped_topic)
|
||||
{
|
||||
if (!sess->gui->is_tab || sess == current_tab)
|
||||
{
|
||||
GtkTextBuffer *topic_buffer;
|
||||
GtkTextIter start;
|
||||
|
||||
topic_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (sess->gui->topic_entry));
|
||||
if (prefs.hex_text_stripcolor_topic)
|
||||
{
|
||||
gtk_text_buffer_set_text (
|
||||
gtk_text_view_get_buffer (GTK_TEXT_VIEW (sess->gui->topic_entry)),
|
||||
stripped_topic, -1);
|
||||
}
|
||||
gtk_text_buffer_set_text (topic_buffer, stripped_topic, -1);
|
||||
else
|
||||
{
|
||||
gtk_text_buffer_set_text (
|
||||
gtk_text_view_get_buffer (GTK_TEXT_VIEW (sess->gui->topic_entry)),
|
||||
topic, -1);
|
||||
}
|
||||
gtk_text_buffer_set_text (topic_buffer, topic, -1);
|
||||
|
||||
gtk_text_buffer_get_start_iter (topic_buffer, &start);
|
||||
gtk_text_buffer_place_cursor (topic_buffer, &start);
|
||||
gtk_text_view_scroll_to_iter (GTK_TEXT_VIEW (sess->gui->topic_entry),
|
||||
&start, 0.0, FALSE, 0.0, 0.0);
|
||||
mg_set_topic_tip (sess);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -3042,7 +3042,7 @@ mg_create_chanmodebuttons (session_gui *gui, GtkWidget *box)
|
||||
gui->key_entry = gtk_entry_new ();
|
||||
gtk_widget_set_name (gui->key_entry, "zoitechat-inputbox");
|
||||
gtk_entry_set_max_length (GTK_ENTRY (gui->key_entry), 23);
|
||||
gtk_widget_set_size_request (gui->key_entry, 115, 11);
|
||||
gtk_widget_set_size_request (gui->key_entry, 58, 11);
|
||||
gtk_box_pack_start (GTK_BOX (box), gui->key_entry, 0, 0, 0);
|
||||
mg_apply_emoji_fallback_widget (gui->key_entry);
|
||||
mg_apply_compact_mode_css (gui->key_entry);
|
||||
@@ -3059,7 +3059,8 @@ mg_create_chanmodebuttons (session_gui *gui, GtkWidget *box)
|
||||
gui->limit_entry = gtk_entry_new ();
|
||||
gtk_widget_set_name (gui->limit_entry, "zoitechat-inputbox");
|
||||
gtk_entry_set_max_length (GTK_ENTRY (gui->limit_entry), 10);
|
||||
gtk_widget_set_size_request (gui->limit_entry, 30, 11);
|
||||
gtk_entry_set_width_chars (GTK_ENTRY (gui->limit_entry), 5);
|
||||
gtk_widget_set_size_request (gui->limit_entry, 45, 11);
|
||||
gtk_box_pack_start (GTK_BOX (box), gui->limit_entry, 0, 0, 0);
|
||||
mg_apply_emoji_fallback_widget (gui->limit_entry);
|
||||
mg_apply_compact_mode_css (gui->limit_entry);
|
||||
@@ -3193,8 +3194,11 @@ mg_topicbar_update_height (GtkWidget *topic)
|
||||
width -= margin_left + margin_right;
|
||||
if (width < 1)
|
||||
width = 1;
|
||||
if (prefs.hex_gui_topicbar_multiline && !prefs.hex_gui_mode_buttons_inline)
|
||||
{
|
||||
pango_layout_set_width (layout, width * PANGO_SCALE);
|
||||
pango_layout_set_wrap (layout, PANGO_WRAP_WORD_CHAR);
|
||||
}
|
||||
|
||||
context = gtk_widget_get_pango_context (topic);
|
||||
metrics = pango_context_get_metrics (context,
|
||||
@@ -3206,7 +3210,8 @@ mg_topicbar_update_height (GtkWidget *topic)
|
||||
if (line_height <= 0)
|
||||
line_height = 16;
|
||||
|
||||
line_count = pango_layout_get_line_count (layout);
|
||||
line_count = prefs.hex_gui_topicbar_multiline && !prefs.hex_gui_mode_buttons_inline ?
|
||||
pango_layout_get_line_count (layout) : 1;
|
||||
if (line_count <= 0)
|
||||
line_count = 1;
|
||||
|
||||
@@ -3328,7 +3333,7 @@ mg_apply_session_font_prefs (session_gui *gui)
|
||||
static void
|
||||
mg_create_topicbar (session *sess, GtkWidget *box)
|
||||
{
|
||||
GtkWidget *vbox, *hbox, *mode_hbox, *topic, *bbox;
|
||||
GtkWidget *vbox, *hbox, *mode_hbox, *topic, *topic_scroll, *bbox;
|
||||
session_gui *gui = sess->gui;
|
||||
|
||||
gui->topic_bar = vbox = mg_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 0);
|
||||
@@ -3342,7 +3347,9 @@ mg_create_topicbar (session *sess, GtkWidget *box)
|
||||
|
||||
gui->topic_entry = topic = gtk_text_view_new ();
|
||||
gtk_widget_set_name (topic, "zoitechat-topicbox");
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (topic), GTK_WRAP_WORD_CHAR);
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (topic),
|
||||
prefs.hex_gui_topicbar_multiline && !prefs.hex_gui_mode_buttons_inline ?
|
||||
GTK_WRAP_WORD_CHAR : GTK_WRAP_NONE);
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (topic), 4);
|
||||
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (topic), 4);
|
||||
gtk_text_view_set_top_margin (GTK_TEXT_VIEW (topic), 4);
|
||||
@@ -3355,8 +3362,17 @@ mg_create_topicbar (session *sess, GtkWidget *box)
|
||||
G_CALLBACK (mg_topicbar_buffer_changed_cb), topic);
|
||||
g_signal_connect (G_OBJECT (topic), "size-allocate",
|
||||
G_CALLBACK (mg_topicbar_size_allocate_cb), NULL);
|
||||
topic_scroll = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_widget_set_hexpand (topic_scroll, TRUE);
|
||||
gtk_widget_set_size_request (topic_scroll, 1, -1);
|
||||
gtk_widget_set_size_request (topic, 1, -1);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (topic_scroll),
|
||||
GTK_POLICY_EXTERNAL, GTK_POLICY_NEVER);
|
||||
gtk_scrolled_window_set_propagate_natural_width (GTK_SCROLLED_WINDOW (topic_scroll), FALSE);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (topic_scroll), GTK_SHADOW_NONE);
|
||||
gtk_container_add (GTK_CONTAINER (topic_scroll), topic);
|
||||
mg_topicbar_update_height (topic);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), topic, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), topic_scroll, TRUE, TRUE, 0);
|
||||
gtk_widget_add_events (topic, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_POINTER_MOTION_MASK | GDK_LEAVE_NOTIFY_MASK);
|
||||
g_signal_connect (G_OBJECT (topic), "key-press-event",
|
||||
@@ -3373,9 +3389,13 @@ mg_create_topicbar (session *sess, GtkWidget *box)
|
||||
mg_create_dialogbuttons (bbox);
|
||||
|
||||
mode_hbox = mg_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 0);
|
||||
if (prefs.hex_gui_mode_buttons_inline)
|
||||
gtk_box_pack_start (GTK_BOX (hbox), mode_hbox, 0, 0, 0);
|
||||
else
|
||||
gtk_box_pack_start (GTK_BOX (vbox), mode_hbox, 0, 0, 0);
|
||||
|
||||
gui->topicbutton_box = bbox = mg_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 0);
|
||||
gtk_widget_set_valign (bbox, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_end (GTK_BOX (mode_hbox), bbox, 0, 0, 0);
|
||||
mg_create_chanmodebuttons (gui, bbox);
|
||||
}
|
||||
|
||||
@@ -227,21 +227,6 @@ test('Theme Access Routing Tests', theme_access_tests,
|
||||
timeout: 120,
|
||||
)
|
||||
|
||||
theme_gtk3_settings_tests = executable('theme_gtk3_settings_tests',
|
||||
[
|
||||
'theme/tests/test-theme-gtk3-settings.c',
|
||||
'theme/theme-gtk3.c',
|
||||
],
|
||||
include_directories: [config_h_include],
|
||||
dependencies: [gtk_dep],
|
||||
)
|
||||
|
||||
test('Theme GTK3 Settings Tests', theme_gtk3_settings_tests,
|
||||
protocol: 'tap',
|
||||
timeout: 120,
|
||||
)
|
||||
|
||||
|
||||
theme_preferences_gtk3_populate_tests = executable('theme_preferences_gtk3_populate_tests',
|
||||
'theme/tests/test-theme-preferences-gtk3-populate.c',
|
||||
include_directories: [config_h_include],
|
||||
|
||||
@@ -58,6 +58,7 @@ static gboolean color_change;
|
||||
static struct zoitechatprefs setup_prefs;
|
||||
static GtkWidget *cancel_button;
|
||||
static GtkWidget *font_dialog = NULL;
|
||||
static GtkWidget *setup_topicbar_multiline_toggle = NULL;
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -185,6 +186,10 @@ static const setting appearance_settings[] =
|
||||
{ST_TOGGLR, N_("Show number of users"), P_OFFINTNL(hex_gui_win_ucount),0,0,0},
|
||||
{ST_TOGGLE, N_("Show nickname"), P_OFFINTNL(hex_gui_win_nick),0,0,0},
|
||||
|
||||
{ST_HEADER, N_("Topic Bar"),0,0,0},
|
||||
{ST_TOGGLE, N_("Place mode buttons beside the topic"), P_OFFINTNL(hex_gui_mode_buttons_inline), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Allow multi-line topics"), P_OFFINTNL(hex_gui_topicbar_multiline), 0, 0, 0},
|
||||
|
||||
{ST_END, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
@@ -833,6 +838,16 @@ setup_toggle_sensitive_cb (GtkToggleButton *but, GtkWidget *wid)
|
||||
gtk_widget_set_sensitive (wid, gtk_toggle_button_get_active (but));
|
||||
}
|
||||
|
||||
static void
|
||||
setup_topicbar_inline_toggled_cb (GtkToggleButton *but, gpointer userdata)
|
||||
{
|
||||
(void) userdata;
|
||||
|
||||
if (setup_topicbar_multiline_toggle)
|
||||
gtk_widget_set_sensitive (setup_topicbar_multiline_toggle,
|
||||
!gtk_toggle_button_get_active (but));
|
||||
}
|
||||
|
||||
static void
|
||||
setup_create_toggleR (GtkWidget *tab, int row, const setting *set)
|
||||
{
|
||||
@@ -859,6 +874,14 @@ setup_create_toggleL (GtkWidget *tab, int row, const setting *set)
|
||||
setup_get_int (&setup_prefs, set));
|
||||
g_signal_connect (G_OBJECT (wid), "toggled",
|
||||
G_CALLBACK (setup_toggle_cb), (gpointer)set);
|
||||
if (set->offset == STRUCT_OFFSET_INT (struct zoitechatprefs, hex_gui_mode_buttons_inline))
|
||||
g_signal_connect (G_OBJECT (wid), "toggled",
|
||||
G_CALLBACK (setup_topicbar_inline_toggled_cb), NULL);
|
||||
if (set->offset == STRUCT_OFFSET_INT (struct zoitechatprefs, hex_gui_topicbar_multiline))
|
||||
{
|
||||
setup_topicbar_multiline_toggle = wid;
|
||||
gtk_widget_set_sensitive (wid, !setup_prefs.hex_gui_mode_buttons_inline);
|
||||
}
|
||||
if (set->tooltip)
|
||||
gtk_widget_set_tooltip_text (wid, _(set->tooltip));
|
||||
setup_table_attach (tab, wid, 2, row==6 ? 6 : 4, row, row + 1, FALSE, FALSE,
|
||||
@@ -2286,6 +2309,8 @@ setup_apply (struct zoitechatprefs *pr)
|
||||
noapply = TRUE;
|
||||
if (DIFF (hex_gui_lagometer))
|
||||
noapply = TRUE;
|
||||
if (DIFF (hex_gui_mode_buttons_inline))
|
||||
noapply = TRUE;
|
||||
if (DIFF (hex_gui_tab_icons))
|
||||
noapply = TRUE;
|
||||
if (DIFF (hex_gui_tab_closebuttons))
|
||||
@@ -2300,6 +2325,8 @@ setup_apply (struct zoitechatprefs *pr)
|
||||
noapply = TRUE;
|
||||
if (DIFF (hex_gui_throttlemeter))
|
||||
noapply = TRUE;
|
||||
if (DIFF (hex_gui_topicbar_multiline))
|
||||
noapply = TRUE;
|
||||
if (DIFF (hex_gui_ulist_count))
|
||||
noapply = TRUE;
|
||||
if (DIFF (hex_gui_ulist_icons))
|
||||
|
||||
@@ -199,6 +199,14 @@ get_int_setting (const char *name)
|
||||
return value;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
has_default_seat (void)
|
||||
{
|
||||
GdkDisplay *display = gdk_display_get_default ();
|
||||
|
||||
return display && GDK_IS_SEAT (gdk_display_get_default_seat (display));
|
||||
}
|
||||
|
||||
static void
|
||||
setup_themes (void)
|
||||
{
|
||||
@@ -309,10 +317,13 @@ test_settings_restored_on_disable_and_switch (void)
|
||||
g_assert_true (theme_gtk3_apply ("layered", THEME_GTK3_VARIANT_PREFER_LIGHT, &error));
|
||||
g_assert_no_error (error);
|
||||
g_assert_cmpint (get_int_setting ("gtk-cursor-blink-time"), ==, 333);
|
||||
if (has_default_seat ())
|
||||
{
|
||||
g_object_get (gtk_settings_get_default (), "gtk-theme-name", &active_theme_name, NULL);
|
||||
g_assert_cmpstr (active_theme_name, ==, "child");
|
||||
g_free (active_theme_name);
|
||||
active_theme_name = NULL;
|
||||
}
|
||||
|
||||
g_assert_true (theme_gtk3_apply ("switch", THEME_GTK3_VARIANT_PREFER_LIGHT, &error));
|
||||
g_assert_no_error (error);
|
||||
@@ -322,9 +333,12 @@ test_settings_restored_on_disable_and_switch (void)
|
||||
theme_gtk3_disable ();
|
||||
g_assert_cmpint (get_int_setting ("gtk-cursor-blink-time"), ==, default_blink);
|
||||
g_assert_cmpint (get_bool_setting ("gtk-enable-animations"), ==, default_animations);
|
||||
if (has_default_seat ())
|
||||
{
|
||||
g_object_get (gtk_settings_get_default (), "gtk-theme-name", &active_theme_name, NULL);
|
||||
g_assert_cmpstr (active_theme_name, ==, default_theme_name);
|
||||
g_free (active_theme_name);
|
||||
}
|
||||
g_free (default_theme_name);
|
||||
g_assert_false (theme_gtk3_is_active ());
|
||||
}
|
||||
|
||||
@@ -135,8 +135,12 @@ settings_defaults_table (void)
|
||||
static void
|
||||
settings_rescan_icon_theme (void)
|
||||
{
|
||||
GdkScreen *screen = gdk_screen_get_default ();
|
||||
GtkIconTheme *icon_theme;
|
||||
|
||||
if (!screen)
|
||||
return;
|
||||
|
||||
icon_theme = gtk_icon_theme_get_default ();
|
||||
if (!icon_theme)
|
||||
return;
|
||||
@@ -156,8 +160,13 @@ theme_gtk3_reset_widgets (void)
|
||||
static void
|
||||
settings_capture_icon_search_path (void)
|
||||
{
|
||||
GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
|
||||
GdkScreen *screen = gdk_screen_get_default ();
|
||||
GtkIconTheme *icon_theme;
|
||||
|
||||
if (!screen)
|
||||
return;
|
||||
|
||||
icon_theme = gtk_icon_theme_get_default ();
|
||||
if (!icon_theme || theme_gtk3_settings_state.icon_search_path_captured)
|
||||
return;
|
||||
|
||||
@@ -168,8 +177,13 @@ settings_capture_icon_search_path (void)
|
||||
static void
|
||||
settings_append_icon_search_path (const char *path)
|
||||
{
|
||||
GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
|
||||
GdkScreen *screen = gdk_screen_get_default ();
|
||||
GtkIconTheme *icon_theme;
|
||||
|
||||
if (!screen)
|
||||
return;
|
||||
|
||||
icon_theme = gtk_icon_theme_get_default ();
|
||||
if (!icon_theme || !path || !g_file_test (path, G_FILE_TEST_IS_DIR))
|
||||
return;
|
||||
|
||||
@@ -199,8 +213,13 @@ settings_apply_icon_paths (const char *theme_root)
|
||||
static void
|
||||
settings_restore_icon_search_path (void)
|
||||
{
|
||||
GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
|
||||
GdkScreen *screen = gdk_screen_get_default ();
|
||||
GtkIconTheme *icon_theme;
|
||||
|
||||
if (!screen)
|
||||
return;
|
||||
|
||||
icon_theme = gtk_icon_theme_get_default ();
|
||||
if (!icon_theme || !theme_gtk3_settings_state.icon_search_path_captured)
|
||||
return;
|
||||
|
||||
@@ -394,6 +413,14 @@ settings_theme_link_search_path (const char *theme_root, const char *theme_name)
|
||||
return ok;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
settings_default_seat_available (void)
|
||||
{
|
||||
GdkDisplay *display = gdk_display_get_default ();
|
||||
|
||||
return display && GDK_IS_SEAT (gdk_display_get_default_seat (display));
|
||||
}
|
||||
|
||||
static void
|
||||
settings_apply_theme_name (const char *theme_root)
|
||||
{
|
||||
@@ -404,7 +431,7 @@ settings_apply_theme_name (const char *theme_root)
|
||||
return;
|
||||
|
||||
settings = gtk_settings_get_default ();
|
||||
if (!settings)
|
||||
if (!settings || !settings_default_seat_available ())
|
||||
return;
|
||||
|
||||
theme_name = g_path_get_basename (theme_root);
|
||||
|
||||
@@ -1 +1 @@
|
||||
2.18.1
|
||||
2.18.2
|
||||
|
||||
Reference in New Issue
Block a user