changeset 3939:d46d60247826

we don't need to store GtkFixed pointer, do we?
author Tomasz Mon <desowin@gmail.com>
date Thu, 15 Nov 2007 12:38:47 +0100
parents b352b7eb78c1
children 1dcfe91e241d
files src/audacious/ui_skinned_button.c src/audacious/ui_skinned_button.h src/audacious/ui_skinned_equalizer_graph.c src/audacious/ui_skinned_equalizer_graph.h src/audacious/ui_skinned_equalizer_slider.c src/audacious/ui_skinned_horizontal_slider.c src/audacious/ui_skinned_menurow.c src/audacious/ui_skinned_menurow.h src/audacious/ui_skinned_monostereo.c src/audacious/ui_skinned_monostereo.h src/audacious/ui_skinned_number.c src/audacious/ui_skinned_number.h src/audacious/ui_skinned_playlist.c src/audacious/ui_skinned_playlist_slider.c src/audacious/ui_skinned_playstatus.c src/audacious/ui_skinned_playstatus.h src/audacious/ui_skinned_textbox.c
diffstat 17 files changed, 19 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/ui_skinned_button.c	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_button.c	Thu Nov 15 12:38:47 2007 +0100
@@ -371,10 +371,9 @@
     sbutton->type = TYPE_PUSH;
     priv->skin_index1 = si;
     priv->skin_index2 = si;
-    sbutton->fixed = fixed;
     priv->double_size = FALSE;
 
-    gtk_fixed_put(GTK_FIXED(sbutton->fixed),GTK_WIDGET(button), sbutton->x, sbutton->y);
+    gtk_fixed_put(GTK_FIXED(fixed), GTK_WIDGET(button), sbutton->x, sbutton->y);
 }
 
 void ui_skinned_toggle_button_setup(GtkWidget *button, GtkWidget *fixed, gint x, gint y, gint w, gint h, gint nx, gint ny, gint px, gint py, gint pnx, gint pny, gint ppx, gint ppy, SkinPixmapId si) {
@@ -396,10 +395,9 @@
     sbutton->type = TYPE_TOGGLE;
     priv->skin_index1 = si;
     priv->skin_index2 = si;
-    sbutton->fixed = fixed;
     priv->double_size = FALSE;
 
-    gtk_fixed_put(GTK_FIXED(sbutton->fixed),GTK_WIDGET(button), sbutton->x, sbutton->y);
+    gtk_fixed_put(GTK_FIXED(fixed), GTK_WIDGET(button), sbutton->x, sbutton->y);
 }
 
 void ui_skinned_small_button_setup(GtkWidget *button, GtkWidget *fixed, gint x, gint y, gint w, gint h) {
@@ -411,10 +409,9 @@
     sbutton->x = x;
     sbutton->y = y;
     sbutton->type = TYPE_SMALL;
-    sbutton->fixed = fixed;
     priv->double_size = FALSE;
 
-    gtk_fixed_put(GTK_FIXED(sbutton->fixed),GTK_WIDGET(button), sbutton->x, sbutton->y);
+    gtk_fixed_put(GTK_FIXED(fixed), GTK_WIDGET(button), sbutton->x, sbutton->y);
 }
 
 static void button_pressed(UiSkinnedButton *button) {
@@ -515,7 +512,8 @@
 static void ui_skinned_button_redraw(UiSkinnedButton *button) {
     UiSkinnedButtonPrivate *priv = UI_SKINNED_BUTTON_GET_PRIVATE (button);
     if (priv->move_x || priv->move_y)
-        gtk_fixed_move(GTK_FIXED(button->fixed), GTK_WIDGET(button), button->x+priv->move_x, button->y+priv->move_y);
+        gtk_fixed_move(GTK_FIXED(gtk_widget_get_parent(GTK_WIDGET(button))), GTK_WIDGET(button),
+                       button->x+priv->move_x, button->y+priv->move_y);
 
     gtk_widget_queue_draw(GTK_WIDGET(button));
 }
--- a/src/audacious/ui_skinned_button.h	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_button.h	Thu Nov 15 12:38:47 2007 +0100
@@ -42,7 +42,6 @@
     GtkWidget widget;
 
     GdkWindow *event_window;
-    GtkWidget *fixed;
     gboolean button_down;
     gboolean pressed;
     gboolean hover;
--- a/src/audacious/ui_skinned_equalizer_graph.c	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_equalizer_graph.c	Thu Nov 15 12:38:47 2007 +0100
@@ -101,10 +101,9 @@
     equalizer_graph->x = x;
     equalizer_graph->y = y;
     equalizer_graph->skin_index = SKIN_EQMAIN;
-    equalizer_graph->fixed = fixed;
     equalizer_graph->double_size = FALSE;
 
-    gtk_fixed_put(GTK_FIXED(equalizer_graph->fixed), GTK_WIDGET(equalizer_graph), equalizer_graph->x, equalizer_graph->y);
+    gtk_fixed_put(GTK_FIXED(fixed), GTK_WIDGET(equalizer_graph), equalizer_graph->x, equalizer_graph->y);
 
     return GTK_WIDGET(equalizer_graph);
 }
