changeset 2530:7c6ce705adda trunk

[svn] - manually save player positions.
author nenolod
date Thu, 15 Feb 2007 17:26:58 -0800
parents 299be5908480
children 28814e6846e5
files ChangeLog src/audacious/build_stamp.c src/audacious/main.c src/audacious/ui_playlist.c src/audacious/ui_skinned_window.c
diffstat 5 files changed, 40 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Feb 15 15:17:36 2007 -0800
+++ b/ChangeLog	Thu Feb 15 17:26:58 2007 -0800
@@ -1,3 +1,16 @@
+2007-02-15 23:17:36 +0000  Michael Farber <01mf02@gmail.com>
+  revision [4068]
+  - made new INI file parser
+  - removed old-style read_ini_string() function
+  - made skin routines use new INI parser
+  
+  
+  trunk/src/audacious/util.c         |  265 ++++++++++++++++++++++++-------------
+  trunk/src/audacious/util.h         |   13 +
+  trunk/src/audacious/widgets/skin.c |  210 +++++++++++++++--------------
+  3 files changed, 301 insertions(+), 187 deletions(-)
+
+
 2007-02-15 10:03:34 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [4066]
   - playlist editor: use SkinnedWindow widgetlist
--- a/src/audacious/build_stamp.c	Thu Feb 15 15:17:36 2007 -0800
+++ b/src/audacious/build_stamp.c	Thu Feb 15 17:26:58 2007 -0800
@@ -1,2 +1,2 @@
 #include <glib.h>
-const gchar *svn_stamp = "20070215-4066";
+const gchar *svn_stamp = "20070215-4068";
--- a/src/audacious/main.c	Thu Feb 15 15:17:36 2007 -0800
+++ b/src/audacious/main.c	Thu Feb 15 17:26:58 2007 -0800
@@ -72,6 +72,7 @@
 #include "build_stamp.h"
 #include "ui_fileinfo.h"
 #include "signals.h"
+#include "ui_skinned_window.h"
 
 #include "icons-csource.h"
 #include "icons-stock.h"
@@ -675,6 +676,27 @@
     bmp_cfg_db_set_int(db, NULL, "playlist_position",
                        playlist_get_position(playlist));
 
+    /* FIXME: we're looking up SkinnedWindow::x &c ourselves here.
+     * this isn't exactly right. -nenolod
+     */
+    bmp_cfg_db_set_int(db, NULL, "playlist_x",
+                       SKINNED_WINDOW(playlistwin)->x);
+
+    bmp_cfg_db_set_int(db, NULL, "playlist_y",
+                       SKINNED_WINDOW(playlistwin)->y);
+
+    bmp_cfg_db_set_int(db, NULL, "player_x",
+                       SKINNED_WINDOW(mainwin)->x);
+
+    bmp_cfg_db_set_int(db, NULL, "player_y",
+                       SKINNED_WINDOW(mainwin)->y);
+
+    bmp_cfg_db_set_int(db, NULL, "equalizer_x",
+                       SKINNED_WINDOW(equalizerwin)->x);
+
+    bmp_cfg_db_set_int(db, NULL, "equalizer_y",
+                       SKINNED_WINDOW(equalizerwin)->y);
+
     bmp_cfg_db_set_bool(db, NULL, "mainwin_use_xfont",
             cfg.mainwin_use_xfont);
 
--- a/src/audacious/ui_playlist.c	Thu Feb 15 15:17:36 2007 -0800
+++ b/src/audacious/ui_playlist.c	Thu Feb 15 17:26:58 2007 -0800
@@ -689,17 +689,6 @@
     gdk_window_clear(playlistwin->window);
 }
 
-static gboolean
-playlistwin_configure(GtkWidget * window,
-                      GdkEventConfigure * event, gpointer data)
-{
-    g_return_val_if_fail(GTK_WIDGET_VISIBLE(window), FALSE);
-
-    cfg.playlist_x = event->x;
-    cfg.playlist_y = event->y;
-    return TRUE;
-}
-
 static void
 playlistwin_motion(GtkWidget * widget,
                    GdkEventMotion * event,
@@ -1675,8 +1664,6 @@
                            G_CALLBACK(playlistwin_focus_in), NULL);
     g_signal_connect_after(playlistwin, "focus_out_event",
                            G_CALLBACK(playlistwin_focus_out), NULL);
-    g_signal_connect(playlistwin, "configure_event",
-                     G_CALLBACK(playlistwin_configure), NULL);
     g_signal_connect(playlistwin, "style_set",
                      G_CALLBACK(playlistwin_set_back_pixmap), NULL);
 
--- a/src/audacious/ui_skinned_window.c	Thu Feb 15 15:17:36 2007 -0800
+++ b/src/audacious/ui_skinned_window.c	Thu Feb 15 17:26:58 2007 -0800
@@ -78,6 +78,10 @@
     window->x = event->x;
     window->y = event->y;
 
+#if 0
+    g_print("%p window->x = %d, window->y = %d\n", window, window->x, window->y);
+#endif
+
     return FALSE;
 }