Commit 595c8845 authored by Darin Adler's avatar Darin Adler
Browse files

Fixed to compile with latest Bonobo. Doesn't work quite as well as before

	* src/nautilus-view-frame.c:
	Fixed to compile with latest Bonobo. Doesn't work quite as well
	as before -- we get some Bonobo ref. count asserts all the time --
	but it's better than nothing I guess. Also did some other code
	cleanup.

	* libnautilus-extensions/Makefile.am:
	* libnautilus-extensions/nautilus-alloc.h: [removed]
	Removed an unused source file.

	* libnautilus-extensions/nautilus-icon-container.c: (icon_free),
	(stop_rubberbanding), (destroy), (hide_rename_widget):
	* libnautilus-extensions/nautilus-icon-dnd.c:
	(nautilus_icon_container_dropped_icon_feedback),
	(nautilus_icon_container_free_drag_data), (nautilus_icon_dnd_fini):
	* src/nautilus-property-browser.c:
	(nautilus_property_browser_drag_end):
	* src/nautilus-view-frame-nautilus-view.c: (load_location),
	(stop_loading), (selection_changed):
	* src/nautilus-view-frame.c: (nautilus_view_frame_handle_client_destroy),
	(nautilus_view_frame_load_client), (check_object),
	(nautilus_view_frame_set_active_errors):
	* src/nautilus-window-manage-views.c:
	(nautilus_window_end_location_change_callback):
	Added FIXMEs to various questionable uses of gtk_object_destroy.

	* src/Makefile.am:
	Added missing source file and replaced use of .. with $(top_srcdir).
