mirror of https://github.com/GNOME/gimp.git
libgimpwidgets: get rid of build warning.
This fixes this warning (as appeared with commit ad8b47bff7
):
[1/235] Compiling C object libgimpwidgets/libgimpwidgets-3.0.so.0.9900.17.p/gimpdialog.c.o
../../../../../../../dev/src/gimp/libgimpwidgets/gimpdialog.c:774:1: warning: ‘gimp_dialog_set_title_bar_theme’ defined but not used [-Wunused-function]
774 | gimp_dialog_set_title_bar_theme (GtkWidget *dialog)
We could either put the whole `gimp_dialog_set_title_bar_theme()` declaration,
definition and usage into #ifdef, or only the implementation (making the
function a no-op on non-Windows platforms). I chose the former. There was some
discussion that maybe some implementation may happen later for other platforms,
but until then, no need to call it needlessly (even more as we don't know when
any theoretical other implementation would happen).
This commit is contained in:
parent
1b258729c9
commit
ee9be210eb
|
@ -96,7 +96,9 @@ static void gimp_dialog_close (GtkDialog *dialog);
|
|||
static void gimp_dialog_response (GtkDialog *dialog,
|
||||
gint response_id);
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
static void gimp_dialog_set_title_bar_theme (GtkWidget *dialog);
|
||||
#endif
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GimpDialog, gimp_dialog, GTK_TYPE_DIALOG)
|
||||
|
||||
|
@ -770,10 +772,10 @@ gimp_dialogs_show_help_button (gboolean show)
|
|||
show_help_button = show ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
void
|
||||
gimp_dialog_set_title_bar_theme (GtkWidget *dialog)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
HWND hwnd;
|
||||
gboolean use_dark_mode = FALSE;
|
||||
GdkWindow *window = NULL;
|
||||
|
@ -810,5 +812,5 @@ gimp_dialog_set_title_bar_theme (GtkWidget *dialog)
|
|||
gdk_window_hide (window);
|
||||
gdk_window_show (window);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue