diff options
author | Darin Adler <darin@src.gnome.org> | 2001-12-07 00:55:34 +0000 |
---|---|---|
committer | Darin Adler <darin@src.gnome.org> | 2001-12-07 00:55:34 +0000 |
commit | 5a749ac98270580a000c42a196b917c005d63fc8 (patch) | |
tree | e79773b2b0b0424a4cb192eb016efe6cfd28e7df /libnautilus-private | |
parent | 60c93330fba3a0bb93d7f7d09431e94209483775 (diff) | |
download | nautilus-5a749ac98270580a000c42a196b917c005d63fc8.tar.gz |
lots of files Get rid of casts in callers to g_object_ref/g_object_unref.
* lots of files
Get rid of casts in callers to g_object_ref/g_object_unref.
Remove parameters to eel_make_warnings_and_criticals_stop_in_debugger.
Diffstat (limited to 'libnautilus-private')
-rw-r--r-- | libnautilus-private/nautilus-bookmark.c | 4 | ||||
-rw-r--r-- | libnautilus-private/nautilus-customization-data.c | 10 | ||||
-rw-r--r-- | libnautilus-private/nautilus-directory.c | 6 | ||||
-rw-r--r-- | libnautilus-private/nautilus-entry.c | 2 | ||||
-rw-r--r-- | libnautilus-private/nautilus-file.c | 8 | ||||
-rw-r--r-- | libnautilus-private/nautilus-font-factory.c | 4 | ||||
-rw-r--r-- | libnautilus-private/nautilus-global-preferences.c | 2 | ||||
-rw-r--r-- | libnautilus-private/nautilus-icon-canvas-item.c | 48 | ||||
-rw-r--r-- | libnautilus-private/nautilus-icon-container.c | 14 | ||||
-rw-r--r-- | libnautilus-private/nautilus-icon-factory.c | 32 | ||||
-rw-r--r-- | libnautilus-private/nautilus-icon-text-item.c | 2 | ||||
-rw-r--r-- | libnautilus-private/nautilus-program-choosing.c | 8 | ||||
-rw-r--r-- | libnautilus-private/nautilus-theme.c | 4 | ||||
-rw-r--r-- | libnautilus-private/nautilus-thumbnails.c | 6 | ||||
-rw-r--r-- | libnautilus-private/nautilus-trash-monitor.c | 4 | ||||
-rw-r--r-- | libnautilus-private/nautilus-volume-monitor.c | 4 |
16 files changed, 79 insertions, 79 deletions
diff --git a/libnautilus-private/nautilus-bookmark.c b/libnautilus-private/nautilus-bookmark.c index 1aa0807df..287bb05f1 100644 --- a/libnautilus-private/nautilus-bookmark.c +++ b/libnautilus-private/nautilus-bookmark.c @@ -217,7 +217,7 @@ nautilus_bookmark_get_pixmap_and_mask (NautilusBookmark *bookmark, } gdk_pixbuf_render_pixmap_and_mask (pixbuf, pixmap_return, mask_return, EEL_STANDARD_ALPHA_THRESHHOLD); - g_object_unref (G_OBJECT (pixbuf)); + g_object_unref (pixbuf); return TRUE; } @@ -518,7 +518,7 @@ nautilus_bookmark_new_with_icon (const char *uri, const char *name, NautilusBookmark *new_bookmark; new_bookmark = NAUTILUS_BOOKMARK (g_object_new (NAUTILUS_TYPE_BOOKMARK, NULL)); - g_object_ref (G_OBJECT (new_bookmark)); + g_object_ref (new_bookmark); gtk_object_sink (GTK_OBJECT (new_bookmark)); new_bookmark->details->name = g_strdup (name); diff --git a/libnautilus-private/nautilus-customization-data.c b/libnautilus-private/nautilus-customization-data.c index f81986184..f0c788c38 100644 --- a/libnautilus-private/nautilus-customization-data.c +++ b/libnautilus-private/nautilus-customization-data.c @@ -219,7 +219,7 @@ nautilus_customization_data_get_next_element_for_display (NautilusCustomizationD pixbuf = eel_gdk_pixbuf_scale_down_to_fit (orig_pixbuf, data->maximum_icon_width, data->maximum_icon_height); - g_object_unref (G_OBJECT (orig_pixbuf)); + g_object_unref (orig_pixbuf); } *pixbuf_out = pixbuf; @@ -257,7 +257,7 @@ nautilus_customization_data_destroy (NautilusCustomizationData *data) data->private_file_list != NULL); if (data->pattern_frame != NULL) { - g_object_unref (G_OBJECT (data->pattern_frame)); + g_object_unref (data->pattern_frame); } gnome_vfs_file_info_list_free (data->public_file_list); @@ -372,7 +372,7 @@ add_reset_text (GdkPixbuf *pixbuf) EEL_RGBA_COLOR_OPAQUE_WHITE, EEL_OPACITY_FULLY_OPAQUE); - g_object_unref (G_OBJECT (font)); + g_object_unref (font); } /* utility to make an attractive pattern image by compositing with a frame */ @@ -397,11 +397,11 @@ nautilus_customization_make_pattern_chit (GdkPixbuf *pattern_tile, GdkPixbuf *fr if (dragging) { temp_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, frame_width - 6, frame_height - 6); gdk_pixbuf_copy_area (pixbuf, 2, 2, frame_width - 6, frame_height - 6, temp_pixbuf, 0, 0); - g_object_unref (G_OBJECT (pixbuf)); + g_object_unref (pixbuf); pixbuf = temp_pixbuf; } - g_object_unref (G_OBJECT (pattern_tile)); + g_object_unref (pattern_tile); if (is_reset) { add_reset_text (pixbuf); diff --git a/libnautilus-private/nautilus-directory.c b/libnautilus-private/nautilus-directory.c index a2f13a7ac..1b28c701d 100644 --- a/libnautilus-private/nautilus-directory.c +++ b/libnautilus-private/nautilus-directory.c @@ -146,7 +146,7 @@ nautilus_directory_ref (NautilusDirectory *directory) g_return_if_fail (NAUTILUS_IS_DIRECTORY (directory)); - g_object_ref (G_OBJECT (directory)); + g_object_ref (directory); } void @@ -158,7 +158,7 @@ nautilus_directory_unref (NautilusDirectory *directory) g_return_if_fail (NAUTILUS_IS_DIRECTORY (directory)); - g_object_unref (G_OBJECT (directory)); + g_object_unref (directory); } static void @@ -511,7 +511,7 @@ nautilus_directory_new (const char *uri) } else { directory = NAUTILUS_DIRECTORY (g_object_new (NAUTILUS_TYPE_VFS_DIRECTORY, NULL)); } - g_object_ref (G_OBJECT (directory)); + g_object_ref (directory); gtk_object_sink (GTK_OBJECT (directory)); set_directory_uri (directory, uri); diff --git a/libnautilus-private/nautilus-entry.c b/libnautilus-private/nautilus-entry.c index c6505c08f..ff3d03f2f 100644 --- a/libnautilus-private/nautilus-entry.c +++ b/libnautilus-private/nautilus-entry.c @@ -265,7 +265,7 @@ static gboolean select_all_at_idle (gpointer callback_data) { nautilus_entry_select_all (NAUTILUS_ENTRY (callback_data)); - g_object_unref (G_OBJECT (callback_data)); + g_object_unref (callback_data); return FALSE; } diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c index 2f11dde95..bc3d68c3f 100644 --- a/libnautilus-private/nautilus-file.c +++ b/libnautilus-private/nautilus-file.c @@ -160,7 +160,7 @@ nautilus_file_new_from_relative_uri (NautilusDirectory *directory, } else { file = NAUTILUS_FILE (g_object_new (NAUTILUS_TYPE_VFS_FILE, NULL)); } - g_object_ref (G_OBJECT (file)); + g_object_ref (file); gtk_object_sink (GTK_OBJECT (file)); #ifdef NAUTILUS_FILE_DEBUG_REF @@ -276,7 +276,7 @@ nautilus_file_new_from_info (NautilusDirectory *directory, eazel_dump_stack_trace ("\t", 10); #endif - g_object_ref (G_OBJECT (file)); + g_object_ref (file); gtk_object_sink (GTK_OBJECT (file)); nautilus_directory_ref (directory); @@ -469,7 +469,7 @@ nautilus_file_ref (NautilusFile *file) eazel_dump_stack_trace ("\t", 10); #endif - g_object_ref (G_OBJECT (file)); + g_object_ref (file); return file; } @@ -487,7 +487,7 @@ nautilus_file_unref (NautilusFile *file) eazel_dump_stack_trace ("\t", 10); #endif - g_object_unref (G_OBJECT (file)); + g_object_unref (file); } /** diff --git a/libnautilus-private/nautilus-font-factory.c b/libnautilus-private/nautilus-font-factory.c index ddfe27660..94cfe8504 100644 --- a/libnautilus-private/nautilus-font-factory.c +++ b/libnautilus-private/nautilus-font-factory.c @@ -77,7 +77,7 @@ EEL_CLASS_BOILERPLATE (NautilusFontFactory, static void unref_global_font_factory (void) { - g_object_unref (G_OBJECT (global_font_factory)); + g_object_unref (global_font_factory); } /* Return a pointer to the single global font factory. */ @@ -86,7 +86,7 @@ nautilus_get_current_font_factory (void) { if (global_font_factory == NULL) { global_font_factory = NAUTILUS_FONT_FACTORY (g_object_new (nautilus_font_factory_get_type (), NULL)); - g_object_ref (G_OBJECT (global_font_factory)); + g_object_ref (global_font_factory); gtk_object_sink (GTK_OBJECT (global_font_factory)); g_atexit (unref_global_font_factory); } diff --git a/libnautilus-private/nautilus-global-preferences.c b/libnautilus-private/nautilus-global-preferences.c index 22815ae4c..fe1128db1 100644 --- a/libnautilus-private/nautilus-global-preferences.c +++ b/libnautilus-private/nautilus-global-preferences.c @@ -936,7 +936,7 @@ global_preferences_get_smooth_bold_font (const char *file_name) if (bold_font == NULL) { bold_font = plain_font; } else { - g_object_unref (G_OBJECT (plain_font)); + g_object_unref (plain_font); } g_assert (EEL_IS_SCALABLE_FONT (bold_font)); diff --git a/libnautilus-private/nautilus-icon-canvas-item.c b/libnautilus-private/nautilus-icon-canvas-item.c index 16e759e14..658fee1f6 100644 --- a/libnautilus-private/nautilus-icon-canvas-item.c +++ b/libnautilus-private/nautilus-icon-canvas-item.c @@ -197,7 +197,7 @@ static EelSmoothTextLayoutCache *layout_cache; static void free_layout_cache (void) { - g_object_unref (G_OBJECT (layout_cache)); + g_object_unref (layout_cache); } /* Object initialization function for the icon item. */ @@ -230,7 +230,7 @@ nautilus_icon_canvas_item_finalize (GObject *object) details = NAUTILUS_ICON_CANVAS_ITEM (object)->details; if (details->pixbuf != NULL) { - g_object_unref (G_OBJECT (details->pixbuf)); + g_object_unref (details->pixbuf); } eel_gdk_pixbuf_list_free (details->emblem_pixbufs); g_free (details->editable_text); @@ -241,10 +241,10 @@ nautilus_icon_canvas_item_finalize (GObject *object) gdk_font_unref (details->font); } - g_object_unref (G_OBJECT (details->smooth_font)); + g_object_unref (details->smooth_font); if (details->rendered_pixbuf != NULL) { - g_object_unref (G_OBJECT (details->rendered_pixbuf)); + g_object_unref (details->rendered_pixbuf); } g_free (details); @@ -402,7 +402,7 @@ nautilus_icon_canvas_item_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) break; case ARG_SMOOTH_FONT: - g_object_ref (G_OBJECT (details->smooth_font)); + g_object_ref (details->smooth_font); GTK_VALUE_OBJECT (*arg) = GTK_OBJECT (details->smooth_font); break; @@ -443,13 +443,13 @@ nautilus_icon_canvas_item_set_image (NautilusIconCanvasItem *item, } if (image != NULL) { - g_object_ref (G_OBJECT (image)); + g_object_ref (image); } if (details->pixbuf != NULL) { - g_object_unref (G_OBJECT (details->pixbuf)); + g_object_unref (details->pixbuf); } if (details->rendered_pixbuf != NULL) { - g_object_unref (G_OBJECT (details->rendered_pixbuf)); + g_object_unref (details->rendered_pixbuf); details->rendered_pixbuf = NULL; } @@ -913,7 +913,7 @@ draw_stretch_handles (NautilusIconCanvasItem *item, GdkDrawable *drawable, draw_pixbuf (knob_pixbuf, drawable, rect->x1 - knob_width, rect->y1 - knob_height); g_free (knob_filename); - g_object_unref (G_OBJECT (knob_pixbuf)); + g_object_unref (knob_pixbuf); gdk_gc_unref (gc); } @@ -1010,7 +1010,7 @@ draw_stretch_handles_aa (NautilusIconCanvasItem *item, GnomeCanvasBuf *buf, eel_gnome_canvas_draw_pixbuf (buf, knob_pixbuf, rect->x1 - knob_width, rect->y1 - knob_height); g_free (knob_filename); - g_object_unref (G_OBJECT (knob_pixbuf)); + g_object_unref (knob_pixbuf); } static void @@ -1183,12 +1183,12 @@ real_map_pixbuf (NautilusIconCanvasItem *icon_item) temp_pixbuf = icon_item->details->pixbuf; canvas = GNOME_CANVAS_ITEM(icon_item)->canvas; - g_object_ref (G_OBJECT (temp_pixbuf)); + g_object_ref (temp_pixbuf); if (icon_item->details->is_prelit) { old_pixbuf = temp_pixbuf; temp_pixbuf = eel_create_spotlight_pixbuf (temp_pixbuf); - g_object_unref (G_OBJECT (old_pixbuf)); + g_object_unref (old_pixbuf); /* FIXME bugzilla.gnome.org 42471: This hard-wired image is inappropriate to * this level of code, which shouldn't know that the @@ -1220,7 +1220,7 @@ real_map_pixbuf (NautilusIconCanvasItem *icon_item) canvas->pixels_per_unit, GDK_INTERP_BILINEAR, 0xFF); - g_object_unref (G_OBJECT (audio_pixbuf)); + g_object_unref (audio_pixbuf); } g_free (audio_filename); @@ -1233,7 +1233,7 @@ real_map_pixbuf (NautilusIconCanvasItem *icon_item) temp_pixbuf = eel_create_darkened_pixbuf (temp_pixbuf, 0.8 * 255, 0.8 * 255); - g_object_unref (G_OBJECT (old_pixbuf)); + g_object_unref (old_pixbuf); } return temp_pixbuf; @@ -1248,7 +1248,7 @@ map_pixbuf (NautilusIconCanvasItem *icon_item) && icon_item->details->rendered_is_highlighted_for_selection == icon_item->details->is_highlighted_for_selection && icon_item->details->rendered_is_highlighted_for_drop == icon_item->details->is_highlighted_for_drop)) { if (icon_item->details->rendered_pixbuf != NULL) { - g_object_unref (G_OBJECT (icon_item->details->rendered_pixbuf)); + g_object_unref (icon_item->details->rendered_pixbuf); } icon_item->details->rendered_pixbuf = real_map_pixbuf (icon_item); icon_item->details->rendered_is_active = icon_item->details->is_active; @@ -1257,7 +1257,7 @@ map_pixbuf (NautilusIconCanvasItem *icon_item) icon_item->details->rendered_is_highlighted_for_drop = icon_item->details->is_highlighted_for_drop; } - g_object_ref (G_OBJECT (icon_item->details->rendered_pixbuf)); + g_object_ref (icon_item->details->rendered_pixbuf); return icon_item->details->rendered_pixbuf; } @@ -1291,7 +1291,7 @@ nautilus_icon_canvas_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable, /* if the pre-lit or selection flag is set, make a pre-lit or darkened pixbuf and draw that instead */ temp_pixbuf = map_pixbuf (icon_item); draw_pixbuf (temp_pixbuf, drawable, icon_rect.x0, icon_rect.y0); - g_object_unref (G_OBJECT (temp_pixbuf)); + g_object_unref (temp_pixbuf); /* Draw the emblem pixbufs. */ emblem_layout_reset (&emblem_layout, icon_item, icon_rect); @@ -1319,7 +1319,7 @@ draw_or_measure_label_text_aa (NautilusIconCanvasItem *item, GnomeCanvasItem *canvas_item; int max_text_width; int icon_width, text_left, box_left; - const EelSmoothTextLayout *smooth_text_layout; + EelSmoothTextLayout *smooth_text_layout; char **pieces; const char *text_piece; int i; @@ -1485,7 +1485,7 @@ draw_or_measure_label_text_aa (NautilusIconCanvasItem *item, width_so_far = MAX (width_so_far, (guint) eel_smooth_text_layout_get_width (smooth_text_layout)); height_so_far += eel_smooth_text_layout_get_height (smooth_text_layout) + LABEL_LINE_SPACING; - g_object_unref (G_OBJECT (smooth_text_layout)); + g_object_unref (smooth_text_layout); } g_strfreev (pieces); @@ -1620,7 +1620,7 @@ draw_label_text_aa (NautilusIconCanvasItem *icon_item, GnomeCanvasBuf *buf, int eel_gnome_canvas_draw_pixbuf (buf, text_pixbuf, x - x_delta, y + LABEL_OFFSET); - g_object_unref (G_OBJECT (text_pixbuf)); + g_object_unref (text_pixbuf); /* draw the keyboard selection focus indicator if necessary */ if (icon_item->details->is_highlighted_as_keyboard_focus) { @@ -1656,7 +1656,7 @@ nautilus_icon_canvas_item_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf) /* draw the icon */ eel_gnome_canvas_draw_pixbuf (buf, temp_pixbuf, icon_rect.x0, icon_rect.y0); - g_object_unref (G_OBJECT (temp_pixbuf)); + g_object_unref (temp_pixbuf); /* draw the emblems */ emblem_layout_reset (&emblem_layout, icon_item, icon_rect); @@ -2019,7 +2019,7 @@ hit_test_stretch_handle (NautilusIconCanvasItem *item, knob_height = gdk_pixbuf_get_height (knob_pixbuf); g_free (knob_filename); - g_object_unref (G_OBJECT (knob_pixbuf)); + g_object_unref (knob_pixbuf); /* Check for hits in the stretch handles. */ return (probe_canvas_rect.x0 < icon_rect.x0 + knob_width @@ -2102,9 +2102,9 @@ nautilus_icon_canvas_item_set_smooth_font (NautilusIconCanvasItem *icon_item, g_return_if_fail (NAUTILUS_IS_ICON_CANVAS_ITEM (icon_item)); g_return_if_fail (EEL_IS_SCALABLE_FONT (font)); - g_object_unref (G_OBJECT (icon_item->details->smooth_font)); + g_object_unref (icon_item->details->smooth_font); - g_object_ref (G_OBJECT (font)); + g_object_ref (font); icon_item->details->smooth_font = font; diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c index 0aa9bbcd6..8334e03c6 100644 --- a/libnautilus-private/nautilus-icon-container.c +++ b/libnautilus-private/nautilus-icon-container.c @@ -2338,11 +2338,11 @@ finalize (GObject *object) } if (details->smooth_label_font != NULL) { - g_object_unref (G_OBJECT (details->smooth_label_font)); + g_object_unref (details->smooth_label_font); } if (details->highlight_frame != NULL) { - g_object_unref (G_OBJECT (details->highlight_frame)); + g_object_unref (details->highlight_frame); } g_hash_table_destroy (details->icon_set); @@ -3807,7 +3807,7 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container, scaled_height = floor (height * scale_factor + .5); saved_pixbuf = pixbuf; pixbuf = gdk_pixbuf_scale_simple (pixbuf, scaled_width, scaled_height, GDK_INTERP_BILINEAR); - g_object_unref (G_OBJECT (saved_pixbuf)); + g_object_unref (saved_pixbuf); } emblem_pixbufs = NULL; @@ -3870,7 +3870,7 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container, nautilus_icon_canvas_item_set_emblems (icon->item, emblem_pixbufs); /* Let the pixbufs go. */ - g_object_unref (G_OBJECT (pixbuf)); + g_object_unref (pixbuf); eel_gdk_pixbuf_list_free (emblem_pixbufs); g_free (editable_text); @@ -5034,8 +5034,8 @@ nautilus_icon_container_set_smooth_label_font (NautilusIconContainer *container, g_return_if_fail (NAUTILUS_IS_ICON_CONTAINER (container)); g_return_if_fail (EEL_IS_SCALABLE_FONT (font)); - g_object_ref (G_OBJECT (font)); - g_object_unref (G_OBJECT (container->details->smooth_label_font)); + g_object_ref (font); + g_object_unref (container->details->smooth_label_font); container->details->smooth_label_font = font; } @@ -5159,7 +5159,7 @@ nautilus_icon_container_theme_changed (gpointer user_data) /* load the highlight frame */ text_frame_path = nautilus_theme_get_image_path ("text-selection-frame-aa.png"); if (container->details->highlight_frame != NULL) { - g_object_unref (G_OBJECT (container->details->highlight_frame)); + g_object_unref (container->details->highlight_frame); } container->details->highlight_frame = gdk_pixbuf_new_from_file (text_frame_path, NULL); diff --git a/libnautilus-private/nautilus-icon-factory.c b/libnautilus-private/nautilus-icon-factory.c index 199b410a5..c91248ec3 100644 --- a/libnautilus-private/nautilus-icon-factory.c +++ b/libnautilus-private/nautilus-icon-factory.c @@ -263,7 +263,7 @@ destroy_icon_factory (void) eel_preferences_remove_callback (NAUTILUS_PREFERENCES_IMAGE_FILE_THUMBNAIL_LIMIT, thumbnail_limit_changed_callback, NULL); - g_object_unref (G_OBJECT (global_icon_factory)); + g_object_unref (global_icon_factory); } /* Return a pointer to the single global icon factory. */ @@ -273,7 +273,7 @@ get_icon_factory (void) if (global_icon_factory == NULL) { global_icon_factory = NAUTILUS_ICON_FACTORY (g_object_new (nautilus_icon_factory_get_type (), NULL)); - g_object_ref (G_OBJECT (global_icon_factory)); + g_object_ref (global_icon_factory); gtk_object_sink (GTK_OBJECT (global_icon_factory)); icon_theme_changed_callback (NULL); @@ -341,14 +341,14 @@ load_thumbnail_frames (NautilusIconFactory *factory) image_path = nautilus_theme_get_image_path ("thumbnail_frame.png"); if (factory->thumbnail_frame != NULL) { - g_object_unref (G_OBJECT (factory->thumbnail_frame)); + g_object_unref (factory->thumbnail_frame); } factory->thumbnail_frame = gdk_pixbuf_new_from_file (image_path, NULL); g_free (image_path); image_path = nautilus_theme_get_image_path ("thumbnail_frame.aa.png"); if (factory->thumbnail_frame_aa != NULL) { - g_object_unref (G_OBJECT (factory->thumbnail_frame_aa)); + g_object_unref (factory->thumbnail_frame_aa); } factory->thumbnail_frame_aa = gdk_pixbuf_new_from_file (image_path, NULL); g_free (image_path); @@ -431,7 +431,7 @@ cache_icon_new (GdkPixbuf *pixbuf, g_assert (g_hash_table_lookup (factory->cache_icons, pixbuf) == NULL); /* Grab the pixbuf since we are keeping it. */ - g_object_ref (G_OBJECT (pixbuf)); + g_object_ref (pixbuf); #if GNOME2_CONVERSION_COMPLETE gdk_pixbuf_set_last_unref_handler (pixbuf, mark_icon_not_outstanding, NULL); @@ -528,7 +528,7 @@ cache_icon_unref (CacheIcon *icon) * and we were counting on the unref handler to catch it. */ if (!icon->outstanding) { - g_object_unref (G_OBJECT (icon->pixbuf)); + g_object_unref (icon->pixbuf); } g_free (icon); @@ -587,10 +587,10 @@ nautilus_icon_factory_destroy (GtkObject *object) g_hash_table_destroy (factory->icon_cache); if (factory->thumbnail_frame != NULL) { - g_object_unref (G_OBJECT (factory->thumbnail_frame)); + g_object_unref (factory->thumbnail_frame); } if (factory->thumbnail_frame_aa != NULL) { - g_object_unref (G_OBJECT (factory->thumbnail_frame_aa)); + g_object_unref (factory->thumbnail_frame_aa); } g_free (factory->theme.current.name); @@ -1618,7 +1618,7 @@ load_specific_icon (NautilusScalableIcon *scalable_icon, /* Since we got something, we can create a cache icon. */ icon = cache_icon_new (pixbuf, type, FALSE, &details); get_cache_time (scalable_icon->uri, &icon->cache_time); - g_object_unref (G_OBJECT (pixbuf)); + g_object_unref (pixbuf); return icon; } @@ -1753,7 +1753,7 @@ scale_icon (CacheIcon *icon, &scaled_details); scaled_icon->is_fallback = icon->is_fallback; scaled_icon->cache_time = icon->cache_time; - g_object_unref (G_OBJECT (scaled_pixbuf)); + g_object_unref (scaled_pixbuf); return scaled_icon; } @@ -2058,10 +2058,10 @@ nautilus_icon_factory_get_pixbuf_for_icon (NautilusScalableIcon *scalable_icon, if (!icon->outstanding) { icon->outstanding = TRUE; #ifndef GNOME2_CONVERSION_COMPLETE - g_object_ref (G_OBJECT (pixbuf)); + g_object_ref (pixbuf); #endif } else { - g_object_ref (G_OBJECT (pixbuf)); + g_object_ref (pixbuf); } cache_icon_unref (icon); @@ -2178,7 +2178,7 @@ nautilus_icon_factory_get_pixmap_and_mask_for_file (NautilusFile *file, return; } gdk_pixbuf_render_pixmap_and_mask (pixbuf, pixmap, mask, EEL_STANDARD_ALPHA_THRESHHOLD); - g_object_unref (G_OBJECT (pixbuf)); + g_object_unref (pixbuf); } /* Convenience routine for getting a pixbuf from an icon name. */ @@ -2252,7 +2252,7 @@ embedded_text_font_free (void) return; } - g_object_unref (G_OBJECT (embedded_text_font)); + g_object_unref (embedded_text_font); embedded_text_font = NULL; } @@ -2308,7 +2308,7 @@ embed_text (GdkPixbuf *pixbuf_without_text, EEL_RGB_COLOR_BLACK, EEL_OPACITY_FULLY_OPAQUE); - g_object_unref (G_OBJECT (smooth_text_layout)); + g_object_unref (smooth_text_layout); return pixbuf_with_text; } @@ -2352,7 +2352,7 @@ load_icon_with_embedded_text (NautilusScalableIcon *scalable_icon, &details); icon_with_text->cache_time = icon_without_text->cache_time; cache_icon_unref (icon_without_text); - g_object_unref (G_OBJECT (pixbuf_with_text)); + g_object_unref (pixbuf_with_text); return icon_with_text; } diff --git a/libnautilus-private/nautilus-icon-text-item.c b/libnautilus-private/nautilus-icon-text-item.c index 3128ec9d9..dcd49f628 100644 --- a/libnautilus-private/nautilus-icon-text-item.c +++ b/libnautilus-private/nautilus-icon-text-item.c @@ -727,7 +727,7 @@ iti_render (GnomeCanvasItem *item, GnomeCanvasBuf *buffer) /* draw the pixbuf containing the label */ draw_pixbuf_aa (text_pixbuf, buffer, affine, eel_round (item->x1), eel_round (item->y1)); - g_object_unref (G_OBJECT (text_pixbuf)); + g_object_unref (text_pixbuf); buffer->is_bg = FALSE; buffer->is_buf = TRUE; diff --git a/libnautilus-private/nautilus-program-choosing.c b/libnautilus-private/nautilus-program-choosing.c index 2574a9aa8..200a6dced 100644 --- a/libnautilus-private/nautilus-program-choosing.c +++ b/libnautilus-private/nautilus-program-choosing.c @@ -86,7 +86,7 @@ choose_application_destroy (ChooseApplicationCallbackData *choose_data) { nautilus_file_unref (choose_data->file); if (choose_data->parent_window != NULL) { - g_object_unref (G_OBJECT (choose_data->parent_window)); + g_object_unref (choose_data->parent_window); } g_free (choose_data); } @@ -120,7 +120,7 @@ choose_component_destroy (ChooseComponentCallbackData *choose_data) { nautilus_file_unref (choose_data->file); if (choose_data->parent_window != NULL) { - g_object_unref (G_OBJECT (choose_data->parent_window)); + g_object_unref (choose_data->parent_window); } g_free (choose_data); } @@ -234,7 +234,7 @@ nautilus_choose_component_for_file (NautilusFile *file, */ nautilus_file_ref (file); if (parent_window != NULL) { - g_object_ref (G_OBJECT (parent_window)); + g_object_ref (parent_window); } /* Create data to pass through. */ @@ -374,7 +374,7 @@ nautilus_choose_application_for_file (NautilusFile *file, */ nautilus_file_ref (file); if (parent_window != NULL) { - g_object_ref (G_OBJECT (parent_window)); + g_object_ref (parent_window); } /* Create data to pass through. */ diff --git a/libnautilus-private/nautilus-theme.c b/libnautilus-private/nautilus-theme.c index 73c82806a..7136187f7 100644 --- a/libnautilus-private/nautilus-theme.c +++ b/libnautilus-private/nautilus-theme.c @@ -575,7 +575,7 @@ theme_list_prepend (GList *theme_list, attributes->preview_pixbuf = eel_gdk_pixbuf_scale_down_to_fit (unscaled_preview_pixbuf, THEME_PREVIEW_ICON_WIDTH, THEME_PREVIEW_ICON_HEIGHT); - g_object_unref (G_OBJECT (unscaled_preview_pixbuf)); + g_object_unref (unscaled_preview_pixbuf); attributes->builtin = builtin; @@ -721,7 +721,7 @@ attributes_free (gpointer data, g_free (attributes->display_name); g_free (attributes->description); if (attributes->preview_pixbuf != NULL) { - g_object_unref (G_OBJECT (attributes->preview_pixbuf)); + g_object_unref (attributes->preview_pixbuf); } } diff --git a/libnautilus-private/nautilus-thumbnails.c b/libnautilus-private/nautilus-thumbnails.c index 57b2d5d4a..b0da92f2b 100644 --- a/libnautilus-private/nautilus-thumbnails.c +++ b/libnautilus-private/nautilus-thumbnails.c @@ -589,7 +589,7 @@ make_thumbnails (gpointer data) if (full_size_image != NULL) { /* scale the content image as necessary */ scaled_image = eel_gdk_pixbuf_scale_down_to_fit (full_size_image, 96, 96); - g_object_unref (G_OBJECT (full_size_image)); + g_object_unref (full_size_image); thumbnail_path = gnome_vfs_get_local_path_from_uri (new_thumbnail_uri); if (thumbnail_path == NULL @@ -597,7 +597,7 @@ make_thumbnails (gpointer data) g_warning ("error saving thumbnail %s", thumbnail_path); } g_free (thumbnail_path); - g_object_unref (G_OBJECT (scaled_image)); + g_object_unref (scaled_image); } else { /* gdk-pixbuf couldn't load the image, so trying using ImageMagick */ char *temp_str; @@ -717,6 +717,6 @@ nautilus_thumbnail_load_framed_image (const char *path, gboolean anti_aliased_fr pixbuf_with_frame = eel_embed_image_in_frame (pixbuf, frame, left_offset, top_offset, right_offset, bottom_offset); - g_object_unref (G_OBJECT (pixbuf)); + g_object_unref (pixbuf); return pixbuf_with_frame; } diff --git a/libnautilus-private/nautilus-trash-monitor.c b/libnautilus-private/nautilus-trash-monitor.c index 8317aedc3..a43c84f82 100644 --- a/libnautilus-private/nautilus-trash-monitor.c +++ b/libnautilus-private/nautilus-trash-monitor.c @@ -175,7 +175,7 @@ destroy (GtkObject *object) static void unref_trash_monitor (void) { - g_object_unref (G_OBJECT (nautilus_trash_monitor)); + g_object_unref (nautilus_trash_monitor); } NautilusTrashMonitor * @@ -191,7 +191,7 @@ nautilus_trash_monitor_get (void) nautilus_trash_monitor = NAUTILUS_TRASH_MONITOR (g_object_new (NAUTILUS_TYPE_TRASH_MONITOR, NULL)); - g_object_ref (G_OBJECT (nautilus_trash_monitor)); + g_object_ref (nautilus_trash_monitor); gtk_object_sink (GTK_OBJECT (nautilus_trash_monitor)); g_atexit (unref_trash_monitor); diff --git a/libnautilus-private/nautilus-volume-monitor.c b/libnautilus-private/nautilus-volume-monitor.c index 63bcf2211..585ff5504 100644 --- a/libnautilus-private/nautilus-volume-monitor.c +++ b/libnautilus-private/nautilus-volume-monitor.c @@ -380,7 +380,7 @@ nautilus_volume_monitor_destroy (GtkObject *object) static void unref_global_volume_monitor (void) { - g_object_unref (G_OBJECT (global_volume_monitor)); + g_object_unref (global_volume_monitor); } /* Return the global instance of the NautilusVolumeMonitor. Create one @@ -393,7 +393,7 @@ nautilus_volume_monitor_get (void) global_volume_monitor = NAUTILUS_VOLUME_MONITOR (g_object_new (nautilus_volume_monitor_get_type(), NULL)); - g_object_ref (G_OBJECT (global_volume_monitor)); + g_object_ref (global_volume_monitor); gtk_object_sink (GTK_OBJECT (global_volume_monitor)); g_atexit (unref_global_volume_monitor); } |