changeset 1281:02c2480ca1d5 trunk

[svn] - remove playlist_popup
author nenolod
date Sat, 17 Jun 2006 19:49:56 -0700
parents 6ad7eb96dd26
children e80a7a0b1065
files ChangeLog audacious/playlist_popup.c audacious/playlist_popup.h audacious/ui_playlist.c
diffstat 4 files changed, 22 insertions(+), 208 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Jun 17 16:17:51 2006 -0700
+++ b/ChangeLog	Sat Jun 17 19:49:56 2006 -0700
@@ -1,3 +1,25 @@
+2006-06-17 23:17:51 +0000  Tony Vroon <chainsaw@gentoo.org>
+  revision [1474]
+  Sync with upstream. This adds Westwood ADL format support.
+
+  Changes:        Modified:
+  +3 -2           trunk/Plugins/Input/adplug/core/Makefile.in  
+  +2422 -0        trunk/Plugins/Input/adplug/core/adl.cpp  
+  +79 -0          trunk/Plugins/Input/adplug/core/adl.h  
+  +2 -0           trunk/Plugins/Input/adplug/core/adplug.cpp  
+  +7 -3           trunk/Plugins/Input/adplug/core/amd.cpp  
+  +4 -2           trunk/Plugins/Input/adplug/core/bmf.cpp  
+  +422 -411       trunk/Plugins/Input/adplug/core/d00.cpp  
+  +4 -4           trunk/Plugins/Input/adplug/core/d00.h  
+  +6 -4           trunk/Plugins/Input/adplug/core/ksm.cpp  
+  +22 -32         trunk/Plugins/Input/adplug/core/msc.cpp  
+  +4 -7           trunk/Plugins/Input/adplug/core/protrack.cpp  
+  +58 -80         trunk/Plugins/Input/adplug/core/rix.cpp  
+  +3 -7           trunk/Plugins/Input/adplug/core/rix.h  
+  +7 -2           trunk/Plugins/Input/adplug/core/u6m.cpp  
+  +2 -2           trunk/Plugins/Input/adplug/core/u6m.h  
+
+
 2006-06-17 03:55:52 +0000  William Pitcock <nenolod@nenolod.net>
   revision [1472]
   - libaac: use unified fileinfo requester, since functionality is adequate (cannot save data, only read it at present)
