[libwnck/wip/muktupavels/gtk4] remove state argument from GtkStyleContext getter functions
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck/wip/muktupavels/gtk4] remove state argument from GtkStyleContext getter functions
- Date: Sat, 20 May 2017 22:17:10 +0000 (UTC)
commit dc08ec38cc08b895fb0987bfbe36bfdfc5911859
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun May 21 01:01:24 2017 +0300
remove state argument from GtkStyleContext getter functions
libwnck/pager.c | 6 ++----
libwnck/selector.c | 2 +-
libwnck/tasklist.c | 12 ++++--------
3 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/libwnck/pager.c b/libwnck/pager.c
index 53e9f6a..6dfd48f 100644
--- a/libwnck/pager.c
+++ b/libwnck/pager.c
@@ -399,12 +399,10 @@ _wnck_pager_get_padding (WnckPager *pager,
{
GtkWidget *widget;
GtkStyleContext *context;
- GtkStateFlags state;
widget = GTK_WIDGET (pager);
context = gtk_widget_get_style_context (widget);
- state = gtk_style_context_get_state (context);
- gtk_style_context_get_padding (context, state, padding);
+ gtk_style_context_get_padding (context, padding);
}
else
{
@@ -1038,7 +1036,7 @@ draw_window (cairo_t *cr,
cairo_pop_group_to_source (cr);
cairo_paint_with_alpha (cr, translucency);
- gtk_style_context_get_color (context, state, &fg);
+ gtk_style_context_get_color (context, &fg);
fg.alpha = translucency;
gdk_cairo_set_source_rgba (cr, &fg);
cairo_set_line_width (cr, 1.0);
diff --git a/libwnck/selector.c b/libwnck/selector.c
index c5ca6c8..7eb6f15 100644
--- a/libwnck/selector.c
+++ b/libwnck/selector.c
@@ -566,7 +566,7 @@ wnck_selector_workspace_name_changed (WnckWorkspace *workspace,
gtk_style_context_save (context);
gtk_style_context_set_state (context, GTK_STATE_FLAG_INSENSITIVE);
- gtk_style_context_get_color (context, GTK_STATE_FLAG_INSENSITIVE, &color);
+ gtk_style_context_get_color (context, &color);
gtk_style_context_restore (context);
name = g_markup_escape_text (wnck_workspace_get_name (workspace), -1);
diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c
index 0cf9844..06d469f 100644
--- a/libwnck/tasklist.c
+++ b/libwnck/tasklist.c
@@ -1157,7 +1157,6 @@ static int
wnck_tasklist_get_button_size (GtkWidget *widget)
{
GtkStyleContext *style_context;
- GtkStateFlags state;
PangoContext *context;
PangoFontMetrics *metrics;
PangoFontDescription *description;
@@ -1166,8 +1165,7 @@ wnck_tasklist_get_button_size (GtkWidget *widget)
gint width;
style_context = gtk_widget_get_style_context (widget);
- state = gtk_style_context_get_state (style_context);
- gtk_style_context_get (style_context, state, GTK_STYLE_PROPERTY_FONT, &description, NULL);
+ gtk_style_context_get (style_context, GTK_STYLE_PROPERTY_FONT, &description, NULL);
context = gtk_widget_get_pango_context (widget);
metrics = pango_context_get_metrics (context, description,
@@ -1467,15 +1465,13 @@ wnck_task_size_allocated (GtkWidget *widget,
{
WnckTask *task = WNCK_TASK (data);
GtkStyleContext *context;
- GtkStateFlags state;
GtkBorder padding;
int min_image_width;
gboolean old_image_visible;
gboolean old_label_visible;
context = gtk_widget_get_style_context (widget);
- state = gtk_style_context_get_state (context);
- gtk_style_context_get_padding (context, state, &padding);
+ gtk_style_context_get_padding (context, &padding);
min_image_width = MINI_ICON_SIZE +
padding.left + padding.right +
@@ -3924,14 +3920,14 @@ wnck_task_draw (GtkWidget *widget,
context = gtk_widget_get_style_context (widget);
state = gtk_style_context_get_state (context);
- gtk_style_context_get_padding (context, state, &padding);
+ gtk_style_context_get_padding (context, &padding);
state = (task->tasklist->priv->active_class_group == task) ?
GTK_STATE_FLAG_ACTIVE : GTK_STATE_FLAG_NORMAL;
gtk_style_context_save (context);
gtk_style_context_set_state (context, state);
- gtk_style_context_get_color (context, state, &color);
+ gtk_style_context_get_color (context, &color);
gtk_style_context_restore (context);
x = gtk_widget_get_allocated_width (widget) -
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]