Mercurial > audlegacy
comparison audacious/ui_fileinfo.c @ 1287:e778f43a74fb trunk
[svn] - make tuples more verbose (they might be a bit big though)
author | nenolod |
---|---|
date | Sun, 18 Jun 2006 01:11:55 -0700 |
parents | f8c976466f60 |
children | 8de636dfee7a |
comparison
equal
deleted
inserted
replaced
1286:f8c976466f60 | 1287:e778f43a74fb |
---|---|
103 return; | 103 return; |
104 | 104 |
105 gtk_label_set_text(GTK_LABEL(widget), text); | 105 gtk_label_set_text(GTK_LABEL(widget), text); |
106 } | 106 } |
107 | 107 |
108 #if 0 | |
109 static void | 108 static void |
110 filepopup_entry_set_text_free(const char *entry, char *text) | 109 filepopup_entry_set_text_free(const char *entry, char *text) |
111 { | 110 { |
112 GladeXML *xml = g_object_get_data(G_OBJECT(filepopup_win), "glade-xml"); | 111 GladeXML *xml = g_object_get_data(G_OBJECT(filepopup_win), "glade-xml"); |
113 GtkWidget *widget = glade_xml_get_widget(xml, entry); | 112 GtkWidget *widget = glade_xml_get_widget(xml, entry); |
117 | 116 |
118 gtk_label_set_text(GTK_LABEL(widget), text); | 117 gtk_label_set_text(GTK_LABEL(widget), text); |
119 | 118 |
120 g_free(text); | 119 g_free(text); |
121 } | 120 } |
122 #endif | |
123 | 121 |
124 static gboolean | 122 static gboolean |
125 filepopup_pointer_check_iter(gpointer unused) | 123 filepopup_pointer_check_iter(gpointer unused) |
126 { | 124 { |
127 gint x, y, pos; | 125 gint x, y, pos; |
216 void | 214 void |
217 create_filepopup_window(void) | 215 create_filepopup_window(void) |
218 { | 216 { |
219 const gchar *glade_file = DATA_DIR "/glade/fileinfo_popup.glade"; | 217 const gchar *glade_file = DATA_DIR "/glade/fileinfo_popup.glade"; |
220 GladeXML *xml; | 218 GladeXML *xml; |
221 #if 0 | |
222 GtkWidget *widget; | 219 GtkWidget *widget; |
223 #endif | 220 |
224 xml = glade_xml_new_or_die(_("Track Information Popup"), glade_file, NULL, NULL); | 221 xml = glade_xml_new_or_die(_("Track Information Popup"), glade_file, NULL, NULL); |
225 | 222 |
226 glade_xml_signal_autoconnect(xml); | 223 glade_xml_signal_autoconnect(xml); |
227 | 224 |
228 filepopup_win = glade_xml_get_widget(xml, "win_pl_popup"); | 225 filepopup_win = glade_xml_get_widget(xml, "win_pl_popup"); |
229 g_object_set_data(G_OBJECT(filepopup_win), "glade-xml", xml); | 226 g_object_set_data(G_OBJECT(filepopup_win), "glade-xml", xml); |
230 gtk_window_set_transient_for(GTK_WINDOW(filepopup_win), GTK_WINDOW(mainwin)); | 227 gtk_window_set_transient_for(GTK_WINDOW(filepopup_win), GTK_WINDOW(mainwin)); |
231 | 228 |
232 #if 0 | |
233 widget = glade_xml_get_widget(xml, "image_artwork"); | 229 widget = glade_xml_get_widget(xml, "image_artwork"); |
234 gtk_image_set_from_file(GTK_IMAGE(widget), DATA_DIR "/images/audio.png"); | 230 gtk_image_set_from_file(GTK_IMAGE(widget), DATA_DIR "/images/audio.png"); |
235 #endif | |
236 | 231 |
237 g_timeout_add(50, filepopup_pointer_check_iter, NULL); | 232 g_timeout_add(50, filepopup_pointer_check_iter, NULL); |
238 } | 233 } |
239 | 234 |
240 void | 235 void |
270 gtk_widget_realize(filepopup_win); | 265 gtk_widget_realize(filepopup_win); |
271 | 266 |
272 filepopup_entry_set_text("label_title", tuple->track_name); | 267 filepopup_entry_set_text("label_title", tuple->track_name); |
273 filepopup_entry_set_text("label_artist", tuple->performer); | 268 filepopup_entry_set_text("label_artist", tuple->performer); |
274 filepopup_entry_set_text("label_album", tuple->album_name); | 269 filepopup_entry_set_text("label_album", tuple->album_name); |
270 filepopup_entry_set_text("label_genre", tuple->genre); | |
271 filepopup_entry_set_text_free("label_location", g_strdup_printf("%s/%s", tuple->file_path, tuple->file_name)); | |
272 | |
273 if (tuple->year != 0) | |
274 filepopup_entry_set_text_free("label_year", g_strdup_printf("%d", tuple->year)); | |
275 | |
276 if (tuple->track_number != 0) | |
277 filepopup_entry_set_text_free("label_track", g_strdup_printf("%d", tuple->track_number)); | |
275 | 278 |
276 gtk_widget_show(filepopup_win); | 279 gtk_widget_show(filepopup_win); |
277 } | 280 } |
278 | 281 |
279 void | 282 void |