aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-06-24 19:31:28 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-06-25 08:31:42 +0800
commitf960fd2dff5358f0e13eba7041d35855bf48c22e (patch)
tree92859c8ba093fa15a3bd7b888332d6e61a704a51 /widgets
parent88db20f3e9ff38296c031671de963ae665fd8143 (diff)
downloadgsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.tar
gsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.tar.gz
gsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.tar.bz2
gsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.tar.lz
gsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.tar.xz
gsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.tar.zst
gsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.zip
Reduce usage of g_type_class_peek_parent().
G_DEFINE_TYPE macros define a static "parent_class" variable.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/e-canvas.c8
-rw-r--r--widgets/misc/e-web-view-gtkhtml.c10
-rw-r--r--widgets/misc/e-web-view.c10
-rw-r--r--widgets/table/e-table-header.c2
-rw-r--r--widgets/table/e-table-sort-info.c2
5 files changed, 16 insertions, 16 deletions
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 91bd7c4091..db6f12a150 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -590,6 +590,12 @@ canvas_focus_out_event (GtkWidget *widget,
}
static void
+canvas_reflow (ECanvas *canvas)
+{
+ /* Placeholder so subclasses can safely chain up. */
+}
+
+static void
e_canvas_class_init (ECanvasClass *class)
{
GObjectClass *object_class;
@@ -609,6 +615,8 @@ e_canvas_class_init (ECanvasClass *class)
widget_class->focus_in_event = canvas_focus_in_event;
widget_class->focus_out_event = canvas_focus_out_event;
+ class->reflow = canvas_reflow;
+
signals[REFLOW] = g_signal_new (
"reflow",
G_OBJECT_CLASS_TYPE (object_class),
diff --git a/widgets/misc/e-web-view-gtkhtml.c b/widgets/misc/e-web-view-gtkhtml.c
index 6e426ae76e..292c538205 100644
--- a/widgets/misc/e-web-view-gtkhtml.c
+++ b/widgets/misc/e-web-view-gtkhtml.c
@@ -100,7 +100,6 @@ enum {
LAST_SIGNAL
};
-static gpointer parent_class;
static guint signals[LAST_SIGNAL];
static const gchar *ui =
@@ -784,7 +783,7 @@ web_view_gtkhtml_dispose (GObject *object)
}
/* Chain up to parent's dispose() method. */
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ G_OBJECT_CLASS (e_web_view_gtkhtml_parent_class)->dispose (object);
}
static void
@@ -801,7 +800,7 @@ web_view_gtkhtml_finalize (GObject *object)
g_free (priv->selected_uri);
/* Chain up to parent's finalize() method. */
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (e_web_view_gtkhtml_parent_class)->finalize (object);
}
static void
@@ -826,7 +825,7 @@ web_view_gtkhtml_constructed (GObject *object)
#endif
/* Chain up to parent's constructed() method. */
- G_OBJECT_CLASS (parent_class)->constructed (object);
+ G_OBJECT_CLASS (e_web_view_gtkhtml_parent_class)->constructed (object);
}
static gboolean
@@ -842,7 +841,7 @@ web_view_gtkhtml_button_press_event (GtkWidget *widget,
return TRUE;
/* Chain up to parent's button_press_event() method. */
- widget_class = GTK_WIDGET_CLASS (parent_class);
+ widget_class = GTK_WIDGET_CLASS (e_web_view_gtkhtml_parent_class);
return widget_class->button_press_event (widget, event);
}
@@ -1345,7 +1344,6 @@ e_web_view_gtkhtml_class_init (EWebViewGtkHTMLClass *class)
GtkWidgetClass *widget_class;
GtkHTMLClass *html_class;
- parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (EWebViewGtkHTMLPrivate));
object_class = G_OBJECT_CLASS (class);
diff --git a/widgets/misc/e-web-view.c b/widgets/misc/e-web-view.c
index 8ace48ca1d..1c03ab8995 100644
--- a/widgets/misc/e-web-view.c
+++ b/widgets/misc/e-web-view.c
@@ -105,7 +105,6 @@ enum {
LAST_SIGNAL
};
-static gpointer parent_class;
static guint signals[LAST_SIGNAL];
static const gchar *ui =
@@ -811,7 +810,7 @@ web_view_dispose (GObject *object)
}
/* Chain up to parent's dispose() method. */
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ G_OBJECT_CLASS (e_web_view_parent_class)->dispose (object);
}
static void
@@ -828,7 +827,7 @@ web_view_finalize (GObject *object)
g_free (priv->selected_uri);
/* Chain up to parent's finalize() method. */
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (e_web_view_parent_class)->finalize (object);
}
static void
@@ -853,7 +852,7 @@ web_view_constructed (GObject *object)
#endif
/* Chain up to parent's constructed() method. */
- G_OBJECT_CLASS (parent_class)->constructed (object);
+ G_OBJECT_CLASS (e_web_view_parent_class)->constructed (object);
}
static gboolean
@@ -956,7 +955,7 @@ web_view_button_press_event (GtkWidget *widget,
chainup:
/* Chain up to parent's button_press_event() method. */
- widget_class = GTK_WIDGET_CLASS (parent_class);
+ widget_class = GTK_WIDGET_CLASS (e_web_view_parent_class);
return widget_class->button_press_event (widget, event);
}
@@ -1459,7 +1458,6 @@ e_web_view_class_init (EWebViewClass *class)
GtkHTMLClass *html_class;
#endif
- parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (EWebViewPrivate));
object_class = G_OBJECT_CLASS (class);
diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c
index 2045896532..2728a7ebd9 100644
--- a/widgets/table/e-table-header.c
+++ b/widgets/table/e-table-header.c
@@ -276,8 +276,6 @@ e_table_header_class_init (ETableHeaderClass *class)
object_class->set_property = eth_set_property;
object_class->get_property = eth_get_property;
- e_table_header_parent_class = g_type_class_peek_parent (object_class);
-
g_object_class_install_property (
object_class, PROP_WIDTH,
g_param_spec_double ("width", "Width", "Width",
diff --git a/widgets/table/e-table-sort-info.c b/widgets/table/e-table-sort-info.c
index c477618f09..c85731bc36 100644
--- a/widgets/table/e-table-sort-info.c
+++ b/widgets/table/e-table-sort-info.c
@@ -77,8 +77,6 @@ e_table_sort_info_class_init (ETableSortInfoClass *class)
{
GObjectClass * object_class = G_OBJECT_CLASS (class);
- e_table_sort_info_parent_class = g_type_class_peek_parent (class);
-
object_class->finalize = etsi_finalize;
e_table_sort_info_signals[SORT_INFO_CHANGED] =