changeset 4216:75d99359357b

doublesize -> custom scale: * initial work, just got it to compile * doublesize is broken at all
author Cristi Magherusan <majeru@atheme.org>
date Sun, 27 Jan 2008 19:43:53 +0200
parents 6028b7fff0bd
children 742f00832961
files src/audacious/actions-mainwin.h src/audacious/main.c src/audacious/main.h src/audacious/skin.c src/audacious/skin.h src/audacious/ui_equalizer.c src/audacious/ui_equalizer.h src/audacious/ui_main.c src/audacious/ui_main.h src/audacious/ui_manager.c src/audacious/ui_skinned_menurow.c src/audacious/ui_skinned_menurow.h src/audacious/ui_skinned_window.c src/audacious/ui_svis.c src/audacious/ui_svis.h
diffstat 15 files changed, 128 insertions(+), 121 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/actions-mainwin.h	Sun Jan 27 15:15:03 2008 +0200
+++ b/src/audacious/actions-mainwin.h	Sun Jan 27 19:43:53 2008 +0200
@@ -34,7 +34,7 @@
 void action_playback_shuffle(GtkToggleAction*);
 void action_stop_after_current_song(GtkToggleAction*);
 void action_view_always_on_top(GtkToggleAction*);
-void action_view_doublesize(GtkToggleAction*);
+void action_view_scale(GtkToggleAction*);
 void action_view_easymove(GtkToggleAction*);
 void action_view_on_all_workspaces(GtkToggleAction*);
 void action_roll_up_equalizer(GtkToggleAction*);
--- a/src/audacious/main.c	Sun Jan 27 15:15:03 2008 +0200
+++ b/src/audacious/main.c	Sun Jan 27 19:43:53 2008 +0200
@@ -166,6 +166,7 @@
     0.0,                        /* equalizer preamp */
     {0.0, 0.0, 0.0, 0.0, 0.0,             /* equalizer bands */
      0.0, 0.0, 0.0, 0.0, 0.0},
+    1.0,                        /* GUI scale factor */
     NULL,                       /* skin */
     NULL,                       /* output plugin */
     NULL,                       /* file selector path */
@@ -292,7 +293,7 @@
     {"dim_titlebar", &cfg.dim_titlebar, TRUE},
     {"get_info_on_load", &cfg.get_info_on_load, TRUE},
     {"get_info_on_demand", &cfg.get_info_on_demand, TRUE},
-    {"eq_doublesize_linked", &cfg.eq_doublesize_linked, TRUE},
+    {"eq_scaled_linked", &cfg.eq_scaled_linked, TRUE},
     {"no_playlist_advance", &cfg.no_playlist_advance, TRUE},
     {"refresh_file_list", &cfg.refresh_file_list, TRUE},
     {"sort_jump_to_file", &cfg.sort_jump_to_file, TRUE},
@@ -303,7 +304,7 @@
     {"player_visible", &cfg.player_visible, TRUE},
     {"shuffle", &cfg.shuffle, TRUE},
     {"repeat", &cfg.repeat, TRUE},
-    {"doublesize", &cfg.doublesize, TRUE},
+    {"scaled", &cfg.scaled, TRUE},   /* toggles custom scale */
     {"autoscroll_songname", &cfg.autoscroll, TRUE},
     {"stop_after_current_song", &cfg.stopaftersong, TRUE},
     {"playlist_shaded", &cfg.playlist_shaded, TRUE},
--- a/src/audacious/main.h	Sun Jan 27 15:15:03 2008 +0200
+++ b/src/audacious/main.h	Sun Jan 27 19:43:53 2008 +0200
@@ -41,7 +41,7 @@
 #define PLAYER_HEIGHT \
   ((cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : MAINWIN_HEIGHT) * (cfg.doublesize + 1))
 #define PLAYER_WIDTH \
-  (MAINWIN_WIDTH * (cfg.doublesize + 1))
+  (MAINWIN_WIDTH * (cfg.scaled ? gui_scale_factor : 1))
 
 /* macro for debug print */
 #ifdef AUD_DEBUG
@@ -58,7 +58,7 @@
     gint snap_distance;
     gboolean use_realtime;
     gboolean shuffle, repeat;
-    gboolean doublesize, autoscroll;
+    gboolean scaled, autoscroll;
     gboolean analyzer_peaks, equalizer_autoload, easy_move, equalizer_active;
     gboolean playlist_visible, equalizer_visible, player_visible;
     gboolean player_shaded, playlist_shaded, equalizer_shaded;
@@ -68,7 +68,7 @@
     gboolean snap_windows, save_window_position;
     gboolean dim_titlebar;
     gboolean get_info_on_load, get_info_on_demand;
-    gboolean eq_doublesize_linked;
+    gboolean eq_scaled_linked;
     gboolean sort_jump_to_file;
     gboolean use_eplugins;
     gboolean always_on_top, sticky;
@@ -87,6 +87,7 @@
     gboolean close_dialog_open;
     gboolean close_dialog_add;
     gfloat equalizer_preamp, equalizer_bands[10];
+    gfloat scale_factor;
     gchar *skin;
     gchar *outputplugin;
     gchar *filesel_path;
