[gtk+] Cosmetic: Avoid explicit state variables
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Cosmetic: Avoid explicit state variables
- Date: Sat, 14 Nov 2015 17:57:01 +0000 (UTC)
commit 828a66b4aa3851209b65e270380561cc0736b23c
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Nov 14 10:29:58 2015 -0500
Cosmetic: Avoid explicit state variables
Using the state of the context makes this more obviously correct.
gtk/gtktextview.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 8c27593..f68fb2f 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -4761,16 +4761,14 @@ gtk_text_view_unmap (GtkWidget *widget)
static void
text_window_set_padding (GtkTextView *text_view,
- GtkStyleContext *style_context)
+ GtkStyleContext *context)
{
GtkTextViewPrivate *priv;
- GtkStateFlags state;
GtkBorder padding;
priv = text_view->priv;
- state = gtk_widget_get_state_flags (GTK_WIDGET (text_view));
- gtk_style_context_get_padding (style_context, state, &padding);
+ gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &padding);
if (padding.left != priv->left_padding ||
padding.right != priv->right_padding ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]