--- a/src/audacious/ui_skinned_equalizer_graph.h	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_equalizer_graph.h	Thu Nov 15 12:38:47 2007 +0100
@@ -46,7 +46,6 @@
 
     gint             x, y, width, height;
     SkinPixmapId     skin_index;
-    GtkWidget        *fixed;
     gboolean         double_size;
 };
 
--- a/src/audacious/ui_skinned_equalizer_slider.c	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_equalizer_slider.c	Thu Nov 15 12:38:47 2007 +0100
@@ -38,7 +38,6 @@
 };
 
 struct _UiSkinnedEqualizerSliderPrivate {
-    GtkWidget        *fixed;
     SkinPixmapId     skin_index;
     gboolean         double_size;
     gint             position;
@@ -129,9 +128,8 @@
     priv->width = 14;
     priv->height = 63;
     priv->skin_index = SKIN_EQMAIN;
-    priv->fixed = fixed;
 
-    gtk_fixed_put(GTK_FIXED(priv->fixed), GTK_WIDGET(es), es->x, es->y);
+    gtk_fixed_put(GTK_FIXED(fixed), GTK_WIDGET(es), es->x, es->y);
 
     return GTK_WIDGET(es);
 }
--- a/src/audacious/ui_skinned_horizontal_slider.c	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_horizontal_slider.c	Thu Nov 15 12:38:47 2007 +0100
@@ -39,7 +39,6 @@
 };
 
 struct _UiSkinnedHorizontalSliderPrivate {
-    GtkWidget        *fixed;
     SkinPixmapId     skin_index;
     gboolean         double_size;
     gint             frame, frame_offset, frame_height, min, max;
@@ -141,7 +140,6 @@
     hs->y = y;
     priv->width = w;
     priv->height = h;
-    priv->fixed = fixed;
     hs->knob_nx = knx;
     hs->knob_ny = kny;
     hs->knob_px = kpx;
@@ -158,7 +156,7 @@
         priv->frame = priv->frame_cb(0);
     priv->skin_index = si;
 
-    gtk_fixed_put(GTK_FIXED(priv->fixed), GTK_WIDGET(hs), hs->x, hs->y);
+    gtk_fixed_put(GTK_FIXED(fixed), GTK_WIDGET(hs), hs->x, hs->y);
 
     return GTK_WIDGET(hs);
 }
--- a/src/audacious/ui_skinned_menurow.c	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_menurow.c	Thu Nov 15 12:38:47 2007 +0100
@@ -133,10 +133,9 @@
 
     menurow->skin_index = si;
 
-    menurow->fixed = fixed;
     menurow->double_size = FALSE;
 
