Added a GTK3 version fallback in sexy-spell-entry.c so Windows builds use the GTK3 code paths even when HAVE_GTK3 isn’t defined by config headers.

Avoided MSVC unused-variable warnings in setup.c by scoping GTK2-only locals to GTK2 code paths.
This commit is contained in:
2026-02-04 21:03:04 -07:00
parent 07322293f3
commit 65f417cf7d
2 changed files with 13 additions and 2 deletions

View File

@@ -941,7 +941,10 @@ setup_spin_cb (GtkSpinButton *spin, const setting *set)
static GtkWidget *
setup_create_spin (GtkWidget *table, int row, const setting *set)
{
GtkWidget *label, *wid, *rbox, *align;
GtkWidget *label, *wid, *rbox;
#if !HAVE_GTK3
GtkWidget *align;
#endif
char *text;
label = gtk_label_new (_(set->label));
@@ -1700,8 +1703,8 @@ setup_color_button_apply (GtkWidget *button, const PaletteColor *color)
GTK_STATE_SELECTED,
GTK_STATE_INSENSITIVE
};
#endif
guint i;
#endif
#if HAVE_GTK3
gtkutil_apply_palette (apply_widget, color, NULL, NULL);

View File

@@ -51,6 +51,14 @@
#include "xtext.h"
#include "gtkutil.h"
#ifndef HAVE_GTK3
#if GTK_MAJOR_VERSION >= 3
#define HAVE_GTK3 1
#else
#define HAVE_GTK3 0
#endif
#endif
#if HAVE_GTK3
#define ICON_ADD "list-add"
#define ICON_REMOVE "list-remove"