Mercurial > audlegacy
changeset 962:a341792533a6 trunk
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
author | nhjm449 |
---|---|
date | Mon, 24 Apr 2006 00:40:43 -0700 |
parents | 6b292e838725 |
children | e42ce60c308f |
files | audacious/prefswin.c audacious/skinwin.c audacious/skinwin.h |
diffstat | 3 files changed, 20 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/audacious/prefswin.c Sun Apr 23 23:50:37 2006 -0700 +++ b/audacious/prefswin.c Mon Apr 24 00:40:43 2006 -0700 @@ -1460,7 +1460,7 @@ gpointer data) { GladeXML *xml; - GtkWidget *widget; + GtkWidget *widget, *widget2; const mode_t mode755 = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; @@ -1470,7 +1470,8 @@ xml = prefswin_get_xml(); widget = glade_xml_get_widget(xml, "skin_view"); - skin_view_update(GTK_TREE_VIEW(widget)); + widget2 = glade_xml_get_widget(xml, "skin_refresh_button"); + skin_view_update(GTK_TREE_VIEW(widget), GTK_WIDGET(widget2)); } static void @@ -1491,6 +1492,9 @@ GdkEvent * event, gpointer data) { + GladeXML *xml; + GtkWidget *widget; + if (event->visibility.state == GDK_VISIBILITY_FULLY_OBSCURED) return FALSE; @@ -1498,7 +1502,10 @@ return FALSE; prefswin_set_skin_update(FALSE); - skin_view_update(treeview); + + xml = prefswin_get_xml(); + widget = glade_xml_get_widget(xml, "skin_refresh_button"); + skin_view_update(treeview, GTK_WIDGET(widget)); return TRUE; } @@ -1600,6 +1607,9 @@ ConfigDb *db; gchar *path; + GladeXML *xml; + GtkWidget *widget2; + if (!selection_data->data) { g_warning("DND data string is NULL"); return; @@ -1620,7 +1630,9 @@ if (file_is_archive(path)) { bmp_active_skin_load(path); skin_install_skin(path); - skin_view_update(GTK_TREE_VIEW(widget)); + xml = prefswin_get_xml(); + widget2 = glade_xml_get_widget(xml, "skin_refresh_button"); + skin_view_update(GTK_TREE_VIEW(widget), GTK_WIDGET(widget2)); /* Change skin name in the config file */ db = bmp_cfg_db_open(); bmp_cfg_db_set_string(db, NULL, "skin", path);
--- a/audacious/skinwin.c Sun Apr 23 23:50:37 2006 -0700 +++ b/audacious/skinwin.c Mon Apr 24 00:40:43 2006 -0700 @@ -273,7 +273,7 @@ } void -skin_view_update(GtkTreeView * treeview) +skin_view_update(GtkTreeView * treeview, GtkWidget * refresh_button) { GtkTreeSelection *selection = NULL; GtkListStore *store; @@ -287,6 +287,7 @@ GList *entry; gtk_widget_set_sensitive(GTK_WIDGET(treeview), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(refresh_button), FALSE); store = GTK_LIST_STORE(gtk_tree_view_get_model(treeview)); @@ -331,6 +332,7 @@ } gtk_widget_set_sensitive(GTK_WIDGET(treeview), TRUE); + gtk_widget_set_sensitive(GTK_WIDGET(refresh_button), TRUE); }
--- a/audacious/skinwin.h Sun Apr 23 23:50:37 2006 -0700 +++ b/audacious/skinwin.h Mon Apr 24 00:40:43 2006 -0700 @@ -39,6 +39,6 @@ void skinlist_update(); void skin_view_realize(GtkTreeView * treeview); -void skin_view_update(GtkTreeView * treeview); +void skin_view_update(GtkTreeView * treeview, GtkWidget * refresh_button); #endif