[libgda] Allow data entry widgets to emit the "focus-out-event" signal



commit ceca2057dc439d308e63fb4106f49dd1cfaab72a
Author: Vivien Malerba <malerba gnome-db org>
Date:   Wed Oct 6 15:09:42 2010 +0200

    Allow data entry widgets to emit the "focus-out-event" signal

 libgda-ui/data-entries/gdaui-entry-common-time.c  |    4 ++--
 libgda-ui/data-entries/gdaui-entry-number.c       |    4 ++--
 libgda-ui/data-entries/gdaui-entry-string.c       |    4 ++--
 libgda-ui/data-entries/plugins/gdaui-entry-cidr.c |    4 ++--
 libgda-ui/data-entries/plugins/gdaui-entry-text.c |    4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/libgda-ui/data-entries/gdaui-entry-common-time.c b/libgda-ui/data-entries/gdaui-entry-common-time.c
index fc98a0e..7da3307 100644
--- a/libgda-ui/data-entries/gdaui-entry-common-time.c
+++ b/libgda-ui/data-entries/gdaui-entry-common-time.c
@@ -476,14 +476,14 @@ real_get_value (GdauiEntryWrapper *mgwrap)
 
 typedef void (*Callback2) (gpointer, gpointer);
 static gboolean
-focus_out_cb (GtkWidget *widget, G_GNUC_UNUSED GdkEventFocus *event, GdauiEntryCommonTime *mgtim)
+focus_out_cb (GtkWidget *widget, GdkEventFocus *event, GdauiEntryCommonTime *mgtim)
 {
 	GCallback activate_cb;
 	activate_cb = g_object_get_data (G_OBJECT (widget), "_activate_cb");
 	g_assert (activate_cb);
 	((Callback2)activate_cb) (widget, mgtim);
 
-	return FALSE;
+	return gtk_widget_event (GTK_WIDGET (mgtim), (GdkEvent*) event);
 }
 
 static void
diff --git a/libgda-ui/data-entries/gdaui-entry-number.c b/libgda-ui/data-entries/gdaui-entry-number.c
index a8ba097..3e00090 100644
--- a/libgda-ui/data-entries/gdaui-entry-number.c
+++ b/libgda-ui/data-entries/gdaui-entry-number.c
@@ -356,14 +356,14 @@ real_get_value (GdauiEntryWrapper *mgwrap)
 
 typedef void (*Callback2) (gpointer, gpointer);
 static gboolean
-focus_out_cb (GtkWidget *widget, G_GNUC_UNUSED GdkEventFocus *event, GdauiEntryNumber *mgstr)
+focus_out_cb (GtkWidget *widget, GdkEventFocus *event, GdauiEntryNumber *mgstr)
 {
 	GCallback activate_cb;
 	activate_cb = g_object_get_data (G_OBJECT (widget), "_activate_cb");
 	g_assert (activate_cb);
 	((Callback2)activate_cb) (widget, mgstr);
 
-	return FALSE;
+	return gtk_widget_event (GTK_WIDGET (mgstr), (GdkEvent*) event);
 }
 
 static void
diff --git a/libgda-ui/data-entries/gdaui-entry-string.c b/libgda-ui/data-entries/gdaui-entry-string.c
index d8e1bae..3117d07 100644
--- a/libgda-ui/data-entries/gdaui-entry-string.c
+++ b/libgda-ui/data-entries/gdaui-entry-string.c
@@ -474,14 +474,14 @@ real_get_value (GdauiEntryWrapper *mgwrap)
 
 typedef void (*Callback2) (gpointer, gpointer);
 static gboolean
-focus_out_cb (GtkWidget *widget, G_GNUC_UNUSED GdkEventFocus *event, GdauiEntryString *mgstr)
+focus_out_cb (GtkWidget *widget, GdkEventFocus *event, GdauiEntryString *mgstr)
 {
 	GCallback activate_cb;
 	activate_cb = g_object_get_data (G_OBJECT (widget), "_activate_cb");
 	g_assert (activate_cb);
 	((Callback2)activate_cb) (widget, mgstr);
 
-	return FALSE;
+	return gtk_widget_event (GTK_WIDGET (mgstr), (GdkEvent*) event);
 }
 
 static void
diff --git a/libgda-ui/data-entries/plugins/gdaui-entry-cidr.c b/libgda-ui/data-entries/plugins/gdaui-entry-cidr.c
index 5da3b2b..2a54e5c 100644
--- a/libgda-ui/data-entries/plugins/gdaui-entry-cidr.c
+++ b/libgda-ui/data-entries/plugins/gdaui-entry-cidr.c
@@ -205,7 +205,7 @@ create_entry (GdauiEntryWrapper *mgwrap)
 
 /* makes sure the mask part of the widget is compatible with the ip part */
 static gboolean
-ip_focus_out_event_cb (G_GNUC_UNUSED GtkEntry *entry, G_GNUC_UNUSED GdkEventFocus *event, GdauiEntryCidr *mgcidr)
+ip_focus_out_event_cb (G_GNUC_UNUSED GtkEntry *entry, GdkEventFocus *event, GdauiEntryCidr *mgcidr)
 {
 	gint ip;
 
@@ -231,7 +231,7 @@ ip_focus_out_event_cb (G_GNUC_UNUSED GtkEntry *entry, G_GNUC_UNUSED GdkEventFocu
 		}
 	}
 
-	return FALSE;
+	return gtk_widget_event (GTK_WIDGET (mgcidr), (GdkEvent*) event);
 }
 
 /* makes sure the ip part of the widget is truncated to the right number of bits corresponding to
diff --git a/libgda-ui/data-entries/plugins/gdaui-entry-text.c b/libgda-ui/data-entries/plugins/gdaui-entry-text.c
index 932becf..d305725 100644
--- a/libgda-ui/data-entries/plugins/gdaui-entry-text.c
+++ b/libgda-ui/data-entries/plugins/gdaui-entry-text.c
@@ -384,14 +384,14 @@ real_get_value (GdauiEntryWrapper *mgwrap)
 
 typedef void (*Callback2) (gpointer, gpointer);
 static gboolean
-focus_out_cb (GtkWidget *widget, G_GNUC_UNUSED GdkEventFocus *event, GdauiEntryText *mgtxt)
+focus_out_cb (GtkWidget *widget, GdkEventFocus *event, GdauiEntryText *mgtxt)
 {
 	GCallback activate_cb;
 	activate_cb = g_object_get_data (G_OBJECT (widget), "_activate_cb");
 	g_assert (activate_cb);
 	((Callback2)activate_cb) (widget, mgtxt);
 
-	return FALSE;
+	return gtk_widget_event (GTK_WIDGET (mgtxt), (GdkEvent*) event);
 }
 
 static void



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