Commit graph

162 commits

Author SHA1 Message Date
Ramiro Estrugo 33dad502eb Add support for line wrappping.
* libnautilus-extensions/nautilus-label.c:
	(nautilus_label_initialize), (nautilus_label_destroy),
	(render_buffer_pixbuf), (label_recompute_line_geometries),
	(nautilus_label_set_line_offset),
	(nautilus_label_get_drop_shadow_color),
	(nautilus_label_set_line_wrap), (nautilus_label_get_line_wrap),
	(nautilus_label_set_line_wrap_width),
	(nautilus_label_get_line_wrap_width),
	(nautilus_label_set_line_wrap_separators),
	(nautilus_label_get_line_wrap_separators):
	* libnautilus-extensions/nautilus-label.h:
	Add support for line wrappping.

	* src/nautilus-shell.c: (display_caveat):
	Change the caveat text to not use hard coded new lines and use the
	new NautilusLabel text wrapping feature instead.

	* test/.cvsignore:
	* test/Makefile.am:
	* test/test-nautilus-label.c: (main):
	* test/test-nautilus-wrapped-label.c: (delete_event),
	(create_gtk_label), (create_nautilus_label),
	(create_gtk_label_window), (create_nautilus_label_window), (main):
	Add a test for the NautilusLabel line wrapping feature.
2000-10-16 18:22:11 +00:00
Darin Adler 2ae47c7563 Cut over to HEAD of Bonobo. This check-in includes all the changes
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.
2000-10-05 23:47:54 +00:00
Ramiro Estrugo f82a3ba61e Make the test program exit when its window is closed, so it can be
* test/test-nautilus-label.c: (delete_event), (main):
	Make the test program exit when its window is closed, so it can be
	profiled properly.
2000-10-03 04:11:09 +00:00
Darin Adler 99785dd779 More work on whittling the state machine down to size.
* 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.
2000-10-03 02:02:10 +00:00
Maciej Stachowiak 63abb313ef Rename NAUTILUS_FILE_ATTRIBUTE_FAST_MIME_TYPE to
* libnautilus-extensions/nautilus-file-attributes.h: Rename
	NAUTILUS_FILE_ATTRIBUTE_FAST_MIME_TYPE to
	NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE; add
	NAUTILUS_FILE_ATTRIBUTE_SLOW_MIME_TYPE, for now just a synonym for
	NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE.
	* libnautilus-extensions/nautilus-directory-async.c:
	(set_up_request_by_file_attributes): Handle the new file
	attributes.
	* libnautilus-extensions/nautilus-directory.h: move
	nautilus_directory_wait_until_ready call to
	nautilus-wait-until-ready.h

	* libnautilus-extensions/nautilus-directory.c:
	(nautilus_self_check_directory): Include
	nautilus-wait-until-ready.h, use new attributes.

	* libnautilus-extensions/nautilus-wait-until-ready.h: New header
	for the deprecated wait_until_ready calls.

	* libnautilus-extensions/nautilus-file.c:
	(nautilus_file_wait_until_ready): file equivalent of
	nautilus_directory_wait_until_ready; temporary to help me
	refactor.
	(file_wait_until_ready_callback): helper function.

	* libnautilus-extensions/Makefile.am: Add
	nautilus-wait-until-ready.h

	* libnautilus-extensions/nautilus-icon-factory.c:
	(nautilus_icon_factory_get_required_file_attributes): Use new
	attribute for mime type.

	* libnautilus-extensions/nautilus-mime-actions.h,
	libnautilus-extensions/nautilus-mime-actions.c:
	(nautilus_mime_get_default_action_type_for_uri),
	(nautilus_mime_get_default_action_for_uri),
	(nautilus_mime_get_default_application_for_uri_internal),
	(nautilus_mime_get_default_application_for_uri),
	(nautilus_mime_is_default_application_for_uri_user_chosen),
	(nautilus_mime_get_default_component_for_uri_internal),
	(nautilus_mime_get_default_component_for_uri),
	(nautilus_mime_is_default_component_for_uri_user_chosen),
	(nautilus_mime_get_short_list_applications_for_uri),
	(nautilus_mime_get_short_list_components_for_uri),
	(nautilus_mime_get_short_list_methods_for_uri),
	(nautilus_mime_get_all_applications_for_uri),
	(nautilus_mime_has_any_applications_for_uri),
	(nautilus_mime_get_all_components_for_uri),
	(nautilus_mime_has_any_components_for_uri),
	(nautilus_mime_set_default_action_type_for_uri),
	(nautilus_mime_set_default_application_for_uri),
	(nautilus_mime_set_default_component_for_uri),
	(nautilus_mime_set_short_list_applications_for_uri),
	(nautilus_mime_set_short_list_components_for_uri),
	(nautilus_mime_add_application_to_short_list_for_uri),
	(nautilus_mime_remove_application_from_short_list_for_uri),
	(nautilus_mime_add_component_to_short_list_for_uri),
	(nautilus_mime_remove_component_from_short_list_for_uri),
	(nautilus_mime_extend_all_applications_for_uri),
	(nautilus_mime_remove_from_all_applications_for_uri): All these
	functions now take a NautilusDirectory and a NautilusFile, rather
	than a URI.

	(gnome_vfs_mime_application_has_id),
	(gnome_vfs_mime_id_matches_application),
	(gnome_vfs_mime_application_has_id_not_in_list),
	(string_not_in_list), (extract_prefix_add_suffix),
	(make_oaf_query_with_known_mime_type),
	(make_oaf_query_with_uri_scheme_only), (free_key),
	(server_matches_content_requirements),
	(nautilus_do_component_query), (str_list_difference),
	(strv_concat): Reformatted.

	(get_mime_type_from_file): Changed from get_mime_type_from_uri;
	uses nautilus_file_wait_until_ready instead of synchronous I/O.

	* libnautilus-extensions/nautilus-program-chooser.c:
	(repopulate_program_list), (is_application_default_for_uri),
	(is_component_default_for_uri),
	(is_component_in_short_list_for_uri),
	(is_application_in_short_list_for_uri),
	(program_file_pair_is_default_for_file),
	(add_to_short_list_for_file), (remove_from_short_list_for_file),
	(remove_default_for_item), (set_default_for_item):
	* libnautilus-extensions/nautilus-program-choosing.c:
	(any_programs_available_for_file):
	* libnautilus-extensions/nautilus-wait-until-ready.h:
	* src/file-manager/fm-directory-view.c: (switch_location_and_view),
	(create_open_with_gtk_menu), (reset_bonobo_open_with_menu),
	(activate_callback):
	* src/nautilus-applicable-views.c: (got_file_info_callback),
	(nautilus_navigation_info_new), (nautilus_navigation_info_free):
	* src/nautilus-applicable-views.h:
	* src/nautilus-sidebar.c: (nautilus_sidebar_update_buttons):
	* src/nautilus-theme-selector.c: (add_theme_to_icons):
	* src/nautilus-window.c: (nautilus_window_switch_views),
	(nautilus_window_load_content_view_menu):
	* test/test-nautilus-mime-actions-set.c: (main):
	* test/test-nautilus-mime-actions.c: (main): Deal with above API changes.
2000-09-27 22:00:49 +00:00
Darin Adler 1035b5ea66 Fixed bug 640 (icon cache never frees images (awaiting GdkPixbuf
fix)). Also took care of bug 3145 (zillions of 'main_loops !=
	NULL' assertion failures when quitting) and bug 3138 (Some code in
	the icon factory is cut and pasted from elsewhere). And a few
	unrelated things that came up while I was busy working on these.

	* configure.in: Applied patch from Dan Winship to fix handling of
	CFLAGS and LDFLAGS. Fixes some missing quoting and other mistakes.

	* libnautilus-extensions/Makefile.am:
	* libnautilus-extensions/nautilus-icon-factory-private.h:
	* libnautilus-extensions/nautilus-thumbnails.c:
	* libnautilus-extensions/nautilus-thumbnails.h:
	Broke out the thumbnailing code into its own source file for
	clarity.

	* libnautilus-extensions/nautilus-directory.c:
	* libnautilus-extensions/nautilus-file-utilities.h:
	* libnautilus-extensions/nautilus-file-utilities.c:
	(nautilus_make_directory_and_parents):
	Moved nautilus_make_directory_and_parents into a place where the
	thumbnail code can share it instead of requiring its own copy.

	* libnautilus-extensions/nautilus-global-preferences.h:
	* libnautilus-extensions/nautilus-global-preferences.c:
	(destroy_global_prefs_dialog), (global_preferences_get_dialog),
	(nautilus_global_preferences_dialog_update),
	(nautilus_global_preferences_initialize):
	* libnautilus-extensions/nautilus-preferences.h:
	* libnautilus-extensions/nautilus-preferences.c:
	(preferences_initialize_if_needed), (preferences_shutdown):
	* src/nautilus-application.c: (nautilus_application_destroy):
	Changed code so that it cleans up with g_atexit instead of with an
	explicit shutdown call. This makes it sequence correctly with
	other atexit code.

	* libnautilus-extensions/nautilus-icon-canvas-item.h:
	* libnautilus-extensions/nautilus-icon-canvas-item.c:
	(nautilus_icon_canvas_item_destroy),
	(nautilus_icon_canvas_item_set_attach_points),
	(emblem_layout_next):
	* libnautilus-extensions/nautilus-icon-container.c:
	(nautilus_icon_container_update_icon):
	Added a Nautilus prefix to the EmblemAttachPoints typedef, since
	it's public.

	* libnautilus-extensions/nautilus-icon-factory.h:
	* libnautilus-extensions/nautilus-icon-factory.c:
	Changed the icon factory structure so that it will actually free
	pixbufs when done with them. Made some other small fixes to the
	icon factory in passing, including removing some redundant code
	and fixing the logic for getting custom icons and deleting the
	icon factory and g_atexit time.

	* src/file-manager/fm-icon-view.c: (play_file), (preview_sound):
	Restructured the logic for playing sound previews a little to get
	rid of compiler warnings and close some loopholes in the old code.

	* src/nautilus-main.c: (is_event_loop_needed),
	(quit_if_in_main_loop), (nautilus_gtk_main_quit_all),
	(event_loop_unregister), (nautilus_main_event_loop_register),
	(nautilus_main_is_event_loop_mainstay),
	(nautilus_main_event_loop_quit), (main): Fixed the main loop
	quitting logic so that it is a bit simpler and works with the
	gnome-vfs code that runs event handling after the last main loop
	is gone.
