aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-toolbar.c
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-01-17 03:11:40 +0800
committerXan Lopez <xan@igalia.com>2012-01-17 03:11:40 +0800
commit52cdd6df6cb561a48032358b3eedce16cfa2c9fb (patch)
tree1170c07244b9a2fba83251880900f8894887ae27 /src/ephy-toolbar.c
parent1150405cc1bc50d6c258cb723a76ae90d8945f73 (diff)
downloadgsoc2013-epiphany-52cdd6df6cb561a48032358b3eedce16cfa2c9fb.tar.gz
gsoc2013-epiphany-52cdd6df6cb561a48032358b3eedce16cfa2c9fb.tar.zst
gsoc2013-epiphany-52cdd6df6cb561a48032358b3eedce16cfa2c9fb.zip
Refactor GtkActions with attached EphyWindows
Make a GtkAction subclass that only holds an EphyWindow and nothing else, and use it throughout. Allows us to kill some duplicated code.
Diffstat (limited to 'src/ephy-toolbar.c')
-rw-r--r--src/ephy-toolbar.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index b167f06d8..2e1b1199e 100644
--- a/src/ephy-toolbar.c
+++ b/src/ephy-toolbar.c
@@ -21,6 +21,8 @@
#include "config.h"
#include "ephy-toolbar.h"
+#include "ephy-middle-clickable-button.h"
+
G_DEFINE_TYPE (EphyToolbar, ephy_toolbar, GTK_TYPE_TOOLBAR)
#define EPHY_TOOLBAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EPHY_TYPE_TOOLBAR, EphyToolbarPrivate))
@@ -90,7 +92,7 @@ ephy_toolbar_constructed (GObject *object)
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
/* Back */
- tool_button = gtk_button_new ();
+ tool_button = ephy_middle_clickable_button_new ();
/* FIXME: apparently we need an image inside the button for the action
* icon to appear. */
gtk_button_set_image (GTK_BUTTON (tool_button), gtk_image_new ());
@@ -101,7 +103,7 @@ ephy_toolbar_constructed (GObject *object)
gtk_container_add (GTK_CONTAINER (box), GTK_WIDGET (tool_button));
/* Forward */
- tool_button = gtk_button_new ();
+ tool_button = ephy_middle_clickable_button_new ();
/* FIXME: apparently we need an image inside the button for the action
* icon to appear. */
gtk_button_set_image (GTK_BUTTON (tool_button), gtk_image_new ());