Mercurial > audlegacy
changeset 1991:327bc75fb21a trunk
[svn] - remove newui
author | nenolod |
---|---|
date | Wed, 22 Nov 2006 21:05:20 -0800 |
parents | 601660c1d02d |
children | 5040e292c37e |
files | ChangeLog audacious/Makefile audacious/main.c audacious/mainwin.c audacious/newui/Makefile audacious/newui/newui_window.c audacious/newui/newui_window.h audacious/playlist.c |
diffstat | 8 files changed, 10 insertions(+), 296 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Nov 22 14:35:19 2006 -0800 +++ b/ChangeLog Wed Nov 22 21:05:20 2006 -0800 @@ -1,3 +1,11 @@ +2006-11-22 22:35:19 +0000 William Pitcock <nenolod@nenolod.net> + revision [2969] + - update french translation + + trunk/po/fr.po | 462 ++++++++++++++++++++++++++------------------------------- + 1 file changed, 212 insertions(+), 250 deletions(-) + + 2006-11-22 11:33:52 +0000 Yoshiki Yazawa <yaz@cc.rim.or.jp> revision [2967] - avoid double free
--- a/audacious/Makefile Wed Nov 22 14:35:19 2006 -0800 +++ b/audacious/Makefile Wed Nov 22 21:05:20 2006 -0800 @@ -2,7 +2,7 @@ include ../mk/init.mk include ../mk/objective.mk -SUBDIRS = widgets newui glade images +SUBDIRS = widgets glade images beepincludedir = $(includedir)/audacious @@ -16,8 +16,7 @@ $(CHARDET_LIBS) \ $(GTK_LIBS) \ $(LIBGLADE_LIBS) \ - ./widgets/libwidgets.a \ - ./newui/libnewui.a + ./widgets/libwidgets.a CFLAGS += \ $(GTK_CFLAGS) \
--- a/audacious/main.c Wed Nov 22 14:35:19 2006 -0800 +++ b/audacious/main.c Wed Nov 22 21:05:20 2006 -0800 @@ -76,8 +76,6 @@ #include "pixmaps.h" #include "images/audacious_player.xpm" -#include "newui/newui_window.h" - gboolean has_x11_connection = FALSE; /* do we have an X11 connection? */ /* Translatable string for beep.desktop's comment field */ @@ -1134,9 +1132,6 @@ create_fileinfo_window(); create_filepopup_window(); -// create_newui_window(); -// show_newui_window(); - if (cfg.player_visible) mainwin_show(TRUE); else if (!cfg.playlist_visible && !cfg.equalizer_visible)
--- a/audacious/mainwin.c Wed Nov 22 14:35:19 2006 -0800 +++ b/audacious/mainwin.c Wed Nov 22 21:05:20 2006 -0800 @@ -3770,8 +3770,6 @@ playlistwin_hide_timer(); input_update_vis(time); -// newui_set_time(time, length); - if (cfg.timer_mode == TIMER_REMAINING) { if (length != -1) { number_set_number(mainwin_minus_num, 11);
--- a/audacious/newui/Makefile Wed Nov 22 14:35:19 2006 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -include ../../mk/rules.mk -include ../../mk/init.mk - -OBJECTIVE_LIBS_NOINST = libnewui.a - -LDFLAGS += -Wl,-export-dynamic - -CFLAGS += \ - $(GTK_CFLAGS) \ - $(LIBGLADE_CFLAGS) \ - $(BEEP_DEFINES) \ - $(ARCH_DEFINES) \ - -D_AUDACIOUS_CORE \ - -I../.. \ - -I.. \ - -I../../intl \ - -Wno-strict-aliasing - -SOURCES = \ - newui_window.c - -OBJECTS = ${SOURCES:.c=.o} - -include ../../mk/objective.mk - -libnewui.a: $(OBJECTS) - $(AR) cq $@ $(OBJECTS)
--- a/audacious/newui/newui_window.c Wed Nov 22 14:35:19 2006 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,227 +0,0 @@ -/* Audacious - * Copyright (C) 2005-2006 Audacious 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., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include "audacious/glade.h" - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include <glib.h> -#include <glib/gi18n.h> -#include <gtk/gtk.h> -#include <glade/glade.h> -#include <string.h> -#include <stddef.h> -#include <stdio.h> -#include <sys/types.h> -#include <dirent.h> -#include <unistd.h> -#include <errno.h> -#include <sys/types.h> -#include <sys/stat.h> - -#include "audacious/plugin.h" -#include "audacious/pluginenum.h" -#include "audacious/input.h" -#include "audacious/effect.h" -#include "audacious/general.h" -#include "audacious/output.h" -#include "audacious/visualization.h" - -#include "audacious/main.h" -#include "audacious/urldecode.h" -#include "audacious/util.h" -#include "audacious/dnd.h" -#include "audacious/titlestring.h" - -#include "libaudacious/configdb.h" - -#include "audacious/playlist.h" - -#include "audacious/mainwin.h" -#include "audacious/ui_fileinfo.h" - -GtkWidget *newui_win; - -void -create_newui_window(void) -{ - const char *glade_file = DATA_DIR "/glade/newui.glade"; - GladeXML *xml; - GtkWidget *widget; - - xml = glade_xml_new_or_die(_("Stock GTK2 UI"), glade_file, NULL, NULL); - - glade_xml_signal_autoconnect(xml); - - newui_win = glade_xml_get_widget(xml, "newui_window"); - g_object_set_data(G_OBJECT(newui_win), "glade-xml", xml); - - widget = glade_xml_get_widget(xml, "newui_albumart_img"); - gtk_image_set_from_file(GTK_IMAGE(widget), DATA_DIR "/images/audio.png"); - - /* build menu and toolbars */ -} - -void -show_newui_window(void) -{ - gtk_widget_show(newui_win); -} - -static void -newui_entry_set_image(const char *text) -{ - GladeXML *xml = g_object_get_data(G_OBJECT(newui_win), "glade-xml"); - GtkWidget *widget = glade_xml_get_widget(xml, "newui_albumart_img"); - GdkPixbuf *pixbuf; - int width, height; - double aspect; - - if (xml == NULL || widget == NULL) - return; - - pixbuf = gdk_pixbuf_new_from_file(text, NULL); - - if (pixbuf == NULL) - return; - - width = gdk_pixbuf_get_width(GDK_PIXBUF(pixbuf)); - height = gdk_pixbuf_get_height(GDK_PIXBUF(pixbuf)); - - if(strcmp(DATA_DIR "/images/audio.png", text)) - { - if(width == 0) - width = 1; - aspect = (double)height / (double)width; - if(aspect > 1.0) { - height = (int)(cfg.filepopup_pixelsize * aspect); - width = cfg.filepopup_pixelsize; - } else { - height = cfg.filepopup_pixelsize; - width = (int)(cfg.filepopup_pixelsize / aspect); - } - GdkPixbuf *pixbuf2 = gdk_pixbuf_scale_simple(GDK_PIXBUF(pixbuf), width, height, GDK_INTERP_BILINEAR); - g_object_unref(G_OBJECT(pixbuf)); - pixbuf = pixbuf2; - } - - gtk_image_set_from_pixbuf(GTK_IMAGE(widget), GDK_PIXBUF(pixbuf)); - g_object_unref(G_OBJECT(pixbuf)); -} - -void -newui_update_nowplaying_from_entry(PlaylistEntry *entry) -{ - GladeXML *xml = g_object_get_data(G_OBJECT(newui_win), "glade-xml"); - GtkWidget *widget; - gchar *tmp; - static gchar *last_artwork = NULL; - gchar *fullpath; - - if (entry->tuple == NULL) - return; - - widget = glade_xml_get_widget(xml, "newui_playstatus"); - tmp = g_strdup_printf("<b>%s</b> from <b>%s</b> by <b>%s</b>", entry->tuple->track_name, - entry->tuple->album_name, entry->tuple->performer); - gtk_label_set_markup(GTK_LABEL(widget), tmp); - g_free(tmp); - - widget = glade_xml_get_widget(xml, "newui_label_title"); - gtk_label_set_text(GTK_LABEL(widget), entry->tuple->track_name); - - widget = glade_xml_get_widget(xml, "newui_label_artist"); - gtk_label_set_text(GTK_LABEL(widget), entry->tuple->performer); - - widget = glade_xml_get_widget(xml, "newui_label_album"); - gtk_label_set_text(GTK_LABEL(widget), entry->tuple->album_name); - - widget = glade_xml_get_widget(xml, "newui_label_genre"); - gtk_label_set_text(GTK_LABEL(widget), entry->tuple->genre); - - widget = glade_xml_get_widget(xml, "newui_label_year"); - tmp = g_strdup_printf("%d", entry->tuple->year); - gtk_label_set_text(GTK_LABEL(widget), tmp); - g_free(tmp); - - widget = glade_xml_get_widget(xml, "newui_label_tracknum"); - tmp = g_strdup_printf("%d", entry->tuple->track_number); - gtk_label_set_text(GTK_LABEL(widget), tmp); - g_free(tmp); - - widget = glade_xml_get_widget(xml, "newui_label_tracklen"); - tmp = g_strdup_printf("%d:%02d", entry->tuple->length / 60000, (entry->tuple->length / 1000) % 60); - gtk_label_set_text(GTK_LABEL(widget), tmp); - g_free(tmp); - - if (cfg.use_file_cover) { - /* Use the file name */ - fullpath = g_strconcat(entry->tuple->file_path, "/", entry->tuple->file_name, NULL); - } else { - fullpath = g_strconcat(entry->tuple->file_path, "/", NULL); - } - - if (!last_artwork || strcmp(last_artwork, fullpath)) - { - if (last_artwork != NULL) - g_free(last_artwork); - - last_artwork = g_strdup(fullpath); - - tmp = fileinfo_recursive_get_image(entry->tuple->file_path, entry->tuple->file_name, 0); - if (tmp) - { - newui_entry_set_image(tmp); - g_free(tmp); - } else { - newui_entry_set_image(DATA_DIR "/images/audio.png"); - } - } - - g_free(fullpath); -} - -/* ********** callbacks ********** */ - -void -newui_set_time(gint time, gint length) -{ - GladeXML *xml = g_object_get_data(G_OBJECT(newui_win), "glade-xml"); - GtkWidget *widget = glade_xml_get_widget(xml, "newui_seekbar"); - - gtk_range_set_range(GTK_RANGE(widget), 0, length); - gtk_range_set_value(GTK_RANGE(widget), time); -} - -/* ********** signals ********** */ - -void -on_newui_shuffle_cb_realize(GtkToggleButton *button, gpointer data) -{ - gtk_toggle_button_set_active(button, cfg.shuffle); -} - -void -on_newui_shuffle_cb_toggled(GtkToggleButton *button, gpointer data) -{ - cfg.shuffle = gtk_toggle_button_get_active(button); - mainwin_shuffle_pushed(cfg.shuffle); -}
--- a/audacious/newui/newui_window.h Wed Nov 22 14:35:19 2006 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* Audacious - * Copyright (C) 2005-2006 Audacious 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., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef NEWUI_WINDOW_H -#define NEWUI_WINDOW_H - -#include <gtk/gtk.h> - -void create_newui_window(void); -void show_newui_window(void); -void newui_update_nowplaying_from_entry(PlaylistEntry *entry); - -#endif
--- a/audacious/playlist.c Wed Nov 22 14:35:19 2006 -0800 +++ b/audacious/playlist.c Wed Nov 22 21:05:20 2006 -0800 @@ -57,8 +57,6 @@ #include "debug.h" -#include "newui/newui_window.h" - typedef gint (*PlaylistCompareFunc) (PlaylistEntry * a, PlaylistEntry * b); typedef void (*PlaylistSaveFunc) (FILE * file); @@ -849,7 +847,6 @@ playlist_recalc_total_time(); mainwin_set_song_info(rate, freq, nch); -// newui_update_nowplaying_from_entry(playlist_position); } void