[Spice-devel] [spicy PATCH 2/6 v5] spicy: Changed the dialog into a window
Christophe Fergeau
cfergeau at redhat.com
Thu Jun 18 03:47:51 PDT 2015
On Tue, Jun 16, 2015 at 04:23:30PM +0200, Lukas Venhoda wrote:
> Changed connect dialog from GtkDialog to GtkWindow.
>
> Added the necessary signals and buttons, to keep then
> behaviour of a dialog (ESC to close, ENTER to submit).
>
> spicy_connect_dialog now returns TRUE and FALSE instead of 0 and -1.
> ---
> Changes since v4
> - Squashed with "Changed response to gboolean" commit
> - Code clean up
> - Better variable names
> - Removed useless function
> - Fixed build on gtk2
>
> Changes since v3
> - Changed block of code in set_connection_info into a for loop
>
> Changes since v2
> - Now only contains changing dialog to window
> - UX changes in later patches
> - Changed response type from GtkResponseType to gboolean
> ---
> src/spicy-connect.c | 155 +++++++++++++++++++++++++++++++++++++++++-----------
> src/spicy-connect.h | 2 +-
> src/spicy.c | 6 +-
> 3 files changed, 125 insertions(+), 38 deletions(-)
>
> diff --git a/src/spicy-connect.c b/src/spicy-connect.c
> index 991aaab..f02976f 100644
> --- a/src/spicy-connect.c
> +++ b/src/spicy-connect.c
> @@ -18,9 +18,22 @@
>
> #include <gtk/gtk.h>
> #include <glib/gi18n.h>
> +#include <gdk/gdkkeysyms.h>
> #include "spice-common.h"
> #include "spicy-connect.h"
>
> +/* Compatability code to allow build on Gtk2 and Gtk3 */
> +#ifndef GDK_Escape
> +#define GDK_Escape GDK_KEY_Escape
> +#endif
Actually, after running a few more checks/tests, GDK_KEY_Escape is
present in both gtk2 and gtk3, what was missing was the #include
<gdk/gdkkeysyms.h>. The #ifndef GDK_Escape should not be needed, and you
can use GDK_KEY_Escape in the code rather than the compat name.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150618/547c5fbb/attachment.sig>
More information about the Spice-devel
mailing list