forked from AuroraMiddleware/gtk
gtk/gtkaction.c gtk/gtkassistant.c gtk/gtkbin.c gtk/gtkbox.c
2008-02-07 Michael Natterer <mitch@imendio.com> * gtk/gtkaction.c * gtk/gtkassistant.c * gtk/gtkbin.c * gtk/gtkbox.c * gtk/gtkcalendar.c * gtk/gtkcellrenderercombo.c * gtk/gtkcombobox.c * gtk/gtkcombo.c * gtk/gtkdrawingarea.c * gtk/gtkentrycompletion.c * gtk/gtkfixed.h * gtk/gtkgamma.c * gtk/gtkhpaned.c * gtk/gtkiconview.c * gtk/gtkitem.c * gtk/gtkitemfactory.c: remove g_return_if_fail() from private functions and virtual function implementations. svn path=/trunk/; revision=19491
This commit is contained in:
parent
7f8fdbba9f
commit
d95069aa1f
20
ChangeLog
20
ChangeLog
@ -1,3 +1,23 @@
|
||||
2008-02-07 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gtk/gtkaction.c
|
||||
* gtk/gtkassistant.c
|
||||
* gtk/gtkbin.c
|
||||
* gtk/gtkbox.c
|
||||
* gtk/gtkcalendar.c
|
||||
* gtk/gtkcellrenderercombo.c
|
||||
* gtk/gtkcombobox.c
|
||||
* gtk/gtkcombo.c
|
||||
* gtk/gtkdrawingarea.c
|
||||
* gtk/gtkentrycompletion.c
|
||||
* gtk/gtkfixed.h
|
||||
* gtk/gtkgamma.c
|
||||
* gtk/gtkhpaned.c
|
||||
* gtk/gtkiconview.c
|
||||
* gtk/gtkitem.c
|
||||
* gtk/gtkitemfactory.c: remove g_return_if_fail() from private
|
||||
functions and virtual function implementations.
|
||||
|
||||
2008-02-07 Christian Persch <chpe@gnome.org>
|
||||
|
||||
* gdk/gdkpixbuf-render.c:
|
||||
|
@ -1639,8 +1639,6 @@ static void
|
||||
gtk_action_set_action_group (GtkAction *action,
|
||||
GtkActionGroup *action_group)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_ACTION (action));
|
||||
|
||||
if (action->private_data->action_group == NULL)
|
||||
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
|
||||
else
|
||||
|
@ -1380,8 +1380,6 @@ static void
|
||||
gtk_assistant_add (GtkContainer *container,
|
||||
GtkWidget *page)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (page));
|
||||
|
||||
gtk_assistant_append_page (GTK_ASSISTANT (container), page);
|
||||
}
|
||||
|
||||
@ -1389,11 +1387,9 @@ static void
|
||||
gtk_assistant_remove (GtkContainer *container,
|
||||
GtkWidget *page)
|
||||
{
|
||||
GtkAssistant *assistant;
|
||||
GtkAssistant *assistant = (GtkAssistant*) container;
|
||||
GList *element;
|
||||
|
||||
assistant = (GtkAssistant*) container;
|
||||
|
||||
element = find_page (assistant, page);
|
||||
|
||||
if (element)
|
||||
|
@ -79,8 +79,6 @@ gtk_bin_add (GtkContainer *container,
|
||||
{
|
||||
GtkBin *bin = GTK_BIN (container);
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (child));
|
||||
|
||||
if (bin->child != NULL)
|
||||
{
|
||||
g_warning ("Attempting to add a widget with type %s to a %s, "
|
||||
@ -104,7 +102,6 @@ gtk_bin_remove (GtkContainer *container,
|
||||
GtkBin *bin = GTK_BIN (container);
|
||||
gboolean widget_was_visible;
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (child));
|
||||
g_return_if_fail (bin->child == child);
|
||||
|
||||
widget_was_visible = GTK_WIDGET_VISIBLE (child);
|
||||
@ -127,8 +124,6 @@ gtk_bin_forall (GtkContainer *container,
|
||||
{
|
||||
GtkBin *bin = GTK_BIN (container);
|
||||
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
||||
if (bin->child)
|
||||
(* callback) (bin->child, callback_data);
|
||||
}
|
||||
|
10
gtk/gtkbox.c
10
gtk/gtkbox.c
@ -740,12 +740,10 @@ static void
|
||||
gtk_box_remove (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkBox *box;
|
||||
GtkBox *box = GTK_BOX (container);
|
||||
GtkBoxChild *child;
|
||||
GList *children;
|
||||
|
||||
box = GTK_BOX (container);
|
||||
|
||||
children = box->children;
|
||||
while (children)
|
||||
{
|
||||
@ -781,14 +779,10 @@ gtk_box_forall (GtkContainer *container,
|
||||
GtkCallback callback,
|
||||
gpointer callback_data)
|
||||
{
|
||||
GtkBox *box;
|
||||
GtkBox *box = GTK_BOX (container);
|
||||
GtkBoxChild *child;
|
||||
GList *children;
|
||||
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
||||
box = GTK_BOX (container);
|
||||
|
||||
children = box->children;
|
||||
while (children)
|
||||
{
|
||||
|
@ -836,9 +836,7 @@ static void
|
||||
calendar_set_month_next (GtkCalendar *calendar)
|
||||
{
|
||||
gint month_len;
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (calendar));
|
||||
|
||||
|
||||
if (calendar->display_flags & GTK_CALENDAR_NO_MONTH_CHANGE)
|
||||
return;
|
||||
|
||||
@ -876,9 +874,7 @@ static void
|
||||
calendar_set_year_prev (GtkCalendar *calendar)
|
||||
{
|
||||
gint month_len;
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (calendar));
|
||||
|
||||
|
||||
calendar->year--;
|
||||
calendar_compute_days (calendar);
|
||||
g_signal_emit (calendar,
|
||||
@ -905,9 +901,7 @@ static void
|
||||
calendar_set_year_next (GtkCalendar *calendar)
|
||||
{
|
||||
gint month_len;
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (calendar));
|
||||
|
||||
|
||||
calendar->year++;
|
||||
calendar_compute_days (calendar);
|
||||
g_signal_emit (calendar,
|
||||
@ -943,8 +937,6 @@ calendar_compute_days (GtkCalendar *calendar)
|
||||
gint col;
|
||||
gint day;
|
||||
|
||||
g_return_if_fail (GTK_IS_CALENDAR (calendar));
|
||||
|
||||
year = calendar->year;
|
||||
month = calendar->month + 1;
|
||||
|
||||
|
@ -184,11 +184,7 @@ gtk_cell_renderer_combo_get_property (GObject *object,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkCellRendererCombo *cell;
|
||||
|
||||
g_return_if_fail (GTK_IS_CELL_RENDERER_COMBO (object));
|
||||
|
||||
cell = GTK_CELL_RENDERER_COMBO (object);
|
||||
GtkCellRendererCombo *cell = GTK_CELL_RENDERER_COMBO (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
@ -213,11 +209,7 @@ gtk_cell_renderer_combo_set_property (GObject *object,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkCellRendererCombo *cell;
|
||||
|
||||
g_return_if_fail (GTK_IS_CELL_RENDERER_COMBO (object));
|
||||
|
||||
cell = GTK_CELL_RENDERER_COMBO (object);
|
||||
GtkCellRendererCombo *cell = GTK_CELL_RENDERER_COMBO (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
|
@ -1132,14 +1132,9 @@ static void
|
||||
gtk_combo_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkCombo *combo;
|
||||
|
||||
g_return_if_fail (GTK_IS_COMBO (widget));
|
||||
g_return_if_fail (allocation != NULL);
|
||||
GtkCombo *combo = GTK_COMBO (widget);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_combo_parent_class)->size_allocate (widget, allocation);
|
||||
|
||||
combo = GTK_COMBO (widget);
|
||||
|
||||
if (combo->entry->allocation.height > combo->entry->requisition.height)
|
||||
{
|
||||
|
@ -4067,14 +4067,10 @@ gtk_combo_box_cell_layout_pack_start (GtkCellLayout *layout,
|
||||
GtkCellRenderer *cell,
|
||||
gboolean expand)
|
||||
{
|
||||
GtkComboBox *combo_box = GTK_COMBO_BOX (layout);;
|
||||
ComboCellInfo *info;
|
||||
GtkComboBox *combo_box;
|
||||
GtkComboBoxPrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_COMBO_BOX (layout));
|
||||
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
||||
|
||||
combo_box = GTK_COMBO_BOX (layout);
|
||||
priv = combo_box->priv;
|
||||
|
||||
g_object_ref_sink (cell);
|
||||
@ -4125,14 +4121,10 @@ gtk_combo_box_cell_layout_pack_end (GtkCellLayout *layout,
|
||||
GtkCellRenderer *cell,
|
||||
gboolean expand)
|
||||
{
|
||||
GtkComboBox *combo_box = GTK_COMBO_BOX (layout);
|
||||
ComboCellInfo *info;
|
||||
GtkComboBox *combo_box;
|
||||
GtkComboBoxPrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_COMBO_BOX (layout));
|
||||
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
||||
|
||||
combo_box = GTK_COMBO_BOX (layout);
|
||||
priv = combo_box->priv;
|
||||
|
||||
g_object_ref_sink (cell);
|
||||
@ -4158,13 +4150,9 @@ gtk_combo_box_cell_layout_pack_end (GtkCellLayout *layout,
|
||||
static GList *
|
||||
gtk_combo_box_cell_layout_get_cells (GtkCellLayout *layout)
|
||||
{
|
||||
GtkComboBox *combo_box = GTK_COMBO_BOX (layout);
|
||||
GSList *list;
|
||||
GList *retval = NULL;
|
||||
GtkComboBox *combo_box;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_COMBO_BOX (layout), NULL);
|
||||
|
||||
combo_box = GTK_COMBO_BOX (layout);
|
||||
|
||||
for (list = combo_box->priv->cells; list; list = list->next)
|
||||
{
|
||||
@ -4255,13 +4243,8 @@ gtk_combo_box_cell_layout_add_attribute (GtkCellLayout *layout,
|
||||
const gchar *attribute,
|
||||
gint column)
|
||||
{
|
||||
GtkComboBox *combo_box = GTK_COMBO_BOX (layout);
|
||||
ComboCellInfo *info;
|
||||
GtkComboBox *combo_box;
|
||||
|
||||
g_return_if_fail (GTK_IS_COMBO_BOX (layout));
|
||||
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
||||
|
||||
combo_box = GTK_COMBO_BOX (layout);
|
||||
|
||||
info = gtk_combo_box_get_cell_info (combo_box, cell);
|
||||
g_return_if_fail (info != NULL);
|
||||
@ -4403,15 +4386,11 @@ static void
|
||||
gtk_combo_box_cell_layout_clear_attributes (GtkCellLayout *layout,
|
||||
GtkCellRenderer *cell)
|
||||
{
|
||||
ComboCellInfo *info;
|
||||
GtkComboBox *combo_box;
|
||||
GtkComboBox *combo_box = GTK_COMBO_BOX (layout);
|
||||
GtkComboBoxPrivate *priv;
|
||||
ComboCellInfo *info;
|
||||
GSList *list;
|
||||
|
||||
g_return_if_fail (GTK_IS_COMBO_BOX (layout));
|
||||
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
||||
|
||||
combo_box = GTK_COMBO_BOX (layout);
|
||||
priv = combo_box->priv;
|
||||
|
||||
info = gtk_combo_box_get_cell_info (combo_box, cell);
|
||||
@ -4466,15 +4445,11 @@ gtk_combo_box_cell_layout_reorder (GtkCellLayout *layout,
|
||||
GtkCellRenderer *cell,
|
||||
gint position)
|
||||
{
|
||||
ComboCellInfo *info;
|
||||
GtkComboBox *combo_box;
|
||||
GtkComboBox *combo_box = GTK_COMBO_BOX (layout);
|
||||
GtkComboBoxPrivate *priv;
|
||||
ComboCellInfo *info;
|
||||
GSList *link;
|
||||
|
||||
g_return_if_fail (GTK_IS_COMBO_BOX (layout));
|
||||
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
||||
|
||||
combo_box = GTK_COMBO_BOX (layout);
|
||||
priv = combo_box->priv;
|
||||
|
||||
info = gtk_combo_box_get_cell_info (combo_box, cell);
|
||||
|
@ -75,13 +75,10 @@ gtk_drawing_area_size (GtkDrawingArea *darea,
|
||||
static void
|
||||
gtk_drawing_area_realize (GtkWidget *widget)
|
||||
{
|
||||
GtkDrawingArea *darea;
|
||||
GtkDrawingArea *darea = GTK_DRAWING_AREA (widget);
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
|
||||
g_return_if_fail (GTK_IS_DRAWING_AREA (widget));
|
||||
|
||||
darea = GTK_DRAWING_AREA (widget);
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
|
@ -670,8 +670,6 @@ gtk_entry_completion_pack_start (GtkCellLayout *cell_layout,
|
||||
{
|
||||
GtkEntryCompletionPrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (cell_layout));
|
||||
|
||||
priv = GTK_ENTRY_COMPLETION_GET_PRIVATE (cell_layout);
|
||||
|
||||
gtk_tree_view_column_pack_start (priv->column, cell, expand);
|
||||
@ -684,8 +682,6 @@ gtk_entry_completion_pack_end (GtkCellLayout *cell_layout,
|
||||
{
|
||||
GtkEntryCompletionPrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (cell_layout));
|
||||
|
||||
priv = GTK_ENTRY_COMPLETION_GET_PRIVATE (cell_layout);
|
||||
|
||||
gtk_tree_view_column_pack_end (priv->column, cell, expand);
|
||||
@ -696,8 +692,6 @@ gtk_entry_completion_clear (GtkCellLayout *cell_layout)
|
||||
{
|
||||
GtkEntryCompletionPrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (cell_layout));
|
||||
|
||||
priv = GTK_ENTRY_COMPLETION_GET_PRIVATE (cell_layout);
|
||||
|
||||
gtk_tree_view_column_clear (priv->column);
|
||||
@ -711,8 +705,6 @@ gtk_entry_completion_add_attribute (GtkCellLayout *cell_layout,
|
||||
{
|
||||
GtkEntryCompletionPrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (cell_layout));
|
||||
|
||||
priv = GTK_ENTRY_COMPLETION_GET_PRIVATE (cell_layout);
|
||||
|
||||
gtk_tree_view_column_add_attribute (priv->column, cell, attribute, column);
|
||||
@ -727,8 +719,6 @@ gtk_entry_completion_set_cell_data_func (GtkCellLayout *cell_layout,
|
||||
{
|
||||
GtkEntryCompletionPrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (cell_layout));
|
||||
|
||||
priv = GTK_ENTRY_COMPLETION_GET_PRIVATE (cell_layout);
|
||||
|
||||
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (priv->column),
|
||||
@ -741,8 +731,6 @@ gtk_entry_completion_clear_attributes (GtkCellLayout *cell_layout,
|
||||
{
|
||||
GtkEntryCompletionPrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (cell_layout));
|
||||
|
||||
priv = GTK_ENTRY_COMPLETION_GET_PRIVATE (cell_layout);
|
||||
|
||||
gtk_tree_view_column_clear_attributes (priv->column, cell);
|
||||
@ -755,8 +743,6 @@ gtk_entry_completion_reorder (GtkCellLayout *cell_layout,
|
||||
{
|
||||
GtkEntryCompletionPrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (cell_layout));
|
||||
|
||||
priv = GTK_ENTRY_COMPLETION_GET_PRIVATE (cell_layout);
|
||||
|
||||
gtk_cell_layout_reorder (GTK_CELL_LAYOUT (priv->column), cell, position);
|
||||
|
@ -436,14 +436,10 @@ gtk_fixed_forall (GtkContainer *container,
|
||||
GtkCallback callback,
|
||||
gpointer callback_data)
|
||||
{
|
||||
GtkFixed *fixed;
|
||||
GtkFixed *fixed = GTK_FIXED (container);
|
||||
GtkFixedChild *child;
|
||||
GList *children;
|
||||
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
||||
fixed = GTK_FIXED (container);
|
||||
|
||||
children = fixed->children;
|
||||
while (children)
|
||||
{
|
||||
|
@ -480,11 +480,7 @@ gtk_gamma_curve_new (void)
|
||||
static void
|
||||
gtk_gamma_curve_destroy (GtkObject *object)
|
||||
{
|
||||
GtkGammaCurve *c;
|
||||
|
||||
g_return_if_fail (GTK_IS_GAMMA_CURVE (object));
|
||||
|
||||
c = GTK_GAMMA_CURVE (object);
|
||||
GtkGammaCurve *c = GTK_GAMMA_CURVE (object);
|
||||
|
||||
if (c->gamma_dialog)
|
||||
gtk_widget_destroy (c->gamma_dialog);
|
||||
|
@ -50,12 +50,8 @@ gtk_hpaned_class_init (GtkHPanedClass *class)
|
||||
static void
|
||||
gtk_hpaned_init (GtkHPaned *hpaned)
|
||||
{
|
||||
GtkPaned *paned;
|
||||
GtkPaned *paned = GTK_PANED (hpaned);
|
||||
|
||||
g_return_if_fail (GTK_IS_PANED (hpaned));
|
||||
|
||||
paned = GTK_PANED (hpaned);
|
||||
|
||||
paned->cursor_type = GDK_SB_H_DOUBLE_ARROW;
|
||||
paned->orientation = GTK_ORIENTATION_VERTICAL;
|
||||
}
|
||||
|
@ -1250,11 +1250,7 @@ static void
|
||||
gtk_icon_view_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style)
|
||||
{
|
||||
GtkIconView *icon_view;
|
||||
|
||||
g_return_if_fail (GTK_IS_ICON_VIEW (widget));
|
||||
|
||||
icon_view = GTK_ICON_VIEW (widget);
|
||||
GtkIconView *icon_view = GTK_ICON_VIEW (widget);
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
{
|
||||
@ -1269,11 +1265,9 @@ static void
|
||||
gtk_icon_view_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
{
|
||||
GtkIconView *icon_view;
|
||||
GtkIconView *icon_view = GTK_ICON_VIEW (widget);
|
||||
GList *tmp_list;
|
||||
|
||||
icon_view = GTK_ICON_VIEW (widget);
|
||||
|
||||
requisition->width = icon_view->priv->width;
|
||||
requisition->height = icon_view->priv->height;
|
||||
|
||||
|
@ -125,8 +125,6 @@ gtk_item_realize (GtkWidget *widget)
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
|
||||
g_return_if_fail (GTK_IS_ITEM (widget));
|
||||
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
||||
|
||||
attributes.x = widget->allocation.x;
|
||||
|
@ -470,13 +470,9 @@ gtk_item_factory_from_path (const gchar *path)
|
||||
static void
|
||||
gtk_item_factory_destroy (GtkObject *object)
|
||||
{
|
||||
GtkItemFactory *ifactory;
|
||||
GtkItemFactory *ifactory = (GtkItemFactory*) object;
|
||||
GSList *slist;
|
||||
|
||||
g_return_if_fail (GTK_IS_ITEM_FACTORY (object));
|
||||
|
||||
ifactory = (GtkItemFactory*) object;
|
||||
|
||||
if (ifactory->widget)
|
||||
{
|
||||
GtkObject *dobj;
|
||||
@ -508,11 +504,7 @@ gtk_item_factory_destroy (GtkObject *object)
|
||||
static void
|
||||
gtk_item_factory_finalize (GObject *object)
|
||||
{
|
||||
GtkItemFactory *ifactory;
|
||||
|
||||
g_return_if_fail (GTK_IS_ITEM_FACTORY (object));
|
||||
|
||||
ifactory = GTK_ITEM_FACTORY (object);
|
||||
GtkItemFactory *ifactory = GTK_ITEM_FACTORY (object);
|
||||
|
||||
if (ifactory->accel_group)
|
||||
g_object_unref (ifactory->accel_group);
|
||||
|
Loading…
Reference in New Issue
Block a user