changeset 623:443de962d0a0 trunk

[svn] - aosd: revert window type setting
author giacomo
date Thu, 08 Feb 2007 16:20:27 -0800
parents 70f3b14434b2
children 921a816c154f
files ChangeLog src/aosd/Makefile src/aosd/aosd_osd.c src/aosd/aosd_style.c src/aosd/aosd_trigger.c src/aosd/ghosd-main.c src/aosd/ghosd-text.c src/aosd/ghosd-text.h src/aosd/ghosd.c
diffstat 9 files changed, 43 insertions(+), 88 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Feb 08 09:10:38 2007 -0800
+++ b/ChangeLog	Thu Feb 08 16:20:27 2007 -0800
@@ -1,3 +1,14 @@
+2007-02-08 17:10:38 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1330]
+  - remove the buggy memoryleaking mpg123 and integrate madplug into the 
+    buildsystem
+  
+  trunk/configure.ac         |   20 +++++++++++---------
+  trunk/mk/rules.mk.in       |    2 ++
+  trunk/src/madplug/Makefile |    5 ++---
+  3 files changed, 15 insertions(+), 12 deletions(-)
+
+
 2007-02-08 09:52:27 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [1328]
   - remove ID3_FIELD_TEXTENCODING_UTF_16 case.
--- a/src/aosd/Makefile	Thu Feb 08 09:10:38 2007 -0800
+++ b/src/aosd/Makefile	Thu Feb 08 16:20:27 2007 -0800
@@ -3,12 +3,12 @@
 
 OBJECTIVE_LIBS = libaosd$(SHARED_SUFFIX)
 
-noinst_HEADERS = aosd.h aosd_osd.h aosd_style.h aosd_style_private.h aosd_trigger.h aosd_trigger_private.h aosd_ui.h aosd_cfg.h aosd_common.h ghosd.h ghosd-text.h ghosd-internal.h
+noinst_HEADERS = aosd.h aosd_osd.h aosd_style.h aosd_style_private.h aosd_trigger.h aosd_trigger_private.h aosd_ui.h aosd_cfg.h aosd_common.h ghosd.h ghosd-internal.h
 
 LIBDIR = $(plugindir)/$(GENERAL_PLUGIN_DIR)
 
 LIBADD = $(GTK_LIBS) $(GLIB_LIBS) $(PANGO_LIBS) $(CAIRO_LIBS) $(PANGOCAIRO_LIBS)
-SOURCES = aosd.c aosd_osd.c aosd_style.c aosd_trigger.c aosd_ui.c aosd_cfg.c ghosd.c ghosd-text.c ghosd-main.c
+SOURCES = aosd.c aosd_osd.c aosd_style.c aosd_trigger.c aosd_ui.c aosd_cfg.c ghosd.c ghosd-main.c
 
 OBJECTS = ${SOURCES:.c=.o}
 
--- a/src/aosd/aosd_osd.c	Thu Feb 08 09:10:38 2007 -0800
+++ b/src/aosd/aosd_osd.c	Thu Feb 08 16:20:27 2007 -0800
@@ -31,7 +31,6 @@
 #include <stdlib.h>
 #include <sys/time.h>
 #include "ghosd.h"
-#include "ghosd-text.h"
 
 
 #define AOSD_STATUS_HIDDEN    0
--- a/src/aosd/aosd_style.c	Thu Feb 08 09:10:38 2007 -0800
+++ b/src/aosd/aosd_style.c	Thu Feb 08 16:20:27 2007 -0800
@@ -27,7 +27,6 @@
 #include <cairo/cairo.h>
 #include <pango/pangocairo.h>
 #include "ghosd.h"
-#include "ghosd-text.h"
 
 
 /* HOW TO ADD A NEW DECORATION STYLE
--- a/src/aosd/aosd_trigger.c	Thu Feb 08 09:10:38 2007 -0800
+++ b/src/aosd/aosd_trigger.c	Thu Feb 08 16:20:27 2007 -0800
@@ -35,24 +35,28 @@
 enum
 {
   AOSD_TRIGGER_PB_START = 0,
-  AOSD_TRIGGER_PB_TITLECHANGE = 1
+  AOSD_TRIGGER_PB_TITLECHANGE = 1,
+  AOSD_TRIGGER_VOL_CHANGE = 2
 };
 
 /* trigger codes array size */
-#define AOSD_TRIGGER_CODES_ARRAY_SIZE 2
+#define AOSD_TRIGGER_CODES_ARRAY_SIZE 3
 
 /* trigger codes array */
 gint aosd_trigger_codes[] =
 {
   AOSD_TRIGGER_PB_START,
-  AOSD_TRIGGER_PB_TITLECHANGE
+  AOSD_TRIGGER_PB_TITLECHANGE,
+  AOSD_TRIGGER_VOL_CHANGE
 };
 
 /* prototypes of trigger functions */
 static void aosd_trigger_func_pb_start_onoff ( gboolean );
 static void aosd_trigger_func_pb_start_cb ( gpointer , gpointer );
-static void aosd_trigger_func_pb_titlechange_onff ( gboolean );
+static void aosd_trigger_func_pb_titlechange_onoff ( gboolean );
 static void aosd_trigger_func_pb_titlechange_cb ( gpointer , gpointer );
+static void aosd_trigger_func_vol_change_onoff ( gboolean );
+static void aosd_trigger_func_vol_change_cb ( gpointer , gpointer );
 
 /* map trigger codes to trigger objects */
 aosd_trigger_t aosd_triggers[] =
