forked from AuroraMiddleware/gtk
gtk/gtkcellview.c gtk/gtklabel.c gtk/gtklayout.c gtk/gtklist.c
2008-02-07 Michael Natterer <mitch@imendio.com> * gtk/gtkcellview.c * gtk/gtklabel.c * gtk/gtklayout.c * gtk/gtklist.c * gtk/gtkmenu.c * gtk/gtkmenushell.c * gtk/gtkmisc.c * gtk/gtkoptionmenu.c * gtk/gtkplug.c * gtk/gtkpreview.c * gtk/gtkprogress.c * gtk/gtkradiomenuitem.c * gtk/gtkscale.c * gtk/gtkscrolledwindow.c * gtk/gtksocket.c: remove g_return_if_fail() from private functions and virtual function implementations. svn path=/trunk/; revision=19492
This commit is contained in:
parent
d95069aa1f
commit
ac6c371997
19
ChangeLog
19
ChangeLog
@ -1,3 +1,22 @@
|
||||
2008-02-07 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gtk/gtkcellview.c
|
||||
* gtk/gtklabel.c
|
||||
* gtk/gtklayout.c
|
||||
* gtk/gtklist.c
|
||||
* gtk/gtkmenu.c
|
||||
* gtk/gtkmenushell.c
|
||||
* gtk/gtkmisc.c
|
||||
* gtk/gtkoptionmenu.c
|
||||
* gtk/gtkplug.c
|
||||
* gtk/gtkpreview.c
|
||||
* gtk/gtkprogress.c
|
||||
* gtk/gtkradiomenuitem.c
|
||||
* gtk/gtkscale.c
|
||||
* gtk/gtkscrolledwindow.c
|
||||
* gtk/gtksocket.c: remove g_return_if_fail() from private
|
||||
functions and virtual function implementations.
|
||||
|
||||
2008-02-07 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gtk/gtkaction.c
|
||||
|
@ -586,8 +586,6 @@ gtk_cell_view_cell_layout_pack_start (GtkCellLayout *layout,
|
||||
GtkCellViewCellInfo *info;
|
||||
GtkCellView *cellview = GTK_CELL_VIEW (layout);
|
||||
|
||||
g_return_if_fail (GTK_IS_CELL_VIEW (cellview));
|
||||
g_return_if_fail (GTK_IS_CELL_RENDERER (renderer));
|
||||
g_return_if_fail (!gtk_cell_view_get_cell_info (cellview, renderer));
|
||||
|
||||
g_object_ref_sink (renderer);
|
||||
@ -608,8 +606,6 @@ gtk_cell_view_cell_layout_pack_end (GtkCellLayout *layout,
|
||||
GtkCellViewCellInfo *info;
|
||||
GtkCellView *cellview = GTK_CELL_VIEW (layout);
|
||||
|
||||
g_return_if_fail (GTK_IS_CELL_VIEW (cellview));
|
||||
g_return_if_fail (GTK_IS_CELL_RENDERER (renderer));
|
||||
g_return_if_fail (!gtk_cell_view_get_cell_info (cellview, renderer));
|
||||
|
||||
g_object_ref_sink (renderer);
|
||||
@ -631,7 +627,6 @@ gtk_cell_view_cell_layout_add_attribute (GtkCellLayout *layout,
|
||||
GtkCellViewCellInfo *info;
|
||||
GtkCellView *cellview = GTK_CELL_VIEW (layout);
|
||||
|
||||
g_return_if_fail (GTK_IS_CELL_VIEW (cellview));
|
||||
info = gtk_cell_view_get_cell_info (cellview, renderer);
|
||||
g_return_if_fail (info != NULL);
|
||||
|
||||
@ -646,8 +641,6 @@ gtk_cell_view_cell_layout_clear (GtkCellLayout *layout)
|
||||
{
|
||||
GtkCellView *cellview = GTK_CELL_VIEW (layout);
|
||||
|
||||
g_return_if_fail (GTK_IS_CELL_VIEW (cellview));
|
||||
|
||||
while (cellview->priv->cell_list)
|
||||
{
|
||||
GtkCellViewCellInfo *info = (GtkCellViewCellInfo *)cellview->priv->cell_list->data;
|
||||
@ -670,8 +663,6 @@ gtk_cell_view_cell_layout_set_cell_data_func (GtkCellLayout *layout,
|
||||
GtkCellView *cellview = GTK_CELL_VIEW (layout);
|
||||
GtkCellViewCellInfo *info;
|
||||
|
||||
g_return_if_fail (GTK_IS_CELL_VIEW (cellview));
|
||||
|
||||
info = gtk_cell_view_get_cell_info (cellview, cell);
|
||||
g_return_if_fail (info != NULL);
|
||||
|
||||
@ -692,13 +683,10 @@ static void
|
||||
gtk_cell_view_cell_layout_clear_attributes (GtkCellLayout *layout,
|
||||
GtkCellRenderer *renderer)
|
||||
{
|
||||
GtkCellViewCellInfo *info;
|
||||
GtkCellView *cellview = GTK_CELL_VIEW (layout);
|
||||
GtkCellViewCellInfo *info;
|
||||
GSList *list;
|
||||
|
||||
g_return_if_fail (GTK_IS_CELL_VIEW (cellview));
|
||||
g_return_if_fail (GTK_IS_CELL_RENDERER (renderer));
|
||||
|
||||
info = gtk_cell_view_get_cell_info (cellview, renderer);
|
||||
if (info != NULL)
|
||||
{
|
||||
@ -719,12 +707,9 @@ gtk_cell_view_cell_layout_reorder (GtkCellLayout *layout,
|
||||
GtkCellRenderer *cell,
|
||||
gint position)
|
||||
{
|
||||
GList *link;
|
||||
GtkCellViewCellInfo *info;
|
||||
GtkCellView *cellview = GTK_CELL_VIEW (layout);
|
||||
|
||||
g_return_if_fail (GTK_IS_CELL_VIEW (cellview));
|
||||
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
||||
GtkCellViewCellInfo *info;
|
||||
GList *link;
|
||||
|
||||
info = gtk_cell_view_get_cell_info (cellview, cell);
|
||||
|
||||
@ -878,9 +863,6 @@ gtk_cell_view_set_value (GtkCellView *cell_view,
|
||||
gchar *property,
|
||||
GValue *value)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_CELL_VIEW (cell_view));
|
||||
g_return_if_fail (GTK_IS_CELL_RENDERER (renderer));
|
||||
|
||||
g_object_set_property (G_OBJECT (renderer), property, value);
|
||||
|
||||
/* force resize and redraw */
|
||||
|
@ -1883,12 +1883,8 @@ gtk_label_destroy (GtkObject *object)
|
||||
static void
|
||||
gtk_label_finalize (GObject *object)
|
||||
{
|
||||
GtkLabel *label;
|
||||
|
||||
g_return_if_fail (GTK_IS_LABEL (object));
|
||||
|
||||
label = GTK_LABEL (object);
|
||||
|
||||
GtkLabel *label = GTK_LABEL (object);
|
||||
|
||||
g_free (label->label);
|
||||
g_free (label->text);
|
||||
|
||||
@ -2136,16 +2132,12 @@ static void
|
||||
gtk_label_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
{
|
||||
GtkLabel *label;
|
||||
GtkLabel *label = GTK_LABEL (widget);
|
||||
GtkLabelPrivate *priv;
|
||||
gint width, height;
|
||||
PangoRectangle logical_rect;
|
||||
GtkWidgetAuxInfo *aux_info;
|
||||
|
||||
g_return_if_fail (GTK_IS_LABEL (widget));
|
||||
g_return_if_fail (requisition != NULL);
|
||||
|
||||
label = GTK_LABEL (widget);
|
||||
|
||||
priv = GTK_LABEL_GET_PRIVATE (widget);
|
||||
|
||||
/*
|
||||
@ -2295,11 +2287,7 @@ static void
|
||||
gtk_label_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style)
|
||||
{
|
||||
GtkLabel *label;
|
||||
|
||||
g_return_if_fail (GTK_IS_LABEL (widget));
|
||||
|
||||
label = GTK_LABEL (widget);
|
||||
GtkLabel *label = GTK_LABEL (widget);
|
||||
|
||||
/* We have to clear the layout, fonts etc. may have changed */
|
||||
gtk_label_clear_layout (label);
|
||||
|
@ -370,11 +370,7 @@ gtk_layout_move_internal (GtkLayout *layout,
|
||||
gint y)
|
||||
{
|
||||
GtkLayoutChild *child;
|
||||
|
||||
g_return_if_fail (GTK_IS_LAYOUT (layout));
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
g_return_if_fail (widget->parent == GTK_WIDGET (layout));
|
||||
|
||||
|
||||
child = get_child (layout, widget);
|
||||
|
||||
g_assert (child);
|
||||
@ -818,14 +814,11 @@ gtk_layout_constructor (GType type,
|
||||
static void
|
||||
gtk_layout_realize (GtkWidget *widget)
|
||||
{
|
||||
GtkLayout *layout = GTK_LAYOUT (widget);
|
||||
GList *tmp_list;
|
||||
GtkLayout *layout;
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
|
||||
g_return_if_fail (GTK_IS_LAYOUT (widget));
|
||||
|
||||
layout = GTK_LAYOUT (widget);
|
||||
GTK_WIDGET_SET_FLAGS (layout, GTK_REALIZED);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
@ -881,15 +874,11 @@ gtk_layout_style_set (GtkWidget *widget, GtkStyle *old_style)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
gtk_layout_map (GtkWidget *widget)
|
||||
{
|
||||
GtkLayout *layout = GTK_LAYOUT (widget);
|
||||
GList *tmp_list;
|
||||
GtkLayout *layout;
|
||||
|
||||
g_return_if_fail (GTK_IS_LAYOUT (widget));
|
||||
|
||||
layout = GTK_LAYOUT (widget);
|
||||
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
|
||||
|
||||
@ -913,11 +902,7 @@ gtk_layout_map (GtkWidget *widget)
|
||||
static void
|
||||
gtk_layout_unrealize (GtkWidget *widget)
|
||||
{
|
||||
GtkLayout *layout;
|
||||
|
||||
g_return_if_fail (GTK_IS_LAYOUT (widget));
|
||||
|
||||
layout = GTK_LAYOUT (widget);
|
||||
GtkLayout *layout = GTK_LAYOUT (widget);
|
||||
|
||||
gdk_window_set_user_data (layout->bin_window, NULL);
|
||||
gdk_window_destroy (layout->bin_window);
|
||||
@ -931,12 +916,8 @@ static void
|
||||
gtk_layout_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
{
|
||||
GtkLayout *layout = GTK_LAYOUT (widget);
|
||||
GList *tmp_list;
|
||||
GtkLayout *layout;
|
||||
|
||||
g_return_if_fail (GTK_IS_LAYOUT (widget));
|
||||
|
||||
layout = GTK_LAYOUT (widget);
|
||||
|
||||
requisition->width = 0;
|
||||
requisition->height = 0;
|
||||
@ -958,14 +939,10 @@ static void
|
||||
gtk_layout_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkLayout *layout = GTK_LAYOUT (widget);
|
||||
GList *tmp_list;
|
||||
GtkLayout *layout;
|
||||
|
||||
g_return_if_fail (GTK_IS_LAYOUT (widget));
|
||||
|
||||
widget->allocation = *allocation;
|
||||
|
||||
layout = GTK_LAYOUT (widget);
|
||||
|
||||
tmp_list = layout->children;
|
||||
|
||||
@ -1002,13 +979,10 @@ gtk_layout_size_allocate (GtkWidget *widget,
|
||||
}
|
||||
|
||||
static gint
|
||||
gtk_layout_expose (GtkWidget *widget, GdkEventExpose *event)
|
||||
gtk_layout_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
GtkLayout *layout;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_LAYOUT (widget), FALSE);
|
||||
|
||||
layout = GTK_LAYOUT (widget);
|
||||
GtkLayout *layout = GTK_LAYOUT (widget);
|
||||
|
||||
if (event->window != layout->bin_window)
|
||||
return FALSE;
|
||||
@ -1031,13 +1005,9 @@ static void
|
||||
gtk_layout_remove (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkLayout *layout = GTK_LAYOUT (container);
|
||||
GList *tmp_list;
|
||||
GtkLayout *layout;
|
||||
GtkLayoutChild *child = NULL;
|
||||
|
||||
g_return_if_fail (GTK_IS_LAYOUT (container));
|
||||
|
||||
layout = GTK_LAYOUT (container);
|
||||
|
||||
tmp_list = layout->children;
|
||||
while (tmp_list)
|
||||
@ -1064,15 +1034,10 @@ gtk_layout_forall (GtkContainer *container,
|
||||
GtkCallback callback,
|
||||
gpointer callback_data)
|
||||
{
|
||||
GtkLayout *layout;
|
||||
GtkLayout *layout = GTK_LAYOUT (container);
|
||||
GtkLayoutChild *child;
|
||||
GList *tmp_list;
|
||||
|
||||
g_return_if_fail (GTK_IS_LAYOUT (container));
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
||||
layout = GTK_LAYOUT (container);
|
||||
|
||||
tmp_list = layout->children;
|
||||
while (tmp_list)
|
||||
{
|
||||
|
@ -367,14 +367,10 @@ static void
|
||||
gtk_list_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
{
|
||||
GtkList *list;
|
||||
GtkList *list = GTK_LIST (widget);
|
||||
GtkWidget *child;
|
||||
GList *children;
|
||||
|
||||
g_return_if_fail (GTK_IS_LIST (widget));
|
||||
g_return_if_fail (requisition != NULL);
|
||||
|
||||
list = GTK_LIST (widget);
|
||||
requisition->width = 0;
|
||||
requisition->height = 0;
|
||||
|
||||
@ -407,16 +403,11 @@ static void
|
||||
gtk_list_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkList *list;
|
||||
GtkList *list = GTK_LIST (widget);
|
||||
GtkWidget *child;
|
||||
GtkAllocation child_allocation;
|
||||
GList *children;
|
||||
|
||||
g_return_if_fail (GTK_IS_LIST (widget));
|
||||
g_return_if_fail (allocation != NULL);
|
||||
|
||||
list = GTK_LIST (widget);
|
||||
|
||||
widget->allocation = *allocation;
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
gdk_window_move_resize (widget->window,
|
||||
@ -458,8 +449,6 @@ gtk_list_realize (GtkWidget *widget)
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
|
||||
g_return_if_fail (GTK_IS_LIST (widget));
|
||||
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
@ -494,15 +483,11 @@ list_has_grab (GtkList *list)
|
||||
static void
|
||||
gtk_list_unmap (GtkWidget *widget)
|
||||
{
|
||||
GtkList *list;
|
||||
|
||||
g_return_if_fail (GTK_IS_LIST (widget));
|
||||
GtkList *list = GTK_LIST (widget);
|
||||
|
||||
if (!GTK_WIDGET_MAPPED (widget))
|
||||
return;
|
||||
|
||||
list = GTK_LIST (widget);
|
||||
|
||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
|
||||
|
||||
if (list_has_grab (list))
|
||||
@ -520,7 +505,7 @@ static gint
|
||||
gtk_list_motion_notify (GtkWidget *widget,
|
||||
GdkEventMotion *event)
|
||||
{
|
||||
GtkList *list;
|
||||
GtkList *list = GTK_LIST (widget);
|
||||
GtkWidget *item = NULL;
|
||||
GtkAdjustment *adj;
|
||||
GtkContainer *container;
|
||||
@ -531,11 +516,6 @@ gtk_list_motion_notify (GtkWidget *widget,
|
||||
gint focus_row = 0;
|
||||
gint length = 0;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_LIST (widget), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
list = GTK_LIST (widget);
|
||||
|
||||
if (!list->drag_selection || !list->children)
|
||||
return FALSE;
|
||||
|
||||
@ -631,16 +611,12 @@ static gint
|
||||
gtk_list_button_press (GtkWidget *widget,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
GtkList *list;
|
||||
GtkList *list = GTK_LIST (widget);
|
||||
GtkWidget *item;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_LIST (widget), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
if (event->button != 1)
|
||||
return FALSE;
|
||||
|
||||
list = GTK_LIST (widget);
|
||||
item = gtk_get_event_widget ((GdkEvent*) event);
|
||||
|
||||
while (item && !GTK_IS_LIST_ITEM (item))
|
||||
@ -760,14 +736,9 @@ static gint
|
||||
gtk_list_button_release (GtkWidget *widget,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
GtkList *list;
|
||||
GtkList *list = GTK_LIST (widget);
|
||||
GtkWidget *item;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_LIST (widget), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
list = GTK_LIST (widget);
|
||||
|
||||
/* we don't handle button 2 and 3 */
|
||||
if (event->button != 1)
|
||||
return FALSE;
|
||||
@ -812,8 +783,6 @@ static void
|
||||
gtk_list_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style)
|
||||
{
|
||||
g_return_if_fail (widget != NULL);
|
||||
|
||||
if (previous_style && GTK_WIDGET_REALIZED (widget))
|
||||
gdk_window_set_background (widget->window, &widget->style->base[GTK_WIDGET_STATE (widget)]);
|
||||
}
|
||||
@ -832,7 +801,6 @@ gtk_list_add (GtkContainer *container,
|
||||
{
|
||||
GList *item_list;
|
||||
|
||||
g_return_if_fail (GTK_IS_LIST (container));
|
||||
g_return_if_fail (GTK_IS_LIST_ITEM (widget));
|
||||
|
||||
item_list = g_list_alloc ();
|
||||
@ -846,9 +814,7 @@ gtk_list_remove (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GList *item_list;
|
||||
|
||||
g_return_if_fail (GTK_IS_LIST (container));
|
||||
g_return_if_fail (widget != NULL);
|
||||
|
||||
g_return_if_fail (container == GTK_CONTAINER (widget->parent));
|
||||
|
||||
item_list = g_list_alloc ();
|
||||
@ -865,14 +831,10 @@ gtk_list_forall (GtkContainer *container,
|
||||
GtkCallback callback,
|
||||
gpointer callback_data)
|
||||
{
|
||||
GtkList *list;
|
||||
GtkList *list = GTK_LIST (container);
|
||||
GtkWidget *child;
|
||||
GList *children;
|
||||
|
||||
g_return_if_fail (GTK_IS_LIST (container));
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
||||
list = GTK_LIST (container);
|
||||
children = list->children;
|
||||
|
||||
while (children)
|
||||
|
@ -902,14 +902,10 @@ gtk_menu_init (GtkMenu *menu)
|
||||
static void
|
||||
gtk_menu_destroy (GtkObject *object)
|
||||
{
|
||||
GtkMenu *menu;
|
||||
GtkMenu *menu = GTK_MENU (object);
|
||||
GtkMenuAttachData *data;
|
||||
GtkMenuPrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_MENU (object));
|
||||
|
||||
menu = GTK_MENU (object);
|
||||
|
||||
gtk_menu_remove_scroll_timeout (menu);
|
||||
|
||||
data = g_object_get_data (G_OBJECT (object), attach_data_key);
|
||||
@ -1114,13 +1110,10 @@ static void
|
||||
gtk_menu_remove (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkMenu *menu;
|
||||
GtkMenu *menu = GTK_MENU (container);
|
||||
|
||||
g_return_if_fail (GTK_IS_MENU (container));
|
||||
g_return_if_fail (GTK_IS_MENU_ITEM (widget));
|
||||
|
||||
menu = GTK_MENU (container);
|
||||
|
||||
/* Clear out old_active_menu_item if it matches the item we are removing
|
||||
*/
|
||||
if (menu->old_active_menu_item == widget)
|
||||
@ -2169,11 +2162,7 @@ menu_grab_transfer_window_destroy (GtkMenu *menu)
|
||||
static void
|
||||
gtk_menu_unrealize (GtkWidget *widget)
|
||||
{
|
||||
GtkMenu *menu;
|
||||
|
||||
g_return_if_fail (GTK_IS_MENU (widget));
|
||||
|
||||
menu = GTK_MENU (widget);
|
||||
GtkMenu *menu = GTK_MENU (widget);
|
||||
|
||||
menu_grab_transfer_window_destroy (menu);
|
||||
|
||||
|
@ -310,8 +310,6 @@ gtk_misc_realize (GtkWidget *widget)
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
|
||||
g_return_if_fail (GTK_IS_MISC (widget));
|
||||
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
||||
|
||||
if (GTK_WIDGET_NO_WINDOW (widget))
|
||||
|
@ -372,11 +372,7 @@ gtk_option_menu_get_property (GObject *object,
|
||||
static void
|
||||
gtk_option_menu_destroy (GtkObject *object)
|
||||
{
|
||||
GtkOptionMenu *option_menu;
|
||||
|
||||
g_return_if_fail (GTK_IS_OPTION_MENU (object));
|
||||
|
||||
option_menu = GTK_OPTION_MENU (object);
|
||||
GtkOptionMenu *option_menu = GTK_OPTION_MENU (object);
|
||||
|
||||
if (option_menu->menu)
|
||||
gtk_widget_destroy (option_menu->menu);
|
||||
|
@ -492,11 +492,7 @@ gtk_plug_finalize (GObject *object)
|
||||
static void
|
||||
gtk_plug_unrealize (GtkWidget *widget)
|
||||
{
|
||||
GtkPlug *plug;
|
||||
|
||||
g_return_if_fail (GTK_IS_PLUG (widget));
|
||||
|
||||
plug = GTK_PLUG (widget);
|
||||
GtkPlug *plug = GTK_PLUG (widget);
|
||||
|
||||
if (plug->socket_window != NULL)
|
||||
{
|
||||
@ -523,16 +519,12 @@ gtk_plug_unrealize (GtkWidget *widget)
|
||||
static void
|
||||
gtk_plug_realize (GtkWidget *widget)
|
||||
{
|
||||
GtkWindow *window;
|
||||
GtkPlug *plug;
|
||||
GtkWindow *window = GTK_WINDOW (widget);
|
||||
GtkPlug *plug = GTK_PLUG (widget);
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
|
||||
g_return_if_fail (GTK_IS_PLUG (widget));
|
||||
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
||||
window = GTK_WINDOW (widget);
|
||||
plug = GTK_PLUG (widget);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD; /* XXX GDK_WINDOW_PLUG ? */
|
||||
attributes.title = window->title;
|
||||
|
@ -410,11 +410,8 @@ gtk_preview_get_info (void)
|
||||
static void
|
||||
gtk_preview_finalize (GObject *object)
|
||||
{
|
||||
GtkPreview *preview;
|
||||
GtkPreview *preview = GTK_PREVIEW (object);
|
||||
|
||||
g_return_if_fail (GTK_IS_PREVIEW (object));
|
||||
|
||||
preview = GTK_PREVIEW (object);
|
||||
g_free (preview->buffer);
|
||||
|
||||
G_OBJECT_CLASS (gtk_preview_parent_class)->finalize (object);
|
||||
@ -423,14 +420,11 @@ gtk_preview_finalize (GObject *object)
|
||||
static void
|
||||
gtk_preview_realize (GtkWidget *widget)
|
||||
{
|
||||
GtkPreview *preview;
|
||||
GtkPreview *preview = GTK_PREVIEW (widget);
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
|
||||
g_return_if_fail (GTK_IS_PREVIEW (widget));
|
||||
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
||||
preview = GTK_PREVIEW (widget);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
|
||||
@ -463,12 +457,9 @@ static void
|
||||
gtk_preview_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkPreview *preview;
|
||||
GtkPreview *preview = GTK_PREVIEW (widget);
|
||||
gint width, height;
|
||||
|
||||
g_return_if_fail (GTK_IS_PREVIEW (widget));
|
||||
|
||||
preview = GTK_PREVIEW (widget);
|
||||
widget->allocation = *allocation;
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
@ -498,9 +489,6 @@ gtk_preview_expose (GtkWidget *widget,
|
||||
GtkPreview *preview;
|
||||
gint width, height;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_PREVIEW (widget), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
{
|
||||
preview = GTK_PREVIEW (widget);
|
||||
|
@ -205,13 +205,10 @@ gtk_progress_init (GtkProgress *progress)
|
||||
static void
|
||||
gtk_progress_realize (GtkWidget *widget)
|
||||
{
|
||||
GtkProgress *progress;
|
||||
GtkProgress *progress = GTK_PROGRESS (widget);
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
|
||||
g_return_if_fail (GTK_IS_PROGRESS (widget));
|
||||
|
||||
progress = GTK_PROGRESS (widget);
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
@ -240,11 +237,7 @@ gtk_progress_realize (GtkWidget *widget)
|
||||
static void
|
||||
gtk_progress_destroy (GtkObject *object)
|
||||
{
|
||||
GtkProgress *progress;
|
||||
|
||||
g_return_if_fail (GTK_IS_PROGRESS (object));
|
||||
|
||||
progress = GTK_PROGRESS (object);
|
||||
GtkProgress *progress = GTK_PROGRESS (object);
|
||||
|
||||
if (progress->adjustment)
|
||||
{
|
||||
@ -264,11 +257,7 @@ gtk_progress_destroy (GtkObject *object)
|
||||
static void
|
||||
gtk_progress_finalize (GObject *object)
|
||||
{
|
||||
GtkProgress *progress;
|
||||
|
||||
g_return_if_fail (GTK_IS_PROGRESS (object));
|
||||
|
||||
progress = GTK_PROGRESS (object);
|
||||
GtkProgress *progress = GTK_PROGRESS (object);
|
||||
|
||||
if (progress->offscreen_pixmap)
|
||||
g_object_unref (progress->offscreen_pixmap);
|
||||
@ -282,9 +271,6 @@ static gboolean
|
||||
gtk_progress_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_PROGRESS (widget), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
gdk_draw_drawable (widget->window,
|
||||
widget->style->black_gc,
|
||||
@ -301,9 +287,6 @@ static void
|
||||
gtk_progress_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_PROGRESS (widget));
|
||||
g_return_if_fail (allocation != NULL);
|
||||
|
||||
widget->allocation = *allocation;
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
|
@ -380,16 +380,12 @@ gtk_radio_menu_item_init (GtkRadioMenuItem *radio_menu_item)
|
||||
static void
|
||||
gtk_radio_menu_item_destroy (GtkObject *object)
|
||||
{
|
||||
GtkRadioMenuItem *radio_menu_item = GTK_RADIO_MENU_ITEM (object);
|
||||
GtkWidget *old_group_singleton = NULL;
|
||||
GtkRadioMenuItem *radio_menu_item;
|
||||
GtkRadioMenuItem *tmp_menu_item;
|
||||
GSList *tmp_list;
|
||||
gboolean was_in_group;
|
||||
|
||||
g_return_if_fail (GTK_IS_RADIO_MENU_ITEM (object));
|
||||
|
||||
radio_menu_item = GTK_RADIO_MENU_ITEM (object);
|
||||
|
||||
was_in_group = radio_menu_item->group && radio_menu_item->group->next;
|
||||
|
||||
radio_menu_item->group = g_slist_remove (radio_menu_item->group,
|
||||
@ -422,16 +418,12 @@ gtk_radio_menu_item_destroy (GtkObject *object)
|
||||
static void
|
||||
gtk_radio_menu_item_activate (GtkMenuItem *menu_item)
|
||||
{
|
||||
GtkRadioMenuItem *radio_menu_item;
|
||||
GtkCheckMenuItem *check_menu_item;
|
||||
GtkRadioMenuItem *radio_menu_item = GTK_RADIO_MENU_ITEM (menu_item);
|
||||
GtkCheckMenuItem *check_menu_item = GTK_CHECK_MENU_ITEM (menu_item);
|
||||
GtkCheckMenuItem *tmp_menu_item;
|
||||
GSList *tmp_list;
|
||||
gint toggled;
|
||||
|
||||
g_return_if_fail (GTK_IS_RADIO_MENU_ITEM (menu_item));
|
||||
|
||||
radio_menu_item = GTK_RADIO_MENU_ITEM (menu_item);
|
||||
check_menu_item = GTK_CHECK_MENU_ITEM (menu_item);
|
||||
toggled = FALSE;
|
||||
|
||||
if (check_menu_item->active)
|
||||
|
@ -622,11 +622,7 @@ _gtk_scale_format_value (GtkScale *scale,
|
||||
static void
|
||||
gtk_scale_finalize (GObject *object)
|
||||
{
|
||||
GtkScale *scale;
|
||||
|
||||
g_return_if_fail (GTK_IS_SCALE (object));
|
||||
|
||||
scale = GTK_SCALE (object);
|
||||
GtkScale *scale = GTK_SCALE (object);
|
||||
|
||||
_gtk_scale_clear_layout (scale);
|
||||
|
||||
@ -707,7 +703,8 @@ gtk_scale_get_layout_offsets (GtkScale *scale,
|
||||
*y = local_y;
|
||||
}
|
||||
|
||||
void _gtk_scale_clear_layout (GtkScale *scale)
|
||||
void
|
||||
_gtk_scale_clear_layout (GtkScale *scale)
|
||||
{
|
||||
GtkScalePrivate *priv = GTK_SCALE_GET_PRIVATE (scale);
|
||||
|
||||
|
@ -785,11 +785,7 @@ gtk_scrolled_window_get_shadow_type (GtkScrolledWindow *scrolled_window)
|
||||
static void
|
||||
gtk_scrolled_window_destroy (GtkObject *object)
|
||||
{
|
||||
GtkScrolledWindow *scrolled_window;
|
||||
|
||||
g_return_if_fail (GTK_IS_SCROLLED_WINDOW (object));
|
||||
|
||||
scrolled_window = GTK_SCROLLED_WINDOW (object);
|
||||
GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (object);
|
||||
|
||||
gtk_widget_unparent (scrolled_window->hscrollbar);
|
||||
gtk_widget_unparent (scrolled_window->vscrollbar);
|
||||
|
@ -303,13 +303,10 @@ gtk_socket_get_id (GtkSocket *socket)
|
||||
static void
|
||||
gtk_socket_realize (GtkWidget *widget)
|
||||
{
|
||||
GtkSocket *socket;
|
||||
GtkSocket *socket = GTK_SOCKET (widget);
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
|
||||
g_return_if_fail (GTK_IS_SOCKET (widget));
|
||||
|
||||
socket = GTK_SOCKET (widget);
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
@ -429,12 +426,7 @@ static void
|
||||
gtk_socket_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkSocket *socket;
|
||||
|
||||
g_return_if_fail (GTK_IS_SOCKET (widget));
|
||||
g_return_if_fail (allocation != NULL);
|
||||
|
||||
socket = GTK_SOCKET (widget);
|
||||
GtkSocket *socket = GTK_SOCKET (widget);
|
||||
|
||||
widget->allocation = *allocation;
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
@ -749,11 +741,7 @@ static gboolean
|
||||
gtk_socket_focus (GtkWidget *widget,
|
||||
GtkDirectionType direction)
|
||||
{
|
||||
GtkSocket *socket;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_SOCKET (widget), FALSE);
|
||||
|
||||
socket = GTK_SOCKET (widget);
|
||||
GtkSocket *socket = GTK_SOCKET (widget);
|
||||
|
||||
if (socket->plug_widget)
|
||||
return gtk_widget_child_focus (socket->plug_widget, direction);
|
||||
|
@ -483,13 +483,9 @@ gtk_statusbar_get_has_resize_grip (GtkStatusbar *statusbar)
|
||||
static void
|
||||
gtk_statusbar_destroy (GtkObject *object)
|
||||
{
|
||||
GtkStatusbar *statusbar;
|
||||
GtkStatusbar *statusbar = GTK_STATUSBAR (object);
|
||||
GSList *list;
|
||||
|
||||
g_return_if_fail (GTK_IS_STATUSBAR (object));
|
||||
|
||||
statusbar = GTK_STATUSBAR (object);
|
||||
|
||||
for (list = statusbar->messages; list; list = list->next)
|
||||
{
|
||||
GtkStatusbarMsg *msg;
|
||||
|
Loading…
Reference in New Issue
Block a user