[epiphany] Revert "Don't use deprecated GtkButton API"



commit 41ceee8ac728d660245972ed41b0fa577b694446
Author: Diego Escalante Urrelo <diegoe gnome org>
Date:   Mon Dec 7 08:07:19 2009 -0500

    Revert "Don't use deprecated GtkButton API"
    
    Revert this commit since Xan is right about forgetting about deprecating API.
    Instead of hiding behind g_signal_emit() we should use modern API or file bugs
    to fill our need.

 src/bookmarks/ephy-bookmark-action.c |    4 ++--
 src/ephy-link-action.c               |   12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/bookmarks/ephy-bookmark-action.c b/src/bookmarks/ephy-bookmark-action.c
index de59a14..90af3b1 100644
--- a/src/bookmarks/ephy-bookmark-action.c
+++ b/src/bookmarks/ephy-bookmark-action.c
@@ -431,7 +431,7 @@ button_press_cb (GtkWidget *widget,
 {
 	if (event->button == 2)	
 	{
-		g_signal_emit_by_name (widget, "pressed");
+		gtk_button_pressed (GTK_BUTTON (widget));
 	}
 
 	return FALSE;
@@ -444,7 +444,7 @@ button_release_cb (GtkWidget *widget,
 {
 	if (event->button == 2)	
 	{
-		g_signal_emit_by_name (widget, "released");
+		gtk_button_released (GTK_BUTTON (widget));
 	}
 
 	return FALSE;
diff --git a/src/ephy-link-action.c b/src/ephy-link-action.c
index 68ac2ff..0447663 100644
--- a/src/ephy-link-action.c
+++ b/src/ephy-link-action.c
@@ -34,20 +34,20 @@ G_DEFINE_TYPE_WITH_CODE (EphyLinkAction, ephy_link_action, GTK_TYPE_ACTION,
                                                 NULL))
 
 static gboolean
-proxy_button_press_event_cb (GtkWidget *widget,
-			     GdkEventButton *event,
-			     EphyLinkAction *action)
+proxy_button_press_event_cb (GtkButton *button,
+			       GdkEventButton *event,
+			       EphyLinkAction *action)
 {
 	if (event->button == 2)
 	{
-		g_signal_emit_by_name (widget, "pressed");
+		gtk_button_pressed(button);
 	}
 
 	return FALSE;
 }
 
 static gboolean
-proxy_button_release_event_cb (GtkWidget *widget,
+proxy_button_release_event_cb (GtkButton *button,
 			       GdkEventButton *event,
 			       EphyLinkAction *action)
 {
@@ -58,7 +58,7 @@ proxy_button_release_event_cb (GtkWidget *widget,
 	 */
 	if (event->button == 2)
 	{
-		g_signal_emit_by_name (widget, "released");
+		gtk_button_released(button);
 	}
 
 	return FALSE;



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