--- a/src/audacious/skin.c	Sun Jan 27 15:15:03 2008 +0200
+++ b/src/audacious/skin.c	Sun Jan 27 19:43:53 2008 +0200
@@ -224,11 +224,11 @@
     for (i = 0; i < SKIN_MASK_COUNT; i++) {
         if (skin->masks[i])
             g_object_unref(skin->masks[i]);
-        if (skin->ds_masks[i])
-            g_object_unref(skin->ds_masks[i]);
+        if (skin->scaled_masks[i])
+            g_object_unref(skin->scaled_masks[i]);
 
         skin->masks[i] = NULL;
-        skin->ds_masks[i] = NULL;
+        skin->scaled_masks[i] = NULL;
     }
 
     for (i = 0; i < SKIN_COLOR_COUNT; i++) {
@@ -420,7 +420,7 @@
                                      skin_mask_info[id].width,
                                      skin_mask_info[id].height, FALSE);
 
-    skin->ds_masks[id] =
+    skin->scaled_masks[id] =
         skin_create_transparent_mask(path, "region.txt",
                                      skin_mask_info[id].inistr, window,
                                      skin_mask_info[id].width * 2,
@@ -1704,7 +1704,7 @@
     g_return_val_if_fail(skin != NULL, NULL);
     g_return_val_if_fail(mi < SKIN_PIXMAP_COUNT, NULL);
 
-    masks = cfg.doublesize ? skin->ds_masks : skin->masks;
+    masks = cfg.scaled ? skin->scaled_masks : skin->masks;
     return masks[mi];
 }
 
--- a/src/audacious/skin.h	Sun Jan 27 15:15:03 2008 +0200
+++ b/src/audacious/skin.h	Sun Jan 27 19:43:53 2008 +0200
@@ -174,7 +174,6 @@
 #define SKIN_PIXMAP(x)  ((SkinPixmap *)(x))
 typedef struct _SkinPixmap {
     GdkPixbuf *pixbuf;
-    /* GdkPixmap *def_pixmap; */
 
     /* The real size of the pixmap */
     gint width, height;
@@ -196,7 +195,7 @@
     GdkColor *colors[SKIN_COLOR_COUNT];
     guchar vis_color[24][3];
     GdkBitmap *masks[SKIN_MASK_COUNT];
-    GdkBitmap *ds_masks[SKIN_MASK_COUNT];
+    GdkBitmap *scaled_masks[SKIN_MASK_COUNT];
     SkinProperties properties;
 } Skin;
 
--- a/src/audacious/ui_equalizer.c	Sun Jan 27 15:15:03 2008 +0200
+++ b/src/audacious/ui_equalizer.c	Sun Jan 27 19:43:53 2008 +0200
@@ -112,7 +112,7 @@
 }
 
 void
-equalizerwin_set_doublesize(gboolean ds)
+equalizerwin_set_scaled(gboolean ds)
 {
     gint height;
 
@@ -121,8 +121,8 @@
     else
         height = 116;
 
-    if (ds) {
-        dock_window_resize(GTK_WINDOW(equalizerwin), 550, height * 2, 550, height * 2);
+    if (cfg.scaled) {
+        dock_window_resize(GTK_WINDOW(equalizerwin), 550, height * 2, 550, height * cfg.scale_factor);
     } else {
         dock_window_resize(GTK_WINDOW(equalizerwin), 275, height, 275, height);
     }
@@ -131,7 +131,7 @@
     for (iter = GTK_FIXED (SKINNED_WINDOW(equalizerwin)->fixed)->children; iter; iter = g_list_next (iter)) {
         GtkFixedChild *child_data = (GtkFixedChild *) iter->data;
         GtkWidget *child = child_data->widget;
-        g_signal_emit_by_name(child, "toggle-double-size");
+        g_signal_emit_by_name(child, "toggle-scaled");
     }
     gtk_widget_shape_combine_mask(equalizerwin, skin_get_mask(bmp_active_skin, SKIN_MASK_EQ + cfg.equalizer_shaded), 0, 0);
 }
@@ -143,7 +143,7 @@
 
     if (shaded) {
         dock_shade(dock_window_list, GTK_WINDOW(equalizerwin),
-                   14 * (EQUALIZER_DOUBLESIZE + 1));
+                   14 * EQUALIZER_SCALE_FACTOR);
         ui_skinned_set_push_button_data(equalizerwin_shade, -1, 3, -1, 47);
         ui_skinned_button_set_skin_index1(equalizerwin_shade, SKIN_EQ_EX);
         ui_skinned_set_push_button_data(equalizerwin_close, 11, 38, 11, 47);
@@ -153,7 +153,7 @@
     }
     else {
         dock_shade(dock_window_list, GTK_WINDOW(equalizerwin),
-                   116 * (EQUALIZER_DOUBLESIZE + 1));
+                   116 * EQUALIZER_SCALE_FACTOR);
         ui_skinned_set_push_button_data(equalizerwin_shade, -1, 137, -1, 38);
         ui_skinned_button_set_skin_index1(equalizerwin_shade, SKIN_EQMAIN);
         ui_skinned_set_push_button_data(equalizerwin_close, 0, 116, 0, 125);
@@ -515,9 +515,9 @@
     gtk_window_set_role(GTK_WINDOW(equalizerwin), "equalizer");
     gtk_window_set_resizable(GTK_WINDOW(equalizerwin), FALSE);
 