2000-09-20 00:44:07 +00:00
Mathieu Lacage e9e4d6ddca make it check if a target is begin copied into itself before doing the
2000-09-17  Mathieu Lacage  <mathieu@eazel.com>

	* src/file-manager/fm-list-view.c: (fm_list_receive_dropped_icons):
	make it check if a target is begin copied into itself before doing
	the actual file operation. ie: bug 3085
	* test/Makefile.am: add brand new test I used in my quest for bug
	1963
	* test/test-nautilus-background.c: (main): the actual test :)
	run and you will see beautiful background.
2000-09-18 00:48:37 +00:00
Ramiro Estrugo afc5e4d4e4 Add function to create a GdkPixbuf from a string. Also fixed a debuggin
* libnautilus-extensions/nautilus-scalable-font.h:
	* libnautilus-extensions/nautilus-scalable-font.c:
	(nautilus_scalable_font_draw_text), (nautilus_text_layout_paint),
	(nautilus_gdk_pixbuf_new_from_text):
	Add function to create a GdkPixbuf from a string.  Also fixed a
	debuggin typo from before.

	* test/test-nautilus-font.c: (create_named_background),
	(rgba_run_alpha), (pixbuf_draw_rectangle),
	(pixbuf_draw_rectangle_around), (main):
	Add text to GdkPixbuf to GdkPixbuf compositing test.  Also add a
	bunch of hacks to make the tests more useful.
2000-09-07 16:27:41 +00:00
Ramiro Estrugo 7525ad4146 Add support for drawing underlined text. I also added a FIXME for the
* libnautilus-extensions/nautilus-scalable-font.c:
	(nautilus_text_layout_free), (nautilus_text_layout_new),
	(nautilus_text_layout_paint):
	* libnautilus-extensions/nautilus-scalable-font.h:
	Add support for drawing underlined text.  I also added a FIXME for
	the issue of hard coding the underline baseline rather than
	fetching the information from the rendred string.

	* test/test-nautilus-font.c: (main):
	Add underlined text test.
2000-09-07 11:43:20 +00:00
Ramiro Estrugo 897a33ffe9 Add support for drawint inverted text. Also cleanup the rendering function
* libnautilus-extensions/nautilus-scalable-font.c:
	(nautilus_scalable_font_measure_text), (invert_glyph),
	(nautilus_scalable_font_draw_text),
	(nautilus_scalable_font_draw_text_lines_with_dimensions),
	(nautilus_scalable_font_draw_text_lines),
	(nautilus_text_layout_paint):
	* libnautilus-extensions/nautilus-scalable-font.h:
	Add support for drawint inverted text.  Also cleanup the rendering
	function a bit.

	* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
	* libnautilus-extensions/nautilus-label.c: (render_buffer_pixbuf):
	* src/nautilus-about.c: (draw_aa_string):
	* src/nautilus-sidebar-tabs.c: (draw_one_tab_plain),
	(draw_one_tab_themed):
	Update all these for the new inverted scalable font api.

	* test/test-nautilus-font.c: (main):
	Add a inverted text test.
2000-09-07 11:11:14 +00:00
Ramiro Estrugo 4c7dc0ab85 Add text layout functions copied from libgnomeui/gnome-icon-text.[ch] and
* libnautilus-extensions/nautilus-scalable-font.c:
	(text_layout_free_row), (nautilus_text_layout_free),
	(nautilus_text_layout_new), (nautilus_text_layout_paint):
	* libnautilus-extensions/nautilus-scalable-font.h:
	Add text layout functions copied from
	libgnomeui/gnome-icon-text.[ch] and modified to work with
	NautilusScalalbleFont and GdkPixbuf instead of GdkFont and
	GdkDrawable.

	* test/test-nautilus-font.c: (main):
	Add text layout test.
2000-09-07 08:52:43 +00:00
Ramiro Estrugo e38dfd4fc3 Make the empty line height 1/2 of the font size to cram more stuff into
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
	Make the empty line height 1/2 of the font size to cram more stuff
	into the embedded text.

	* libnautilus-extensions/nautilus-label.c:
	(nautilus_label_size_request), (render_buffer_pixbuf),
	(label_get_empty_line_height),
	(label_get_total_text_and_line_offset_height),
	(label_recompute_line_geometries):
	Update for scalable font changes.

	* libnautilus-extensions/nautilus-scalable-font.c:
	(nautilus_scalable_font_measure_text_lines),
	(nautilus_scalable_font_draw_text_lines_with_dimensions),
	(nautilus_scalable_font_draw_text_lines):
	* libnautilus-extensions/nautilus-scalable-font.h:
	Add empty_line_height argument to text line measuring and drawing
	functions.  Use this in both measure and drawing computations.

	* test/test-nautilus-font.c: (gdk_pixbuf_draw_rectangle),
	(draw_rectangle_around), (main):
	Update for scalable font changes.  Also draw a box around area
	that is being clipped (or measured) to determine whether things
	work precisely.
2000-09-07 07:49:52 +00:00
Ramiro Estrugo 2be9f8a68e Add support for rendering text on pixbufs without alpha channels.
* libnautilus-extensions/nautilus-scalable-font.c:
	(nautilus_scalable_font_draw_text),
	(nautilus_scalable_font_draw_text_lines_with_dimensions),
	(nautilus_scalable_font_draw_text_lines),
	(initialize_global_stuff_if_needed):
	Add support for rendering text on pixbufs without alpha channels.

	* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
	No longer need to create a pixbuf with alpha channel duplicate.

	* test/test-nautilus-font.c: (main):
	Paint the pixbuf white before drawing stuff to it.
2000-09-06 01:49:05 +00:00
Ramiro Estrugo 01e90c35c8 Add a dumb script to make it easy to run the font test.
* test/Makefile.am:
	* test/font-test.sh:
	Add a dumb script to make it easy to run the font test.

	* test/test-nautilus-font.c: (main):
	Make the clipping test better; clip both vertically and
	horizontally.
2000-09-06 00:52:04 +00:00
Pavel Cisler add783964b Fix all the warnings -Wuninitialized found. Quite a number of them were
2000-09-05  Pavel Cisler  <pavel@eazel.com>

	* components/help/converters/gnome-db2html2/gdb3html.c:
	(xml_parse_document):
	* components/help/hyperbola-nav-index.c: (end_element):
	* components/services/summary/nautilus-view/nautilus-summary-view.c
	: (logout_button_cb):
	* components/services/time/service/trilobite-eazel-time-service.c:
	(trilobite_eazel_time_service_do_http_request):
	* components/tree/nautilus-tree-view.c:
	* configure.in:
	* libnautilus-extensions/bonobo-stream-vfs.c:
	(bonobo_stream_vfs_open):
	* libnautilus-extensions/nautilus-background.c:
	(nautilus_background_draw), (nautilus_background_draw_aa):
	* libnautilus-extensions/nautilus-customization-data.c:
	(nautilus_customization_data_new):
	* libnautilus-extensions/nautilus-directory-background.c:
	(nautilus_directory_background_write_desktop_settings):
	* libnautilus-extensions/nautilus-file-operations.c:
	(nautilus_file_operations_move_to_trash), (do_empty_trash):
	* libnautilus-extensions/nautilus-file.c: (nautilus_file_dump):
	* libnautilus-extensions/nautilus-icon-canvas-item.c:
	(draw_or_measure_label_text), (emblem_layout_next):
	* libnautilus-extensions/nautilus-icon-factory.c:
	(get_image_from_cache):
	* libnautilus-extensions/nautilus-icon-text-item.c:
	(iti_paint_text):
	* libnautilus-extensions/nautilus-list.c: (draw_cell), (draw_row):
	* libnautilus-extensions/nautilus-mime-actions.c:
	(nautilus_mime_add_application_to_short_list_for_uri):
	* libnautilus-extensions/nautilus-program-chooser.c:
	(program_file_pair_get_short_status_text),
	(program_file_pair_get_long_status_text):
	* libnautilus-extensions/nautilus-program-choosing.c:
	(nautilus_choose_component_for_file),
	(nautilus_choose_application_for_file):
	* libnautilus-extensions/nautilus-scalable-font.c:
	(nautilus_scalable_font_draw_text_lines_with_dimensions):
	* libnautilus-extensions/nautilus-theme.c:
	(nautilus_theme_make_selector):
	* librsvg/rsvg-ft.c: (rsvg_ft_get_glyph):
	* librsvg/test-ft-gtk.c: (set_text):
	* librsvg/test-ft.c: (save_pixbuf_to_file_internal),
	(save_pixbuf_to_file):
	* librsvg/test-rsvg.c: (save_pixbuf_to_file_internal),
	(save_pixbuf_to_file):
	* src/file-manager/fm-directory-view.c: (display_pending_files),
	(compute_menu_item_info):
	* src/file-manager/fm-icon-view.c: (compute_menu_item_info):
	* src/file-manager/fm-list-view.c: (get_column_from_attribute):
	* src/nautilus-application.c: (nautilus_application_startup):
	* src/nautilus-search-bar-criterion.c:
	(nautilus_search_bar_criterion_next_new),
	(nautilus_search_bar_criterion_get_location),
	(get_date_modified_location_for):
	* src/nautilus-sidebar-tabs.c: (draw_one_tab_themed),
	(draw_or_layout_all_tabs):
	* src/nautilus-toolbar.c: (nautilus_toolbar_size_allocate):
	* src/nautilus-window-manage-views.c:
	(nautilus_window_get_current_location_title):
	* test/test-nautilus-label.c: (justification_changed_callback):

	Fix all the warnings -Wuninitialized found.
	Quite a number of them were actual bugs.
	Turn on -Wuninitialized in configure.in now that ORBit generates
	warning-free code.
2000-09-05 20:38:10 +00:00
Ramiro Estrugo e5b8f54863 Simpify the text line drawing function to not reuqire passing in the
* libnautilus-extensions/nautilus-label.c: (render_buffer_pixbuf):
	* libnautilus-extensions/nautilus-scalable-font.c:
	(nautilus_scalable_font_draw_text_lines_with_dimensions),
	(nautilus_scalable_font_draw_text_lines):
	* libnautilus-extensions/nautilus-scalable-font.h:
	Simpify the text line drawing function to not reuqire passing in
	the number of lines or their dimensions.  Compute these when
	needed.  An alternate function that accepts the dimensions is
	available as well.

	* test/test-nautilus-font.c: (main):
	Draw both text lines and single line clipped text to test more
	stuff.
