Mercurial > audlegacy
changeset 4019:29650db2d5f2
added update button (currently disabled) to file info dialog
author | Eugene Zagidullin <e.asphyx@gmail.com> |
---|---|
date | Tue, 27 Nov 2007 01:58:26 +0300 |
parents | 918ccb2644fb |
children | 66529edae49d |
files | src/audacious/ui_fileinfo.c |
diffstat | 1 files changed, 20 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/ui_fileinfo.c Mon Nov 26 22:33:20 2007 +0300 +++ b/src/audacious/ui_fileinfo.c Tue Nov 27 01:58:26 2007 +0300 @@ -50,6 +50,7 @@ #include "util.h" #include "dnd.h" #include "tuple.h" +#include "vfs.h" #include "playlist.h" @@ -76,6 +77,9 @@ GtkWidget *label_format_name; GtkWidget *label_quality; +//static gchar *current_file = NULL; +//static InputPlugin *current_ip = NULL; + static void fileinfo_entry_set_text(GtkWidget *widget, const char *text) { @@ -157,7 +161,7 @@ void fileinfo_hide(gpointer unused) { - gtk_widget_hide(fileinfo_win); + if(GTK_WIDGET_VISIBLE(fileinfo_win)) gtk_widget_hide(fileinfo_win); /* Clear it out. */ fileinfo_entry_set_text(entry_title, ""); @@ -172,6 +176,12 @@ fileinfo_entry_set_image(image_artwork, DATA_DIR "/images/audio.png"); } +void fileinfo_update_tuple(gpointer data) +{ + /* TODO */ +} + + GdkPixbuf * themed_icon_lookup(gint size, const gchar *name, ...) /* NULL-terminated list of icon names */ { @@ -255,6 +265,7 @@ GtkWidget *table1; GtkWidget *bbox_close; GtkWidget *btn_close; + GtkWidget *btn_apply; GtkWidget *alignment; GtkWidget *separator; @@ -430,9 +441,15 @@ gtk_container_add(GTK_CONTAINER(alignment), entry_location); bbox_close = gtk_hbutton_box_new(); + gtk_box_set_spacing(GTK_BOX(bbox_close), 6); gtk_box_pack_start(GTK_BOX(vbox1), bbox_close, FALSE, FALSE, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox_close), GTK_BUTTONBOX_END); + btn_apply = gtk_button_new_from_stock("gtk-apply"); + gtk_container_add(GTK_CONTAINER(bbox_close), btn_apply); + g_signal_connect(G_OBJECT(btn_apply), "clicked", (GCallback) fileinfo_update_tuple, NULL); + gtk_widget_set_sensitive(btn_apply, FALSE); + btn_close = gtk_button_new_from_stock("gtk-close"); gtk_container_add(GTK_CONTAINER(bbox_close), btn_close); GTK_WIDGET_SET_FLAGS(btn_close, GTK_CAN_DEFAULT); @@ -450,7 +467,7 @@ if (tuple == NULL) return; - gtk_widget_realize(fileinfo_win); + if(!GTK_WIDGET_REALIZED(fileinfo_win)) gtk_widget_realize(fileinfo_win); fileinfo_entry_set_text(entry_title, tuple_get_string(tuple, FIELD_TITLE, NULL)); fileinfo_entry_set_text(entry_artist, tuple_get_string(tuple, FIELD_ARTIST, NULL)); @@ -495,7 +512,7 @@ g_free(tmp); } - gtk_widget_show(fileinfo_win); + if(! GTK_WIDGET_VISIBLE(fileinfo_win)) gtk_widget_show(fileinfo_win); } void