-    if (cfg.doublesize && cfg.eq_doublesize_linked) {
-        width *= 2;
-        height *= 2;
+    if (cfg.scaled && cfg.eq_scaled_linked) {
+        width *= cfg.scale_factor;
+        height *= cfg.scale_factor;
     }
 
     gtk_widget_set_size_request(equalizerwin, width, height);
@@ -578,7 +578,7 @@
 equalizerwin_real_show(void)
 {
     gtk_window_move(GTK_WINDOW(equalizerwin), cfg.equalizer_x, cfg.equalizer_y);
-    if (cfg.doublesize && cfg.eq_doublesize_linked)
+    if (cfg.scaled && cfg.eq_scaled_linked)
         gtk_widget_set_size_request(equalizerwin, 550,
                                     (cfg.equalizer_shaded ? 28 : 232));
     else
--- a/src/audacious/ui_equalizer.h	Sun Jan 27 15:15:03 2008 +0200
+++ b/src/audacious/ui_equalizer.h	Sun Jan 27 19:43:53 2008 +0200
@@ -29,9 +29,11 @@
 #include <glib.h>
 #include <gtk/gtk.h>
 
-#define EQUALIZER_DOUBLESIZE     (cfg.doublesize && cfg.eq_doublesize_linked)
-#define EQUALIZER_HEIGHT         ((cfg.equalizer_shaded ? 14 : 116) * (EQUALIZER_DOUBLESIZE + 1))
-#define EQUALIZER_WIDTH          (275 * (EQUALIZER_DOUBLESIZE + 1))
+#define EQUALIZER_SCALED     (cfg.scaled && cfg.eq_scaled_linked)
+#define EQUALIZER_SCALE_FACTOR (EQUALIZER_SCALED ? cfg.scale_factor : 1)
+
+#define EQUALIZER_HEIGHT         ((cfg.equalizer_shaded ? 14 : 116) * (EQUALIZER_SCALE_FACTOR))
+#define EQUALIZER_WIDTH          (275 * EQUALIZER_SCALE_FACTOR)
 
 #define EQUALIZER_DEFAULT_POS_X  20
 #define EQUALIZER_DEFAULT_POS_Y  136
@@ -39,7 +41,7 @@
 #define EQUALIZER_DEFAULT_DIR_PRESET "dir_default.preset"
 #define EQUALIZER_DEFAULT_PRESET_EXT "preset"
 
-void equalizerwin_set_doublesize(gboolean ds);
+void equalizerwin_set_scaled(gboolean ds);
 void equalizerwin_set_shade_menu_cb(gboolean shaded);
 void draw_equalizer_window(gboolean force);
 void equalizerwin_create(void);
--- a/src/audacious/ui_main.c	Sun Jan 27 15:15:03 2008 +0200
+++ b/src/audacious/ui_main.c	Sun Jan 27 19:43:53 2008 +0200
@@ -179,7 +179,7 @@
 void mainwin_position_motion_cb(GtkWidget *widget, gint pos);
 void mainwin_position_release_cb(GtkWidget *widget, gint pos);
 
-void set_doublesize(gboolean doublesize);
+void set_scaled(gboolean scaled);
 void mainwin_eq_pushed(gboolean toggled);
 void mainwin_pl_pushed(gboolean toggled);
 
@@ -246,12 +246,12 @@
 
     if (shaded) {
         dock_shade(dock_window_list, GTK_WINDOW(mainwin),
-                   MAINWIN_SHADED_HEIGHT * (cfg.doublesize + 1));
+                   MAINWIN_SHADED_HEIGHT * MAINWIN_SCALE_FACTOR);
     } else {
         gint height = !bmp_active_skin->properties.mainwin_height ? MAINWIN_HEIGHT :
                        bmp_active_skin->properties.mainwin_height;
 
-        dock_shade(dock_window_list, GTK_WINDOW(mainwin), height * (cfg.doublesize + 1));
+        dock_shade(dock_window_list, GTK_WINDOW(mainwin), height * MAINWIN_SCALE_FACTOR);
     }
 
     mainwin_refresh_hints();
@@ -353,8 +353,8 @@
     gint x, y;
     gtk_window_get_position(GTK_WINDOW(mainwin), &x, &y);
     ui_manager_popup_menu_show(GTK_MENU(mainwin_general_menu),
-                            x + 6 * (1 + cfg.doublesize),
-                            y + MAINWIN_SHADED_HEIGHT * (1 + cfg.doublesize),
+                            x + 6 * MAINWIN_SCALE_FACTOR ,
+                            y + MAINWIN_SHADED_HEIGHT * MAINWIN_SCALE_FACTOR,
                             1, GDK_CURRENT_TIME);
 }
 
@@ -573,8 +573,8 @@
         bmp_active_skin->properties.mainwin_vis_y);
 
     if (bmp_active_skin->properties.mainwin_vis_width)
-    gtk_widget_set_size_request(mainwin_vis, bmp_active_skin->properties.mainwin_vis_width*(1+cfg.doublesize),
-        UI_VIS(mainwin_vis)->height*(1+cfg.doublesize));
+    gtk_widget_set_size_request(mainwin_vis, bmp_active_skin->properties.mainwin_vis_width * MAINWIN_SCALE_FACTOR,
+        UI_VIS(mainwin_vis)->height* MAINWIN_SCALE_FACTOR);
 
     if (bmp_active_skin->properties.mainwin_text_x && bmp_active_skin->properties.mainwin_text_y)
     gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_info), bmp_active_skin->properties.mainwin_text_x,
