[libgd/wip/rishi/main-box: 11/12] main icon box child
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgd/wip/rishi/main-box: 11/12] main icon box child
- Date: Mon, 19 Dec 2016 14:29:32 +0000 (UTC)
commit aa5ce2c135ef94c18c7f4432983399efe7cdb17d
Author: Debarshi Ray <debarshir gnome org>
Date: Sat Dec 17 00:21:05 2016 +0100
main icon box child
libgd/gd-main-icon-box-child.c | 39 +--------------------------------------
1 files changed, 1 insertions(+), 38 deletions(-)
---
diff --git a/libgd/gd-main-icon-box-child.c b/libgd/gd-main-icon-box-child.c
index 7b41efe..85e87f1 100644
--- a/libgd/gd-main-icon-box-child.c
+++ b/libgd/gd-main-icon-box-child.c
@@ -41,26 +41,11 @@ enum
NUM_PROPERTIES
};
-enum
-{
- BUTTON_RELEASED,
- NUM_SIGNALS
-};
-
-static guint signals[NUM_SIGNALS] = { 0, };
-
static void gd_main_box_child_interface_init (GdMainBoxChildInterface *iface);
G_DEFINE_TYPE_WITH_CODE (GdMainIconBoxChild, gd_main_icon_box_child, GTK_TYPE_FLOW_BOX_CHILD,
G_ADD_PRIVATE (GdMainIconBoxChild)
G_IMPLEMENT_INTERFACE (GD_TYPE_MAIN_BOX_CHILD, gd_main_box_child_interface_init))
-static gboolean
-gd_main_icon_box_child_button_release_event_cb (GdMainIconBoxChild *self, GdkEventButton *event)
-{
- g_signal_emit (self, signals[BUTTON_RELEASED], 0);
- return GDK_EVENT_PROPAGATE;
-}
-
static GdMainBoxItem *
gd_main_icon_box_child_get_item (GdMainIconBoxChild *self)
{
@@ -144,7 +129,6 @@ gd_main_icon_box_child_constructed (GObject *obj)
GdMainIconBoxChild *self = GD_MAIN_ICON_BOX_CHILD (obj);
GdMainIconBoxChildPrivate *priv;
GtkStyleContext *context;
- GtkWidget *event_box;
GtkWidget *grid;
GtkWidget *image;
GtkWidget *overlay;
@@ -156,21 +140,11 @@ gd_main_icon_box_child_constructed (GObject *obj)
G_OBJECT_CLASS (gd_main_icon_box_child_parent_class)->constructed (obj);
- event_box = gtk_event_box_new ();
- gtk_event_box_set_above_child (GTK_EVENT_BOX (event_box), TRUE);
- gtk_event_box_set_visible_window (GTK_EVENT_BOX (event_box), FALSE);
- gtk_container_add (GTK_CONTAINER (self), event_box);
-
- g_signal_connect_swapped (event_box,
- "button-release-event",
- G_CALLBACK (gd_main_icon_box_child_button_release_event_cb),
- self);
-
grid = gtk_grid_new ();
gtk_widget_set_halign (grid, GTK_ALIGN_CENTER);
gtk_widget_set_valign (grid, GTK_ALIGN_CENTER);
gtk_orientable_set_orientation (GTK_ORIENTABLE (grid), GTK_ORIENTATION_VERTICAL);
- gtk_container_add (GTK_CONTAINER (event_box), grid);
+ gtk_container_add (GTK_CONTAINER (self), grid);
overlay = gtk_overlay_new ();
gtk_widget_set_margin_bottom (overlay, 4);
@@ -279,17 +253,6 @@ gd_main_icon_box_child_class_init (GdMainIconBoxChildClass *klass)
g_object_class_override_property (oclass, PROP_ITEM, "item");
g_object_class_override_property (oclass, PROP_SELECTION_MODE, "selection-mode");
-
- signals[BUTTON_RELEASED] = g_signal_new ("button-released",
- GD_TYPE_MAIN_ICON_BOX_CHILD,
- G_SIGNAL_RUN_LAST,
- 0,
- NULL,
- NULL,
- NULL,
- G_TYPE_NONE,
- 0);
-
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]