gtk/gtkaccellabel.c gtk/gtkcalendar.c gtk/gtkclist.c gtk/gtkentry.c

2008-08-12  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkaccellabel.c
	* gtk/gtkcalendar.c
	* gtk/gtkclist.c
	* gtk/gtkentry.c
	* gtk/gtkeventbox.c
	* gtk/gtkfilechooserbutton.c
	* gtk/gtkfilechooserdefault.c
	* gtk/gtkhandlebox.c
	* gtk/gtkhsv.c
	* gtk/gtkiconview.c
	* gtk/gtkimage.c
	* gtk/gtklayout.c
	* gtk/gtklistitem.c
	* gtk/gtkmenuitem.c
	* gtk/gtkmessagedialog.c
	* gtk/gtknotebook.c
	* gtk/gtkpaned.c
	* gtk/gtkpathbar.c
	* gtk/gtkplug.c
	* gtk/gtkprintunixdialog.c
	* gtk/gtkrange.c
	* gtk/gtkrecentchooserdefault.c
	* gtk/gtkruler.c
	* gtk/gtksocket.c
	* gtk/gtktext.c
	* gtk/gtktextview.c
	* gtk/gtktoolbar.c
	* gtk/gtktreeitem.c
	* gtk/gtktreeview.c
	* gtk/gtkviewport.c
	* gtk/gtkwin32embedwidget.c: chain up unconditionally in
	realize(), unrealize(), map(), unmap(), style_set(),
	key_press_event() and size_request()


svn path=/trunk/; revision=21088
This commit is contained in:
Michael Natterer 2008-08-12 09:44:32 +00:00 committed by Michael Natterer
parent 4980a282a0
commit d9d3379698
32 changed files with 84 additions and 87 deletions

View File

@ -1,3 +1,39 @@
2008-08-12 Michael Natterer <mitch@imendio.com>
* gtk/gtkaccellabel.c
* gtk/gtkcalendar.c
* gtk/gtkclist.c
* gtk/gtkentry.c
* gtk/gtkeventbox.c
* gtk/gtkfilechooserbutton.c
* gtk/gtkfilechooserdefault.c
* gtk/gtkhandlebox.c
* gtk/gtkhsv.c
* gtk/gtkiconview.c
* gtk/gtkimage.c
* gtk/gtklayout.c
* gtk/gtklistitem.c
* gtk/gtkmenuitem.c
* gtk/gtkmessagedialog.c
* gtk/gtknotebook.c
* gtk/gtkpaned.c
* gtk/gtkpathbar.c
* gtk/gtkplug.c
* gtk/gtkprintunixdialog.c
* gtk/gtkrange.c
* gtk/gtkrecentchooserdefault.c
* gtk/gtkruler.c
* gtk/gtksocket.c
* gtk/gtktext.c
* gtk/gtktextview.c
* gtk/gtktoolbar.c
* gtk/gtktreeitem.c
* gtk/gtktreeview.c
* gtk/gtkviewport.c
* gtk/gtkwin32embedwidget.c: chain up unconditionally in
realize(), unrealize(), map(), unmap(), style_set(),
key_press_event() and size_request()
2008-08-12 Michael Natterer <mitch@imendio.com>
* gtk/gtkwidget.c: change names of default implementations of

View File

@ -266,9 +266,8 @@ gtk_accel_label_size_request (GtkWidget *widget,
GtkAccelLabel *accel_label = GTK_ACCEL_LABEL (widget);
PangoLayout *layout;
gint width;
if (GTK_WIDGET_CLASS (gtk_accel_label_parent_class)->size_request)
GTK_WIDGET_CLASS (gtk_accel_label_parent_class)->size_request (widget, requisition);
GTK_WIDGET_CLASS (gtk_accel_label_parent_class)->size_request (widget, requisition);
layout = gtk_widget_create_pango_layout (widget, gtk_accel_label_get_string (accel_label));
pango_layout_get_pixel_size (layout, &width, NULL);

View File

@ -1657,8 +1657,7 @@ gtk_calendar_unrealize (GtkWidget *widget)
priv->day_name_win = NULL;
}
if (GTK_WIDGET_CLASS (gtk_calendar_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_calendar_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_calendar_parent_class)->unrealize (widget);
}
static gchar*

View File