@@ -582,8 +582,8 @@
 
     if (bmp_active_skin->properties.mainwin_text_width) {
         UI_SKINNED_TEXTBOX(mainwin_info)->width = bmp_active_skin->properties.mainwin_text_width;
-        gtk_widget_set_size_request(mainwin_info, bmp_active_skin->properties.mainwin_text_width*(1+cfg.doublesize),
-                                    UI_SKINNED_TEXTBOX(mainwin_info)->height*(1+cfg.doublesize));
+        gtk_widget_set_size_request(mainwin_info, bmp_active_skin->properties.mainwin_text_width * MAINWIN_SCALE_FACTOR,
+                                    UI_SKINNED_TEXTBOX(mainwin_info)->height * MAINWIN_SCALE_FACTOR );
     }
 
     if (bmp_active_skin->properties.mainwin_infobar_x && bmp_active_skin->properties.mainwin_infobar_y)
@@ -687,10 +687,10 @@
     /* window size, mainwinWidth && mainwinHeight properties */
     if (bmp_active_skin->properties.mainwin_height && bmp_active_skin->properties.mainwin_width)
     {
-        dock_window_resize(GTK_WINDOW(mainwin), cfg.player_shaded ? MAINWIN_SHADED_WIDTH * (cfg.doublesize + 1) : bmp_active_skin->properties.mainwin_width * (cfg.doublesize + 1),
-            cfg.player_shaded ? MAINWIN_SHADED_HEIGHT * (cfg.doublesize + 1) : bmp_active_skin->properties.mainwin_height * (cfg.doublesize + 1),
-            bmp_active_skin->properties.mainwin_width * (cfg.doublesize + 1),
-            bmp_active_skin->properties.mainwin_height * (cfg.doublesize + 1));
+        dock_window_resize(GTK_WINDOW(mainwin), cfg.player_shaded ? MAINWIN_SHADED_WIDTH * MAINWIN_SCALE_FACTOR : bmp_active_skin->properties.mainwin_width * MAINWIN_SCALE_FACTOR,
+            cfg.player_shaded ? MAINWIN_SHADED_HEIGHT * MAINWIN_SCALE_FACTOR : bmp_active_skin->properties.mainwin_height * MAINWIN_SCALE_FACTOR,
+            bmp_active_skin->properties.mainwin_width * MAINWIN_SCALE_FACTOR,
+            bmp_active_skin->properties.mainwin_height * MAINWIN_SCALE_FACTOR);
 
         gdk_flush();
     }
