Commit graph

55 commits

Author SHA1 Message Date
Richard Hestilow
ee51ddb4a8 Fix call to gnome_capplet_init.
2001-07-16  Richard Hestilow  <hestilow@ximian.com>

	* capplets/file-types/file-types-capplet.c: Fix call to
	gnome_capplet_init.

	* capplets/mime-type/mime-type-capplet.c: Ditto.

	* capplets/ui-properties/main.c: Ditto.

	* capplets/theme-switcher: Rename binary, .desktop, etc to
	"gtk-theme-selector". Change description/name in .desktop too.
2001-07-16 20:51:29 +00:00
Richard Hestilow
24c947b83c Remove a bunch of stuff from the old control-center.
2001-07-12  Richard Hestilow  <hestilow@ximian.com>

	* Makefile.am: Remove a bunch of stuff from the old control-center.

	* configure.in: Ditto.

	* capplets/Makefile.am: Ditto.

	* po/POTFILES.in: Ditto

	* autogen.sh: Look for the right directory structure.

	* capplets/file-types/Makefile.am: Compile the file-types-* files,
	not nautilus-mime-type-* files (they were renamed.)

	* capplets/file-types/*.c: Include the renamed headers.

	* capplets/file-types/libuuid/Makefile.am: Change $(GLIB_CFLAGS)
	to @GLIB_CFLAGS@ for pkg-config purposes.
2001-07-12 17:01:14 +00:00
Darin Adler
e7d9f82a0f Merge all changes from gnome-vfs-1 branch to HEAD. 2001-03-06 23:33:19 +00:00
Gene Z. Ragan
62298b5b05 Fixed bug 6258, Determine initial capplet sort column
2001-02-06  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug 6258, Determine initial capplet sort column

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(init_mime_capplet):
	Sort based on first column in list.
2001-02-06 21:24:42 +00:00
Gene Z. Ragan
eb8a4e72d5 Work done to improve the mime tpye capplet. Enable the capplet to be
2001-02-05  Gene Z. Ragan  <gzr@eazel.com>

	Work done to improve the mime tpye capplet.
	Enable the capplet to be launched with a mime type.
	If a mime type is an argument, have the capplet scroll
	to that item in the list before the user begins interaction.

	* mime-type-capplet/nautilus-mime-type-capplet.c: (main),
	(list_move_vertical), (list_moveto), (list_reveal_row),
	(init_mime_capplet), (populate_mime_list):
2001-02-06 02:33:39 +00:00
Gene Z. Ragan
7a6ec96d46 Fixed bug 5847, MIME type capplet alphabetical oder case sensitive
2001-01-29  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug 5847, MIME type capplet alphabetical oder case sensitive

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(sort_case_insensitive), (column_clicked),
	(create_mime_list_and_scroller):
	Create a sort routine that is not case sensitive.
2001-01-29 22:04:10 +00:00
Gene Z. Ragan
d9678e6f23 Fixed bug 3229, Clean up appearance of File Types and Programs capplet
2001-01-12  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug 3229, Clean up appearance of File Types and Programs capplet

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(init_mime_capplet):
	Adjust positions of widgets for better look and feel.
2001-01-13 05:07:31 +00:00
Gene Z. Ragan
1dcdad40b6 Fixed bug 3041, "Action" column text is confusing
2001-01-08  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug 3041, "Action" column text is confusing

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(add_mime_clicked), (update_mime_list_action),
	(populate_mime_list), (create_mime_list_and_scroller):
	Made changes according to input from John and Arlo.
	Changed "Action" column to "Default Action."
	Changed action text when a viewer is specified to
	"View as" preprended to the action type.
2001-01-09 01:51:19 +00:00
Gene Z. Ragan
c8571e76aa reviewed by: Pavel Cisler <pavel@eazel.com>
2000-12-08  Gene Z. Ragan  <gzr@eazel.com>

	reviewed by: Pavel Cisler <pavel@eazel.com>

	Fixed bug 4660, Descrption lost when adding mime types

	Bug was caused by a failure to write out a mime type
	with caps in the string. I now convert all caps to lower
	case and inform the user what has happened.

	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.c:
	(find_message_label_callback), (find_message_label),
	(show_message_box), (display_upper_case_dialog):
	New routines to display a nice dialog taken from Nautilus.

	(nautilus_mime_type_capplet_show_new_mime_window):
	Convert mime string to lower case if caps are present.
2000-12-08 23:36:43 +00:00
Mathieu Lacage
679d564b53 reviewed by: <mjs@eazel.com>
2000-11-20  Mathieu Lacage  <mathieu@eazel.com>

	reviewed by: <mjs@eazel.com>

	Fix bug 4812. Also, make the capplet work by fixing
	random bugs here and there. It was the first time I could test
	it for true so, of course, got a bunch of small-border-effect bugs.
	* libgnomevfs/gnome-vfs-mime-info.c:
	(hack_getc): the most evil function I ever wrote.
	It recursively gets rid of the comment lines before
	the parsers ever get them. (iunstead of fixing thew parsers....)
	(load_mime_type_info_from): make it use nerw hack_gets function
	instead of getc_unlocked.
	(load_mime_list_info_from): idem.
	(gnome_vfs_mime_get_extensions_list): avoid returning the extensions
	of the system settings if the user has set the user extensions.
	(get_key_name): make it remove duplicates for true.
	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.c:
	(nautilus_mime_type_capplet_show_new_mime_window): fix bug 4812
	by replacing "char *text[3]" by "char *text[4]".
	(nautilus_mime_type_capplet_show_change_extension_window):
	spaces.
	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(update_extensions_list): fix border-effect bugs. (ie: when you
	have no extension for a mime type for example...)
	(add_mime_clicked): idem.
2000-11-20 19:43:30 +00:00
Mathieu Lacage
7652cffef1 Fix bug 4811 add new function. Ultimately, I wished we could get rid of
2000-11-19  Mathieu Lacage  <mathieu@eazel.com>

	Fix bug 4811
	* libgnomevfs/gnome-vfs-mime-info.c:
	(gnome_vfs_mime_set_extensions_list): add new function.
	Ultimately, I wished we could get rid of the direct access
	to the internal hastables but this is at least a first step.
	* libgnomevfs/gnome-vfs-mime-info.h: add prototype.

	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.c:
	(add_extension_clicked): implement
	(remove_extension_clicked): implement
	(extension_list_selected): grey/ungrey delete button when selecting/unselecting
	(extension_list_deselected): idem
	(get_extensions_from_gtk_list): helper function.
	(nautilus_mime_type_capplet_show_change_extension_window): implement.
	(nautilus_mime_type_capplet_show_new_extension_window): fix a number of segfaults.
	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.h: change prototypes.
	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(get_selected_row_number),helper function.
	(get_selected_mime_type), helper function (refactoring :)
	(really_change_icon): fix segfault.
	(update_extensions_list): update extensions when you change them.
	(change_file_extensions_clicked): create dialog.
	(init_mime_capplet): spaces.
	(nautilus_mime_type_capplet_update_info): make it use get_selected_mime_type.
2000-11-20 02:31:25 +00:00
Mathieu Lacage
404ba40351 reviewed by: Sullivan
2000-11-17  Mathieu Lacage  <mathieu@eazel.com>

	reviewed by: Sullivan

	fix Bug 4768. Reported 3 bugs about separate issues: 4796, 4797, 4798.
	* data/mime/gnome-vfs.keys: change icon filenames to relative paths.
	* libgnomevfs/Makefile.am: add GNOME_VFS_PREFIX
	* libgnomevfs/gnome-vfs-mime-info.c: (gnome_vfs_mime_info_reload):
	add initialition code if the mime stuff is not initalized when doing
	a reload. This avoids a segfault.
	* libgnomevfs/gnome-vfs-utils.c: (hack_file_exists): new function
	copied from gnome-libs: prviously named g_file_exists.
	(gnome_vfs_icon_path_from_filename): new API function. It looks
	in GNOME_PATH to find the icons and defaults to the gnome-vfs prefix
	one. It accepts only relative paths and returns an absolute path.
	* libgnomevfs/gnome-vfs-utils.h: add prototype.
	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(really_change_icon), changes the icon used by a mime type.
	(gil_icon_selected_cb): changes the icon when you double-click.
	(change_icon_clicked_cb_real): changes the icon when you click on ok.
	(change_icon_clicked): connect to the clicked and select_icon signals
	to know when the user has made up his mind about hte new icon.
	(nautilus_mime_type_capplet_update_info), spaces.
	(add_mime_clicked): spaces.
	(nautilus_mime_type_capplet_update_mime_list_icon): spaces.
	(capplet_get_icon_pixbuf): spaces.
	(populate_mime_list): spaces.
	* mime-type-capplet/nautilus-mime-type-icon-entry.c:
	(icon_selected_cb): spaces.
	(nautilus_mime_type_show_icon_selection): spaces.
	(nautilus_mime_type_icon_entry_get_relative_filename): new function.
	returns a relative filename instead of an abosulte one.
	* mime-type-capplet/nautilus-mime-type-icon-entry.h: add relative
	function prototype
2000-11-17 23:15:20 +00:00
Mathieu Lacage
7b46e81978 fix bug 4769 tweak to look slightly better. fix a potential segfault too.
2000-11-16  Mathieu Lacage  <mathieu@eazel.com>

	fix bug 4769
	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.c:
	(nautilus_mime_type_capplet_show_new_mime_window): tweak to
	look slightly better. fix a potential segfault too.
	* mime-type-capplet/nautilus-mime-type-capplet.c: (revert_real_cb),
	(revert_mime_clicked), (add_mime_clicked): add dialog hook.
2000-11-17 00:41:44 +00:00
Mathieu Lacage
796feca1e3 Fix bugs 2767 and 3228 add debugging functions. They are disabled by
2000-11-16  Mathieu Lacage  <mathieu@eazel.com>

	Fix bugs 2767 and 3228
	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(nautilus_stop_in_debugger),
	(nautilus_stop_after_default_log_handler),
	(nautilus_set_stop_after_default_log_handler),
	(nautilus_make_warnings_and_criticals_stop_in_debugger),
	add debugging functions. They are disabled by default.
	(main), add call to debuggin funcitons if they are enabled.
	(change_icon_clicked), implement.
	(init_mime_capplet), tweaks, cleanups
	(nautilus_mime_type_capplet_update_info), update icon.
	(revert_mime_clicked), implement correctly.
	(delete_mime_clicked), implement correctly.
	(add_mime_clicked), cleanups
	(capplet_get_icon_pixbuf), new function to get the pixbuf for
	a given mime type
	(populate_mime_list): use the new function above, refactor.
	(update_mime_list_action): idem.
2000-11-16 08:33:02 +00:00
Mathieu Lacage
c2c99951cf make it look like what Arlo wanted. (revert_mime_clicked): new callback to
2000-11-15  Mathieu Lacage  <mathieu@eazel.com>

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(init_mime_capplet), make it look like what Arlo wanted.
	(revert_mime_clicked): new callback to reset user settings.
2000-11-16 04:53:55 +00:00
Gene Z. Ragan
6b5e1f48ff Some more capplet work. The mime list now updates to reflect changes made
2000-11-13  Gene Z. Ragan  <gzr@eazel.com>

	Some more capplet work.  The mime list now updates
	to reflect changes made to the default action button
	and menu item list.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(application_button_toggled), (viewer_button_toggled),
	(application_menu_activated), (component_menu_activated),
	(add_mime_clicked),
	(nautilus_mime_type_capplet_update_mime_list_icon),
	(update_mime_list_action), (populate_mime_list):

	* mime-type-capplet/nautilus-mime-type-icon-entry.c:
	(entry_changed):
	Fixed a case where a NULL widget would cause an assertion.
2000-11-13 23:33:57 +00:00
Gene Z. Ragan
9dbfae956e Fixed bug 3107, Setting na icon for a mime type does not work.
2000-11-13  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug 3107, Setting na icon for a mime type does not work.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	* mime-type-capplet/nautilus-mime-type-capplet.h:
	(nautilus_mime_type_capplet_update_mime_list_icon):
	New function that sets/updates the icon in the mime list.

	* mime-type-capplet/nautilus-mime-type-icon-entry.c:
	(icon_selected_cb), (nautilus_mime_type_show_icon_selection):
	Add call to new nautilus_mime_type_capplet_update_mime_list_icon
	function.
2000-11-13 19:16:38 +00:00
Kjartan Maraas
e58cefd2cd Added norwegian translation. Marked all strings for translation.
2000-11-11  Kjartan Maraas  <kmaraas@gnome.org>

	* mime-type-capplet/nautilus-mime-type.desktop: Added norwegian translation.
	* mime-type-capplet/nautilus-mime-type-capplet.c: Marked all strings for translation.
2000-11-12 17:00:14 +00:00
Gene Ragan
5581fc2897 So2000-11-02 Gene Z. Ragan <gzr@eazel.com>
Fixed bug 4319, Edit and Delete actions in Application
	List do not function

	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.c:
	(populate_default_applications_list),
	(initialize_edit_applications_dialog),
	(nautilus_mime_type_capplet_show_new_mime_window),
	(add_or_update_application), (add_item_to_application_list),
	(show_new_application_window), (show_edit_application_window),
	(delete_selected_application):
	Bunches of code to handle adding, editing and deletion of
	application/mime type mapping.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(nautilus_mime_type_capplet_get_selected_item_mime_type):
2000-11-02 08:37:45 +00:00
Gene Z. Ragan
31a39d9838 Fixed bug 3042, Adding new mime type doesn't work.
2000-10-16  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug 3042, Adding new mime type doesn't work.

	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.c:
	(nautilus_mime_type_capplet_show_new_mime_window):

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(add_mime_clicked):
	Write proper description key.

	* libgnomevfs/gnome-vfs-mime-handlers.c:
	(gnome_vfs_mime_add_extension):
	Work in progress on adding user defined extensions
2000-10-16 22:50:48 +00:00
Gene Z. Ragan
6ff265240c Fixed bug 3040, Action column has wrong contents
2000-10-16  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug 3040, Action column has wrong contents

	Corrected an instance where text was not getting freed
	and reset.  Also fixed a few leaks in the list
	population code.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(populate_application_menu), (populate_viewer_menu),
	(add_mime_clicked), (populate_mime_list):
2000-10-16 21:27:40 +00:00
John Sullivan
67266a3b03 Removed an outdated FIXME.
* mime-type-capplet/nautilus-mime-type-capplet.c:
	(mime_list_selected_row_callback): Removed an outdated FIXME.
2000-09-21 16:52:06 +00:00
Gene Z. Ragan
a036012fe5 Fixed bug 3042, Adding new mime type doesn't work
2000-09-16  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug 3042, Adding new mime type doesn't work

	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.c:
	(nautilus_mime_type_capplet_show_new_mime_window):
	Return the new mime type if one was created

	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.h:
	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(nautilus_mime_type_capplet_update_info), (add_mime_clicked):
	Add info to main list.
2000-09-17 03:15:40 +00:00
Gene Z. Ragan
9cbbe4c4b2 Fixed a couple of leaks and instances where gdk_pixbuf_new_from_file was
2000-09-08  Gene Z. Ragan  <gzr@eazel.com>

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(populate_mime_list):
	Fixed a couple of leaks and instances where
	gdk_pixbuf_new_from_file was being passed a NULL char *.
2000-09-09 00:23:39 +00:00
Gene Z. Ragan
9f9f159ffa Fixed bug 2839, setting icons for mime type is not remembered
2000-09-08  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug 2839, setting icons for mime type is not remembered

	* mime-type-capplet/nautilus-mime-type-capplet.c: (main),
	(init_mime_capplet), (nautilus_mime_type_capplet_update_info),
	(populate_mime_list),
	(nautilus_mime_type_capplet_get_selected_item_mime_type):
	Removed icon setting code callback from Change Icon button.

	* mime-type-capplet/nautilus-mime-type-icon-entry.c:
	(icon_selected_cb), (cancel_pressed), (gil_icon_selected_cb),
	(nautilus_mime_type_show_icon_selection):
	Added gnome-vfs icon setting code to OK button callback.
2000-09-08 23:58:53 +00:00
Gene Z. Ragan
327911dcb5 Fixed bug 2766, viewer menu code is not finished.
2000-09-08  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug 2766, viewer menu code is not finished.

	Enjoy your Content Loser.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(populate_viewer_menu):
	Made function work.
2000-09-08 17:49:14 +00:00
Mathieu Lacage
73fdb18e63 initialize found_match to TRUE to avoid a segfault in certain non-obvious
2000-09-05  Mathieu Lacage  <mathieu@eazel.com>

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(populate_viewer_menu): initialize found_match to TRUE
	to avoid a segfault in certain non-obvious cases. this
	is a temporary hack waiting for bug 2766.
2000-09-06 00:36:34 +00:00
Mathieu Lacage
d98dda20ae Add bugs to bugzilla.eazel.com for FIXMEs...
2000-09-04  Mathieu Lacage  <mathieu@eazel.com>

	Add bugs to bugzilla.eazel.com for FIXMEs...
	* libgnomevfs/gnome-vfs-mime-handlers.c:
	(gnome_vfs_mime_get_default_action_type),
	(gnome_vfs_mime_get_default_application),
	(get_executable_name_from_command_string):
	* libgnomevfs/gnome-vfs-mime-info.c: (gnome_vfs_mime_get_value),
	(gnome_vfs_get_registered_mime_types):
	* libgnomevfs/gnome-vfs-mime-magic.c:
	* libgnomevfs/gnome-vfs-uri.c:
	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(mime_list_selected_row_callback), (init_mime_capplet),
	(populate_viewer_menu), (delete_mime_clicked), (pixmap_file):
2000-09-05 03:13:37 +00:00
Pavel Cisler
8a3c6d2603 Add a flag to the xfer progress indicating a top-level item to allow
2000-09-03  Pavel Cisler  <pavel@eazel.com>

	* libgnomevfs/gnome-vfs-types.h:
	* libgnomevfs/gnome-vfs-xfer.c: (init_progress), (copy_directory),
	(copy_items), (move_items), (link_items):
	Add a flag to the xfer progress indicating a top-level item to
	allow triggering metadata copies.

	* libgnomevfs-pthread/gnome-vfs-job.c:
	(execute_create_symbolic_link):
	* libgnomevfs/gnome-vfs-mime-info.c: (gnome_vfs_mime_set_value):
	* libgnomevfs/gnome-vfs-uri.c: (gnome_vfs_uri_new):
	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(populate_viewer_menu):
	* modules/translate-method.c: (tr_uri_translate):
	* test/test-uri.c: (test_uri_host_port):
	Fix a bunch of uninitialized variables that Michael Meeks found.
2000-09-03 08:37:00 +00:00
Mathieu Lacage
b833d52def remove debugging output. fix many run-time warnings. Now, can go into
2000-09-01  Mathieu Lacage  <mathieu@eazel.com>

	* mime-type-capplet/nautilus-mime-type-capplet.c: (main),
	(init_mime_capplet), (populate_mime_list),
	(create_mime_list_and_scroller):
        remove debugging output. fix many run-time warnings.
        Now, can go into fixing real bugs.
2000-09-02 01:32:18 +00:00
Mathieu Lacage
e26b69eadb remove test on OAF compile.
2000-09-01  Mathieu Lacage  <mathieu@eazel.com>

	* libgnomevfs/gnome-vfs-init.c: (gnome_vfs_init):
        * libgnomevfs/gnome-vfs-mime-handlers.c:
	(gnome_vfs_mime_get_default_action_without_fallback),
	(gnome_vfs_mime_get_default_component), (join_str_list),
        (gnome_vfs_mime_get_short_list_components),
        (gnome_vfs_mime_get_all_components),
	(gnome_vfs_mime_id_in_component_list),
        (gnome_vfs_mime_id_list_from_component_list),
        (gnome_vfs_mime_remove_component_from_list),
        (gnome_vfs_mime_action_free), (gnome_vfs_mime_component_list_free),
        (OAF_ServerInfoList_to_ServerInfo_g_list):
	* libgnomevfs/gnome-vfs-mime-handlers.h:
        * test/test-mime-handlers-set.c: (main):
	* test/test-mime-handlers.c: (print_component), (print_action),
	(print_component_list), (main):
	remove	test on OAF compile.


	* libgnomevfs/gnome-vfs-mime-handlers.c:
	(gnome_vfs_mime_get_default_application): fix bug: we were passing
        a NULL to some subroutine.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
        (init_mime_capplet), (nautilus_mime_type_capplet_update_info),
        (populate_mime_list), (create_mime_list_and_scroller):
        fix misc warning at runtime. add debugging output. will remove soon.

        * test/.cvsignore: chuuut.
2000-09-01 23:50:43 +00:00
Mathieu Lacage
00a08a542a fixes bugs 1119 and 1839
2000-08-31  Mathieu Lacage  <mathieu@eazel.com>

	fixes bugs 1119 and 1839

	* data/mime/gnome-vfs.keys: add a mime type for testing.
	* libgnomevfs/gnome-vfs-mime-handlers.c:
	(gnome_vfs_mime_get_default_action_type),
	(gnome_vfs_mime_edit_user_file_full),
	(gnome_vfs_mime_add_extension), (gnome_vfs_mime_remove_extension):
	update to API changes below. move saving code to gnome-vfs-mime-info.c
	* libgnomevfs/gnome-vfs-mime-info.c: (does_string_contains_caps),
	(context_new), (context_destroy_and_unlink), (language_level),
	(context_add_key), (load_mime_type_info_from),
	(load_mime_list_info_from), (mime_info_load), (mime_list_load),
	(load_mime_type_info), (gnome_vfs_mime_init),
	(gnome_vfs_mime_info_clear), (gnome_vfs_mime_info_shutdown),
	(gnome_vfs_mime_freeze), (gnome_vfs_mime_thaw),
	(gnome_vfs_mime_set_value), (gnome_vfs_mime_get_value),
	(gnome_vfs_mime_keys_list_free), (gnome_vfs_mime_get_key_list),
	(gnome_vfs_mime_get_program), (gnome_vfs_mime_get_program_name),
	(gnome_vfs_mime_get_description), (str_cmp_callback),
	(gnome_vfs_mime_get_extensions_list),
	(gnome_vfs_mime_get_extensions_string),
	(gnome_vfs_mime_get_extensions_pretty_string),
	(gnome_vfs_mime_extensions_list_free), (gnome_vfs_mime_get_test),
	(gnome_vfs_mime_get_composetyped),
	(gnome_vfs_mime_get_copiousoutput),
	(gnome_vfs_mime_get_needsterminal), (get_key_name),
	(gnome_vfs_get_registered_mime_types),
	(gnome_vfs_mime_registered_mime_type_list_free),
	(gnome_vfs_mime_set_registered_type_key),
	(write_back_mime_user_file_context_callback),
	(write_back_mime_user_file_callback), (write_back_mime_user_file),
	(write_back_keys_user_file_context_callback),
	(write_back_keys_user_file_callback), (write_back_keys_user_file):
	Basically, make it work. update copyright.
	* libgnomevfs/gnome-vfs-mime-info.h: change some API.
	* mime-type-capplet/nautilus-mime-type-capplet.c: update to new API.
	(nautilus_mime_type_capplet_update_info), (populate_mime_list):
	* test/Makefile.am: add tests.
	* test/test-mime-info.c: (main): actual tests.
2000-08-31 07:04:59 +00:00
Maciej Stachowiak
fe894c6f20 Move include of sys/types.h above include of regex.h to fix building on
* mime-type-capplet/nautilus-mime-type-capplet.c: Move include of
	sys/types.h above include of regex.h to fix building on
	FreeBSD. Fix from Bill Huey <billh@gnuppy.monkey.org>.
2000-08-09 06:19:30 +00:00
Gene Z. Ragan
f515abc9a8 Fixed bug 1837, The icon in the action list item should represent the item
2000-08-02  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug 1837, The icon in the action list item
	should represent the item in the list.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(populate_mime_list):
	Load icon and display based on action.
2000-08-02 22:10:17 +00:00
Gene Z. Ragan
82353c4765 Fixed bug 1836, Description list item icon wrong.
2000-08-02  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug 1836, Description list item icon wrong.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(populate_mime_list), (gdk_font_get_bold),
	Set up proper and scaled description column icon.

	(capplet_gdk_pixbuf_scale_to_fit):
	New function that scales an gdk-pixbuf to the requested
	width and height.  Copied from libnautilus.
2000-08-02 09:18:18 +00:00
Gene Z. Ragan
4dcb4689ce New function to set the font of a widget to bold. These were borrowed from
2000-07-28  Gene Z. Ragan  <gzr@eazel.com>

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(init_mime_capplet), (pixmap_file), (gtk_widget_make_bold),
	(gtk_widget_set_font), (gtk_style_set_font), (gdk_font_get_bold):
	New function to set the font of a widget to bold.  These were
	borrowed from libnautilus-extensions.
2000-07-28 23:07:34 +00:00
Gene Z. Ragan
6ebefae27f New API to get and set icon data.
2000-07-14  Gene Z. Ragan  <gzr@eazel.com>

	* libgnomevfs/gnome-vfs-mime-handlers.c:
	* libgnomevfs/gnome-vfs-mime-handlers.h:
	(gnome_vfs_mime_get_icon), (gnome_vfs_mime_set_icon):
	New API to get and set icon data.

	* mime-type-capplet/Makefile.am:
	Added new file
	mime-type-capplet/nautilus-mime-type-icon-entry.c

	* mime-type-capplet/nautilus-mime-type-icon-entry.c:
	* mime-type-capplet/nautilus-mime-type-icon-entry.h:
	(nautilus_mime_type_icon_entry_get_type),
	(nautilus_mime_type_icon_entry_class_init), (entry_changed),
	(entry_activated), (setup_preview), (ientry_destroy),
	(browse_clicked), (icon_selected_cb), (cancel_pressed),
	(gil_icon_selected_cb), (nautilus_mime_type_show_icon_selection),
	(drag_data_received), (drag_data_get),
	(nautilus_mime_type_icon_entry_init),
	(nautilus_mime_type_icon_entry_new),
	(nautilus_mime_type_icon_entry_gnome_file_entry),
	(nautilus_mime_type_icon_entry_gnome_entry),
	(nautilus_mime_type_icon_entry_gtk_entry),
	(nautilus_mime_type_icon_entry_set_pixmap_subdir),
	(nautilus_mime_type_icon_entry_set_icon),
	(nautilus_mime_type_icon_entry_get_filename):
	New file.  This is a new verison of GnomeIconEntry.
	I am customizing it to look and bahve in a way that
	is compatible with Arlo's UI reccomendations.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(mime_list_selected_row_callback), (icon_changed),
	(change_icon_clicked), (init_mime_capplet),
	(nautilus_mime_type_capplet_update_info), (populate_mime_list):
	More UI cleanups.  Removed GnomeIconEntry and replaced
	with new NautilusMimeTypeIconEntry.
2000-07-15 01:56:53 +00:00
Gene Z. Ragan
b4ed38e4a0 Changed code to used renamed gnome_vfs_mime_extensions_list_free
2000-07-07  Gene Z. Ragan  <gzr@eazel.com>

	* libgnomevfs/gnome-vfs-mime-handlers.c:
	(gnome_vfs_mime_add_extension), (gnome_vfs_mime_remove_extension):
	Changed code to used renamed gnome_vfs_mime_extensions_list_free

	* libgnomevfs/gnome-vfs-mime-info.c:
	* libgnomevfs/gnome-vfs-mime-info.h:
	(gnome_vfs_mime_get_extensions_pretty_string):
	Return a list with period prepended, comma seperated items.

	(gnome_vfs_mime_extensions_list_free):
	Changed name form gnome_vfs_mime_extension_list_free

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(populate_extension_list), (init_mime_capplet),
	(nautilus_mime_type_capplet_update_info), (populate_mime_list),
	(create_mime_list_and_scroller):
	More exciting UI layout work and feature completion.
2000-07-08 00:57:36 +00:00
Gene Z. Ragan
663e79f17d Added sorting functionality to the column buttons. Enabled columns to
2000-07-06  Gene Z. Ragan  <gzr@eazel.com>

	* mime-type-capplet/nautilus-mime-type-capplet.c: (column_clicked),
	(create_mime_list_and_scroller):
	Added sorting functionality to the column buttons.  Enabled
	columns to respond to a click.  Clicking a column header
	toggles between ascending and descending sort for that column.
2000-07-07 04:30:42 +00:00
Gene Z. Ragan
32577cacec More capplet work in progress. Modifying applet and code to support UI
2000-07-04  Gene Z. Ragan  <gzr@eazel.com>
	More capplet work in progress.  Modifying applet and code
	to support UI work done by Arlo.

	* libgnomevfs/gnome-vfs-mime-handlers.c:
	(gnome_vfs_mime_add_extension), (gnome_vfs_mime_remove_extension):
	API changes to support new layout.

	* libgnomevfs/gnome-vfs-mime-info.c:
	* libgnomevfs/gnome-vfs-mime-info.h:
	(gnome_vfs_mime_get_extensions_list),
	(gnome_vfs_mime_get_extensions_string):
	API changes to support new layout.

	* mime-type-capplet/Makefile.am:
	Added dependency to GdkPixbuf.

	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.c:
	(show_edit_components_dialog), (add_new_application),
	(show_new_application_window), (show_edit_application_window):
	API changes to support new layout.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	* mime-type-capplet/nautilus-mime-type-capplet.h:
	(populate_extension_list), (extension_list_deselected),
	(application_button_toggled), (viewer_button_toggled),
	(icon_changed), (init_mime_capplet),
	(nautilus_mime_type_capplet_update_info),
	(populate_application_menu), (populate_viewer_menu),
	(edit_default_clicked),
	(nautilus_mime_type_capplet_update_application_info),
	(nautilus_mime_type_capplet_update_viewer_info),
	(insert_mime_vals_into_clist), (create_mime_list_and_scroller),
	(nautilus_mime_type_capplet_get_selected_item_mime_type),
	(make_path), (pixmap_file):
	API changes to support new layout.
2000-07-05 04:35:04 +00:00
Gene Z. Ragan
459de31d65 Fixed bug #1434, Fix alignment of widgets in main capplet view.
2000-06-21  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug #1434, Fix alignment of widgets in main capplet view.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(init_mime_capplet):
	Replaced use of multiple pack boxes with a table.  Things
	look much better now.
2000-06-22 01:48:29 +00:00
Gene Z. Ragan
24f9a12f1b Fixed bug #583
2000-06-21  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug #583

	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.c:
	(initialize_edit_applications_dialog),
	(show_new_application_window), (show_edit_application_window):
	New dialog and items to indicate and allow user to
	set application behavior concerning multiple launch and
	URI handling.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(init_mime_capplet):
	Removed old UI code and migrated to dialog.
2000-06-21 18:39:48 +00:00
Gene Z. Ragan
6d98ed445a More work on adding applications and extension.
2000-06-21  Gene Z. Ragan  <gzr@eazel.com>

	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.c:
	(initialize_edit_applications_dialog),
	(nautilus_mime_type_capplet_show_new_extension_window),
	(add_new_application), (show_new_application_window):
	More work on adding applications and extension.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(nautilus_mime_type_capplet_add_extension),
	(remove_extension_clicked), (none_button_toggled),
	(application_button_toggled), (component_button_toggled),
	(init_mime_capplet),
	(nautilus_mime_type_capplet_get_selected_item_mime_type):
	Changed use of GtkFixed to use layout.  Layout is now messy
	again, but I should be able to get it looking right.
2000-06-21 07:32:44 +00:00
Gene Z. Ragan
130114db19 Added frame and set of radio buttons to indicate and allow the user to
2000-06-20  Gene Z. Ragan  <gzr@eazel.com>

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(mime_list_selected_row_callback), (none_button_toggled),
	(application_button_toggled), (component_button_toggled),
	(init_mime_capplet), (nautilus_mime_type_capplet_update_info):
	Added frame and set of radio buttons to indicate and allow the
	user to change the default action that will occur when a file
	is clicked/double-clicked in Nautilus.  We have three choices that
	map to the three types of actions we currently support.
2000-06-20 22:37:08 +00:00
Gene Z. Ragan
9fc8036863 Fixed bug #1221
2000-06-20  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug #1221

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(application_menu_activated), (populate_application_menu),
	(component_menu_activated), (populate_component_menu):
	Add handling of the case where a default application or
	component is not in the default applicaiton or component list.
	This involved some UI work and adding the default app to
	the default list.  Hopefully the gnome-vfs-mime-handler API
	will not allow this to happen, but we handle it just in case.

	Cleaned up the way the menu items for the default application
	and component are set and added a signal handler to set
	the user's choice of application or component to be the default.
2000-06-20 21:33:14 +00:00
Gene Z. Ragan
a13cbb8223 Fixed bug #1055
2000-06-20  Gene Z. Ragan  <gzr@eazel.com>

	Fixed bug #1055

	* libgnomevfs/gnome-vfs-mime-handlers.c:
	* libgnomevfs/gnome-vfs-mime-handlers.h:
	(gnome_vfs_mime_add_extension):
	Renamed function to be more in accordance with other function
	in file.

	(gnome_vfs_mime_remove_extension):
	New function to remove mapped extension from mime type.

	* libgnomevfs/gnome-vfs-mime-info.c: (load_mime_list_info_from),
	(gnome_vfs_mime_get_extensions), (mime_list_sort), (get_key_name),
	(gnome_vfs_mime_commit_registered_types),
	(write_mime_data_foreach), (write_registered_mime_data):
	A couple of things done here.  One was work on the tokenizer
	so that it handled a variety of cases when reading in
	key data form .mime files.  Another was work on saving and
	deleting mapped extensions from the .mime file.

	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.c:
	(nautilus_mime_type_capplet_show_new_extension_window):
	Work on saving and deleting mapped extensions from the .mime file.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(populate_extension_list),
	(nautilus_mime_type_capplet_add_extension),
	(remove_extension_clicked):
	Work on saving and deleting mapped extensions from the .mime file.
2000-06-20 18:55:19 +00:00
Gene Z. Ragan
276185af53 Removed obsolete files.
2000-06-19  Gene Z. Ragan  <gzr@eazel.com>

	* mime-type-capplet/mime-data.c:
	* mime-type-capplet/mime-data.h:
	Removed obsolete files.

	* mime-type-capplet/Makefile.am:
	Removed above files from Makefile.

	* libgnomevfs/gnome-vfs-mime-handlers.c:
	* libgnomevfs/gnome-vfs-mime-handlers.h:
	(gnome_vfs_mime_add_extension_to_mime_type):
	New function.  Add extension mapping to named mime type
	and save to .mime file.

	* libgnomevfs/gnome-vfs-mime-info.c:
	* libgnomevfs/gnome-vfs-mime-info.h:
	(load_mime_list_info_from),
	(load_mime_type_info), (gnome_vfs_mime_get_extensions),

	(gnome_vfs_mime_extension_list_free):
	New function to deep free the list returned
	by gnome_vfs_mime_get_extensions()

	(gnome_vfs_mime_registered_mime_type_list_free),
	New function to deep free the list returned
	by gnome_vfs_mime_get_extensions()

	(gnome_vfs_mime_commit_registered_types):
	Public function to commit internal hash table
	of mime data to disk.

	(gnome_vfs_mime_set_registered_type_key):
	This functions sets the key data for the registered mime
 	type's hash table.

	(write_mime_data_foreach), (write_mime_data):
	New functions to write out mime data from hash table.

	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.c:
	(nautilus_mime_type_capplet_show_new_mime_window),
	(nautilus_mime_type_capplet_show_new_extension_window):
	Clean up work on dialogs.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(ok_callback),
	(populate_extension_list),
	(nautilus_mime_type_capplet_add_extension),
	(remove_extension_clicked), (init_mime_capplet),
	(delete_mime_clicked), (create_mime_list_and_scroller),
	(get_selected_item_mime_type):
	Clean up work on main capplet view.
2000-06-19 23:12:18 +00:00
Gene Z. Ragan
bb5059111b File Types and Programs capplet work in progress.
2000-06-17  Gene Z. Ragan  <gzr@eazel.com>

	File Types and Programs capplet work in progress.

	* mime-type-capplet/mime-info.c:
	* mime-type-capplet/mime-info.h:
	Removed obsolete files from capplet.

	* mime-type-capplet/Makefile.am:
	Remove above files form makefile.

	* libgnomevfs/gnome-vfs-mime-info.c:
	* libgnomevfs/gnome-vfs-mime-info.h:
	(list_context_new), (context_destroy_and_unlink),
	(load_mime_type_info_from),
	(load_mime_list_info_from), (mime_list_load),
	(load_mime_type_info), (gnome_vfs_mime_init),
	(gnome_vfs_mime_info_clear), (gnome_vfs_mime_info_shutdown),
	(get_key_name), (gnome_vfs_get_registered_mime_types):
	Various fixes and modifications.  Fixed a bug in the
	mime key database parser that caused comments to be
	read in incorrectly.

	* mime-type-capplet/mime-data.c:
	(add_to_key), (add_mime_vals_to_clist),
	(add_new_mime_type), (add_new_mime_type),
	(write_mime_foreach):
	Capplet work in progress.

	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.c:
	(nautilus_mime_type_capplet_show_new_mime_window):
	Capplet work in progress.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	* mime-type-capplet/nautilus-mime-type-capplet.h:
	(main), (g_list_free_deep), (try_callback), (revert_callback),
	(ok_callback), (cancel_callback), (populate_extension_list),
	(mime_list_selected_row_callback), (init_mime_capplet),
	(nautilus_mime_type_capplet_update_info), (delete_mime_clicked),
	(edit_applications_clicked), (edit_components_clicked),
	(insert_mime_vals_into_clist), (create_mime_list_and_scroller):
	Capplet work in progress.
2000-06-17 07:58:12 +00:00
Gene Z. Ragan
662a6f1803 Work in progress on the FIle Types and Programs Capplet Removed obsolete
2000-06-15  Gene Z. Ragan  <gzr@eazel.com>

	Work in progress on the FIle Types and Programs Capplet
	* mime-type-capplet/Makefile.am:
	Removed obsolete files form build.

	* mime-type-capplet/edit-window.c:
	* mime-type-capplet/edit-window.h:
	Obsolete.  Removed.

	* mime-type-capplet/new-mime-window.c:
	* mime-type-capplet/new-mime-window.h:
	Obsolete.  Removed.

	* mime-type-capplet/mime-data.c: (add_mime_vals_to_clist),
	(selected_row_callback):

	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.c:
	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.h:
	(edit_applications_dialog_destroy), (application_is_in_list),
	(application_button_toggled_callback),
	(populate_default_applications_box),
	(populate_default_components_box),
	(initialize_edit_applications_dialog),
	(show_edit_applications_dialog), (show_edit_components_dialog),
	(nautilus_mime_type_capplet_show_new_mime_window),
	(nautilus_mime_type_capplet_show_new_extension_window):

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	* mime-type-capplet/nautilus-mime-type-capplet.h:
	(revert_callback), (populate_extension_list),
	(nautilus_mime_type_capplet_add_extension),
	(add_extension_clicked), (remove_extension),
	(extension_list_selected), (extension_list_deselected),
	(init_mime_capplet), (nautilus_mime_type_capplet_update_info),
	(add_mime_clicked), (edit_components_clicked),
	(nautilus_mime_type_capplet_update_application_info),
	(nautilus_mime_type_capplet_update_component_info):
2000-06-15 23:32:08 +00:00
Gene Z. Ragan
e2c7c32d5d New files. Trying to clean up current capplet source and organize it in a
2000-06-14  Gene Z. Ragan  <gzr@eazel.com>

	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.c:
	* mime-type-capplet/nautilus-mime-type-capplet-dialogs.h:
	New files. Trying to clean up current capplet source and
	organize it in a sensible way.

	(edit_application_dialog_destroy), (edit_component_dialog_destroy),
	(populate_default_applications_list),
	(populate_preferred_applications_list), (component_is_in_list),
	(component_button_toggled_callback),
	(populate_default_components_box),
	(populate_preferred_components_list),
	(initialize_edit_applications_dialog),
	(initialize_edit_components_dialog),
	(show_edit_applications_dialog), (show_edit_components_dialog),
	Brand new functions.

	* mime-type-capplet/Makefile.am:
	Added new source file listed above.

	* mime-type-capplet/nautilus-mime-type-capplet.c:
	(init_mime_capplet), (populate_application_menu),
	(populate_component_menu), (edit_applications_clicked),
	(edit_components_clicked):
	Work on setting up info view.
2000-06-15 06:14:51 +00:00