mirror of
https://gitlab.com/virt-viewer/virt-viewer.git
synced 2025-01-11 05:17:45 +03:00
Register a new signal session-cancelled
This commit is contained in:
parent
c61981540d
commit
8a6cb8c012
@ -292,8 +292,7 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel G_GNUC_UNUSED
|
||||
NULL,
|
||||
NULL, &password);
|
||||
if (ret < 0) {
|
||||
g_signal_emit_by_name(session, "session-auth-refused",
|
||||
_("Unable to collect credentials"));
|
||||
g_signal_emit_by_name(session, "session-cancelled");
|
||||
} else {
|
||||
g_object_set(self->priv->session, "password", password, NULL);
|
||||
spice_session_connect(self->priv->session);
|
||||
|
@ -230,6 +230,15 @@ virt_viewer_session_class_init(VirtViewerSessionClass *class)
|
||||
G_TYPE_NONE,
|
||||
0);
|
||||
|
||||
g_signal_new("session-cancelled",
|
||||
G_OBJECT_CLASS_TYPE(object_class),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(VirtViewerSessionClass, session_cancelled),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE,
|
||||
0);
|
||||
|
||||
g_type_class_add_private(class, sizeof(VirtViewerSessionPrivate));
|
||||
}
|
||||
|
||||
|
@ -88,6 +88,7 @@ struct _VirtViewerSessionClass {
|
||||
|
||||
void (*session_cut_text)(VirtViewerSession *session, const char *str);
|
||||
void (*session_bell)(VirtViewerSession *session);
|
||||
void (*session_cancelled)(VirtViewerSession *session);
|
||||
};
|
||||
|
||||
GType virt_viewer_session_get_type(void);
|
||||
|
Loading…
Reference in New Issue
Block a user