@@ -850,14 +850,14 @@
                            GdkEventButton * event,
                            gpointer callback_data)
 {
-    if (cfg.doublesize) {
+    if (cfg.scaled) {
         /*
-         * A hack to make doublesize transparent to callbacks.
+         * A hack to make scaling transparent to callbacks.
          * We should make a copy of this data instead of
          * tampering with the data we get from gtk+
          */
-        event->x /= 2;
-        event->y /= 2;
+        event->x /= cfg.scale_factor;
+        event->y /= cfg.scale_factor;
     }
 
     if (event->button == 1 && event->type == GDK_BUTTON_PRESS &&
@@ -1790,7 +1790,7 @@
 }
 
 static void
-mainwin_set_doublesize(gboolean doublesize)
+mainwin_set_scaled(gboolean scaled)
 {
     gint height;
 
@@ -1801,13 +1801,13 @@
 
     dock_window_resize(GTK_WINDOW(mainwin), cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width,
         cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height,
-        bmp_active_skin->properties.mainwin_width * 2, bmp_active_skin->properties.mainwin_height * 2);
+        bmp_active_skin->properties.mainwin_width * cfg.scale_factor , bmp_active_skin->properties.mainwin_height * cfg.scale_factor);
 
     GList *iter;
     for (iter = GTK_FIXED (SKINNED_WINDOW(mainwin)->fixed)->children; iter; iter = g_list_next (iter)) {
         GtkFixedChild *child_data = (GtkFixedChild *) iter->data;
         GtkWidget *child = child_data->widget;
-        g_signal_emit_by_name(child, "toggle-double-size");
+        g_signal_emit_by_name(child, "toggle-scaled");
     }
 
     mainwin_refresh_hints();
@@ -1815,14 +1815,14 @@
 }
 
 void
-set_doublesize(gboolean doublesize)
+set_scaled(gboolean scaled)
 {
-    cfg.doublesize = doublesize;
-
-    mainwin_set_doublesize(doublesize);
-
-    if (cfg.eq_doublesize_linked)
-        equalizerwin_set_doublesize(doublesize);
+    cfg.scaled = scaled;
+
+    mainwin_set_scaled(scaled);
+
+    if (cfg.eq_scaled_linked)
+        equalizerwin_set_scaled(scaled);
 }
 
 
@@ -1961,11 +1961,11 @@
     case MENUROW_FILEINFOBOX:
         mainwin_lock_info_text(_("File Info Box"));
         break;
-    case MENUROW_DOUBLESIZE:
-        if (UI_SKINNED_MENUROW(mainwin_menurow)->doublesize_selected)
-            mainwin_lock_info_text(_("Disable 'Doublesize'"));
+    case MENUROW_SCALE:
+        if (UI_SKINNED_MENUROW(mainwin_menurow)->scale_selected)
+            mainwin_lock_info_text(_("Disable 'GUI Scaling'"));
         else
-            mainwin_lock_info_text(_("Enable 'Doublesize'"));
+            mainwin_lock_info_text(_("Enable 'GUI Scaling'"));
         break;
     case MENUROW_VISUALIZATION:
         mainwin_lock_info_text(_("Visualization Menu"));
@@ -1993,11 +1993,11 @@
     case MENUROW_FILEINFOBOX:
         playlist_fileinfo_current(playlist_get_active());
         break;
-    case MENUROW_DOUBLESIZE:
+    case MENUROW_SCALE:
         gtk_toggle_action_set_active(
           GTK_TOGGLE_ACTION(gtk_action_group_get_action(
           toggleaction_group_others , "view doublesize" )) ,
-          UI_SKINNED_MENUROW(mainwin_menurow)->doublesize_selected );
+          UI_SKINNED_MENUROW(mainwin_menurow)->scale_selected );
         break;
     case MENUROW_VISUALIZATION:
         ui_manager_popup_menu_show(GTK_MENU(mainwin_visualization_menu),
@@ -2134,7 +2134,7 @@
     check_set(toggleaction_group_others, "roll up playlist editor", cfg.playlist_shaded);
     check_set(toggleaction_group_others, "roll up equalizer", cfg.equalizer_shaded);
     check_set(toggleaction_group_others, "view easy move", cfg.easy_move);
-    check_set(toggleaction_group_others, "view doublesize", cfg.doublesize);
+    check_set(toggleaction_group_others, "view scaled", cfg.scaled);
 
     /* Songname menu */
 
@@ -2503,9 +2503,9 @@
     width = cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width;
     height = cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height;
 
-    if (cfg.doublesize) {
-        width *= 2;
-        height *= 2;
+    if (cfg.scaled) {
+        width *= cfg.scale_factor;
+        height *= cfg.scale_factor;
     }
 
     gtk_widget_set_size_request(mainwin, width, height);
@@ -2736,11 +2736,11 @@
 }
 
 void
-action_view_doublesize( GtkToggleAction * action )
+action_view_scale( GtkToggleAction * action )
 {
-  UI_SKINNED_MENUROW(mainwin_menurow)->doublesize_selected = gtk_toggle_action_get_active( action );
+  UI_SKINNED_MENUROW(mainwin_menurow)->scale_selected = gtk_toggle_action_get_active( action );
   gtk_widget_queue_draw(mainwin_menurow);
-  set_doublesize(UI_SKINNED_MENUROW(mainwin_menurow)->doublesize_selected);
+  set_scaled(UI_SKINNED_MENUROW(mainwin_menurow)->scale_selected);
   gdk_flush();
 }
 
--- a/src/audacious/ui_main.h	Sun Jan 27 15:15:03 2008 +0200
+++ b/src/audacious/ui_main.h	Sun Jan 27 19:43:53 2008 +0200
@@ -34,6 +34,7 @@
 #define MAINWIN_TITLEBAR_HEIGHT  (gint)14
 #define MAINWIN_SHADED_WIDTH     MAINWIN_WIDTH
 #define MAINWIN_SHADED_HEIGHT    MAINWIN_TITLEBAR_HEIGHT
+#define MAINWIN_SCALE_FACTOR     (cfg.scaled ? cfg.scale_factor : 1)
 
 #define MAINWIN_UPDATE_INTERVAL  100
 
--- a/src/audacious/ui_manager.c	Sun Jan 27 15:15:03 2008 +0200
+++ b/src/audacious/ui_manager.c	Sun Jan 27 19:43:53 2008 +0200
@@ -87,8 +87,8 @@
 	{ "roll up equalizer", NULL , N_("Roll up Equalizer"), "<Ctrl><Alt>W",
 	  N_("Roll up Equalizer"), G_CALLBACK(action_roll_up_equalizer) , FALSE },
 
-	{ "view doublesize", NULL , N_("DoubleSize"), "<Ctrl>D",
-	  N_("DoubleSize"), G_CALLBACK(action_view_doublesize) , FALSE },
+	{ "view scale", NULL , N_("Scale"), "<Ctrl>D",
+	  N_("DoubleSize"), G_CALLBACK(action_view_scale) , FALSE },
 
 	{ "view easy move", NULL , N_("Easy Move"), "<Ctrl>E",
 	  N_("Easy Move"), G_CALLBACK(action_view_easymove) , FALSE }
--- a/src/audacious/ui_skinned_menurow.c	Sun Jan 27 15:15:03 2008 +0200
+++ b/src/audacious/ui_skinned_menurow.c	Sun Jan 27 19:43:53 2008 +0200
@@ -46,7 +46,7 @@
 static gboolean ui_skinned_menurow_button_press   (GtkWidget *widget, GdkEventButton *event);
 static gboolean ui_skinned_menurow_button_release (GtkWidget *widget, GdkEventButton *event);
 static gboolean ui_skinned_menurow_motion_notify  (GtkWidget *widget, GdkEventMotion *event);
-static void ui_skinned_menurow_toggle_doublesize  (UiSkinnedMenurow *menurow);
+static void ui_skinned_menurow_toggle_scaled  (UiSkinnedMenurow *menurow);
 
 static GtkWidgetClass *parent_class = NULL;
 static guint menurow_signals[LAST_SIGNAL] = { 0 };
@@ -91,13 +91,13 @@
     widget_class->button_release_event = ui_skinned_menurow_button_release;
     widget_class->motion_notify_event = ui_skinned_menurow_motion_notify;
 
-    klass->doubled = ui_skinned_menurow_toggle_doublesize;
+    klass->scaled = ui_skinned_menurow_toggle_scaled;
     klass->change = NULL;
     klass->release = NULL;
 
     menurow_signals[DOUBLED] = 
-        g_signal_new ("toggle-double-size", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
-                      G_STRUCT_OFFSET (UiSkinnedMenurowClass, doubled), NULL, NULL,
+        g_signal_new ("toggle-scaled", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
+                      G_STRUCT_OFFSET (UiSkinnedMenurowClass, scaled), NULL, NULL,
                       gtk_marshal_VOID__VOID, G_TYPE_NONE, 0);
 
 
@@ -114,7 +114,7 @@
 }
 
 static void ui_skinned_menurow_init(UiSkinnedMenurow *menurow) {
-    menurow->doublesize_selected = cfg.doublesize;
+    menurow->scale_selected = cfg.scaled;
     menurow->always_selected = cfg.always_on_top;
 }
 
@@ -133,7 +133,7 @@
 
     menurow->skin_index = si;
 
-    menurow->double_size = FALSE;
+    menurow->scaled = FALSE;
 
     gtk_fixed_put(GTK_FIXED(fixed), GTK_WIDGET(menurow), menurow->x, menurow->y);
 
@@ -186,21 +186,21 @@
 static void ui_skinned_menurow_size_request(GtkWidget *widget, GtkRequisition *requisition) {
     UiSkinnedMenurow *menurow = UI_SKINNED_MENUROW(widget);
 
-    requisition->width = menurow->width*(1+menurow->double_size);
-    requisition->height = menurow->height*(1+menurow->double_size);
+    requisition->width = menurow->width*(1+menurow->scaled);
+    requisition->height = menurow->height*(1+menurow->scaled);
 }
 
 static void ui_skinned_menurow_size_allocate(GtkWidget *widget, GtkAllocation *allocation) {
     UiSkinnedMenurow *menurow = UI_SKINNED_MENUROW (widget);
 
     widget->allocation = *allocation;
-    widget->allocation.x *= (1+menurow->double_size);
-    widget->allocation.y *= (1+menurow->double_size);
+    widget->allocation.x *= (1+menurow->scaled);
+    widget->allocation.y *= (1+menurow->scaled);
     if (GTK_WIDGET_REALIZED (widget))
         gdk_window_move_resize(widget->window, widget->allocation.x, widget->allocation.y, allocation->width, allocation->height);
 
-    menurow->x = widget->allocation.x/(menurow->double_size ? 2 : 1);
-    menurow->y = widget->allocation.y/(menurow->double_size ? 2 : 1);
+    menurow->x = widget->allocation.x/(menurow->scaled ? 2 : 1);
+    menurow->y = widget->allocation.y/(menurow->scaled ? 2 : 1);
 }
 
 static gboolean ui_skinned_menurow_expose(GtkWidget *widget, GdkEventExpose *event) {
@@ -231,12 +231,12 @@
         if (menurow->always_selected)
             skin_draw_pixbuf(widget, bmp_active_skin, obj, menurow->skin_index,
                              menurow->sx + 8, menurow->sy + 10, 0, 10, 8, 8);
-        if (menurow->doublesize_selected)
+        if (menurow->scale_selected)
             skin_draw_pixbuf(widget, bmp_active_skin, obj, menurow->skin_index,
                              menurow->sx + 24, menurow->sy + 26, 0, 26, 8, 8);
     }
 
-    ui_skinned_widget_draw(widget, obj, menurow->width, menurow->height, menurow->double_size);
+    ui_skinned_widget_draw(widget, obj, menurow->width, menurow->height, menurow->scaled);
 
     g_object_unref(obj);
 
@@ -246,8 +246,8 @@
 static MenuRowItem menurow_find_selected(UiSkinnedMenurow * mr, gint x, gint y) {
     MenuRowItem ret = MENUROW_NONE;
 
-    x = x/(mr->double_size ? 2 : 1);
-    y = y/(mr->double_size ? 2 : 1);
+    x = x/(mr->scaled ? 2 : 1);
+    y = y/(mr->scaled ? 2 : 1);
     if (x > 0 && x < 8) {
         if (y >= 0 && y <= 10)
             ret = MENUROW_OPTIONS;
@@ -256,7 +256,7 @@
         if (y >= 18 && y <= 25)
             ret = MENUROW_FILEINFOBOX;
         if (y >= 26 && y <= 33)
-            ret = MENUROW_DOUBLESIZE;
+            ret = MENUROW_SCALE;
         if (y >= 34 && y <= 42)
             ret = MENUROW_VISUALIZATION;
     }
@@ -292,8 +292,8 @@
         if (menurow->selected == MENUROW_ALWAYS)
             menurow->always_selected = !menurow->always_selected;
 
-        if (menurow->selected == MENUROW_DOUBLESIZE)
-            menurow->doublesize_selected = !menurow->doublesize_selected;
+        if (menurow->selected == MENUROW_SCALE)
+            menurow->scale_selected = !menurow->scale_selected;
 
         if ((int)(menurow->selected) != -1)
             g_signal_emit_by_name(widget, "release", menurow->selected, event);
@@ -321,11 +321,12 @@
     return TRUE;
 }
 
-static void ui_skinned_menurow_toggle_doublesize(UiSkinnedMenurow *menurow) {
+static void ui_skinned_menurow_toggle_scaled(UiSkinnedMenurow *menurow) {
     GtkWidget *widget = GTK_WIDGET (menurow);
 
-    menurow->double_size = !menurow->double_size;
-    gtk_widget_set_size_request(widget, menurow->width*(1+menurow->double_size), menurow->height*(1+menurow->double_size));
+    menurow->scaled = !menurow->scaled;
+    gtk_widget_set_size_request(widget, menurow->width* (menurow->scaled ? cfg.scale_factor : 1),
+    menurow->height * (menurow->scaled ? cfg.scale_factor : 1));
 
     gtk_widget_queue_draw(GTK_WIDGET(menurow));
 }
--- a/src/audacious/ui_skinned_menurow.h	Sun Jan 27 15:15:03 2008 +0200
+++ b/src/audacious/ui_skinned_menurow.h	Sun Jan 27 19:43:53 2008 +0200
@@ -43,26 +43,26 @@
 
 typedef enum {
     MENUROW_NONE, MENUROW_OPTIONS, MENUROW_ALWAYS, MENUROW_FILEINFOBOX,
-    MENUROW_DOUBLESIZE, MENUROW_VISUALIZATION
+    MENUROW_SCALE, MENUROW_VISUALIZATION
 } MenuRowItem;
 
 struct _UiSkinnedMenurow {
     GtkWidget        widget;
 
     gint             x, y, width, height;
-    gboolean         double_size;
+    gboolean         scaled;
     gint             nx, ny;
     gint             sx, sy;
     MenuRowItem      selected;
     gboolean         always_selected;
-    gboolean         doublesize_selected;
+    gboolean         scale_selected;
     gboolean         pushed;
     SkinPixmapId     skin_index;
 };
 
 struct _UiSkinnedMenurowClass {
     GtkWidgetClass          parent_class;
-    void (* doubled)        (UiSkinnedMenurow *menurow);
+    void (* scaled)        (UiSkinnedMenurow *menurow);
     void (* change)         (UiSkinnedMenurow *menurow);
     void (* release)        (UiSkinnedMenurow *menurow);
 };
--- a/src/audacious/ui_skinned_window.c	Sun Jan 27 15:15:03 2008 +0200
+++ b/src/audacious/ui_skinned_window.c	Sun Jan 27 19:43:53 2008 +0200
@@ -204,7 +204,7 @@
     }
 
     ui_skinned_widget_draw(GTK_WIDGET(window), obj, width, height,
-                           window->type != WINDOW_PLAYLIST && cfg.doublesize);
+                           window->type != WINDOW_PLAYLIST && cfg.scaled);
 
     g_object_unref(obj);
 