parent e195286f
2000-07-11 Darin Adler <darin@eazel.com>
* src/nautilus-view-frame.c:
Fixed to compile with latest Bonobo. Doesn't work quite as well
as before -- we get some Bonobo ref. count asserts all the time --
but it's better than nothing I guess. Also did some other code
cleanup.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-alloc.h: [removed]
Removed an unused source file.
* libnautilus-extensions/nautilus-icon-container.c: (icon_free),
(stop_rubberbanding), (destroy), (hide_rename_widget):
* libnautilus-extensions/nautilus-icon-dnd.c:
(nautilus_icon_container_dropped_icon_feedback),
(nautilus_icon_container_free_drag_data), (nautilus_icon_dnd_fini):
* src/nautilus-property-browser.c:
(nautilus_property_browser_drag_end):
* src/nautilus-view-frame-nautilus-view.c: (load_location),
(stop_loading), (selection_changed):
* src/nautilus-view-frame.c: (nautilus_view_frame_handle_client_destroy),
(nautilus_view_frame_load_client), (check_object),
(nautilus_view_frame_set_active_errors):
* src/nautilus-window-manage-views.c:
(nautilus_window_end_location_change_callback):
Added FIXMEs to various questionable uses of gtk_object_destroy.
* src/Makefile.am:
Added missing source file and replaced use of .. with $(top_srcdir).
2000-07-11 Ramiro Estrugo <ramiro@eazel.com>
* test/Makefile.am:
......@@ -38,14 +69,12 @@
2000-07-10 J Shane Culpepper <pepper@eazel.com>
*
components/services/install/nautilus-view/nautilus-service-install-
view.c: (generate_install_form), (generate_current_progress),
* components/services/install/nautilus-view/nautilus-service-install-view.c:
(generate_install_form), (generate_current_progress),
(go_to_uri), (nautilus_service_install_view_update_from_uri):
* components/services/login/nautilus-view/nautilus-login-view.c:
*
components/services/startup/nautilus-view/nautilus-service-startup-
view.c: (generate_startup_form):
* components/services/startup/nautilus-view/nautilus-service-startup-view.c:
(generate_startup_form):
Fixed the startup view progress meter. Various changes to get flow
correct for the first cut at the services demo rpms.
......@@ -66,11 +95,9 @@
* components/services/trilobite/helper/eazel-helper.c:
(do_command), (main):
*
components/services/trilobite/libtrilobite/trilobite-root-helper.c:
* components/services/trilobite/libtrilobite/trilobite-root-helper.c:
(trilobite_root_helper_run_program), (trilobite_root_helper_run):
*
components/services/trilobite/libtrilobite/trilobite-root-helper.h:
* components/services/trilobite/libtrilobite/trilobite-root-helper.h:
Add _RUN_LS command to TrilobiteRootHelper and eazel-helper, for
Eskil to use for testing.
......@@ -104,12 +131,10 @@
2000-07-10 Robey Pointer <robey@eazel.com>
* components/services/trilobite/helper/eazel-helper.c: (main):
*
components/services/trilobite/libtrilobite/trilobite-root-helper.c:
* components/services/trilobite/libtrilobite/trilobite-root-helper.c:
(trilobite_root_helper_start), (trilobite_root_helper_rpm),
(trilobite_root_helper_set_time), (trilobite_root_helper_run):
*
components/services/trilobite/libtrilobite/trilobite-root-helper.h:
* components/services/trilobite/libtrilobite/trilobite-root-helper.h:
Make sure TrilobiteRootHelper can be restarted after each use
(same object, new session). Add _set_time function.
......@@ -169,8 +194,7 @@
* components/services/docs/installer-rpmsearch:
text file on how the rpmsearch.cgi should work.
*
components/services/install/command-line/eazel-alt-install-corba.c:
* components/services/install/command-line/eazel-alt-install-corba.c:
(set_parameters_from_command_line),
(eazel_download_progress_signal), (eazel_install_progress_signal),
(install_failed), (create_package), (done):
......
......@@ -102,7 +102,6 @@ libnautilus_extensions_la_SOURCES = \
# Everything is private for now
noinst_HEADERS = \
bonobo-stream-vfs.h \
nautilus-alloc.h \
nautilus-background-canvas-group.h \
nautilus-background.h \
nautilus-bonobo-extensions.h \
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
Nautilus extensions to things like malloc and alloca.
Copyright (C) 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Darin Adler <darin@eazel.com>
*/
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif
#ifndef g_alloca
#define g_alloca alloca
#endif
......@@ -138,6 +138,7 @@ static char stipple_bits[] = { 0x02, 0x01 };
static void
icon_free (NautilusIcon *icon)
{
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (icon->item));
g_free (icon);
}
......@@ -958,6 +959,7 @@ stop_rubberbanding (NautilusIconContainer *container,
band_info->active = FALSE;
gnome_canvas_item_ungrab (band_info->selection_rectangle, event->time);
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (band_info->selection_rectangle));
band_info->selection_rectangle = NULL;
}
......@@ -1630,6 +1632,7 @@ destroy (GtkObject *object)
gtk_timeout_remove (container->details->rubberband_info.timer_id);
}
if (container->details->rubberband_info.selection_rectangle != NULL) {
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (container->details->rubberband_info.selection_rectangle));
}
......@@ -3622,6 +3625,7 @@ hide_rename_widget (NautilusIconContainer *container, NautilusIcon *icon)
nautilus_icon_text_item_stop_editing (container->details->rename_widget, TRUE);
/* Destroy renaming widget */
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (container->details->rename_widget));
container->details->rename_widget = NULL;
......
......@@ -329,6 +329,7 @@ nautilus_icon_container_dropped_icon_feedback (GtkWidget *widget,
/* Delete old shadow if any. */
if (dnd_info->shadow != NULL) {
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (dnd_info->shadow));
}
......@@ -1002,6 +1003,7 @@ nautilus_icon_container_free_drag_data (NautilusIconContainer *container)
dnd_info->drag_info.got_drop_data_type = FALSE;
if (dnd_info->shadow != NULL) {
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (dnd_info->shadow));
dnd_info->shadow = NULL;
}
......@@ -1077,8 +1079,10 @@ nautilus_icon_dnd_fini (NautilusIconContainer *container)
g_return_if_fail (container->details->dnd_info != NULL);
stop_auto_scroll (container);
if (container->details->dnd_info->shadow != NULL)
if (container->details->dnd_info->shadow != NULL) {
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (container->details->dnd_info->shadow));
}
nautilus_drag_finalize (&container->details->dnd_info->drag_info);
}
......
......@@ -102,7 +102,6 @@ libnautilus_extensions_la_SOURCES = \
# Everything is private for now
noinst_HEADERS = \
bonobo-stream-vfs.h \
nautilus-alloc.h \
nautilus-background-canvas-group.h \
nautilus-background.h \
nautilus-bonobo-extensions.h \
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
Nautilus extensions to things like malloc and alloca.
Copyright (C) 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Darin Adler <darin@eazel.com>
*/
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif
#ifndef g_alloca
#define g_alloca alloca
#endif
......@@ -138,6 +138,7 @@ static char stipple_bits[] = { 0x02, 0x01 };
static void
icon_free (NautilusIcon *icon)
{
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (icon->item));
g_free (icon);
}
......@@ -958,6 +959,7 @@ stop_rubberbanding (NautilusIconContainer *container,
band_info->active = FALSE;
gnome_canvas_item_ungrab (band_info->selection_rectangle, event->time);
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (band_info->selection_rectangle));
band_info->selection_rectangle = NULL;
}
......@@ -1630,6 +1632,7 @@ destroy (GtkObject *object)
gtk_timeout_remove (container->details->rubberband_info.timer_id);
}
if (container->details->rubberband_info.selection_rectangle != NULL) {
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (container->details->rubberband_info.selection_rectangle));
}
......@@ -3622,6 +3625,7 @@ hide_rename_widget (NautilusIconContainer *container, NautilusIcon *icon)
nautilus_icon_text_item_stop_editing (container->details->rename_widget, TRUE);
/* Destroy renaming widget */
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (container->details->rename_widget));
container->details->rename_widget = NULL;
......
......@@ -329,6 +329,7 @@ nautilus_icon_container_dropped_icon_feedback (GtkWidget *widget,
/* Delete old shadow if any. */
if (dnd_info->shadow != NULL) {
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (dnd_info->shadow));
}
......@@ -1002,6 +1003,7 @@ nautilus_icon_container_free_drag_data (NautilusIconContainer *container)
dnd_info->drag_info.got_drop_data_type = FALSE;
if (dnd_info->shadow != NULL) {
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (dnd_info->shadow));
dnd_info->shadow = NULL;
}
......@@ -1077,8 +1079,10 @@ nautilus_icon_dnd_fini (NautilusIconContainer *container)
g_return_if_fail (container->details->dnd_info != NULL);
stop_auto_scroll (container);
if (container->details->dnd_info->shadow != NULL)
if (container->details->dnd_info->shadow != NULL) {
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (container->details->dnd_info->shadow));
}
nautilus_drag_finalize (&container->details->dnd_info->drag_info);
}
......
......@@ -53,6 +53,7 @@ noinst_HEADERS = \
nautilus-complex-search-bar.h \
nautilus-desktop-window.h \
nautilus-first-time-druid.h \
nautilus-history-frame.h \
nautilus-link-set-window.h \
nautilus-location-bar.h \
nautilus-navigation-bar.h \
......@@ -119,7 +120,7 @@ nautilus_SOURCES = \
$(NULL)
$(nautilus_shell_interface_idl_sources): nautilus_shell_interface_idl_stamp
nautilus_shell_interface_idl_stamp: nautilus-shell-interface.idl ../libnautilus/nautilus-view-component.idl
nautilus_shell_interface_idl_stamp: nautilus-shell-interface.idl $(top_srcdir)/libnautilus/nautilus-view-component.idl
$(ORBIT_IDL) $(IDL_CFLAGS) -I.. nautilus-shell-interface.idl
touch nautilus_shell_interface_idl_stamp
......
......@@ -422,8 +422,10 @@ static void
nautilus_property_browser_drag_end (GtkWidget *widget, GdkDragContext *context)
{
NautilusPropertyBrowser *property_browser = NAUTILUS_PROPERTY_BROWSER(widget);
if (!property_browser->details->keep_around)
if (!property_browser->details->keep_around) {
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (widget));
}
}
/* utility routine to check if the passed-in uri is an image file */
......
......@@ -87,6 +87,7 @@ load_location(NautilusViewFrame *view, Nautilus_URI location, CORBA_Environment
Nautilus_View_load_location(nvi->view_client, location, ev);
if(ev->_major != CORBA_NO_EXCEPTION)
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy(GTK_OBJECT(view));
}
......@@ -98,6 +99,7 @@ stop_loading(NautilusViewFrame *view, CORBA_Environment *ev)
Nautilus_View_stop_loading(nvi->view_client, ev);
if(ev->_major != CORBA_NO_EXCEPTION)
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy(GTK_OBJECT(view));
}
......@@ -109,6 +111,7 @@ selection_changed(NautilusViewFrame *view, const Nautilus_URIList *selection, CO
Nautilus_View_selection_changed(nvi->view_client, selection, ev);
if(ev->_major != CORBA_NO_EXCEPTION)
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy(GTK_OBJECT(view));
}
......
......@@ -41,6 +41,9 @@
#include <libnautilus/nautilus-view.h>
#include <libnautilus/nautilus-zoomable.h>
/* FIXME bugzilla.eazel.com 917: This should be removed. See below. */
void bonobo_object_destroy (BonoboObject *object);
enum {
OPEN_LOCATION,
OPEN_LOCATION_IN_NEW_WINDOW,
......@@ -197,11 +200,11 @@ nautilus_view_frame_destroy_client (NautilusViewFrame *view)
CORBA_Environment ev;
CORBA_exception_init(&ev);
if (view->component_class == 0) {
if (view->component_class == NULL) {
return;
}
g_free(view->iid);
g_free (view->iid);
view->iid = NULL;
bonobo_object_unref (BONOBO_OBJECT (view->client_object));
......@@ -213,19 +216,20 @@ nautilus_view_frame_destroy_client (NautilusViewFrame *view)
if (!CORBA_Object_is_nil (view->zoomable, &ev)) {
Bonobo_Unknown_unref (view->zoomable, &ev);
CORBA_Object_release (view->zoomable, &ev);
view->zoomable = CORBA_OBJECT_NIL;
}
view->zoomable = CORBA_OBJECT_NIL;
if (view->component_class->destroy != NULL) {
view->component_class->destroy (view, &ev);
}
/* FIXME bugzilla.eazel.com 917: This should be bonobo_object_unref,
* but there is a circular reference between Bonobo_Control and
* Bonobo_ControlFrame that prevents it from working. Once that's
* fixed, we'd really like to change it to unref instead of destroy.
/* FIXME bugzilla.eazel.com 917: This should be removed, but
* there is a circular reference between Bonobo_Control and
* Bonobo_ControlFrame that prevents it from working. Once
* that's fixed, we'd really like to remove it.
*/
bonobo_object_destroy (view->view_frame);
view->view_frame = NULL;
view->component_class = NULL;
......@@ -241,7 +245,7 @@ nautilus_view_frame_destroy (GtkObject *object)
frame = NAUTILUS_VIEW_FRAME (object);
if(frame->timer_id != 0) {
if (frame->timer_id != 0) {
g_source_remove (frame->timer_id);
frame->timer_id = 0;
}
......@@ -255,11 +259,11 @@ extern NautilusViewComponentType nautilus_view_component_type; /* ntl-view-nauti
extern NautilusViewComponentType bonobo_subdoc_component_type; /* ntl-view-bonobo-subdoc.c */
extern NautilusViewComponentType bonobo_control_component_type; /* ntl-view-bonobo-control.c */
static gboolean
static void
nautilus_view_frame_handle_client_destroy (GtkWidget *widget, NautilusViewFrame *view)
{
gtk_object_destroy (GTK_OBJECT(view));
return TRUE;
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (view));
}
static void
......@@ -289,7 +293,6 @@ gboolean /* returns TRUE if successful */
nautilus_view_frame_load_client (NautilusViewFrame *view, const char *iid)
{
CORBA_Object obj;
CORBA_Object zoomable;
CORBA_Environment ev;
int i;
......@@ -302,12 +305,12 @@ nautilus_view_frame_load_client (NautilusViewFrame *view, const char *iid)
g_return_val_if_fail (NAUTILUS_IS_VIEW_FRAME (view), FALSE);
nautilus_view_frame_destroy_client (view);
if (iid == NULL) {
return FALSE;
}
nautilus_view_frame_destroy_client (view);
view->client_object = bonobo_object_activate (iid, 0);
if (view->client_object == NULL) {
return FALSE;
......@@ -315,66 +318,73 @@ nautilus_view_frame_load_client (NautilusViewFrame *view, const char *iid)
CORBA_exception_init (&ev);
/* Start with a view frame interface. */
view->view_frame = impl_Nautilus_ViewFrame__create(view, &ev);
/* Add a zoomable frame interface. */
view->zoomable_frame = impl_Nautilus_ZoomableFrame__create(view, &ev);
bonobo_object_add_interface (BONOBO_OBJECT (view->view_frame),
BONOBO_OBJECT (view->zoomable_frame));
/* Add a history frame interface. */
view->history_frame = impl_Nautilus_HistoryFrame__create(view, &ev);
bonobo_object_add_interface (BONOBO_OBJECT (view->view_frame),
BONOBO_OBJECT (view->history_frame));
/* Add undo manager to component */
/* Add an undo context interface. */
nautilus_undo_manager_add_interface
(view->undo_manager, BONOBO_OBJECT (view->view_frame));
/* Now figure out which type of embedded object it is: */
for(i = 0; component_types[i] && !view->component_class; i++) {
obj = Bonobo_Unknown_query_interface (bonobo_object_corba_objref(BONOBO_OBJECT(view->client_object)),
component_types[i]->primary_repoid, &ev);
/* Get at our client's zoomable interface. */
view->zoomable = bonobo_object_query_interface
(BONOBO_OBJECT (view->client_object),
"IDL:Nautilus/Zoomable:1.0");
/* Now figure out which type of embedded object we have so we
* can host it appropriately:
*/
for (i = 0; component_types[i] != NULL && view->component_class == NULL; i++) {
obj = Bonobo_Unknown_query_interface
(bonobo_object_corba_objref (BONOBO_OBJECT (view->client_object)),
component_types[i]->primary_repoid, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
obj = CORBA_OBJECT_NIL;
}
if (CORBA_Object_is_nil(obj, &ev)) {
if (CORBA_Object_is_nil (obj, &ev)) {
continue;
}
zoomable = bonobo_object_query_interface (BONOBO_OBJECT (view->client_object),
"IDL:Nautilus/Zoomable:1.0");
view->zoomable = zoomable;
if(component_types[i]->try_load(view, obj, &ev))
if (component_types[i]->try_load (view, obj, &ev)) {
view->component_class = component_types[i];
Bonobo_Unknown_unref(obj, &ev);
CORBA_Object_release(obj, &ev);
if (view->component_class) {
break;
}
Bonobo_Unknown_unref (obj, &ev);
CORBA_Object_release (obj, &ev);
}
if (!view->component_class) {
/* Nothing matched */
nautilus_view_frame_destroy_client(view);
/* Handle case where we don't know how to host this component. */
if (view->component_class == NULL) {
nautilus_view_frame_destroy_client (view);
return FALSE;
}
view->iid = g_strdup(iid);
gtk_signal_connect_while_alive (GTK_OBJECT (view->client_object), "destroy",
GTK_SIGNAL_FUNC (nautilus_view_frame_handle_client_destroy), view,
GTK_OBJECT (view));
gtk_signal_connect_while_alive (GTK_OBJECT (view->client_object), "object_gone",
GTK_SIGNAL_FUNC (nautilus_view_frame_handle_client_destroy_2), view,
GTK_OBJECT (view));
gtk_signal_connect_while_alive (GTK_OBJECT (view->client_object), "system_exception",
GTK_SIGNAL_FUNC (nautilus_view_frame_handle_client_destroy_2), view,
GTK_OBJECT (view));
view->iid = g_strdup (iid);
gtk_signal_connect_while_alive
(GTK_OBJECT (view->client_object), "destroy",
GTK_SIGNAL_FUNC (nautilus_view_frame_handle_client_destroy), view,
GTK_OBJECT (view));
gtk_signal_connect_while_alive
(GTK_OBJECT (view->client_object), "object_gone",
GTK_SIGNAL_FUNC (nautilus_view_frame_handle_client_destroy_2), view,
GTK_OBJECT (view));
gtk_signal_connect_while_alive
(GTK_OBJECT (view->client_object), "system_exception",
GTK_SIGNAL_FUNC (nautilus_view_frame_handle_client_destroy_2), view,
GTK_OBJECT (view));
gtk_container_add (GTK_CONTAINER (view), view->client_widget);
gtk_widget_show(view->client_widget);
CORBA_exception_free(&ev);
gtk_widget_show (view->client_widget);
CORBA_exception_free (&ev);
return TRUE;
}
......@@ -579,7 +589,6 @@ nautilus_view_frame_zoom_in (NautilusViewFrame *view)
CORBA_exception_free (&ev);
}
void
nautilus_view_frame_zoom_out (NautilusViewFrame *view)
{
......@@ -616,7 +625,6 @@ nautilus_view_frame_zoom_to_fit (NautilusViewFrame *view)
CORBA_exception_free (&ev);
}
const char *
nautilus_view_frame_get_iid(NautilusViewFrame *view)
{
......@@ -733,16 +741,18 @@ check_object (gpointer data)
view = NAUTILUS_VIEW_FRAME (data);
g_assert (!view->checking);
CORBA_exception_init(&ev);
CORBA_exception_init (&ev);
view->checking++;
ok = TRUE;
if (CORBA_Object_non_existent (bonobo_object_corba_objref (BONOBO_OBJECT (view->client_object)), &ev)) {
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (view));
view->timer_id = 0;
gtk_object_destroy(GTK_OBJECT(view));
ok = FALSE;
}
view->checking--;
CORBA_exception_free(&ev);
CORBA_exception_free (&ev);
return ok;
}
......@@ -751,14 +761,14 @@ void
nautilus_view_frame_set_active_errors (NautilusViewFrame *view, gboolean enabled)
{
g_return_if_fail (NAUTILUS_IS_VIEW_FRAME (view));
if(enabled) {
if(view->timer_id == 0) {
/* FIXME: hard-coded 2 seconds? */
if (enabled) {
if (view->timer_id == 0) {
/* FIXME: Is a hard-coded 2-second timeout acceptable? */
view->timer_id = g_timeout_add (2000, check_object, view);
}
} else {
if(view->timer_id != 0) {
g_source_remove(view->timer_id);
if (view->timer_id != 0) {
g_source_remove (view->timer_id);
view->timer_id = 0;
}
}
......
......@@ -1259,6 +1259,7 @@ nautilus_window_end_location_change_callback (NautilusNavigationResult result_co
/* Destroy never-had-a-chance-to-be-seen window. This case
* happens when a new window cannot display its initial URI.
*/
/* FIXME: Is a destroy really sufficient here? Who does the unref? */
gtk_object_destroy (GTK_OBJECT (window));
nautilus_error_dialog (error_message, NULL);
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment