[gnome-media] Make work with the latest gtk3
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-media] Make work with the latest gtk3
- Date: Sat, 2 Oct 2010 04:36:28 +0000 (UTC)
commit 5b71e80a54faf7bc8172bddccd74e2688435e571
Author: William Jon McCann <jmccann redhat com>
Date: Sat Oct 2 00:35:53 2010 -0400
Make work with the latest gtk3
gnome-volume-control/src/gvc-level-bar.c | 16 +++-------------
gnome-volume-control/src/gvc-stream-status-icon.c | 2 +-
2 files changed, 4 insertions(+), 14 deletions(-)
---
diff --git a/gnome-volume-control/src/gvc-level-bar.c b/gnome-volume-control/src/gvc-level-bar.c
index 4c7d173..2d3d9da 100644
--- a/gnome-volume-control/src/gvc-level-bar.c
+++ b/gnome-volume-control/src/gvc-level-bar.c
@@ -546,25 +546,16 @@ curved_rectangle (cairo_t *cr,
}
static int
-gvc_level_bar_expose (GtkWidget *widget,
- GdkEventExpose *event)
+gvc_level_bar_draw (GtkWidget *widget,
+ cairo_t *cr)
{
GvcLevelBar *bar;
- cairo_t *cr;
GtkAllocation allocation;
g_return_val_if_fail (GVC_IS_LEVEL_BAR (widget), FALSE);
- g_return_val_if_fail (event != NULL, FALSE);
-
- /* event queue compression */
- if (event->count > 0) {
- return FALSE;
- }
bar = GVC_LEVEL_BAR (widget);
- cr = gdk_cairo_create (gtk_widget_get_window (widget));
-
gtk_widget_get_allocation (widget, &allocation);
cairo_translate (cr,
allocation.x,
@@ -641,7 +632,6 @@ gvc_level_bar_expose (GtkWidget *widget,
cairo_stroke (cr);
}
}
- cairo_destroy (cr);
return FALSE;
}
@@ -657,7 +647,7 @@ gvc_level_bar_class_init (GvcLevelBarClass *klass)
object_class->set_property = gvc_level_bar_set_property;
object_class->get_property = gvc_level_bar_get_property;
- widget_class->expose_event = gvc_level_bar_expose;
+ widget_class->draw = gvc_level_bar_draw;
widget_class->size_request = gvc_level_bar_size_request;
widget_class->size_allocate = gvc_level_bar_size_allocate;
diff --git a/gnome-volume-control/src/gvc-stream-status-icon.c b/gnome-volume-control/src/gvc-stream-status-icon.c
index e2e8ed6..742e5cf 100644
--- a/gnome-volume-control/src/gvc-stream-status-icon.c
+++ b/gnome-volume-control/src/gvc-stream-status-icon.c
@@ -133,7 +133,7 @@ popup_dock (GvcStreamStatusIcon *icon,
gtk_container_foreach (GTK_CONTAINER (icon->priv->dock),
(GtkCallback) gtk_widget_show_all, NULL);
- gtk_size_request_get_size (GTK_SIZE_REQUEST (icon->priv->dock), &dock_req, NULL);
+ gtk_widget_get_preferred_size (icon->priv->dock, &dock_req, NULL);
if (orientation == GTK_ORIENTATION_VERTICAL) {
if (area.x + area.width + dock_req.width <= monitor.x + monitor.width) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]