2000-09-05 11:41:47 +00:00
Ramiro Estrugo 4025fec57a More work on task 1588.
* libnautilus-extensions/nautilus-scalable-font.c:
	(nautilus_scalable_font_draw_text),
	(nautilus_scalable_font_measure_text_lines),
	(nautilus_scalable_font_draw_text_lines):
	* libnautilus-extensions/nautilus-scalable-font.h:
	Change text rendering api to take in x,y coordinates along with a
	clip_area.

	Remove some #if 0 code i left in before.

	Also change the text lines rendering api to optionally do its own
	line measuring - for the convenience of the caller.

	* libnautilus-extensions/nautilus-label.c: (render_buffer_pixbuf):
	Update for text rendering changes.
	Fix the justification bug.
	Fix the multiple newlines bug.

	* src/nautilus-about.c: (draw_aa_string):
	Update for text rendering changes.

	* src/nautilus-sidebar-tabs.c: (draw_one_tab_plain),
	(draw_one_tab_themed):
	Update for text rendering changes.

	* test/test-nautilus-font.c: (main):
	Update for text rendering changes.
	Also add multiple new lines test and clipping test.

	* test/test-nautilus-label.c: (main):
	Update for text rendering changes.
2000-09-05 09:37:56 +00:00
Ramiro Estrugo 93861b3494 Work on task 1588.
* libnautilus-extensions/nautilus-scalable-font.c:
	(nautilus_scalable_font_measure_text),
	(nautilus_scalable_font_draw_text),
	(nautilus_scalable_font_measure_text_lines),
	(nautilus_scalable_font_draw_text_lines),
	(nautilus_scalable_font_measure_text_lines),
	(nautilus_scalable_font_draw_text_lines),
	(nautilus_scalable_font_largest_fitting_font_size):
	* libnautilus-extensions/nautilus-scalable-font.h:
	Change api to accept a string with embedded new lines instead of
	an array of strings.  This simplifies many things.

	* libnautilus-extensions/nautilus-label.c:
	(nautilus_label_initialize), (nautilus_label_destroy),
	(render_buffer_pixbuf), (label_recompute_line_geometries):
	Update for NautilusScalalbleFont api changes.  No longer need to
	tokenize the text string.  we can feed the string to the rendering
	api as is.

	* librsvg/rsvg-ft.c: (rsvg_ft_render_string):
	* librsvg/rsvg-ft.h:
	Change the string to glyph rendering api to accept the string
	length rather than computing it.  This makes it possible to feed
	it arbitrary lengths.

	* librsvg/rsvg.c: (rsvg_text_handler_characters):
	* librsvg/test-ft-gtk.c: (draw_line):
	* librsvg/test-ft.c: (main):
	Update for api changes.

	* src/nautilus-about.c: (draw_aa_string):
	* src/nautilus-sidebar-tabs.c: (draw_one_tab_plain),
	(draw_one_tab_themed), (get_tab_width):
	* test/test-nautilus-font.c: (main):
	Update test to use text lines drawing api.

	* test/test-nautilus-label.c:
	(alpha_background_color_value_changed_callback), (main):
	Update test for 2 new lines in a row.
2000-09-04 15:05:39 +00:00
Ramiro Estrugo 155733d10e Add justification tests. Add drop shadow tests.
* test/test-nautilus-label.c: (justification_changed_callback),
	(drop_shadow_offset_changed_callback),
	(create_justification_frame), (create_drop_shadow_offset_frame),
	(main):
	Add justification tests.  Add drop shadow tests.
2000-08-31 05:50:20 +00:00
Ramiro Estrugo f7276747ab Add unref/ref functions for gcs that take NULL.
* libnautilus-extensions/nautilus-buffered-widget.c:
	(nautilus_buffered_widget_initialize),
	(nautilus_buffered_widget_destroy),
	(buffered_widget_update_pixbuf),
	(create_background_pixbuf_from_none),
	(create_background_pixbuf_from_solid),
	(create_background_pixbuf_from_ancestor),
	(create_background_pixbuf),
	(nautilus_buffered_widget_get_vertical_offset),
	(nautilus_buffered_widget_set_background_type),
	(nautilus_buffered_widget_get_background_type),
	(nautilus_buffered_widget_set_background_color),
	(nautilus_buffered_widget_get_background_color):
	* libnautilus-extensions/nautilus-buffered-widget.h:

	* libnautilus-extensions/nautilus-gdk-extensions.c:
	(nautilus_gdk_gc_ref_if_not_null),
	(nautilus_gdk_gc_unref_if_not_null):
	* libnautilus-extensions/nautilus-gdk-extensions.h:
	Add unref/ref functions for gcs that take NULL.

	* libnautilus-extensions/nautilus-label.c: (nautilus_label_new):
	* libnautilus-extensions/nautilus-label.h:
	Make the constructor work just like GtkLabel by accepting a string.

	* components/music/nautilus-music-view.c:
	(nautilus_music_view_initialize), (add_play_controls):
	Use the new NautilusLabel constructor.

	* components/services/nautilus-dependent-shared/shared-service-widg
	ets.c: (create_label_widget):
	Use the new NautilusLabel constructor.

	* src/nautilus-first-time-druid.c: (make_anti_aliased_label),
	(set_up_update_feedback_page):
	Use the new NautilusLabel constructor.

	* src/nautilus-property-browser.c:
	(nautilus_property_browser_initialize),
	(make_properties_from_directory_path),
	(make_properties_from_xml_node), (make_category_link):
	Use the new NautilusLabel constructor.
	Fix the tile names to be antialises by using the new buffered
	widget SOLID background mode.

	* src/nautilus-sidebar-title.c:
	(sidebar_create_smooth_components_if_needed):
	Use the new NautilusLabel constructor.

	* src/nautilus-theme-selector.c:
	(nautilus_theme_selector_initialize):
	Use the new NautilusLabel constructor.

	* test/test-nautilus-image.c: (main):
	* test/test-nautilus-label.c: (main):
	Use the new NautilusLabel constructor.
2000-08-29 02:11:38 +00:00
Ramiro Estrugo 169007c28e Fix the background color test.
* test/test-nautilus-label.c:
	(red_label_color_value_changed_callback),
	(green_label_color_value_changed_callback),
	(blue_label_color_value_changed_callback),
	(alpha_label_color_value_changed_callback),
	(red_background_color_value_changed_callback),
	(green_background_color_value_changed_callback),
	(blue_background_color_value_changed_callback),
	(alpha_background_color_value_changed_callback),
	(widget_set_nautilus_background_image),
	(widget_set_nautilus_background_color),
	(widget_get_nautilus_background_color),
	(background_changed_callback), (main):

	Fix the background color test.
2000-08-25 10:42:52 +00:00
Ramiro Estrugo b08142cc0f Add support for case insensitive string lists.
* libnautilus-extensions/nautilus-string-list.c:
	(nautilus_string_list_new), (nautilus_string_list_new_from_string),
	(nautilus_string_list_new_from_string_list),
	(nautilus_string_list_new_from_tokens),
	(nautilus_string_list_contains), (nautilus_string_list_equals),
	(nautilus_string_list_get_index_for_string),
	(nautilus_string_list_sort),
	(nautilus_string_list_remove_duplicates), (str_is_equal),
	(nautilus_self_check_string_list):
	* libnautilus-extensions/nautilus-string-list.h:

	Add support for case insensitive string lists.

	* libnautilus-extensions/nautilus-string-map.c,
	* libnautilus-extensions/nautilus-string-map.c:
	(nautilus_string_map_add), (map_entry_new),
	(map_entry_list_lookup_mapped_string), (str_is_equal),
	(nautilus_self_check_string_map):

	Add support for case insensitive string maps.

	* libnautilus-extensions/nautilus-string.c:
	(nautilus_istr_compare):

	Add missing function that apparentlt was missing and unnoticed.

	* libnautilus-extensions/nautilus-font-picker.c:
	(font_picker_update_weight_picker),
	(font_picker_update_slant_picker),
	(font_picker_update_set_width_picker):
	* libnautilus-extensions/nautilus-preference.c:
	(preference_allocate_type_info):
	* libnautilus-extensions/nautilus-preferences-item.c:
	(preferences_item_create_font_family),
	(preferences_item_create_theme):
	* libnautilus-extensions/nautilus-scalable-font.c:
	(parse_font_description_file), (font_family_table_add_fonts),
	(nautilus_scalable_font_largest_fitting_font_size),
	(font_family_table_get_family_list),
	(nautilus_scalable_font_query_font):
	* libnautilus-extensions/nautilus-string-picker.c:
	(nautilus_string_picker_initialize),
	(nautilus_string_picker_get_string_list),
	(nautilus_string_picker_insert_string):
	* libnautilus-extensions/nautilus-user-level-manager.c:
	(user_level_manager_new),
	(nautilus_user_level_manager_get_user_level_names):
	* src/file-manager/fm-directory-view.c:
	(real_get_emblem_names_to_exclude):
	* src/nautilus-application.c:
	(nautilus_application_check_user_directories):
	* test/test-nautilus-image.c: (create_font_picker_frame):
	* test/test-nautilus-label.c: (create_font_picker_frame):
	* test/test-nautilus-widgets.c: (test_string_picker):

	Update for case insensitive support changes in string list api.
2000-08-21 16:35:03 +00:00
Ramiro Estrugo 7050528710 Tasks: 1612, 1274, 1511 and 1588.
* libnautilus-extensions/nautilus-scalable-font.c:
	* libnautilus-extensions/nautilus-scalable-font.h:

	New GtkObject subclass that provdes a simple interface to raph's
	librsvg FreeType2 bases anti aliased text rendering.

	* libnautilus-extensions/nautilus-font-picker.c:
	* libnautilus-extensions/nautilus-font-picker.h:

	New font picker class.  I will soon use it in the preferences
	dialog instead of the current one.

	* libnautilus-extensions/nautilus-buffered-widget.c:
	* libnautilus-extensions/nautilus-buffered-widget.h:

	New virtual widget class that encapsulates the details of finding
	a suitable background for compositing pixbufs.

	* libnautilus-extensions/nautilus-image.c:
	* libnautilus-extensions/nautilus-image.h:

	Rewritten NautilusImage class.  Took out all the label stuff,
	which lives in its own class.  Now subclassed from
	NautilusBufferedWidget so that background the image gets
	composited on is always correct and groks NautilusBackground.

	* libnautilus-extensions/nautilus-label.c:
	* libnautilus-extensions/nautilus-label.h:

	New NautilusLabel widget class.  A label widget that is capable of
	displaying anti aliased text composited over a complex background.

	The background can be installed as NautilusBackground on a
	NautilusLabel widget or any of its ancestors.  The best background
	will automatically be found and used by the widget.

	* services/nautilus-dependant-shared/shared-service-widgets.c,
	* services/nautilus-dependant-shared/shared-service-widgets.h,
	* services/startup/nautilus-view/nautilus-service-startup-view.c:

	Update for changes in the NautilusImage api.  Unfortunately, these
	components are slightly broken now cause of the NautilusImage
	changes.  I will fix them shortly.

	* libnautilus-extensions/nautilus-string-map.c:
	* libnautilus-extensions/nautilus-string-map.h:

	New simple class to map an arbitrary number of strings to a single
	string.

	* libnautilus-extensions/nautilus-lib-self-check-functions.h:
	Add tests for the new string map class.

	* libnautilus-extensions/Makefile.am:

	Build the new widgets.  Also add some depedencies on the static
	libraries we link into this beast.  This way,
	libnautilus-extensions will rebuild of one if its dependency
	static libs is touched.

	* test/.cvsignore,
	* test/Makefile.am,
	* test/test-nautilus-font-picker.c,
	* test/test-nautilus-font.c,
	* test/test-nautilus-image.c,
	* test/test-nautilus-label.c:

	Update test programs for new widgets.
