Mercurial > audlegacy
changeset 1962:1d93c458d79b trunk
[svn] - some code
author | nenolod |
---|---|
date | Sun, 12 Nov 2006 02:36:47 -0800 |
parents | 9963dcd51cbb |
children | 8cca76c8f5c3 |
files | ChangeLog audacious/newui/newui_window.c audacious/newui/newui_window.h |
diffstat | 3 files changed, 83 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Nov 12 02:16:17 2006 -0800 +++ b/ChangeLog Sun Nov 12 02:36:47 2006 -0800 @@ -1,3 +1,11 @@ +2006-11-12 10:16:17 +0000 William Pitcock <nenolod@nenolod.net> + revision [2897] + - add newui to build + + trunk/audacious/Makefile | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + + 2006-11-12 09:58:29 +0000 William Pitcock <nenolod@nenolod.net> revision [2893] - remove spurious debug notice
--- a/audacious/newui/newui_window.c Sun Nov 12 02:16:17 2006 -0800 +++ b/audacious/newui/newui_window.c Sun Nov 12 02:36:47 2006 -0800 @@ -17,5 +17,77 @@ * 02110-1301, USA. */ -#include "newui_window.h" #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" + +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 +newui_update_nowplaying_from_entry(PlaylistEntry *entry) +{ + GladeXML *xml = g_object_get_data(G_OBJECT(newui_win), "glade-xml"); + GtkWidget *widget; + gchar *tmp; + + widget = glade_xml_get_widget(xml, "newui_titlestring"); + tmp = g_strdup_printf("<span size='x-large'>%s</span>", entry->title); + gtk_label_set_markup(GTK_LABEL(widget), tmp); + g_free(tmp); +}