changeset 2829:4eda78b785ed trunk

[svn] - draw_main_window redraws custom gtk widgets
author desowin
date Fri, 08 Jun 2007 03:42:32 -0700
parents 0e460510d782
children 5aa0045e787a
files ChangeLog src/audacious/build_stamp.c src/audacious/ui_main.c src/audacious/widgets/audacious_pbutton.c src/audacious/widgets/audacious_pbutton.h
diffstat 5 files changed, 23 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jun 08 02:02:12 2007 -0700
+++ b/ChangeLog	Fri Jun 08 03:42:32 2007 -0700
@@ -1,3 +1,10 @@
+2007-06-08 09:02:12 +0000  Tomasz Mon <desowin@atheme.org>
+  revision [4682]
+  - fix audacious_pbutton_size_allocate
+  trunk/src/audacious/widgets/audacious_pbutton.c |    9 ++++-----
+  1 file changed, 4 insertions(+), 5 deletions(-)
+
+
 2007-06-07 20:24:13 +0000  Tomasz Mon <desowin@atheme.org>
   revision [4680]
   implement toggle-double-size
--- a/src/audacious/build_stamp.c	Fri Jun 08 02:02:12 2007 -0700
+++ b/src/audacious/build_stamp.c	Fri Jun 08 03:42:32 2007 -0700
@@ -1,2 +1,2 @@
 #include <glib.h>
-const gchar *svn_stamp = "20070607-4680";
+const gchar *svn_stamp = "20070608-4682";
--- a/src/audacious/ui_main.c	Fri Jun 08 02:02:12 2007 -0700
+++ b/src/audacious/ui_main.c	Fri Jun 08 03:42:32 2007 -0700
@@ -522,6 +522,13 @@
 
         }
         else {
+            GList *iter;
+            for (iter = GTK_FIXED (SKINNED_WINDOW(mainwin)->fixed)->children; iter; iter = g_list_next (iter)) {
+                GtkFixedChild *child_data = (GtkFixedChild *) iter->data;
+                GtkWidget *child = child_data->widget;
+                g_signal_emit_by_name(child, "redraw");
+            }
+
             for (wl = mainwin_wlist; wl; wl = g_list_next(wl)) {
                 w = WIDGET(wl->data);
 
--- a/src/audacious/widgets/audacious_pbutton.c	Fri Jun 08 02:02:12 2007 -0700
+++ b/src/audacious/widgets/audacious_pbutton.c	Fri Jun 08 03:42:32 2007 -0700
@@ -120,6 +120,7 @@
         klass->released = button_released;
         klass->clicked = NULL;
         klass->doubled = audacious_pbutton_toggle_doublesize;
+        klass->redraw = audacious_pbutton_paint;
 
         button_signals[PRESSED] = 
                     g_signal_new ("pressed", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST,
@@ -141,6 +142,11 @@
                                   G_STRUCT_OFFSET (AudaciousPButtonClass, doubled), NULL, NULL,
                                   gtk_marshal_VOID__VOID, G_TYPE_NONE, 0);
 
+        button_signals[REDRAW] = 
+                    g_signal_new ("redraw", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
+                                  G_STRUCT_OFFSET (AudaciousPButtonClass, redraw), NULL, NULL,
+                                  gtk_marshal_VOID__VOID, G_TYPE_NONE, 0);
+
         g_type_class_add_private (gobject_class, sizeof (AudaciousPButtonPrivate));
 }
 
@@ -184,8 +190,6 @@
 
         button->event_window = gdk_window_new(gtk_widget_get_parent_window(widget), &attrib, GDK_WA_X | GDK_WA_Y);
         gdk_window_set_user_data (button->event_window, button);
-
-        audacious_pbutton_paint(button);
 }
 
 static void audacious_pbutton_unrealize(GtkWidget *widget) {
--- a/src/audacious/widgets/audacious_pbutton.h	Fri Jun 08 02:02:12 2007 -0700
+++ b/src/audacious/widgets/audacious_pbutton.h	Fri Jun 08 03:42:32 2007 -0700
@@ -45,6 +45,7 @@
 	RELEASED,
 	CLICKED,
 	DOUBLED,
+	REDRAW,
 	LAST_SIGNAL
 };
 
@@ -66,6 +67,7 @@
 	void (* released) (AudaciousPButton *button);
 	void (* clicked)  (AudaciousPButton *button);
 	void (* doubled)  (AudaciousPButton *button);
+	void (* redraw)   (AudaciousPButton *button);
 };
 
 GType audacious_pbutton_get_type(void) G_GNUC_CONST;