[rhythmbox] fix up some calls to deprecated functions in widget implementations
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] fix up some calls to deprecated functions in widget implementations
- Date: Mon, 29 Dec 2014 11:13:34 +0000 (UTC)
commit ec379e25762343cab920f5b43d4c5abe6f2b7c7e
Author: Jonathan Matthew <jonathan d14n org>
Date: Tue Dec 23 10:17:10 2014 +1000
fix up some calls to deprecated functions in widget implementations
widgets/rb-rating-helper.c | 11 +----------
widgets/rb-segmented-bar.c | 4 ++--
2 files changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/widgets/rb-rating-helper.c b/widgets/rb-rating-helper.c
index ca7a379..cd12a69 100644
--- a/widgets/rb-rating-helper.c
+++ b/widgets/rb-rating-helper.c
@@ -178,23 +178,14 @@ rb_rating_render_stars (GtkWidget *widget,
for (i = 0; i < RB_RATING_MAX_SCORE; i++) {
GdkPixbuf *buf;
- GtkStateType state;
gint star_offset;
int offset;
GdkRGBA color;
if (selected == TRUE) {
offset = 0;
- if (gtk_widget_has_focus (widget))
- state = GTK_STATE_SELECTED;
- else
- state = GTK_STATE_ACTIVE;
} else {
offset = 120;
- if (gtk_widget_get_state (widget) == GTK_STATE_INSENSITIVE)
- state = GTK_STATE_INSENSITIVE;
- else
- state = GTK_STATE_NORMAL;
}
if (i < rating)
@@ -208,7 +199,7 @@ rb_rating_render_stars (GtkWidget *widget,
return FALSE;
}
- gtk_style_context_get_color (gtk_widget_get_style_context (widget), state, &color);
+ gtk_style_context_get_color (gtk_widget_get_style_context (widget),
gtk_widget_get_state_flags (widget), &color);
buf = eel_create_colorized_pixbuf (buf,
((guint16)(color.red * G_MAXUINT16) + offset) >> 8,
((guint16)(color.green * G_MAXUINT16) + offset) >> 8,
diff --git a/widgets/rb-segmented-bar.c b/widgets/rb-segmented-bar.c
index ebecc3e..282d137 100644
--- a/widgets/rb-segmented-bar.c
+++ b/widgets/rb-segmented-bar.c
@@ -693,7 +693,7 @@ static void rb_segmented_bar_render_labels (RBSegmentedBar *bar,
return;
}
gtk_style_context_get_color (gtk_widget_get_style_context (GTK_WIDGET (bar)),
- gtk_widget_get_state (GTK_WIDGET (bar)),
+ gtk_widget_get_state_flags (GTK_WIDGET (bar)),
&gdk_color);
if (gtk_widget_get_direction (GTK_WIDGET (bar)) == GTK_TEXT_DIR_RTL) {
@@ -990,7 +990,7 @@ a11y_impl_ref_child (AtkObject *obj, gint i)
static void
a11y_impl_get_image_position (AtkImage *image, gint *x, gint *y, AtkCoordType coord_type)
{
- atk_component_get_position (ATK_COMPONENT (image), x, y, coord_type);
+ atk_component_get_extents (ATK_COMPONENT (image), x, y, NULL, NULL, coord_type);
}
static const char *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]