mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
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_pixel_size (GTK_IMAGE (image), 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);
|
||||
}
|
||||
|
||||
@ -383,12 +383,9 @@ get_image_data (GtkWidget *widget,
|
||||
static void
|
||||
setup_image_dnd (GtkWidget *image)
|
||||
{
|
||||
GtkWidget *parent;
|
||||
|
||||
parent = gtk_widget_get_parent (image);
|
||||
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);
|
||||
gtk_drag_source_set (image, GDK_BUTTON1_MASK, NULL, 0, GDK_ACTION_COPY);
|
||||
gtk_drag_source_add_image_targets (image);
|
||||
g_signal_connect (image, "drag-data-get", G_CALLBACK (get_image_data), NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -151,15 +151,10 @@
|
||||
<property name="row-spacing">18</property>
|
||||
<property name="column-spacing">18</property>
|
||||
<child>
|
||||
<object class="GtkEventBox">
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
@ -167,15 +162,10 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEventBox">
|
||||
<object class="GtkImage" id="image2">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image2">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
@ -183,15 +173,10 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEventBox">
|
||||
<object class="GtkImage" id="image3">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image3">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
@ -199,15 +184,10 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEventBox">
|
||||
<object class="GtkImage" id="image4">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image4">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">3</property>
|
||||
@ -215,15 +195,10 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEventBox">
|
||||
<object class="GtkImage" id="image5">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image5">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">4</property>
|
||||
|
Loading…
Reference in New Issue
Block a user