Commit graph

220 commits

Author SHA1 Message Date
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