--- a/src/audacious/ui_svis.c	Sun Jan 27 15:15:03 2008 +0200
+++ b/src/audacious/ui_svis.c	Sun Jan 27 19:43:53 2008 +0200
@@ -69,7 +69,7 @@
 static void ui_svis_size_request       (GtkWidget *widget, GtkRequisition *requisition);
 static void ui_svis_size_allocate      (GtkWidget *widget, GtkAllocation *allocation);
 static gboolean ui_svis_expose         (GtkWidget *widget, GdkEventExpose *event);
-static void ui_svis_toggle_doublesize  (UiSVis *svis);
+static void ui_svis_toggle_scaled      (UiSVis *svis);
 
 static GtkWidgetClass *parent_class = NULL;
 static guint vis_signals[LAST_SIGNAL] = { 0 };
@@ -112,11 +112,11 @@
     widget_class->size_request = ui_svis_size_request;
     widget_class->size_allocate = ui_svis_size_allocate;
 
-    klass->doubled = ui_svis_toggle_doublesize;
+    klass->scaled = ui_svis_toggle_scaled;
 
     vis_signals[DOUBLED] = 
-        g_signal_new ("toggle-double-size", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
-                      G_STRUCT_OFFSET (UiSVisClass, doubled), NULL, NULL,
+        g_signal_new ("toggle-scaled", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
+                      G_STRUCT_OFFSET (UiSVisClass, scaled), NULL, NULL,
                       gtk_marshal_VOID__VOID, G_TYPE_NONE, 0);
 }
 
