Mercurial > audlegacy
comparison audacious/ui_playlist.c @ 1042:286156196e16 trunk
[svn] - remove X11-incompliant dock.c, dock.h (sorry)
author | nenolod |
---|---|
date | Sun, 14 May 2006 10:31:46 -0700 |
parents | f866da587845 |
children | 238cd31c1512 |
comparison
equal
deleted
inserted
replaced
1041:a8e4435f65f2 | 1042:286156196e16 |
---|---|
35 #include <errno.h> | 35 #include <errno.h> |
36 | 36 |
37 #include "libaudacious/util.h" | 37 #include "libaudacious/util.h" |
38 | 38 |
39 #include "dnd.h" | 39 #include "dnd.h" |
40 #include "dock.h" | |
41 #include "equalizer.h" | 40 #include "equalizer.h" |
42 #include "hints.h" | 41 #include "hints.h" |
43 #include "input.h" | 42 #include "input.h" |
44 #include "main.h" | 43 #include "main.h" |
45 #include "mainwin.h" | 44 #include "mainwin.h" |
524 playlistwin_shade->pb_py = 42; | 523 playlistwin_shade->pb_py = 42; |
525 playlistwin_close->pb_nx = 167; | 524 playlistwin_close->pb_nx = 167; |
526 playlistwin_close->pb_ny = 3; | 525 playlistwin_close->pb_ny = 3; |
527 } | 526 } |
528 | 527 |
529 dock_shade(dock_window_list, GTK_WINDOW(playlistwin), | |
530 playlistwin_get_height()); | |
531 | |
532 playlistwin_set_geometry_hints(cfg.playlist_shaded); | 528 playlistwin_set_geometry_hints(cfg.playlist_shaded); |
533 | 529 |
534 gtk_window_resize(GTK_WINDOW(playlistwin), | 530 gtk_window_resize(GTK_WINDOW(playlistwin), |
535 cfg.playlist_width, | 531 cfg.playlist_width, |
536 playlistwin_get_height()); | 532 playlistwin_get_height()); |
571 | 567 |
572 gdk_pointer_ungrab(GDK_CURRENT_TIME); | 568 gdk_pointer_ungrab(GDK_CURRENT_TIME); |
573 playlistwin_resizing = FALSE; | 569 playlistwin_resizing = FALSE; |
574 gdk_flush(); | 570 gdk_flush(); |
575 | 571 |
576 if (dock_is_moving(GTK_WINDOW(playlistwin))) { | |
577 dock_move_release(GTK_WINDOW(playlistwin)); | |
578 #if 0 | 572 #if 0 |
579 if (cfg.playlist_transparent) | 573 if (cfg.playlist_transparent) |
580 playlistwin_update_list(); | 574 playlistwin_update_list(); |
581 #endif | 575 #endif |
582 } | 576 handle_release_cb(playlistwin_wlist, widget, event); |
583 else { | 577 playlist_popup_destroy(); |
584 handle_release_cb(playlistwin_wlist, widget, event); | 578 draw_playlist_window(FALSE); |
585 playlist_popup_destroy(); | |
586 draw_playlist_window(FALSE); | |
587 } | |
588 } | 579 } |
589 | 580 |
590 void | 581 void |
591 playlistwin_scroll(gint num) | 582 playlistwin_scroll(gint num) |
592 { | 583 { |
699 GdkEventMotion * event, | 690 GdkEventMotion * event, |
700 gpointer callback_data) | 691 gpointer callback_data) |
701 { | 692 { |
702 GdkEvent *gevent; | 693 GdkEvent *gevent; |
703 | 694 |
704 if (dock_is_moving(GTK_WINDOW(playlistwin))) { | 695 handle_motion_cb(playlistwin_wlist, widget, event); |
705 dock_move_motion(GTK_WINDOW(playlistwin), event); | 696 draw_playlist_window(FALSE); |
706 } | 697 |
707 else { | |
708 handle_motion_cb(playlistwin_wlist, widget, event); | |
709 draw_playlist_window(FALSE); | |
710 } | |
711 gdk_flush(); | 698 gdk_flush(); |
712 | 699 |
713 while ((gevent = gdk_event_get()) != NULL) gdk_event_free(gevent); | 700 while ((gevent = gdk_event_get()) != NULL) gdk_event_free(gevent); |
714 } | 701 } |
715 | 702 |
1101 GDK_TARGET_STRING, event->time); | 1088 GDK_TARGET_STRING, event->time); |
1102 } | 1089 } |
1103 else if (event->button == 1 && event->type == GDK_BUTTON_PRESS && | 1090 else if (event->button == 1 && event->type == GDK_BUTTON_PRESS && |
1104 !inside_sensitive_widgets(event->x, event->y) && event->y < 14) { | 1091 !inside_sensitive_widgets(event->x, event->y) && event->y < 14) { |
1105 gdk_window_raise(playlistwin->window); | 1092 gdk_window_raise(playlistwin->window); |
1106 dock_move_press(dock_window_list, GTK_WINDOW(playlistwin), event, | |
1107 FALSE); | |
1108 } | 1093 } |
1109 else if (event->button == 1 && event->type == GDK_2BUTTON_PRESS && | 1094 else if (event->button == 1 && event->type == GDK_2BUTTON_PRESS && |
1110 !inside_sensitive_widgets(event->x, event->y) | 1095 !inside_sensitive_widgets(event->x, event->y) |
1111 && event->y < 14) { | 1096 && event->y < 14) { |
1112 /* double click on title bar */ | 1097 /* double click on title bar */ |
1113 playlistwin_shade_toggle(); | 1098 playlistwin_shade_toggle(); |
1114 if (dock_is_moving(GTK_WINDOW(playlistwin))) | |
1115 dock_move_release(GTK_WINDOW(playlistwin)); | |
1116 return TRUE; | 1099 return TRUE; |
1117 } | 1100 } |
1118 else if (event->button == 3 && | 1101 else if (event->button == 3 && |
1119 !(widget_contains(WIDGET(playlistwin_list), event->x, event->y) || | 1102 !(widget_contains(WIDGET(playlistwin_list), event->x, event->y) || |
1120 (event->y >= cfg.playlist_height - 29 && | 1103 (event->y >= cfg.playlist_height - 29 && |
1642 gtk_window_set_default_size(GTK_WINDOW(playlistwin), | 1625 gtk_window_set_default_size(GTK_WINDOW(playlistwin), |
1643 playlistwin_get_width(), | 1626 playlistwin_get_width(), |
1644 playlistwin_get_height()); | 1627 playlistwin_get_height()); |
1645 gtk_window_set_resizable(GTK_WINDOW(playlistwin), TRUE); | 1628 gtk_window_set_resizable(GTK_WINDOW(playlistwin), TRUE); |
1646 playlistwin_set_geometry_hints(cfg.playlist_shaded); | 1629 playlistwin_set_geometry_hints(cfg.playlist_shaded); |
1647 dock_window_list = dock_window_set_decorated(dock_window_list, | |
1648 GTK_WINDOW(playlistwin), | |
1649 cfg.show_wm_decorations); | |
1650 | 1630 |
1651 gtk_window_set_transient_for(GTK_WINDOW(playlistwin), | 1631 gtk_window_set_transient_for(GTK_WINDOW(playlistwin), |
1652 GTK_WINDOW(mainwin)); | 1632 GTK_WINDOW(mainwin)); |
1653 gtk_window_set_skip_taskbar_hint(GTK_WINDOW(playlistwin), TRUE); | 1633 gtk_window_set_skip_taskbar_hint(GTK_WINDOW(playlistwin), TRUE); |
1654 | 1634 |