diff options
author | Andy Hertzfeld <andy@src.gnome.org> | 2001-01-18 19:46:08 +0000 |
---|---|---|
committer | Andy Hertzfeld <andy@src.gnome.org> | 2001-01-18 19:46:08 +0000 |
commit | 252f7dcd95c50cd97624b63d7949f8bf2388be08 (patch) | |
tree | 523315f41d352b302b15b8e82d5f2a990f5b540a /src | |
parent | e82bab8c493c3d173622c18e5df07e3f36d982ea (diff) | |
download | nautilus-252f7dcd95c50cd97624b63d7949f8bf2388be08.tar.gz |
backed out the Bonobo component throbber temporarily due to Bonobo
backed out the Bonobo component throbber temporarily due
to Bonobo problems and restored the old one; hopefully, the
new one will come back soon.
* src/Makefile.am:
* src/nautilus-window-toolbars.c:
(nautilus_window_initialize_toolbars):
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_destroy), (nautilus_window_allow_stop):
* src/nautilus-window.h:
fixed bug 5393, custom emblems arent scaling properly, by
* libnautilus-extensions/nautilus-icon-container.c:
(nautilus_icon_container_update_icon):
* libnautilus-extensions/nautilus-icon-factory.c:
(get_themed_icon_file_path), (load_pixbuf_svg),
(load_specific_icon):
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/nautilus-navigation-window.c | 27 | ||||
-rw-r--r-- | src/nautilus-navigation-window.h | 3 | ||||
-rw-r--r-- | src/nautilus-object-window.c | 27 | ||||
-rw-r--r-- | src/nautilus-object-window.h | 3 | ||||
-rw-r--r-- | src/nautilus-spatial-window.c | 27 | ||||
-rw-r--r-- | src/nautilus-spatial-window.h | 3 | ||||
-rw-r--r-- | src/nautilus-window-toolbars.c | 18 | ||||
-rw-r--r-- | src/nautilus-window.c | 27 | ||||
-rw-r--r-- | src/nautilus-window.h | 3 |
10 files changed, 119 insertions, 21 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 30e18c842..7eecf6c20 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -83,6 +83,7 @@ noinst_HEADERS = \ nautilus-switchable-navigation-bar.h \ nautilus-switchable-search-bar.h \ nautilus-theme-selector.h \ + nautilus-throbber.h \ nautilus-view-frame-private.h \ nautilus-view-frame.h \ nautilus-window-manage-views.h \ @@ -122,6 +123,7 @@ nautilus_SOURCES = \ nautilus-switchable-navigation-bar.c \ nautilus-switchable-search-bar.c \ nautilus-theme-selector.c \ + nautilus-throbber.c \ nautilus-view-frame-corba.c \ nautilus-view-frame.c \ nautilus-window-manage-views.c \ diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c index 43caad58c..0f851c53b 100644 --- a/src/nautilus-navigation-window.c +++ b/src/nautilus-navigation-window.c @@ -36,6 +36,7 @@ #include "nautilus-sidebar.h" #include "nautilus-signaller.h" #include "nautilus-switchable-navigation-bar.h" +#include "nautilus-throbber.h" #include "nautilus-window-manage-views.h" #include "nautilus-window-service-ui.h" #include "nautilus-zoom-control.h" @@ -389,6 +390,7 @@ menu_bar_no_resize_hack (NautilusWindow *window) } /* handle bonobo events from the throbber */ +/* static void throbber_location_changed_callback (BonoboListener *listener, char *event_name, @@ -402,6 +404,7 @@ throbber_location_changed_callback (BonoboListener *listener, location = BONOBO_ARG_GET_STRING (arg); nautilus_window_goto_uri (window, location); } +*/ static void nautilus_window_constructed (NautilusWindow *window) @@ -550,6 +553,11 @@ nautilus_window_constructed (NautilusWindow *window) nautilus_window_initialize_toolbars (window); /* watch for throbber location changes, too */ + /* watch for throbber location changes, too */ + gtk_signal_connect (GTK_OBJECT (window->throbber), "location_changed", + goto_uri_callback, window); + + /* if (window->throbber != NULL) { CORBA_Environment ev; Bonobo_PropertyBag property_bag; @@ -564,6 +572,7 @@ nautilus_window_constructed (NautilusWindow *window) } CORBA_exception_free (&ev); } + */ /* Set initial sensitivity of some buttons & menu items * now that they're all created. @@ -689,6 +698,7 @@ nautilus_window_destroy (GtkObject *object) } /* get rid of the CORBA objects */ + /* if (window->throbber != NULL) { CORBA_Environment ev; Bonobo_PropertyBag property_bag; @@ -704,7 +714,7 @@ nautilus_window_destroy (GtkObject *object) bonobo_object_release_unref (window->throbber, &ev); CORBA_exception_free (&ev); } - + */ g_free (window->details); NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (GTK_OBJECT (window))); @@ -1343,13 +1353,16 @@ nautilus_window_allow_reload (NautilusWindow *window, gboolean allow) void nautilus_window_allow_stop (NautilusWindow *window, gboolean allow) { + /* CORBA_Environment ev; Bonobo_PropertyBag property_bag; - + */ + nautilus_bonobo_set_sensitive (window->details->shell_ui, NAUTILUS_COMMAND_STOP, allow); - + if (window->throbber != NULL) { + /* CORBA_exception_init (&ev); property_bag = Bonobo_Control_getProperties (window->throbber, &ev); @@ -1358,7 +1371,13 @@ nautilus_window_allow_stop (NautilusWindow *window, gboolean allow) bonobo_object_release_unref (property_bag, &ev); } CORBA_exception_free (&ev); - + */ + if (allow) { + nautilus_throbber_start (NAUTILUS_THROBBER (window->throbber)); + } else { + nautilus_throbber_stop (NAUTILUS_THROBBER (window->throbber)); + } + } } diff --git a/src/nautilus-navigation-window.h b/src/nautilus-navigation-window.h index ed9b189b2..3a2fb07ba 100644 --- a/src/nautilus-navigation-window.h +++ b/src/nautilus-navigation-window.h @@ -100,7 +100,8 @@ struct NautilusWindow { /* Widgets to keep track of (for state changes, etc) */ GtkWidget *zoom_control; - Bonobo_Unknown throbber; + /* Bonobo_Unknown throbber; */ + GtkWidget *throbber; /* Pending changes */ NautilusNavigationInfo *pending_ni; diff --git a/src/nautilus-object-window.c b/src/nautilus-object-window.c index 43caad58c..0f851c53b 100644 --- a/src/nautilus-object-window.c +++ b/src/nautilus-object-window.c @@ -36,6 +36,7 @@ #include "nautilus-sidebar.h" #include "nautilus-signaller.h" #include "nautilus-switchable-navigation-bar.h" +#include "nautilus-throbber.h" #include "nautilus-window-manage-views.h" #include "nautilus-window-service-ui.h" #include "nautilus-zoom-control.h" @@ -389,6 +390,7 @@ menu_bar_no_resize_hack (NautilusWindow *window) } /* handle bonobo events from the throbber */ +/* static void throbber_location_changed_callback (BonoboListener *listener, char *event_name, @@ -402,6 +404,7 @@ throbber_location_changed_callback (BonoboListener *listener, location = BONOBO_ARG_GET_STRING (arg); nautilus_window_goto_uri (window, location); } +*/ static void nautilus_window_constructed (NautilusWindow *window) @@ -550,6 +553,11 @@ nautilus_window_constructed (NautilusWindow *window) nautilus_window_initialize_toolbars (window); /* watch for throbber location changes, too */ + /* watch for throbber location changes, too */ + gtk_signal_connect (GTK_OBJECT (window->throbber), "location_changed", + goto_uri_callback, window); + + /* if (window->throbber != NULL) { CORBA_Environment ev; Bonobo_PropertyBag property_bag; @@ -564,6 +572,7 @@ nautilus_window_constructed (NautilusWindow *window) } CORBA_exception_free (&ev); } + */ /* Set initial sensitivity of some buttons & menu items * now that they're all created. @@ -689,6 +698,7 @@ nautilus_window_destroy (GtkObject *object) } /* get rid of the CORBA objects */ + /* if (window->throbber != NULL) { CORBA_Environment ev; Bonobo_PropertyBag property_bag; @@ -704,7 +714,7 @@ nautilus_window_destroy (GtkObject *object) bonobo_object_release_unref (window->throbber, &ev); CORBA_exception_free (&ev); } - + */ g_free (window->details); NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (GTK_OBJECT (window))); @@ -1343,13 +1353,16 @@ nautilus_window_allow_reload (NautilusWindow *window, gboolean allow) void nautilus_window_allow_stop (NautilusWindow *window, gboolean allow) { + /* CORBA_Environment ev; Bonobo_PropertyBag property_bag; - + */ + nautilus_bonobo_set_sensitive (window->details->shell_ui, NAUTILUS_COMMAND_STOP, allow); - + if (window->throbber != NULL) { + /* CORBA_exception_init (&ev); property_bag = Bonobo_Control_getProperties (window->throbber, &ev); @@ -1358,7 +1371,13 @@ nautilus_window_allow_stop (NautilusWindow *window, gboolean allow) bonobo_object_release_unref (property_bag, &ev); } CORBA_exception_free (&ev); - + */ + if (allow) { + nautilus_throbber_start (NAUTILUS_THROBBER (window->throbber)); + } else { + nautilus_throbber_stop (NAUTILUS_THROBBER (window->throbber)); + } + } } diff --git a/src/nautilus-object-window.h b/src/nautilus-object-window.h index ed9b189b2..3a2fb07ba 100644 --- a/src/nautilus-object-window.h +++ b/src/nautilus-object-window.h @@ -100,7 +100,8 @@ struct NautilusWindow { /* Widgets to keep track of (for state changes, etc) */ GtkWidget *zoom_control; - Bonobo_Unknown throbber; + /* Bonobo_Unknown throbber; */ + GtkWidget *throbber; /* Pending changes */ NautilusNavigationInfo *pending_ni; diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c index 43caad58c..0f851c53b 100644 --- a/src/nautilus-spatial-window.c +++ b/src/nautilus-spatial-window.c @@ -36,6 +36,7 @@ #include "nautilus-sidebar.h" #include "nautilus-signaller.h" #include "nautilus-switchable-navigation-bar.h" +#include "nautilus-throbber.h" #include "nautilus-window-manage-views.h" #include "nautilus-window-service-ui.h" #include "nautilus-zoom-control.h" @@ -389,6 +390,7 @@ menu_bar_no_resize_hack (NautilusWindow *window) } /* handle bonobo events from the throbber */ +/* static void throbber_location_changed_callback (BonoboListener *listener, char *event_name, @@ -402,6 +404,7 @@ throbber_location_changed_callback (BonoboListener *listener, location = BONOBO_ARG_GET_STRING (arg); nautilus_window_goto_uri (window, location); } +*/ static void nautilus_window_constructed (NautilusWindow *window) @@ -550,6 +553,11 @@ nautilus_window_constructed (NautilusWindow *window) nautilus_window_initialize_toolbars (window); /* watch for throbber location changes, too */ + /* watch for throbber location changes, too */ + gtk_signal_connect (GTK_OBJECT (window->throbber), "location_changed", + goto_uri_callback, window); + + /* if (window->throbber != NULL) { CORBA_Environment ev; Bonobo_PropertyBag property_bag; @@ -564,6 +572,7 @@ nautilus_window_constructed (NautilusWindow *window) } CORBA_exception_free (&ev); } + */ /* Set initial sensitivity of some buttons & menu items * now that they're all created. @@ -689,6 +698,7 @@ nautilus_window_destroy (GtkObject *object) } /* get rid of the CORBA objects */ + /* if (window->throbber != NULL) { CORBA_Environment ev; Bonobo_PropertyBag property_bag; @@ -704,7 +714,7 @@ nautilus_window_destroy (GtkObject *object) bonobo_object_release_unref (window->throbber, &ev); CORBA_exception_free (&ev); } - + */ g_free (window->details); NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (GTK_OBJECT (window))); @@ -1343,13 +1353,16 @@ nautilus_window_allow_reload (NautilusWindow *window, gboolean allow) void nautilus_window_allow_stop (NautilusWindow *window, gboolean allow) { + /* CORBA_Environment ev; Bonobo_PropertyBag property_bag; - + */ + nautilus_bonobo_set_sensitive (window->details->shell_ui, NAUTILUS_COMMAND_STOP, allow); - + if (window->throbber != NULL) { + /* CORBA_exception_init (&ev); property_bag = Bonobo_Control_getProperties (window->throbber, &ev); @@ -1358,7 +1371,13 @@ nautilus_window_allow_stop (NautilusWindow *window, gboolean allow) bonobo_object_release_unref (property_bag, &ev); } CORBA_exception_free (&ev); - + */ + if (allow) { + nautilus_throbber_start (NAUTILUS_THROBBER (window->throbber)); + } else { + nautilus_throbber_stop (NAUTILUS_THROBBER (window->throbber)); + } + } } diff --git a/src/nautilus-spatial-window.h b/src/nautilus-spatial-window.h index ed9b189b2..3a2fb07ba 100644 --- a/src/nautilus-spatial-window.h +++ b/src/nautilus-spatial-window.h @@ -100,7 +100,8 @@ struct NautilusWindow { /* Widgets to keep track of (for state changes, etc) */ GtkWidget *zoom_control; - Bonobo_Unknown throbber; + /* Bonobo_Unknown throbber; */ + GtkWidget *throbber; /* Pending changes */ NautilusNavigationInfo *pending_ni; diff --git a/src/nautilus-window-toolbars.c b/src/nautilus-window-toolbars.c index d74931c20..e3a51e4a7 100644 --- a/src/nautilus-window-toolbars.c +++ b/src/nautilus-window-toolbars.c @@ -29,6 +29,7 @@ #include <config.h> #include "nautilus-application.h" +#include "nautilus-throbber.h" #include "nautilus-window-manage-views.h" #include "nautilus-window-private.h" #include "nautilus-window.h" @@ -352,11 +353,14 @@ set_up_back_or_forward_tool_bar_item (NautilusWindow *window, void nautilus_window_initialize_toolbars (NautilusWindow *window) { + GtkWidget *box; + + /* CORBA_Environment ev; CORBA_exception_init (&ev); - window->throbber = bonobo_get_object ("OAFIID:nautilus_throbber", "IDL:Bonobo/Control:1.0", &ev); + if (BONOBO_EX (&ev)) { char *txt; g_warning ("Throbber Activation exception '%s'", @@ -371,6 +375,18 @@ nautilus_window_initialize_toolbars (NautilusWindow *window) &ev); CORBA_exception_free (&ev); + */ + + window->throbber = nautilus_throbber_new (); + gtk_widget_show (window->throbber); + + /* wrap it in another box to add some visual padding */ + box = gtk_hbox_new (FALSE, 0); + gtk_container_set_border_width (GTK_CONTAINER (box), 4); + gtk_widget_show (box); + gtk_container_add (GTK_CONTAINER (box), window->throbber); + + set_widget_for_bonobo_control (window, box, "/Tool Bar/ThrobberWrapper"); window->details->back_button_item = set_up_back_or_forward_tool_bar_item diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 43caad58c..0f851c53b 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -36,6 +36,7 @@ #include "nautilus-sidebar.h" #include "nautilus-signaller.h" #include "nautilus-switchable-navigation-bar.h" +#include "nautilus-throbber.h" #include "nautilus-window-manage-views.h" #include "nautilus-window-service-ui.h" #include "nautilus-zoom-control.h" @@ -389,6 +390,7 @@ menu_bar_no_resize_hack (NautilusWindow *window) } /* handle bonobo events from the throbber */ +/* static void throbber_location_changed_callback (BonoboListener *listener, char *event_name, @@ -402,6 +404,7 @@ throbber_location_changed_callback (BonoboListener *listener, location = BONOBO_ARG_GET_STRING (arg); nautilus_window_goto_uri (window, location); } +*/ static void nautilus_window_constructed (NautilusWindow *window) @@ -550,6 +553,11 @@ nautilus_window_constructed (NautilusWindow *window) nautilus_window_initialize_toolbars (window); /* watch for throbber location changes, too */ + /* watch for throbber location changes, too */ + gtk_signal_connect (GTK_OBJECT (window->throbber), "location_changed", + goto_uri_callback, window); + + /* if (window->throbber != NULL) { CORBA_Environment ev; Bonobo_PropertyBag property_bag; @@ -564,6 +572,7 @@ nautilus_window_constructed (NautilusWindow *window) } CORBA_exception_free (&ev); } + */ /* Set initial sensitivity of some buttons & menu items * now that they're all created. @@ -689,6 +698,7 @@ nautilus_window_destroy (GtkObject *object) } /* get rid of the CORBA objects */ + /* if (window->throbber != NULL) { CORBA_Environment ev; Bonobo_PropertyBag property_bag; @@ -704,7 +714,7 @@ nautilus_window_destroy (GtkObject *object) bonobo_object_release_unref (window->throbber, &ev); CORBA_exception_free (&ev); } - + */ g_free (window->details); NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (GTK_OBJECT (window))); @@ -1343,13 +1353,16 @@ nautilus_window_allow_reload (NautilusWindow *window, gboolean allow) void nautilus_window_allow_stop (NautilusWindow *window, gboolean allow) { + /* CORBA_Environment ev; Bonobo_PropertyBag property_bag; - + */ + nautilus_bonobo_set_sensitive (window->details->shell_ui, NAUTILUS_COMMAND_STOP, allow); - + if (window->throbber != NULL) { + /* CORBA_exception_init (&ev); property_bag = Bonobo_Control_getProperties (window->throbber, &ev); @@ -1358,7 +1371,13 @@ nautilus_window_allow_stop (NautilusWindow *window, gboolean allow) bonobo_object_release_unref (property_bag, &ev); } CORBA_exception_free (&ev); - + */ + if (allow) { + nautilus_throbber_start (NAUTILUS_THROBBER (window->throbber)); + } else { + nautilus_throbber_stop (NAUTILUS_THROBBER (window->throbber)); + } + } } diff --git a/src/nautilus-window.h b/src/nautilus-window.h index ed9b189b2..3a2fb07ba 100644 --- a/src/nautilus-window.h +++ b/src/nautilus-window.h @@ -100,7 +100,8 @@ struct NautilusWindow { /* Widgets to keep track of (for state changes, etc) */ GtkWidget *zoom_control; - Bonobo_Unknown throbber; + /* Bonobo_Unknown throbber; */ + GtkWidget *throbber; /* Pending changes */ NautilusNavigationInfo *pending_ni; |