1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Use gdk_display_beep() in place of obsolete gdk_beep().

Except in GTK1 (which doesn't have the former), via a gtkcompat.h
workaround.

Up-to-date GTK3 has deprecated gdk_beep(), causing build failures due
to the default -Werror setting.
This commit is contained in:
Simon Tatham 2018-03-03 18:20:04 +00:00
parent 0476ceaa08
commit 97a248b463
3 changed files with 4 additions and 3 deletions

View File

@ -66,6 +66,7 @@
#define gtk_adjustment_set_step_increment(a, val) ((a)->step_increment = (val))
#define gtk_adjustment_get_value(a) ((a)->value)
#define gtk_selection_data_get_selection(a) ((a)->selection)
#define gdk_display_beep(disp) gdk_beep()
#define gtk_widget_set_has_window(w, b) \
gtk1_widget_set_unset_flag(w, GTK_NO_WINDOW, !(b))

View File

@ -1040,7 +1040,7 @@ void dlg_set_focus(union control *ctrl, void *dlg)
*/
void dlg_beep(void *dlg)
{
gdk_beep();
gdk_display_beep(gdk_display_get_default());
}
static void set_transient_window_pos(GtkWidget *parent, GtkWidget *child)
@ -1452,7 +1452,7 @@ static void draglist_move(struct dlgparam *dp, struct uctrl *uc, int direction)
if ((index < 0) ||
(index == 0 && direction < 0) ||
(index == g_list_length(children)-1 && direction > 0)) {
gdk_beep();
gdk_display_beep(gdk_display_get_default());
return;
}

View File

@ -3349,7 +3349,7 @@ void sys_cursor(void *frontend, int x, int y)
void do_beep(void *frontend, int mode)
{
if (mode == BELL_DEFAULT)
gdk_beep();
gdk_display_beep(gdk_display_get_default());
}
int char_width(Context ctx, int uc)