Mercurial > audlegacy-plugins
comparison src/skins/ui_dock.c @ 3159:1ffcad5f406c
import new skins plugin
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Fri, 22 May 2009 23:18:48 +0900 |
parents | 8b97f9560dc3 |
children |
comparison
equal
deleted
inserted
replaced
3158:8b97f9560dc3 | 3159:1ffcad5f406c |
---|---|
216 for (node = dlist; node; node = g_list_next(node)) | 216 for (node = dlist; node; node = g_list_next(node)) |
217 g_free(node->data); | 217 g_free(node->data); |
218 g_list_free(dlist); | 218 g_list_free(dlist); |
219 } | 219 } |
220 | 220 |
221 static void move_skinned_window (SkinnedWindow * window, int x, int y) | |
222 { | |
223 gtk_window_move (GTK_WINDOW (window), x, y); | |
224 | |
225 window->x = x; | |
226 window->y = y; | |
227 | |
228 switch (window->type) | |
229 { | |
230 case WINDOW_MAIN: | |
231 config.player_x = x; | |
232 config.player_y = y; | |
233 break; | |
234 case WINDOW_EQ: | |
235 config.equalizer_x = x; | |
236 config.equalizer_y = y; | |
237 break; | |
238 case WINDOW_PLAYLIST: | |
239 config.playlist_x = x; | |
240 config.playlist_y = y; | |
241 break; | |
242 } | |
243 } | |
244 | |
221 static void | 245 static void |
222 docked_list_move(GList * list, gint x, gint y) | 246 docked_list_move(GList * list, gint x, gint y) |
223 { | 247 { |
224 GList *node; | 248 GList *node; |
225 DockedWindow *dw; | 249 DockedWindow *dw; |
226 | 250 |
227 for (node = list; node; node = g_list_next(node)) { | 251 for (node = list; node; node = g_list_next(node)) { |
228 dw = node->data; | 252 dw = node->data; |
229 gtk_window_move(dw->w, x + dw->offset_x, y + dw->offset_y); | 253 move_skinned_window (SKINNED_WINDOW (dw->w), x + dw->offset_x, |
230 | 254 y + dw->offset_y); |
231 SkinnedWindow *window = SKINNED_WINDOW(dw->w); | |
232 if (window) { | |
233 switch(window->type) { | |
234 | |
235 case WINDOW_MAIN: | |
236 config.player_x = x + dw->offset_x; | |
237 config.player_y = y + dw->offset_y; | |
238 break; | |
239 case WINDOW_EQ: | |
240 config.equalizer_x = x + dw->offset_x; | |
241 config.equalizer_y = y + dw->offset_y; | |
242 break; | |
243 case WINDOW_PLAYLIST: | |
244 config.playlist_x = x + dw->offset_x; | |
245 config.playlist_y = y + dw->offset_y; | |
246 break; | |
247 } | |
248 | |
249 window->x = x + dw->offset_x; | |
250 window->y = y + dw->offset_y; | |
251 } | |
252 } | 255 } |
253 } | 256 } |
254 | 257 |
255 void dock_window_resize (GtkWindow * widget, int width, int height) { | 258 void dock_window_resize (GtkWindow * widget, int width, int height) { |
256 GdkGeometry hints; | 259 GdkGeometry hints; |
277 move = g_list_concat (move, scan); | 280 move = g_list_concat (move, scan); |
278 } | 281 } |
279 } | 282 } |
280 for (; move; move = g_list_delete_link (move, move)) | 283 for (; move; move = g_list_delete_link (move, move)) |
281 move_attached (move->data, others, offset); | 284 move_attached (move->data, others, offset); |
282 gtk_window_move (window, x, y + offset); | 285 move_skinned_window (SKINNED_WINDOW (window), x, y + offset); |
283 } | 286 } |
284 | 287 |
285 void dock_shade (GList * window_list, GtkWindow * window, int new_height) { | 288 void dock_shade (GList * window_list, GtkWindow * window, int new_height) { |
286 int x, y, width, height, x2, y2; | 289 int x, y, width, height, x2, y2; |
287 GList * move, * others, * scan, * next; | 290 GList * move, * others, * scan, * next; |