@@ -66,8 +70,13 @@
                                     N_("Trigger OSD when, during playback, the song title changes "
                                        "but the filename is the same. This is mostly useful to display "
                                        "title changes in internet streams.") ,
-                                    aosd_trigger_func_pb_titlechange_onff ,
-                                    aosd_trigger_func_pb_titlechange_cb }
+                                    aosd_trigger_func_pb_titlechange_onoff ,
+                                    aosd_trigger_func_pb_titlechange_cb },
+
+  [AOSD_TRIGGER_VOL_CHANGE] = { N_("Volume Change") ,
+                                N_("Volume blah blah.") ,
+                                aosd_trigger_func_vol_change_onoff ,
+                                aosd_trigger_func_vol_change_cb }
 };
 
 
@@ -176,7 +185,7 @@
 
 
 static void
-aosd_trigger_func_pb_titlechange_onff ( gboolean turn_on )
+aosd_trigger_func_pb_titlechange_onoff ( gboolean turn_on )
 {
   static aosd_pb_titlechange_prevs_t *prevs = NULL;
 
@@ -249,3 +258,16 @@
     }
   }
 }
+
+
+static void
+aosd_trigger_func_vol_change_onoff ( gboolean turn_on )
+{
+  return;
+}
+
+static void
+aosd_trigger_func_vol_change_cb ( gpointer plentry_gp , gpointer prevs_gp )
+{
+  return;
+}
--- a/src/aosd/ghosd-main.c	Thu Feb 08 09:10:38 2007 -0800
+++ b/src/aosd/ghosd-main.c	Thu Feb 08 16:20:27 2007 -0800
@@ -24,7 +24,7 @@
 ghosd_main_iteration(Ghosd *ghosd) {
   XEvent ev, pev;
   XNextEvent(ghosd->dpy, &ev);
-  
+
   /* smash multiple configure/exposes into one. */
   if (ev.type == ConfigureNotify) {
     while (XPending(ghosd->dpy)) {
--- a/src/aosd/ghosd-text.c	Thu Feb 08 09:10:38 2007 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/* ghosd -- OSD with fake transparency, cairo, and pango.
- * Copyright (C) 2006 Evan Martin <martine@danga.com>
- */
-
-#include "config.h"
-
-#include <pango/pangocairo.h>
-#include "ghosd-internal.h"
-#include "ghosd-text.h"
-
-static void
-render_text(Ghosd *ghosd, cairo_t *cr, void* data) {
-  PangoLayout *layout = data;
-
-  /* drop shadow! */
-  cairo_set_source_rgba(cr, 0, 0, 0, 0.8);
-  cairo_move_to(cr, 4, 4);
-  pango_cairo_show_layout(cr, layout);
-
-  /* and the actual text. */
-  cairo_set_source_rgba(cr, 1, 1, 1, 1.0);
-  cairo_move_to(cr, 0, 0);
-  pango_cairo_show_layout(cr, layout);
-}
-
-Ghosd*
-ghosd_text_new(const char *markup, int x, int y) {
-  Ghosd *ghosd;
-  PangoContext *context;
-  PangoLayout *layout;
-  PangoRectangle ink_rect;
-
-  g_type_init();
-
-  context = pango_cairo_font_map_create_context(
-              PANGO_CAIRO_FONT_MAP(pango_cairo_font_map_get_default()));
-  layout = pango_layout_new(context);
-
-  pango_layout_set_markup(layout, markup, -1);
-
-  pango_layout_get_pixel_extents(layout, &ink_rect, NULL);
-
-  const int width = ink_rect.x + ink_rect.width+5;
-  const int height = ink_rect.y + ink_rect.height+5;
-
-  ghosd = ghosd_new();
-  ghosd_set_position(ghosd, x, y, width, height);
-  ghosd_set_render(ghosd, render_text, layout, g_object_unref);
-  
-  return ghosd;
-}
-
-/* vim: set ts=2 sw=2 et cino=(0 : */
--- a/src/aosd/ghosd-text.h	Thu Feb 08 09:10:38 2007 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-/* ghosd -- OSD with fake transparency, cairo, and pango.
- * Copyright (C) 2006 Evan Martin <martine@danga.com>
- */
-
-#ifndef __GHOSD_TEXT_H__
-#define __GHOSD_TEXT_H__
-
-#include <pango/pango-layout.h>
-
-Ghosd* ghosd_text_new(const char *markup, int x, int y);
-
-#endif /* __GHOSD_TEXT_H__ */
-
-/* vim: set ts=2 sw=2 et cino=(0 : */
--- a/src/aosd/ghosd.c	Thu Feb 08 09:10:38 2007 -0800
+++ b/src/aosd/ghosd.c	Thu Feb 08 16:20:27 2007 -0800
@@ -136,15 +136,6 @@
     mwm_hints, mwm_hints, 32, PropModeReplace,
     (unsigned char *)&mwm_hints_setting, 4);
 
-  /* setting the window type to _NET_WM_WINDOW_TYPE_DOCK helps with
-     windowmaker (and hopefully doesn't break compatibility with other wm) */
-  Atom win_type = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
-  Atom win_type_setting[] = {
-    XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DOCK", False)
-  };
-  XChangeProperty(dpy, win, win_type, XA_ATOM, 32,
-                  PropModeReplace, (unsigned char*)&win_type_setting, 1);
-
   /* always on top, not in taskbar or pager. */
   Atom win_state = XInternAtom(dpy, "_NET_WM_STATE", False);
   Atom win_state_setting[] = {