comparison src/audacious/ui_fileinfo.c @ 4679:da0a9ed4f0ab

create fileinfo_win when needed
author Tomasz Mon <desowin@gmail.com>
date Wed, 02 Jul 2008 21:27:01 +0200
parents bc30700268d3
children b87f8c707b7f
comparison
equal deleted inserted replaced
4678:66dea2610f1c 4679:da0a9ed4f0ab
62 #include "ui_playlist.h" 62 #include "ui_playlist.h"
63 63
64 #define G_FREE_CLEAR(a) if(a != NULL) { g_free(a); a = NULL; } 64 #define G_FREE_CLEAR(a) if(a != NULL) { g_free(a); a = NULL; }
65 #define STATUS_TIMEOUT 3*1000 65 #define STATUS_TIMEOUT 3*1000
66 66
67 GtkWidget *fileinfo_win; 67 GtkWidget *fileinfo_win = NULL;
68 68
69 GtkWidget *entry_location; 69 GtkWidget *entry_location;
70 GtkWidget *entry_title; 70 GtkWidget *entry_title;
71 GtkWidget *entry_artist; 71 GtkWidget *entry_artist;
72 GtkWidget *entry_album; 72 GtkWidget *entry_album;
786 TupleValue *tvalue; 786 TupleValue *tvalue;
787 gint i; 787 gint i;
788 788
789 if (tuple == NULL) 789 if (tuple == NULL)
790 return; 790 return;
791 791
792 if(!updating_enabled) { 792 if(!updating_enabled) {
793 current_ip = NULL; 793 current_ip = NULL;
794 G_FREE_CLEAR(current_file); 794 G_FREE_CLEAR(current_file);
795 } 795 }
796 796
797 something_changed = FALSE; 797 something_changed = FALSE;
798
799 if (fileinfo_win == NULL)
800 create_fileinfo_window();
798 801
799 if (!GTK_WIDGET_REALIZED(fileinfo_win)) 802 if (!GTK_WIDGET_REALIZED(fileinfo_win))
800 gtk_widget_realize(fileinfo_win); 803 gtk_widget_realize(fileinfo_win);
801 804
802 set_entry_str_from_field(entry_title, tuple, FIELD_TITLE, updating_enabled); 805 set_entry_str_from_field(entry_title, tuple, FIELD_TITLE, updating_enabled);