[evolution] ECellText: Simplify fetching vertical-spacing style property.



commit 0c751ff6dbc9a50d4d956f765334e1a6d0d6bf80
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Nov 30 15:18:14 2012 -0500

    ECellText: Simplify fetching vertical-spacing style property.
    
    Call gtk_widget_style_get().  No need to get GtkStyle involved.

 widgets/table/e-cell-text.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index e871ac1..6ad47b4 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -673,7 +673,6 @@ show_pango_rectangle (CellEdit *edit,
 static gint
 get_vertical_spacing (GtkWidget *canvas)
 {
-	GtkStyle *style;
 	GtkWidget *widget;
 	gint vspacing = 0;
 
@@ -681,11 +680,8 @@ get_vertical_spacing (GtkWidget *canvas)
 
 	/* The parent should be either an ETable or ETree. */
 	widget = gtk_widget_get_parent (canvas);
-	style = gtk_widget_get_style (widget);
 
-	gtk_style_get (
-		style, G_OBJECT_TYPE (widget),
-		"vertical-spacing", &vspacing, NULL);
+	gtk_widget_style_get (widget, "vertical-spacing", &vspacing, NULL);
 
 	return vspacing;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]