gtk+ r20880 - in trunk: . gtk
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r20880 - in trunk: . gtk
- Date: Mon, 21 Jul 2008 12:27:31 +0000 (UTC)
Author: mitch
Date: Mon Jul 21 12:27:30 2008
New Revision: 20880
URL: http://svn.gnome.org/viewvc/gtk+?rev=20880&view=rev
Log:
2008-07-21 Michael Natterer <mitch imendio com>
* gtk/gtktoolbar.c (gtk_toolbar_class_init): use the simpler
g_signal_override_class_handler() instead of
g_signal_override_class_closure().
* gtk/gtktextview.c (gtk_text_view_class_init): ditto.
(gtk_text_view_compat_move_focus): chain up using
g_signal_chain_from_overridden_handler() instead of the generic
g_signal_chain_from_overridden() which needs manual fiddling with
millions of GValues.
Modified:
trunk/ChangeLog
trunk/gtk/gtktextview.c
trunk/gtk/gtktoolbar.c
Modified: trunk/gtk/gtktextview.c
==============================================================================
--- trunk/gtk/gtktextview.c (original)
+++ trunk/gtk/gtktextview.c Mon Jul 21 12:27:30 2008
@@ -492,14 +492,12 @@
widget_class->expose_event = gtk_text_view_expose_event;
widget_class->focus = gtk_text_view_focus;
- /* need to override the base class function via override_class_closure,
+ /* need to override the base class function via override_class_handler,
* because the signal slot is not available in GtkWidgetCLass
*/
- g_signal_override_class_closure (g_signal_lookup ("move-focus",
- GTK_TYPE_WIDGET),
+ g_signal_override_class_handler ("move-focus",
GTK_TYPE_TEXT_VIEW,
- g_cclosure_new (G_CALLBACK (gtk_text_view_move_focus),
- NULL, NULL));
+ G_CALLBACK (gtk_text_view_move_focus));
widget_class->drag_begin = gtk_text_view_drag_begin;
widget_class->drag_end = gtk_text_view_drag_end;
@@ -5756,22 +5754,10 @@
{
/* if this is a signal emission, chain up */
- GValue instance_and_params[2] = { { 0, }, { 0, } };
- GValue return_value = { 0, };
-
- g_value_init (&instance_and_params[0], GTK_TYPE_WIDGET);
- g_value_set_object (&instance_and_params[0], text_view);
-
- g_value_init (&instance_and_params[1], GTK_TYPE_DIRECTION_TYPE);
- g_value_set_enum (&instance_and_params[1], direction_type);
-
- g_value_init (&return_value, G_TYPE_BOOLEAN);
-
- g_signal_chain_from_overridden (instance_and_params, &return_value);
+ gboolean retval;
- g_value_unset (&instance_and_params[0]);
- g_value_unset (&instance_and_params[1]);
- g_value_unset (&return_value);
+ g_signal_chain_from_overridden_handler (text_view,
+ direction_type, &retval);
}
else
{
Modified: trunk/gtk/gtktoolbar.c
==============================================================================
--- trunk/gtk/gtktoolbar.c (original)
+++ trunk/gtk/gtktoolbar.c Mon Jul 21 12:27:30 2008
@@ -378,14 +378,12 @@
widget_class->style_set = gtk_toolbar_style_set;
widget_class->focus = gtk_toolbar_focus;
- /* need to override the base class function via override_class_closure,
+ /* need to override the base class function via override_class_handler,
* because the signal slot is not available in GtkWidgetClass
*/
- g_signal_override_class_closure (g_signal_lookup ("move_focus",
- GTK_TYPE_WIDGET),
+ g_signal_override_class_handler ("move-focus",
GTK_TYPE_TOOLBAR,
- g_cclosure_new (G_CALLBACK (gtk_toolbar_move_focus),
- NULL, NULL));
+ G_CALLBACK (gtk_toolbar_move_focus));
widget_class->screen_changed = gtk_toolbar_screen_changed;
widget_class->realize = gtk_toolbar_realize;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]