From d59ce70285a0c5d7dd634ba5cc746b331edac4ce Mon Sep 17 00:00:00 2001 From: Javier Jardón Date: Wed, 22 Apr 2015 19:59:56 +0100 Subject: Do not make zenity_util_show_dialog() X11 specific --- src/option.c | 2 +- src/util.c | 6 +++++- src/util.h | 7 +------ src/zenity.h | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/option.c b/src/option.c index 431b9b60..3e351448 100644 --- a/src/option.c +++ b/src/option.c @@ -47,7 +47,7 @@ static gchar *zenity_general_ok_button; static gchar *zenity_general_cancel_button; static gchar **zenity_general_extra_buttons; static gboolean zenity_general_modal; -static gint zenity_general_attach; +static guintptr zenity_general_attach; static gboolean zenity_general_dialog_ellipsize; /* Calendar Dialog Options */ diff --git a/src/util.c b/src/util.c index 9693b0b2..ddb0146f 100644 --- a/src/util.c +++ b/src/util.c @@ -39,6 +39,10 @@ #include "util.h" #include "zenity.h" +#ifdef GDK_WINDOWING_X11 +#include +#endif + #define ZENITY_OK_DEFAULT 0 #define ZENITY_CANCEL_DEFAULT 1 #define ZENITY_ESC_DEFAULT 1 @@ -402,7 +406,7 @@ zenity_util_make_transient (GdkWindow *window, Window parent) #endif /* GDK_WINDOWING_X11 */ void -zenity_util_show_dialog (GtkWidget *dialog, Window parent) +zenity_util_show_dialog (GtkWidget *dialog, guintptr parent) { gtk_widget_realize (dialog); #ifdef GDK_WINDOWING_X11 diff --git a/src/util.h b/src/util.h index 4296ab93..c847cd4c 100644 --- a/src/util.h +++ b/src/util.h @@ -4,11 +4,6 @@ #include #include "zenity.h" -#ifdef GDK_WINDOWING_X11 -#include -#else -typedef gint Window; -#endif G_BEGIN_DECLS @@ -34,7 +29,7 @@ void zenity_util_show_help (GError **error); gint zenity_util_return_exit_code (ZenityExitCode value); void zenity_util_exit_code_with_data (ZenityExitCode value, ZenityData *data); -void zenity_util_show_dialog (GtkWidget *widget, Window parent); +void zenity_util_show_dialog (GtkWidget *widget, guintptr parent); gboolean zenity_util_timeout_handle (gpointer data); diff --git a/src/zenity.h b/src/zenity.h index 77f0c050..bab11e31 100644 --- a/src/zenity.h +++ b/src/zenity.h @@ -34,7 +34,7 @@ typedef struct { gint exit_code; gint timeout_delay; gboolean modal; - gint attach; + guintptr attach; } ZenityData; typedef enum { -- cgit