From 60b30ff5136acffc66b9e4fe27fb2509011ca896 Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Fri, 19 Nov 2004 23:18:38 +0000 Subject: [PATCH] gdk/linux-fb/gdkgc-fb.c gdk/win32/gdkgc-win32.c Fri Nov 19 14:54:09 2004 Manish Singh * gdk/linux-fb/gdkgc-fb.c * gdk/win32/gdkgc-win32.c * gdk/win32/gdkwindow-win32.c * gtk/gtkaboutdialog.c * gtk/gtkaction.c * gtk/gtkactiongroup.c * gtk/gtkcellrendererprogress.c * gtk/gtkcellview.c * gtk/gtkcolorbutton.c * gtk/gtkcombobox.c * gtk/gtkcomboboxentry.c * gtk/gtkentrycompletion.c * gtk/gtkfilechooserbutton.c * gtk/gtkmenutoolbutton.c * gtk/gtkrc.c * gtk/gtksettings.c * gtk/gtkstyle.c * gtk/gtktoggletoolbutton.c * gtk/gtktoolbutton.c * gtk/gtktoolitem.c * gtk/gtktreemodelfilter.c * gtk/gtktreeselection.c * gtk/gtktreeviewcolumn.c * gtk/gtkuimanager.c: get rid of unnecessary casts. * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_set_property): cast away the const for g_value_set_enum. This is after the g_warning, so this is a hack to begin with. * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_set_property): add a cast to GTK_FILE_CHOOSER for impl here. --- ChangeLog | 34 ++++++++++++++++++++++++++++++++++ ChangeLog.pre-2-10 | 34 ++++++++++++++++++++++++++++++++++ ChangeLog.pre-2-6 | 34 ++++++++++++++++++++++++++++++++++ ChangeLog.pre-2-8 | 34 ++++++++++++++++++++++++++++++++++ gdk/linux-fb/gdkgc-fb.c | 2 +- gdk/win32/gdkgc-win32.c | 4 ++-- gdk/win32/gdkwindow-win32.c | 4 ++-- gtk/gtkaboutdialog.c | 16 ++++++++-------- gtk/gtkaction.c | 8 ++++---- gtk/gtkactiongroup.c | 2 +- gtk/gtkcellrendererprogress.c | 8 ++++---- gtk/gtkcellview.c | 14 +++++++------- gtk/gtkcolorbutton.c | 2 +- gtk/gtkcombobox.c | 34 ++++++++++++++++------------------ gtk/gtkcomboboxentry.c | 2 +- gtk/gtkentrycompletion.c | 6 +++--- gtk/gtkfilechooserbutton.c | 4 ++-- gtk/gtkfilechooserdefault.c | 2 +- gtk/gtkmenutoolbutton.c | 4 ++-- gtk/gtkrc.c | 2 +- gtk/gtksettings.c | 2 +- gtk/gtkstyle.c | 4 ++-- gtk/gtktoggletoolbutton.c | 4 ++-- gtk/gtktoolbutton.c | 8 ++++---- gtk/gtktoolitem.c | 2 +- gtk/gtktreemodelfilter.c | 22 +++++++++++----------- gtk/gtktreeselection.c | 4 ++-- gtk/gtktreeviewcolumn.c | 2 +- gtk/gtkuimanager.c | 6 +++--- 29 files changed, 219 insertions(+), 85 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7b83c7c3a1..72cc329a19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,37 @@ +Fri Nov 19 14:54:09 2004 Manish Singh + + * gdk/linux-fb/gdkgc-fb.c + * gdk/win32/gdkgc-win32.c + * gdk/win32/gdkwindow-win32.c + * gtk/gtkaboutdialog.c + * gtk/gtkaction.c + * gtk/gtkactiongroup.c + * gtk/gtkcellrendererprogress.c + * gtk/gtkcellview.c + * gtk/gtkcolorbutton.c + * gtk/gtkcombobox.c + * gtk/gtkcomboboxentry.c + * gtk/gtkentrycompletion.c + * gtk/gtkfilechooserbutton.c + * gtk/gtkmenutoolbutton.c + * gtk/gtkrc.c + * gtk/gtksettings.c + * gtk/gtkstyle.c + * gtk/gtktoggletoolbutton.c + * gtk/gtktoolbutton.c + * gtk/gtktoolitem.c + * gtk/gtktreemodelfilter.c + * gtk/gtktreeselection.c + * gtk/gtktreeviewcolumn.c + * gtk/gtkuimanager.c: get rid of unnecessary casts. + + * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_set_property): + cast away the const for g_value_set_enum. This is after the g_warning, + so this is a hack to begin with. + + * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_set_property): + add a cast to GTK_FILE_CHOOSER for impl here. + Fri Nov 19 14:52:42 2004 Manish Singh * autogen.sh: rm autom4te.cache, since it might interfere with diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7b83c7c3a1..72cc329a19 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,37 @@ +Fri Nov 19 14:54:09 2004 Manish Singh + + * gdk/linux-fb/gdkgc-fb.c + * gdk/win32/gdkgc-win32.c + * gdk/win32/gdkwindow-win32.c + * gtk/gtkaboutdialog.c + * gtk/gtkaction.c + * gtk/gtkactiongroup.c + * gtk/gtkcellrendererprogress.c + * gtk/gtkcellview.c + * gtk/gtkcolorbutton.c + * gtk/gtkcombobox.c + * gtk/gtkcomboboxentry.c + * gtk/gtkentrycompletion.c + * gtk/gtkfilechooserbutton.c + * gtk/gtkmenutoolbutton.c + * gtk/gtkrc.c + * gtk/gtksettings.c + * gtk/gtkstyle.c + * gtk/gtktoggletoolbutton.c + * gtk/gtktoolbutton.c + * gtk/gtktoolitem.c + * gtk/gtktreemodelfilter.c + * gtk/gtktreeselection.c + * gtk/gtktreeviewcolumn.c + * gtk/gtkuimanager.c: get rid of unnecessary casts. + + * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_set_property): + cast away the const for g_value_set_enum. This is after the g_warning, + so this is a hack to begin with. + + * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_set_property): + add a cast to GTK_FILE_CHOOSER for impl here. + Fri Nov 19 14:52:42 2004 Manish Singh * autogen.sh: rm autom4te.cache, since it might interfere with diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7b83c7c3a1..72cc329a19 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,37 @@ +Fri Nov 19 14:54:09 2004 Manish Singh + + * gdk/linux-fb/gdkgc-fb.c + * gdk/win32/gdkgc-win32.c + * gdk/win32/gdkwindow-win32.c + * gtk/gtkaboutdialog.c + * gtk/gtkaction.c + * gtk/gtkactiongroup.c + * gtk/gtkcellrendererprogress.c + * gtk/gtkcellview.c + * gtk/gtkcolorbutton.c + * gtk/gtkcombobox.c + * gtk/gtkcomboboxentry.c + * gtk/gtkentrycompletion.c + * gtk/gtkfilechooserbutton.c + * gtk/gtkmenutoolbutton.c + * gtk/gtkrc.c + * gtk/gtksettings.c + * gtk/gtkstyle.c + * gtk/gtktoggletoolbutton.c + * gtk/gtktoolbutton.c + * gtk/gtktoolitem.c + * gtk/gtktreemodelfilter.c + * gtk/gtktreeselection.c + * gtk/gtktreeviewcolumn.c + * gtk/gtkuimanager.c: get rid of unnecessary casts. + + * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_set_property): + cast away the const for g_value_set_enum. This is after the g_warning, + so this is a hack to begin with. + + * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_set_property): + add a cast to GTK_FILE_CHOOSER for impl here. + Fri Nov 19 14:52:42 2004 Manish Singh * autogen.sh: rm autom4te.cache, since it might interfere with diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7b83c7c3a1..72cc329a19 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,37 @@ +Fri Nov 19 14:54:09 2004 Manish Singh + + * gdk/linux-fb/gdkgc-fb.c + * gdk/win32/gdkgc-win32.c + * gdk/win32/gdkwindow-win32.c + * gtk/gtkaboutdialog.c + * gtk/gtkaction.c + * gtk/gtkactiongroup.c + * gtk/gtkcellrendererprogress.c + * gtk/gtkcellview.c + * gtk/gtkcolorbutton.c + * gtk/gtkcombobox.c + * gtk/gtkcomboboxentry.c + * gtk/gtkentrycompletion.c + * gtk/gtkfilechooserbutton.c + * gtk/gtkmenutoolbutton.c + * gtk/gtkrc.c + * gtk/gtksettings.c + * gtk/gtkstyle.c + * gtk/gtktoggletoolbutton.c + * gtk/gtktoolbutton.c + * gtk/gtktoolitem.c + * gtk/gtktreemodelfilter.c + * gtk/gtktreeselection.c + * gtk/gtktreeviewcolumn.c + * gtk/gtkuimanager.c: get rid of unnecessary casts. + + * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_set_property): + cast away the const for g_value_set_enum. This is after the g_warning, + so this is a hack to begin with. + + * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_set_property): + add a cast to GTK_FILE_CHOOSER for impl here. + Fri Nov 19 14:52:42 2004 Manish Singh * autogen.sh: rm autom4te.cache, since it might interfere with diff --git a/gdk/linux-fb/gdkgc-fb.c b/gdk/linux-fb/gdkgc-fb.c index d1740306ec..8b8a4c702d 100644 --- a/gdk/linux-fb/gdkgc-fb.c +++ b/gdk/linux-fb/gdkgc-fb.c @@ -77,7 +77,7 @@ _gdk_fb_gc_new (GdkDrawable *drawable, GdkGC *gc; GdkGCFBData *private; - gc = GDK_GC (g_object_new (gdk_gc_fb_get_type (), NULL)); + gc = g_object_new (gdk_gc_fb_get_type (), NULL); private = (GdkGCFBData *)gc; diff --git a/gdk/win32/gdkgc-win32.c b/gdk/win32/gdkgc-win32.c index 4d4b09d442..ed652ea1c0 100644 --- a/gdk/win32/gdkgc-win32.c +++ b/gdk/win32/gdkgc-win32.c @@ -689,7 +689,7 @@ gdk_gc_copy (GdkGC *dst_gc, GDK_NOTE (GC, g_print ("gdk_gc_copy: %p := %p\n", dst_win32_gc, src_win32_gc)); if (dst_gc->colormap) - g_object_unref (G_OBJECT (dst_gc->colormap)); + g_object_unref (dst_gc->colormap); if (dst_win32_gc->hcliprgn != NULL) DeleteObject (dst_win32_gc->hcliprgn); @@ -712,7 +712,7 @@ gdk_gc_copy (GdkGC *dst_gc, dst_gc->ts_y_origin = src_gc->ts_y_origin; dst_gc->colormap = src_gc->colormap; if (dst_gc->colormap) - g_object_ref (G_OBJECT (dst_gc->colormap)); + g_object_ref (dst_gc->colormap); dst_win32_gc->hcliprgn = src_win32_gc->hcliprgn; if (dst_win32_gc->hcliprgn) diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c index 6c114dac82..99a2e02bed 100644 --- a/gdk/win32/gdkwindow-win32.c +++ b/gdk/win32/gdkwindow-win32.c @@ -2432,9 +2432,9 @@ pixbuf_to_hicon_normal (GdkWindow *window, #endif if (pixmap) - g_object_unref (G_OBJECT (pixmap)); + g_object_unref (pixmap); if (mask) - g_object_unref (G_OBJECT (mask)); + g_object_unref (mask); return hIcon; } diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c index b2fc311ab4..02f2e5a919 100644 --- a/gtk/gtkaboutdialog.c +++ b/gtk/gtkaboutdialog.c @@ -1547,7 +1547,7 @@ create_link_button (GtkWidget *about, g_object_set_data_full (G_OBJECT (button), "url", g_strdup (url), g_free); set_link_button_text (about, button, text); - g_signal_connect (G_OBJECT (button), "clicked", callback, data); + g_signal_connect (button, "clicked", callback, data); return button; } @@ -1766,13 +1766,13 @@ add_credits_page (GtkAboutDialog *about, gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 8); gtk_text_view_set_right_margin (GTK_TEXT_VIEW (view), 8); - g_signal_connect (G_OBJECT (view), "key-press-event", + g_signal_connect (view, "key-press-event", G_CALLBACK (credits_key_press_event), about); - g_signal_connect (G_OBJECT (view), "event-after", + g_signal_connect (view, "event-after", G_CALLBACK (credits_event_after), about); - g_signal_connect (G_OBJECT (view), "motion-notify-event", + g_signal_connect (view, "motion-notify-event", G_CALLBACK (credits_motion_notify_event), about); - g_signal_connect (G_OBJECT (view), "visibility-notify-event", + g_signal_connect (view, "visibility-notify-event", G_CALLBACK (credits_visibility_notify_event), about); sw = gtk_scrolled_window_new (NULL, NULL); @@ -2010,14 +2010,14 @@ close_cb (GtkAboutDialog *about) GtkWidget * gtk_about_dialog_new (void) { - GtkAboutDialog *dialog = GTK_ABOUT_DIALOG (g_object_new (GTK_TYPE_ABOUT_DIALOG, NULL)); + GtkAboutDialog *dialog = g_object_new (GTK_TYPE_ABOUT_DIALOG, NULL); /* force defaults */ gtk_about_dialog_set_name (dialog, NULL); gtk_about_dialog_set_logo (dialog, NULL); /* Close dialog on user response */ - g_signal_connect (G_OBJECT (dialog), + g_signal_connect (dialog, "response", G_CALLBACK (close_cb), NULL); @@ -2119,7 +2119,7 @@ gtk_show_about_dialog (GtkWindow *parent, { dialog = gtk_about_dialog_new (); - g_object_ref (G_OBJECT (dialog)); + g_object_ref (dialog); gtk_object_sink (GTK_OBJECT (dialog)); g_signal_connect (dialog, "delete_event", G_CALLBACK (gtk_widget_hide_on_delete), NULL); diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c index d77f5488ca..0df7a21868 100644 --- a/gtk/gtkaction.c +++ b/gtk/gtkaction.c @@ -836,7 +836,7 @@ connect_proxy (GtkAction *action, NULL); if (GTK_IS_ACCEL_LABEL (label) && action->private_data->accel_quark) - g_object_set (G_OBJECT (label), + g_object_set (label, "accel_closure", action->private_data->accel_closure, NULL); @@ -879,7 +879,7 @@ connect_proxy (GtkAction *action, { /* toolbar item specific synchronisers ... */ - g_object_set (G_OBJECT (proxy), + g_object_set (proxy, "visible_horizontal", action->private_data->visible_horizontal, "visible_vertical", action->private_data->visible_vertical, "is_important", action->private_data->is_important, @@ -909,7 +909,7 @@ connect_proxy (GtkAction *action, /* toolbar button specific synchronisers ... */ if (GTK_IS_TOOL_BUTTON (proxy)) { - g_object_set (G_OBJECT (proxy), + g_object_set (proxy, "label", action->private_data->short_label, "use_underline", TRUE, "stock_id", action->private_data->stock_id, @@ -933,7 +933,7 @@ connect_proxy (GtkAction *action, /* button specific synchronisers ... */ /* synchronise the label */ - g_object_set (G_OBJECT (proxy), + g_object_set (proxy, "label", action->private_data->short_label, "use_underline", TRUE, NULL); diff --git a/gtk/gtkactiongroup.c b/gtk/gtkactiongroup.c index 7b22d7ae6e..803c5ef7c9 100644 --- a/gtk/gtkactiongroup.c +++ b/gtk/gtkactiongroup.c @@ -546,7 +546,7 @@ gtk_action_group_add_action (GtkActionGroup *action_group, g_hash_table_insert (action_group->private_data->actions, g_strdup (gtk_action_get_name (action)), g_object_ref (action)); - g_object_set (G_OBJECT (action), "action_group", action_group, NULL); + g_object_set (action, "action_group", action_group, NULL); } /** diff --git a/gtk/gtkcellrendererprogress.c b/gtk/gtkcellrendererprogress.c index f529a2e832..750b3ddc24 100644 --- a/gtk/gtkcellrendererprogress.c +++ b/gtk/gtkcellrendererprogress.c @@ -163,7 +163,7 @@ gtk_cell_renderer_progress_init (GtkCellRendererProgress *cellprogress) GtkCellRenderer* gtk_cell_renderer_progress_new (void) { - return GTK_CELL_RENDERER (g_object_new (GTK_TYPE_CELL_RENDERER_PROGRESS, NULL)); + return g_object_new (GTK_TYPE_CELL_RENDERER_PROGRESS, NULL); } static void @@ -272,7 +272,7 @@ compute_dimensions (GtkCellRenderer *cell, if (height) *height = logical_rect.height + cell->ypad * 2 + widget->style->ythickness * 2; - g_object_unref (G_OBJECT (layout)); + g_object_unref (layout); } static void @@ -372,7 +372,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell, x + pos, y + (h - logical_rect.height)/2, layout); - g_object_unref (G_OBJECT (layout)); - g_object_unref (G_OBJECT (gc)); + g_object_unref (layout); + g_object_unref (gc); } diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c index ed3450df9b..e878fabd5f 100644 --- a/gtk/gtkcellview.c +++ b/gtk/gtkcellview.c @@ -442,7 +442,7 @@ gtk_cell_view_expose (GtkWidget *widget, widget->allocation.width, widget->allocation.height); - g_object_unref (G_OBJECT (gc)); + g_object_unref (gc); } /* set cell data (if available) */ @@ -594,7 +594,7 @@ gtk_cell_view_cell_layout_pack_start (GtkCellLayout *layout, g_return_if_fail (GTK_IS_CELL_RENDERER (renderer)); g_return_if_fail (!gtk_cell_view_get_cell_info (cellview, renderer)); - g_object_ref (G_OBJECT (renderer)); + g_object_ref (renderer); gtk_object_sink (GTK_OBJECT (renderer)); info = g_new0 (GtkCellViewCellInfo, 1); @@ -617,7 +617,7 @@ gtk_cell_view_cell_layout_pack_end (GtkCellLayout *layout, g_return_if_fail (GTK_IS_CELL_RENDERER (renderer)); g_return_if_fail (!gtk_cell_view_get_cell_info (cellview, renderer)); - g_object_ref (G_OBJECT (renderer)); + g_object_ref (renderer); gtk_object_sink (GTK_OBJECT (renderer)); info = g_new0 (GtkCellViewCellInfo, 1); @@ -659,7 +659,7 @@ gtk_cell_view_cell_layout_clear (GtkCellLayout *layout) GtkCellViewCellInfo *info = (GtkCellViewCellInfo *)cellview->priv->cell_list->data; gtk_cell_view_cell_layout_clear_attributes (layout, info->cell); - g_object_unref (G_OBJECT (info->cell)); + g_object_unref (info->cell); g_free (info); cellview->priv->cell_list = g_list_delete_link (cellview->priv->cell_list, cellview->priv->cell_list); @@ -763,7 +763,7 @@ gtk_cell_view_new (void) { GtkCellView *cellview; - cellview = GTK_CELL_VIEW (g_object_new (gtk_cell_view_get_type (), NULL)); + cellview = g_object_new (gtk_cell_view_get_type (), NULL); return GTK_WIDGET (cellview); } @@ -964,14 +964,14 @@ gtk_cell_view_set_model (GtkCellView *cell_view, gtk_tree_row_reference_free (cell_view->priv->displayed_row); cell_view->priv->displayed_row = NULL; - g_object_unref (G_OBJECT (cell_view->priv->model)); + g_object_unref (cell_view->priv->model); cell_view->priv->model = NULL; } cell_view->priv->model = model; if (cell_view->priv->model) - g_object_ref (G_OBJECT (cell_view->priv->model)); + g_object_ref (cell_view->priv->model); } /** diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c index 2cda088164..096e1b7863 100644 --- a/gtk/gtkcolorbutton.c +++ b/gtk/gtkcolorbutton.c @@ -613,7 +613,7 @@ gtk_color_button_finalize (GObject *object) GtkColorButton *color_button = GTK_COLOR_BUTTON (object); if (color_button->priv->gc != NULL) - g_object_unref (G_OBJECT (color_button->priv->gc)); + g_object_unref (color_button->priv->gc); color_button->priv->gc = NULL; if (color_button->priv->cs_dialog != NULL) diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 1b83a67b64..10ddff8468 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -1076,7 +1076,7 @@ gtk_combo_box_set_popup_widget (GtkComboBox *combo_box, { gtk_container_remove (GTK_CONTAINER (combo_box->priv->popup_frame), combo_box->priv->popup_widget); - g_object_unref (G_OBJECT (combo_box->priv->popup_widget)); + g_object_unref (combo_box->priv->popup_widget); combo_box->priv->popup_widget = NULL; } @@ -1140,7 +1140,7 @@ gtk_combo_box_set_popup_widget (GtkComboBox *combo_box, popup); gtk_widget_show (popup); - g_object_ref (G_OBJECT (popup)); + g_object_ref (popup); combo_box->priv->popup_widget = popup; } } @@ -1396,7 +1396,7 @@ cell_view_is_sensitive (GtkCellView *cell_view) list = cells; while (list) { - g_object_get (G_OBJECT (list->data), "sensitive", &sensitive, NULL); + g_object_get (list->data, "sensitive", &sensitive, NULL); if (sensitive) break; @@ -1435,7 +1435,7 @@ tree_column_row_is_sensitive (GtkComboBox *combo_box, list = cells; while (list) { - g_object_get (G_OBJECT (list->data), "sensitive", &sensitive, NULL); + g_object_get (list->data, "sensitive", &sensitive, NULL); if (sensitive) break; @@ -1482,8 +1482,8 @@ update_menu_sensitivity (GtkComboBox *combo_box, if (menu != combo_box->priv->popup_widget && child == children) { separator = GTK_WIDGET (child->next->data); - g_object_set (G_OBJECT (item), "visible", sensitive, NULL); - g_object_set (G_OBJECT (separator), "visible", sensitive, NULL); + g_object_set (item, "visible", sensitive, NULL); + g_object_set (separator, "visible", sensitive, NULL); } else gtk_widget_set_sensitive (item, sensitive); @@ -1984,7 +1984,7 @@ gtk_combo_box_unset_model (GtkComboBox *combo_box) if (combo_box->priv->model) { - g_object_unref (G_OBJECT (combo_box->priv->model)); + g_object_unref (combo_box->priv->model); combo_box->priv->model = NULL; } @@ -3225,7 +3225,7 @@ gtk_combo_box_list_destroy (GtkComboBox *combo_box) if (combo_box->priv->cell_view) { - g_object_set (G_OBJECT (combo_box->priv->cell_view), + g_object_set (combo_box->priv->cell_view, "background_set", FALSE, NULL); } @@ -3634,7 +3634,7 @@ gtk_combo_box_cell_layout_pack_start (GtkCellLayout *layout, combo_box = GTK_COMBO_BOX (layout); - g_object_ref (G_OBJECT (cell)); + g_object_ref (cell); gtk_object_sink (GTK_OBJECT (cell)); info = g_new0 (ComboCellInfo, 1); @@ -3691,7 +3691,7 @@ gtk_combo_box_cell_layout_pack_end (GtkCellLayout *layout, combo_box = GTK_COMBO_BOX (layout); - g_object_ref (G_OBJECT (cell)); + g_object_ref (cell); gtk_object_sink (GTK_OBJECT (cell)); info = g_new0 (ComboCellInfo, 1); @@ -3753,7 +3753,7 @@ gtk_combo_box_cell_layout_clear (GtkCellLayout *layout) ComboCellInfo *info = (ComboCellInfo *)i->data; gtk_combo_box_cell_layout_clear_attributes (layout, info->cell); - g_object_unref (G_OBJECT (info->cell)); + g_object_unref (info->cell); g_free (info); i->data = NULL; } @@ -3842,7 +3842,7 @@ combo_cell_data_func (GtkCellLayout *cell_layout, if (GTK_IS_MENU_ITEM (parent) && gtk_menu_item_get_submenu (GTK_MENU_ITEM (parent))) - g_object_set (G_OBJECT (cell), "sensitive", TRUE, NULL); + g_object_set (cell, "sensitive", TRUE, NULL); } @@ -4057,7 +4057,7 @@ gtk_combo_box_cell_layout_reorder (GtkCellLayout *layout, GtkWidget * gtk_combo_box_new (void) { - return GTK_WIDGET (g_object_new (GTK_TYPE_COMBO_BOX, NULL)); + return g_object_new (GTK_TYPE_COMBO_BOX, NULL); } /** @@ -4077,9 +4077,7 @@ gtk_combo_box_new_with_model (GtkTreeModel *model) g_return_val_if_fail (GTK_IS_TREE_MODEL (model), NULL); - combo_box = GTK_COMBO_BOX (g_object_new (GTK_TYPE_COMBO_BOX, - "model", model, - NULL)); + combo_box = g_object_new (GTK_TYPE_COMBO_BOX, "model", model, NULL); return GTK_WIDGET (combo_box); } @@ -4454,7 +4452,7 @@ gtk_combo_box_set_model (GtkComboBox *combo_box, gtk_combo_box_unset_model (combo_box); combo_box->priv->model = model; - g_object_ref (G_OBJECT (combo_box->priv->model)); + g_object_ref (combo_box->priv->model); combo_box->priv->inserted_id = g_signal_connect (combo_box->priv->model, "row_inserted", @@ -4766,7 +4764,7 @@ gtk_combo_box_finalize (GObject *object) } g_slist_free (info->attributes); - g_object_unref (G_OBJECT (info->cell)); + g_object_unref (info->cell); g_free (info); } g_slist_free (combo_box->priv->cells); diff --git a/gtk/gtkcomboboxentry.c b/gtk/gtkcomboboxentry.c index 3b7b906353..e43829fe04 100644 --- a/gtk/gtkcomboboxentry.c +++ b/gtk/gtkcomboboxentry.c @@ -262,7 +262,7 @@ gtk_combo_box_entry_contents_changed (GtkEntry *entry, GtkWidget * gtk_combo_box_entry_new (void) { - return GTK_WIDGET (g_object_new (gtk_combo_box_entry_get_type (), NULL)); + return g_object_new (gtk_combo_box_entry_get_type (), NULL); } /** diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c index d8bae29579..e802137cf2 100644 --- a/gtk/gtkentrycompletion.c +++ b/gtk/gtkentrycompletion.c @@ -837,12 +837,12 @@ gtk_entry_completion_action_data_func (GtkTreeViewColumn *tree_column, return; if (markup) - g_object_set (G_OBJECT (cell), + g_object_set (cell, "text", NULL, "markup", string, NULL); else - g_object_set (G_OBJECT (cell), + g_object_set (cell, "markup", NULL, "text", string, NULL); @@ -952,7 +952,7 @@ gtk_entry_completion_set_model (GtkEntryCompletion *completion, gtk_tree_view_set_model (GTK_TREE_VIEW (completion->priv->tree_view), GTK_TREE_MODEL (completion->priv->filter_model)); - g_object_unref (G_OBJECT (completion->priv->filter_model)); + g_object_unref (completion->priv->filter_model); if (GTK_WIDGET_VISIBLE (completion->priv->popup_window)) _gtk_entry_completion_resize_popup (completion); diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index 98cb1a851e..014d53f6fe 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -512,14 +512,14 @@ gtk_file_chooser_button_set_property (GObject *object, g_warning ("%s: Choosers of type `%s` do not support `%s'.", G_STRFUNC, G_OBJECT_TYPE_NAME (object), eval->value_name); - g_value_set_enum (value, GTK_FILE_CHOOSER_ACTION_OPEN); + g_value_set_enum ((GValue *) value, GTK_FILE_CHOOSER_ACTION_OPEN); } break; } g_object_set_property (G_OBJECT (priv->dialog), pspec->name, value); _gtk_file_chooser_entry_set_action (GTK_FILE_CHOOSER_ENTRY (priv->entry), - (GtkFileChooserAction) g_value_get_enum (value)); + g_value_get_enum (value)); update_icons (GTK_FILE_CHOOSER_BUTTON (object)); switch (g_value_get_enum (value)) diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 7bbd87d3d6..afd1dd3c9e 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -3708,7 +3708,7 @@ gtk_file_chooser_default_set_property (GObject *object, if (action != impl->action) { - gtk_file_chooser_default_unselect_all (impl); + gtk_file_chooser_default_unselect_all (GTK_FILE_CHOOSER (impl)); if (action == GTK_FILE_CHOOSER_ACTION_SAVE && impl->select_multiple) { diff --git a/gtk/gtkmenutoolbutton.c b/gtk/gtkmenutoolbutton.c index 678a79dcf9..f7249f13de 100644 --- a/gtk/gtkmenutoolbutton.c +++ b/gtk/gtkmenutoolbutton.c @@ -265,7 +265,7 @@ button_state_changed_cb (GtkWidget *widget, other = (widget == priv->arrow_button) ? priv->button : priv->arrow_button; - g_signal_handlers_block_by_func (G_OBJECT (other), + g_signal_handlers_block_by_func (other, G_CALLBACK (button_state_changed_cb), button); @@ -282,7 +282,7 @@ button_state_changed_cb (GtkWidget *widget, gtk_widget_set_state (other, GTK_STATE_NORMAL); } - g_signal_handlers_unblock_by_func (G_OBJECT (other), + g_signal_handlers_unblock_by_func (other, G_CALLBACK (button_state_changed_cb), button); } diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index 0f9aa35016..69b429e7d0 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -1117,7 +1117,7 @@ gtk_rc_style_unref (GtkRcStyle *rc_style) static GtkRcStyle * gtk_rc_style_real_create_rc_style (GtkRcStyle *style) { - return GTK_RC_STYLE (g_object_new (G_OBJECT_TYPE (style), NULL)); + return g_object_new (G_OBJECT_TYPE (style), NULL); } static gint diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index 672fef142c..4aec31559f 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -146,7 +146,7 @@ gtk_default_substitute (FcPattern *pattern, gint dpi; FcValue v; - g_object_get (G_OBJECT (settings), + g_object_get (settings, "gtk-xft-antialias", &antialias, "gtk-xft-hinting", &hinting, "gtk-xft-hintstyle", &hintstyle, diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 225174c057..691ee65802 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -1668,7 +1668,7 @@ gtk_style_set_background (GtkStyle *style, static GtkStyle * gtk_style_real_clone (GtkStyle *style) { - return GTK_STYLE (g_object_new (G_OBJECT_TYPE (style), NULL)); + return g_object_new (G_OBJECT_TYPE (style), NULL); } static void @@ -4950,7 +4950,7 @@ gtk_default_draw_handle (GtkStyle *style, out: if (free_me) - g_object_unref (G_OBJECT (free_me)); + g_object_unref (free_me); } static void diff --git a/gtk/gtktoggletoolbutton.c b/gtk/gtktoggletoolbutton.c index 40afdd9803..e4b57c62be 100644 --- a/gtk/gtktoggletoolbutton.c +++ b/gtk/gtktoggletoolbutton.c @@ -218,7 +218,7 @@ menu_item_activated (GtkWidget *menu_item, gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (_gtk_tool_button_get_button (tool_button)), toggle_tool_button->priv->active); - g_signal_emit (G_OBJECT (toggle_tool_button), toggle_signals[TOGGLED], 0); + g_signal_emit (toggle_tool_button, toggle_signals[TOGGLED], 0); } } @@ -241,7 +241,7 @@ button_toggled (GtkWidget *widget, toggle_tool_button->priv->active); } - g_signal_emit (G_OBJECT (toggle_tool_button), toggle_signals[TOGGLED], 0); + g_signal_emit (toggle_tool_button, toggle_signals[TOGGLED], 0); } } diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c index 5b5eb1cc6d..2c6d33a848 100644 --- a/gtk/gtktoolbutton.c +++ b/gtk/gtktoolbutton.c @@ -347,7 +347,7 @@ gtk_tool_button_construct_contents (GtkToolItem *tool_item) if (GTK_IS_IMAGE (icon)) { - g_object_set (G_OBJECT (button->priv->icon_widget), + g_object_set (button->priv->icon_widget, "icon-size", icon_size, NULL); } @@ -482,10 +482,10 @@ gtk_tool_button_finalize (GObject *object) g_free (button->priv->label_text); if (button->priv->label_widget) - g_object_unref (G_OBJECT (button->priv->label_widget)); + g_object_unref (button->priv->label_widget); if (button->priv->icon_widget) - g_object_unref (G_OBJECT (button->priv->icon_widget)); + g_object_unref (button->priv->icon_widget); parent_class->finalize (object); } @@ -839,7 +839,7 @@ gtk_tool_button_set_icon_widget (GtkToolButton *button, button->priv->icon_widget); } - g_object_unref (G_OBJECT (button->priv->icon_widget)); + g_object_unref (button->priv->icon_widget); } if (icon_widget) diff --git a/gtk/gtktoolitem.c b/gtk/gtktoolitem.c index b33677a990..18f617bd73 100644 --- a/gtk/gtktoolitem.c +++ b/gtk/gtktoolitem.c @@ -1104,7 +1104,7 @@ gtk_tool_item_set_proxy_menu_item (GtkToolItem *tool_item, if (tool_item->priv->menu_item != menu_item) { if (tool_item->priv->menu_item) - g_object_unref (G_OBJECT (tool_item->priv->menu_item)); + g_object_unref (tool_item->priv->menu_item); if (menu_item) { diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c index 122afa10f0..206de37a4e 100644 --- a/gtk/gtktreemodelfilter.c +++ b/gtk/gtktreemodelfilter.c @@ -2331,15 +2331,15 @@ gtk_tree_model_filter_set_model (GtkTreeModelFilter *filter, if (filter->priv->child_model) { - g_signal_handler_disconnect (G_OBJECT (filter->priv->child_model), + g_signal_handler_disconnect (filter->priv->child_model, filter->priv->changed_id); - g_signal_handler_disconnect (G_OBJECT (filter->priv->child_model), + g_signal_handler_disconnect (filter->priv->child_model, filter->priv->inserted_id); - g_signal_handler_disconnect (G_OBJECT (filter->priv->child_model), + g_signal_handler_disconnect (filter->priv->child_model, filter->priv->has_child_toggled_id); - g_signal_handler_disconnect (G_OBJECT (filter->priv->child_model), + g_signal_handler_disconnect (filter->priv->child_model, filter->priv->deleted_id); - g_signal_handler_disconnect (G_OBJECT (filter->priv->child_model), + g_signal_handler_disconnect (filter->priv->child_model, filter->priv->reordered_id); /* reset our state */ @@ -2347,7 +2347,7 @@ gtk_tree_model_filter_set_model (GtkTreeModelFilter *filter, gtk_tree_model_filter_free_level (filter, filter->priv->root); filter->priv->root = NULL; - g_object_unref (G_OBJECT (filter->priv->child_model)); + g_object_unref (filter->priv->child_model); filter->priv->visible_column = -1; /* FIXME: destroy more crack here? the funcs? */ } @@ -2356,7 +2356,7 @@ gtk_tree_model_filter_set_model (GtkTreeModelFilter *filter, if (child_model) { - g_object_ref (G_OBJECT (filter->priv->child_model)); + g_object_ref (filter->priv->child_model); filter->priv->changed_id = g_signal_connect (child_model, "row_changed", G_CALLBACK (gtk_tree_model_filter_row_changed), @@ -2417,10 +2417,10 @@ gtk_tree_model_filter_new (GtkTreeModel *child_model, g_return_val_if_fail (GTK_IS_TREE_MODEL (child_model), NULL); - retval = GTK_TREE_MODEL (g_object_new (GTK_TYPE_TREE_MODEL_FILTER, - "child_model", child_model, - "virtual_root", root, - NULL)); + retval = g_object_new (GTK_TYPE_TREE_MODEL_FILTER, + "child_model", child_model, + "virtual_root", root, + NULL); return retval; } diff --git a/gtk/gtktreeselection.c b/gtk/gtktreeselection.c index af66893018..3e648fc51c 100644 --- a/gtk/gtktreeselection.c +++ b/gtk/gtktreeselection.c @@ -1304,8 +1304,8 @@ tree_column_is_sensitive (GtkTreeViewColumn *column, list = cells; while (list) { - g_object_get (G_OBJECT (list->data), - "sensitive", &sensitive, + g_object_get (list->data, + "sensitive", &sensitive, "visible", &visible, NULL); diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index b029b7ec45..268be23a16 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -692,7 +692,7 @@ gtk_tree_view_column_cell_layout_clear (GtkCellLayout *cell_layout) GtkTreeViewColumnCellInfo *info = (GtkTreeViewColumnCellInfo *)column->cell_list->data; gtk_tree_view_column_cell_layout_clear_attributes (cell_layout, info->cell); - g_object_unref (G_OBJECT (info->cell)); + g_object_unref (info->cell); g_free (info); column->cell_list = g_list_delete_link (column->cell_list, column->cell_list); diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c index 62804547d4..e38a4d1809 100644 --- a/gtk/gtkuimanager.c +++ b/gtk/gtkuimanager.c @@ -2380,7 +2380,7 @@ update_node (GtkUIManager *self, { /* don't show accels in popups */ GtkWidget *label = GTK_BIN (info->proxy)->child; - g_object_set (G_OBJECT (label), + g_object_set (label, "accel_closure", NULL, NULL); } @@ -2420,8 +2420,8 @@ update_node (GtkUIManager *self, * tooltips on toolitems can't be set before the toolitem * is added to the toolbar. */ - g_object_get (G_OBJECT (action), "tooltip", &tooltip, NULL); - g_object_set (G_OBJECT (action), "tooltip", tooltip, NULL); + g_object_get (action, "tooltip", &tooltip, NULL); + g_object_set (action, "tooltip", tooltip, NULL); g_free (tooltip); } }