@ -4662,8 +4662,7 @@ gtk_clist_unrealize (GtkWidget *widget)
clist->fg_gc = NULL;
clist->bg_gc = NULL;
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
}
static void
@ -4817,14 +4816,9 @@ static void
gtk_clist_style_set (GtkWidget *widget,
GtkStyle *previous_style)
{
GtkCList *clist;
GtkCList *clist = GTK_CLIST (widget);
g_return_if_fail (GTK_IS_CLIST (widget));
if (GTK_WIDGET_CLASS (parent_class)->style_set)
GTK_WIDGET_CLASS (parent_class)->style_set (widget, previous_style);
clist = GTK_CLIST (widget);
GTK_WIDGET_CLASS (parent_class)->style_set (widget, previous_style);
if (GTK_WIDGET_REALIZED (widget))
{

View File

@ -1384,8 +1384,7 @@ gtk_entry_unrealize (GtkWidget *widget)
entry->popup_menu = NULL;
}
if (GTK_WIDGET_CLASS (gtk_entry_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_entry_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_entry_parent_class)->unrealize (widget);
}
void

View File

@ -450,8 +450,7 @@ gtk_event_box_unrealize (GtkWidget *widget)
priv->event_window = NULL;
}
if (GTK_WIDGET_CLASS (gtk_event_box_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_event_box_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_event_box_parent_class)->unrealize (widget);
}
static void

View File