-    gtk_fixed_put(GTK_FIXED(menurow->fixed), GTK_WIDGET(menurow), menurow->x, menurow->y);
+    gtk_fixed_put(GTK_FIXED(fixed), GTK_WIDGET(menurow), menurow->x, menurow->y);
 
     return GTK_WIDGET(menurow);
 }
--- a/src/audacious/ui_skinned_menurow.h	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_menurow.h	Thu Nov 15 12:38:47 2007 +0100
@@ -50,7 +50,6 @@
     GtkWidget        widget;
 
     gint             x, y, width, height;
-    GtkWidget        *fixed;
     gboolean         double_size;
     gint             nx, ny;
     gint             sx, sy;
--- a/src/audacious/ui_skinned_monostereo.c	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_monostereo.c	Thu Nov 15 12:38:47 2007 +0100
@@ -102,10 +102,9 @@
     monostereo->x = x;
     monostereo->y = y;
     monostereo->skin_index = si;
-    monostereo->fixed = fixed;
     monostereo->double_size = FALSE;
 
-    gtk_fixed_put(GTK_FIXED(monostereo->fixed), GTK_WIDGET(monostereo), monostereo->x, monostereo->y);
+    gtk_fixed_put(GTK_FIXED(fixed), GTK_WIDGET(monostereo), monostereo->x, monostereo->y);
 
     return GTK_WIDGET(monostereo);
 }
--- a/src/audacious/ui_skinned_monostereo.h	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_monostereo.h	Thu Nov 15 12:38:47 2007 +0100
@@ -47,7 +47,6 @@
     gint             x, y, width, height;
     gint             num_channels;
     SkinPixmapId     skin_index;
-    GtkWidget        *fixed;
     gboolean         double_size;
 };
 
--- a/src/audacious/ui_skinned_number.c	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_number.c	Thu Nov 15 12:38:47 2007 +0100
@@ -108,10 +108,9 @@
     number->num = 0;
     number->skin_index = si;
 
-    number->fixed = fixed;
     number->double_size = FALSE;
 
-    gtk_fixed_put(GTK_FIXED(number->fixed), GTK_WIDGET(number), number->x, number->y);
+    gtk_fixed_put(GTK_FIXED(fixed), GTK_WIDGET(number), number->x, number->y);
 
     return GTK_WIDGET(number);
 }
--- a/src/audacious/ui_skinned_number.h	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_number.h	Thu Nov 15 12:38:47 2007 +0100
@@ -42,7 +42,6 @@
     gint             num;
     gboolean         double_size;
     SkinPixmapId     skin_index;
-    GtkWidget        *fixed;
 };
 
 struct _UiSkinnedNumberClass {
--- a/src/audacious/ui_skinned_playlist.c	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_playlist.c	Thu Nov 15 12:38:47 2007 +0100
@@ -72,7 +72,6 @@
 };
 
 struct _UiSkinnedPlaylistPrivate {
-    GtkWidget        *fixed;
     SkinPixmapId     skin_index;
     gint             width, height;
     gint             resize_width, resize_height;
@@ -179,10 +178,9 @@
     hs->y = y;
     priv->width = w;
     priv->height = h;
-    priv->fixed = fixed;
     priv->skin_index = SKIN_PLEDIT;
 
-    gtk_fixed_put(GTK_FIXED(priv->fixed), GTK_WIDGET(hs), hs->x, hs->y);
+    gtk_fixed_put(GTK_FIXED(fixed), GTK_WIDGET(hs), hs->x, hs->y);
 
     return GTK_WIDGET(hs);
 }