2000-08-21 14:16:54 +00:00
Ramiro Estrugo f5f7af7389 New function to insert a string without having to access the string list
* libnautilus-extensions/nautilus-string-picker.c:
	(nautilus_string_picker_initialize),
	(nautilus_string_picker_destroy),
	(nautilus_string_picker_set_string_list),
	(nautilus_string_picker_get_string_list),
	(nautilus_string_picker_get_selected_string),
	(nautilus_string_picker_set_selected_string),
	(nautilus_string_picker_insert_string):
	* libnautilus-extensions/nautilus-string-picker.h:
	New function to insert a string without having to access the
	string list first.  Also renamed some poorly named functions.

	* libnautilus-extensions/nautilus-preferences-item.c:
	(preferences_item_create_font_family),
	(preferences_item_create_theme), (text_item_changed_callback):
	Update for string picker api changes.

	* test/test-nautilus-widgets.c: (test_string_picker),
	(string_picker_changed_callback):
	Update for string picker api changes.
2000-08-18 06:52:56 +00:00
Ramiro Estrugo 25ed636716 Have only one constructor and feed it whether the radio button group is
* libnautilus-extensions/nautilus-radio-button-group.c:
	(nautilus_radio_button_group_initialize),
	(nautilus_radio_button_group_new),
	(nautilus_radio_button_group_set_entry_pixbuf),
	(nautilus_radio_button_group_set_entry_description_text):
	* libnautilus-extensions/nautilus-radio-button-group.h:

	Have only one constructor and feed it whether the radio button
	group is horizontal or not.

	Changed the login of some assertions on code that is meant for the
	NOT horzontal case.  This should fix the torrent of assertions at
	startup.

	* libnautilus-extensions/nautilus-preferences-item.c:
	(preferences_item_create_enum),
	(preferences_item_create_short_enum):

	Update for radio button group constructor change.

	* src/nautilus-first-time-druid.c: (set_up_user_level_page),
	(set_up_service_signup_page):

	Update for radio button group constructor change.

	* test/test-nautilus-widgets.c: (main), (radio_group_load_it_up),
	(test_radio_group), (test_radio_group_horizontal):

	Add a test for the radio button group horizontal case.
2000-08-02 14:58:17 +00:00
Robey Pointer c1deba356e ammend password dialog to accept an optional message to display at the top (for example, when asking for a retry after a bad password); fix time service to use the password dialog correctly and obey the cancel button and the 'remember' checkbox, and to give you three tries before giving up 2000-07-29 00:19:50 +00:00
Ramiro Estrugo 4232317b33 Make the cut-n-paste libraries be only static archives. Link all the
* Makefile.am:
	* components/hardware/Makefile.am:
	* components/help/Makefile.am:
	* components/history/Makefile.am:
	* components/html/Makefile.am:
	* components/loser/content/Makefile.am:
	* components/loser/sidebar/Makefile.am:
	* components/music/Makefile.am:
	* components/notes/Makefile.am:
	* components/rpmview/Makefile.am:
	* components/services/install/nautilus-view/Makefile.am:
	* components/services/inventory/nautilus-view/Makefile.am:
	* components/services/login/nautilus-view/Makefile.am:
	* components/services/startup/nautilus-view/Makefile.am:
	* components/services/summary/nautilus-view/Makefile.am:
	* components/services/time/nautilus-view/Makefile.am:
	* components/services/trilobite/sample/nautilus-view/Makefile.am:
	* components/services/vault/nautilus-view/Makefile.am:
	* components/tree/Makefile.am:
	* components/websearch/Makefile.am:
	* cut-n-paste-code/widgets/e-paned/Makefile.am:
	* cut-n-paste-code/widgets/nautilus-druid/Makefile.am:
	* helper-utilities/authenticate/Makefile.am:
	* libnautilus-extensions/Makefile.am:
	* librsvg/Makefile.am:
	* src/Makefile.am:
	* test/Makefile.am:

	Make the cut-n-paste libraries be only static archives.  Link all
	the private libraries statically into libnautilus-extensions.
	Remove all the references to private libraries in all the
	components and other users of libnautilus-extensions so that
	dependencies can be managed in just one place.
2000-07-26 21:53:48 +00:00
Mathieu Lacage 7191cb9077 chuut 2000-07-22 00:06:54 +00:00
Ramiro Estrugo b70e6e52b7 Add support for nicely aligned description labels.
* libnautilus-extensions/nautilus-radio-button-group.c:
	(button_toggled), (nautilus_radio_button_group_insert),
	(nautilus_radio_button_group_get_active_index),
	(nautilus_radio_button_group_set_entry_pixbuf),
	(nautilus_radio_button_group_set_entry_description_text):
	* libnautilus-extensions/nautilus-radio-button-group.h:
	Add support for nicely aligned description labels.

	* src/nautilus-first-time-druid.c: (create_named_pixbuf),
	(set_up_user_level_page), (nautilus_first_time_druid_show):
	Add icons for each of the user levels.

	Use radio group description labels for the description blurb so
	that they align nicely.

	* test/test-nautilus-widgets.c: (test_radio_group):
	Update for description label support.
2000-07-18 09:04:23 +00:00
Ramiro Estrugo a2c679cc19 Add support for displaying an option icon with each radio button pixbuf.
* libnautilus-extensions/nautilus-radio-button-group.c:
	(nautilus_radio_button_group_initialize_class),
	(nautilus_radio_button_group_initialize),
	(nautilus_radio_button_group_destroy),
	(radio_button_group_free_button_group),
	(nautilus_radio_button_group_insert),
	(nautilus_radio_button_group_get_active_index),
	(nautilus_radio_button_group_set_active_index),
	(nautilus_radio_button_group_set_pixbuf):
	* libnautilus-extensions/nautilus-radio-button-group.h:
	Add support for displaying an option icon with each radio button
	pixbuf.  Use NautilusImage for this.

	* test/test-nautilus-widgets.c: (create_pixbuf),
	(test_radio_group):
	Update test to include icon support.
2000-07-18 08:12:43 +00:00
Ramiro Estrugo 27c8b5ab89 Move the leakchecker library to its own place.
* configure.in:
	* test/Makefile.am:
	* test/nautilus-leak-checker-stubs.h:
	* test/nautilus-leak-checker.c:
	* test/nautilus-leak-checker.h:
	* test/nautilus-leak-hash-table.c:
	* test/nautilus-leak-hash-table.h:
	* test/nautilus-leak-symbol-lookup.c:
	* test/nautilus-leak-symbol-lookup.h:
	* tools/leak-checker:

	Move the leakchecker library to its own place.
2000-07-14 18:53:54 +00:00
Ramiro Estrugo f7263fbde7 Rename NautilusGraphic to NautilusImage everywhere.
*
	components/services/install/nautilus-view/nautilus-service-install-
	view.c: (generate_install_form), (create_image_widget),
	(create_title_widget), (create_middle_title_widget):
	* components/services/login/nautilus-view/nautilus-login-view.c:
	(generate_login_form), (create_image_widget),
	(create_title_widget):
	*
	components/services/startup/nautilus-view/nautilus-service-startup-
	view.c: (generate_startup_form), (create_image_widget),
	(generate_form_logo):
	* libnautilus-extensions/Makefile.am:
	* libnautilus-extensions/nautilus-graphic.c:
	* libnautilus-extensions/nautilus-graphic.h:
	* libnautilus-extensions/nautilus-image.c:
	(nautilus_image_initialize_class), (nautilus_image_initialize),
	(nautilus_image_destroy), (nautilus_image_set_arg),
	(nautilus_image_get_arg), (nautilus_image_realize),
	(nautilus_image_unrealize), (nautilus_image_draw),
	(nautilus_image_size_allocate), (nautilus_image_size_request),
	(nautilus_image_map), (nautilus_image_unmap),
	(nautilus_image_expose), (ensure_buffer_size),
	(create_child_window), (nautilus_gdk_create_copy_area_gc),
	(nautilus_gdk_pixbuf_render_to_drawable),
	(nautilus_gdk_pixbuf_render_to_pixbuf),
	(nautilus_gdk_pixbuf_render_to_pixbuf_alpha),
	(gdk_string_dimensions), (nautilus_gdk_pixbuf_set_to_color),
	(nautilus_gdk_pixbuf_tile), (nautilus_gdk_pixbuf_tile_alpha),
	(nautilus_image_new), (nautilus_image_set_background_pixbuf),
	(nautilus_image_get_background_pixbuf),
	(nautilus_image_set_background_type),
	(nautilus_image_get_background_type),
	(nautilus_image_set_background_color),
	(nautilus_image_get_background_color),
	(nautilus_image_set_placement_type),
	(nautilus_image_get_placement_type), (nautilus_image_set_pixbuf),
	(nautilus_image_get_pixbuf), (nautilus_image_set_overall_alpha),
	(nautilus_image_set_label_text), (nautilus_image_get_label_text),
	(nautilus_image_set_label_font), (nautilus_image_get_label_font),
	(nautilus_image_set_left_offset),
	(nautilus_image_set_right_offset), (nautilus_image_set_top_offset),
	(nautilus_image_set_bottom_offset),
	(nautilus_image_set_extra_width),
	(nautilus_image_set_extra_height):
	* libnautilus-extensions/nautilus-image.h:
	* test/.cvsignore:
	* test/Makefile.am:
	* test/test-nautilus-graphic.c:
	* test/test-nautilus-image.c: (create_background), (create_pixbuf),
	(create_image), (alpha_scale_value_changed),
	(red_color_value_changed), (green_color_value_changed),
	(blue_color_value_changed), (toggle_background_type_callback),
	(create_color_scale), (main):

	Rename NautilusGraphic to NautilusImage everywhere.
