Fix bug 8152 (Opening Help sidebar crashes Nautilus):

* src/nautilus-sidebar.c: (notify_current_sidebar_view): Add check
	for NIL control.

	* nautilus-clean.sh: Change egrep args so we get fewer false
	positives.

	* src/nautilus-view-frame.c: (nautilus_view_frame_get_control):
	Formatting tweaks.
This commit is contained in:
Darin Adler 2001-04-25 01:08:30 +00:00
parent 103bb10562
commit 6fd84963ac
5 changed files with 33 additions and 19 deletions

View file

@ -1,3 +1,16 @@
2001-04-24 Darin Adler <darin@eazel.com>
Fix bug 8152 (Opening Help sidebar crashes Nautilus):
* src/nautilus-sidebar.c: (notify_current_sidebar_view): Add check
for NIL control.
* nautilus-clean.sh: Change egrep args so we get fewer false
positives.
* src/nautilus-view-frame.c: (nautilus_view_frame_get_control):
Formatting tweaks.
2001-04-24 Darin Adler <darin@eazel.com>
reviewed by: Maciej Stachowiak <mjs@eazel.com>

View file

@ -96,7 +96,7 @@ fi
for NAME in $AUX_PROGS; do
EGREP_PATTERN=`echo $NAME | sed -e 's/\(.\)\(.*\)/[\1]\2/' | sed -e 's/\[\\\^\]/\[\\^\]/'`
COUNT=`ps auxww | egrep $EGREP_PATTERN | grep -v emacs | grep -v egrep | wc -l`
COUNT=`ps auxww | egrep \ $EGREP_PATTERN | grep -v emacs | wc -l`
if [ $COUNT -gt 0 ]; then
if [ -z $FOUND_ANY ]; then

View file

@ -938,17 +938,18 @@ notify_current_sidebar_view (NautilusSidebar *sidebar, const char *property)
Bonobo_Control control;
GtkWidget *notebook_page;
CORBA_exception_init (&ev);
notebook_page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (sidebar->details->notebook),
sidebar->details->selected_index);
sidebar->details->selected_index);
control = nautilus_view_frame_get_control (NAUTILUS_VIEW_FRAME (notebook_page));
property_bag = Bonobo_Control_getProperties (control, &ev);
if (!BONOBO_EX (&ev) && property_bag != CORBA_OBJECT_NIL) {
bonobo_property_bag_client_set_value_gboolean (property_bag, property, TRUE, &ev);
bonobo_object_release_unref (property_bag, &ev);
if (control != CORBA_OBJECT_NIL) {
CORBA_exception_init (&ev);
property_bag = Bonobo_Control_getProperties (control, &ev);
if (!BONOBO_EX (&ev) && property_bag != CORBA_OBJECT_NIL) {
bonobo_property_bag_client_set_value_gboolean (property_bag, property, TRUE, &ev);
bonobo_object_release_unref (property_bag, NULL);
}
CORBA_exception_free (&ev);
}
CORBA_exception_free (&ev);
}
/* utility to activate the panel corresponding to the passed in index */

View file

@ -938,17 +938,18 @@ notify_current_sidebar_view (NautilusSidebar *sidebar, const char *property)
Bonobo_Control control;
GtkWidget *notebook_page;
CORBA_exception_init (&ev);
notebook_page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (sidebar->details->notebook),
sidebar->details->selected_index);
sidebar->details->selected_index);
control = nautilus_view_frame_get_control (NAUTILUS_VIEW_FRAME (notebook_page));
property_bag = Bonobo_Control_getProperties (control, &ev);
if (!BONOBO_EX (&ev) && property_bag != CORBA_OBJECT_NIL) {
bonobo_property_bag_client_set_value_gboolean (property_bag, property, TRUE, &ev);
bonobo_object_release_unref (property_bag, &ev);
if (control != CORBA_OBJECT_NIL) {
CORBA_exception_init (&ev);
property_bag = Bonobo_Control_getProperties (control, &ev);
if (!BONOBO_EX (&ev) && property_bag != CORBA_OBJECT_NIL) {
bonobo_property_bag_client_set_value_gboolean (property_bag, property, TRUE, &ev);
bonobo_object_release_unref (property_bag, NULL);
}
CORBA_exception_free (&ev);
}
CORBA_exception_free (&ev);
}
/* utility to activate the panel corresponding to the passed in index */

View file

@ -1285,9 +1285,8 @@ Bonobo_Control
nautilus_view_frame_get_control (NautilusViewFrame *view)
{
if (view->details->control_frame == NULL) {
return NULL;
return CORBA_OBJECT_NIL;
}
return bonobo_control_frame_get_control (view->details->control_frame);
}