[gnome-network][PATCH] Ask whether to accept clients in gds
- From: Rob Clews <robc klearsystems com>
- To: gnome-network-list gnome org
- Subject: [gnome-network][PATCH] Ask whether to accept clients in gds
- Date: Tue, 27 Jan 2004 13:59:25 +0000
This patch uses a GtkDialog to ask whether the client should be allowed
to view your desktop when connecting.
Ok to commit?
--
Klear Systems Ltd - Dependable IT
http://www.klearsystems.com
Tel: 0870 429 6238
Fax: 0871 222 7617
Email: robc klearsystems com
Dependability means:
- dedicated support engineer
- upfront pricing
- straight talk
Index: x11vnc.c
===================================================================
RCS file: /cvs/gnome/gnome-network/desktop/server/x11vnc.c,v
retrieving revision 1.6
diff -r1.6 x11vnc.c
350c350
<
---
>
357a358,360
> gint result;
> GtkWidget *dialog, *label;
>
382c385,413
< return(RFB_CLIENT_ACCEPT);
---
>
> dialog = gtk_dialog_new_with_buttons ("Desktop Sharing",
> NULL,
> GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
> GTK_STOCK_YES,
> GTK_RESPONSE_ACCEPT,
> GTK_STOCK_NO,
> GTK_RESPONSE_REJECT,
> NULL);
> label = gtk_label_new (g_strdup_printf(_("Host %s is trying to view your desktop, allow them?"), client->host));
>
> gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),
> label);
> gtk_widget_show(label);
>
> result = gtk_dialog_run (GTK_DIALOG (dialog));
>
> gtk_widget_destroy (dialog);
> switch (result)
> {
> case GTK_RESPONSE_ACCEPT:
> return(RFB_CLIENT_ACCEPT);
> break;
> case GTK_RESPONSE_REJECT:
> return(RFB_CLIENT_REFUSE);
> break;
> default:
> break;
> }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]