Re: [spicy PATCH 2/6 v5] spicy: Changed the dialog into a window

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: pgpUwvQGI6AYq.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]