comparison audacious/mainwin.c @ 1938:1d9c1026d9f8 trunk

[svn] - DoubleSize support. This has bugs, the most notable one being that DoubleSize only works right if you restart the player. The second bug is rather obvious too. No osmosis skinengine. No TinyPlayer. Classic-esque skinengine only. This is because the doublesize algorithm hates you and wants you to go die in a fire.
author nenolod
date Sun, 05 Nov 2006 04:43:16 -0800
parents 35fa6f69d802
children e929aec8c8ea
comparison
equal deleted inserted replaced
1937:f6856d226afb 1938:1d9c1026d9f8
117 MAINWIN_OPT_TELAPSED, MAINWIN_OPT_TREMAINING, 117 MAINWIN_OPT_TELAPSED, MAINWIN_OPT_TREMAINING,
118 MAINWIN_OPT_ALWAYS, 118 MAINWIN_OPT_ALWAYS,
119 MAINWIN_OPT_STICKY, 119 MAINWIN_OPT_STICKY,
120 MAINWIN_OPT_WS, 120 MAINWIN_OPT_WS,
121 MAINWIN_OPT_PWS, 121 MAINWIN_OPT_PWS,
122 MAINWIN_OPT_EQWS 122 MAINWIN_OPT_EQWS, MAINWIN_OPT_DOUBLESIZE, MAINWIN_OPT_EASY_MOVE
123 }; 123 };
124 124
125 enum { 125 enum {
126 MAINWIN_VIS_ANALYZER, MAINWIN_VIS_SCOPE, MAINWIN_VIS_OFF, 126 MAINWIN_VIS_ANALYZER, MAINWIN_VIS_SCOPE, MAINWIN_VIS_OFF,
127 MAINWIN_VIS_ANALYZER_NORMAL, MAINWIN_VIS_ANALYZER_FIRE, 127 MAINWIN_VIS_ANALYZER_NORMAL, MAINWIN_VIS_ANALYZER_FIRE,
171 171
172 gint seek_state = MAINWIN_SEEK_NIL; 172 gint seek_state = MAINWIN_SEEK_NIL;
173 gint seek_initial_pos = 0; 173 gint seek_initial_pos = 0;
174 174
175 GdkGC *mainwin_gc; 175 GdkGC *mainwin_gc;
176 static GdkPixmap *mainwin_bg = NULL; 176 static GdkPixmap *mainwin_bg = NULL, *mainwin_bg_x2 = NULL;
177 177
178 GtkAccelGroup *mainwin_accel = NULL; 178 GtkAccelGroup *mainwin_accel = NULL;
179 179
180 static PButton *mainwin_menubtn; 180 static PButton *mainwin_menubtn;
181 static PButton *mainwin_minimize, *mainwin_shade, *mainwin_close; 181 static PButton *mainwin_minimize, *mainwin_shade, *mainwin_close;
436 {N_("/Roll up Player"), "<control>W", mainwin_view_menu_callback, 436 {N_("/Roll up Player"), "<control>W", mainwin_view_menu_callback,
437 MAINWIN_OPT_WS, "<ToggleItem>", NULL}, 437 MAINWIN_OPT_WS, "<ToggleItem>", NULL},
438 {N_("/Roll up Playlist Editor"), "<control><shift>W", mainwin_view_menu_callback, 438 {N_("/Roll up Playlist Editor"), "<control><shift>W", mainwin_view_menu_callback,
439 MAINWIN_OPT_PWS, "<ToggleItem>", NULL}, 439 MAINWIN_OPT_PWS, "<ToggleItem>", NULL},
440 {N_("/Roll up Equalizer"), "<control><alt>W", mainwin_view_menu_callback, 440 {N_("/Roll up Equalizer"), "<control><alt>W", mainwin_view_menu_callback,
441 MAINWIN_OPT_EQWS, "<ToggleItem>", NULL} 441 MAINWIN_OPT_EQWS, "<ToggleItem>", NULL},
442 {"/-", NULL, NULL, 0, "<Separator>", NULL},
443 {N_("/DoubleSize"), "<control>D", mainwin_view_menu_callback,
444 MAINWIN_OPT_DOUBLESIZE, "<ToggleItem>"},
445 {N_("/Easy Move"), "<control>E", mainwin_view_menu_callback,
446 MAINWIN_OPT_EASY_MOVE, "<ToggleItem>"}
442 }; 447 };
443 448
444 static const gint mainwin_view_menu_entries_num = 449 static const gint mainwin_view_menu_entries_num =
445 G_N_ELEMENTS(mainwin_view_menu_entries); 450 G_N_ELEMENTS(mainwin_view_menu_entries);
446 451
455 460
456 static void mainwin_refresh_hints(void); 461 static void mainwin_refresh_hints(void);
457 462
458 void mainwin_position_motion_cb(gint pos); 463 void mainwin_position_motion_cb(gint pos);
459 void mainwin_position_release_cb(gint pos); 464 void mainwin_position_release_cb(gint pos);
465
466 void set_doublesize(gboolean doublesize);
460 467
461 468
462 /* FIXME: placed here for now */ 469 /* FIXME: placed here for now */
463 void 470 void
464 playback_get_sample_params(gint * bitrate, 471 playback_get_sample_params(gint * bitrate,
508 } 515 }
509 516
510 static void 517 static void
511 mainwin_set_shape_mask(void) 518 mainwin_set_shape_mask(void)
512 { 519 {
513 GdkBitmap *mask;
514
515 if (!cfg.player_visible) 520 if (!cfg.player_visible)
516 return; 521 return;
517 522
518 mask = skin_get_mask(bmp_active_skin, SKIN_MASK_MAIN + cfg.player_shaded); 523 if (cfg.doublesize == FALSE)
519 gtk_widget_shape_combine_mask(mainwin, mask, 0, 0); 524 gtk_widget_shape_combine_mask(mainwin,
525 skin_get_mask(bmp_active_skin,
526 SKIN_MASK_MAIN), 0, 0);
527 else
528 gtk_widget_shape_combine_mask(mainwin, NULL, 0, 0);
520 } 529 }
521 530
522 static void 531 static void
523 mainwin_set_shade(gboolean shaded) 532 mainwin_set_shade(gboolean shaded)
524 { 533 {
535 544
536 mainwin_set_shape_mask(); 545 mainwin_set_shape_mask();
537 546
538 if (shaded) { 547 if (shaded) {
539 dock_shade(dock_window_list, GTK_WINDOW(mainwin), 548 dock_shade(dock_window_list, GTK_WINDOW(mainwin),
540 MAINWIN_SHADED_HEIGHT); 549 MAINWIN_SHADED_HEIGHT * (cfg.doublesize + 1));
541 550
542 widget_show(WIDGET(mainwin_svis)); 551 widget_show(WIDGET(mainwin_svis));
543 vis_clear_data(mainwin_vis); 552 vis_clear_data(mainwin_vis);
544 553
545 widget_show(WIDGET(mainwin_srew)); 554 widget_show(WIDGET(mainwin_srew));
564 } 573 }
565 574
566 mainwin_shade->pb_ny = mainwin_shade->pb_py = 27; 575 mainwin_shade->pb_ny = mainwin_shade->pb_py = 27;
567 } 576 }
568 else { 577 else {
569 dock_shade(dock_window_list, GTK_WINDOW(mainwin), 578 gint height = !bmp_active_skin->properties.mainwin_height ? MAINWIN_HEIGHT :
570 !bmp_active_skin->properties.mainwin_height ? MAINWIN_HEIGHT : 579 bmp_active_skin->properties.mainwin_height;
571 bmp_active_skin->properties.mainwin_height); 580
581 dock_shade(dock_window_list, GTK_WINDOW(mainwin), height * (cfg.doublesize + 1));
572 582
573 widget_hide(WIDGET(mainwin_svis)); 583 widget_hide(WIDGET(mainwin_svis));
574 svis_clear_data(mainwin_svis); 584 svis_clear_data(mainwin_svis);
575 585
576 widget_hide(WIDGET(mainwin_srew)); 586 widget_hide(WIDGET(mainwin_srew));
657 mainwin_menubtn_cb(void) 667 mainwin_menubtn_cb(void)
658 { 668 {
659 gint x, y; 669 gint x, y;
660 gtk_window_get_position(GTK_WINDOW(mainwin), &x, &y); 670 gtk_window_get_position(GTK_WINDOW(mainwin), &x, &y);
661 util_item_factory_popup(mainwin_general_menu, 671 util_item_factory_popup(mainwin_general_menu,
662 x + 6, 672 x + 6 * (1 + cfg.doublesize),
663 y + MAINWIN_SHADED_HEIGHT, 673 y + MAINWIN_SHADED_HEIGHT * (1 + cfg.doublesize),
664 1, GDK_CURRENT_TIME); 674 1, GDK_CURRENT_TIME);
665 } 675 }
666 676
667 void 677 void
668 mainwin_minimize_cb(void) 678 mainwin_minimize_cb(void)
720 } 730 }
721 731
722 void 732 void
723 draw_main_window(gboolean force) 733 draw_main_window(gboolean force)
724 { 734 {
735 GdkImage *img, *img2x;
725 GList *wl; 736 GList *wl;
726 Widget *w; 737 Widget *w;
727 gboolean redraw; 738 gboolean redraw;
728 739
729 if (!cfg.player_visible) 740 if (!cfg.player_visible)
745 756
746 widget_list_draw(mainwin_wlist, &redraw, force); 757 widget_list_draw(mainwin_wlist, &redraw, force);
747 758
748 if (redraw || force) { 759 if (redraw || force) {
749 if (force) { 760 if (force) {
761 if (cfg.doublesize) {
762 img = gdk_drawable_get_image(mainwin_bg, 0, 0, bmp_active_skin->properties.mainwin_width,
763 cfg.player_shaded ?
764 MAINWIN_SHADED_HEIGHT :
765 bmp_active_skin->properties.mainwin_height);
766 img2x = create_dblsize_image(img);
767 gdk_draw_image(mainwin_bg_x2, mainwin_gc, img2x, 0, 0,
768 0, 0, MAINWIN_WIDTH * 2,
769 cfg.player_shaded ? MAINWIN_SHADED_HEIGHT *
770 2 : MAINWIN_HEIGHT * 2);
771 gdk_image_destroy(img2x);
772 gdk_image_destroy(img);
773 }
774
750 gdk_window_clear(mainwin->window); 775 gdk_window_clear(mainwin->window);
776
751 } 777 }
752 else { 778 else {
753 for (wl = mainwin_wlist; wl; wl = g_list_next(wl)) { 779 for (wl = mainwin_wlist; wl; wl = g_list_next(wl)) {
754 w = WIDGET(wl->data); 780 w = WIDGET(wl->data);
755 781
756 if (!w->redraw || !w->visible) 782 if (!w->redraw || !w->visible)
757 continue; 783 continue;
758 784
759 gdk_window_clear_area(mainwin->window, w->x, w->y, 785 if (cfg.doublesize) {
760 w->width, w->height); 786 img = gdk_drawable_get_image(mainwin_bg, w->x, w->y,
787 w->width, w->height);
788 img2x = create_dblsize_image(img);
789 gdk_draw_image(mainwin_bg_x2, mainwin_gc,
790 img2x, 0, 0, w->x << 1, w->y << 1,
791 w->width << 1, w->height << 1);
792 gdk_image_destroy(img2x);
793 gdk_image_destroy(img);
794 gdk_window_clear_area(mainwin->window, w->x << 1,
795 w->y << 1, w->width << 1,
796 w->height << 1);
797 }
798 else
799 gdk_window_clear_area(mainwin->window, w->x, w->y,
800 w->width, w->height);
761 w->redraw = FALSE; 801 w->redraw = FALSE;
762 } 802 }
763 } 803 }
764 804
765 gdk_flush(); 805 gdk_flush();
996 { 1036 {
997 gint width, height; 1037 gint width, height;
998 1038
999 gdk_window_get_size(mainwin->window, &width, &height); 1039 gdk_window_get_size(mainwin->window, &width, &height);
1000 1040
1001 if (width == bmp_active_skin->properties.mainwin_width && 1041 if (width == bmp_active_skin->properties.mainwin_width * (cfg.doublesize + 1) &&
1002 height == bmp_active_skin->properties.mainwin_height) 1042 height == bmp_active_skin->properties.mainwin_height * (cfg.doublesize + 1))
1003 { 1043 {
1004 return; 1044 return;
1005 } 1045 }
1006 1046
1007 gdk_window_set_hints(mainwin->window, 0, 0, 1047 dock_window_resize(GTK_WINDOW(mainwin), cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width,
1008 cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width, 1048 cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height,
1009 cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height, 1049 bmp_active_skin->properties.mainwin_width * (cfg.doublesize + 1),
1010 cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width, 1050 bmp_active_skin->properties.mainwin_height * (cfg.doublesize + 1));
1011 cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height, 1051
1012 GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
1013 gdk_window_resize(mainwin->window, cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width,
1014 cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height);
1015 gdk_window_set_hints(mainwin->window, 0, 0,
1016 cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width,
1017 cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height,
1018 cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width,
1019 cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height,
1020 GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
1021 g_object_unref(mainwin_bg); 1052 g_object_unref(mainwin_bg);
1053 g_object_unref(mainwin_bg_x2);
1022 mainwin_bg = gdk_pixmap_new(mainwin->window, 1054 mainwin_bg = gdk_pixmap_new(mainwin->window,
1023 bmp_active_skin->properties.mainwin_width, 1055 bmp_active_skin->properties.mainwin_width,
1024 bmp_active_skin->properties.mainwin_height, -1); 1056 bmp_active_skin->properties.mainwin_height, -1);
1057 mainwin_bg_x2 = gdk_pixmap_new(mainwin->window,
1058 bmp_active_skin->properties.mainwin_width * 2,
1059 bmp_active_skin->properties.mainwin_height * 2, -1);
1025 mainwin_set_back_pixmap(); 1060 mainwin_set_back_pixmap();
1026 widget_list_change_pixmap(mainwin_wlist, mainwin_bg); 1061 widget_list_change_pixmap(mainwin_wlist, mainwin_bg);
1027 gdk_flush(); 1062 gdk_flush();
1028 } 1063 }
1029 } 1064 }
1241 { 1276 {
1242 x = event->x; 1277 x = event->x;
1243 y = event->y; 1278 y = event->y;
1244 state = event->state; 1279 state = event->state;
1245 } 1280 }
1246 1281 if (cfg.doublesize) {
1282 event->x /= 2;
1283 event->y /= 2;
1284 }
1247 if (dock_is_moving(GTK_WINDOW(mainwin))) { 1285 if (dock_is_moving(GTK_WINDOW(mainwin))) {
1248 dock_move_motion(GTK_WINDOW(mainwin), event); 1286 dock_move_motion(GTK_WINDOW(mainwin), event);
1249 } 1287 }
1250 else { 1288 else {
1251 handle_motion_cb(mainwin_wlist, widget, event); 1289 handle_motion_cb(mainwin_wlist, widget, event);
1333 gpointer callback_data) 1371 gpointer callback_data)
1334 { 1372 {
1335 1373
1336 gboolean grab = TRUE; 1374 gboolean grab = TRUE;
1337 1375
1376 if (cfg.doublesize) {
1377 /*
1378 * A hack to make doublesize transparent to callbacks.
1379 * We should make a copy of this data instead of
1380 * tampering with the data we get from gtk+
1381 */
1382 event->x /= 2;
1383 event->y /= 2;
1384 }
1385
1338 if (event->button == 1 && event->type == GDK_BUTTON_PRESS && 1386 if (event->button == 1 && event->type == GDK_BUTTON_PRESS &&
1339 !inside_sensitive_widgets(event->x, event->y) && event->y < 14) { 1387 !inside_sensitive_widgets(event->x, event->y) &&
1388 (cfg.easy_move || event->y < 14)) {
1340 if (0 && hint_move_resize_available()) { 1389 if (0 && hint_move_resize_available()) {
1341 hint_move_resize(mainwin, event->x_root, event->y_root, TRUE); 1390 hint_move_resize(mainwin, event->x_root, event->y_root, TRUE);
1342 grab = FALSE; 1391 grab = FALSE;
1343 } 1392 }
1344 else { 1393 else {
2131 } 2180 }
2132 2181
2133 void 2182 void
2134 mainwin_set_back_pixmap(void) 2183 mainwin_set_back_pixmap(void)
2135 { 2184 {
2136 gdk_window_set_back_pixmap(mainwin->window, mainwin_bg, 0); 2185 if (cfg.doublesize)
2186 gdk_window_set_back_pixmap(mainwin->window, mainwin_bg_x2, 0);
2187 else
2188 gdk_window_set_back_pixmap(mainwin->window, mainwin_bg, 0);
2137 gdk_window_clear(mainwin->window); 2189 gdk_window_clear(mainwin->window);
2138 } 2190 }
2139 2191
2140 /* 2192 /*
2141 * Rewritten 09/13/06: 2193 * Rewritten 09/13/06:
2736 cfg.no_playlist_advance = gtk_check_menu_item_get_active(check); 2788 cfg.no_playlist_advance = gtk_check_menu_item_get_active(check);
2737 break; 2789 break;
2738 } 2790 }
2739 } 2791 }
2740 2792
2793 static void
2794 mainwin_set_doublesize(gboolean doublesize)
2795 {
2796 gint height;
2797
2798 if (cfg.player_shaded)
2799 height = MAINWIN_SHADED_HEIGHT;
2800 else
2801 height = bmp_active_skin->properties.mainwin_height;
2802
2803 mainwin_set_shape_mask();
2804
2805 dock_window_resize(GTK_WINDOW(mainwin), cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width,
2806 cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height,
2807 bmp_active_skin->properties.mainwin_width * 2, bmp_active_skin->properties.mainwin_height * 2);
2808
2809 if (cfg.doublesize) {
2810 gdk_window_set_back_pixmap(mainwin->window, mainwin_bg_x2, 0);
2811 }
2812 else {
2813 gdk_window_set_back_pixmap(mainwin->window, mainwin_bg, 0);
2814 }
2815
2816 draw_main_window(TRUE);
2817 vis_set_doublesize(mainwin_vis, doublesize);
2818 }
2819
2820 void
2821 set_doublesize(gboolean doublesize)
2822 {
2823 cfg.doublesize = doublesize;
2824
2825 mainwin_set_doublesize(doublesize);
2826
2827 if (cfg.eq_doublesize_linked)
2828 equalizerwin_set_doublesize(doublesize);
2829 }
2830
2741 2831
2742 static void 2832 static void
2743 mainwin_view_menu_callback(gpointer data, 2833 mainwin_view_menu_callback(gpointer data,
2744 guint action, 2834 guint action,
2745 GtkWidget * item) 2835 GtkWidget * item)
2772 case MAINWIN_OPT_PWS: 2862 case MAINWIN_OPT_PWS:
2773 playlistwin_set_shade(GTK_CHECK_MENU_ITEM(item)->active); 2863 playlistwin_set_shade(GTK_CHECK_MENU_ITEM(item)->active);
2774 break; 2864 break;
2775 case MAINWIN_OPT_EQWS: 2865 case MAINWIN_OPT_EQWS:
2776 equalizerwin_set_shade_menu_cb(GTK_CHECK_MENU_ITEM(item)->active); 2866 equalizerwin_set_shade_menu_cb(GTK_CHECK_MENU_ITEM(item)->active);
2867 break;
2868 case MAINWIN_OPT_DOUBLESIZE:
2869 mainwin_menurow->mr_doublesize_selected =
2870 GTK_CHECK_MENU_ITEM(gtk_item_factory_get_widget
2871 (mainwin_view_menu,
2872 "/DoubleSize"))->active;
2873 widget_draw(WIDGET(mainwin_menurow));
2874 set_doublesize(mainwin_menurow->mr_doublesize_selected);
2875 gdk_flush();
2876 break;
2877 case MAINWIN_OPT_EASY_MOVE:
2878 cfg.easy_move =
2879 GTK_CHECK_MENU_ITEM(gtk_item_factory_get_widget
2880 (mainwin_view_menu, "/Easy Move"))->active;
2777 break; 2881 break;
2778 case MAINWIN_SONGNAME_SCROLL: 2882 case MAINWIN_SONGNAME_SCROLL:
2779 check = GTK_CHECK_MENU_ITEM(item); 2883 check = GTK_CHECK_MENU_ITEM(item);
2780 mainwin_set_title_scroll(gtk_check_menu_item_get_active(check)); 2884 mainwin_set_title_scroll(gtk_check_menu_item_get_active(check));
2781 check_set(mainwin_songname_menu, "/Autoscroll Songname", cfg.autoscroll); 2885 check_set(mainwin_songname_menu, "/Autoscroll Songname", cfg.autoscroll);
2966 break; 3070 break;
2967 case MENUROW_FILEINFOBOX: 3071 case MENUROW_FILEINFOBOX:
2968 mainwin_lock_info_text(_("FILE INFO BOX")); 3072 mainwin_lock_info_text(_("FILE INFO BOX"));
2969 break; 3073 break;
2970 case MENUROW_DOUBLESIZE: 3074 case MENUROW_DOUBLESIZE:
2971 mainwin_lock_info_text(_("** DOUBLESIZE HAS BEEN REMOVED **")); 3075 if (mainwin_menurow->mr_doublesize_selected)
3076 mainwin_lock_info_text(_("DISABLE DOUBLESIZE"));
3077 else
3078 mainwin_lock_info_text(_("ENABLE DOUBLESIZE"));
2972 break; 3079 break;
2973 case MENUROW_VISUALIZATION: 3080 case MENUROW_VISUALIZATION:
2974 mainwin_lock_info_text(_("VISUALIZATION MENU")); 3081 mainwin_lock_info_text(_("VISUALIZATION MENU"));
2975 break; 3082 break;
2976 } 3083 }
2998 break; 3105 break;
2999 case MENUROW_FILEINFOBOX: 3106 case MENUROW_FILEINFOBOX:
3000 playlist_fileinfo_current(); 3107 playlist_fileinfo_current();
3001 break; 3108 break;
3002 case MENUROW_DOUBLESIZE: 3109 case MENUROW_DOUBLESIZE:
3003 /* double size removed, do nothing */ 3110 widget =
3111 gtk_item_factory_get_widget(mainwin_view_menu, "/DoubleSize");
3112 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget),
3113 mainwin_menurow->mr_doublesize_selected);
3004 break; 3114 break;
3005 case MENUROW_VISUALIZATION: 3115 case MENUROW_VISUALIZATION:
3006 gdk_window_get_pointer(NULL, &x, &y, &modmask); 3116 gdk_window_get_pointer(NULL, &x, &y, &modmask);
3007 util_item_factory_popup(mainwin_vis_menu, x, y, 1, GDK_CURRENT_TIME); 3117 util_item_factory_popup(mainwin_vis_menu, x, y, 1, GDK_CURRENT_TIME);
3008 break; 3118 break;
3266 check_set(mainwin_view_menu, "/Always On Top", cfg.always_on_top); 3376 check_set(mainwin_view_menu, "/Always On Top", cfg.always_on_top);
3267 check_set(mainwin_view_menu, "/Put on All Workspaces", cfg.sticky); 3377 check_set(mainwin_view_menu, "/Put on All Workspaces", cfg.sticky);
3268 check_set(mainwin_view_menu, "/Roll up Player", cfg.player_shaded); 3378 check_set(mainwin_view_menu, "/Roll up Player", cfg.player_shaded);
3269 check_set(mainwin_view_menu, "/Roll up Playlist Editor", cfg.playlist_shaded); 3379 check_set(mainwin_view_menu, "/Roll up Playlist Editor", cfg.playlist_shaded);
3270 check_set(mainwin_view_menu, "/Roll up Equalizer", cfg.equalizer_shaded); 3380 check_set(mainwin_view_menu, "/Roll up Equalizer", cfg.equalizer_shaded);
3381 check_set(mainwin_view_menu, "/Easy Move", cfg.easy_move);
3382 check_set(mainwin_view_menu, "/DoubleSize", cfg.doublesize);
3271 3383
3272 /* Songname menu */ 3384 /* Songname menu */
3273 3385
3274 check_set(mainwin_songname_menu, "/Autoscroll Songname", cfg.autoscroll); 3386 check_set(mainwin_songname_menu, "/Autoscroll Songname", cfg.autoscroll);
3275 check_set(mainwin_songname_menu, "/Stop After Current Song", cfg.stopaftersong); 3387 check_set(mainwin_songname_menu, "/Stop After Current Song", cfg.stopaftersong);
3420 3532
3421 mainwin_menurow = 3533 mainwin_menurow =
3422 create_menurow(&mainwin_wlist, mainwin_bg, mainwin_gc, 10, 22, 304, 3534 create_menurow(&mainwin_wlist, mainwin_bg, mainwin_gc, 10, 22, 304,
3423 0, 304, 44, mainwin_mr_change, mainwin_mr_release, 3535 0, 304, 44, mainwin_mr_change, mainwin_mr_release,
3424 SKIN_TITLEBAR); 3536 SKIN_TITLEBAR);
3425 mainwin_menurow->mr_doublesize_selected = FALSE; 3537 mainwin_menurow->mr_doublesize_selected = cfg.doublesize;
3426 mainwin_menurow->mr_always_selected = cfg.always_on_top; 3538 mainwin_menurow->mr_always_selected = cfg.always_on_top;
3427 3539
3428 mainwin_volume = 3540 mainwin_volume =
3429 create_hslider(&mainwin_wlist, mainwin_bg, mainwin_gc, 107, 57, 68, 3541 create_hslider(&mainwin_wlist, mainwin_bg, mainwin_gc, 107, 57, 68,
3430 13, 15, 422, 0, 422, 14, 11, 15, 0, 0, 51, 3542 13, 15, 422, 0, 422, 14, 11, 15, 0, 0, 51,
3471 create_sbutton(&mainwin_wlist, mainwin_bg, mainwin_gc, 247, 83, 20, 3583 create_sbutton(&mainwin_wlist, mainwin_bg, mainwin_gc, 247, 83, 20,
3472 25, show_about_window); 3584 25, show_about_window);
3473 3585
3474 mainwin_vis = 3586 mainwin_vis =
3475 create_vis(&mainwin_wlist, mainwin_bg, mainwin->window, mainwin_gc, 3587 create_vis(&mainwin_wlist, mainwin_bg, mainwin->window, mainwin_gc,
3476 24, 43, 76); 3588 24, 43, 76, cfg.doublesize);
3477 mainwin_svis = create_svis(&mainwin_wlist, mainwin_bg, mainwin_gc, 79, 5); 3589 mainwin_svis = create_svis(&mainwin_wlist, mainwin_bg, mainwin_gc, 79, 5);
3478 active_vis = mainwin_vis; 3590 active_vis = mainwin_vis;
3479 3591
3480 mainwin_position = 3592 mainwin_position =
3481 create_hslider(&mainwin_wlist, mainwin_bg, mainwin_gc, 16, 72, 248, 3593 create_hslider(&mainwin_wlist, mainwin_bg, mainwin_gc, 16, 72, 248,
3531 gtk_window_set_role(GTK_WINDOW(mainwin), "player"); 3643 gtk_window_set_role(GTK_WINDOW(mainwin), "player");
3532 gtk_window_set_resizable(GTK_WINDOW(mainwin), FALSE); 3644 gtk_window_set_resizable(GTK_WINDOW(mainwin), FALSE);
3533 3645
3534 width = cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width; 3646 width = cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width;
3535 height = cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height; 3647 height = cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height;
3648
3649 if (cfg.doublesize) {
3650 width *= 2;
3651 height *= 2;
3652 }
3536 3653
3537 gtk_widget_set_size_request(mainwin, width, height); 3654 gtk_widget_set_size_request(mainwin, width, height);
3538 gtk_widget_set_app_paintable(mainwin, TRUE); 3655 gtk_widget_set_app_paintable(mainwin, TRUE);
3539 3656
3540 dock_window_list = dock_window_set_decorated(dock_window_list, 3657 dock_window_list = dock_window_set_decorated(dock_window_list,
3621 3738
3622 mainwin_gc = gdk_gc_new(mainwin->window); 3739 mainwin_gc = gdk_gc_new(mainwin->window);
3623 mainwin_bg = gdk_pixmap_new(mainwin->window, 3740 mainwin_bg = gdk_pixmap_new(mainwin->window,
3624 bmp_active_skin->properties.mainwin_width, 3741 bmp_active_skin->properties.mainwin_width,
3625 bmp_active_skin->properties.mainwin_height, -1); 3742 bmp_active_skin->properties.mainwin_height, -1);
3743 mainwin_bg_x2 = gdk_pixmap_new(mainwin->window,
3744 bmp_active_skin->properties.mainwin_width * 2,
3745 bmp_active_skin->properties.mainwin_height * 2, -1);
3626 mainwin_set_back_pixmap(); 3746 mainwin_set_back_pixmap();
3627 mainwin_create_widgets(); 3747 mainwin_create_widgets();
3628 3748
3629 vis_set_window(mainwin_vis, mainwin->window); 3749 vis_set_window(mainwin_vis, mainwin->window);
3630 } 3750 }