mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-05 13:32:48 -05:00
Divide seat_set_trust_status into query and update.
This complicates the API in one sense (more separate functions), but in another sense, simplifies it (each function does something simpler). When I start putting one Seat in front of another during SSH proxying, the latter will be more important - in particular, it means you can find out _whether_ a seat can support changing trust status without having to actually attempt a destructive modification.
This commit is contained in:
@ -383,7 +383,8 @@ static const char *gtk_seat_get_x_display(Seat *seat);
|
||||
#ifndef NOT_X_WINDOWS
|
||||
static bool gtk_seat_get_windowid(Seat *seat, long *id);
|
||||
#endif
|
||||
static bool gtk_seat_set_trust_status(Seat *seat, bool trusted);
|
||||
static void gtk_seat_set_trust_status(Seat *seat, bool trusted);
|
||||
static bool gtk_seat_can_set_trust_status(Seat *seat);
|
||||
static bool gtk_seat_get_cursor_position(Seat *seat, int *x, int *y);
|
||||
|
||||
static const SeatVtable gtk_seat_vt = {
|
||||
@ -411,6 +412,7 @@ static const SeatVtable gtk_seat_vt = {
|
||||
.get_window_pixel_size = gtk_seat_get_window_pixel_size,
|
||||
.stripctrl_new = gtk_seat_stripctrl_new,
|
||||
.set_trust_status = gtk_seat_set_trust_status,
|
||||
.can_set_trust_status = gtk_seat_can_set_trust_status,
|
||||
.verbose = nullseat_verbose_yes,
|
||||
.interactive = nullseat_interactive_yes,
|
||||
.get_cursor_position = gtk_seat_get_cursor_position,
|
||||
@ -5415,10 +5417,14 @@ void new_session_window(Conf *conf, const char *geometry_string)
|
||||
ldisc_echoedit_update(inst->ldisc); /* cause ldisc to notice changes */
|
||||
}
|
||||
|
||||
static bool gtk_seat_set_trust_status(Seat *seat, bool trusted)
|
||||
static void gtk_seat_set_trust_status(Seat *seat, bool trusted)
|
||||
{
|
||||
GtkFrontend *inst = container_of(seat, GtkFrontend, seat);
|
||||
term_set_trust_status(inst->term, trusted);
|
||||
}
|
||||
|
||||
static bool gtk_seat_can_set_trust_status(Seat *seat)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user