2000-07-14 18:42:41 +00:00
Ramiro Estrugo f89aede974 Yank the leak checker intitialization code. Its not needed no more cause
* src/nautilus-main.c: (main):
	Yank the leak checker intitialization code.  Its not needed no
	more cause the leak checker automatically does it when its
	pre loaded.

	* test/nautilus-leak-checker.c: (print_leaks_at_exit),
	(__libc_start_main), (nautilus_leak_print_leaks):
	Call atexit() with the leak dumping function.
2000-07-14 18:23:18 +00:00
Elliot Lee a6b35053e4 Fix typo Fix srcdir != builddir:
* TODO: Fix typo
	* components/rpmview/Makefile.am,
	components/services/install/command-line/Makefile.am,
	components/services/install/lib/Makefile.am,
	components/services/install/nautilus-view/Makefile.am,
	components/services/install/server/Makefile.am,
	components/services/startup/lib/Makefile.am,
	components/services/time/command-line/Makefile.am,
	components/services/time/service/Makefile.am,
	components/services/trilobite/helper/Makefile.am,
	components/services/trilobite/sample/command-line/Makefile.am,
	components/services/trilobite/sample/service/Makefile.am,
	components/services/vault/command-line/Makefile.am,
	cut-n-paste-code/widgets/e-paned/Makefile.am,
	cut-n-paste-code/widgets/nautilus-druid/Makefile.am,
	libnautilus-extensions/Makefile.am,
	src/Makefile.am,
	test/Makefile.am: Fix srcdir != builddir:

	* components/services/trilobite/helper/eazel-helper.c,
	components/services/vault/command-line/vault-operations.c,
	libnautilus-extensions/nautilus-graphic.c,
	libnautilus-extensions/nautilus-icon-container.c,
	libnautilus-extensions/nautilus-list.c: Include string.h
	for strlen prototype.
2000-07-13 22:16:54 +00:00
Darin Adler 41f3913cdf Change to use bonobo_object_unref now that the leaks have been fixed. This
* src/nautilus-view-frame.c: (nautilus_view_frame_destroy_client):
	Change to use bonobo_object_unref now that the leaks have been
	fixed.  This requires the new Bonobo or you'll have lots of leaked
	processes. Luckily, Nautilus won't compile without the new Bonobo
	due to my use of bonobo_object_shutdown in main :-)

	* configure.in:
	Fix the way -Werror works so it affects all directories, not just
	ones where we use WERROR.

	* components/hardware/Makefile.am:
	* components/help/Makefile.am:
	* components/history/Makefile.am:
	* components/loser/content/Makefile.am:
	* components/loser/sidebar/Makefile.am:
	* components/mozilla/Makefile.am:
	* components/music/Makefile.am:
	* components/notes/Makefile.am:
	* components/rpmview/Makefile.am:
	* components/sample/Makefile.am:
	* components/services/install/command-line/Makefile.am:
	* components/services/install/lib/Makefile.am:
	* components/services/install/nautilus-view/Makefile.am:
	* components/services/install/server/Makefile.am:
	* components/services/inventory/lib/Makefile.am:
	* components/services/inventory/nautilus-view/Makefile.am:
	* components/services/inventory/service/Makefile.am:
	* components/services/login/lib/Makefile.am:
	* components/services/login/nautilus-view/Makefile.am:
	* components/services/login/service/Makefile.am:
	* components/services/startup/command-line/Makefile.am:
	* components/services/startup/lib/Makefile.am:
	* components/services/startup/nautilus-view/Makefile.am:
	* components/services/summary/lib/Makefile.am:
	* components/services/summary/nautilus-view/Makefile.am:
	* components/services/summary/service/Makefile.am:
	* components/services/time/command-line/Makefile.am:
	* components/services/time/nautilus-view/Makefile.am:
	* components/services/time/service/Makefile.am:
	* components/services/trilobite/helper/Makefile.am:
	* components/services/trilobite/libtrilobite/Makefile.am:
	* components/services/trilobite/sample/command-line/.cvsignore:
	* components/services/trilobite/sample/command-line/Makefile.am:
	* components/services/trilobite/sample/lib/Makefile.am:
	* components/services/trilobite/sample/nautilus-view/Makefile.am:
	* components/services/trilobite/sample/service/Makefile.am:
	* components/services/vault/command-line/Makefile.am:
	* components/services/vault/lib/Makefile.am:
	* components/services/vault/nautilus-view/Makefile.am:
	* components/services/vault/service/Makefile.am:
	* components/tree/Makefile.am:
	* components/websearch/Makefile.am:
	* cut-n-paste-code/widgets/nautilus-druid/Makefile.am:
	* helper-utilities/authenticate/Makefile.am:
	* libnautilus-extensions/Makefile.am:
	* libnautilus/Makefile.am:
	* librsvg/Makefile.am:
	* nautilus-installer/src/Makefile.am:
	* src/Makefile.am:
	* src/file-manager/Makefile.am:
	* test/Makefile.am:
	Got rid of the WERROR shell variable. The -Werror switch is no
	longer a per-directory thing.

	* librsvg/Makefile.am:
	Added libpng to the libraries for the test program. Maybe this was
	the wrong thing to do, but before this change the link failed.

	* components/sample/Makefile.am:
	* components/sample/main.c:
	* components/sample/nautilus-sample-content-view.c:
	* components/sample/nautilus-sample-content-view.h:
	A clean-up of the sample, including fixing many bugs and adding
	lots of comments. I figure we want this to be as close to
	exemplary as possible since people will continue to start with it
	for new components.

	* libnautilus-extensions/nautilus-bookmark.c:
	(nautilus_bookmark_new_with_icon): Removed a bogus extra ref of a
	NautilusFile object that I spotted in here.

	* src/nautilus-application.c: (nautilus_application_destroy_window):
	Re-added the code to quit when the last window is closed that Mike
	removed in his recent check-in.

	* src/nautilus-main.c: (main): Added a call to bonobo_shutdown.
	We don't need this call, but I say, "Why not?"
2000-07-12 19:33:38 +00:00
Robin Slomkowski b9c988de83 mass change of LDFLAGS to LDADD 2000-07-11 21:30:29 +00:00
Ramiro Estrugo 5df05d4530 Forgot the makefile in the last commit.
* test/Makefile.am:
	Forgot the makefile in the last commit.
2000-07-11 11:15:34 +00:00
Ramiro Estrugo ba0e6fd383 Many cleanups and improvements. Use the GnomeDialog run_and_close call
* libnautilus-extensions/nautilus-password-dialog.c:
	(nautilus_password_dialog_initialize_class),
	(nautilus_password_dialog_initialize),
	(nautilus_password_dialog_destroy), (dialog_show_callback),
	(dialog_close_callback), (caption_table_activate_callback),
	(nautilus_password_dialog_new),
	(nautilus_password_dialog_run_and_block),
	(nautilus_password_dialog_set_username),
	(nautilus_password_dialog_set_password),
	(nautilus_password_dialog_set_readonly_username),
	(nautilus_password_dialog_get_username),
	(nautilus_password_dialog_get_password),
	(nautilus_password_dialog_get_remember),
	(nautilus_password_dialog_set_remember),
	(nautilus_password_dialog_set_remember_label_text):
	* libnautilus-extensions/nautilus-password-dialog.h:
	Many cleanups and improvements.  Use the GnomeDialog run_and_close
	call instead of our own event loop hack.  Removed many unneeded
	callbacks and details member variables.  Add checks for all
	callbacks.  Add support for remembering the password.

	* test/.cvsignore:
	* test/Makefile.am:
	* test/test-nautilus-password-dialog.c:
	(authenticate_boink_callback), (exit_callback), (main):
	Add a new test for the password dialog.

	* test/test-nautilus-widgets.c: (main),
	(text_caption_changed_callback):
	Removed the old password dialog test.
2000-07-11 10:46:54 +00:00
Ramiro Estrugo af7bd12d44 Add support for boundary offset and extra width and height.
* libnautilus-extensions/nautilus-graphic.c:
	(nautilus_graphic_initialize), (nautilus_graphic_size_allocate),
	(nautilus_graphic_size_request), (nautilus_graphic_set_label_text),
	(nautilus_graphic_set_label_font),
	(nautilus_graphic_set_left_offset),
	(nautilus_graphic_set_right_offset),
	(nautilus_graphic_set_top_offset),
	(nautilus_graphic_set_bottom_offset),
	(nautilus_graphic_set_extra_width),
	(nautilus_graphic_set_extra_height):
	* libnautilus-extensions/nautilus-graphic.h:
	Add support for boundary offset and extra width and height.

	* test/test-nautilus-graphic.c: (main):
	Update for new boundary offset support.

	components/services/install/nautilus-view/nautilus-service-install-
	view.c: (generate_install_form), (create_graphic_widget),
	(create_title_widget):
	* components/services/login/nautilus-view/nautilus-login-view.c:
	(generate_login_form), (create_graphic_widget),
	(create_title_widget):
	Use new graphic widget to make things prettier.
2000-07-10 23:31:37 +00:00
Ramiro Estrugo 4fdb98d8e0 New function to draw text into a pixbuf given a rect and a string.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
	(nautilus_gdk_pixbuf_scale_to_fit),
	(nautilus_gdk_pixbuf_draw_text):
	* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
	New function to draw text into a pixbuf given a rect and a
	string.   Factored from the icon factoyr.
	* libnautilus-extensions/nautilus-graphic.c:
	(nautilus_graphic_size_allocate):
	Add support for drawing text.

	* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
	Factored out gdk pixbuf text drawing.  Use the new text drawing
	function.

	* test/test-nautilus-graphic.c: (create_color_scale):
	Update for text support.
