[Rhythmbox-devel] [patch] Make volume widget menu act like gnome volume applet.
- From: Douglas McMorris <virage83 mail utexas edu>
- To: rhythmbox-devel gnome org
- Subject: [Rhythmbox-devel] [patch] Make volume widget menu act like gnome volume applet.
- Date: Wed, 13 Aug 2003 12:04:23 -0500
This is just a simple fix to make it appear right below the icon and
aligned with the center of it.
I don't know how to properly make a patch file :( so heres the diff and
a pic for those of you who can't apply it...
--
Douglas McMorris <virage83@mail.utexas.edu>
--- rhythmbox-0.4.99.4/lib/widgets/rb-volume.c 2003-08-11 1 2:47:12.000000000 -0500
+++ Code/rhythmbox/lib/widgets/rb-volume.c 2003-08-13 1 1:46:47.000000000 -0500
@@ -294,7 +294,9 @@
GtkRequisition req;
GdkGrabStatus pointer, keyboard;
gint x, y;
- gint width, height;
+ gint button_width, button_height;
+ gint window_width, window_height;
+ gint spacing = 1;
rb_debug ("volume clicked");
/* if (GTK_WIDGET_VISIBLE (GTK_WIDGET (volume->priv->wi ndow))) */
@@ -306,11 +308,13 @@
gtk_widget_size_request (GTK_WIDGET (volume->priv->w indow), &req);
gdk_window_get_origin (gtk_widget_get_parent_window (GTK_BIN (volume->priv->button)->child), &x, &y);
- gdk_drawable_get_size (gtk_widget_get_parent_window (GTK_BIN (volume->priv->button)->child), &width, &height);
- rb_debug ("window origin: %d %d; size: %d %d", x, y, width, height);
+ gdk_drawable_get_size (gtk_widget_get_parent_window (GTK_BIN (volume->priv->button)->child), &button_width, &but ton_height);
+ rb_debug ("window origin: %d %d; size: %d %d", x, y, button_width, button_height);
rb_debug ("moving window to %d %d", x, y);
- gtk_window_move (GTK_WINDOW (volume->priv->window), x, y);
+
+ gdk_drawable_get_size (gtk_widget_get_parent_window (GTK_BIN (volume->priv->window)->child), &window_width, &win dow_height);
+ gtk_window_move (GTK_WINDOW (volume->priv->window), x+((button_width-window_width)/2), y+button_width+spacing);
gtk_widget_show_all (volume->priv->window);
[douglas@neo douglas]$ diff -u rhythmbox-0.4.99.4/lib/widgets/rb-volume.c Code/rhythmbox/lib/widgets/rb-volume.c
--- rhythmbox-0.4.99.4/lib/widgets/rb-volume.c 2003-08-11 12:47:12.000000000 -0500
+++ Code/rhythmbox/lib/widgets/rb-volume.c 2003-08-13 11:46:47.000000000 -0500
@@ -294,7 +294,9 @@
GtkRequisition req;
GdkGrabStatus pointer, keyboard;
gint x, y;
- gint width, height;
+ gint button_width, button_height;
+ gint window_width, window_height;
+ gint spacing = 1;
rb_debug ("volume clicked");
/* if (GTK_WIDGET_VISIBLE (GTK_WIDGET (volume->priv->window))) */
@@ -306,11 +308,13 @@
gtk_widget_size_request (GTK_WIDGET (volume->priv->window), &req);
gdk_window_get_origin (gtk_widget_get_parent_window (GTK_BIN (volume->priv->button)->child), &x, &y);
- gdk_drawable_get_size (gtk_widget_get_parent_window (GTK_BIN (volume->priv->button)->child), &width, &height);
- rb_debug ("window origin: %d %d; size: %d %d", x, y, width, height);
+ gdk_drawable_get_size (gtk_widget_get_parent_window (GTK_BIN (volume->priv->button)->child), &button_width, &button_height);
+ rb_debug ("window origin: %d %d; size: %d %d", x, y, button_width, button_height);
rb_debug ("moving window to %d %d", x, y);
- gtk_window_move (GTK_WINDOW (volume->priv->window), x, y);
+
+ gdk_drawable_get_size (gtk_widget_get_parent_window (GTK_BIN (volume->priv->window)->child), &window_width, &window_height);
+ gtk_window_move (GTK_WINDOW (volume->priv->window), x+((button_width-window_width)/2), y+button_width+spacing);
gtk_widget_show_all (volume->priv->window);
change.png
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]