--- a/audacious/playlist_popup.c	Sat Jun 17 16:17:51 2006 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,174 +0,0 @@
-/*  BMP - Cross-platform multimedia player
- *  Copyright (C) 2003-2004  BMP development team.
- *
- *  Based on XMMS:
- *  Copyright (C) 1998-2003  XMMS development team.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#include "playlist_popup.h"
-
-#include <glib.h>
-#include <gtk/gtk.h>
-#include <gdk/gdk.h>
-#include <string.h>
-
-#include "skin.h"
-#include "util.h"
-
-typedef struct {
-    GtkWidget *window;
-    GdkGC *gc;
-    gint num_items;
-    gint *nx, *ny;
-    gint *sx, *sy;
-    gint barx, bary;
-    gint active, base;
-    void (*handler) (gint item);
-} PlaylistPopup;
-
-static PlaylistPopup *popup = NULL;
-
-static void
-playlist_popup_draw(PlaylistPopup * popup)
-{
-    gint i;
-
-    skin_draw_pixmap(bmp_active_skin, popup->window->window, popup->gc,
-                     SKIN_PLEDIT, popup->barx, popup->bary, 0, 0, 3,
-                     popup->num_items * 18);
-    for (i = 0; i < popup->num_items; i++) {
-        if (i == popup->active)
-            skin_draw_pixmap(bmp_active_skin, popup->window->window,
-                             popup->gc, SKIN_PLEDIT, popup->sx[i],
-                             popup->sy[i], 3, i * 18, 22, 18);
-        else
-            skin_draw_pixmap(bmp_active_skin, popup->window->window,
-                             popup->gc, SKIN_PLEDIT, popup->nx[i],
-                             popup->ny[i], 3, i * 18, 22, 18);
-    }
-    /* FIXME: What is this flush doing here? */
-    gdk_flush();
-}
-
-void
-playlist_popup_destroy(void)
-{
-    if (popup) {
-        gdk_pointer_ungrab(GDK_CURRENT_TIME);
-        gdk_flush();
-        gtk_widget_destroy(popup->window);
-        g_object_unref(popup->gc);
-        g_free(popup->nx);
-        g_free(popup->ny);
-        g_free(popup->sx);
-        g_free(popup->sy);
-        if (popup->handler && popup->active != -1)
-            popup->handler(popup->active + popup->base);
-        g_free(popup);
-        popup = NULL;
-    }
-}
-
-static void
-playlist_popup_expose(GtkWidget * widget, GdkEvent * event,
-                      gpointer callback_data)
-{
-    playlist_popup_draw(popup);
-}
-
-static void
-playlist_popup_motion(GtkWidget * widget,
-                      GdkEventMotion * event, gpointer callback_data)
-{
-    gint active;
-
-    if (event->x >= 0 && event->x < 25 && event->y >= 0
-        && event->y < popup->num_items * 18) {
-        active = event->y / 18;
-        if (popup->active != active) {
-            popup->active = active;
-            playlist_popup_draw(popup);
-        }
-    }
-    else if (popup->active != -1) {
-        popup->active = -1;
-        playlist_popup_draw(popup);
-    }
-}
-
-static void
-playlist_popup_release(GtkWidget * widget,
-                       GdkEventButton * event, gpointer callback_data)
-{
-    playlist_popup_destroy();
-}
-
-void
-playlist_popup(gint x, gint y, gint num_items, gint * nx, gint * ny,
-               gint * sx, gint * sy, gint barx, gint bary, gint base,
-               void (*handler) (gint item))
-{
-    if (popup)
-        playlist_popup_destroy();
-    popup = g_new0(PlaylistPopup, 1);
-    popup->num_items = num_items;
-    popup->nx = g_new0(gint, num_items);
-    memcpy(popup->nx, nx, sizeof(gint) * num_items);
-    popup->ny = g_new0(gint, num_items);
-    memcpy(popup->ny, ny, sizeof(gint) * num_items);
-    popup->sx = g_new0(gint, num_items);
-    memcpy(popup->sx, sx, sizeof(gint) * num_items);
-    popup->sy = g_new0(gint, num_items);
-    memcpy(popup->sy, sy, sizeof(gint) * num_items);
-    popup->barx = barx;
-    popup->bary = bary;
-    popup->handler = handler;
-    popup->active = num_items - 1;
-    popup->base = base;
-
-    popup->window = gtk_window_new(GTK_WINDOW_POPUP);
-    gtk_window_set_default_size(GTK_WINDOW(popup->window), 25,
-                                num_items * 18);
-    gtk_widget_set_app_paintable(popup->window, TRUE);
-    gtk_widget_set_events(popup->window,
-                          GDK_BUTTON_MOTION_MASK | GDK_BUTTON_RELEASE_MASK
-                          | GDK_EXPOSURE_MASK);
-    gtk_widget_realize(popup->window);
-
-    popup->gc = gdk_gc_new(popup->window->window);
-
-    g_signal_connect(popup->window, "expose_event",
-                     G_CALLBACK(playlist_popup_expose), NULL);
-    g_signal_connect(popup->window, "motion_notify_event",
-                     G_CALLBACK(playlist_popup_motion), NULL);
-    g_signal_connect(popup->window, "button_release_event",
-                     G_CALLBACK(playlist_popup_release), NULL);
-
-    util_set_cursor(popup->window);
-
-    gtk_window_move(GTK_WINDOW(popup->window), x - 1, y - 1);
-    gtk_widget_show(popup->window);
-    gdk_window_raise(popup->window->window);
-    gdk_flush();
-
-    playlist_popup_draw(popup);
-
-    gdk_pointer_grab(popup->window->window, FALSE,
-                     GDK_BUTTON_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
-                     NULL, NULL, GDK_CURRENT_TIME);
-    gdk_flush();
-}
--- a/audacious/playlist_popup.h	Sat Jun 17 16:17:51 2006 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*  BMP - Cross-platform multimedia player
- *  Copyright (C) 2003-2004  BMP development team.
- *
- *  Based on XMMS:
- *  Copyright (C) 1998-2003  XMMS development team.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef PLAYLIST_POPUP_H
-#define PLAYLIST_POPUP_H
-
-#include <glib.h>
-
-void playlist_popup_destroy(void);
-void playlist_popup(gint x, gint y, gint num_items, gint * nx, gint * ny,
-                    gint * sx, gint * sy, gint barx, gint bary, gint base,
-                    void (*handler) (gint item));
-
-#endif
--- a/audacious/ui_playlist.c	Sat Jun 17 16:17:51 2006 -0700
+++ b/audacious/ui_playlist.c	Sat Jun 17 19:49:56 2006 -0700
@@ -50,7 +50,6 @@
 #include "playlist.h"
 #include "playlist_list.h"
 #include "playlist_slider.h"
-#include "playlist_popup.h"
 #include "pbutton.h"
 #include "sbutton.h"
 #include "skin.h"
@@ -597,7 +596,6 @@
     else
     {
        handle_release_cb(playlistwin_wlist, widget, event);
-       playlist_popup_destroy();
        draw_playlist_window(FALSE);
     }
 }