changeset 1807:bd51407ce849 trunk

[svn] - remove dock_resize.
author nenolod
date Wed, 04 Oct 2006 23:02:15 -0700
parents df973c3f5186
children ae21feb9459c
files ChangeLog audacious/dock.c audacious/dock.h
diffstat 3 files changed, 8 insertions(+), 88 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Oct 04 23:01:26 2006 -0700
+++ b/ChangeLog	Wed Oct 04 23:02:15 2006 -0700
@@ -1,3 +1,11 @@
+2006-10-05 06:01:26 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [2569]
+  - it'd probably help if we passed the right stuff to gtk_window_resize().
+  
+  trunk/audacious/mainwin.c |    3 ++-
+  1 file changed, 2 insertions(+), 1 deletion(-)
+
+
 2006-10-05 05:56:57 +0000  William Pitcock <nenolod@nenolod.net>
   revision [2567]
   - don't use dock_resize.
--- a/audacious/dock.c	Wed Oct 04 23:01:26 2006 -0700
+++ b/audacious/dock.c	Wed Oct 04 23:02:15 2006 -0700
@@ -457,93 +457,6 @@
 }
 
 void
-dock_resize(GList * window_list, GtkWindow * widget, gint new_w, gint new_h)
-{
-    gint x, y, w, h;
-    gint dx, dy, dwidth, dheight;
-    gint off_x, off_y;
-    GList *list, *dlist = NULL, *tlist = NULL, *mlist = NULL, *node;
-    DockedWindow *dw;
-
-    gtk_window_get_position(widget, &x, &y);
-    gtk_window_get_size(widget, &w, &h);
-    if (cfg.show_wm_decorations) {
-        dock_window_resize(widget, new_w, new_h, w, h);
-        return;
-    }
-
-    list = get_docked_list(NULL, window_list, widget, 0, 0);
-
-    off_x = 0;
-    off_y = 0;
-
-    for (node = list; node; node = g_list_next(node)) {
-        dw = node->data;
-        if (dw->w != widget) {
-            gtk_window_get_position(dw->w, &dx, &dy);
-            gtk_window_get_size(dw->w, &dwidth, &dheight);
-            if (is_docked(x, y, w, h, dx, dy, dwidth, dheight))
-                dlist = g_list_append(dlist, dw);
-            else
-                mlist = g_list_append(mlist, dw);
-        }
-    }
-    tlist = g_list_copy(mlist);
-    for (node = dlist; node; node = g_list_next(node)) {
-        gint doff_x, doff_y;
-        dw = node->data;
-        gtk_window_get_position(dw->w, &dx, &dy);
-        gtk_window_get_size(dw->w, &dwidth, &dheight);
-        if (dx - x - w == 0)
-            doff_x = (x + off_x + new_w) - dx;
-        else
-            doff_x = (x + off_x + (dx - x)) - dx;
-
-        if (dy - y - h == 0)
-            doff_y = (y + off_y + new_h) - dy;
-        else
-            doff_y = (y + off_y + (dy - y)) - dy;
-
-        if (dx + doff_x + dwidth > gdk_screen_width()) {
-            off_x -= dx + doff_x + dwidth - gdk_screen_width();
-            doff_x -= dx + doff_x + dwidth - gdk_screen_width();
-        }
-        if (dy + doff_y + dheight > gdk_screen_height()) {
-            off_y -= dy + doff_y + dheight - gdk_screen_height();
-            doff_y -= dy + doff_y + dheight - gdk_screen_height();
-        }
-        tlist =
-            resize_calc_offset(tlist, dw->w, doff_x, doff_y, &off_x, &off_y);
-    }
-    if ((x + off_x + new_w) > gdk_screen_width())
-        off_x -= x + off_x + new_w - gdk_screen_width();
-    if ((y + off_y + new_h) > gdk_screen_height())
-        off_y -= y + off_y + new_h - gdk_screen_height();
-
-    g_list_free(tlist);
-    for (node = dlist; node; node = g_list_next(node)) {
-        gint doff_x, doff_y;
-        dw = node->data;
-        gtk_window_get_position(dw->w, &dx, &dy);
-        if (dx - x - w == 0)
-            doff_x = (x + off_x + new_w) - dx;
-        else
-            doff_x = (x + off_x + (dx - x)) - dx;
-
-        if (dy - y - h == 0)
-            doff_y = (y + off_y + new_h) - dy;
-        else
-            doff_y = (y + off_y + (dy - y)) - dy;
-        mlist = resize_move_list(mlist, dw->w, doff_x, doff_y);
-        gtk_window_move(GTK_WINDOW(dw->w), dx + doff_x, dy + doff_y);
-    }
-
-
-    gtk_window_move(widget, x + off_x, y + off_y);
-    dock_window_resize(widget, new_w, new_h, w, h);
-}
-
-void
 dock_move_press(GList * window_list, GtkWindow * w,
                 GdkEventButton * event, gboolean move_list)
 {
--- a/audacious/dock.h	Wed Oct 04 23:01:26 2006 -0700
+++ b/audacious/dock.h	Wed Oct 04 23:02:15 2006 -0700
@@ -35,7 +35,6 @@
 void dock_get_widget_pos(GtkWindow * w, gint * x, gint * y);
 gboolean dock_is_moving(GtkWindow * w);
 void dock_shade(GList * window_list, GtkWindow * widget, gint new_h);
-void dock_resize(GList * window_list, GtkWindow * w, gint new_w, gint new_h);
 
 GList *dock_window_set_decorated(GList * list, GtkWindow * window,
                                  gboolean decorated);