[rhythmbox] audioscrobbler: remove arg label from station creator UI



commit 5c3da9905b252dcf890b4a48279034dd428926a8
Author: Jamie Nicol <jamie thenicols net>
Date:   Mon Jul 19 12:05:07 2010 +0100

    audioscrobbler: remove arg label from station creator UI
    
    Make names in combo box more descriptive

 plugins/audioscrobbler/audioscrobbler-profile.ui   |   15 +-----
 .../rb-audioscrobbler-profile-source.c             |   50 +-------------------
 .../rb-audioscrobbler-radio-source.c               |   16 +++---
 3 files changed, 11 insertions(+), 70 deletions(-)
---
diff --git a/plugins/audioscrobbler/audioscrobbler-profile.ui b/plugins/audioscrobbler/audioscrobbler-profile.ui
index 3056a79..fe909fe 100644
--- a/plugins/audioscrobbler/audioscrobbler-profile.ui
+++ b/plugins/audioscrobbler/audioscrobbler-profile.ui
@@ -353,17 +353,6 @@
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="station_creator_arg_label">
-                <property name="visible">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="padding">4</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkEntry" id="station_creator_arg_entry">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -373,7 +362,7 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">3</property>
+                <property name="position">2</property>
               </packing>
             </child>
             <child>
@@ -389,7 +378,7 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">4</property>
+                <property name="position">3</property>
               </packing>
             </child>
           </object>
diff --git a/plugins/audioscrobbler/rb-audioscrobbler-profile-source.c b/plugins/audioscrobbler/rb-audioscrobbler-profile-source.c
index 9b9126d..2fece3b 100644
--- a/plugins/audioscrobbler/rb-audioscrobbler-profile-source.c
+++ b/plugins/audioscrobbler/rb-audioscrobbler-profile-source.c
@@ -86,7 +86,6 @@ struct _RBAudioscrobblerProfileSourcePrivate {
 
 	/* Station creation UI */
 	GtkWidget *station_creator_type_combo;
-	GtkWidget *station_creator_arg_label;
 	GtkWidget *station_creator_arg_entry;
 
 	/* Profile data lists */
@@ -166,13 +165,9 @@ static void rb_audioscrobbler_profile_source_love_track_action_cb (GtkAction *ac
 static void rb_audioscrobbler_profile_source_ban_track_action_cb (GtkAction *action,
                                                                   RBAudioscrobblerProfileSource *source);
 
-/* Radio station creation UI callbacks */
-static void rb_audioscrobbler_profile_source_station_creator_type_combo_changed_cb (GtkComboBox *combo_box,
-                                                                                    RBAudioscrobblerProfileSource *source);
+/* radio station creation/deletion */
 void rb_audioscrobbler_profile_source_station_creator_button_clicked_cb (GtkButton *button,
                                                                          RBAudioscrobblerProfileSource *source);
-
-/* radio station creation/deletion */
 static void rb_audioscrobbler_profile_source_load_radio_stations (RBAudioscrobblerProfileSource *source);
 static void rb_audioscrobbler_profile_source_save_radio_stations (RBAudioscrobblerProfileSource *source);
 static RBSource *rb_audioscrobbler_profile_source_add_radio_station (RBAudioscrobblerProfileSource *source,
@@ -524,7 +519,6 @@ rb_audioscrobbler_profile_source_init_profile_ui (RBAudioscrobblerProfileSource
 	source->priv->scrobbler_submit_time_label = GTK_WIDGET (gtk_builder_get_object (builder, "scrobbler_submit_time_label"));
 
 	/* station creator */
-	source->priv->station_creator_arg_label = GTK_WIDGET (gtk_builder_get_object (builder, "station_creator_arg_label"));
 	source->priv->station_creator_arg_entry = GTK_WIDGET (gtk_builder_get_object (builder, "station_creator_arg_entry"));
 	combo_container = GTK_WIDGET (gtk_builder_get_object (builder, "station_creator_combo_container"));
 	source->priv->station_creator_type_combo = gtk_combo_box_new_text ();
@@ -533,9 +527,6 @@ rb_audioscrobbler_profile_source_init_profile_ui (RBAudioscrobblerProfileSource
 		gtk_combo_box_append_text (GTK_COMBO_BOX (source->priv->station_creator_type_combo),
 		                           rb_audioscrobbler_radio_type_get_text (i));
 	}
-	g_signal_connect_object (source->priv->station_creator_type_combo, "changed",
-	                         G_CALLBACK (rb_audioscrobbler_profile_source_station_creator_type_combo_changed_cb),
-	                         source, 0);
 	gtk_combo_box_set_active (GTK_COMBO_BOX (source->priv->station_creator_type_combo), 0);
 
 	/* lists of data */
@@ -908,45 +899,6 @@ rb_audioscrobbler_profile_source_ban_track_action_cb (GtkAction *action,
 	g_object_unref (shell);
 }
 
-static void
-rb_audioscrobbler_profile_source_station_creator_type_combo_changed_cb (GtkComboBox *combo_box,
-                                                                        RBAudioscrobblerProfileSource *source)
-{
-	const char *text;
-
-	switch (gtk_combo_box_get_active (combo_box)) {
-	case RB_AUDIOSCROBBLER_RADIO_TYPE_SIMILAR_ARTISTS:
-		text = _("to Artist:");
-		break;
-	case RB_AUDIOSCROBBLER_RADIO_TYPE_TOP_FANS:
-		text = _("of Artist:");
-		break;
-	case RB_AUDIOSCROBBLER_RADIO_TYPE_LIBRARY:
-		text = _("of User:");
-		break;
-	case RB_AUDIOSCROBBLER_RADIO_TYPE_NEIGHBOURS:
-		text = _("of User:");
-		break;
-	case RB_AUDIOSCROBBLER_RADIO_TYPE_LOVED_TRACKS:
-		text = _("by User:");
-		break;
-	case RB_AUDIOSCROBBLER_RADIO_TYPE_RECOMMENDATION:
-		text = _("for User:");
-		break;
-	case RB_AUDIOSCROBBLER_RADIO_TYPE_GLOBAL_TAG:
-		text = _("Tag name:");
-		break;
-	case RB_AUDIOSCROBBLER_RADIO_TYPE_GROUP:
-		text = _("for Group:");
-		break;
-	default:
-		text = "";
-		break;
-	}
-
-	gtk_label_set_label (GTK_LABEL (source->priv->station_creator_arg_label), text);
-}
-
 void
 rb_audioscrobbler_profile_source_station_creator_button_clicked_cb (GtkButton *button,
                                                                     RBAudioscrobblerProfileSource *source)
diff --git a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
index 7e38e15..fb6c331 100644
--- a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
+++ b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
@@ -45,14 +45,14 @@
 
 /* radio type stuff */
 static const char* radio_types[] = {
-	N_("Similar Artists"),
-	N_("Top Fans"),
-	N_("Library"),
-	N_("Neighbourhood"),
-	N_("Loved Tracks"),
-	N_("Recommendations"),
-	N_("Tag Radio"),
-	N_("Group Radio"),
+	N_("Similar to Artist:"),
+	N_("Top Fans of Artist:"),
+	N_("Library of User:"),
+	N_("Neighbourhood of User:"),
+	N_("Tracks Loved by User:"),
+	N_("Recommendations for User:"),
+	N_("Tracks Tagged with:"),
+	N_("Listended by Group:"),
 	NULL
 };
 



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