summaryrefslogtreecommitdiff
path: root/libnautilus
Commit message (Collapse)AuthorAgeFilesLines
* reviewed by: John Sullivan <sullivan@eazel.com>Darin Adler2001-02-033-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug 6163 (Need NautilusViewFrame :: report_location_changed). This is re-adding a feature we also had long ago, where a view reports a location change, but does not want the location change to come back to it in the form of a load_location call. * src/nautilus-applicable-views.h: * src/nautilus-applicable-views.c: (get_view_result_from_gnome_vfs_result), (got_file_info_callback), (got_minimum_file_info_callback), (nautilus_determine_initial_view), (nautilus_determine_initial_view_cancel): Changed this entire file to have a much easier-to-understand API. * src/nautilus-view-frame-private.h: * src/nautilus-view-frame-corba.c: (free_location_plus_callback): Change existing structure so it can be used for the location-change case, which includes a title too. (open_force_new_window): Use new structure. (report_location_change): Implement new call. (impl_Nautilus_ViewFrame_open_location_force_new_window): Use new structure. (impl_Nautilus_ViewFrame_report_location_change): Implement new call. * libnautilus/nautilus-view-component.idl: Add the new call. * libnautilus/nautilus-view.h: * libnautilus/nautilus-view.c: (nautilus_view_report_location_change): Add the new call. * src/nautilus-view-frame.h: * src/nautilus-view-frame.c: (nautilus_view_frame_initialize_class): Add new signal. (nautilus_view_frame_report_location_change): Implement new call. * src/nautilus-window-private.h: * src/nautilus-window-manage-views.h: * src/nautilus-window-manage-views.c: (update_for_new_location): Got rid of obsolete assert. Also, no longer clear the selection. The selection is set properly earlier, and clearing it at this point serves no purpose. (location_has_really_changed): Call free_location_change to share more code. Also no reason to free "pending_ni" any more, because we don't keep it around in the success case. (load_new_location_in_one_view): New name. (load_new_location_in_sidebar_panels): New name. Also take a parameter of a view to skip. (load_new_location_in_all_views): New function. (set_to_pending_location_and_selection): New name, and removed code to handle the case where there is no pending location, since that doesn't happen. Also take a parameter of a view to skip. Also broke out the guts into load_new_location_in_all_views. (free_location_change): Free things by their new names. There's also less to free now. (cancel_location_change): Key off pending_location instead of pending_ni. Also save code by using new function that skips a view. (determined_initial_view_callback): Changed name, and use new interface. No longer need "end_reached" trick, because the new interface handles that. (begin_location_change): Made a static after moving all the functions that use it in here. Also moved some of the reload code out into nautilus_window_reload. (report_location_change_callback): New function. Does all the steps neede for a location change in place. (nautilus_window_back_or_forward), (nautilus_window_reload): Moved these two functions in here from nautilus-window.c so we could make begin_location_change more private. * src/nautilus-window.h: * src/nautilus-window.c: (nautilus_window_go_to): Changed the name. (nautilus_window_get_location): New function for callers that used to get the location field directly. (go_to_callback): Changed name. * src/nautilus-desktop-window.c: (nautilus_desktop_window_new): * src/nautilus-location-bar.c: (drag_data_received_callback): * src/nautilus-shell.c: (open_window), (save_window_states), (restore_window_states): * src/nautilus-window-menus.c: (services_button_callback), (help_menu_nautilus_manual_callback), (help_menu_nautilus_license_callback), (help_menu_nautilus_feedback_callback), (activate_bookmark_in_menu_item): * src/nautilus-window-service-ui.c: (goto_services_summary), (goto_online_storage), (goto_software_catalog), (goto_services_support): * src/nautilus-window.c: (location_change_at_idle_callback), (nautilus_window_constructed), (view_as_menu_vfs_method_callback), (nautilus_window_go_web_search), (nautilus_window_go_home): Use nautilus_go_to under its new name. * src/nautilus-shell.c: (restore_window_states): Use nautilus_istr_has_prefix instead of g_strncasecmp. Also did other code cleanup. * libnautilus-extensions/nautilus-gtk-extensions.h: Added a new marshal function that I needed. * libnautilus-extensions/nautilus-thumbnails.c: Added a FIXME. * libnautilus-extensions/nautilus-view-identifier.h: * libnautilus-extensions/nautilus-view-identifier.c: (nautilus_view_identifier_copy), (nautilus_view_identifier_compare): Use const. * src/nautilus-application.c: (nautilus_application_startup): Only check for root if we are actually running nautilus, not if we are just killing off an existing copy. (confirm_ok_to_run_as_root): Changed name of the function and improved the wording of the message and button. Also added an environment variable you can set to get rid of this. (Probably should have been a preference instead, but I am officially being lazy about this.) Fixed bug that was revealed by the change in the loading sequence I made. John didn't review this part: * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory-async.c: (load_directory_state_destroy), (load_directory_done): Separate out code to free the partly-done state so it can be used in the cancel case. (dequeue_pending_idle_callback): Ref the directory object so that we won't get messed up if the callback destroys it. (directory_load_cancel): Separated out the old part of file_list_cancel so that we can cancel the idle part too when we want to. (file_list_cancel): Use the new calls to cancel the idle part of directory loading. (directory_load_done): Use directory_load_cancel instead of file_list_cancel. (nautilus_directory_stop_monitoring_file_list): Use directory_load_cancel instead of file_list_cancel. (nautilus_directory_async_state_changed): Added state variables to protect cases where we re-enter this function.
* reviewed by: Darin Adler <darin@eazel.com> andMaciej Stachowiak2001-02-021-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Robey Pointer <robey@eazel.com> Fix bugs 5528 (oaf command-line options show up in main program section, not a separate section) and 5510 (descriptions of OAF-specific options in --help are not translated). To do this I had to change the way the oaf popt options are processed in all the places that do so. * components/adapter/main.c: (main): * components/hardware/main.c: (main): * components/help/hyperbola-main.c: (main): * components/image-viewer/Nautilus_View_image.oaf.in: * components/image-viewer/nautilus-image-view.c: (init_server_factory): * components/loser/content/main.c: (main): * components/loser/sidebar/main.c: (main): * components/mozilla/main.c: (main): * components/music/main.c: (main): * components/notes/nautilus-notes.c: (main): * components/rpmview/main.c: (main): * components/services/install/command-line/eazel-alt-install-corba. c: (main): * components/services/install/nautilus-view/main.c: (main): * components/services/login/nautilus-view/main.c: (main): * components/services/summary/nautilus-view/main.c: (main): * components/services/time/command-line/main.c: (main): * components/services/time/nautilus-view/main.c: (main): * components/services/trilobite/libtrilobite/trilobite-core-utils.c : (trilobite_init): * components/shell/shell.c: * components/text/Nautilus_View_text.oaf.in: * components/text/main.c: (main): * components/throbber/main.c: (main): * components/tree/main.c: (main): * libnautilus/nautilus-view-standard-main.c: (nautilus_view_standard_main_multi): * src/Nautilus_shell.oaf.in: * src/nautilus-main.c: (main): * test/test-nautilus-mime-actions-set.c: (main): * test/test-nautilus-mime-actions.c: (main): Register oaf options with gnomelib_register_popt_options and move oaf_init call to before gnome_init to fix the aforementioned bugs.
* reviewed by: John Sullivan <sullivan@eazel.com>Darin Adler2001-01-311-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix bug 6147 (selected icons flash unselected/selected rapidly): * src/nautilus-window-manage-views.c: (change_selection): Don't send out selection change notices to the view that reported the selection change. (change_selection_callback): Pass in view that requested the change so we can know not to send a selection change to that view. * src/file-manager/fm-directory-view.c: (fm_directory_view_send_selection_change): Clear flag that says we have a selection change for the shell. (selection_changed_callback): Add code to indicate this selection change is due to the shell, so we don't tell the shell about something it just told us. (done_loading): Set flag so we don't tell the shell about selection changes that are part of the first load of the directory. (display_selection_info_idle_callback): Only send a selection change to the shell if the change was initiated here. Also remove the code that ref's the NautilusView object -- wasn't helping. (update_menus_timeout_callback), (display_pending_idle_callback), (display_pending_timeout_callback): Remove the code that ref's the NautilusView object -- wasn't helping. (fm_directory_view_notify_selection_changed): Propagate flag that tells the idle code we have made the change to the selection and the shell should be notified. Fix bug 6158 (nautilus --quit shouldn't check for ~/.nautilus/first-time-wizard-flag). * src/nautilus-main.c: (main): Don't do the first-time druid check when the --quit or --restart option is used. Fix bug 803 (All metafile tags should be lower case). * libnautilus-extensions/nautilus-metadata.h: Use lower-case for metadata tags. * libnautilus-extensions/nautilus-directory-metafile.c: (create_metafile_root), (get_file_node), (nautilus_directory_rename_file_metadata), (nautilus_directory_copy_file_metadata), (nautilus_directory_set_metafile_contents): Change metadata tags to be lower-case. * libnautilus-extensions/nautilus-directory.c: (nautilus_self_check_directory): Use lower-case in metadata self-test for clarity. * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_keywords), (nautilus_file_set_keywords): Change metadata tags to be lower-case. * data/top/.nautilus-metafile.xml * icons/ardmore/ardmore.xml: * icons/arlo/arlo.xml: * icons/arlo/i-directory.xml: * icons/arlo/i-regular.xml: * icons/crux_eggplant/crux_eggplant.xml: * icons/crux_eggplant/i-directory.xml: * icons/crux_eggplant/i-regular.xml: * icons/default.xml: * icons/gnome/gnome.xml: * icons/i-directory-accept.xml: * icons/i-directory.xml: * icons/i-regular.xml: * icons/villanova/villanova.xml: Change XML to use lower-case. * libnautilus-extensions/nautilus-link-set.c: (create_new_link): Use lower-case for link XML tags. * libnautilus-extensions/nautilus-link.c: (nautilus_link_local_create), (nautilus_link_local_set_link_uri), (nautilus_link_local_set_type), (nautilus_link_local_get_link_uri), (nautilus_link_local_get_link_type), (nautilus_link_get_link_uri_given_file_contents): Use lower-case for link XML tags. * src/nautilus-sidebar-title.c: (nautilus_sidebar_title_select_text_color), (nautilus_sidebar_title_theme_changed): Use lower-case for theme XML tags. * components/throbber/nautilus-throbber.c: (get_bonobo_properties), (nautilus_throbber_initialize), (nautilus_throbber_load_images), (nautilus_throbber_button_press_event): Change theme XML tags to be lower-case. * libnautilus-extensions/nautilus-icon-container.c: (start_rubberbanding): Use lower-case for theme XML tags. (nautilus_icon_container_initialize): Fix comment. (update_label_color), (nautilus_icon_container_theme_changed): Use lower-case for theme XML tags. * libnautilus-extensions/nautilus-icon-factory.c: (set_theme): Use lower-case for theme XML tags. (get_themed_icon_file_path): Use lower-case for icon XML file tags. (icon_theme_changed_callback): Use lower-case for theme XML tags. * src/nautilus-sidebar-tabs.c: (nautilus_sidebar_tabs_load_theme_data), (get_text_offset): Use lowe-case for theme XML tags. * src/nautilus-sidebar.c: (nautilus_sidebar_update_appearance): Use lower-case for theme XML tags. * src/nautilus-window-toolbars.c: (get_file_name_from_icon_name): Use lower-case for theme XML tags. * src/nautilus-zoom-control.c: (draw_number): Use lower-case for theme XML tags. Change code that used GSList when it should use GList. We use GList so that we can share utility functions. It's arbitrary. We could have decided to use all GSList instead, but we chose GList (because of its name, initially). * components/tree/nautilus-tree-expansion-state.c: (expansion_state_load_callback), (nautilus_tree_expansion_state_load_table_from_gconf), (hash_table_get_keys_callback), (hash_table_get_keys), (nautilus_tree_expansion_state_save_table_to_gconf): Update to use GList instead of GSList. * libnautilus-extensions/nautilus-gconf-extensions.h: * libnautilus-extensions/nautilus-gconf-extensions.c: (nautilus_gconf_handle_error), (nautilus_gconf_set_string_list), (nautilus_gconf_get_string_list): Change to work with GList instead of GSList to match the rest of Nautilus, so that the lists can be manipulated with all the GList utility functions. * libnautilus-extensions/nautilus-glib-extensions.h: * libnautilus-extensions/nautilus-glib-extensions.c: (nautilus_round): Changed name from nautilus_g_round -- "g" for "gratuitous". (nautilus_g_list_from_g_slist), (nautilus_g_slist_from_g_list): Added utility functions to help make GSLists from GLists and vice versa. Useful when dealing with functions that yield/expect GSLists. * libnautilus-extensions/nautilus-icon-text-item.c: (iti_destroy), (iti_update), (iti_paint_text), (iti_draw), (iti_render), (iti_event): Use nautilus_round by its new name. * libnautilus-extensions/nautilus-preferences.h: * libnautilus-extensions/nautilus-preferences.c: (nautilus_preferences_set_string_list), (nautilus_preferences_get_string_list), (nautilus_preferences_default_set_string_list), (nautilus_preferences_default_get_string_list): Change to use GList instead of GSList. * libnautilus-extensions/nautilus-search-uri.c: (free_tokenized_uri), (tokenize_uri), (get_translated_criterion), (get_nth_criterion_prefix), (parse_uri): Change to use GList instead of GSList. * src/nautilus-application.h: * src/nautilus-application.c: (nautilus_application_get_window_list): Renamed from nautilus_application_windows and changed to use GList instead of GSList. (nautilus_application_destroyed_window), (nautilus_application_create_window), (volume_unmounted_callback): Change to use GList instead of GSList. * src/nautilus-shell.c: (save_window_states), (restore_window_states): Use GList instead of GSList. * src/nautilus-window-manage-views.c: (just_one_window): Use GList instead of GSList. (open_location_prefer_existing_window_callback): Use GList instead of GSList. * src/nautilus-window.c: (nautilus_forget_history): Use GList instead of GSList and the new name for nautilus_application_get_window_list. Other changes. * src/nautilus-shell.c: (display_caveat_first_time): Turn off the caveat -- we're close enough to 1.0. * libnautilus-extensions/nautilus-view-identifier.c: (nautilus_view_identifier_new_from_oaf_server_info): Use free_deep call. * libnautilus/nautilus-view-standard-main.h: Use BEGIN/END_GNOME_DECLS. * src/file-manager/fm-desktop-icon-view.c: Remove unneeded include.
* reviewed by: Maciej Stachowiak <mjs@eazel.com>Darin Adler2001-01-304-82/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug 2131 (Change Nautilus to use OAF asynchronous activation interface). In making view activation work right, I also eliminated the state machine that was almost gone from NautilusWindow. There's still some additional simplification we can do, but it's simpler than it was. At the same time, made sure all incoming CORBA calls are deferred until idle time. This is most of what the old state machine was accomplishing, believe it or not, although it didn't do it 100%. Also fixes bug 2457 (Silent error loading content view), bug 2461 (progress from old and new content view sometimes confused), and bug 6109 (Assertion hit on clicking the refresh button many times very quickly). Perhaps others too, we need to test some old bugs to see if they have changed behavior. * libnautilus-extensions/nautilus-bonobo-extensions.c: (activation_handle_done), (activation_idle_callback), (activation_cancel), (oaf_activation_callback), (nautilus_bonobo_activate_cancel): Change implementation so that the actual callback happens at idle time, since CORBA callbacks can happen at almost any time. * libnautilus/Makefile.am: * libnautilus/nautilus-idle-queue.h: * libnautilus/nautilus-idle-queue.c: (execute_queued_functions), (nautilus_idle_queue_new), (nautilus_idle_queue_add), (nautilus_idle_queue_destroy): Factored out the idle queueing that I added to NautilusView so we can use it on the NautilusViewFrame side too. * libnautilus/nautilus-view.c: (queue_incoming_call), (nautilus_view_initialize), (nautilus_view_destroy): Change to use the new NautilusIdleQueue so we can share code. * src/nautilus-view-frame-private.h: * src/nautilus-view-frame-corba.c: (list_free_deep_callback), (free_location_and_selection_callback), (open_in_this_window), (open_prefer_existing_window), (open_force_new_window), (report_selection_change), (report_status), (report_load_underway), (report_load_progress), (report_load_complete), (report_load_failed), (set_title), (impl_Nautilus_ViewFrame_open_location_in_this_window), (impl_Nautilus_ViewFrame_open_location_prefer_existing_window), (impl_Nautilus_ViewFrame_open_location_force_new_window), (impl_Nautilus_ViewFrame_report_selection_change), (impl_Nautilus_ViewFrame_report_status), (impl_Nautilus_ViewFrame_report_load_underway), (impl_Nautilus_ViewFrame_report_load_progress), (impl_Nautilus_ViewFrame_report_load_complete), (impl_Nautilus_ViewFrame_report_load_failed), (impl_Nautilus_ViewFrame_set_title): Deal with all incoming CORBA calls through the idle queue. * src/nautilus-view-frame.h: Moved all the fields into details. Renamed client_loaded to view_loaded. Renamed load_client to load_view. Eliminated load_client_sync. Renamed get_iid to get_view_iid. Eliminated get_is_underway. Added get_is_view_loaded. * src/nautilus-view-frame.c: (nautilus_view_frame_queue_incoming_call): Simple cover for putting an incoming CORBA call on the idle queue. (nautilus_view_frame_initialize_class): Change client_loaded signal name to view_loaded. (nautilus_view_frame_initialize): Allocate the idle queue. (stop_activation): New function that stops a load_view that is underway. (destroy_view): Use the "view" field to tell if a view was loaded. The old code used the "iid" field, but now we set that even before the load is completed. (nautilus_view_frame_destroy): Destroy the idle queue. Also put the view into "failed" state once it's destroyed so additional calls are harmless. (nautilus_view_frame_finalize): Check that we're in the failed state. (emit_zoom_parameters_changed): New function so we can share more code. (view_frame_activated): Emit the zoom_parameters_changed signal here since a new view should always should get this signal. (view_frame_underway): Make this do nothing in the failed case instead of complaining. (view_frame_loaded): Make this do nothing in the failed case instead of complaining. (view_frame_failed): Stop whatever's in progress when the view fails. Also, allow calling this on a view that's already failed. (check_if_view_is_gone): Consolidate the calls to deregister_dead_components so we don't need an explicit call here. (emit_zoom_parameters_changed_callback), (zoom_parameters_changed_callback), (emit_zoom_level_changed_callback), (zoom_level_changed_callback): Redo these so they queue onto the idle queue, since they are triggered by incoming CORBA calls that can happen at any time. (create_corba_objects): Factor out the part of the code that makes the CORBA objects. Make error handling more complete and keep around pointers to the Bonobo objects for various parts of the aggregate so we can connect the appropriate signal handlers. (attach_view): Change code so it no longer connects signals to the BonoboObjectClient, since the signals won't go out on that GtkObject. Connect to the exception signals for all objects in the aggregate (any failure means "view failed"). Also connect to the "destroy" signal for one object (doesn't matter which since the entire aggregate goes away at once) and to the zoom-related signals. Report errors with signals rather than returning a boolean. (activation_callback): Add code to handle failure case. (nautilus_view_frame_load_view): Renamed. Got rid of "sync." version. (nautilus_view_frame_stop): Stop OAF activation of the view if it's in progress. (nautilus_view_frame_selection_changed): Make it a quiet no-op to send a selection change notice if no view is loaded. This helps keep the code simple for sidebars. Later we may make the view frame responsible for sending the selection on once the view is loaded. (nautilus_view_frame_title_changed): Same change as for selection, same idea. (nautilus_view_frame_get_is_zoomable), (nautilus_view_frame_get_zoom_level), (nautilus_view_frame_set_zoom_level), (nautilus_view_frame_get_min_zoom_level), (nautilus_view_frame_get_max_zoom_level), (nautilus_view_frame_get_has_min_zoom_level), (nautilus_view_frame_get_has_max_zoom_level), (nautilus_view_frame_get_is_continuous), (nautilus_view_frame_get_preferred_zoom_levels), (nautilus_view_frame_zoom_in), (nautilus_view_frame_zoom_out), (nautilus_view_frame_zoom_to_fit): Since a failed view has a zoomable_frame field set to NULL, got rid of all the explicit failure-case code for these functions. (nautilus_view_frame_get_view_iid): Renamed from get_iid. (nautilus_view_frame_report_load_underway), (nautilus_view_frame_report_load_complete), (nautilus_view_frame_report_load_failed): Moved the "quiet" handling of failed views down into the underlying functions, so these no longer need explicit failure-case code. (nautilus_view_frame_set_label): It's OK to allow this even for a failed view. (nautilus_view_frame_map): Use a kept-around reference to the control frame instead of relying on query_local_interface. (nautilus_view_frame_get_is_view_loaded): Add this so callers can tell when a sidebar view is not yet loaded. Might not need this when we clean things up more, but it's no big deal either way. * src/nautilus-window-manage-views.c: (update_title): No need to send the title change to the new content view -- it gets a title change once it comes up "for real". (set_displayed_location): Handle location of NULL here so we don't need to worry about it elsewhere. (check_bookmark_location_matches): Remove "uri" from name. (location_has_really_changed): Now that the state machine is gone, it's easy to see that this is never called with pending_ni equal to cancel_tag, so remove the code for that and add an assert. (set_view_location_and_selection): New name for what was called update_view. (set_sidebar_panels_location_and_selection): Cover since this loop occurs in two places. (update_for_new_location_and_selection): New name for what was called set_view_location_and_selection. Since it's now clear this can't be called with new_content_view equal to NULL, remove the code to handle that (fixes bug 2457). (load_content_view): Use async. view loading here. Get rid of "Avoid being fooled by extra done notifications from the last view. This is a HACK because the state machine SUCKS." by eliminating the "cv_progress_done" and "cv_progress_error" flags altogether. In the case where we reuse the same view, just call update_for_new_location_and_selection -- the old code set "view_activation_complete", but I eliminated that flag. (handle_view_failure): Remove the old view using nautilus_window_set_content_view_widget instead of having duplicate code here. Use a call to cancel_location_change instead of setting the "reset_to_idle" and "cv_progress_error" flags (both gone now). (free_location_change): No need to clean up "error_views" any more, because that field is gone. (end_location_change): New helper to stop the throbber from throbbing and then free the location change state. (cancel_location_change): Get rid of special case for NULL location now that set_displayed_location can handle it. (nautilus_window_end_location_change_callback): Remove "superstitiously" added call to update_state and call load_content_view_for_new_location directly. (nautilus_window_begin_location_change): Use a call to cancel_location_change to deal with the possibility that we may have a change already in progress. (nautilus_window_stop_loading): Use cancel_location_change to stop the loading. (nautilus_window_set_content_view): Remove calls to update_state -- there's no state to update any more. (nautilus_window_set_sidebar_panels): Do an async. load here and finish the setup in the view_loaded callback. (failed_callback): Do a handle_view_failed right here, now that we have no state machine to satisfy. (load_underway_callback): Change code to handle the two interesting cases separately without a state machine. When the new content view says "underway", it's time for location_has_really_changed. When an existing content view says "underway", we restart the throbber (fixes 1/2 of bug 2461). (load_complete_callback): Since view frames now ensure we get an underway call before a complete call, we can simplify the logic. If the main content view says "complete", it's time to stop the throbber (fixes other 1/2 of bug 2461). (view_loaded_callback): Renamed the client_loaded callback. Also made it update location and selection for sidebar panels when they are loaded. Also made it update the title for any view when it's loaded. * src/nautilus-window.h: * src/nautilus-window.c: (nautilus_window_synch_view_as_menu): Handle case of NULL content view. (nautilus_window_set_content_view_widget): Destroy the view when it's going away instead of removing it from the parent. Also make this function handle the NULL case so we can use it to remove the old view, not just to add the new one. * libnautilus-extensions/nautilus-bonobo-extensions.h: Whitespace tweak. * src/nautilus-sidebar.c: (nautilus_sidebar_active_panel_matches_id): Update for nautilus_view_frame_get_view_iid name change.
* Holy piss sprinkled on this by Arik <arik@eazel.com>Seth Nickell2001-01-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fri Jan 26 23:58:42 2001 George Lebl <jirka@5z.com> Holy piss sprinkled on this by Arik <arik@eazel.com> * components/adapter/main.c (main) components/help/hyperbola-main.c (main) components/image-viewer/nautilus-image-view.c (init_server_factory) components/mozilla/main.c (main) components/music/main.c (main) components/notes/nautilus-notes.c (main) components/services/install/nautilus-view/main.c (main) components/services/inventory/main.c (main) components/services/login/nautilus-view/main.c (main) components/services/summary/nautilus-view/main.c (main) components/shell/shell.c (init_bonobo) components/text/main.c (main) components/throbber/main.c (main) components/tree/main.c (main) libnautilus/nautilus-view-standard-main.c (nautilus_view_standard_main_multi): Add gnome_client_disable_master_connection call to all out of process component main functions since they should not register with the session manager. Fixes bug #6051 2001-01-26 Seth Nickell <seth@eazel.com>
* reviewed by: John Sullivan <sullivan@eazel.com>Darin Adler2001-01-262-32/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some preparation work for doing async. activation. This amounts to another pass cleaning up the legendary "state machine" as well as some other cleanups in the async. activation code. * libnautilus-extensions/nautilus-bonobo-extensions.h: * libnautilus-extensions/nautilus-bonobo-extensions.c: (oaf_activation_callback), (nautilus_bonobo_activate_from_id), (nautilus_bonobo_activate_cancel): Fix interface of activation to be cleaner. Also handle case where callback is called right away. Add queuing to NautilusView so that all incoming CORBA calls are dispatched at idle time. This can fix some otherwise-difficult re-entrancy problems. The widget destroy call can still come in at any time though. Also this same fix may be needed for the NautilusViewFrame side. * libnautilus/nautilus-view.h: * libnautilus/nautilus-view.c: (execute_queued_calls): Function to dequeue and execute calls. (dequeue_calls_at_idle): Cover to call it at idle time. (discard_queued_calls): Discard calls without executing them, for use at destroy time. (queue_incoming_call): Simple cover to queue and schedule an idle-time dequeue pass. (nautilus_g_list_from_uri_list): Need to make a full copy, not a shallow copy, now that we are queuing things for a hile. (call_load_location), (call_stop_loading), (call_selection_changed), (call_title_changed), (call_history_changed): Simple functions that get queued. (list_deep_free_cover): GDestroyNotify-compatible function for one destroy case. (history_dup): Function to copy the history list, since that is now queued instead of used right away. (impl_Nautilus_View_load_location), (impl_Nautilus_View_stop_loading), (impl_Nautilus_View_selection_changed), (impl_Nautilus_View_title_changed), (impl_Nautilus_View_history_changed): Change these all to queue the incoming call instead of doing work right away. (nautilus_view_destroy): Discard the queue. * src/nautilus-view-frame-corba.c: (impl_Nautilus_ViewFrame_open_location_force_new_window), (impl_Nautilus_ViewFrame_report_selection_change): These calls now use the deep copy, since the shallow one is no longer available. This is good since we probably will be doing queuing here later, so we'll need the deep copy. * src/nautilus-view-frame.h: * src/nautilus-view-frame.c: (nautilus_view_frame_initialize_class): Set up a map default signal handler to activate the control. This is better than the old way, where we had an explicit call to do it. (nautilus_view_frame_destroy_client): Remove unused CORBA_Environment. (view_frame_activated): Remove unneeded ACTIVATING state. Also send the client_loaded signal in here, so you can't "forget". (view_frame_wait), (view_frame_underway), (view_frame_wait_is_over), (view_frame_loaded), (view_frame_failed): Remove unneeded ACTIVATING state. (check_if_view_is_gone): Simplify logic and make sure to check the value of the exception and not just the function result. (attach_client): Fix CORBA_Exception that was allocated twice and that could also be allocated and not freed in some cases. (activation_callback), (nautilus_view_frame_load_client_async): Better names, use new API, still not tested. (nautilus_view_frame_load_client): Get rid of function result and use unified interface for telling about success and failure so that sync. and async. interfaces will be the same. (nautilus_view_frame_stop): Renamed this single function, which will soon stop either activation that's in process or loading that's in process with a single call. For now it's just the same as the old stop_loading call. (nautilus_view_frame_map): New override to activate the control. This replaces the old explicit activate call. (send_history), (nautilus_view_frame_get_is_underway): Remove unneeded ACTIVATING state. * src/nautilus-window.h: * src/nautilus-window-manage-views.c: (location_has_really_changed): Assume that new_content_view is not NULL. The old code was trying to be inappropriately "general". (disconnect_destroy_unref_view): Remove now-unused function. (load_content_view): Don't use a return value any more, since it's important to set up new_content_view before any signals happen. Get rid of code that handles failure right at the start, since we now get all failures through the signal handler. (handle_view_failure): Add FIXME comments. Minor refactoring. (cancel_location_change): Eliminated now-uneeded views_shown and view_bombed_out booleans. (load_view_for_new_location): New load_content_view doesn't return a value any more. (update_state): Changed this to be a loop instead of returning a boolean and always being called in a loop. Also simplified logic so that views_shown and view_bombed_out aren't needed any more. (nautilus_window_end_location_change_callback): Use update_state directly instead of calling the old clunky change_state cover. (nautilus_window_begin_location_change): Use update_state directly instead of calling the old clunky change_state cover. (stop_loading): Call the new simple nautilus_view_frame_stop instead of nautilus_view_frame_stop_loading. (natuilus_window_stop_loading): Use update_state directly instead of calling the old clunky change_state cover. (nautilus_window_set_content_view): Use update_state directly instead of calling the old clunky change_state cover. (nautilus_window_set_sidebar_panels): Handle failures with callback instead of looking at return value (which no longer exists). (client_loaded_callback): Add this new callback that's done when the view is activated and ready to go. (failed_callback): Use update_state directly instead of calling the old clunky change_state cover. (load_underway_callback): Use update_state directly instead of calling the old clunky change_state cover. (load_complete_callback): Use update_state directly instead of calling the old clunky change_state cover. * src/nautilus-window.c: (nautilus_window_set_content_view_widget): Get rid of explicit activation, no longer needed now that NautilusViewFrame handles it directly. * test/test-nautilus-async-activation.c: (activation_callback), (main): Change to use new async. API. * user-guide/gnufdl/.cvsignore: Add to ignore some missing files.
* Updated based on recent check-ins and other contributions.Darin Adler2001-01-241-2/+1
| | | | | | | | | | | | | * AUTHORS: * THANKS: * src/nautilus-window-menus.c: (help_menu_about_nautilus_callback): Updated based on recent check-ins and other contributions. * check-THANKS.pl: Updated to check the about list against the AUTHORS file and to fix some other things. * libnautilus/nautilus-view-component.idl: Fix a comment and remove a stray empty line.
* reviewed by: Pavel Cisler <pavel@eazel.com>Maciej Stachowiak2001-01-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug 5943 (Throbber crashes on nautilus startup (crashing Nautilus) with some themes and configurations) * components/help/hyperbola-main.c: (main): * components/image-viewer/nautilus-image-view.c: (init_server_factory): * components/mozilla/main.c: (main): * components/music/main.c: (main): * components/notes/nautilus-notes.c: (main): * components/services/install/nautilus-view/main.c: (main): * components/services/login/nautilus-view/main.c: (main): * components/services/summary/nautilus-view/main.c: (main): * components/shell/shell.c: * components/text/main.c: (main): * components/throbber/main.c: (main): * components/tree/main.c: (main): * libnautilus/nautilus-view-standard-main.c: (nautilus_view_standard_main_multi): * nautilus-installer/src/main.c: (main): * src/nautilus-main.c: (main): Added gdk_rgb_init calls. The throbber one was causing a real 100% reproducible crash for me on Nautilus startup, the rest are pre-emptive.
* reviewed by: John Sullivan <sullivan@eazel.com>Darin Adler2001-01-181-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug 2147 (NautilusFile for trash needs non-empty values for more properties), bug 5652 (MIME type field appears but shouldn't in properties window for Trash), and bug 4620 (trash sidebar should show number of items). * libnautilus-extensions/nautilus-file.h: * libnautilus-extensions/nautilus-file-private.h: * libnautilus-extensions/nautilus-file.c: (nautilus_file_new_from_relative_uri): Create trash file subclass when appropriate. (nautilus_file_info_missing): Rename so it can be used in other source files. (nautilus_file_get_date): New method that returns numeric dates. (nautilus_file_get_date_as_string): Change to call nautilus_file_get_date to get the numeric date. (nautilus_file_get_file_type): Turn into a method. * libnautilus-extensions/nautilus-merged-directory.h: * libnautilus-extensions/nautilus-merged-directory.c: (merged_call_when_ready): Rolled in the old merged_callback_connect_directory function. (merged_contains_file): Moved down to a more appropriate part of the source file. (nautilus_merged_directory_get_real_directories): New public function for use by trash. * libnautilus-extensions/nautilus-trash-file.c: (trash_callback_hash), (trash_callback_equal), (trash_callback_destroy), (trash_callback_check_done), (trash_callback_remove_file), (ready_callback), (real_file_changed_callback), (monitor_add_file), (add_real_file), (trash_callback_remove_file_cover), (monitor_remove_file), (remove_real_file), (add_real_file_given_directory), (add_directory_callback), (remove_directory_callback), (trash_file_call_when_ready), (trash_file_cancel_call_when_ready), (trash_file_check_if_ready), (trash_file_monitor_add), (trash_file_monitor_remove), (trash_file_get_file_type), (trash_file_get_item_count), (trash_file_get_deep_counts), (trash_file_get_date), (remove_all_real_files), (nautilus_trash_file_initialize), (trash_destroy), (nautilus_trash_file_initialize_class): New code. First implementation of getting some attributes for the merged trash. Gets list of directories from the NautilusTrashDirectory object. The code in here is similar to the NautilusMergedDirectory class and at some point perhaps we can make the two share more. * libnautilus-extensions/nautilus-vfs-file.c: (vfs_file_get_file_type), (vfs_file_get_date), (nautilus_vfs_file_initialize_class): Implement the two new methods for the standard vfs case. Fixed various things that affect the properties window for the trash that showed up while I was testing the above work: * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_icon_name_for_regular_file), (nautilus_icon_factory_get_icon_name_for_file): Move trash special case out so it doesn't matter what type the trash seems to be. The old code relied on trash not being a directory. * src/file-manager/fm-properties-window.c: (create_properties_window), (create_properties_window_callback), (cancel_create_properties_window_callback), (directory_view_destroyed_callback), (remove_pending_file): Rework code to fix problems where the timed wait or the signal handler wasn't properly cleaned up. Fixed remaining bit of bug 5631 (Tear-offs of right-click menus don't work.): * src/file-manager/nautilus-desktop-icon-view-ui.xml: Mark Disks right-click submenu so it won't get a tear-off item. Fixed bug 5650 (nautilus --quit fails to return to prompt sometimes): * src/nautilus-application.c: (nautilus_application_startup): Add special case so "nautilus --quit" doesn't hang waiting for a response from the (now quit) "server" instance of Nautilus. * src/nautilus-shell-interface.idl: Had to make the quit call no longer be "oneway" to get it to work right, otherwise the quit message could be lost when the sending application exited too fast. Fix bug 5675 (Nitpicks in new "could not be moved to new special location" dialog): * libnautilus-extensions/nautilus-file-operations.c: (handle_transfer_overwrite): Updated message wording as Eli (and Vera) suggest. Other changes: * libnautilus-extensions/nautilus-view-identifier.c: (get_lang_list): Fix comment and a small storage leak in the case where lang_with_locale is non-NULL but empty. * po/POTFILES.ignore: Obsolete file, no longer used. * src/file-manager/fm-desktop-icon-view.c: (update_home_link_and_delete_copies): Update comment to help translators understand better. * libnautilus-extensions/nautilus-directory-async.c: (directory_load_callback): Added a new assertion that could help in future gnome-vfs debugging. * libnautilus/nautilus-view-component.idl: Removed long-ago-fixed FIXME comment. * src/nautilus-window-manage-views.c: Tweak spacing.
* reviewed by: Rebecca Schulman <rebecka@eazel.com>Pavel Cisler2001-01-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-04 Pavel Cisler <pavel@eazel.com> reviewed by: Rebecca Schulman <rebecka@eazel.com> Fix 5451 - GnomeVFS-WARNING received at startup. * libnautilus/nautilus-view-standard-main.c: (nautilus_view_standard_main_multi): New standard module initialization call was not initializing or shutting down gnome_vfs. * components/adapter/main.c: (main): * components/hardware/main.c: (main): * components/html/ntl-web-browser.c: (main): * components/mozilla/main.c: (main): * components/music/main.c: (main): * components/notes/nautilus-notes.c: (main): * components/rpmview/main.c: (main): * components/text/main.c: (main): * components/tree/main.c: (main): All of the above modules were initializing gnome_vfs but never shutting it down. Add proper gnome_vfs_shutdown call. This very likely fixes a problem with the notes module, etc. sticking around after Nautilus quits.
* reviewed by: Pavel Cisler <pavel@eazel.com>Darin Adler2001-01-043-44/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix bug 5235 ("Forget History" eliminates history from Go menu, not History sidebar panel). * components/history/nautilus-history-view.c: (install_icons): Fix leak of pixmap and bitmap. (update_history): Replaced dual lock system with a single one. (button_press_callback): Only respect button 1, ignore others. (button_release_callback): Only respect button 1, ignore others, (history_changed_callback): A new single callback for when the history list changes to replace the multiple callbacks before. (nautilus_history_view_initialize_class), (nautilus_history_view_initialize), (nautilus_history_view_destroy), (main): Change the history view to use nautilus_view_standard_main which requires a subclass. This gets rid of a lot of boilerplate code. * libnautilus/nautilus-view-component.idl: Make every NautilusView get an explicit history_changed call instead of requiring them to guess when to get history. Removed the old get_history_list call and also renamed the HistoryList sequence to History. * libnautilus/nautilus-view.h: * libnautilus/nautilus-view.c: (impl_Nautilus_View_history_changed), (nautilus_view_initialize_class): Added the necessary stuff to cover the new history_changed call. * src/nautilus-view-frame.h: * src/nautilus-view-frame.c: (nautilus_view_frame_initialize): Connect handlers so we can send history_changed calls to the NautilusView when either the history or the icons change. (nautilus_view_frame_destroy): Change state to EMPTY so the history signal won't be sent once the frame is destroyed. (view_frame_activated): Send a history_changed to every newly-activated view. (get_CORBA_object): Helper function to make code that makes CORBA calls simpler. (check_if_view_is_gone): Use get_CORBA_object. (attach_client): Gave a nicer name, removed the code that makes the Nautilus_HistoryFrame interface. (nautilus_view_frame_load_client): Do the attach_client (formerly nautilus_view_frame_set_to_component) before calling view_frame_activated. This is needed since view_frame_activated now sends a history_changed to the view. (nautilus_view_frame_load_location), (nautilus_view_frame_stop_loading), (nautilus_view_frame_selection_changed), (nautilus_view_frame_title_changed): Use get_CORBA_object. (get_history_list): Made this private. (send_history): Helper function that sends history to the view if it's in the appropriate state. * src/Makefile.am: * src/nautilus-history-frame.c: * src/nautilus-history-frame.h: Removed the old NautilusHistoryFrame, which is no longer needed since we put the history call right in the NautilusView class. * src/nautilus-window-manage-views.c: (get_history_list_callback): Updated for Nautilus_HistoryList -> Nautilus_History change. Fix bug 5391 ("Esc" Canceling of an icon stretch doesn't restore icon position.). * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (clear_drag_state): Add a single bottleneck function to make sure the context menu timeout always gets canceled. (continue_stretching): Remove the unused "update_position" parameter. (undo_stretching): Consolidate the cancel_stretching function and restore the icon's position as well as its size. Also use the new bottleneck to clear the drag state. (button_release_event): Use the new bottleneck to clear the drag state. (show_context_menu_callback): Use the new bottleneck to clear the drag state. (nautilus_icon_container_set_selection), (nautilus_icon_container_select_list_unselect_others): Take advantage of the defaults in g_hash_table_new and use NULL, NULL instead of g_direct_hash, g_direct_equal. (nautilus_icon_container_show_stretch_handles): Save the position as well as the size. (compute_stretch): Add a FIXME with a bug number. Fix bug 5407 (Make "Hardware Overview" title translatable). * components/hardware/nautilus-hardware-view.c: (nautilus_hardware_view_destroy): Remove unused uri field. (extract_info): Fix storage leak. (get_RAM_description): Get rid of code that non-portably relies on long long. Mark strings for translation. (get_IDE_description): Get rid of code that non-portably relies on long long. Mark strings for translation. (setup_overview_form): Marked string for translation. (setup_CPU_form), (setup_RAM_form), (setup_IDE_form), (is_location), (nautilus_hardware_view_load_uri): Disable the views other than the overview for now since they are not ready to be seen. (nautilus_hardware_view_drag_data_received): Get rid of the code that makes the hardware view accept a URI list drag. Fix bug 5405 (nautilus --check fails when using LC_ALL=sv_SE due to missing entry in POTFILES.in). * po/POTFILES.in: Added nautilus-glib-extensions.c. Other changes. * src/nautilus-signaller.h: * src/nautilus-signaller.c: (nautilus_signaller_initialize_class), (nautilus_signaller_get_current): Change the NautilusSignaller class so that the interface calls the object a GtkObject * and the details of the class are hidden. * src/nautilus-property-browser.c: (emit_emblems_changed_signal): * src/nautilus-search-bar-criterion.c: (nautilus_search_bar_criterion_destroy), (nautilus_search_bar_criterion_new_from_values): * src/nautilus-window-menus.c: (nautilus_window_initialize_go_menu): * src/nautilus-window.c: (nautilus_send_history_list_changed): Now that nautilus_signaller_get_current returns a GtkObject, remove some unnecessary casts. * components/html/glibwww-callbacks.c: (get_sock_info), (glibwww_timer_register): * components/tree/nautilus-tree-model.c: (nautilus_tree_model_initialize): * components/tree/nautilus-tree-view.c: (nautilus_tree_view_initialize): * libnautilus-extensions/nautilus-directory-async.c: (async_job_start): * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_notify_files_added), (nautilus_directory_notify_files_removed), (nautilus_directory_notify_files_moved): * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_initialize): * libnautilus-extensions/nautilus-list.c: (nautilus_list_set_selection): * libnautilus-extensions/nautilus-merged-directory.c: (nautilus_merged_directory_initialize): * libnautilus-extensions/nautilus-trash-directory.c: (nautilus_trash_directory_initialize): * src/file-manager/fm-properties-window.c: (fm_properties_window_present): Take advantage of the defaults in g_hash_table_new and use NULL, NULL instead of g_direct_hash, g_direct_equal.
* reviewed by: Darin Adler <darin@eazel.com>Maciej Stachowiak2000-12-216-5/+312
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libnautilus/nautilus-view.c, libnautilus/nautilus-view.h (nautilus_view_construct, nautilus_view_construct_from_bonobo_control): New construct functions so it's possible for view implementations to be subclasses of NautilusView. (nautilus_view_new_from_bonobo_control): Implement in terms of construct function. * libnautilus/nautilus-view-standard-main.h, libnautilus/nautilus-view-standard-main.c: (nautilus_view_standard_main_multi, nautilus_view_standard_main, nautilus_view_create_from_get_type): New convenience functions that encapsulate and librarify most of the cut and pasted main.c code that is in every nautilus view. (object_destroyed, make_object): Helper functions. * libnautilus/Makefile.am: Add nautilus-view-standard-main.[ch] to build. * libnautilus/nautilus-view-component.idl: Add license header comment. * libnautilus-extensions/nautilus-gtk-macros.h: Lined up the backslashes to make it easier to read and edit the multi-line macros. * components/sample/README: Explain that all files in this directory have "WHAT YOU NEED TO CHANGE" comments. * components/sample/main.c (main): Implement in terms of `nautilus_view_standard_main' and removed most of the rest of this file. Now all you have to change when writing your own view is an include and some defines at the top of the file. Added "WHAT YOU NEED TO CHANGE" comment. * components/sample/nautilus-sample-content-view.h, components/sample/nautilus-sample-content-view.c: Added "WHAT YOU NEED TO CHANGE" comments. (nautilus_sample_content_view_get_type, nautilus_sample_content_view_initialize, nautilus_sample_content_view_destroy, load_location, sample_load_location_callback, bonobo_sample_callback, sample_merge_bonobo_items_callback): Changed everything around so NautilusSampleContentView inherits from Nautilus view, not GtkLabel (the widget that happens to be in the main content area). This makes a lot more sense. Also fix bug 2410 but including alternative code to nautilus-only macros. * components/sample/nautilus-sample-content-view.oafinfo: Added "WHAT YOU NEED TO CHANGE" comment. * components/sample/Makefile.am: Added "WHAT YOU NEED TO CHANGE" comment.
* Add -ui.xml.h generated files to .cvsignore.Maciej Stachowiak2000-12-141-0/+1
| | | | | | | | | * components/loser/content/.cvsignore, components/loser/sidebar/.cvsignore, components/mozilla/.cvsignore, components/sample/.cvsignore, libnautilus/.cvsignore, src/.cvsignore, src/file-manager/.cvsignore: Add -ui.xml.h generated files to .cvsignore.
* reviewed by: John Sullivan <sullivan@eazel.com>Darin Adler2000-12-133-39/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug 1948 ("Open in New Window" menu item reuses existing window if it exists) by separating the explicit "open in new window" feature (always gives a new window) from the "open all items in new windows" preference (reuses window if one with the right location already exists). * libnautilus/nautilus-view-component.idl: Added new open_location_prefer_existing_window call. Renamed open_location to open_location_in_this_window and open_location_in_new_window to open_location_force_new_window for clarity. * libnautilus/nautilus-view.h: * libnautilus/nautilus-view.c: (nautilus_view_open_location_in_this_window), (nautilus_view_open_location_prefer_existing_window), (nautilus_view_open_location_force_new_window): * src/nautilus-view-frame-corba.c: (impl_Nautilus_ViewFrame_open_location_in_this_window), (impl_Nautilus_ViewFrame_open_location_prefer_existing_window), (impl_Nautilus_ViewFrame_open_location_force_new_window): * src/nautilus-view-frame-private.h: * src/nautilus-view-frame.c: (nautilus_view_frame_initialize_class), (nautilus_view_frame_open_location_in_this_window), (nautilus_view_frame_open_location_prefer_existing_window), (nautilus_view_frame_open_location_force_new_window): * src/nautilus-view-frame.h: Add new call, rename old ones. * src/file-manager/fm-directory-view.c: (open_callback): Pass parameter to tell the open code to respect the "use new windows" preference. (open_location): Take new WindowChoice parameter to respect preference as appropriate. (switch_location_and_view): Tell the code to respect the preference in this case (opening from Open With). (show_trash_callback): Use code that respects the preference instead of always opening in this case. (open_one_in_new_window): Always force a new window (used by Open in New Window command). (activate_callback): Pass through new WindowChoice instead of boolean. (fm_directory_view_activate_file): Pass through new WindowChoice instead of boolean., (fm_directory_view_activate_files): Respect the user preference if opening only one file, do the "use existing window or make new one" mode if opening more than one. * src/nautilus-window-manage-views.c: (handle_unreadable_location): Move check for empty location string in here. (open_location): Moved the code for reusing existing windows out of here. Also changed code structure to avoid redoing the handle_unreadable_location check. (open_location_in_this_window_callback): Renamed. (open_location_prefer_existing_window_callback): Here's where the code for reusing existing windows went. New callback for the new call/signal. (open_location_force_new_window_callback): Renamed. * src/file-manager/fm-search-list-view.c: (reveal_selected_items_callback): Change to use nautilus_view_open_location_force_new_window by its new name. * src/nautilus-window-manage-views.h: Got rid of nautilus_window_open_location_in_new_window, which was public and unused. * components/adapter/nautilus-adapter.c: (nautilus_adapter_open_location_callback): * components/help/hyperbola-nav-index.c: (hyperbola_navigation_index_select_row): * components/help/hyperbola-nav-search.c: (hyperbola_navigation_search_select_row): * components/help/hyperbola-nav-tree.c: (hyperbola_navigation_tree_select_row): * components/history/nautilus-history-view.c: (history_button_release): * components/mozilla/nautilus-mozilla-content-view.c: (mozilla_open_uri_callback), (mozilla_dom_mouse_click_callback): * components/rpmview/nautilus-rpm-view.c: (go_to_button_callback): * components/services/login/nautilus-view/nautilus-change-password-view.c: (run_away_timer), (authn_failed), (maintenance_button_cb): * components/services/summary/nautilus-view/nautilus-summary-callbacks.c: (logged_in_callback), (logged_out_callback), (preferences_button_cb), (forgot_password_button_cb), (register_button_cb): * components/services/summary/nautilus-view/nautilus-summary-dialogs.c: (error_dialog_cancel_cb): * components/services/summary/nautilus-view/nautilus-summary-footer.c: (footer_item_clicked_callback): * components/services/summary/nautilus-view/nautilus-summary-view.c: (goto_service_cb), (goto_update_cb): * components/text/nautilus-text-view.c: (handle_service_menu_item): * components/tree/nautilus-tree-view.c: (tree_select_row_callback): Change to use new nautilus_view_open_location_in_this_window name. It's better because it's more explicit, but also, it's the new name! * libnautilus-extensions/nautilus-gdk-extensions.c: (nautilus_gdk_window_bring_to_front): Fixed indentation. * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_window_present): Put in a new implementation that uses nautilus_gdk_window_bring_to_front instead of the old one that did a hide followed by a show. Corrected an assert that should have been a return_if_fail.
* Hopefully will improve performance for menu merging in a case where it isRebecca Schulman2000-12-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-07 Rebecca Schulman <rebecka@eazel.com> Hopefully will improve performance for menu merging in a case where it is poor. (bug 5020) Completely fixing the bug will involve some design changes in the way the clipboard works, though. reviewed by: John Sullivan <sullivan@eazel.com> (the additional bonobo freezes and thaws) * libnautilus/nautilus-clipboard.c: (merge_in_clipboard_menu_items), (merge_out_clipboard_menu_items): Add freezes and thaws in hopes of improving performance here * src/nautilus-window-menus.c: (nautilus_window_initialize_menus): Ditto * components/tree/nautilus-tree-view-dnd.c: (nautilus_tree_view_get_drop_action): * libnautilus-extensions/nautilus-user-level-manager.h: * src/file-manager/fm-desktop-icon-view.c: (create_mount_link): * src/nautilus-switchable-search-bar.c: (nautilus_switchable_search_bar_set_mode): * src/nautilus-window-toolbars.c: (theme_changed_callback): Removed fixme comments in cases where the fixme has been fixed.
* Ran check-headers-in-Makefile since we had some problemsDarin Adler2000-12-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | with that lately. I guess the Tinderbox is the new way to catch these problems but I couldn't resist fixing them the old way too. * check-headers-in-Makefile.pl: Added some more special cases in here to make it work better. * components/services/install/nautilus-view/Makefile.am: Marked the unused files in here as "noinst_HEADERS" as a hack to make the script happy. We should delete the files at some point if we decide we aren't ever using them. * components/loser/content/.cvsignore: * components/loser/sidebar/.cvsignore: * components/mozilla/.cvsignore: * components/sample/.cvsignore: * components/services/install/command-line/.cvsignore: * libnautilus/.cvsignore: * src/.cvsignore: * src/file-manager/.cvsignore: Removed all the .xml.h files because they aren't put in these directories any more so they don't need to be ignored. If you have the files still and the cvs warnings bother you, you can delete them.
* reviewed by: Pavel Cisler <pavel@eazel.com>Darin Adler2000-11-302-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed some problems with callbacks that are left around after the object is destroyed. * src/nautilus-window-manage-views.h: * src/nautilus-window-manage-views.c: (viewed_file_changed_callback): Changed to be a normal callback, not a "connect_object" callback, and simplified the logic. (cancel_viewed_file_changed_callback): Added a function to cancel the callback, which is needed both when the window is destroyed and when the viewed file changes. (update_for_new_location): Cancel the old callback before setting up the new one so we don't leave behind callbacks for old locations. Also use the new nautilus_window_set_viewed_file function so the callbacks set up in nautilus-window.c can be managed properly. (free_location_change): Moved part of nautilus_window_free_load_info in here. This function frees all the stuff that's used in the location change process; shared by destroy and "cancel" code. Also fixed a bug where it wouldn't free the "error_views". (cancel_location_change): Moved the rest of nautilus_window_free_load_info in here and made this use the new function. (disconnect_view): Made this private now that the code to disconnect the views is inside this file. (disconnect_view_callback), (nautilus_window_manage_views_destroy): Moved the code to clean up from nautilus-window.c in here. Added cleanup for the location change fields and for the viewd_file_changed callback. * src/nautilus-window.c: (nautilus_window_destroy): Call a new function to do the nautilus-window-manage-views.c part of the destroy and moved some code in there. Cancel the view-as callback too. (create_view_as_menu_item), (replace_special_current_view_in_view_as_menu), (nautilus_window_synch_view_as_menu): Renamed. The words "view as menu" are clearer than "content view menu". (chose_component_callback): Got rid of code that tries to handle bad values for callback data. The callback must be cancelled, because you can't call NAUTILUS_IS_WINDOW on a freed window and expect it to behave predictably. (cancel_chose_component_callback): Function to cancel the callback, called at both destroy time and before adding a new one. (view_menu_choose_view_callback): Cancel the old callback before adding a new one. (view_menu_vfs_method_callback): Simplify logic a bit. (load_view_as_menu_callback): Renamed. (cancel_view_as_callback): Function to cancel the callback, called at both destroy time and before adding a new one. (nautilus_window_load_view_as_menu): Cancel the old callback before adding a new one. Also renamed. (nautilus_window_set_viewed_file): A new function that cancels the callbacks on the file object before switching to a new one. * libnautilus-extensions/nautilus-program-choosing.c: (nautilus_cancel_choose_component_for_file): Implemented missing cancel function, needed by new window code. * src/nautilus-window-private.h: * src/nautilus-window-menus.c: (bookmarks_menu_add_bookmark_callback), (add_bookmark_for_current_location): Made the function local to this file since it's both defined and used here. * libnautilus-extensions/nautilus-glib-extensions.c: * libnautilus-extensions/nautilus-volume-monitor.c: * libnautilus/nautilus-undo-transaction.c: * libnautilus/nautilus-view.c: * librsvg/rsvg.c: Added missing "static" to make some local non-"nautilus_"-prefixed globals be internal instead of external. * src/nautilus-sidebar.c: Formatting tweaks, added FIXME.
* reviewed by: Pavel Cisler <pavel@eazel.com>Rebecca Schulman2000-11-222-63/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-21 Rebecca Schulman <rebecka@eazel.com> reviewed by: Pavel Cisler <pavel@eazel.com> Fixes for bugs 690 and 733, to make the clipboard work for file editing in place, and make sensitivity work. Paste doesn't work correctly still, and a bug is filed for this issue. * libnautilus-extensions/nautilus-entry.h: * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_initialize_class), (nautilus_entry_key_press), (nautilus_entry_motion_notify), (nautilus_entry_set_text), (nautilus_entry_set_selection), (nautilus_entry_insert_text), (nautilus_entry_delete_text): Added a new signal to nautilus entry, called "selection_changed" that is fired whenever the region selected in an editiable widget is changed. This is used to determine how to set clipboard sensitivity correctly. * libnautilus-extensions/nautilus-icon-container.h: * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_initialize_class), (nautilus_icon_container_start_renaming_selected_item), (hide_rename_widget): Add a new signal "renaming_icon", which tells the icon view to set up clipboard capabilities for the new editable widget * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-text-item.h: * libnautilus-extensions/nautilus-icon-text-item.c: (iti_stop_editing), (iti_entry_text_changed_by_clipboard), (iti_start_editing), (iti_destroy), (iti_start_selecting), (iti_stop_selecting), (iti_event), (nautilus_icon_text_item_get_renaming_editable): Sad hacks that I had to add on top of this already scary file so that the editable, which is in its own offscreen window somewhere, communicates to the clipboard what is actually going on when text is entered and selections are changed. This includes adding a new signal when text is changed, to make sure the entry knows about it, firing an initial grab focus for the widget so that the widget turns on, passing on more of the events of the canvas widget, including motion notifies and focus events, and keeping a persistent copy of the last renaming entry in the icon container so that pastes for that widget will still work. * libnautilus/nautilus-clipboard.h: * libnautilus/nautilus-clipboard.c: (set_menu_item_sensitive), (set_paste_sensitive_if_clipboard_contains_data), (set_clipboard_menu_items_sensitive), (set_clipboard_menu_items_insensitive), (clipboard_items_are_merged_in), (set_clipboard_items_are_merged_in), (merge_in_clipboard_menu_items), (merge_out_clipboard_menu_items), (focus_changed_callback), (grab_focus_callback), (selection_changed_callback), (initialize_clipboard_component_with_callback_data), (nautilus_clipboard_set_up_editable), (widget_was_set_up_with_selection_sensitivity), (first_focus_callback), (nautilus_clipboard_set_up_editable_in_control): Reorganized some of the code, and also added new callbacks to deal with sensitivity changes. * src/file-manager/fm-directory-view.h: * src/file-manager/fm-directory-view.c: (fm_directory_view_get_bonobo_control): Add a new function that the icon view uses to pass the bonobo control for clipboard set up * src/file-manager/fm-icon-view.c: (renaming_icon_callback), (create_icon_container): Set up clipboard capabilities when the renaming widget is created. * src/nautilus-location-bar.c: (nautilus_location_bar_new): * components/notes/nautilus-notes.c: (make_notes_view): * src/nautilus-simple-search-bar.c: (nautilus_simple_search_bar_new): Changed calls to clipboard set up routines to include the new shares_selection_changes parameter. Widgets that use the "selection_changed" signal (NautilusEntries) say "TRUE" here, otherwise selection doesn't work quite right, and FALSE is used instead. * src/nautilus-search-bar-criterion.c: (get_size_location_for): Deal with the case when a user has entered a non-numeric size in a smart way, by using nautilus_str_to_int. This is related to bug 2438, but is not a complete fix.
* reviewed by: Darin Adler <darin@eazel.com>John Sullivan2000-11-171-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Final changes to kill off the legendary bug 3579 (Convert directory view context menus to use Bonobo) * libnautilus/nautilus-bonobo-ui.h: #define for zoom items placeholder in popup. Remove #defines for popup-specific zooming commands, since now we don't need distinct popup-specific ones. * libnautilus-extensions/nautilus-bonobo-extensions.h: * libnautilus-extensions/nautilus-bonobo-extensions.c: (nautilus_bonobo_set_label_for_menu_item_and_command): Moved this here and commented; it had been a private function in fm-directory-view.c. * src/file-manager/fm-directory-view.c: (real_merge_menus): Just hide the placeholder for the zoom items, which is now sufficient due to a Bonobo fix Darin made. (real_update_menus): Update for API name change. (set_label_for_menu_and_command): Moved this to another file and renamed it. * src/file-manager/fm-icon-view.c: (fm_icon_view_update_menus): Update the dynamic menu items in-line here, as was done with fm-directory-view.c in an earlier checkin. (compute_menu_item_info), (update_one_menu_item): Removed these obsolete functions. * src/nautilus-shell-ui.xml: Eliminated special pop-up versions of zoom commands. They existed only to allow hiding without affecting the menu-bar versions, but now that placeholders can be hidden these aren't necessary. * src/nautilus-window-menus.c: (nautilus_window_initialize_menus): Removed verb installation for pop-up versions of zoom commands.
* reviewed by: Darin Adler <darin@eazel.com> reviewed by: Maciej StachowiakMartin Baulig2000-11-164-738/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-10-22 Martin Baulig <baulig@suse.de> reviewed by: Darin Adler <darin@eazel.com> reviewed by: Maciej Stachowiak <mjs@eazel.com> Use the new Bonobo::Zoomable interface instead of Nautilus::Zoomable. * libnautilus/nautilus-zoomable.[ch]: Removed. * src/nautilus-zoomable-frame-corba.c: Removed. * libnautilus/nautilus-view-component.idl (ZoomLevels, ZoomLevelList, Zoomable, ZoomableFrame): Removed. * src/nautilus-view-frame-private.h (impl_Nautilus_ZoomableFrame_vepv, impl_Nautilus_ZoomableFrame__create): Removed external declarations. * src/nautilus-view-frame.h: include <bonobo/bonobo-zoomable-frame.h>. (NautilusViewFrame): Removed the `zoomable' field and changed the type of the `zoomable_frame' field from BonoboObject into BonoboZoomableFrame. (NautilusViewFrameClass): Added `zoom_parameters_changed' signal. * src/nautilus-view-frame.c (nautilus_view_frame_destroy_client): Don't release `view->zoomable' and set `view->history_frame' and `view->zoomable_frame' to NULL, not to CORBA_OBJECT_NIL. (nautilus_view_frame_initialize_class): Added ZOOM_PARAMETERS_CHANGED signal. (zoom_level_changed_callback): New static callback function; this emits the ZOOM_LEVEL_CHANGED signal on the NautilusViewFrame. (zoom_parameters_changed_callback): New static callback function; this emits the ZOOM_PARAMETERS_CHANGED signal on the NautilusViewFrame. (nautilus_view_frame_set_to_component): QI the adapted component for "IDL:Bonobo/Zoomable:1.0" and - if it was found - create the BonoboZoomableFrame, bind it to the BonoboZoomable and connect the "zoom_level_changed" and the "zoom_parameters_changed" signals. (nautilus_view_frame_is_zoomable): Return `view->zoomable_frame != NULL'. (nautilus_view_frame_get_zoom_level): Check whether view->zoomable_frame is not NULL and call bonobo_zoomable_frame_get_zoom_level(). (nautilus_view_frame_set_zoom_level): Check whether view->zoomable_frame is not NULL and call bonobo_zoomable_frame_set_zoom_level(). (nautilus_view_frame_get_min_zoom_level): Check whether view->zoomable_frame is not NULL and call bonobo_zoomable_frame_get_min_zoom_level(). (nautilus_view_frame_get_max_zoom_level): Check whether view->zoomable_frame is not NULL and call bonobo_zoomable_frame_get_max_zoom_level(). (nautilus_view_frame_get_has_min_zoom_level): New function. Check whether view->zoomable_frame is not NULL and call bonobo_zoomable_frame_has_min_zoom_level(). (nautilus_view_frame_get_has_max_zoom_level): New function. Check whether view->zoomable_frame is not NULL and call bonobo_zoomable_frame_has_max_zoom_level(). (nautilus_view_frame_get_is_continuous): New function. Check whether view->zoomable_frame is not NULL and call bonobo_zoomable_frame_is_continuous(). (nautilus_view_frame_get_preferred_zoom_levels): If view->zoomable_frame is NULL, return NULL. Otherwise bonobo_zoomable_frame_get_preferred_zoom_levels() returns GList * of floats which we can just return. (nautilus_view_frame_zoom_in): If view->zoomable_frame is not NULL, call bonobo_zoomable_frame_zoom_in(). (nautilus_view_frame_zoom_out): If view->zoomable_frame is not NULL, call bonobo_zoomable_frame_zoom_out(). (nautilus_view_frame_zoom_to_fit): If view->zoomable_frame is not NULL, call bonobo_zoomable_frame_zoom_out(). (nautilus_view_frame_zoom_level_changed): Removed. * src/nautilus-zoom-control.c (NautilusZoomControlDetails): Added `has_min_zoom_level' and `has_max_zoom_level'. (draw_zoom_control_image): Call nautilus_zoom_control_can_zoom_in/out() to find out whether we can zoom. (zoom_menu_callback): Likewise. (nautilus_zoom_control_button_press_event): Likewise. (create_zoom_menu_item): Changed the type of the `zoom_level' argument from double to float. (nautilus_zoom_control_set_min_zoom_level): Removed. (nautilus_zoom_control_set_max_zoom_level): Removed. (nautilus_zoom_control_set_preferred_zoom_levels): Removed. (nautilus_zoom_control_set_parameters): New function. (nautilus_zoom_control_has_min_zoom_level): New function. (nautilus_zoom_control_has_max_zoom_level): New function. (nautilus_zoom_control_can_zoom_in): New function. (nautilus_zoom_control_can_zoom_out): New function. * src/file-manager/fm-directory-view.c: #include <bonobo/bonobo-zoomable.h> instead of <libnautilus/libnautilus-zoomable.h>. (FMDirectoryViewDetails): Changed the type of `zoomable' to BonoboZoomable. (fm_directory_view_preferred_zoom_levels): Made this an array of float, not double. (fm_directory_view_initialize): Create a new BonoboZoomable object here. (zoomable_zoom_in_callback): The first argument is now a BonoboZoomable. (zoomable_zoom_out_callback): The first argument is now a BonoboZoomable. (nautilus_zoom_level_from_double): Renamed into nautilus_zoom_level_from_float(). (zoomable_set_zoom_level_callback): The first argument is now a BonoboZoomable and the second one a float. (zoomable_zoom_to_fit_callback): The first argument is now a BonoboZoomable. (fm_directory_view_set_zoom_level): Call bonobo_zoomable_report_zoom_level_changed() instead of using nautilus_zoomable_set_zoom_level(). * src/nautilus-window-manage-views.c: (zoom_level_changed_callback): Don't call nautilus_zoom_control_set_min_zoom_level(), nautilus_zoom_control_set_max_zoom_level() and nautilus_zoom_control_set_preferred_zoom_levels() here. Use nautilus_zoom_control_can_zoom_in/out() to find out whether we can zoom in the calls to nautilus_bonobo_set_sensitive(). , (zoom_parameters_changed_callback): New callback function. Call nautilus_zoom_control_set_parameters() and - if the zoom_level is not 0.0 - zoom_level_changed_callback(). * components/adapter/nautilus-zoomable-proxy.[ch]: New files. * components/adapter/Makefile.am (nautilus_adapter_SOURCES): Added nautilus-zoomable-proxy.c and nautilus-zoomable-proxy.h. * components/adapter/nautilus-adapter-embed-strategy.c (NautilusAdapterEmbedStrategyClass): Added new virtual signal `get_zoomable' which must be overridden. (nautilus_adapter_embed_strategy_initialize_class): Assign it here. (nautilus_adapter_embed_strategy_get_zoomable): New static function; call the virtual `get_zoomable' in the derived class. * components/adapter/nautilus-adapter-control-embed-strategy.c: (nautilus_adapter_control_embed_strategy_initialize_class): Assign nautilus_adapter_control_embed_strategy_get_zoomable() as handler of the `get_zoomable' signal. (nautilus_adapter_control_embed_strategy_new): QI the Control for "IDL:Bonobo/Zoomable:1.0" and pass it to nautilus_zoomable_proxy_get() if found and store the return value in strategy->details->zoomable. (nautilus_adapter_control_embed_strategy_get_zoomable): New static function; return strategy->details->zoomable which is set in nautilus_adapter_control_embed_strategy_new(). * components/adapter/nautilus-adapter-embeddable-embed-strategy.c: (nautilus_adapter_embeddable_embed_strategy_initialize_class): Assign nautilus_adapter_embeddable_embed_strategy_get_zoomable() as handler of the `get_zoomable' signal. (nautilus_adapter_embeddable_embed_strategy_new): QI the View for "IDL:Bonobo/Zoomable:1.0" and pass it to nautilus_zoomable_proxy_get() if found and store the return value in strategy->details->zoomable. (nautilus_adapter_embeddable_embed_strategy_get_zoomable): New static function; return strategy->details->zoomable which is set in nautilus_adapter_embeddable_embed_strategy_new(). * components/adapter/nautilus-adapter.c: (nautilus_adapter_new): Call nautilus_adapter_embed_strategy_get_zoomable(embed_strategy) and bonobo_add_interface() it to the control if found. * components/image-viewer/nautilus-image-view.c: Rewrote the Nautilus image viewer to be a BonoboControl, to add zoomable support to it and to merge back everything from bonobo-image-generic into it.
* Fixed a couple of cases where context menus appeared onJohn Sullivan2000-11-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | the desktop that should have been hidden. This leaves behind a new (Bonobo) bug where there are two adjacent separators in the desktop background context menu, which I will write up. reviewed by: Maciej Stachowiak <mjs@eazel.com> * libnautilus/nautilus-bonobo-ui.h: Add popup zooming commands here that need to be manipulated by directory view. * src/file-manager/fm-directory-view.c: (real_merge_menus): Hide the zooming items in the popup if the directory view does not support zooming (e.g., desktop) * src/file-manager/fm-icon-view.c: (fm_icon_view_merge_menus): Hide the Lay Out submenu in the popup if the icon view does not support auto-layout (e.g., desktop) * src/nautilus-shell-ui.xml: Make zooming items in popup use different commands than zooming items in normal menu, so they can be hidden independently. * src/nautilus-window-menus.c: (nautilus_window_initialize_menus): Attach callbacks to new popup zooming items.
* Fixed bug 1633, History sidebar panel items all display generic bookmarkGene Z. Ragan2000-11-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-13 Gene Z. Ragan <gzr@eazel.com> Fixed bug 1633, History sidebar panel items all display generic bookmark icon. * libnautilus/nautilus-view-component.idl: Added icon string element to History structure to hold an pifbuf converted to a XML string. * src/nautilus-window-manage-views.c: (get_history_list_callback): Get bookmark pixbuf, convert it to XML and copt the XML string into the CORBA structure that is added to the list to be returned. * components/history/nautilus-history-view.c: (install_icon): Check and see if pixbuf is non-NULL. If it is, use it. Otherwise use the generic bookmark icon. (history_view_update_icons): Reload entire list to ensure that proper icons are used. (history_load_location): Call install_icon with new pixbuf parameter.
* reviewed by: Darin Adler <darin@eazel.com>Pavel Cisler2000-11-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-13 Pavel Cisler <pavel@eazel.com> reviewed by: Darin Adler <darin@eazel.com> * configure.in: Enable the sign-compare and cast-align warnings. * components/help/converters/gnome-db2html2/gdb3html.c: (find_first_element): * components/help/hyperbola-filefmt.c: (fmt_free_tree_info): * components/help/hyperbola-nav-index.c: (hyperbola_navigation_index_update_clist), (despace), (end_element): * components/history/nautilus-history-view.c: (history_load_location): * components/mozilla/nautilus-mozilla-content-view.c: (string_list_get_index_of_string): * components/services/install/lib/eazel-install-corba-types.c: (corba_string_sequence_to_glist), (corba_packagedatastructlist_from_packagedata_list), (packagedata_list_from_corba_packagedatastructlist), (categorydata_list_from_corba_categorystructlist): * components/services/install/lib/eazel-install-query.c: (eazel_install_simple_rpm_query): * components/services/install/lib/eazel-install-rpm-glue.c: (eazel_install_monitor_rpm_process_pipe): * components/services/install/lib/eazel-install-rpm-signature.c: (read_rpm_lead), (read_rpm_signature): * components/services/trilobite/libtrilobite/trilobite-root-helper. c: (trilobite_root_helper_run_program), (trilobite_root_helper_set_time): * cut-n-paste-code/widgets/nautilusclist/nautilusclist.c: (nautilus_clist_get_arg), (nautilus_clist_construct): * helper-utilities/authenticate/nautilus-authenticate.c: (main): * libnautilus-extensions/nautilus-background.c: (set_image_and_color_image_loading_done_callback): * libnautilus-extensions/nautilus-buffered-widget.c: (nautilus_gdk_pixbuf_tile_alpha): * libnautilus-extensions/nautilus-caption-table.c: (entry_activate): * libnautilus-extensions/nautilus-caption-table.h: * libnautilus-extensions/nautilus-ctree.c: (nautilus_ctree_node_nth), (nautilus_ctree_drag_motion): * libnautilus-extensions/nautilus-ctree.h: * libnautilus-extensions/nautilus-directory-async.c: (metafile_write): * libnautilus-extensions/nautilus-file-changes-queue.c: (nautilus_file_changes_consume_changes): * libnautilus-extensions/nautilus-file-operations-progress.c: (truncate_string_from_start): * libnautilus-extensions/nautilus-file-operations.c: (extract_string_until): * libnautilus-extensions/nautilus-file-utilities.c: (nautilus_read_entire_file): * libnautilus-extensions/nautilus-gdk-extensions.c: (nautilus_get_largest_fitting_font): * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_get_sidebar_panel_view_identifiers): * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_window_set_initial_geometry_from_string), (nautilus_gtk_menu_set_item_visibility): * libnautilus-extensions/nautilus-icon-canvas-item.c: (draw_or_measure_label_text), (draw_or_measure_label_text_aa): * libnautilus-extensions/nautilus-icon-container.c: (rubberband_timeout_callback), (destroy), (compute_stretch): * libnautilus-extensions/nautilus-icon-container.h: (nautilus_icon_container_find_drop_target): * libnautilus-extensions/nautilus-icon-factory.c: (check_recently_used_list), (get_themed_icon_file_path), (revise_scale_factors_if_too_big): * libnautilus-extensions/nautilus-icon-text-item.c: (recompute_bounding_box), (iti_draw), (iti_selection_motion): * libnautilus-extensions/nautilus-label.c: (nautilus_label_size_allocate), (label_recompute_line_geometries): * libnautilus-extensions/nautilus-list.c: (draw_cell), (nautilus_list_drag_data_received): * libnautilus-extensions/nautilus-mime-actions.c: (server_matches_content_requirements), (nautilus_do_component_query): * libnautilus-extensions/nautilus-password-dialog.c: (caption_table_activate_callback): * libnautilus-extensions/nautilus-preferences-item.c: (has_image_file): * libnautilus-extensions/nautilus-scalable-font.c: (file_as_string), (parse_font_description_file), (nautilus_text_layout_new): * libnautilus-extensions/nautilus-scalable-font.h: * libnautilus-extensions/nautilus-volume-monitor.c: (check_permissions): * libnautilus/nautilus-view.c: (nautilus_shallow_g_list_from_uri_list): * libnautilus/nautilus-zoomable.c: (nautilus_g_list_from_ZoomLevelList): * librsvg/rsvg-ft.c: (rsvg_ft_measure_or_render_string): * librsvg/rsvg.c: (rsvg_parse_transform): * src/file-manager/fm-icon-view.c: (fm_icon_view_create_background_context_menu_items), (get_sort_criterion_by_metadata_text), (get_sort_criterion_by_id): * src/file-manager/fm-list-view.c: (select_row_common), (select_matching_name_callback), (select_previous_next_common), (fm_list_view_bump_zoom_level): * src/nautilus-search-bar-criterion.c: (nautilus_search_bar_criterion_update_valid_criteria_choices): * src/nautilus-shell.c: (corba_open_windows), (corba_open_default_window): * src/nautilus-sidebar.c: (nautilus_sidebar_add_panel_items): * src/nautilus-window-menus.c: (nautilus_window_disable_keyboard_navigation_for_menus): * src/nautilus-window.c: (nautilus_window_size_request): Fix all sign-compare violations.
* Tell everyone that we are back on bonobo HEAD. Make sure Nautilus doesn'tDarin Adler2000-11-045-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * README: Tell everyone that we are back on bonobo HEAD. * configure.in: Make sure Nautilus doesn't try to compile with the old bonobo. * components/adapter/nautilus-adapter-embed-strategy.c: (nautilus_adapter_embed_strategy_get): * components/adapter/nautilus-adapter-load-strategy.c: (nautilus_adapter_load_strategy_get): * components/adapter/nautilus-adapter-progressive-load-strategy.c: (nautilus_adapter_progressive_load_strategy_load_location): * components/history/nautilus-history-view.c: (history_view_frame_call_begin): * libnautilus/nautilus-undo.c: (set_up_bonobo_control): * libnautilus/nautilus-view.c: (view_frame_call_begin): * libnautilus/nautilus-zoomable.c: (nautilus_zoomable_ensure_zoomable_frame): Fix all the callers of query_interface in CORBA to call it queryInterface (I used the Bonobo script to do it). * src/nautilus-window.h: * src/nautilus-window.c: (nautilus_window_constructed), (nautilus_window_set_arg), (nautilus_window_get_arg), (nautilus_window_set_content_view_widget): Update for BonoboWin -> BonoboWindow change. Once again, the change was done by the Bonobo script (but I had to undo the spaces it ate after BONOBO_WIN). * components/services/install/idl/trilobite-eazel-install.idl: * components/services/time/idl/trilobite-eazel-time-service.idl: * components/services/trilobite/idl/trilobite-service.idl: * components/services/trilobite/sample/idl/sample-service.idl: * libnautilus-adapter/nautilus-adapter-factory.idl: * libnautilus/nautilus-distributed-undo.idl: * libnautilus/nautilus-view-component.idl: Since IDL dependencies don't work, I touched every IDL file to make the switchover smoother. This only works if people update before they try to build and fail, otherwise they need to do: find -name '*.xml' | xargs touch (Maciej and I want to add dependency support to orbit-idl to make this problem go away long term). * src/nautilus-desktop-window.c: (realize): The script updated this comment to, so I let it. * user-guide/C/Makefile.am: Took out the botched change I made to this file. Mathieu did the correct one.
* Fixed bug 4057 (clicking the back button while opening a hugeDarin Adler2000-10-302-38/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | directory often crashes). * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_for_each): The function was iterating some icons twice. All the icons on the new_icons list are also on the icons list. (icon_destroy): Also be sure to remove the icon from the new_icons list if it happens to be destroyed while still on that list. * configure.in: * Makefile.shared: Got rid of the shared part of the code to generate .xml.h files. It's no longer needed since the po directory takes care of everything itself. * components/loser/content/Makefile.am: * components/loser/sidebar/Makefile.am: * components/mozilla/Makefile.am: * components/sample/Makefile.am: * components/services/summary/nautilus-view/Makefile.am: * libnautilus/Makefile.am: * src/Makefile.am: * src/file-manager/Makefile.am: Got rid of the per-directory part of the code to generate .xml.h files. * components/loser/content/nautilus-content-loser-ui.xml.h: * components/loser/sidebar/nautilus-sidebar-loser-ui.xml.h: * components/mozilla/nautilus-mozilla-ui.xml.h: * components/sample/nautilus-sample-content-view-ui.xml.h: * components/services/summary/nautilus-view/nautilus-summary-view-ui.xml.h: * libnautilus/nautilus-clipboard-ui.xml.h: * src/file-manager/nautilus-directory-view-ui.xml.h: * src/file-manager/nautilus-icon-view-ui.xml.h: * src/file-manager/nautilus-search-list-view-ui.xml.h: * src/nautilus-service-ui.xml.h: * src/nautilus-shell-ui.xml.h: Got rid of the checked-in copies of the .xml.h files. The worst part!
* Fixing bad spelling in caveat.J Shane Culpepper2000-10-301-0/+8
| | | | | | | | | | | | | | | | | | | | 2000-10-29 J Shane Culpepper <pepper@eazel.com> * components/loser/content/nautilus-content-loser-ui.xml.h: * components/loser/sidebar/nautilus-sidebar-loser-ui.xml.h: * components/mozilla/nautilus-mozilla-ui.xml.h: * components/sample/nautilus-sample-content-view-ui.xml.h: * components/services/summary/nautilus-view/nautilus-summary-view-u i.xml.h: * libnautilus/nautilus-clipboard-ui.xml.h: * src/file-manager/nautilus-directory-view-ui.xml.h: * src/file-manager/nautilus-icon-view-ui.xml.h: * src/file-manager/nautilus-search-list-view-ui.xml.h: * src/nautilus-service-ui.xml.h: * src/nautilus-shell-ui.xml.h: * src/nautilus-shell.c: (display_caveat): Fixing bad spelling in caveat.
* Fixed bugs in file renaming. These changes along with theDarin Adler2000-10-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gnome-vfs ones take care of bug 3846 (cancel dialog persists after renaming online storage folder). * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_gnome_vfs_uri): Moved higher so it could be used by rename code. (operation_remove): Separated out the remove operation so we can remove the operation before the callback. This makes it safe to do a nautlius_file_cancel from inside a callback. (operation_free): Call the separate remove. Also cut down because we don't need so much state in the operation object any more. (operation_complete): Call remove before calling callback as described above. (rename_callback): A new callback that uses set_file_info results instead of the old one that used xfer. (nautilus_file_rename): Change to use set_file_info instead of xfer. Also updates the MIME type now, which will fix a bug I think. (nautilus_file_update_info): Use gnome_vfs_file_info_dup instead of gnome_vfs_file_info_ref so it works with any info, including static ones on the stack. (set_permissions_callback), (nautilus_file_set_permissions), (set_owner_and_group_callback), (set_owner_and_group): Change to use the info returned by the async. set_file_info. This simplifies things a lot. * src/file-manager/fm-error-reporting.c: (rename_callback), (cancel_rename_callback), (cancel_rename), (fm_rename_file): Rewrote renaming code. Use object data to keep track of pending renames so we can cancel a previous one if we try to re-rename the same file again. This allowed the code to get a lot simpler too. * libnautilus-extensions/nautilus-directory-async.c: (directory_load_done): Fixed bug that prevented the directory from ever noticing files that are no longer around. This code never worked because we checked for the wrong error code (EOF means success here). * po/Makefile.in.in: Re-removed this file. Seth checked it in by accident. This is a generated file, not one that should be checked in. * src/nautilus-window.c: (nautilus_window_realize): Got rid of "//"-style comments and used #if 0 instead. * components/loser/content/nautilus-content-loser-ui.xml.h: * components/loser/sidebar/nautilus-sidebar-loser-ui.xml.h: * components/mozilla/nautilus-mozilla-ui.xml.h: * components/sample/nautilus-sample-content-view-ui.xml.h: * components/services/summary/nautilus-view/nautilus-summary-view-ui.xml.h: * libnautilus/nautilus-clipboard-ui.xml.h: * src/file-manager/nautilus-directory-view-ui.xml.h: * src/file-manager/nautilus-icon-view-ui.xml.h: * src/file-manager/nautilus-search-list-view-ui.xml.h: * src/nautilus-service-ui.xml.h: * src/nautilus-shell-ui.xml.h: Someone checked in some .xml.h files generated with an old Bonobo. Soon, this nightmare will be over and we won't check these files in any more.
* This is Maciej checking in Martin's fix for 3691. Credit to him,Maciej Stachowiak2000-10-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | blame to me. * components/adapter/nautilus-adapter-embed-strategy.h (NautilusAdapterEmbedStrategyClass): Added "activate" and "deactivate" signals. (nautilus_adapter_embed_strategy_get): Removed ui_container argument. (nautilus_adapter_embed_strategy_activate): New function; emits the "activate" signal. (nautilus_adapter_embed_strategy_deactivate): New function; emits the "deactivate" signal. * components/adapter/nautilus-adapter-control-embed-strategy.c (nautilus_adapter_control_embed_strategy_activate): New static function; this is the handler of the "activate" signal. (nautilus_adapter_control_embed_strategy_deactivate): New static function; this is the handler of the "deactivate" signal. * components/adapter/nautilus-adapter-embeddable-embed-strategy.c (nautilus_adapter_embeddable_embed_strategy_activate): New static function; this is the handler of the "activate" signal. (nautilus_adapter_embeddable_embed_strategy_deactivate): New static function; this is the handler of the "deactivate" signal. * components/adapter/nautilus-adapter.c (nautilus_adapter_activate_callback): New static function; connect this to the "activate" signal of the adapter control.
* We need to include the .xml.h files in EXTRA_DIST. My mistake turning thatDarin Adler2000-10-201-0/+1
| | | | | | | | | | | | | | | | | | * components/loser/content/Makefile.am: * components/loser/sidebar/Makefile.am: * components/mozilla/Makefile.am: * components/sample/Makefile.am: * components/services/summary/nautilus-view/Makefile.am: * libnautilus/Makefile.am: * src/Makefile.am: * src/file-manager/Makefile.am: We need to include the .xml.h files in EXTRA_DIST. My mistake turning that off (killed the Tinderbox). * src/nautilus-window-manage-views.c: (position_and_show_window_callback), (nautilus_window_end_location_change_callback): Fix small ref mistake I might have introduced with my last check-in.
* Moved some shared Makefile stuff to a shared include file so we don't useDarin Adler2000-10-202-25/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am: * Makefile.shared: * components/loser/content/Makefile.am: * components/loser/sidebar/Makefile.am: * components/mozilla/Makefile.am: * components/sample/Makefile.am: * components/services/install/command-line/Makefile.am: * components/services/summary/nautilus-view/Makefile.am: * libnautilus-extensions/Makefile.am: * libnautilus/Makefile.am: * src/Makefile.am: * src/file-manager/Makefile.am: Moved some shared Makefile stuff to a shared include file so we don't use "copy and paste technology" in our Makefiles. Fixed the rule that builds .xml.h files so it doesn't have to be copied and pasted everywhere. * components/loser/content/nautilus-content-loser-ui.xml.h: * components/loser/sidebar/nautilus-sidebar-loser-ui.xml.h: * components/mozilla/nautilus-mozilla-ui.xml.h: * components/sample/nautilus-sample-content-view-ui.xml.h: * libnautilus/nautilus-clipboard-ui.xml.h: * src/file-manager/nautilus-directory-view-ui.xml.h: * src/file-manager/nautilus-icon-view-ui.xml.h: * src/file-manager/nautilus-search-list-view-ui.xml.h: * src/nautilus-shell-ui.xml.h: Regenerated the xml.h files with the new Bonobo tool, which keeps things in alphabetical order to minimize cvs thrashing. * components/services/summary/nautilus-view/Makefile.am: * components/services/summary/nautilus-view/nautilus-summary-view-ui.xml.h: Added localization for the summary view UI. * src/Makefile.am: Added localization for the service UI pieces. * libnautilus-extensions/nautilus-buffered-widget.c: (nautilus_buffered_widget_initialize), (connect_to_background_if_needed): Fixed bug where the widget would stay connected after the background was destroyed. John saw it once, but I'm not sure how to reproduce it. * nautilus.spec.in: Fix some bad spelling and strange wording. * src/nautilus-applicable-views.h: * src/nautilus-applicable-views.c: (got_file_info_callback), (nautilus_navigation_info_new), (nautilus_navigation_info_cancel), (nautilus_navigation_info_free), (nautilus_navigation_info_get_location), (nautilus_navigation_info_get_initial_content_id): Removed lots of cruft from this class so it's private and can be changed around a bit. * src/nautilus-window-manage-views.c: (nautilus_window_update_internals): Use the new nautilus_navigation_info_get_location. (handle_unreadable_location): Get rid of unneeded file == NULL check. (load_view_for_new_location): Use the new nautilus_navigation_info_get_initial_content_id. (set_view_location_and_selection): Use the new nautilus_navigation_info_get_location. (nautilus_window_end_location_change_callback): Use the new nautilus_navigation_info_get_location. (nautilus_window_begin_location_change): Remove some unnecessary code.
* Check in the xml.h files. It would be better not to have theseDarin Adler2000-10-191-0/+16
| | | | | | | | | | | | | | | | | checked in, but it helps the translators if they are. If we come up with something better later, we can get rid of them. For now, if you exit a ui.xml file, then you should also do a build and check in the generated xml.h file. * components/loser/content/nautilus-content-loser-ui.xml.h: * components/loser/sidebar/nautilus-sidebar-loser-ui.xml.h: * components/mozilla/nautilus-mozilla-ui.xml.h: * components/sample/nautilus-sample-content-view-ui.xml.h: * libnautilus/nautilus-clipboard-ui.xml.h: * src/file-manager/nautilus-directory-view-ui.xml.h: * src/file-manager/nautilus-icon-view-ui.xml.h: * src/file-manager/nautilus-search-list-view-ui.xml.h: * src/nautilus-shell-ui.xml.h:
* Fun with Build chapter IX.Eskil Heyn Olsen2000-10-191-0/+1
| | | | | | | | | | | * components/loser/content/Makefile.am: * components/loser/sidebar/Makefile.am: * components/mozilla/Makefile.am: * components/sample/Makefile.am: * libnautilus/Makefile.am: * src/Makefile.am: * src/file-manager/Makefile.am: Fun with Build chapter IX.
* Still trying to fix the bloody build...Eskil Heyn Olsen2000-10-191-10/+17
| | | | | | * components/sample/Makefile.am: * libnautilus/Makefile.am: Still trying to fix the bloody build...
* Fixed problems in making the new bonobo translation that confused theRebecca Schulman2000-10-192-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | 2000-10-18 Rebecca Schulman <rebecka@eazel.com> Fixed problems in making the new bonobo translation that confused the headers. Also added .cvsignore entries for the new generated xml files. This should fix the tinderbox build * components/loser/content/.cvsignore: * components/loser/content/Makefile.am: * components/loser/sidebar/.cvsignore: * components/loser/sidebar/Makefile.am: * components/mozilla/.cvsignore: * components/mozilla/Makefile.am: * components/sample/.cvsignore: * components/sample/Makefile.am: * icons/.cvsignore: * libnautilus/.cvsignore: * libnautilus/Makefile.am: * src/.cvsignore: * src/Makefile.am: * src/file-manager/.cvsignore: * src/file-manager/Makefile.am:
* Feeble attempt to hook up generation of .h files from the *-ui.xml filesKjartan Maraas2000-10-191-3/+12
| | | | | | | | | | 2000-10-19 Kjartan Maraas <kmaraas@gnome.org> * */Makefile.am: Feeble attempt to hook up generation of .h files from the *-ui.xml files to get them included in the translations. This will need to be done in a better way I guess. * configure.in: Added a check for bonobo-ui-extract.
* Use calls by new names.Darin Adler2000-10-182-175/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * components/notes/nautilus-notes.c: (make_notes_view): * src/nautilus-location-bar.c: (nautilus_location_bar_new): * src/nautilus-simple-search-bar.c: (nautilus_simple_search_bar_new): Use calls by new names. * libnautilus-extensions/nautilus-undo-signal-handlers.c: (editable_key_press_event), (nautilus_undo_editable_set_undo_key): Disabled the undo-key part of undo also. The old code was actually harmless because it got the name of the signal wrong, but it's better to have it disabled. * src/nautilus-shell-ui.xml: Added a comment that points out the 2nd place where undo has been disabled. * libnautilus/nautilus-clipboard.h: * libnautilus/nautilus-clipboard.c: (cut_callback), (copy_callback), (paste_callback), (clear_callback), (set_paste_sensitive_if_clipboard_contains_data), (focus_changed_callback), (target_destroy_callback), (nautilus_clipboard_set_up_editable), (first_focus_callback), (control_destroyed_callback), (nautilus_clipboard_set_up_editable_in_control), (disconnect_set_up_in_control_handlers): Some minor cleanup of the clipboard code. Includes bug fixes for items that are already in focus when the clipboard is hooked up (should never happen), and a fix for code that was using gtk_signal_disconnect on something that was connected with gtk_signal_connect_while_alive (doesn't work). Also got rid of misguided code that was copying a Bonobo_UIContainer with memcpy (since Bonobo_UIContainer is just a pointer). * src/Makefile.am: * src/nautilus-window-private.h: Changed source file name from nautilus-service-menu to nautilus-service-ui, since it does a toolbar item, not just a menu. * src/nautilus-window-service-ui.c: * src/nautilus-window-service-ui.h: A second cut at the service UI code. It no longer leaks a UI component. * src/nautilus-window.c: (nautilus_window_constructed), (nautilus_window_get_ui_container): Use our own pointer to the UI container instead of asking the shell UI for its container.
* Fixed bug 3828 (switching views makes torn-off menus disappear)John Sullivan2000-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug 3822 (Edit menu flashes when you click in location field) Fixed bug 3529 (menu bar flashes when view switched) These were all caused by our Bonobo xml files redefining labels for submenus, causing Bonobo to think that it needed to destroy the widget holding the title of the old submenu. * libnautilus/nautilus-clipboard-ui.xml: * src/file-manager/nautilus-directory-view-ui.xml: * src/file-manager/nautilus-icon-view-ui.xml: * src/file-manager/nautilus-search-list-view-ui.xml: Removed all _label="Foo"s from submenus defined in nautilus-shell-ui.xml (e.g. File, Edit, View). Some bug fixes and cleanup in the summary view code. I noticed a couple of obvious problems when I was trying to use services earlier, and they led me to fix up a little of this code. * components/services/summary/nautilus-view/nautilus-summary-view.c: Removed "feedback_text" field from Details struct; now it's just a parameter to generate_error_dialog (it was being leaked with each use, also). (generate_summary_form): Use new error_dialog_shown boolean to avoid showing exactly the same dialog twice; removed a bunch of duplicate code by collapsing an if/else into only the part that's different; pass dialog text to generate_error_dialog directly (authn_cb_failed): Don't follow an exclamation point with a period. (generate_error_dialog): Set up a parent window so the dialog appears in a sensible place; use GNOME_STOCK_BUTTON_CANCEL instead of "CANCEL"; get message from parameter instead of Details field; change "Retry" to "Try Again" to be less nerdly.
* Fixed a problem with the clipboard caused by having many components in theRebecca Schulman2000-10-171-4/+9
| | | | | | | | | | | | 2000-10-16 Rebecca Schulman <rebecka@eazel.com> * libnautilus/nautilus-clipboard.c: (add_menu_items_callback), (ui_component_remove_container_and_unref), (finish_setting_up_editable), Fixed a problem with the clipboard caused by having many components in the same container with the same name, and fixed a potential leak.
* Fixed the names of these files to match the menu items in shell-uiRebecca Schulman2000-10-133-33/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-10-13 Rebecca Schulman <rebecka@eazel.com> * libnautilus/nautilus-clipboard-ui.xml: Fixed the names of these files to match the menu items in shell-ui * libnautilus/nautilus-clipboard.h: * libnautilus/nautilus-clipboard.c: (add_menu_items_callback), (container_copy_free), (ui_component_remove_container_and_unref), (finish_setting_up_editable), (finish_setting_up_editable_from_bonobo_control_callback), (nautilus_clipboard_set_up_editable_from_bonobo_control), (nautilus_clipboard_set_up_editable_from_bonobo_ui_container): Added the from_ui_container function for local editable widgets to use, and changed the function sequence around so that the two clipboard set up functions share an api except for the initial calling functions * src/nautilus-window-private.h: * src/nautilus-window.c: (nautilus_window_constructed), (nautilus_window_show), (nautilus_window_get_bonobo_ui_container), (nautilus_window_get_bonobo_ui_component): added the new nautilus-window_get_bonobo_ui_component function for local editables to use, and changed the construction order so that menu items would get merged correctly (set up the main window menus before setting up the location bar) * src/nautilus-complex-search-bar.c: (nautilus_complex_search_bar_new): * src/nautilus-complex-search-bar.h: * src/nautilus-location-bar.c: (nautilus_location_bar_get_window), (nautilus_location_bar_initialize), (nautilus_location_bar_new), (nautilus_location_bar_set_location): * src/nautilus-location-bar.h: * src/nautilus-simple-search-bar.c: (nautilus_simple_search_bar_initialize), (nautilus_simple_search_bar_destroy), (nautilus_simple_search_bar_new): * src/nautilus-simple-search-bar.h: * src/nautilus-switchable-navigation-bar.c: (nautilus_switchable_navigation_bar_initialize), (nautilus_switchable_navigation_bar_destroy), (nautilus_switchable_navigation_bar_new): * src/nautilus-switchable-navigation-bar.h: * src/nautilus-switchable-search-bar.c: (nautilus_switchable_search_bar_initialize), (nautilus_switchable_search_bar_destroy), (nautilus_switchable_search_bar_new): * src/nautilus-switchable-search-bar.h: Changed the location bar and switchable search bar to take windows in the constructor funciton. These are used to get the local ui component when setting up the clipboard
* First part of the bug fix for 3514. We still need to add a local clipboardRebecca Schulman2000-10-123-100/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-10-11 Rebecca Schulman <rebecka@eazel.com> First part of the bug fix for 3514. We still need to add a local clipboard interface, and set up the clipboard to work with the location bar. * components/notes/nautilus-notes.c: (make_notes_view): Use the new clipboard api call * libnautilus/nautilus-clipboard-ui.xml: * libnautilus/Makefile.am: Define DATADIR so we can install the new bonobo ui xml file for the clipboard * libnautilus/nautilus-clipboard.c: (cut_callback), (copy_callback), (paste_callback), (clear_callback), (add_menu_items_callback), (remove_menu_items_callback), (ui_component_remove_container_and_unref), (finish_setting_up_editable_from_bonobo_control), (nautilus_clipboard_set_up_editable_from_bonobo_control): Gutted the bonobo code from the old functions and added new code where appropriate that should approximate the functionality we had before the ui handler change * src/nautilus-shell-ui.xml: Declare the cut copy and paste menu items insensitive by default. Maintain cmd/widget separation by creating separate commands for them. * src/nautilus-window-menus.c: (nautilus_window_initialize_menus): Remove unused cut, copy and paste callbacks Removed ui verbs relating to these that we don't need.
* Add a path declaration for the Profiler menu. Make the buttons insensitiveRamiro Estrugo2000-10-101-0/+1
| | | | | | | | | | | | | * libnautilus/nautilus-bonobo-ui.h: Add a path declaration for the Profiler menu. * src/nautilus-profiler.c: (dump_dialog_new): Make the buttons insensitive for now. * src/nautilus-shell-ui.xml: * src/nautilus-window-menus.c: (nautilus_window_initialize_menus): Add a top level "Profiler" menu bar to control the profiler. This is just a first try. Some things, like the Start/Stop state of the profiler can be better represented by a toggle button.
* Bunches o' Bonobo conversion & cleanup. Most of this isJohn Sullivan2000-10-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | about the new "command/widget separation" in Bonobo. Essentially, changes to sensitivity, state, and hiddenness should be made to the command (verb), whereas other changes should be made to the widget. This should fix the "cmd/widget" warnings at launch, and make the tool bar buttons desensitize appropriately again. * components/loser/sidebar/nautilus-sidebar-loser-ui.xml: * components/mozilla/nautilus-mozilla-ui.xml: * components/sample/nautilus-sample-content-view-ui.xml: * src/nautilus-shell-ui.xml: * src/file-manager/nautilus-directory-view-ui.xml: * src/file-manager/nautilus-icon-view-ui.xml: * src/file-manager/nautilus-search-list-view-ui.xml: Filled in the names of all verbs; we don't want to use the default if-verb-name-is-blank-use-item-name feature because it causes vast confusion; also, change _descr to _tip everywhere (updated name from Bonobo); also explicitly defined <cmd>s for the items that have pre-set insensitivity, or that share tips between tool bar buttons and menu items. * libnautilus/nautilus-bonobo-ui.h: Add #defines for command paths as well as menu paths. * src/file-manager/fm-desktop-icon-view.c: (fm_desktop_icon_view_create_background_context_menu_items): Use command paths instead of menu paths. * src/file-manager/fm-directory-view.h: Publicize command paths, not menu paths (for use in context menu index-finding. Some day we will convert the context menus to use Bonobo and then this will get cleaned up further.) * src/file-manager/fm-directory-view.c: Moved menu path #defines inside here. (append_gtk_menu_item), (update_one_menu_item): Take both a menu path and a verb path; use the verb path for sensitivity. (fm_directory_view_insert_context_menu_item): Updated comment. (fm_directory_view_real_create_background_context_menu_items), (create_open_with_gtk_menu), (fm_directory_view_real_create_selection_context_menu_items), (reset_bonobo_trash_delete_menu), (fm_directory_view_real_update_menus): Pass verb paths as well as menu paths. (fm_directory_view_get_context_menu_index): Changed variable names for clarity. * src/file-manager/fm-icon-view.c: New #defines for command paths. (update_one_menu_item): Take both a menu path and a verb path; use the verb path for sensitivity. (fm_icon_view_create_selection_context_menu_items), (fm_icon_view_create_background_context_menu_items), (fm_icon_view_update_menus), (update_layout_menus): Pass both a menu path and a verb path. * src/file-manager/fm-search-list-view.c: #define for COMMAND_REVEAL_IN_NEW_WINDOW (real_create_selection_context_menu_items): Use verb path not menu path for context menu positioning. (update_reveal_item): Use verb path not menu path for sensitivity. * src/nautilus-window-private.h: #defines for command paths. * src/nautilus-window-manage-views.c: (load_content_view): * src/nautilus-window.c: (nautilus_window_allow_back), (nautilus_window_allow_forward), (nautilus_window_allow_up), (nautilus_window_allow_stop), (nautilus_window_zoom_level_changed_callback): Use verb paths instead of menu paths for changing sensitivity.
* Work on bug 3496 (labels in menu items never change)John Sullivan2000-10-061-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Work on bug 3495 (menu item sensitivity never changes) Fixed bug 3503 ("Delete from Trash" never appears) * libnautilus-extensions/nautilus-bonobo-extensions.h: * libnautilus-extensions/nautilus-bonobo-extensions.c: (nautilus_bonobo_set_accelerator), (nautilus_bonobo_set_description): More new wrappers for xml shenanigans. * libnautilus/nautilus-bonobo-ui.h: * src/file-manager/fm-directory-view.h: Updated #defines for menu paths to match new syntax (start with "/menu", include placeholder names) * src/file-manager/fm-directory-view.c: Store the BonoboUIComponent in FMDirectoryViewDetails. (fm_directory_view_real_create_selection_context_menu_items), (reset_bonobo_trash_delete_menu), (compute_menu_item_info): merge "Move to Trash" and "Delete from Trash" into single item. (update_one_menu_item): Use new-style Bonobo calls. (fm_directory_view_real_merge_menus): Remove old #ifddeffed code. (fm_directory_view_real_update_menus): #ifdef guts back in, and remove UIHandler references. * src/file-manager/nautilus-directory-view-ui.xml: Fixed typo in "Open in New Window" label. * src/nautilus-window-menus.c: (nautilus_window_update_find_menu_item): Removed stray debugging comment.
* Cut over to HEAD of Bonobo. This check-in includes all the changesDarin Adler2000-10-057-6/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | needed to compile and run, but there are many things wrong visually that may take a while to get fixed. * src/nautilus-window-menus.c: (file_menu_new_window_callback), (file_menu_close_window_callback), (file_menu_close_all_windows_callback), (file_menu_toggle_find_mode_callback), (file_menu_web_search_callback), (edit_menu_undo_callback), (edit_menu_cut_callback), (edit_menu_copy_callback), (edit_menu_paste_callback), (edit_menu_clear_callback), (go_menu_back_callback), (go_menu_forward_callback), (go_menu_up_callback), (go_menu_home_callback), (go_menu_forget_history_callback), (view_menu_reload_callback), (view_menu_show_hide_sidebar_callback), (view_menu_show_hide_tool_bar_callback), (view_menu_show_hide_location_bar_callback), (view_menu_show_hide_status_bar_callback), (nautilus_window_update_show_hide_menu_items), (view_menu_zoom_in_callback), (view_menu_zoom_out_callback), (view_menu_zoom_normal_callback), (bookmarks_menu_add_bookmark_callback), (bookmarks_menu_edit_bookmarks_callback), (user_level_customize_callback), (customize_callback), (change_appearance_callback), (help_menu_about_nautilus_callback), (help_menu_nautilus_feedback_callback), (switch_to_user_level), (user_level_menu_item_callback), (append_placeholder), (append_separator), (append_bookmark_to_menu), (create_menu_item_from_node), (remove_bookmarks_after), (remove_underline_accelerator_from_menu_title), (new_top_level_menu), (add_user_level_menu_item), (nautilus_window_initialize_menus), (nautilus_window_update_find_menu_item), (update_user_level_menu_items), (convert_verb_to_user_level), (convert_user_level_to_verb), (update_preferences_dialog_title): * src/nautilus-window.c: (nautilus_window_clear_status), (nautilus_window_set_status), (install_status_bar), (nautilus_window_constructed), (nautilus_window_set_arg), (nautilus_window_get_arg), (nautilus_window_destroy), (nautilus_window_allow_back), (nautilus_window_allow_forward), (nautilus_window_allow_up), (nautilus_window_allow_reload), (nautilus_window_zoom_level_changed_callback), (nautilus_window_set_content_view_widget), (show_dock_item), (hide_dock_item), (dock_item_showing), (nautilus_window_hide_tool_bar), (nautilus_window_show_tool_bar), (nautilus_window_tool_bar_showing), (nautilus_window_hide_status_bar), (nautilus_window_show_status_bar), (nautilus_window_status_bar_showing): Convert to new API. Some is disabled with #ifdef UIH. * Makefile.am: * configure.in: Turned off build of the idl directory, build components after src. * components/adapter/main.c: * components/notes/nautilus-notes.c: * components/sample/main.c: * libnautilus-extensions/nautilus-font-picker.c: * libnautilus-extensions/nautilus-global-preferences.c: * libnautilus-extensions/nautilus-password-dialog.c: * libnautilus-extensions/nautilus-preferences-item.c: * libnautilus/nautilus-undo-transaction.c: * libnautilus/nautilus-undo.c: * src/nautilus-application.c: * src/nautilus-history-frame.c: * src/nautilus-link-set-window.c: * src/nautilus-main.c: * src/nautilus-shell.c: * src/nautilus-sidebar.c: * src/nautilus-view-frame-corba.c: * src/nautilus-zoomable-frame-corba.c: * test/test-nautilus-font-picker.c: * test/test-nautilus-image.c: (create_font_picker_frame): * test/test-nautilus-label.c: (create_font_picker_frame): * test/test-nautilus-preferences.c: * test/test-nautilus-widgets.c: (radio_group_load_it_up): Fixed includes. * test/test-nautilus-image.c: (create_font_picker_frame): * test/test-nautilus-label.c: (create_font_picker_frame): * test/test-nautilus-widgets.c: (radio_group_load_it_up): Turned off localization of some strings in tests. * components/adapter/nautilus-adapter-control-embed-strategy.c: (nautilus_adapter_control_embed_strategy_new): * components/adapter/nautilus-adapter-control-embed-strategy.h: * components/adapter/nautilus-adapter-embed-strategy.c: (nautilus_adapter_embed_strategy_get): * components/adapter/nautilus-adapter-embed-strategy.h: * components/adapter/nautilus-adapter-embeddable-embed-strategy.c: (nautilus_adapter_embeddable_embed_strategy_new): * components/adapter/nautilus-adapter-embeddable-embed-strategy.h: Embedding code now deals with Bonobo_UIContainer, not Bonobo_UIHandler. * components/adapter/nautilus-adapter.c: (nautilus_adapter_new): This code not only had to be changed to deal with the Bonobo_UIContainer instead of Bonobo_UIHandler, but it also needed to deal with the containing item (was remote_ui_handler), not the local component. * components/adapter/nautilus-adapter-embeddable-embed-strategy.c: (nautilus_adapter_embeddable_embed_strategy_new): * components/adapter/nautilus-adapter.c: BonoboContainer was renamed BonoboItemContainer. * components/history/nautilus-history-view.c: Remove unused BonoboUIHandler * field. * components/loser/content/Makefile.am: * components/loser/sidebar/Makefile.am: * components/mozilla/Makefile.am: * components/sample/Makefile.am: * src/Makefile.am: * src/file-manager/Makefile.am: Added the necessary defines and build rules to install ui.xml files and locate them from the C code. * src/file-manager/nautilus-directory-view-ui.xml: * src/file-manager/nautilus-icon-view-ui.xml: * src/file-manager/nautilus-search-list-view-ui.xml: * src/nautilus-shell-ui.xml: Added definitions of user interface. * components/loser/content/nautilus-content-loser-ui.xml: * components/loser/sidebar/nautilus-sidebar-loser-ui.xml: * components/mozilla/nautilus-mozilla-ui.xml: * components/sample/nautilus-sample-content-view-ui.xml: Added empty placeholders for user interface. * components/loser/content/nautilus-content-loser.c: (loser_merge_bonobo_items_callback): * components/loser/sidebar/nautilus-sidebar-loser.c: (loser_merge_bonobo_items_callback): * components/mozilla/nautilus-mozilla-content-view.c: (mozilla_merge_bonobo_items_callback): * components/sample/nautilus-sample-content-view.c: (sample_merge_bonobo_items_callback): Use nautilus_view_set_up_ui to get the user interface from a ui.xml file. Put #ifdef UIH around old code to make the items work that still needs to be visited. * libnautilus-extensions/nautilus-bonobo-extensions.c: * libnautilus-extensions/nautilus-bonobo-extensions.h: * libnautilus-extensions/nautilus-undo-manager.c: * libnautilus-extensions/nautilus-undo-manager.h: * libnautilus/nautilus-clipboard.c: (add_menu_items_callback), (remove_menu_items_callback), (nautilus_clipboard_set_up_editable_from_bonobo_control): * libnautilus/nautilus-clipboard.h: Wrapped code in ifdef UIH to disable it until it can be converted to the new Bonobo. * libnautilus-extensions/nautilus-caption-table.h: * libnautilus-extensions/nautilus-caption.h: * libnautilus-extensions/nautilus-font-picker.h: * libnautilus-extensions/nautilus-preferences-group.h: * libnautilus-extensions/nautilus-preferences-item.h: * libnautilus-extensions/nautilus-radio-button-group.h: * src/nautilus-about.h: Got rid of any cases where headers include the omnibus header <gnome.h>. These made the conversion process harder, which is why we fixed them. * libnautilus/libnautilus.h: Got rid of cases where headers include the omnibus header <bonobo.h>. * libnautilus/nautilus-view.h: * libnautilus/nautilus-view.c: (nautilus_view_set_up_ui): Added a helper function to make it easy for Nautilus components to load their UI and get it attached to the Nautilus:View object. * nautilus.spec.in: Install the nautilus-*-ui.xml files too. * src/file-manager/fm-directory-view.h: * src/file-manager/fm-directory-view.c: (bonobo_menu_select_all_callback), (bonobo_menu_empty_trash_callback), (bonobo_control_activate_callback): Convert to new API. (fm_directory_view_get_bonobo_ui_container): Name and purpose changed slightly for new API. (fm_directory_view_real_merge_menus): Merge with new API. (fm_directory_view_real_update_menus): Disabled this code for now. * src/file-manager/fm-icon-view.c: (fm_icon_view_destroy): Destroy icon view's own component at destroy time. (context_menu_layout_radio_item_callback), (append_one_context_menu_layout_item), (fm_icon_view_create_background_context_menu_items), (update_layout_menus): Convert to new API, disable some with #ifdef UIH. (get_sort_criterion_by_verb), (set_sort_criterion_by_verb), (sort_callback): Convert to new API. (fm_icon_view_merge_menus): Merge with new API, creating our own UI component separate from the directory view's. (fm_icon_view_update_menus): Disable with #ifdef UIH. * src/file-manager/fm-search-list-view.h: * src/file-manager/fm-search-list-view.c: (fm_search_list_view_initialize_class), (fm_search_list_view_initialize), (real_destroy), (indexing_info_callback), (real_merge_menus), (real_update_menus): Add code necessary to use a separate UI component, and disabled the actual menu set-up code with #ifdef UIH. This required adding a details struct. * src/nautilus-desktop-window.c: (realize): Turned off the code that hides the desktop elements. * src/nautilus-window-private.h: * src/nautilus-view-frame.h: * src/nautilus-view-frame.c: (nautilus_view_frame_destroy), (nautilus_view_frame_new), (nautilus_view_frame_load_client): * src/nautilus-window-manage-views.c: (load_content_view), (nautilus_window_set_sidebar_panels): Change to use Bonobo_UIContainer instead of Bonobo_UIHandler. * src/nautilus-window-toolbars.c: (remember_buttons), (nautilus_window_initialize_toolbars): Leave this code around and change it enough to compile and run, even though it's creating a second, invisible toolbar. * src/nautilus-window.h: Change to be a BonoboWin subclass instead of a GnomeApp subclass.
* More work on whittling the state machine down to size.Darin Adler2000-10-033-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * README: libunicode, libglade, and eog are no longer required. * components/history/nautilus-history-view.c: (history_title_changed): * libnautilus/nautilus-view-component.idl: * libnautilus/nautilus-view.c: (impl_Nautilus_View_title_changed), (nautilus_view_initialize_class): * libnautilus/nautilus-view.h: * src/nautilus-view-frame.c: (nautilus_view_frame_title_changed): * src/nautilus-view-frame.h: Added title parameter for the title_changed function. * src/nautilus-view-frame.c: (nautilus_view_frame_report_load_complete): Got rid of extra emission of report_load_complete, which is handled by view_frame_loaded now. * libnautilus-extensions/nautilus-background.c: (nautilus_background_initialize_class): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_initialize_class): * libnautilus-extensions/nautilus-icon-text-item.c: (iti_class_init): * libnautilus-extensions/nautilus-list.c: (nautilus_list_initialize_class): * src/nautilus-bookmark-list.c: (nautilus_bookmark_list_initialize_class): * src/nautilus-navigation-bar.c: (nautilus_navigation_bar_initialize_class): * src/nautilus-search-bar-criterion.c: (nautilus_search_bar_criterion_initialize_class): * src/nautilus-sidebar.c: (nautilus_sidebar_initialize_class): * src/nautilus-switchable-navigation-bar.c: (nautilus_switchable_navigation_bar_initialize_class): Use GTK_RUN_LAST instead of GTK_RUN_FIRST. * libnautilus-extensions/nautilus-directory-background.c: * libnautilus-extensions/nautilus-link-set.c: * libnautilus-extensions/nautilus-link.c: * src/file-manager/fm-icon-text-window.c: * src/file-manager/fm-icon-view.c: * src/file-manager/fm-properties-window.c: * src/nautilus-complex-search-bar.c: * src/nautilus-link-set-window.c: * src/nautilus-simple-search-bar.c: * src/nautilus-switchable-search-bar.c: Add includes needed now that the #include <gnome.h> was removed from nautilus-global-preferences.h. * libnautilus-extensions/nautilus-string.h: * libnautilus-extensions/nautilus-string.c: (nautilus_strcmp_case_breaks_ties): Added function, like g_strcasecmp, but falls back on strcmp for strings that match case-insensitive-wise. (nautilus_istr_compare): Use nautilus_strcmp_case_breaks_ties instead of nautilus_strcasecmp. * libnautilus-extensions/nautilus-file.c: (nautilus_file_compare_by_name): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (nautilus_file_compare_by_directory_name): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (get_automatic_emblems_as_integer): Convert automatic emblems to integer form for simple sorting. (prepend_automatic_emblem_names): Separate out the code that puts on automatic emblem names, and make it put them first, before any keyword-based emblems. (nautilus_file_compare_by_emblems): Compare the automatic emblems first, using the integer form. (nautilus_file_compare_by_type): Use nautilus_strcmp_case_breaks_ties instead of nautilus_strcmp. (nautilus_file_compare_for_sort): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (nautilus_file_compare_name): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (nautilus_file_is_mime_type): Use nautilus_strcasecmp instead of nautilus_strcmp. (nautilus_file_get_emblem_names): Use prepend_automatic_emblem_names. (sort_keyword_list_and_remove_duplicates): Sort with nautilus_strcmp_case_breaks_ties instead of compare_emblem_names. Automatic emblem names are now dealt with elsewhere. * libnautilus-extensions/nautilus-icon-container.c: (compare_icons_by_name): Use nautilus_strcmp_case_breaks_ties instead of nautilus_strcasecmp. * libnautilus-extensions/nautilus-glib-extensions.c: (nautilus_g_str_list_sort): Use nautilus_str_compare. (nautilus_g_str_list_sort_case_insensitive): Use nautilus_istr_compare. * components/services/vault/command-line/main.c: (main): * test/test-nautilus-mime-actions-set.c: (str_to_action_type): Use g_strcasecmp, not strcasecmp, for portability. * libnautilus-extensions/nautilus-global-preferences.h: * libnautilus-extensions/nautilus-global-preferences.c: Removed _get_disabled_sidebar_panel_view_identifiers since the logic now removes any not in the enabled list instead. * libnautilus-extensions/nautilus-view-identifier.h: * libnautilus-extensions/nautilus-view-identifier.c: (nautilus_view_identifier_list_copy): New function. (nautilus_view_identifier_compare): Now sorts properly instead of returning 1 for any two identifiers that are !=. * nautilus-clean.sh: Removed unadorned gconfd now that it's ancient history and because it makes the script seem to fail all the time. * src/nautilus-window-manage-views.h: * src/nautilus-window-manage-views.c: (compute_title): Renamed to a shorter name since it's a local function. (update_title): Renamed to a shorter name since it's a local function and made it do nothing if the title is already correct. (nautilus_window_update_internals): Simplified code by using the new cached title. (nautilus_window_has_really_changed): Removed sidebar panel logic that is no longer needed. (nautilus_window_free_load_info): Remove some unused fields. (nautilus_window_open_location): Removed unused parameter. (nautilus_window_open_location_in_new_window): Removed unused parameter. (load_content_view): Renamed to shorter name since it's a local function. (handle_view_failure), (cancel_location_change), (load_view_for_new_location), (set_view_location_and_selection): Broke out big pieces of code used by the state machine. Soon we won't have a state machine at all, but we'll still need functions like these. (nautilus_window_update_state): Removed a lot of the code and broke the remaining bits into the above functions. (nautilus_window_set_state_info): Removed sidebar management code and some now-unused state variables. (nautilus_window_stop_loading): Moved this function in here and renamed it so the whole state machine is in one place. (nautilus_window_set_content_view): Moved this function in here and renamed it so the whole state machine is in one place. (compare_view_identifier_with_iid), (nautilus_window_set_sidebar_panels): Wrote new code to set up the sidebar panels based on a list of view identifiers, based on the code that was used before when preferences change. Moved here so the whole state machine is in one place. * src/nautilus-window-toolbars.c: (toolbar_stop_callback): Call the new function nautilus_window_stop_loading. * src/nautilus-window-private.h: * src/nautilus-window.h: * src/nautilus-window.c: (nautilus_window_initialize_class): Removed the "content_view" argument. (nautilus_window_goto_uri): Removed the view frame parameter from the open_location call. (nautilus_window_constructed): Set up sidebars based on preferences when the window is created. (nautilus_window_set_arg): Removed the "content_view" argument. (nautilus_window_get_arg): Removed the "content_view" argument. (view_menu_switch_views_callback): Call the new function nautilus_window_set_content_view. (chose_component_callback), Call the new function nautilus_window_set_content_view. (nautilus_window_open_location_callback): Removed the view frame parameter from the open_location call. (nautilus_window_open_location_in_new_window_callback): Removed the view frame parameter from the open_location_in_new_window call. (nautilus_window_connect_view): Don't connect to report_load_progress any more. The view frame now handles this for us. (nautilus_window_set_content_view_widget): Renamed this to avoid confusion with the new nautilus_window_set_content_view which is used to change content views, given a new view identifier. (update_sidebar_panels_from_preferences): Renamed and changed to use the new nautilus_window_set_sidebar_panels call.
* Removed unused "self_owned" field.Darin Adler2000-09-293-69/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-file-private.h: Removed unused "self_owned" field. * libnautilus/nautilus-view-component.idl: * libnautilus/nautilus-view.h: * libnautilus/nautilus-view.c: (nautilus_view_open_location_in_new_window): * src/file-manager/fm-directory-view.c: (fm_directory_view_switch_location): * src/file-manager/fm-search-list-view.c: (reveal_selected_items_callback): * src/nautilus-view-frame-corba.c: (impl_Nautilus_ViewFrame_open_location), (impl_Nautilus_ViewFrame_open_location_in_new_window), (impl_Nautilus_ViewFrame_report_selection_change): * src/nautilus-view-frame-private.h: * src/nautilus-view-frame.h: * src/nautilus-view-frame.c: (nautilus_view_frame_initialize_class), (nautilus_view_frame_open_location_in_new_window): Removed report_location_change and open_in_new_window_and_select. The open_location_in_new_window call now always does a selection operation. * src/nautilus-window-manage-views.h: * src/nautilus-window-manage-views.c: (update_view), (nautilus_window_load_sidebar_panel), (open_location), (nautilus_window_open_location), (nautilus_window_open_location_in_new_window), (nautilus_window_load_content_view), (nautilus_window_update_state), (nautilus_window_begin_location_change): * src/nautilus-window-private.h: * src/nautilus-window.h: * src/nautilus-window.c: (nautilus_window_switch_views), (nautilus_window_back_or_forward), (nautilus_window_open_location_in_new_window_callback), (nautilus_window_connect_view), (nautilus_window_reload): Made some simplifications that are possible because we don't have the old report_location_change to support.
* Removed non-working clipboard codeRebecca Schulman2000-09-291-102/+4
| | | | | | | | | 2000-09-29 Rebecca Schulman <rebecka@eazel.com> * libnautilus/nautilus-clipboard.c: (add_menu_items_callback), (nautilus_clipboard_set_up_editable_from_bonobo_control): * src/nautilus-window.c: (nautilus_window_constructed): Removed non-working clipboard code
* Fixed renaming bug with names with unusual characters and problemsDarin Adler2000-09-292-97/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | caused by the clipboard code, and started work on metadata copying and removing implementation and cleanup. * libnautilus-extensions/nautilus-file-operations.c: (nautilus_file_operations_new_folder): Use gnome_vfs_uri_append_file_name instead of gnome_vfs_uri_append_path, since we are appending a file name, not a path in URI format. * libnautilus-extensions/nautilus-file-utilities.c: (nautilus_get_user_main_directory): Use gnome_vfs_uri_append_file_name instead of gnome_vfs_uri_append_path, since we are appending a file name, not a path in URI format. * libnautilus-extensions/nautilus-file.c: (rename_update_info_and_metafile): Use metadata call by new name. (nautilus_file_rename): Use gnome_vfs_uri_append_file_name instead of gnome_vfs_uri_append_path, since we are appending a file name, not a path in URI format. This should fix the renaming problems we were seeing. * libnautilus/nautilus-clipboard.h: * libnautilus/nautilus-clipboard.c: (set_paste_sensitive_if_clipboard_contains_data), (set_clipboard_menu_items_sensitive), (set_clipboard_menu_items_insensitive): Removed unused window parameter. (menu_activated_callback): Changed this function to find the window using gtk_widget_toplevel instead of from a global. This works in all the cases where the old code would have worked, and doesn't have the problem with multiple windows. (menu_deactivated_callback): Removed unused window parameter. (nautilus_clipboard_set_up_editable_from_bonobo_control): Added check for NULL menubar. This shows a design problem too, but at least it (nautilus_clipboard_set_up_host_ui_handler): Got rid of global. * src/nautilus-window.c: (nautilus_window_constructed): Use clipboard call by new name. * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_schedule_metadata_copy), (nautilus_directory_schedule_metadata_move), (nautilus_directory_schedule_metadata_remove), (nautilus_directory_schedule_position_setting): Tighten up these routines a bit and have them do as much work as possible through functions in nautilus-directory-metafile.[ch]. This is preparation for doing full implementation of the actual metadata copying. * libnautilus-extensions/nautilus-directory-metafile.h: * libnautilus-extensions/nautilus-directory-metafile.c: (nautilus_directory_rename_file_metadata), (copy_file_metadata_for_key), (nautilus_directory_copy_file_metadata), (nautilus_directory_remove_file_metadata): New functions to doteh metadata copying, and a new name for an old function. Now I have to actually make them work better. * nautilus.spec.in: Do a "make check" instead of a "make" when building RPMs.
* Fixed bug 1275, that sidebar panels don't have defaults per user level.Rebecca Schulman2000-09-271-10/+3
| | | | | | | | | | | | | | | | | | | | | | 2000-09-27 Rebecca Schulman <rebecka@eazel.com> Fixed bug 1275, that sidebar panels don't have defaults per user level. * libnautilus-extensions/nautilus-global-preferences.c: (get_default_sidebar_iids_for_user_level), (sidebar_panel_iid_is_in_default_list), (global_preferences_register_sidebar_panels), (global_preferences_is_sidebar_panel_enabled): Added default sets (hard coded, as before) for each user level, and used them to get the defaults, instead of the single set for all levels * libnautilus/nautilus-clipboard.c: (set_paste_sensitive_if_clipboard_contains_data): simplified check whether paste should be available. * src/nautilus-window-menus.c: (nautilus_window_initialize_menus): Fixed a typo in the clipboard menu text.
* Fix more storage leaks.Darin Adler2000-09-275-6/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * components/tree/nautilus-tree-node.c: (nautilus_tree_node_new): Get rid of extra allocation of node->details that caused a storage leak. * components/tree/nautilus-tree-view.c: (nautilus_tree_view_insert_model_node): Add a g_free. (free_uri_to_node_map_entry), (free_uri_to_hack_node_map_entry), (nautilus_tree_view_destroy): Free the keys of the hash table. (tree_expand_callback), (tree_collapse_callback), (tree_select_row_callback): Added missing g_free. (nautilus_tree_view_item_at): Removed an excess g_strdup. * libnautilus-extensions/nautilus-preference.c: (preference_initialize_if_needed): Destroy the global preference table on exit. (preference_hash_node_free_func): Free the hash key as well as the node value. (preference_register): Use strdup on keys as then are entered into the hash table. (preference_hash_node_lookup_with_registration): Remove the strdup in here since preference_register now handles it. (destroy_global_preference_table): Renamed and simplified the existing unused function. * libnautilus-extensions/nautilus-volume-monitor.c: (nautilus_volume_monitor_destroy), (free_volume): Free the volume itself, not just the fields within it. * src/nautilus-complex-search-bar.c: (nautilus_complex_search_bar_get_location): Added a missing g_free. * src/nautilus-sidebar-tabs.c: (tab_item_destroy_cover), (nautilus_sidebar_tabs_destroy): Free the tab items too, not just the list they are stored in. * src/nautilus-switchable-search-bar.c: (search_bar_preference_changed_callback): Added a missing g_free. * libnautilus-extensions/nautilus-theme.c: (free_default_theme), (nautilus_theme_get_theme_data): Add code to free the default theme on program exit to make leak detection easier. * src/nautilus-main.c: (main): Clean up the memory used by the XML parser on exit to make leak detection easier. * libnautilus/Makefile.am: * libnautilus/nautilus-bonobo-workarounds.c: * libnautilus/nautilus-bonobo-workarounds.h: Added version of bonobo_object_get_epv that shares a single global instance instead of allocating a new one each time it's called. * components/adapter/nautilus-adapter-factory-server.c: (impl_Nautilus_ComponentAdapterFactory__create): * libnautilus-extensions/bonobo-stream-vfs.c: (bonobo_stream_vfs_class_init): * libnautilus-extensions/nautilus-undo-context.c: (impl_Nautilus_Undo_Context__create): * libnautilus-extensions/nautilus-undo-manager.c: (nautilus_undo_manager_initialize_class): * libnautilus/nautilus-undo-transaction.c: (impl_Nautilus_Undo_Transaction__create): * libnautilus/nautilus-view.c: (impl_Nautilus_View__create): * src/nautilus-history-frame.c: (impl_Nautilus_HistoryFrame__create): * src/nautilus-shell.c: (nautilus_shell_get_vepv): * src/nautilus-view-frame-corba.c: (impl_Nautilus_ViewFrame__create): * src/nautilus-zoomable-frame-corba.c: (impl_Nautilus_ZoomableFrame__create): Use the new cover for bonobo_object_get_epv to avoid making lots of copies of it. * src/nautilus-window-menus.c: (get_user_level_image): Formatting tweak. * tools/leak-checker/nautilus-leak-checker.c: Added more "known to allocate and not free on exit" functions.