diff options
author | Darin Adler <darin@src.gnome.org> | 2001-04-13 21:41:23 +0000 |
---|---|---|
committer | Darin Adler <darin@src.gnome.org> | 2001-04-13 21:41:23 +0000 |
commit | fb65f036c2d72dd71df7e70d8c1f9a9343ffbb5a (patch) | |
tree | 2861ce8bac429174a3195c592b16ac7ed8be67fb /src | |
parent | b1dc1476d2e0be50d540805c5a4e3d3686f6f93a (diff) | |
download | nautilus-fb65f036c2d72dd71df7e70d8c1f9a9343ffbb5a.tar.gz |
Remove code that fills the progress bar to the end. The callback from
* libnautilus-extensions/nautilus-file-operations-progress.c:
(nautilus_file_operations_progress_done): Remove code that fills
the progress bar to the end. The callback from gnome-vfs now takes
care of this (need the new gnome-vfs with bug fixes).
* libnautilus-extensions/nautilus-file-operations.c:
(handle_close_callback), (create_transfer_dialog): Handle the
cancel button in a cleaner way. Just make it close the dialog and
fall into the code already there to handle cases where the dialog
is closed directly.
* src/file-manager/fm-icon-view.c: (get_default_zoom_level): Fixed
a strangely named variable.
(fm_icon_view_begin_loading): Don't set the zoom level if the view
does not support zooming (desktop view anyone?).
(default_zoom_level_changed_callback): Don't set the zoom level if
the view does not support zooming (desktop view anyone?).
* src/nautilus-window.c: (handle_view_as_item_from_bonobo_menu):
Use eel_strcmp, because the container path can be NULL in some
cases.
Diffstat (limited to 'src')
-rw-r--r-- | src/file-manager/fm-icon-view.c | 35 | ||||
-rw-r--r-- | src/nautilus-navigation-window.c | 4 | ||||
-rw-r--r-- | src/nautilus-object-window.c | 4 | ||||
-rw-r--r-- | src/nautilus-spatial-window.c | 4 | ||||
-rw-r--r-- | src/nautilus-window.c | 4 |
5 files changed, 27 insertions, 24 deletions
diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c index 96c8bf578..6efead04f 100644 --- a/src/file-manager/fm-icon-view.c +++ b/src/file-manager/fm-icon-view.c @@ -888,10 +888,10 @@ static NautilusZoomLevel default_zoom_level = NAUTILUS_ZOOM_LEVEL_STANDARD; static NautilusZoomLevel get_default_zoom_level (void) { - static gboolean auto_storaged_added = FALSE; + static gboolean auto_storage_added = FALSE; - if (auto_storaged_added == FALSE) { - auto_storaged_added = TRUE; + if (!auto_storage_added) { + auto_storage_added = TRUE; nautilus_preferences_add_auto_integer (NAUTILUS_PREFERENCES_ICON_VIEW_DEFAULT_ZOOM_LEVEL, (int *) &default_zoom_level); } @@ -929,11 +929,13 @@ fm_icon_view_begin_loading (FMDirectoryView *view) } /* Set up the zoom level from the metadata. */ - level = nautilus_file_get_integer_metadata - (file, - NAUTILUS_METADATA_KEY_ICON_VIEW_ZOOM_LEVEL, - get_default_zoom_level ()); - fm_icon_view_set_zoom_level (icon_view, level, TRUE); + if (fm_directory_view_supports_zooming (FM_DIRECTORY_VIEW (icon_view))) { + level = nautilus_file_get_integer_metadata + (file, + NAUTILUS_METADATA_KEY_ICON_VIEW_ZOOM_LEVEL, + get_default_zoom_level ()); + fm_icon_view_set_zoom_level (icon_view, level, TRUE); + } /* Set the sort mode. * It's OK not to resort the icons because the @@ -972,7 +974,7 @@ fm_icon_view_end_loading (FMDirectoryView *view) static NautilusZoomLevel fm_icon_view_get_zoom_level (FMIconView *view) { - g_return_val_if_fail (FM_IS_ICON_VIEW (view), get_default_zoom_level ()); + g_return_val_if_fail (FM_IS_ICON_VIEW (view), NAUTILUS_ZOOM_LEVEL_STANDARD); return nautilus_icon_container_get_zoom_level (get_icon_container (view)); } @@ -2095,12 +2097,14 @@ default_zoom_level_changed_callback (gpointer callback_data) icon_view = FM_ICON_VIEW (callback_data); - file = fm_directory_view_get_directory_as_file (FM_DIRECTORY_VIEW (icon_view)); - - level = nautilus_file_get_integer_metadata (file, - NAUTILUS_METADATA_KEY_ICON_VIEW_ZOOM_LEVEL, - get_default_zoom_level ()); - fm_icon_view_set_zoom_level (icon_view, level, TRUE); + if (fm_directory_view_supports_zooming (FM_DIRECTORY_VIEW (icon_view))) { + file = fm_directory_view_get_directory_as_file (FM_DIRECTORY_VIEW (icon_view)); + + level = nautilus_file_get_integer_metadata (file, + NAUTILUS_METADATA_KEY_ICON_VIEW_ZOOM_LEVEL, + get_default_zoom_level ()); + fm_icon_view_set_zoom_level (icon_view, level, TRUE); + } fm_icon_view_update_icon_container_font_size_table (icon_view); } @@ -2260,7 +2264,6 @@ fm_icon_view_update_icon_container_fonts (FMIconView *icon_view) g_assert (icon_container != NULL); for (i = 0; i <= NAUTILUS_ZOOM_LEVEL_LARGEST; i++) { - font = nautilus_font_factory_get_font_from_preferences (font_size_table[i]); g_assert (font != NULL); nautilus_icon_container_set_label_font_for_zoom_level (icon_container, i, font); diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c index 95545fe41..d4c719765 100644 --- a/src/nautilus-navigation-window.c +++ b/src/nautilus-navigation-window.c @@ -1129,11 +1129,11 @@ handle_view_as_item_from_bonobo_menu (NautilusWindow *window, const char *id) container_path = nautilus_bonobo_get_numbered_menu_item_container_path_from_command (id); - if (strcmp (container_path, NAUTILUS_MENU_PATH_SHORT_LIST_PLACEHOLDER) == 0) { + if (eel_strcmp (container_path, NAUTILUS_MENU_PATH_SHORT_LIST_PLACEHOLDER) == 0) { activate_nth_short_list_item (window, nautilus_bonobo_get_numbered_menu_item_index_from_command (id)); - } else if (strcmp (container_path, NAUTILUS_MENU_PATH_EXTRA_VIEWER_PLACEHOLDER) == 0) { + } else if (eel_strcmp (container_path, NAUTILUS_MENU_PATH_EXTRA_VIEWER_PLACEHOLDER) == 0) { g_return_if_fail (nautilus_bonobo_get_numbered_menu_item_index_from_command (id) == 0); activate_extra_viewer (window); diff --git a/src/nautilus-object-window.c b/src/nautilus-object-window.c index 95545fe41..d4c719765 100644 --- a/src/nautilus-object-window.c +++ b/src/nautilus-object-window.c @@ -1129,11 +1129,11 @@ handle_view_as_item_from_bonobo_menu (NautilusWindow *window, const char *id) container_path = nautilus_bonobo_get_numbered_menu_item_container_path_from_command (id); - if (strcmp (container_path, NAUTILUS_MENU_PATH_SHORT_LIST_PLACEHOLDER) == 0) { + if (eel_strcmp (container_path, NAUTILUS_MENU_PATH_SHORT_LIST_PLACEHOLDER) == 0) { activate_nth_short_list_item (window, nautilus_bonobo_get_numbered_menu_item_index_from_command (id)); - } else if (strcmp (container_path, NAUTILUS_MENU_PATH_EXTRA_VIEWER_PLACEHOLDER) == 0) { + } else if (eel_strcmp (container_path, NAUTILUS_MENU_PATH_EXTRA_VIEWER_PLACEHOLDER) == 0) { g_return_if_fail (nautilus_bonobo_get_numbered_menu_item_index_from_command (id) == 0); activate_extra_viewer (window); diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c index 95545fe41..d4c719765 100644 --- a/src/nautilus-spatial-window.c +++ b/src/nautilus-spatial-window.c @@ -1129,11 +1129,11 @@ handle_view_as_item_from_bonobo_menu (NautilusWindow *window, const char *id) container_path = nautilus_bonobo_get_numbered_menu_item_container_path_from_command (id); - if (strcmp (container_path, NAUTILUS_MENU_PATH_SHORT_LIST_PLACEHOLDER) == 0) { + if (eel_strcmp (container_path, NAUTILUS_MENU_PATH_SHORT_LIST_PLACEHOLDER) == 0) { activate_nth_short_list_item (window, nautilus_bonobo_get_numbered_menu_item_index_from_command (id)); - } else if (strcmp (container_path, NAUTILUS_MENU_PATH_EXTRA_VIEWER_PLACEHOLDER) == 0) { + } else if (eel_strcmp (container_path, NAUTILUS_MENU_PATH_EXTRA_VIEWER_PLACEHOLDER) == 0) { g_return_if_fail (nautilus_bonobo_get_numbered_menu_item_index_from_command (id) == 0); activate_extra_viewer (window); diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 95545fe41..d4c719765 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -1129,11 +1129,11 @@ handle_view_as_item_from_bonobo_menu (NautilusWindow *window, const char *id) container_path = nautilus_bonobo_get_numbered_menu_item_container_path_from_command (id); - if (strcmp (container_path, NAUTILUS_MENU_PATH_SHORT_LIST_PLACEHOLDER) == 0) { + if (eel_strcmp (container_path, NAUTILUS_MENU_PATH_SHORT_LIST_PLACEHOLDER) == 0) { activate_nth_short_list_item (window, nautilus_bonobo_get_numbered_menu_item_index_from_command (id)); - } else if (strcmp (container_path, NAUTILUS_MENU_PATH_EXTRA_VIEWER_PLACEHOLDER) == 0) { + } else if (eel_strcmp (container_path, NAUTILUS_MENU_PATH_EXTRA_VIEWER_PLACEHOLDER) == 0) { g_return_if_fail (nautilus_bonobo_get_numbered_menu_item_index_from_command (id) == 0); activate_extra_viewer (window); |