changeset 4551:d09dd0960a6a

kill skin_load_cursor
author Tomasz Mon <desowin@gmail.com>
date Sun, 18 May 2008 08:59:01 +0200
parents 8445515efab1
children 1fe29814b90c
files src/audacious/audconfig.c src/audacious/audconfig.h src/audacious/ui_preferences.c src/audacious/ui_skin.c src/audacious/ui_skinned_window.c
diffstat 5 files changed, 3 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/audconfig.c	Sat May 17 14:22:22 2008 +0300
+++ b/src/audacious/audconfig.c	Sun May 18 08:59:01 2008 +0200
@@ -97,7 +97,6 @@
     .random_skin_on_play = FALSE,
     .use_fontsets = FALSE,
     .mainwin_use_bitmapfont = TRUE,
-    .custom_cursors = TRUE,
     .allow_broken_skins = FALSE,
     .close_dialog_open = TRUE,
     .close_dialog_add = TRUE,
@@ -256,7 +255,6 @@
     {"show_wm_decorations", &cfg.show_wm_decorations, TRUE},
     {"eq_extra_filtering", &cfg.eq_extra_filtering, TRUE},
     {"analyzer_peaks", &cfg.analyzer_peaks, TRUE},
-    {"custom_cursors", &cfg.custom_cursors, TRUE},
     {"allow_broken_skins", &cfg.allow_broken_skins, TRUE},
     {"close_dialog_open", &cfg.close_dialog_open, TRUE},
     {"close_dialog_add", &cfg.close_dialog_add, TRUE},
--- a/src/audacious/audconfig.h	Sat May 17 14:22:22 2008 +0300
+++ b/src/audacious/audconfig.h	Sun May 18 08:59:01 2008 +0200
@@ -59,7 +59,6 @@
     gboolean random_skin_on_play;
     gboolean use_fontsets;
     gboolean mainwin_use_bitmapfont;
-    gboolean custom_cursors;
     gboolean allow_broken_skins;
     gboolean close_dialog_open;
     gboolean close_dialog_add;
--- a/src/audacious/ui_preferences.c	Sat May 17 14:22:22 2008 +0300
+++ b/src/audacious/ui_preferences.c	Sun May 18 08:59:01 2008 +0200
@@ -228,7 +228,6 @@
         G_CALLBACK(playlist_show_pl_separator_numbers_cb), NULL, FALSE},
     {WIDGET_CHK_BTN, N_("Show separators in playlist"), &cfg.show_separator_in_pl,
         G_CALLBACK(playlist_show_pl_separator_numbers_cb), NULL, FALSE},
-    {WIDGET_CHK_BTN, N_("Use custom cursors"), &cfg.custom_cursors, G_CALLBACK(skin_reload_forced), NULL, FALSE},
     {WIDGET_CHK_BTN, N_("Show window manager decoration"), &cfg.show_wm_decorations, G_CALLBACK(show_wm_decorations_cb),
         N_("This enables the window manager to show decorations for windows."), FALSE},
     {WIDGET_CHK_BTN, N_("Use XMMS-style file selector instead of the default selector"), &cfg.use_xmms_style_fileselector, NULL, 
--- a/src/audacious/ui_skin.c	Sat May 17 14:22:22 2008 +0300
+++ b/src/audacious/ui_skin.c	Sun May 18 08:59:01 2008 +0200
@@ -486,7 +486,7 @@
                     GDK_RGB_DITHER_NONE, 0, 0);
     /* Get the first line of text */
     gi = gdk_drawable_get_image(text, 0, 0, 152, 6);
-    cm = gdk_drawable_get_colormap(playlistwin->window);
+    cm = gdk_colormap_get_system();
 
     for (i = 0; i < 6; i++) {
         GdkColor c;
@@ -1227,8 +1227,6 @@
             if (len >= 2)
                 color->blue = hex_chars_to_int(*ptr, *(ptr + 1));
 
-            gdk_colormap_alloc_color(gdk_drawable_get_colormap(playlistwin->window),
-                            color, TRUE, TRUE);
             g_free(value);
         }
     }
@@ -1387,39 +1385,6 @@
     numbers->width = 108;
 }
 
-static void
-skin_load_cursor(Skin * skin, const gchar * dirname)
-{
-    const gchar * basename = "normal.cur";
-    gchar * filename = NULL;
-    GdkPixbuf * cursor_pixbuf = NULL;
-    GdkPixbufAnimation * cursor_animated = NULL;
-    GdkCursor * cursor_gdk = NULL;
-    GError * error = NULL;
- 
-    filename = find_file_recursively(dirname, basename);
-
-    if (filename && cfg.custom_cursors)
-        cursor_animated = gdk_pixbuf_animation_new_from_file(filename, &error);
-
-    if (cursor_animated) {
-        cursor_pixbuf = gdk_pixbuf_animation_get_static_image(cursor_animated);
-        cursor_gdk = gdk_cursor_new_from_pixbuf(gdk_display_get_default(),
-                                                cursor_pixbuf, 0, 0);
-    }
-    else
-        cursor_gdk = gdk_cursor_new(GDK_LEFT_PTR);
-
-    if (mainwin && playlistwin && equalizerwin)
-    {
-        gdk_window_set_cursor(mainwin->window, cursor_gdk);
-        gdk_window_set_cursor(playlistwin->window, cursor_gdk);
-        gdk_window_set_cursor(equalizerwin->window, cursor_gdk);
-    }
-
-    gdk_cursor_unref(cursor_gdk);
-}
-
 static gboolean
 skin_load_pixmaps(Skin * skin, const gchar * path)
 {
@@ -1577,8 +1542,6 @@
         return FALSE;
     }
 
-    skin_load_cursor(skin, skin_path);
-
     /* restore gtk theme if changed by previous skin */
     settings = gtk_settings_get_default();
 
--- a/src/audacious/ui_skinned_window.c	Sat May 17 14:22:22 2008 +0300
+++ b/src/audacious/ui_skinned_window.c	Sun May 18 08:59:01 2008 +0200
@@ -150,9 +150,9 @@
         case WINDOW_PLAYLIST:
             focus |= !cfg.dim_titlebar;
             if (cfg.playlist_shaded) {
-                skin_draw_playlistwin_shaded(aud_active_skin, obj, playlistwin_get_width(), focus);
+                skin_draw_playlistwin_shaded(aud_active_skin, obj, width, focus);
             } else {
-                skin_draw_playlistwin_frame(aud_active_skin, obj, playlistwin_get_width(), cfg.playlist_height, focus);
+                skin_draw_playlistwin_frame(aud_active_skin, obj, width, cfg.playlist_height, focus);
             }
             break;
     }