diff options
author | Tomasz Sterna <tomek@xiaoka.com> | 2012-01-16 01:48:40 +0100 |
---|---|---|
committer | Tomasz Sterna <tomek@xiaoka.com> | 2012-05-30 23:10:21 +0300 |
commit | 2603dde466c82ed60c41f9540a68f803d3510bf5 (patch) | |
tree | 3b018bcddbf6495b391a6fa324ff38c5eb8a8ea5 /hildon/hildon-helper.c | |
parent | 66b5569ee4af3c6044c8e94b749fe8f22659a24a (diff) |
Widget porting to GTK+ 3
with some added fixes for strict compiler checks
Diffstat (limited to 'hildon/hildon-helper.c')
-rw-r--r-- | hildon/hildon-helper.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/hildon/hildon-helper.c b/hildon/hildon-helper.c index f07355b..9410907 100644 --- a/hildon/hildon-helper.c +++ b/hildon/hildon-helper.c @@ -218,12 +218,13 @@ hildon_change_style_recursive_from_list (GtkWidget *widget, HildonLogicalElement *element = (HildonLogicalElement *) iterator->data; if (element->is_color == TRUE) { - + GtkStyle *style; /* Changing logical color */ GdkColor color; gtk_widget_ensure_style (widget); - if (gtk_style_lookup_color (widget->style, element->logical_color_name, &color) == TRUE) { - + g_object_get (widget, "style", &style, NULL); + if (gtk_style_lookup_color (style, element->logical_color_name, &color) == TRUE) { + switch (element->rc_flags) { case GTK_RC_FG: @@ -243,6 +244,7 @@ hildon_change_style_recursive_from_list (GtkWidget *widget, break; } } + g_object_unref (style); } else { /* Changing logical font */ @@ -404,13 +406,16 @@ hildon_helper_set_logical_color (GtkWidget *widget, * Finger-Sized scrollbar should always be used together with finger-sized content. **/ void -hildon_helper_set_thumb_scrollbar (GtkScrolledWindow *win, +hildon_helper_set_thumb_scrollbar (GtkScrolledWindow *win, gboolean thumb) { + GtkWidget *vscrollbar; + g_return_if_fail (GTK_IS_SCROLLED_WINDOW (win)); - if (win->vscrollbar) - gtk_widget_set_name (win->vscrollbar, (thumb) ? "hildon-thumb-scrollbar" : NULL); + vscrollbar = gtk_scrolled_window_get_vscrollbar (win); + if (vscrollbar) + gtk_widget_set_name (vscrollbar, (thumb) ? "hildon-thumb-scrollbar" : NULL); } /** |