Mercurial > audlegacy-plugins
comparison src/mtp_up/mtp.c @ 1474:10791910b866
the label wasn't restored on failure
author | Cristi Magherusan <majeru@atheme-project.org> |
---|---|
date | Sat, 11 Aug 2007 18:10:34 +0300 |
parents | 355f8e284c94 |
children | c2fa3728df43 |
comparison
equal
deleted
inserted
replaced
1473:eb0913bf54c3 | 1474:10791910b866 |
---|---|
125 | 125 |
126 | 126 |
127 gpointer upload(gpointer arg) | 127 gpointer upload(gpointer arg) |
128 { | 128 { |
129 if(!mutex) | 129 if(!mutex) |
130 return NULL; | 130 { |
131 gtk_label_set_text(GTK_LABEL(gtk_bin_get_child(GTK_BIN(menuitem))),DEFAULT_LABEL); | |
132 gtk_widget_set_sensitive(menuitem, TRUE); | |
133 return NULL; | |
134 } | |
131 g_mutex_lock(mutex); | 135 g_mutex_lock(mutex); |
132 if(!mtp_device) | 136 if(!mtp_device) |
133 { | 137 { |
134 g_mutex_unlock(mutex); | 138 gtk_label_set_text(GTK_LABEL(gtk_bin_get_child(GTK_BIN(menuitem))),DEFAULT_LABEL); |
139 gtk_widget_set_sensitive(menuitem, TRUE); | |
140 g_mutex_unlock(mutex); | |
135 return NULL; | 141 return NULL; |
136 } | 142 } |
143 | |
137 gchar* from_path; | 144 gchar* from_path; |
138 GList *up_list=NULL,*node; | 145 GList *up_list=NULL,*node; |
139 node=up_list=get_upload_list(); | 146 node=up_list=get_upload_list(); |
140 while(node) | 147 while(node) |
141 { | 148 { |
142 from_path=(gchar*)(node->data); | 149 from_path=(gchar*)(node->data); |
143 upload_file(from_path); | 150 upload_file(from_path); |
144 node = g_list_next(node); | 151 node = g_list_next(node); |
145 } | 152 } |
146 g_list_free(up_list); | 153 g_list_free(up_list); |
147 g_mutex_unlock(mutex); | |
148 | 154 |
149 gtk_label_set_text(GTK_LABEL(gtk_bin_get_child(GTK_BIN(menuitem))),DEFAULT_LABEL); | 155 gtk_label_set_text(GTK_LABEL(gtk_bin_get_child(GTK_BIN(menuitem))),DEFAULT_LABEL); |
150 gtk_widget_set_sensitive(menuitem, TRUE); | 156 gtk_widget_set_sensitive(menuitem, TRUE); |
151 | 157 g_mutex_unlock(mutex); |
152 return NULL; | 158 return NULL; |
153 } | 159 } |
154 | 160 |
155 void | 161 void mtp_prefs ( void ) |
156 mtp_prefs ( void ) | |
157 { | 162 { |
158 /*pref stub*/ | 163 /*pref stub*/ |
159 } | 164 } |
160 | 165 |
161 | 166 |
162 void | 167 void mtp_about ( void ) |
163 mtp_about ( void ) | |
164 { | 168 { |
165 /*about stub*/ | 169 /*about stub*/ |
166 } | 170 } |
167 | 171 |
168 void mtp_press() | 172 void mtp_press() |