changeset 3315:848999871ae8 trunk

Automated merge with ssh://hg.atheme.org//hg/audacious
author William Pitcock <nenolod@atheme-project.org>
date Fri, 10 Aug 2007 12:10:24 -0500
parents 328221f7a580 (current diff) f327c3b3ac7e (diff)
children 6ce62683e8c4
files
diffstat 4 files changed, 21 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/ui_equalizer.c	Fri Aug 10 12:09:58 2007 -0500
+++ b/src/audacious/ui_equalizer.c	Fri Aug 10 12:10:24 2007 -0500
@@ -309,19 +309,6 @@
     return FALSE;
 }
 
-static gboolean
-equalizerwin_configure(GtkWidget * window,
-                       GdkEventConfigure * event,
-                       gpointer data)
-{
-    if (!GTK_WIDGET_VISIBLE(window))
-        return FALSE;
-
-    cfg.equalizer_x = event->x;
-    cfg.equalizer_y = event->y;
-    return FALSE;
-}
-
 static void
 equalizerwin_close_cb(void)
 {
@@ -572,8 +559,6 @@
                      G_CALLBACK(equalizerwin_press), NULL);
     g_signal_connect(equalizerwin, "button_release_event",
                      G_CALLBACK(equalizerwin_release), NULL);
-    g_signal_connect(equalizerwin, "configure_event",
-                     G_CALLBACK(equalizerwin_configure), NULL);
     g_signal_connect(equalizerwin, "key_press_event",
                      G_CALLBACK(equalizerwin_keypress), NULL);
 }
--- a/src/audacious/ui_main.c	Fri Aug 10 12:09:58 2007 -0500
+++ b/src/audacious/ui_main.c	Fri Aug 10 12:10:24 2007 -0500
@@ -1107,23 +1107,6 @@
     gtk_widget_grab_default(jump);
 }
 
-static gboolean
-mainwin_configure(GtkWidget * window,
-                  GdkEventConfigure * event,
-                  gpointer data)
-{
-    if (!GTK_WIDGET_VISIBLE(window))
-        return FALSE;
-
-    if (cfg.show_wm_decorations)
-        gdk_window_get_root_origin(window->window,
-                                   &cfg.player_x, &cfg.player_y);
-    else
-        gdk_window_get_deskrelative_origin(window->window,
-                                           &cfg.player_x, &cfg.player_y);
-    return FALSE;
-}
-
 /*
  * Rewritten 09/13/06:
  *
@@ -2648,8 +2631,6 @@
                      G_CALLBACK(mainwin_scrolled), NULL);
     g_signal_connect(mainwin, "button_release_event",
                      G_CALLBACK(mainwin_mouse_button_release), NULL);
-    g_signal_connect(mainwin, "configure_event",
-                     G_CALLBACK(mainwin_configure), NULL);
 
     bmp_drag_dest_set(mainwin);
 
--- a/src/audacious/ui_playlist.c	Fri Aug 10 12:09:58 2007 -0500
+++ b/src/audacious/ui_playlist.c	Fri Aug 10 12:10:24 2007 -0500
@@ -1594,6 +1594,7 @@
 void
 playlistwin_show(void)
 {
+    gtk_window_move(GTK_WINDOW(playlistwin), cfg.playlist_x, cfg.playlist_y);
     GtkAction *action = gtk_action_group_get_action(
       toggleaction_group_others , "show playlist editor" );
     gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(action) , TRUE );
@@ -1608,7 +1609,6 @@
     gtk_widget_show_all(playlistwin);
     if (!cfg.playlist_shaded)
         gtk_widget_hide(playlistwin_sinfo);
-    ui_skinned_textbox_set_text(playlistwin_info, " ");
     gtk_window_present(GTK_WINDOW(playlistwin));
 }
 
--- a/src/audacious/ui_skinned_window.c	Fri Aug 10 12:09:58 2007 -0500
+++ b/src/audacious/ui_skinned_window.c	Fri Aug 10 12:10:24 2007 -0500
@@ -79,6 +79,26 @@
     if (widget_class->configure_event != NULL)
         widget_class->configure_event(widget, event);
 
+    if (!GTK_WIDGET_VISIBLE(widget))
+        return FALSE;
+
+    switch(window->type) {
+        case WINDOW_MAIN:
+            if (cfg.show_wm_decorations)
+                gdk_window_get_root_origin(widget->window, &cfg.player_x, &cfg.player_y);
+            else
+                gdk_window_get_deskrelative_origin(widget->window, &cfg.player_x, &cfg.player_y);
+            break;
+        case WINDOW_EQ:
+            cfg.equalizer_x = event->x;
+            cfg.equalizer_y = event->y;
+            break;
+        case WINDOW_PLAYLIST:
+            cfg.playlist_x = event->x;
+            cfg.playlist_y = event->y;
+            break;
+    }
+
     window->x = event->x;
     window->y = event->y;