@ -1159,8 +1159,7 @@ gtk_file_chooser_button_map (GtkWidget *widget)
priv->folder_has_been_set = TRUE;
}
if (GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->map)
GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->map (widget);
GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->map (widget);
}
static gboolean
@ -1369,9 +1368,8 @@ static void
gtk_file_chooser_button_style_set (GtkWidget *widget,
GtkStyle *old_style)
{
if (GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->style_set)
GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->style_set (widget,
old_style);
GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->style_set (widget,
old_style);
if (gtk_widget_has_screen (widget))
change_icon_theme (GTK_FILE_CHOOSER_BUTTON (widget));

View File

@ -5835,8 +5835,7 @@ gtk_file_chooser_default_style_set (GtkWidget *widget,
impl = GTK_FILE_CHOOSER_DEFAULT (widget);
profile_msg (" parent class style_set start", NULL);
if (GTK_WIDGET_CLASS (_gtk_file_chooser_default_parent_class)->style_set)
GTK_WIDGET_CLASS (_gtk_file_chooser_default_parent_class)->style_set (widget, previous_style);
GTK_WIDGET_CLASS (_gtk_file_chooser_default_parent_class)->style_set (widget, previous_style);
profile_msg (" parent class style_set end", NULL);
if (gtk_widget_has_screen (GTK_WIDGET (impl)))

View File

@ -468,8 +468,7 @@ gtk_handle_box_unrealize (GtkWidget *widget)
gdk_window_destroy (hb->float_window);
hb->float_window = NULL;
if (GTK_WIDGET_CLASS (gtk_handle_box_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_handle_box_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_handle_box_parent_class)->unrealize (widget);
}
static void

View File

@ -330,9 +330,8 @@ gtk_hsv_unrealize (GtkWidget *widget)
g_object_unref (priv->gc);
priv->gc = NULL;
if (GTK_WIDGET_CLASS (gtk_hsv_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_hsv_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_hsv_parent_class)->unrealize (widget);
}
/* Size_request handler for the HSV color selector */

View File

@ -1231,9 +1231,7 @@ gtk_icon_view_unrealize (GtkWidget *widget)
gdk_window_destroy (icon_view->priv->bin_window);
icon_view->priv->bin_window = NULL;
/* GtkWidget::unrealize destroys children and widget->window */
if (GTK_WIDGET_CLASS (gtk_icon_view_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_icon_view_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_icon_view_parent_class)->unrealize (widget);
}
static void

View File

@ -1458,8 +1458,7 @@ gtk_image_unmap (GtkWidget *widget)
{
gtk_image_reset_anim_iter (GTK_IMAGE (widget));
if (GTK_WIDGET_CLASS (gtk_image_parent_class)->unmap)
GTK_WIDGET_CLASS (gtk_image_parent_class)->unmap (widget);
GTK_WIDGET_CLASS (gtk_image_parent_class)->unmap (widget);
}
static void
@ -1467,8 +1466,7 @@ gtk_image_unrealize (GtkWidget *widget)
{
gtk_image_reset_anim_iter (GTK_IMAGE (widget));
if (GTK_WIDGET_CLASS (gtk_image_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_image_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_image_parent_class)->unrealize (widget);
}
static gint
@ -2228,9 +2226,8 @@ gtk_image_style_set (GtkWidget *widget,
image = GTK_IMAGE (widget);
if (GTK_WIDGET_CLASS (gtk_image_parent_class)->style_set)
GTK_WIDGET_CLASS (gtk_image_parent_class)->style_set (widget, prev_style);
GTK_WIDGET_CLASS (gtk_image_parent_class)->style_set (widget, prev_style);
icon_theme_changed (image);
}

View File

@ -881,10 +881,10 @@ gtk_layout_realize (GtkWidget *widget)
}
static void
gtk_layout_style_set (GtkWidget *widget, GtkStyle *old_style)
gtk_layout_style_set (GtkWidget *widget,
GtkStyle *old_style)
{
if (GTK_WIDGET_CLASS (gtk_layout_parent_class)->style_set)
GTK_WIDGET_CLASS (gtk_layout_parent_class)->style_set (widget, old_style);
GTK_WIDGET_CLASS (gtk_layout_parent_class)->style_set (widget, old_style);
if (GTK_WIDGET_REALIZED (widget))
{
@ -926,8 +926,7 @@ gtk_layout_unrealize (GtkWidget *widget)
gdk_window_destroy (layout->bin_window);
layout->bin_window = NULL;
if (GTK_WIDGET_CLASS (gtk_layout_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_layout_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_layout_parent_class)->unrealize (widget);
}
static void

View File

@ -427,8 +427,7 @@ gtk_list_item_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
/*if (GTK_WIDGET_CLASS (parent_class)->realize)
GTK_WIDGET_CLASS (parent_class)->realize (widget);*/
/*GTK_WIDGET_CLASS (parent_class)->realize (widget);*/
g_return_if_fail (GTK_IS_LIST_ITEM (widget));

View File

@ -853,8 +853,7 @@ gtk_menu_item_unrealize (GtkWidget *widget)
gdk_window_destroy (menu_item->event_window);
menu_item->event_window = NULL;
if (GTK_WIDGET_CLASS (gtk_menu_item_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_menu_item_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_menu_item_parent_class)->unrealize (widget);
}
static void

View File

@ -892,8 +892,7 @@ gtk_message_dialog_style_set (GtkWidget *widget,
setup_primary_label_font (dialog);
if (GTK_WIDGET_CLASS (gtk_message_dialog_parent_class)->style_set)
(GTK_WIDGET_CLASS (gtk_message_dialog_parent_class)->style_set) (widget, prev_style);
GTK_WIDGET_CLASS (gtk_message_dialog_parent_class)->style_set (widget, prev_style);
}
#define __GTK_MESSAGE_DIALOG_C__

View File

@ -1784,8 +1784,7 @@ gtk_notebook_unrealize (GtkWidget *widget)
priv->drag_window = NULL;
}
if (GTK_WIDGET_CLASS (gtk_notebook_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_notebook_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_notebook_parent_class)->unrealize (widget);
}
static void

View File

@ -773,8 +773,7 @@ gtk_paned_unrealize (GtkWidget *widget)
gtk_paned_set_saved_focus (paned, NULL);
gtk_paned_set_first_paned (paned, NULL);
if (GTK_WIDGET_CLASS (gtk_paned_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_paned_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_paned_parent_class)->unrealize (widget);
}
static void

View File

@ -648,8 +648,7 @@ static void
gtk_path_bar_style_set (GtkWidget *widget,
GtkStyle *previous_style)
{
if (GTK_WIDGET_CLASS (gtk_path_bar_parent_class)->style_set)
GTK_WIDGET_CLASS (gtk_path_bar_parent_class)->style_set (widget, previous_style);
GTK_WIDGET_CLASS (gtk_path_bar_parent_class)->style_set (widget, previous_style);
gtk_path_bar_check_icon_theme (GTK_PATH_BAR (widget));
}

View File

@ -567,8 +567,7 @@ gtk_plug_unrealize (GtkWidget *widget)
g_object_unref (plug->modality_group);
}
if (GTK_WIDGET_CLASS (gtk_plug_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_plug_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_plug_parent_class)->unrealize (widget);
}
static void

View File

@ -1630,8 +1630,7 @@ static void
gtk_print_unix_dialog_style_set (GtkWidget *widget,
GtkStyle *previous_style)
{
if (GTK_WIDGET_CLASS (gtk_print_unix_dialog_parent_class)->style_set)
GTK_WIDGET_CLASS (gtk_print_unix_dialog_parent_class)->style_set (widget, previous_style);
GTK_WIDGET_CLASS (gtk_print_unix_dialog_parent_class)->style_set (widget, previous_style);
if (gtk_widget_has_screen (widget))
{

View File

@ -1294,8 +1294,7 @@ gtk_range_unrealize (GtkWidget *widget)
gdk_window_destroy (range->event_window);
range->event_window = NULL;
if (GTK_WIDGET_CLASS (gtk_range_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_range_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_range_parent_class)->unrealize (widget);
}
static void

View File

@ -925,9 +925,8 @@ static void
gtk_recent_chooser_default_map (GtkWidget *widget)
{
GtkRecentChooserDefault *impl = GTK_RECENT_CHOOSER_DEFAULT (widget);
if (GTK_WIDGET_CLASS (_gtk_recent_chooser_default_parent_class)->map)
GTK_WIDGET_CLASS (_gtk_recent_chooser_default_parent_class)->map (widget);
GTK_WIDGET_CLASS (_gtk_recent_chooser_default_parent_class)->map (widget);
/* reloads everything */
reload_recent_items (impl);

View File

@ -407,8 +407,7 @@ gtk_ruler_unrealize (GtkWidget *widget)
ruler->non_gr_exp_gc = NULL;
}
if (GTK_WIDGET_CLASS (gtk_ruler_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_ruler_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_ruler_parent_class)->unrealize (widget);
}
static void

View File

@ -407,8 +407,7 @@ gtk_socket_unrealize (GtkWidget *widget)
_gtk_socket_end_embedding (socket);
}
if (GTK_WIDGET_CLASS (gtk_socket_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_socket_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_socket_parent_class)->unrealize (widget);
}
static void

View File

@ -1374,8 +1374,7 @@ gtk_text_unrealize (GtkWidget *widget)
free_cache (text);
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
}
static void

View File

@ -4095,9 +4095,10 @@ gtk_text_view_key_press_event (GtkWidget *widget, GdkEventKey *event)
retval = TRUE;
}
/* Binding set */
else if (GTK_WIDGET_CLASS (gtk_text_view_parent_class)->key_press_event &&
GTK_WIDGET_CLASS (gtk_text_view_parent_class)->key_press_event (widget, event))
retval = TRUE;
else if (GTK_WIDGET_CLASS (gtk_text_view_parent_class)->key_press_event (widget, event))
{
retval = TRUE;
}
/* use overall editability not can_insert, more predictable for users */
else if (text_view->editable &&
(event->keyval == GDK_Return ||

View File

@ -861,9 +861,8 @@ gtk_toolbar_unrealize (GtkWidget *widget)
gdk_window_destroy (priv->event_window);
priv->event_window = NULL;
}
if (GTK_WIDGET_CLASS (gtk_toolbar_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_toolbar_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_toolbar_parent_class)->unrealize (widget);
}
static gint

View File

@ -442,8 +442,7 @@ gtk_tree_item_remove_pixmaps (GtkTreeItem *tree_item)
static void
gtk_tree_item_realize (GtkWidget *widget)
{
if (GTK_WIDGET_CLASS (parent_class)->realize)
GTK_WIDGET_CLASS (parent_class)->realize (widget);
GTK_WIDGET_CLASS (parent_class)->realize (widget);
gdk_window_set_background (widget->window,
&widget->style->base[GTK_STATE_NORMAL]);

View File

@ -1938,9 +1938,7 @@ gtk_tree_view_unrealize (GtkWidget *widget)
priv->grid_line_gc = NULL;
}
/* GtkWidget::unrealize destroys children and widget->window */
if (GTK_WIDGET_CLASS (gtk_tree_view_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_tree_view_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_tree_view_parent_class)->unrealize (widget);
}
/* GtkWidget::size_request helper */

View File

@ -637,8 +637,7 @@ gtk_viewport_unrealize (GtkWidget *widget)
gdk_window_destroy (viewport->bin_window);
viewport->bin_window = NULL;
if (GTK_WIDGET_CLASS (gtk_viewport_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_viewport_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_viewport_parent_class)->unrealize (widget);
}
static void

View File

@ -139,8 +139,7 @@ gtk_win32_embed_widget_unrealize (GtkWidget *widget)
embed_widget->parent_window = NULL;
}
if (GTK_WIDGET_CLASS (gtk_win32_embed_widget_parent_class)->unrealize)
GTK_WIDGET_CLASS (gtk_win32_embed_widget_parent_class)->unrealize (widget);
GTK_WIDGET_CLASS (gtk_win32_embed_widget_parent_class)->unrealize (widget);
}
static LRESULT CALLBACK