@@ -134,7 +134,7 @@
     svis->height = SVIS_HEIGHT;
 
     svis->fixed = fixed;
-    svis->double_size = FALSE;
+    svis->scaled = FALSE;
 
     svis->visible_window = TRUE;
     svis->event_window = NULL;
@@ -242,16 +242,16 @@
 static void ui_svis_size_request(GtkWidget *widget, GtkRequisition *requisition) {
     UiSVis *svis = UI_SVIS(widget);
 
-    requisition->width = svis->width*(1+svis->double_size);
-    requisition->height = svis->height*(1+svis->double_size);
+    requisition->width = svis->width*(1+svis->scaled);
+    requisition->height = svis->height*(1+svis->scaled);
 }
 
 static void ui_svis_size_allocate(GtkWidget *widget, GtkAllocation *allocation) {
     UiSVis *svis = UI_SVIS (widget);
 
     widget->allocation = *allocation;
-    widget->allocation.x *= (1+svis->double_size);
-    widget->allocation.y *= (1+svis->double_size);
+    widget->allocation.x *= (1+svis->scaled);
+    widget->allocation.y *= (1+svis->scaled);
     if (GTK_WIDGET_REALIZED (widget))
     {
         if (svis->event_window != NULL)
@@ -260,8 +260,8 @@
             gdk_window_move_resize(widget->window, widget->allocation.x, widget->allocation.y, allocation->width, allocation->height);
     }
 
-    svis->x = widget->allocation.x/(svis->double_size ? 2 : 1);
-    svis->y = widget->allocation.y/(svis->double_size ? 2 : 1);
+    svis->x = widget->allocation.x/(svis->scaled ? 2 : 1);
+    svis->y = widget->allocation.y/(svis->scaled ? 2 : 1);
 }
 
 static gboolean ui_svis_expose(GtkWidget *widget, GdkEventExpose *event) {
@@ -290,7 +290,7 @@
     }
     cmap = gdk_rgb_cmap_new(colors, 24);
 
