From e7d0d3fe7968ccad6cca5bc741fcbe332adb6841 Mon Sep 17 00:00:00 2001 From: Aleteoryx Date: Thu, 24 Jul 2025 14:12:17 -0400 Subject: [PATCH] remove gui_ulist_style option this is a suboptimal solution, but a more advanced theming system should be worked on later Fixes: https://todo.amehut.dev/~aleteoryx/sexchat/12 --- src/common/cfgfiles.c | 2 -- src/common/hexchat.h | 1 - src/fe-gtk/chanview-tree.c | 2 -- src/fe-gtk/chanview.c | 11 +++-------- src/fe-gtk/chanview.h | 2 +- src/fe-gtk/maingui.c | 10 +--------- src/fe-gtk/setup.c | 6 ------ 7 files changed, 5 insertions(+), 29 deletions(-) diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index f57c43e5cddbc40ab4b61155b75a2b3703b6a3f5..6a2416d8ca85b2dd3936fd3365e224a113f08390 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -461,7 +461,6 @@ const struct prefs vars[] = {"gui_ulist_pos", P_OFFINT (hex_gui_ulist_pos), TYPE_INT}, {"gui_ulist_show_hosts", P_OFFINT(hex_gui_ulist_show_hosts), TYPE_BOOL}, {"gui_ulist_sort", P_OFFINT (hex_gui_ulist_sort), TYPE_INT}, - {"gui_ulist_style", P_OFFINT (hex_gui_ulist_style), TYPE_BOOL}, {"gui_url_mod", P_OFFINT (hex_gui_url_mod), TYPE_INT}, {"gui_win_height", P_OFFINT (hex_gui_win_height), TYPE_INT}, {"gui_win_fullscreen", P_OFFINT (hex_gui_win_fullscreen), TYPE_INT}, @@ -771,7 +770,6 @@ load_default_config(void) prefs.hex_gui_tray_blink = 1; prefs.hex_gui_ulist_count = 1; prefs.hex_gui_ulist_icons = 1; - prefs.hex_gui_ulist_style = 1; prefs.hex_gui_win_nick = 1; prefs.hex_gui_win_save = 1; prefs.hex_input_filter_beep = 1; diff --git a/src/common/hexchat.h b/src/common/hexchat.h index b0fa9f893cbb2ae3b25a7a873e5b71f86c1e0cd9..edaae58eb8489f9e06ca952779903e27da5c20ab 100644 --- a/src/common/hexchat.h +++ b/src/common/hexchat.h @@ -148,7 +148,6 @@ struct hexchatprefs unsigned int hex_gui_ulist_hide; unsigned int hex_gui_ulist_icons; unsigned int hex_gui_ulist_show_hosts; - unsigned int hex_gui_ulist_style; unsigned int hex_gui_win_modes; unsigned int hex_gui_win_nick; unsigned int hex_gui_win_save; diff --git a/src/fe-gtk/chanview-tree.c b/src/fe-gtk/chanview-tree.c index 261304db8d508ad1453e650ac46fcac8ee24d344..0389d1518a2aaf8e729e5209a29ac822797c3db8 100644 --- a/src/fe-gtk/chanview-tree.c +++ b/src/fe-gtk/chanview-tree.c @@ -116,8 +116,6 @@ cv_tree_init (chanview *cv) view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (cv->store)); gtk_widget_set_name (view, "hexchat-tree"); - if (cv->style) - gtk_widget_set_style (view, cv->style); /*gtk_widget_modify_base (view, GTK_STATE_NORMAL, &colors[COL_BG]);*/ gtk_widget_set_can_focus (view, FALSE); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE); diff --git a/src/fe-gtk/chanview.c b/src/fe-gtk/chanview.c index e5556d9f5ab6d622c25ae2089c40c968b2b937dc..bf85ef4536c9b40d29a8632fcd63de31dd7e31a3 100644 --- a/src/fe-gtk/chanview.c +++ b/src/fe-gtk/chanview.c @@ -44,7 +44,6 @@ struct _chanview int size; /* number of channels in view */ GtkWidget *box; /* the box we destroy when changing implementations */ - GtkStyle *style; /* style used for tree */ chan *focused; /* currently focused channel */ int trunc_len; @@ -261,15 +260,12 @@ chanview_box_destroy_cb (GtkWidget *box, chanview *cv) } chanview * -chanview_new (int type, int trunc_len, gboolean sort, gboolean use_icons, - GtkStyle *style) +chanview_new (int type, int trunc_len, gboolean sort, gboolean use_icons) { chanview *cv; cv = g_new0 (chanview, 1); - cv->store = gtk_tree_store_new (4, G_TYPE_STRING, G_TYPE_POINTER, - PANGO_TYPE_ATTR_LIST, GDK_TYPE_PIXBUF); - cv->style = style; + cv->store = gtk_tree_store_new (4, G_TYPE_STRING, G_TYPE_POINTER, PANGO_TYPE_ATTR_LIST, GDK_TYPE_PIXBUF); cv->box = gtk_hbox_new (0, 0); cv->trunc_len = trunc_len; cv->sorted = sort; @@ -277,8 +273,7 @@ chanview_new (int type, int trunc_len, gboolean sort, gboolean use_icons, gtk_widget_show (cv->box); chanview_set_impl (cv, type); - g_signal_connect (G_OBJECT (cv->box), "destroy", - G_CALLBACK (chanview_box_destroy_cb), cv); + g_signal_connect (G_OBJECT (cv->box), "destroy", G_CALLBACK (chanview_box_destroy_cb), cv); return cv; } diff --git a/src/fe-gtk/chanview.h b/src/fe-gtk/chanview.h index a1495b1dd12b8474c805dcd9c2d9ba108fb92bb7..4e4d12b560ea06fb87be5422d013edd590d32e81 100644 --- a/src/fe-gtk/chanview.h +++ b/src/fe-gtk/chanview.h @@ -23,7 +23,7 @@ typedef struct _chanview chanview; typedef struct _chan chan; -chanview *chanview_new (int type, int trunc_len, gboolean sort, gboolean use_icons, GtkStyle *style); +chanview *chanview_new (int type, int trunc_len, gboolean sort, gboolean use_icons); void chanview_set_callbacks (chanview *cv, void (*cb_focus) (chanview *, chan *, int tag, void *userdata), void (*cb_xbutton) (chanview *, chan *, int tag, void *userdata), diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 0da60b3eefddd7ada435f96c6312729b209e75f4..1c14b6aef69a3f64ae216880b98394ec6da649b1 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -2477,12 +2477,6 @@ mg_create_userlist (session_gui *gui, GtkWidget *box) gui->user_tree = ulist = userlist_create (vbox); - if (prefs.hex_gui_ulist_style) - { - gtk_widget_set_style (ulist, input_style); - gtk_widget_modify_base (ulist, GTK_STATE_NORMAL, &colors[COL_BG]); - } - mg_create_meters (gui, vbox); gui->button_box_parent = vbox; @@ -3062,9 +3056,7 @@ mg_create_tabs (session_gui *gui) use_icons = TRUE; } - gui->chanview = chanview_new (prefs.hex_gui_tab_layout, prefs.hex_gui_tab_trunc, - prefs.hex_gui_tab_sort, use_icons, - prefs.hex_gui_ulist_style ? input_style : NULL); + gui->chanview = chanview_new (prefs.hex_gui_tab_layout, prefs.hex_gui_tab_trunc, prefs.hex_gui_tab_sort, use_icons); chanview_set_callbacks (gui->chanview, mg_switch_tab_cb, mg_xbutton_cb, mg_tab_contextmenu_cb, (void *)mg_tabs_compare); mg_place_userlist_and_chanview (gui); diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 0e1dfde3ad3fefca4fe9a8fa196aa043912688d9..2c557e67acfbe4dc4279e9a3d67be34d1411d0f6 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -255,7 +255,6 @@ static const setting userlist_settings[] = { {ST_HEADER, N_("User List"),0,0,0}, {ST_TOGGLE, N_("Show hostnames in user list"), P_OFFINTNL(hex_gui_ulist_show_hosts), 0, 0, 0}, - {ST_TOGGLE, N_("Use the Text box font and colors"), P_OFFINTNL(hex_gui_ulist_style),0,0,0}, {ST_TOGGLE, N_("Show icons for user modes"), P_OFFINTNL(hex_gui_ulist_icons), N_("Use graphical icons instead of text symbols in the user list."), 0, 0}, {ST_TOGGLE, N_("Color nicknames in userlist"), P_OFFINTNL(hex_gui_ulist_color), N_("Will color nicknames the same as in chat."), 0, 0}, {ST_TOGGLE, N_("Show user count in channels"), P_OFFINTNL(hex_gui_ulist_count), 0, 0, 0}, @@ -2049,9 +2048,6 @@ setup_apply_to_sess (session_gui *gui) { mg_update_xtext (gui->xtext); - if (prefs.hex_gui_ulist_style) - gtk_widget_set_style (gui->user_tree, input_style); - if (prefs.hex_gui_input_style) { extern char cursor_color_rc[]; @@ -2204,8 +2200,6 @@ setup_apply (struct hexchatprefs *pr) noapply = TRUE; if (DIFF (hex_gui_ulist_show_hosts)) noapply = TRUE; - if (DIFF (hex_gui_ulist_style)) - noapply = TRUE; if (DIFF (hex_gui_ulist_sort)) noapply = TRUE; if (DIFF (hex_gui_input_style) && prefs.hex_gui_input_style == TRUE)