[libepc] Fix compilation with GSEAL_ENABLE defined



commit 6f355ac9731c555787723273564c9941a4574fda
Author: David King <davidk openismus com>
Date:   Wed Mar 24 16:47:57 2010 +0100

    Fix compilation with GSEAL_ENABLE defined
    
    * examples/consumer-ui.c:
    * libepc-ui/password-dialog.c:
    * libepc-ui/progress-window.c: Update for compilation with GSEAL_ENABLE
    defined.

 ChangeLog                   |    9 +++++++++
 examples/consumer-ui.c      |    5 +++++
 libepc-ui/password-dialog.c |    7 ++++++-
 libepc-ui/progress-window.c |    4 ++++
 4 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 142e9d4..f713e00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-03-24  David King  <davidk openismus com>
+
+	Fix compilation with GSEAL_ENABLE defined
+
+	* examples/consumer-ui.c:
+	* libepc-ui/password-dialog.c:
+	* libepc-ui/progress-window.c: Update for compilation with GSEAL_ENABLE
+	defined.
+
 	=== Release 0.3.10 ===
 
 2010-03-23  David King  <davidk openismus com>
diff --git a/examples/consumer-ui.c b/examples/consumer-ui.c
index 66d15f5..42a3bb6 100644
--- a/examples/consumer-ui.c
+++ b/examples/consumer-ui.c
@@ -169,7 +169,12 @@ create_lookup_dialog (EpcConsumer *consumer,
                                         GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
                                         NULL);
 
+#ifdef GTK_CHECK_VERSION (2, 14, 0) && GSEAL_ENABLE
+  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+                      vbox, TRUE, TRUE, 0);
+#else
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vbox, TRUE, TRUE, 0);
+#endif
   gtk_window_set_default_size (GTK_WINDOW (dialog), 500, 350);
 
   return dialog;
diff --git a/libepc-ui/password-dialog.c b/libepc-ui/password-dialog.c
index f9568a9..02c1507 100644
--- a/libepc-ui/password-dialog.c
+++ b/libepc-ui/password-dialog.c
@@ -155,7 +155,12 @@ epc_password_dialog_init (EpcPasswordDialog *self)
 
   gtk_widget_show_all (table);
 
+#if GTK_CHECK_VERSION (2, 14, 0)
+  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (self))),
+                      table, TRUE, TRUE, 0);
+#else
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (self)->vbox), table, TRUE, TRUE, 0);
+#endif
 }
 
 static void
@@ -404,7 +409,7 @@ gboolean
 epc_password_dialog_get_anonymous_allowed (EpcPasswordDialog *self)
 {
   g_return_val_if_fail (EPC_IS_PASSWORD_DIALOG (self), FALSE);
-#if GTK_CHECK_VERSION (2, 19, 7)
+#if GTK_CHECK_VERSION (2, 19, 7) || GTK_CHECK_VERSION (2, 14, 0) && GSEAL_ENABLE
     return gtk_widget_get_visible (self->priv->anonymous);
 #else
     return GTK_WIDGET_VISIBLE (self->priv->anonymous);
diff --git a/libepc-ui/progress-window.c b/libepc-ui/progress-window.c
index c169035..73e9c0c 100644
--- a/libepc-ui/progress-window.c
+++ b/libepc-ui/progress-window.c
@@ -118,7 +118,11 @@ static void
 epc_progress_window_realize (GtkWidget *widget)
 {
   GTK_WIDGET_CLASS (epc_progress_window_parent_class)->realize (widget);
+#ifdef GTK_CHECK_VERSION (2, 14, 0)
+  gdk_window_set_decorations (gtk_widget_get_window (widget), GDK_DECOR_BORDER);
+#else
   gdk_window_set_decorations (widget->window, GDK_DECOR_BORDER);
+#endif
 }
 
 static void



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