-    if (!cfg.doublesize) {
+    if (!cfg.scaled) {
       memset(rgb_data, 0, SVIS_WIDTH * SVIS_HEIGHT);
       if (cfg.vis_type == VIS_ANALYZER  && !playback_get_paused() && playback_get_playing()){
 	for(y=0; y < SVIS_HEIGHT; y++){
@@ -352,16 +352,16 @@
         }
 
     }
-    else {                      /* doublesize */
+    else {   /*            svis scaling is disabled for now 
 
-        memset(rgb_data, 0, SVIS_WIDTH * 2 * SVIS_HEIGHT * 2);
-        if (cfg.vis_type == VIS_ANALYZER && !playback_get_paused() && playback_get_playing()){
+      memset(rgb_data, 0, SVIS_WIDTH * cfg.scale_factor * SVIS_HEIGHT * cfg.scale_factor);
+      if (cfg.vis_type == VIS_ANALYZER && !playback_get_paused() && playback_get_playing()){
 	  for(y=0; y < SVIS_HEIGHT; y++){
             if (cfg.analyzer_type == ANALYZER_BARS){
               for(x=0;x< SVIS_WIDTH; x++){
                 if(svis->data[x] > y << 1)
                 {
-                  ptr = rgb_data + x * 6 + (SVIS_HEIGHT * 2 - y * 2) * SVIS_WIDTH * 2;
+                  ptr = rgb_data + x * 6 + (SVIS_HEIGHT * 2 - y * 2) * SVIS_WIDTH *2;
                   DRAW_DS_PIXEL(ptr, 23);
                   DRAW_DS_PIXEL(ptr + 2, 23);
                 }
@@ -418,15 +418,16 @@
             }
         }
 
-
+*/
     }
 
     GdkPixmap *obj = NULL;
     GdkGC *gc;
-    obj = gdk_pixmap_new(NULL, svis->width*(1+svis->double_size), svis->height*(1+svis->double_size), gdk_rgb_get_visual()->depth);
+    obj = gdk_pixmap_new(NULL, svis->width* ( svis->scaled ? cfg.scale_factor : 1), 
+        svis->height*(svis->scaled ? cfg.scale_factor : 1), gdk_rgb_get_visual()->depth);
     gc = gdk_gc_new(obj);
 
-    if (!svis->double_size) {
+    if (!svis->scaled) {
         gdk_draw_indexed_image(obj, gc, 0, 0, svis->width, svis->height,
                                GDK_RGB_DITHER_NORMAL, (guchar *) rgb_data,
                                38, cmap);
@@ -440,18 +441,19 @@
 
     gdk_rgb_cmap_free(cmap);
     gdk_draw_drawable (widget->window, gc, obj, 0, 0, 0, 0,
-                       svis->width*(1+svis->double_size), svis->height*(1+svis->double_size));
+                       svis->width*(svis->scaled ? cfg.scale_factor : 1), 
+                       svis->height*(svis->scaled ? cfg.scale_factor : 1));
     g_object_unref(obj);
     g_object_unref(gc);
 
     return FALSE;
 }
 
-static void ui_svis_toggle_doublesize(UiSVis *svis) {
+static void ui_svis_toggle_scaled(UiSVis *svis) {
     GtkWidget *widget = GTK_WIDGET (svis);
-    svis->double_size = !svis->double_size;
+    svis->scaled = !svis->scaled;
 
-    gtk_widget_set_size_request(widget, svis->width*(1+svis->double_size), svis->height*(1+svis->double_size));
+    gtk_widget_set_size_request(widget, svis->width* cfg.scale_factor, svis->height * cfg.scale_factor);
 
     gtk_widget_queue_draw(widget);
 }
--- a/src/audacious/ui_svis.h	Sun Jan 27 15:15:03 2008 +0200
+++ b/src/audacious/ui_svis.h	Sun Jan 27 19:43:53 2008 +0200
@@ -40,7 +40,7 @@
     gint             x, y, width, height;
     gint             data[75];
     gint             refresh_delay;
-    gboolean         double_size;
+    gboolean         scaled;
     GtkWidget        *fixed;
     gboolean         visible_window;
     GdkWindow        *event_window;
@@ -48,7 +48,7 @@
 
 struct _UiSVisClass {
     GtkWidgetClass          parent_class;
-    void (* doubled)        (UiSVis *vis);
+    void (* scaled)        (UiSVis *vis);
 };
 
 GtkWidget* ui_svis_new (GtkWidget *fixed, gint x, gint y);