forked from AuroraMiddleware/gtk
iconbrowser: Remove GtkEventBox usage
This commit is contained in:
parent
5be94c1fd7
commit
b555638600
@ -92,7 +92,7 @@ set_image (GtkWidget *image, const gchar *name, gint size)
|
|||||||
gtk_image_set_from_icon_name (GTK_IMAGE (image), name, 1);
|
gtk_image_set_from_icon_name (GTK_IMAGE (image), name, 1);
|
||||||
gtk_image_set_pixel_size (GTK_IMAGE (image), size);
|
gtk_image_set_pixel_size (GTK_IMAGE (image), size);
|
||||||
pixbuf = get_icon (image, name, size);
|
pixbuf = get_icon (image, name, size);
|
||||||
gtk_drag_source_set_icon_pixbuf (gtk_widget_get_parent (image), pixbuf);
|
gtk_drag_source_set_icon_pixbuf (image, pixbuf);
|
||||||
g_object_unref (pixbuf);
|
g_object_unref (pixbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -383,12 +383,9 @@ get_image_data (GtkWidget *widget,
|
|||||||
static void
|
static void
|
||||||
setup_image_dnd (GtkWidget *image)
|
setup_image_dnd (GtkWidget *image)
|
||||||
{
|
{
|
||||||
GtkWidget *parent;
|
gtk_drag_source_set (image, GDK_BUTTON1_MASK, NULL, 0, GDK_ACTION_COPY);
|
||||||
|
gtk_drag_source_add_image_targets (image);
|
||||||
parent = gtk_widget_get_parent (image);
|
g_signal_connect (image, "drag-data-get", G_CALLBACK (get_image_data), NULL);
|
||||||
gtk_drag_source_set (parent, GDK_BUTTON1_MASK, NULL, 0, GDK_ACTION_COPY);
|
|
||||||
gtk_drag_source_add_image_targets (parent);
|
|
||||||
g_signal_connect (parent, "drag-data-get", G_CALLBACK (get_image_data), NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -151,15 +151,10 @@
|
|||||||
<property name="row-spacing">18</property>
|
<property name="row-spacing">18</property>
|
||||||
<property name="column-spacing">18</property>
|
<property name="column-spacing">18</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkEventBox">
|
<object class="GtkImage" id="image1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<child>
|
<property name="halign">center</property>
|
||||||
<object class="GtkImage" id="image1">
|
<property name="valign">end</property>
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="halign">center</property>
|
|
||||||
<property name="valign">end</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">0</property>
|
<property name="left-attach">0</property>
|
||||||
@ -167,15 +162,10 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkEventBox">
|
<object class="GtkImage" id="image2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<child>
|
<property name="halign">center</property>
|
||||||
<object class="GtkImage" id="image2">
|
<property name="valign">end</property>
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="halign">center</property>
|
|
||||||
<property name="valign">end</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">1</property>
|
<property name="left-attach">1</property>
|
||||||
@ -183,15 +173,10 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkEventBox">
|
<object class="GtkImage" id="image3">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<child>
|
<property name="halign">center</property>
|
||||||
<object class="GtkImage" id="image3">
|
<property name="valign">end</property>
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="halign">center</property>
|
|
||||||
<property name="valign">end</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">2</property>
|
<property name="left-attach">2</property>
|
||||||
@ -199,15 +184,10 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkEventBox">
|
<object class="GtkImage" id="image4">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<child>
|
<property name="halign">center</property>
|
||||||
<object class="GtkImage" id="image4">
|
<property name="valign">end</property>
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="halign">center</property>
|
|
||||||
<property name="valign">end</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">3</property>
|
<property name="left-attach">3</property>
|
||||||
@ -215,15 +195,10 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkEventBox">
|
<object class="GtkImage" id="image5">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<child>
|
<property name="halign">center</property>
|
||||||
<object class="GtkImage" id="image5">
|
<property name="valign">end</property>
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="halign">center</property>
|
|
||||||
<property name="valign">end</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">4</property>
|
<property name="left-attach">4</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user