diff options
author | Andy Hertzfeld <andy@src.gnome.org> | 2000-10-08 06:23:59 +0000 |
---|---|---|
committer | Andy Hertzfeld <andy@src.gnome.org> | 2000-10-08 06:23:59 +0000 |
commit | 98042a7ae0edf5bb9f224e2124c3e96f71df095a (patch) | |
tree | 5e0017b2d5cead7ea85604ecbd60f666571ee32a /src/nautilus-throbber.c | |
parent | a07a7b8de218e9ac8958529277914959980f16e0 (diff) | |
download | nautilus-98042a7ae0edf5bb9f224e2124c3e96f71df095a.tar.gz |
re-organized the code to add the ability to request image paths from
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_image_path_from_theme),
(nautilus_theme_get_image_path):
re-organized the code to add the ability to request image
paths from specific themes, as well as the current one.
* libnautilus-extensions/nautilus-theme.h:
added nautilus_theme_get_image_path_from_theme.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data):
used the above to implement sidebar tab redirection, so a theme
can use the sidebar tabs from another theme, so sidebar tab images
don't have to be present in every theme.
* libnautilus-extensions/nautilus-icon-factory.c:
(nautilus_icon_factory_destroy), (check_local_theme), (set_theme),
(get_icon_file_path):
implemented icon theme default redirection, so a theme can specify
another theme to get its icons from when they're not present locally;
this is needed by both Arlo and Susan's themes.
* src/nautilus-throbber.c,h: (nautilus_throbber_initialize_class),
(nautilus_throbber_button_press_event):
made clicking on the throbber take you to a URL specified by
the current theme. Did this by adding a location_change signal. This
fixes bug 3433.
* src/nautilus-window.c: (nautilus_window_constructed):
hooked up nautilus-window to the throbber's location_change signal to
change the location when the signal is emitted.
* icons/default.xml:
added default URI for throbber, pointing to www.eazel.com
* icons/vector/vector.xml:
added sidebar tab redirection to the Arlo theme for testing
Diffstat (limited to 'src/nautilus-throbber.c')
-rw-r--r-- | src/nautilus-throbber.c | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/src/nautilus-throbber.c b/src/nautilus-throbber.c index e03300caf..fe29034fb 100644 --- a/src/nautilus-throbber.c +++ b/src/nautilus-throbber.c @@ -60,6 +60,12 @@ struct NautilusThrobberDetails { gboolean small_mode; }; +enum { + LOCATION_CHANGED, + LAST_SIGNAL +}; +static guint signals[LAST_SIGNAL]; + static void nautilus_throbber_initialize_class (NautilusThrobberClass *klass); static void nautilus_throbber_initialize (NautilusThrobber *throbber); static void nautilus_throbber_destroy (GtkObject *object); @@ -82,6 +88,18 @@ nautilus_throbber_initialize_class (NautilusThrobberClass *throbber_class) { GtkObjectClass *object_class = GTK_OBJECT_CLASS (throbber_class); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (throbber_class); + + + signals[LOCATION_CHANGED] = gtk_signal_new + ("location_changed", + GTK_RUN_LAST, + object_class->type, + GTK_SIGNAL_OFFSET (NautilusThrobberClass, + location_changed), + gtk_marshal_NONE__STRING, + GTK_TYPE_NONE, 1, GTK_TYPE_STRING); + + gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); object_class->destroy = nautilus_throbber_destroy; @@ -397,14 +415,22 @@ nautilus_throbber_load_images (NautilusThrobber *throbber) } -/* handle button presses */ +/* handle button presses by emitting the location changed signal */ static gboolean nautilus_throbber_button_press_event (GtkWidget *widget, GdkEventButton *event) -{ - /* - NautilusThrobber *throbber = NAUTILUS_THROBBER (widget); - */ +{ + char *location; + + location = nautilus_theme_get_theme_data ("throbber", "URL"); + if (location != NULL) { + gtk_signal_emit (GTK_OBJECT (widget), + signals[LOCATION_CHANGED], + location); + + g_free (location); + } + return TRUE; } |