2000-07-10 22:35:14 +00:00
Ramiro Estrugo 747245d712 Add arlo's services title icons.
* components/services/startup/nautilus-view/icons/Makefile.am,
	  eazel-services-logo.png,
	    eazel-services-logo-tile.png:
	    Add arlo's services title icons.

	    * libnautilus-extensions/Makefile.am:
	    * libnautilus-extensions/nautilus-graphic.c:
	    (nautilus_graphic_initialize_class), (nautilus_graphic_initialize),
	    (nautilus_graphic_destroy), (nautilus_graphic_set_arg),
	    (nautilus_graphic_get_arg), (nautilus_graphic_realize),
	    (nautilus_graphic_unrealize), (nautilus_graphic_draw),
	    (nautilus_graphic_size_allocate), (nautilus_graphic_size_request),
	    (nautilus_graphic_map), (nautilus_graphic_unmap),
	    (nautilus_graphic_expose), (ensure_buffer_size),
	    (create_child_window), (nautilus_gdk_create_copy_area_gc),
	    (nautilus_gdk_pixbuf_render_to_drawable),
	    (nautilus_gdk_pixbuf_render_to_pixbuf),
	    (nautilus_gdk_pixbuf_render_to_pixbuf_alpha),
	    (gdk_string_dimensions), (nautilus_gdk_pixbuf_set_to_color),
	    (nautilus_gdk_pixbuf_tile), (nautilus_gdk_pixbuf_tile_alpha),
	    (nautilus_graphic_new), (nautilus_graphic_set_background_pixbuf),
	    (nautilus_graphic_get_background_pixbuf),
	    (nautilus_graphic_set_background_type),
	    (nautilus_graphic_get_background_type),
	    (nautilus_graphic_set_background_color),
	    (nautilus_graphic_get_background_color),
	    (nautilus_graphic_set_placement_type),
	    (nautilus_graphic_get_placement_type),
	    (nautilus_graphic_set_pixbuf), (nautilus_graphic_get_pixbuf),
	    (nautilus_graphic_set_overall_alpha),
	    (nautilus_graphic_set_label_text),
	    (nautilus_graphic_get_label_text),
	    (nautilus_graphic_set_label_font),
	    (nautilus_graphic_get_label_font):
	    * libnautilus-extensions/nautilus-graphic.h:
	    Add NautilusGraphic widget to build.

	    * test/.cvsignore:
	    * test/Makefile.am:
	    * test/test-nautilus-graphic.c: (create_background),
	    (create_pixbuf), (create_graphic), (alpha_scale_value_changed),
	    (red_color_value_changed), (green_color_value_changed),
	    (blue_color_value_changed), (toggle_background_type_callback),
	    (create_color_scale), (main):
	    Add test for NautilusGraphic widget.
2000-07-10 13:14:58 +00:00
Ramiro Estrugo fb85312413 Changed string picker to use option menus instead of combo boxes.
* libnautilus-extensions/nautilus-string-picker.c:
(nautilus_string_picker_initialize_class),
(nautilus_string_picker_initialize),
(nautilus_string_picker_destroy), (option_menu_activate_callback),
(nautilus_string_picker_set_string_list),
(nautilus_string_picker_get_text),
(nautilus_string_picker_set_text):
* libnautilus-extensions/nautilus-string-picker.h:
Changed string picker to use option menus instead of combo boxes.

* test/test-nautilus-widgets.c: (test_string_picker),
(string_picker_changed_callback):
Changed widget test program to exercise more string picker
functions.
2000-07-05 16:23:49 +00:00
Ramiro Estrugo a356df0de7 Moved widgets and preferences test to nautilus/test.
* libnautilus-extensions/test-nautilus-preferences.c:
* libnautilus-extensions/test-nautilus-widgets.c:
* libnautilus-extensions/test-preferences.c:
Moved widgets and preferences test to nautilus/test.

* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences.c: (main),
(test_preferences_item), (test_preferences_group),
(create_enum_item), (register_global_preferences):
* test/test-nautilus-widgets.c: (main), (test_radio_group),
(test_caption_table), (test_string_picker), (test_text_caption),
(test_authenticate_boink_callback),
(string_picker_changed_callback), (text_caption_changed_callback),
(test_password_dialog), (test_radio_changed_callback),
(test_caption_table_activate_callback):
Ressurect my widgets/preferences test over here.  They got whacked
in the nautilus-widgets -> libnautilus-extensions renamings.
2000-07-05 14:14:25 +00:00
Pavel Cisler e5c61a0135 Fixed some memory leaks.
2000-06-29  Pavel Cisler  <pavel@eazel.com>

	Fixed some memory leaks.

	* libnautilus-extensions/nautilus-mime-actions.c:
	(nautilus_mime_get_short_list_components_for_uri):
	Fix a leaked string.

	* src/nautilus-zoom-control.c:
	(nautilus_zoom_control_set_preferred_zoom_levels):
	Fix a leaky setter call.

	* test/Makefile.am:
	Add a make target for a leak checker tester.

	* test/nautilus-leak-checker.c:
	(nautilus_leak_allocation_record_init),
	(nautilus_leak_record_malloc), (nautilus_leak_record_realloc),
	(nautilus_leak_record_free), (print_one_leak),
	(nautilus_leak_print_leaks), (allocate_lots), (leak_mem2),
	(leak_mem), (main):
	* test/nautilus-leak-symbol-lookup.c:
	(nautilus_leak_print_symbol_address):
	Tweak the leak checker output a bit to make it more nicer and
	indicate the level of stack frame grouping.

	* src/nautilus-main.c: (print_leaks):
	Tweak the parameters a bit to print more leaks.
2000-06-30 03:46:40 +00:00
Eskil Heyn Olsen 8491d1a326 Rearranged so libeazelinstall is built before rpmview
* components/Makefile.am:
	Rearranged so libeazelinstall is built before rpmview

	* components/help/Makefile.am:
	Added a missing .h file so make dist works

	* components/rpmview/Makefile.am:
	* components/rpmview/nautilus-rpm-view-install.c:
	(nautilus_rpm_view_download_progress_signal),
	(nautilus_rpm_view_install_progress_signal),
	(nautilus_rpm_view_download_failed),
	(nautilus_rpm_view_install_failed_helper),
	(nautilus_rpm_view_install_failed),
	(nautilus_rpm_view_dependency_check),
	(nautilus_rpm_view_install_done),
	(nautilus_rpm_view_install_package_callback):
	* components/rpmview/nautilus-rpm-view-install.h:
	* components/rpmview/nautilus-rpm-view.c:
	(nautilus_rpm_view_initialize):
	Added a callback and some skeleton code to the install
	button. So it now does rpm installs.

	* components/services/install/lib/Makefile.am:
	* components/services/install/command-line/Makefile.am:
	Changed the libnames.
	*
	components/services/install/command-line/eazel-alt-install-corba.c:
	(done), (main):
	* components/services/install/lib/eazel-install-corba-callback.c:
	(eazel_install_callback_destroy),
	(eazel_install_callback_initialize), (eazel_install_callback_new),
	(eazel_install_callback_corba_objref),
	(eazel_install_callback_install_packages),
	(eazel_install_callback_query):
	* components/services/install/lib/eazel-install-corba-callback.h:
	* components/services/install/lib/eazel-install-corba-types.h:
	* components/services/install/lib/eazel-install-protocols.c:
	(get_search_url_for_package):
	* components/services/install/server/Makefile.am:
	* components/services/install/server/main.c:
	Changed the object destroction scheme, so eazel_install_callback
	now unrefs and destroys the bonobo object.

	* components/services/trilobite/sample/lib/Makefile.am:
	Fixed to pass make dist

	* nautilus-installer/src/Makefile:
	* nautilus-installer/src/Makefile.am:
	Patching so it works with the new installer libs (and still some
	stroking because of the static stuff)

	* nautilus.spec.in:
	* po/POTFILES.in:
	* test/Makefile.am:
	Slice and dice so make dist and rpm -ta works again.
2000-06-27 01:58:34 +00:00
Ramiro Estrugo a5e37b99c4 Remove the GNOMECANVASPIXBUF depedency. Its not used no more.
2000-06-20  Ramiro Estrugo  <ramiro@eazel.com>

* configure.in:
* libnautilus-extensions/Makefile.am:
* libnautilus/Makefile.am:
* librsvg/Makefile.am:
* nautilus-installer/src/Makefile:
* src/Makefile.am:
* src/file-manager/Makefile.am:
* test/Makefile.am:

Remove the GNOMECANVASPIXBUF depedency.  Its not used no more.
2000-06-20 16:26:35 +00:00
George Lebl 0d05aea1fc Do the sscanf into a gulong and then assign to the inode which is of type
Tue Jun 20 01:49:08 2000  George Lebl <jirka@5z.com>

	* test/nautilus-leak-symbol-lookup.c
	  (nautilus_leak_symbol_map_get_offsets):  Do the sscanf into a
	  gulong and then assign to the inode which is of type ino_t to avoid
	  #ifdefs or other hacks to make it work on alpha.
2000-06-20 08:52:55 +00:00
Pavel 2f786e1511 Do a better 64-bit clean fix avoiding messy ifdefs.
2000-06-18  Pavel  <pavel@eazel.com>

	* test/nautilus-leak-symbol-lookup.c:
	(nautilus_leak_symbol_map_get_offsets):
	Do a better 64-bit clean fix avoiding messy ifdefs.
2000-06-18 11:00:34 +00:00
George Lebl 30675e99d6 s/g_str_freev/g_strfreev/ as that's the correct glib name
Sun Jun 18 02:50:47 2000  George Lebl <jirka@5z.com>

	* components/help/help-method.c (file_in_info_path):
	  s/g_str_freev/g_strfreev/ as that's the correct glib name

	* components/help/hyperbola-main.c,
	  components/help/hyperbola-nav-index.c,
	  components/help/hyperbola-nav-search.c
	  components/help/hyperbola-nav-tree.c,
	  components/help/hyperbola-nav.h:  Use hyperbola-nav.h as a header
	  to put the prototypes from the hyperbola-nav-*.c files.  And
	  include this file in hyperbola-main.c and hyperbola-nav-*.c

	* libnautilus-extensions/nautilus-global-preferences.c
	  (global_preferences_register_boolean_with_defaults)
	  (global_preferences_register_enum_with_defaults),
	  libnautilus-extensions/nautilus-preferences.c
	  (preferences_hash_node_check_changes_func)
	  (user_level_changed_callback):
	  use GU?INT_TO_POINTER and GPOINTER_TO_U?INT macros to get and pass
	  ints and uints as pointers.

	* librsvg/rsvg-bpath-util.c, test/nautilus-leak-checker.c:
	  include <string.h>

	* test/nautilus-leak-checker.c (nautilus_leak_record_malloc)
	  (nautilus_leak_record_realloc) (nautilus_leak_record_free)
	  (print_one_leak):  Store pointers in gulongs not guints and
	  when printing size_t, cast to long and use %ld.

	* test/nautilus-leak-symbol-lookup.c
	  (nautilus_leak_symbol_map_get_offsets): When reading in gint64,
	  check if long is actually 64bit, in which case use %lx otherwise
	  use %Lx for sscanf.
