Commit 5a749ac9 authored by Darin Adler's avatar Darin Adler

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.
parent 60c93330
2001-12-06 Darin Adler <darin@bentspoon.com>
* 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.
2001-12-05 Gediminas Paulauskas <menesis@delfi.lt>
* libnautilus-private/nautilus-desktop-file-loader.c: remove
......
......@@ -459,7 +459,7 @@ bonobo_stream_vfs_new_internal (GnomeVFSHandle *handle)
CORBA_exception_init (&ev);
if (CORBA_Object_is_nil (corba_stream, &ev)){
g_object_unref (G_OBJECT (stream_vfs));
g_object_unref (stream_vfs);
CORBA_exception_free (&ev);
return NULL;
}
......
......@@ -92,8 +92,7 @@ main (int argc, char *argv[])
char *registration_id;
if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
eel_make_warnings_and_criticals_stop_in_debugger
(G_LOG_DOMAIN, g_log_domain_glib, "Gdk", "Gtk", "GnomeVFS", "GnomeUI", "Bonobo", "ORBit", NULL);
eel_make_warnings_and_criticals_stop_in_debugger ();
}
/* Disable session manager connection */
......
......@@ -157,7 +157,7 @@ nautilus_adapter_control_embed_strategy_new (Bonobo_Control control,
CORBA_Environment ev;
strategy = NAUTILUS_ADAPTER_CONTROL_EMBED_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_CONTROL_EMBED_STRATEGY, NULL));
g_object_ref (G_OBJECT (strategy));
g_object_ref (strategy);
gtk_object_sink (GTK_OBJECT (strategy));
strategy->details->control_frame = bonobo_control_frame_new (ui_container);
......
......@@ -169,7 +169,7 @@ nautilus_adapter_embeddable_embed_strategy_new (Bonobo_Embeddable embeddable,
CORBA_Environment ev;
strategy = NAUTILUS_ADAPTER_EMBEDDABLE_EMBED_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_EMBEDDABLE_EMBED_STRATEGY, NULL));
g_object_ref (G_OBJECT (strategy));
g_object_ref (strategy);
gtk_object_sink (GTK_OBJECT (strategy));
embeddable_wrapper = bonobo_object_client_from_corba
......
......@@ -169,7 +169,7 @@ nautilus_adapter_embeddable_embed_strategy_new (Bonobo_Embeddable embeddable,
CORBA_Environment ev;
strategy = NAUTILUS_ADAPTER_EMBEDDABLE_EMBED_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_EMBEDDABLE_EMBED_STRATEGY, NULL));
g_object_ref (G_OBJECT (strategy));
g_object_ref (strategy);
gtk_object_sink (GTK_OBJECT (strategy));
embeddable_wrapper = bonobo_object_client_from_corba
......
......@@ -106,7 +106,7 @@ nautilus_adapter_file_load_strategy_new (Bonobo_PersistFile persist_file)
NautilusAdapterFileLoadStrategy *strategy;
strategy = NAUTILUS_ADAPTER_FILE_LOAD_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_FILE_LOAD_STRATEGY, NULL));
g_object_ref (G_OBJECT (strategy));
g_object_ref (strategy);
gtk_object_sink (GTK_OBJECT (strategy));
strategy->details->persist_file = persist_file;
......@@ -126,7 +126,7 @@ nautilus_adapter_file_load_strategy_load_location (NautilusAdapterLoadStrategy *
strategy = NAUTILUS_ADAPTER_FILE_LOAD_STRATEGY (abstract_strategy);
g_object_ref (G_OBJECT (strategy));
g_object_ref (strategy);
CORBA_exception_init (&ev);
......@@ -148,7 +148,7 @@ nautilus_adapter_file_load_strategy_load_location (NautilusAdapterLoadStrategy *
nautilus_adapter_load_strategy_report_load_failed (abstract_strategy);
}
g_object_unref (G_OBJECT (strategy));
g_object_unref (strategy);
CORBA_exception_free (&ev);
......
......@@ -119,7 +119,7 @@ nautilus_adapter_progressive_load_strategy_new (Bonobo_ProgressiveDataSink prog
CORBA_exception_init (&ev);
strategy = NAUTILUS_ADAPTER_PROGRESSIVE_LOAD_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_PROGRESSIVE_LOAD_STRATEGY, NULL));
g_object_ref (G_OBJECT (strategy));
g_object_ref (strategy);
gtk_object_sink (GTK_OBJECT (strategy));
strategy->details->progressive_data_sink = progressive_data_sink;
......@@ -188,7 +188,7 @@ stop_loading (NautilusAdapterProgressiveLoadStrategy *strategy,
nautilus_adapter_load_strategy_report_load_complete (NAUTILUS_ADAPTER_LOAD_STRATEGY (strategy));
}
}
g_object_unref (G_OBJECT (strategy));
g_object_unref (strategy);
gnome_vfs_close (handle);
CORBA_free (iobuf);
CORBA_exception_free (ev);
......@@ -241,7 +241,7 @@ nautilus_adapter_progressive_load_strategy_load_location (NautilusAdapterLoadStr
strategy->details->no_report_stop = FALSE;
g_object_ref (G_OBJECT (strategy));
g_object_ref (strategy);
strategy->details->loading = TRUE;
strategy->details->stop = FALSE;
......@@ -256,7 +256,7 @@ nautilus_adapter_progressive_load_strategy_load_location (NautilusAdapterLoadStr
if (gnome_vfs_open (&handle, uri, GNOME_VFS_OPEN_READ) != GNOME_VFS_OK) {
nautilus_adapter_load_strategy_report_load_failed (abstract_strategy);
g_object_unref (G_OBJECT (strategy));
g_object_unref (strategy);
CORBA_exception_free (&ev);
declare_done_loading (strategy);
return;
......@@ -271,7 +271,7 @@ nautilus_adapter_progressive_load_strategy_load_location (NautilusAdapterLoadStr
if (strategy->details->stop) {
nautilus_adapter_load_strategy_report_load_complete (abstract_strategy);
g_object_unref (G_OBJECT (strategy));
g_object_unref (strategy);
CORBA_exception_free (&ev);
declare_done_loading (strategy);
return;
......@@ -312,7 +312,7 @@ nautilus_adapter_progressive_load_strategy_load_location (NautilusAdapterLoadStr
if (ev._major == CORBA_NO_EXCEPTION) {
Bonobo_ProgressiveDataSink_end (strategy->details->progressive_data_sink, &ev);
nautilus_adapter_load_strategy_report_load_complete (abstract_strategy);
g_object_unref (G_OBJECT (strategy));
g_object_unref (strategy);
gnome_vfs_close (handle);
CORBA_free (iobuf);
CORBA_exception_free (&ev);
......
......@@ -103,7 +103,7 @@ nautilus_adapter_stream_load_strategy_new (Bonobo_PersistStream persist_stream)
NautilusAdapterStreamLoadStrategy *strategy;
strategy = NAUTILUS_ADAPTER_STREAM_LOAD_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_STREAM_LOAD_STRATEGY, NULL));
g_object_ref (G_OBJECT (strategy));
g_object_ref (strategy);
gtk_object_sink (GTK_OBJECT (strategy));
strategy->details->persist_stream = persist_stream;
......@@ -121,7 +121,7 @@ nautilus_adapter_stream_load_strategy_load_location (NautilusAdapterLoadStrategy
CORBA_Environment ev;
strategy = NAUTILUS_ADAPTER_STREAM_LOAD_STRATEGY (abstract_strategy);
g_object_ref (G_OBJECT (strategy));
g_object_ref (strategy);
CORBA_exception_init (&ev);
......@@ -157,7 +157,7 @@ nautilus_adapter_stream_load_strategy_load_location (NautilusAdapterLoadStrategy
}
g_object_unref (G_OBJECT (strategy));
g_object_unref (strategy);
CORBA_exception_free (&ev);
}
......
......@@ -94,7 +94,7 @@ static void
nautilus_adapter_init (NautilusAdapter *adapter)
{
adapter->details = g_new0 (NautilusAdapterDetails, 1);
g_object_ref (G_OBJECT (adapter));
g_object_ref (adapter);
gtk_object_sink (GTK_OBJECT (adapter));
}
......@@ -120,11 +120,11 @@ nautilus_adapter_destroy (GtkObject *object)
if (adapter->details->load_strategy != NULL) {
nautilus_adapter_load_strategy_stop_loading (adapter->details->load_strategy);
g_object_unref (G_OBJECT (adapter->details->load_strategy));
g_object_unref (adapter->details->load_strategy);
}
if (adapter->details->embed_strategy != NULL) {
g_object_unref (G_OBJECT (adapter->details->embed_strategy));
g_object_unref (adapter->details->embed_strategy);
}
g_free (adapter->details);
......@@ -161,7 +161,7 @@ nautilus_adapter_new (Bonobo_Unknown component)
/* Get the class to handle embedding this kind of component. */
adapter->details->embed_strategy = nautilus_adapter_embed_strategy_get (component);
if (adapter->details->embed_strategy == NULL) {
g_object_unref (G_OBJECT (adapter));
g_object_unref (adapter);
return NULL;
}
......@@ -181,7 +181,7 @@ nautilus_adapter_new (Bonobo_Unknown component)
/* Get the class to handle loading this kind of component. */
adapter->details->load_strategy = nautilus_adapter_load_strategy_get (component);
if (adapter->details->load_strategy == NULL) {
g_object_unref (G_OBJECT (adapter));
g_object_unref (adapter);
return NULL;
}
......
......@@ -80,11 +80,8 @@ int main(int argc, char *argv[])
textdomain (PACKAGE);
#endif
/* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
* Unfortunately, this has to be done explicitly for each domain.
*/
if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
eel_make_warnings_and_criticals_stop_in_debugger ();
}
CORBA_exception_init(&ev);
......
......@@ -102,11 +102,8 @@ main (int argc, char *argv[])
textdomain (PACKAGE);
#endif
/* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
* Unfortunately, this has to be done explicitly for each domain.
*/
if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
eel_make_warnings_and_criticals_stop_in_debugger ();
}
/* Disable session manager connection */
......
......@@ -170,7 +170,7 @@ update_history (NautilusHistoryView *view,
pixbuf = bonobo_ui_util_xml_to_pixbuf (item->icon);
install_icon (list, new_row, pixbuf);
if (pixbuf != NULL) {
g_object_unref (G_OBJECT (pixbuf));
g_object_unref (pixbuf);
}
gtk_clist_columns_autosize (list);
......@@ -279,7 +279,7 @@ nautilus_history_view_instance_init (NautilusHistoryView *view)
nautilus_view_construct (NAUTILUS_VIEW (view), window);
g_object_ref (G_OBJECT (list));
g_object_ref (list);
view->list = list;
g_signal_connect (list,
......@@ -308,7 +308,7 @@ nautilus_history_view_finalize (GObject *object)
*view->external_destroyed_flag = TRUE;
}
g_object_unref (G_OBJECT (view->list));
g_object_unref (view->list);
GNOME_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
}
......@@ -322,11 +322,8 @@ nautilus_history_view_class_init (NautilusHistoryViewClass *klass)
int
main (int argc, char *argv[])
{
/* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
* Unfortunately, this has to be done explicitly for each domain.
*/
if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
eel_make_warnings_and_criticals_stop_in_debugger ();
}
return nautilus_view_standard_main ("nautilus_history-view",
......
......@@ -81,17 +81,17 @@ release_pixbuf (bonobo_object_data_t *bod)
g_return_if_fail (bod != NULL);
if (bod->pixbuf != NULL) {
g_object_unref (G_OBJECT (bod->pixbuf));
g_object_unref (bod->pixbuf);
}
bod->pixbuf = NULL;
if (bod->zoomed != NULL) {
g_object_unref (G_OBJECT (bod->zoomed));
g_object_unref (bod->zoomed);
}
bod->zoomed = NULL;
if (bod->scaled != NULL) {
g_object_unref (G_OBJECT (bod->scaled));
g_object_unref (bod->scaled);
}
bod->scaled = NULL;
}
......@@ -409,7 +409,7 @@ rezoom_control (bonobo_object_data_t *bod, float new_zoom_level)
new_height = old_height * new_zoom_level;
if (bod->zoomed)
g_object_unref (G_OBJECT (bod->zoomed));
g_object_unref (bod->zoomed);
if (new_width >= 1 && new_height >= 1) {
bod->zoomed = gdk_pixbuf_scale_simple (pixbuf, new_width,
......@@ -484,7 +484,7 @@ load_image_from_stream (BonoboPersistStream *ps, Bonobo_Stream stream,
Bonobo_Stream_read (stream, LOAD_BUFFER_SIZE, &buffer, ev);
if (ev->_major != CORBA_NO_EXCEPTION) {
gdk_pixbuf_loader_close (loader, NULL);
g_object_unref (G_OBJECT (loader));
g_object_unref (loader);
return;
}
......@@ -496,7 +496,7 @@ load_image_from_stream (BonoboPersistStream *ps, Bonobo_Stream stream,
ex_Bonobo_Persist_WrongDataType, NULL);
}
gdk_pixbuf_loader_close (loader, NULL);
g_object_unref (G_OBJECT (loader));
g_object_unref (loader);
return;
}
......@@ -509,9 +509,9 @@ load_image_from_stream (BonoboPersistStream *ps, Bonobo_Stream stream,
if (bod->pixbuf == NULL) {
CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Bonobo_Persist_WrongDataType, NULL);
g_object_unref (G_OBJECT (loader));
g_object_unref (loader);
} else {
g_object_ref (G_OBJECT (bod->pixbuf));
g_object_ref (bod->pixbuf);
/* Restore current zoomed pixbuf cache. */
if (bod->zoom_level != 1.0) {
......@@ -559,7 +559,7 @@ control_size_allocate_callback (GtkWidget *drawing_area, GtkAllocation *allocati
if (allocation->width == gdk_pixbuf_get_width (buf) &&
allocation->height == gdk_pixbuf_get_height (buf)) {
if (bod->scaled != NULL) {
g_object_unref (G_OBJECT (bod->scaled));
g_object_unref (bod->scaled);
bod->scaled = NULL;
}
return;
......@@ -572,7 +572,7 @@ control_size_allocate_callback (GtkWidget *drawing_area, GtkAllocation *allocati
return;
} else {
bod->scaled = NULL;
g_object_unref (G_OBJECT (control_buf));
g_object_unref (control_buf);
control_buf = NULL;
}
}
......@@ -852,11 +852,8 @@ main (int argc, char *argv [])
textdomain (PACKAGE);
#endif
/* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
* Unfortunately, this has to be done explicitly for each domain.
*/
if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
eel_make_warnings_and_criticals_stop_in_debugger ();
}
init_server_factory (argc, argv);
......
......@@ -224,11 +224,8 @@ main (int argc, char *argv[])
bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL);
/* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
* Unfortunately, this has to be done explicitly for each domain.
*/
if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
eel_make_warnings_and_criticals_stop_in_debugger ();
}
/* the fake_argv thing is just superstition. I just don't
......
......@@ -38,11 +38,8 @@
int
main (int argc, char *argv[])
{
/* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
* Unfortunately, this has to be done explicitly for each domain.
*/
if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
eel_make_warnings_and_criticals_stop_in_debugger ();
}
return nautilus_view_standard_main ("nautilus-music-view",
......
......@@ -1719,10 +1719,10 @@ nautilus_music_view_set_album_image (NautilusMusicView *music_view, const char *
if (pixbuf != NULL) {
scaled_pixbuf = eel_gdk_pixbuf_scale_down_to_fit (pixbuf, SCALED_IMAGE_WIDTH, SCALED_IMAGE_HEIGHT);
g_object_unref (G_OBJECT (pixbuf));
g_object_unref (pixbuf);
gdk_pixbuf_render_pixmap_and_mask (scaled_pixbuf, &pixmap, &mask, EEL_STANDARD_ALPHA_THRESHHOLD);
g_object_unref (G_OBJECT (scaled_pixbuf));
g_object_unref (scaled_pixbuf);
if (music_view->details->album_image == NULL) {
music_view->details->album_image = gtk_pixmap_new (pixmap, mask);
......
......@@ -307,11 +307,11 @@ do_destroy (GtkObject *obj, News *news)
g_free (news->uri);
if (news->font) {
g_object_unref (G_OBJECT (news->font));
g_object_unref (news->font);
}
if (news->bold_font) {
g_object_unref (G_OBJECT (news->bold_font));
g_object_unref (news->bold_font);
}
if (news->timer_task != 0) {
......@@ -325,27 +325,27 @@ do_destroy (GtkObject *obj, News *news)
}
if (news->closed_triangle != NULL) {
g_object_unref (G_OBJECT (news->closed_triangle));
g_object_unref (news->closed_triangle);
}
if (news->closed_triangle_changed != NULL) {
g_object_unref (G_OBJECT (news->closed_triangle_changed));
g_object_unref (news->closed_triangle_changed);
}
if (news->open_triangle != NULL) {
g_object_unref (G_OBJECT (news->open_triangle));
g_object_unref (news->open_triangle);
}
if (news->open_triangle_changed != NULL) {
g_object_unref (G_OBJECT (news->open_triangle_changed));
g_object_unref (news->open_triangle_changed);
}
if (news->bullet != NULL) {
g_object_unref (G_OBJECT (news->bullet));
g_object_unref (news->bullet);
}
if (news->changed_bullet != NULL) {
g_object_unref (G_OBJECT (news->changed_bullet));
g_object_unref (news->changed_bullet);
}
/* free all the channel data */
......@@ -434,7 +434,7 @@ draw_triangle (GdkPixbuf *pixbuf, RSSChannelData *channel_data, int v_offset)
pixbuf_composite (mapped_image, pixbuf, 2, triangle_position, 255);
if (mapped_image != triangle) {
g_object_unref (G_OBJECT (mapped_image));
g_object_unref (mapped_image);
}
}
......@@ -467,7 +467,7 @@ draw_rss_logo_image (RSSChannelData *channel_data,
}
pixbuf_composite (mapped_image, pixbuf, LOGO_LEFT_OFFSET, v_offset, 255);
if (mapped_image != channel_data->logo_image) {
g_object_unref (G_OBJECT (mapped_image));
g_object_unref (mapped_image);
}
}
v_offset += logo_height + 2;
......@@ -636,7 +636,7 @@ draw_rss_items (RSSChannelData *channel_data,
}
}
g_object_unref (G_OBJECT (smooth_text_layout));
g_object_unref (smooth_text_layout);
item_data->item_end_y = item_data->item_start_y + text_dimensions.height;
v_offset += text_dimensions.height + 4;
......@@ -729,7 +729,7 @@ static gint
nautilus_news_configure_event (GtkWidget *widget, GdkEventConfigure *event, News *news_data )
{
if (news_data->pixbuf != NULL) {
g_object_unref (G_OBJECT (news_data->pixbuf));
g_object_unref (news_data->pixbuf);
}
news_data->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8,
......@@ -979,7 +979,7 @@ free_channel (RSSChannelData *channel_data)
g_free (channel_data->title);
if (channel_data->logo_image != NULL) {
g_object_unref (G_OBJECT (channel_data->logo_image));
g_object_unref (channel_data->logo_image);
}
if (channel_data->load_file_handle != NULL) {
......@@ -1131,12 +1131,12 @@ rss_logo_callback (GnomeVFSResult error, GdkPixbuf *pixbuf, gpointer callback_d
channel_data->load_image_handle = NULL;
if (channel_data->logo_image) {
g_object_unref (G_OBJECT (channel_data->logo_image));
g_object_unref (channel_data->logo_image);
channel_data->logo_image = NULL;
}
if (pixbuf != NULL) {
g_object_ref (G_OBJECT (pixbuf));
g_object_ref (pixbuf);
pixbuf = eel_gdk_pixbuf_scale_down_to_fit (pixbuf, 192, 40);
channel_data->logo_image = pixbuf;
queue_update_size_and_redraw (channel_data->owner);
......@@ -1747,7 +1747,7 @@ static void
load_xpm_image (GdkPixbuf** image_result, const char** image_name)
{
if (*image_result != NULL) {
g_object_unref (G_OBJECT (*image_result));
g_object_unref (*image_result);
}
*image_result = gdk_pixbuf_new_from_xpm_data (image_name);
}
......@@ -1764,7 +1764,7 @@ nautilus_news_load_images (News *news_data)
load_xpm_image (&news_data->open_triangle_changed, (const char**) open_triangle_changed_xpm);
if (news_data->bullet != NULL) {
g_object_unref (G_OBJECT (news_data->bullet));
g_object_unref (news_data->bullet);
}
news_bullet_path = nautilus_theme_get_image_path ("news_bullet.png");
......@@ -1774,7 +1774,7 @@ nautilus_news_load_images (News *news_data)
}
if (news_data->changed_bullet != NULL) {
g_object_unref (G_OBJECT (news_data->changed_bullet));
g_object_unref (news_data->changed_bullet);
}
news_bullet_path = nautilus_theme_get_image_path ("changed_bullet.png");
......@@ -2537,12 +2537,8 @@ make_news_view (const char *iid, gpointer callback_data)
int
main(int argc, char *argv[])
{
/* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
* Unfortunately, this has to be done explicitly for each domain.
*/
if (g_getenv("NAUTILUS_DEBUG") != NULL) {
eel_make_warnings_and_criticals_stop_in_debugger
(G_LOG_DOMAIN, "Gdk", "Gtk", "GnomeVFS", "GnomeUI", "Bonobo", NULL);
if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
eel_make_warnings_and_criticals_stop_in_debugger ();
}
return nautilus_view_standard_main ("nautilus-news",
......
......@@ -429,11 +429,8 @@ make_notes_view (const char *iid, gpointer callback_data)
int
main(int argc, char *argv[])
{
/* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
* Unfortunately, this has to be done explicitly for each domain.
*/
if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
eel_make_warnings_and_criticals_stop_in_debugger ();
}
return nautilus_view_standard_main ("nautilus-notes",
......
......@@ -38,11 +38,8 @@
int
main (int argc, char *argv[])
{
/* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
* Unfortunately, this has to be done explicitly for each domain.
*/
if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
eel_make_warnings_and_criticals_stop_in_debugger ();
}
return nautilus_view_standard_main ("nautilus-text-view",
......
......@@ -72,11 +72,8 @@ main (int argc, char *argv[])
char *registration_id;
#endif
/* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
* Unfortunately, this has to be done explicitly for each domain.
*/
if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
eel_make_warnings_and_criticals_stop_in_debugger ();
}
/* Disable session manager connection */
......
......@@ -327,7 +327,7 @@ select_throbber_image (NautilusThrobber *throbber)
GList *element;
if (throbber->details->timer_task == 0) {
return g_object_ref (G_OBJECT (throbber->details->quiescent_pixbuf));
return g_object_ref (throbber->details->quiescent_pixbuf);
}
if (throbber->details->image_list == NULL) {
......@@ -336,7 +336,7 @@ select_throbber_image (NautilusThrobber *throbber)
element = g_list_nth (throbber->details->image_list, throbber->details->current_frame);
return g_object_ref (G_OBJECT (element->data));
return g_object_ref (element->data);
}
/* draw the throbber into the passed-in rectangle */
......@@ -377,7 +377,7 @@ draw_throbber_image (GtkWidget *widget, GdkRectangle *box)
} else {
massaged_pixbuf = eel_create_spotlight_pixbuf (pixbuf);
}
g_object_unref (G_OBJECT (pixbuf));
g_object_unref (pixbuf);
pixbuf = massaged_pixbuf;
}
......@@ -387,7 +387,7 @@ draw_throbber_image (GtkWidget *widget, GdkRectangle *box)
draw_pixbuf (pixbuf, widget->window, box->x + x_offset, box->y + y_offset);
g_object_unref (G_OBJECT (pixbuf));
g_object_unref (pixbuf);
}
#ifdef GNOME2_CONVERSION_COMPLETE
......@@ -504,14 +504,14 @@ nautilus_throbber_unload_images (NautilusThrobber *throbber)
GList *current_entry;
if (throbber->details->quiescent_pixbuf != NULL) {
g_object_unref (G_OBJECT (throbber->details->quiescent_pixbuf));
g_object_unref (throbber->details->quiescent_pixbuf);
throbber->details->quiescent_pixbuf = NULL;
}
/* unref all the images in the list, and then let go of the list itself */
current_entry = throbber->details->image_list;
while (current_entry != NULL) {
g_object_unref (G_OBJECT (current_entry->data));
g_object_unref (current_entry->data);
current_entry = current_entry->next;
}
......@@ -539,7 +539,7 @@ load_themed_image (const char *file_name, const char *image_theme, gboolean smal
gdk_pixbuf_get_width (pixbuf) / 2,
gdk_pixbuf_get_height (pixbuf) / 2,
GDK_INTERP_BILINEAR);
g_object_unref (G_OBJECT (pixbuf));
g_object_unref (pixbuf);
pixbuf = temp_pixbuf;
}
......
......@@ -93,7 +93,7 @@ nautilus_tree_change_queue_new (void)
NautilusTreeChangeQueue *change_queue;
change_queue = NAUTILUS_TREE_CHANGE_QUEUE (g_object_new (NAUTILUS_TYPE_TREE_CHANGE_QUEUE, NULL));
g_object_ref (G_OBJECT (change_queue));
g_object_ref (change_queue);
gtk_object_sink (GTK_OBJECT (change_queue));
return change_queue;
}
......@@ -149,7 +149,7 @@ nautilus_tree_change_new (NautilusTreeChangeType change_type,
change = g_new0 (NautilusTreeChange, 1);
change->change_type = change_type;
g_object_ref (G_OBJECT (node));
g_object_ref (node);
change->node = node;
return change;
......@@ -158,6 +158,6 @@ nautilus_tree_change_new (NautilusTreeChangeType change_type,
void
nautilus_tree_change_free (NautilusTreeChange *change)
{
g_object_unref (G_OBJECT (change->node));
g_object_unref (change->node);
g_free (change);
}
......@@ -174,7 +174,7 @@ nautilus_tree_expansion_state_new (void)
NautilusTreeExpansionState *state;
state = NAUTILUS_TREE_EXPANSION_STATE (g_object_new (NAUTILUS_TYPE_TREE_EXPANSION_STATE, NULL));
g_object_ref (G_OBJECT (state));
g_object_ref (state);
gtk_object_sink (GTK_OBJECT (state));
return state;
}
......
......@@ -205,7 +205,7 @@ nautilus_tree_model_new (const char *root_uri)
NautilusTreeModel *model;
model = NAUTILUS_TREE_MODEL (g_object_new (NAUTILUS_TYPE_TREE_MODEL, NULL));
g_object_ref (G_OBJECT (model));
g_object_ref (model);
gtk_object_sink (GTK_OBJECT (model));