[easytag/wip/future-gtk] Use resource property on GtkImage



commit be74bc4ff2f96fe22b65a2ab63c599d72d2211bf
Author: David King <amigadave amigadave com>
Date:   Sat May 2 12:31:58 2015 +0100

    Use resource property on GtkImage
    
    Added in GTK+ 3.8.

 data/tag_area.ui |   12 ++++++++++++
 src/tag_area.c   |    9 ---------
 2 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/data/tag_area.ui b/data/tag_area.ui
index b2e120a..b07919e 100644
--- a/data/tag_area.ui
+++ b/data/tag_area.ui
@@ -204,6 +204,12 @@
                                 <property name="tooltip-text" translatable="yes">Number selected tracks 
sequentially. Starts at 01 in each subdirectory</property>
                                 <property name="visible">True</property>
                                 <signal name="clicked" handler="on_apply_to_selection"/>
+                                <child>
+                                    <object class="GtkImage" id="track_sequence_image">
+                                        <property 
name="resource">/org/gnome/EasyTAG/images/sequence-track.png</property>
+                                        <property name="visible">True</property>
+                                    </object>
+                                </child>
                             </object>
                             <packing>
                                 <property name="left-attach">3</property>
@@ -250,6 +256,12 @@
                                 <property name="tooltip-text" translatable="yes">Set the number of files, in 
the same directory of the displayed file, to the selected tracks</property>
                                 <property name="visible">True</property>
                                 <signal name="clicked" handler="on_apply_to_selection"/>
+                                <child>
+                                    <object class="GtkImage" id="track_number_image">
+                                        <property 
name="resource">/org/gnome/EasyTAG/images/sequence-track.png</property>
+                                        <property name="visible">True</property>
+                                    </object>
+                                </child>
                             </object>
                             <packing>
                                 <property name="left-attach">7</property>
diff --git a/src/tag_area.c b/src/tag_area.c
index 8ed07f0..4e7d597 100644
--- a/src/tag_area.c
+++ b/src/tag_area.c
@@ -2147,7 +2147,6 @@ static void
 create_tag_area (EtTagArea *self)
 {
     EtTagAreaPrivate *priv;
-    GtkWidget *image;
     GList *focus_chain = NULL;
     GtkEntryCompletion *completion;
 
@@ -2170,10 +2169,6 @@ create_tag_area (EtTagArea *self)
     et_tag_field_connect_signals (GTK_ENTRY (priv->year_entry), self);
 
     /* Track and Track total */
-    /* Pixmap into priv->track_sequence_button button. */
-    image = gtk_image_new_from_resource ("/org/gnome/EasyTAG/images/sequence-track.png");
-    gtk_container_add (GTK_CONTAINER (priv->track_sequence_button), image);
-
     populate_track_combo (self);
 
     gtk_entry_set_width_chars (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->track_combo_entry))),
@@ -2181,10 +2176,6 @@ create_tag_area (EtTagArea *self)
     g_signal_connect (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->track_combo_entry))),
                       "insert-text", G_CALLBACK (Insert_Only_Digit), NULL);
 
-    /* Pixmap into priv->track_number_button button. */
-    image = gtk_image_new_from_resource ("/org/gnome/EasyTAG/images/sequence-track.png");
-    gtk_container_add (GTK_CONTAINER (priv->track_number_button), image);
-
     g_signal_connect (GTK_ENTRY (priv->track_total_entry), "insert-text",
                       G_CALLBACK (Insert_Only_Digit), NULL);
     et_tag_field_connect_signals (GTK_ENTRY (priv->track_total_entry), self);


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