2000-06-18 09:54:57 +00:00
JP Rosevear ea4fe73e38 Make sure that libleakcheck does not rely on the /gnome prefix to build.
2000-06-15  JP Rosevear  <jpr@arcavia.com>

	* test/Makefile.am: Make sure that libleakcheck does not rely
	on the /gnome prefix to build. Make sure libleakcheck is cleaned
	and uninstalled properly.
2000-06-15 18:15:20 +00:00
Pavel Cisler 281a37bc49 Fix problems in the reentry detection code that caused malloc/frees
2000-06-14  Pavel Cisler  <pavel@eazel.com>

	* test/Makefile.am:
	* test/nautilus-leak-checker.c: (detect_reentry),
	(nautilus_leak_record_malloc), (nautilus_leak_record_realloc),
	(nautilus_leak_record_free), (allocate_temporary_fallback_memory),
	(__libc_malloc), (__libc_memalign), (__libc_realloc),
	(__libc_free), (malloc), (realloc), (memalign), (calloc), (free),
	(main):
	Fix problems in the reentry detection code that caused malloc/frees
	sometimes getting counted twice.
	Add reentry detection for malloc getting reentered as a result of
	calling realloc.
2000-06-14 05:20:04 +00:00
Ramiro Estrugo 01be6552dd Added a place to put cut-n-paste code. Cut-n-pasted the e-paned widget
* Makefile.am:
* components/hardware/Makefile.am:
* components/help/Makefile.am:
* components/history/Makefile.am:
* components/html/Makefile.am:
* components/loser/content/Makefile.am:
* components/loser/sidebar/Makefile.am:
* components/music/Makefile.am:
* components/notes/Makefile.am:
* components/rpmview/Makefile.am:
* components/sample/Makefile.am:
* components/services/startup/nautilus-view/Makefile.am:
* components/services/time/nautilus-view/Makefile.am:
* components/services/trilobite/sample/nautilus-view/Makefile.am:
* components/websearch/Makefile.am:
* configure.in:
* cut-n-paste-code/.cvsignore:
* cut-n-paste-code/Makefile.am:
* cut-n-paste-code/README:
* cut-n-paste-code/widgets/.cvsignore:
* cut-n-paste-code/widgets/Makefile.am:
* cut-n-paste-code/widgets/e-paned/.cvsignore:
* cut-n-paste-code/widgets/e-paned/Makefile.am:
* cut-n-paste-code/widgets/e-paned/e-hpaned.c: (e_hpaned_get_type),
(e_hpaned_class_init), (e_hpaned_init), (e_hpaned_new),
(e_hpaned_size_request), (e_hpaned_size_allocate), (e_hpaned_draw),
(e_hpaned_xor_line), (e_hpaned_button_press),
(e_hpaned_button_release), (e_hpaned_motion),
(e_hpaned_handle_shown):
* cut-n-paste-code/widgets/e-paned/e-hpaned.h:
* cut-n-paste-code/widgets/e-paned/e-paned.c: (e_paned_get_type),
(e_paned_class_init), (e_paned_child_type), (e_paned_init),
(e_paned_set_arg), (e_paned_get_arg), (e_paned_realize),
(e_paned_map), (e_paned_unmap), (e_paned_unrealize),
(e_paned_expose), (e_paned_add1), (e_paned_add2), (e_paned_pack1),
(e_paned_pack2), (e_paned_add), (e_paned_remove), (e_paned_forall),
(e_paned_get_position), (e_paned_set_position),
(e_paned_set_handle_size), (e_paned_compute_position),
(e_paned_handle_shown), (e_paned_quantized_size):
* cut-n-paste-code/widgets/e-paned/e-paned.h:
* cut-n-paste-code/widgets/e-paned/e-vpaned.c: (e_vpaned_get_type),
(e_vpaned_class_init), (e_vpaned_init), (e_vpaned_new),
(e_vpaned_size_request), (e_vpaned_size_allocate), (e_vpaned_draw),
(e_vpaned_xor_line), (e_vpaned_button_press),
(e_vpaned_button_release), (e_vpaned_motion),
(e_vpaned_handle_shown):
* cut-n-paste-code/widgets/e-paned/e-vpaned.h:
* helper-utilities/authenticate/Makefile.am:
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/README:
* libnautilus/README:
* src/Makefile.am:
* test/Makefile.am:
Added a place to put cut-n-paste code.  Cut-n-pasted the e-paned
widget from evolution.  Yes, and evil thing to do.  Send me mail
with alternative solutions.

Also added README files for libnautilus and
libnautilus-extenstions to clarify thieir public vs internal
state.

* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_real_set_content_view):
Use the new NautilusHorizontalSplitter widget instead of
the gtk one.
2000-06-14 05:20:04 +00:00
Pavel Cisler 858e160f9c Couldn't figure out how to build the leakchecker shared library with
2000-06-13  Pavel Cisler  <pavel@eazel.com>

	* test/Makefile.am:
	Couldn't figure out how to build the leakchecker shared library
	with libtool, added a simple link rule instead.

	* test/nautilus-leak-symbol-lookup.c:
	(nautilus_leak_find_symbol_in_map),
	(nautilus_leak_symbol_map_get_offsets),
	(nautilus_leak_symbol_map_load),
	(nautilus_leak_symbol_map_load_if_needed),
	(nautilus_leak_find_symbol_address),
	(nautilus_leak_print_symbol_address):
	Redo symbol lookup to work better in some cases.

	* test/nautilus-leak-checker.c: (allocate_lots), (leak_mem2),
	(leak_mem), (main):
	tweaks to testing code.
2000-06-14 05:20:04 +00:00
Darin Adler 5a5c97ab0e Preparations to make nautilus_file_get use async. I/O.
There's still a long way to go.

	* components/music/nautilus-music-view.c: (fetch_play_time),
	(format_play_time), (fetch_song_info), (play_status_display),
	(play_current_file), (nautilus_music_view_update_from_uri):
	Changed the music view so it doesn't use NautilusFile any more
	since it already has what it needs from gnome-vfs. There's still
	the issue of sync. vs. async. for this component.

	* libnautilus-extensions/Makefile.am:
	* libnautilus-extensions/nautilus-stock-dialogs.c:
	(nautilus_timed_wait_start), (nautilus_timed_wait_free),
	(nautilus_timed_wait_stop):
	* libnautilus-extensions/nautilus-stock-dialogs.h:
	Started on something called nautilus_timed_wait that we need to
	use when all our lines are busy. Checked it in since I'll be in
	Palo Alto and don't want any non-checked-in changes.

	* libnautilus-extensions/nautilus-background-canvas-group.c:
	Added comments and removed some dead code.

	* src/nautilus-window-menus.c: (uri_known_not_to_exist):
	Rewrote this to use sync. I/O on local files instead of using
	nautilus_file_get.

	* test/.cvsignore: Ignore some of the new files in this directory.
2000-06-14 01:31:10 +00:00
Pavel Cisler 1dc046ab3e New small leakchecking library. It is a bit simpler than MemProf in that
2000-06-13  Pavel Cisler <pavel@eazel.com>

	* test/nautilus-leak-checker-stubs.h:
	* test/nautilus-leak-checker.c:
	(nautilus_leak_allocation_record_init),
	(nautilus_leak_allocation_record_copy),
	(nautilus_leak_allocation_record_finalize),
	(nautilus_leak_allocation_record_free),
	(nautilus_leak_stack_crawl_compare), (nautilus_leak_initialize),
	(get_stack_trace), (detect_reentry), (nautilus_leak_record_malloc),
	(nautilus_leak_record_realloc), (nautilus_leak_record_free),
	(nautilus_leak_initialize_if_needed), (__libc_malloc),
	(__libc_memalign), (__libc_calloc), (__libc_realloc),
	(__libc_free), (malloc), (realloc), (memalign), (calloc), (free),
	(print_one_leak), (nautilus_leak_print_leaks),
	(nautilus_leak_checker_init), (allocate_lots), (leak_mem2),
	(leak_mem), (main):
	* test/nautilus-leak-checker.h:
	* test/nautilus-leak-hash-table.c:
	(nautilus_leak_hash_element_finalize),
	(nautilus_leak_hash_element_hash),
	(nautilus_leak_hash_element_match),
	(nautilus_leak_hash_element_vector_inititalize),
	(nautilus_leak_hash_element_vector_finalize),
	(nautilus_leak_hash_element_vector_at),
	(nautilus_leak_hash_element_vector_add),
	(nautilus_leak_hash_element_vector_remove),
	(nautilus_leak_hash_table_optimal_size),
	(nautilus_leak_hash_table_initialize),
	(nautilus_leak_hash_table_finalize),
	(nautilus_leak_hash_table_new), (nautilus_leak_hash_table_free),
	(nautilus_leak_hash_table_hash), (nautilus_leak_hash_table_find),
	(nautilus_leak_hash_table_add),
	(nautilus_leak_hash_table_remove_element),
	(nautilus_leak_hash_table_remove),
	(nautilus_leak_table_new_entry_at),
	(nautilus_leak_table_add_entry), (nautilus_leak_table_new),
	(nautilus_leak_table_free), (sort_by_count),
	(nautilus_leak_table_sort_by_count), (sort_by_size),
	(nautilus_leak_table_sort_by_size),
	(nautilus_leak_table_each_item):
	* test/nautilus-leak-hash-table.h:
	* test/nautilus-leak-symbol-lookup.c:
	(nautilus_leak_find_symbol_in_map),
	(nautilus_leak_symbol_map_load),
	(nautilus_leak_symbol_map_load_if_needed),
	(nautilus_leak_print_symbol_cleanup),
	(nautilus_leak_find_symbol_address),
	(nautilus_leak_print_symbol_address):
	* test/nautilus-leak-symbol-lookup.h:
	New small leakchecking library. It is a bit simpler than MemProf in that
	it doesn't try to find leaks, just lists all the outstanding allocations
	(which if done at application quit is a list of leaks). It borrows heavily
	from MemProf.

	* test/Makefile.am:
	Currently broken makefile changes for the leakchecker library. Needs some
	libtool wrestling that Ramiro kindly offered to help with.

	* src/nautilus-main.c: (nautilus_leak_checker_init),
	(nautilus_leak_print_leaks), (main):
	Call the leakchecker. Noop unless the leakchecker lib is loaded with
	Nautilus using the LD_PRELOAD variable (the only way of turning the
	thing on/off).
