forked from AuroraMiddleware/gtk
use the simpler g_signal_override_class_handler() instead of
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. svn path=/trunk/; revision=20880
This commit is contained in:
parent
d7cc567e33
commit
b06c30bb51
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
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.
|
||||
|
||||
2008-07-21 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gtk/gtkuimanager.c: remove redundant include.
|
||||
|
@ -492,14 +492,12 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
|
||||
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 @@ gtk_text_view_compat_move_focus (GtkTextView *text_view,
|
||||
{
|
||||
/* if this is a signal emission, chain up */
|
||||
|
||||
GValue instance_and_params[2] = { { 0, }, { 0, } };
|
||||
GValue return_value = { 0, };
|
||||
gboolean retval;
|
||||
|
||||
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);
|
||||
|
||||
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
|
||||
{
|
||||
|
@ -378,14 +378,12 @@ gtk_toolbar_class_init (GtkToolbarClass *klass)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user