--- a/src/audacious/ui_skinned_playlist_slider.c	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_playlist_slider.c	Thu Nov 15 12:38:47 2007 +0100
@@ -39,7 +39,6 @@
 };
 
 struct _UiSkinnedPlaylistSliderPrivate {
-    GtkWidget        *fixed;
     SkinPixmapId     skin_index;
     gint             width, height;
 
@@ -133,10 +132,9 @@
     hs->y = y;
     priv->width = 8;
     priv->height = h;
-    priv->fixed = fixed;
     priv->skin_index = SKIN_PLEDIT;
 
-    gtk_fixed_put(GTK_FIXED(priv->fixed), GTK_WIDGET(hs), hs->x, hs->y);
+    gtk_fixed_put(GTK_FIXED(fixed), GTK_WIDGET(hs), hs->x, hs->y);
 
     return GTK_WIDGET(hs);
 }
@@ -326,7 +324,8 @@
     if (priv->resize_height)
         gtk_widget_set_size_request(GTK_WIDGET(playlist_slider), priv->width, priv->height+priv->resize_height);
     if (priv->move_x)
-        gtk_fixed_move(GTK_FIXED(priv->fixed), GTK_WIDGET(playlist_slider), playlist_slider->x+priv->move_x, playlist_slider->y);
+        gtk_fixed_move(GTK_FIXED(gtk_widget_get_parent(GTK_WIDGET(playlist_slider))), GTK_WIDGET(playlist_slider),
+                       playlist_slider->x+priv->move_x, playlist_slider->y);
 
     gtk_widget_queue_draw(GTK_WIDGET(playlist_slider));
 }
--- a/src/audacious/ui_skinned_playstatus.c	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_playstatus.c	Thu Nov 15 12:38:47 2007 +0100
@@ -104,10 +104,9 @@
     playstatus->x = x;
     playstatus->y = y;
 
-    playstatus->fixed = fixed;
     playstatus->double_size = FALSE;
 
-    gtk_fixed_put(GTK_FIXED(playstatus->fixed), GTK_WIDGET(playstatus), playstatus->x, playstatus->y);
+    gtk_fixed_put(GTK_FIXED(fixed), GTK_WIDGET(playstatus), playstatus->x, playstatus->y);
 
     return GTK_WIDGET(playstatus);
 }
--- a/src/audacious/ui_skinned_playstatus.h	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_playstatus.h	Thu Nov 15 12:38:47 2007 +0100
@@ -48,7 +48,6 @@
     GtkWidget        widget;
 
     gint             x, y, width, height;
-    GtkWidget        *fixed;
     gboolean         double_size;
     PStatus          status;
     gboolean         buffering;
--- a/src/audacious/ui_skinned_textbox.c	Thu Nov 15 12:07:23 2007 +0100
+++ b/src/audacious/ui_skinned_textbox.c	Thu Nov 15 12:38:47 2007 +0100
@@ -47,7 +47,6 @@
 
 struct _UiSkinnedTextboxPrivate {
     SkinPixmapId     skin_index;
-    GtkWidget        *fixed;
     gboolean         double_size;
     gboolean         scroll_back;
     gint             nominal_y, nominal_height;
@@ -184,10 +183,9 @@
     priv->scroll_timeout = 0;
     priv->scroll_dummy = 0;
 
-    priv->fixed = fixed;
     priv->double_size = FALSE;
 
-    gtk_fixed_put(GTK_FIXED(priv->fixed), GTK_WIDGET(textbox), textbox->x, textbox->y);
+    gtk_fixed_put(GTK_FIXED(fixed), GTK_WIDGET(textbox), textbox->x, textbox->y);
 
     return GTK_WIDGET(textbox);
 }
@@ -431,7 +429,8 @@
     UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE(textbox);
 
     if (priv->move_x || priv->move_y)
-        gtk_fixed_move(GTK_FIXED(priv->fixed), GTK_WIDGET(textbox), textbox->x+priv->move_x, textbox->y+priv->move_y);
+        gtk_fixed_move(GTK_FIXED(gtk_widget_get_parent(GTK_WIDGET(textbox))), GTK_WIDGET(textbox),
+                       textbox->x+priv->move_x, textbox->y+priv->move_y);
 
     gtk_widget_queue_draw(GTK_WIDGET(textbox));
 }