2000-06-14 00:26:58 +00:00
Ramiro Estrugo 2b631110b6 Move the nautilus-widgets classes to libnautilus-extensions.
* Makefile.am:
* components/hardware/Makefile.am:
* components/help/Makefile.am:
* components/history/Makefile.am:
* components/html/Makefile.am:
* components/loser/content/Makefile.am:
* components/loser/sidebar/Makefile.am:
* components/music/Makefile.am:
* components/notes/Makefile.am:
* components/rpmview/Makefile.am:
* components/sample/Makefile.am:
* components/services/startup/nautilus-view/Makefile.am:
* components/services/time/nautilus-view/Makefile.am:
* components/services/trilobite/sample/nautilus-view/Makefile.am:
* components/websearch/Makefile.am:
* configure.in:
* helper-utilities/authenticate/Makefile.am:
* helper-utilities/authenticate/nautilus-authenticate.c:
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-caption-table.c:
* libnautilus-extensions/nautilus-caption.c:
* libnautilus-extensions/nautilus-file-utilities.c:
* libnautilus-extensions/nautilus-global-preferences.c:
* libnautilus-extensions/nautilus-global-preferences.h:
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
* libnautilus-extensions/nautilus-link-set.c:
* libnautilus-extensions/nautilus-link.c:
* libnautilus-extensions/nautilus-password-dialog.c:
* libnautilus-extensions/nautilus-preference.c:
(nautilus_self_check_preference):
* libnautilus-extensions/nautilus-preferences-box.c:
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-group.c:
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-item.c:
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences.c:
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-radio-button-group.c:
* libnautilus-extensions/nautilus-string-picker.c:
* libnautilus-extensions/nautilus-string-picker.h:
* libnautilus-extensions/nautilus-text-caption.c:
* libnautilus-extensions/nautilus-text-caption.h:
* libnautilus-extensions/nautilus-undo-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
* libnautilus-extensions/nautilus-widgets-self-check-functions.c:
* libnautilus-extensions/nautilus-widgets-self-check-functions.h:
* libnautilus-extensions/test-nautilus-preferences.c:
* libnautilus-extensions/test-preferences.c:
* nautilus-widgets/Makefile.am:
* nautilus-widgets/nautilus-caption-table.c:
* nautilus-widgets/nautilus-caption-table.h:
* nautilus-widgets/nautilus-caption.c:
* nautilus-widgets/nautilus-caption.h:
* nautilus-widgets/nautilus-password-dialog.c:
* nautilus-widgets/nautilus-password-dialog.h:
* nautilus-widgets/nautilus-preference.c:
* nautilus-widgets/nautilus-preference.h:
* nautilus-widgets/nautilus-preferences-box.c:
* nautilus-widgets/nautilus-preferences-box.h:
* nautilus-widgets/nautilus-preferences-dialog.c:
* nautilus-widgets/nautilus-preferences-dialog.h:
* nautilus-widgets/nautilus-preferences-group.c:
* nautilus-widgets/nautilus-preferences-group.h:
* nautilus-widgets/nautilus-preferences-item.c:
* nautilus-widgets/nautilus-preferences-item.h:
* nautilus-widgets/nautilus-preferences-pane.c:
* nautilus-widgets/nautilus-preferences-pane.h:
* nautilus-widgets/nautilus-preferences.c:
* nautilus-widgets/nautilus-preferences.h:
* nautilus-widgets/nautilus-radio-button-group.c:
* nautilus-widgets/nautilus-radio-button-group.h:
* nautilus-widgets/nautilus-string-picker.c:
* nautilus-widgets/nautilus-string-picker.h:
* nautilus-widgets/nautilus-text-caption.c:
* nautilus-widgets/nautilus-text-caption.h:
* nautilus-widgets/nautilus-user-level-manager.c:
* nautilus-widgets/nautilus-user-level-manager.h:
* nautilus-widgets/nautilus-widgets-self-check-functions.c:
* nautilus-widgets/nautilus-widgets-self-check-functions.h:
* nautilus-widgets/test-nautilus-preferences.c:
* nautilus-widgets/test-nautilus-widgets.c:
* nautilus-widgets/test-preferences.c:
* src/Makefile.am:
* src/nautilus-main.c: (main):
* src/nautilus-sidebar.c:
* src/nautilus-window-menus.c:
* test/Makefile.am:
Move the nautilus-widgets classes to libnautilus-extensions.
2000-06-10 00:38:05 +00:00
Darin Adler a51a8ee58c Ignore some Makefile and Makefile.in files.
* components/services/install/idl/.cvsignore:
	* components/services/time/idl/.cvsignore:
	Ignore some Makefile and Makefile.in files.

	* data/linksets/Makefile.am:
	* data/linksets/desktop.xml:
	Added a link set for the trash on the desktop.

	* icons/Makefile.am:
	Added a trash icon (actually a copy of the Nautilus icon right
	now :-).

	* libnautilus-extensions/nautilus-link-set.h:
	* libnautilus-extensions/nautilus-link-set.c: (create_new_link),
	(nautilus_link_set_install), (nautilus_link_set_remove):
	Fixed some URI-related issues and added a special case for the ~
	character so we can have link sets that are for the home directory.

	* libnautilus-extensions/nautilus-string.c:
	(nautilus_str_capitalize): Got rid of the unneeded call to strlen.
	strlen == 0 is the slowest way I know to check for an empty string.
	Also check islower before calling toupper for paranoia like the
	calls in glib do (internally).

	* src/nautilus-desktop-window.c: (nautilus_desktop_window_new):
	Install the desktop link set when we are created. For now this
	installs the trash (in a fairly lame way).

	* src/nautilus-property-browser.c: (remove_color),
	(add_color_to_file), (make_properties_from_xml_node),
	(nautilus_property_browser_update_contents):
	Changed code to not reference "childs" directly so it's easy to
	switch to a new version of gnome-xml.

	* test/.cvsignore: Ignore test-nautilus-mime-actions-set.
2000-06-02 17:25:00 +00:00
Maciej Stachowiak 6a4de846aa Final portion of task 370 (mime write API)
* libnautilus-extensions/nautilus-mime-actions.h: *
	libnautilus-extensions/nautilus-mime-actions.c:
	(nautilus_mime_get_short_list_components_for_uri,
	nautilus_mime_set_default_action_type_for_uri,
	nautilus_mime_set_default_application_for_uri,
	nautilus_mime_set_default_component_for_uri,
	nautilus_mime_set_short_list_applications_for_uri,
	nautilus_mime_set_short_list_components_for_uri,
	nautilus_mime_extend_all_applications_for_uri,
	nautilus_mime_remove_from_all_applications_for_uri): Implemented
	(they write the metadata and everything - happy fun).
	(str_list_difference): Helper function compied from gnome-vfs.

	* test/test-nautilus-mime-actions-set.c: Tests for these
	functions.
	* test/Makefile.am: Build it.
2000-06-02 08:42:36 +00:00
Darin Adler 995b13fd67 Added this function. The guts was already there.
* libnautilus-extensions/nautilus-directory-metafile.c:
	(nautilus_directory_set_metadata_list): Added this function.
	The guts was already there.

	* test/.cvsignore: Ignore some newly generated files.
2000-06-01 15:38:19 +00:00
Maciej Stachowiak 93c80d6e5b Task 1057: Terminal-based programs should open into a new terminal window
* libnautilus-extensions/nautilus-program-choosing.h,
	libnautilus-extensions/nautilus-program-choosing.c:
	(nautilus_launch_application): Take a GnomeVFSMimeApplication *
	instead of a command string; add gnome-terminal -x
	(nautilus_launch_application_from_command): Old version that takes
	a command string renamed. Also, uses `system' instead of `execlp',
	so command-line arguments in the command string work.
	* libnautilus-extensions/nautilus-program-chooser.c
	(launch_mime_capplet): Adjusted to conform.
	* src/file-manager/fm-directory-view.c
	(fm_directory_view_launch_application): Likewise.
	* src/nautilus-sidebar.c: (command_button_callback,
	nautilus_sidebar_chose_application_callback, add_command_buttons):
	Likewise.
	* test/test-nautilus-mime-actions.c (print_application): Show the
	requires_terminal field for applications.
2000-06-01 12:11:54 +00:00
Maciej Stachowiak 8b14e59ee7 Non-asynchronous equivalent of `nautilus_directory_call_when_ready'.
* libnautilus-extensions/nautilus-directory.h,
	libnautilus-extensions/nautilus-directory.c:
	(nautilus_directory_wait_until_ready): Non-asynchronous equivalent
	of `nautilus_directory_call_when_ready'. However, it doesn't block
	the UI while waiting.
	(nautilus_directory_wait_until_ready_callback): Helper function
	for implementing the above.

	* libnautilus-extensions/nautilus-mime-actions.c:
	(nautilus_mime_get_default_action_type_for_uri,
	nautilus_mime_get_default_action_for_uri,
	nautilus_mime_get_default_application_for_uri,
	nautilus_mime_get_default_component_for_uri): Implemented with
	fully with proper metadata checking and interface querying, etc.

	(nautilus_mime_get_short_list_applications_for_uri,
	nautilus_mime_get_short_list_components_for_uri,
	nautilus_mime_get_all_applications_for_uri,
	nautilus_mime_get_all_components_for_uri): Adjusted to deal with
	the mime type checking function changing names.

	(OAF_ServerInfo__copy, extract_prefix_add_suffix,
	mime_type_get_supertype, uri_string_get_scheme),
	get_explicit_content_view_iids_from_metafile,
	make_oaf_query_for_explicit_content_view_iids,
	make_oaf_query_with_known_mime_type,
	make_oaf_query_with_uri_scheme_only,
	file_list_to_mime_type_hash_table, free_key,
	mime_type_hash_table_destroy, server_matches_content_requirements,
	nautilus_do_component_query): Oodles of helper functions, many cut
	& pasted from elswhere and only slightly modified.
	get_mime_type_from_uri: Removed `_hack' from the name.

	* libnautilus-extensions/nautilus-mime-actions.h: Added prototype
	for nautilus_mime_get_default_action_type_for_uri.

	* test/test-nautilus-mime-actions.c (main): Call gnome_init.

	* src/nautilus-applicable-views.c: Removed a stray comment that no
	longer applies.
2000-06-01 12:11:54 +00:00
Maciej Stachowiak d1eef70941 Simple test program to check _for_uri nautilus metadata calls in nautilus.
* test/test-nautilus-mime-actions.c: Simple test program to check
	_for_uri nautilus metadata calls in nautilus.
	* test/Makefile.am: Build test-nautilus-mime-actions
	* Makefile.am, configure.in: add test directory to the build.

	* libnautilus-extensions/nautilus-mime-actions.c
	(nautilus_mime_get_default_action_for_uri,
	nautilus_mime_get_default_application_for_uri,
	nautilus_mime_get_default_component_for_uri): Implemented in the
	same temporary stub way as the other calls.
2000-06-01 06:00:19 +00:00