Commit d99071af authored by David Zeuthen's avatar David Zeuthen Committed by David Zeuthen

Require gio 2.17.5 for g_mount_guess_content_type().

2008-07-29  David Zeuthen  <davidz@redhat.com>

        * configure.in:
        Require gio 2.17.5 for g_mount_guess_content_type().

        * data/nautilus.xml.in:
        Delete x-content/* definitions; these are in shared-mime-info 0.50
        and greater.

        * libnautilus-private/nautilus-global-preferences.c:
        * libnautilus-private/nautilus-global-preferences.h:
        * libnautilus-private/apps_nautilus_preferences.schemas.in:
        Remove /apps/nautilus/preferences/media_autorun_x_content_ask
        and add /apps/nautilus/preferences/media_autorun_x_content_start_app
        instead since we're inverting the logic. Now, by default (except
        for x-content/software for which we're shipping an app ourselves)
        we default to asking the user what action to take.

        * libnautilus-private/nautilus-autorun.c:
        * libnautilus-private/nautilus-autorun.h:
        Use g_mount_guess_content_type() instead of using our own
        sniffing code. Also provide an option for the user to select
        an application to use (#532474).

        * src/nautilus-file-management-properties.c:
        Catch up with API changes to nautilus_autorun_prepare_combo_box()


svn path=/trunk/; revision=14425
parent f564363d
2008-07-29 David Zeuthen <davidz@redhat.com>
* configure.in:
Require gio 2.17.5 for g_mount_guess_content_type().
* data/nautilus.xml.in:
Delete x-content/* definitions; these are in shared-mime-info 0.50
and greater.
* libnautilus-private/nautilus-global-preferences.c:
* libnautilus-private/nautilus-global-preferences.h:
* libnautilus-private/apps_nautilus_preferences.schemas.in:
Remove /apps/nautilus/preferences/media_autorun_x_content_ask
and add /apps/nautilus/preferences/media_autorun_x_content_start_app
instead since we're inverting the logic. Now, by default (except
for x-content/software for which we're shipping an app ourselves)
we default to asking the user what action to take.
* libnautilus-private/nautilus-autorun.c:
* libnautilus-private/nautilus-autorun.h:
Use g_mount_guess_content_type() instead of using our own
sniffing code. Also provide an option for the user to select
an application to use (#532474).
* src/nautilus-file-management-properties.c:
Catch up with API changes to nautilus_autorun_prepare_combo_box()
2008-07-28 Cosimo Cecchi <cosimoc@gnome.org>
* src/nautilus-file-management-properties.c:
......
......@@ -5,7 +5,7 @@ dnl ===========================================================================
m4_define(bonobo_activation_minver, 2.1.0)
m4_define(bonobo_minver, 2.1.0)
m4_define(eel_minver, 2.23.2)
m4_define(glib_minver, 2.15.6)
m4_define(glib_minver, 2.17.5)
m4_define(gnome_desktop_minver, 2.9.91)
m4_define(gnome_minver, 2.14.0)
m4_define(gnome_ui_minver, 2.6.0)
......
......@@ -5,103 +5,4 @@
<_comment>Saved search</_comment>
<glob pattern="*.savedSearch"/>
</mime-type>
<!-- this section lists definitions for x-content/* types; this should be
standardized on xdg-list (TODO: davidz)
-->
<mime-type type="x-content/video-vcd">
<!-- http://en.wikipedia.org/wiki/Video_CD -->
<_comment>Video CD</_comment>
</mime-type>
<mime-type type="x-content/video-svcd">
<!-- http://en.wikipedia.org/wiki/Super_Video_CD -->
<_comment>Super Video CD</_comment>
</mime-type>
<mime-type type="x-content/video-dvd">
<!-- http://en.wikipedia.org/wiki/DVD-Video -->
<_comment>DVD Video</_comment>
</mime-type>
<mime-type type="x-content/image-dcf">
<!-- http://en.wikipedia.org/wiki/Design_rule_for_Camera_File_system -->
<_comment>Digital Photos</_comment>
</mime-type>
<mime-type type="x-content/audio-cdda">
<!-- http://en.wikipedia.org/wiki/Red_Book_(audio_CD_standard) -->
<_comment>Compact Disc Audio</_comment>
</mime-type>
<mime-type type="x-content/blank-cd">
<!-- http://en.wikipedia.org/wiki/Compact_Disc -->
<_comment>Blank CD Disc</_comment>
</mime-type>
<mime-type type="x-content/blank-dvd">
<!-- http://en.wikipedia.org/wiki/DVD -->
<_comment>Blank DVD Disc</_comment>
</mime-type>
<mime-type type="x-content/blank-bd">
<!-- http://en.wikipedia.org/wiki/Blu-ray_Disc -->
<_comment>Blank Blu-Ray Disc</_comment>
</mime-type>
<mime-type type="x-content/blank-hddvd">
<!-- http://en.wikipedia.org/wiki/HD_DVD -->
<_comment>Blank HD DVD Disc</_comment>
</mime-type>
<mime-type type="x-content/audio-dvd">
<!-- http://en.wikipedia.org/wiki/DVD-Audio -->
<_comment>DVD Audio</_comment>
</mime-type>
<mime-type type="x-content/video-bluray">
<!-- http://en.wikipedia.org/wiki/Blu-ray_Disc -->
<_comment>Blu-Ray Video</_comment>
</mime-type>
<mime-type type="x-content/video-hddvd">
<!-- http://en.wikipedia.org/wiki/HD_DVD -->
<_comment>HD DVD Video</_comment>
</mime-type>
<mime-type type="x-content/image-picturecd">
<!-- http://en.wikipedia.org/wiki/Picture_CD -->
<_comment>Picture CD</_comment>
</mime-type>
<mime-type type="x-content/audio-player">
<!-- see fd.o hal spec -->
<_comment>Portable Audio Player</_comment>
</mime-type>
<mime-type type="x-content/software">
<!-- http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html -->
<_comment>Software</_comment>
</mime-type>
<!-- TODO:
- SACD : http://en.wikipedia.org/wiki/Super_Audio_CD
- This might be dead and appear to be totally unsupported anyway
- Enhanced Audio CD (see link 1. below)
- http://en.wikipedia.org/wiki/Enhanced_CD
- Enhanced DVD Movie (see link 1. below)
- ??
- picture files
- audio files
- video files
- for these three; launch a given program when detecting such files in the root
directory. Should default to "Don't do anything" since it's a bit crackful
See also
1. http://www.phdcc.com/shellrun/autorun.htm
-->
</mime-info>
......@@ -147,16 +147,19 @@
</schema>
<schema>
<key>/schemas/apps/nautilus/preferences/media_autorun_x_content_ask</key>
<applyto>/apps/nautilus/preferences/media_autorun_x_content_ask</applyto>
<key>/schemas/apps/nautilus/preferences/media_autorun_x_content_start_app</key>
<applyto>/apps/nautilus/preferences/media_autorun_x_content_start_app</applyto>
<owner>nautilus</owner>
<type>list</type>
<list_type>string</list_type>
<default>[]</default>
<default>[x-content/software]</default>
<locale name="C">
<short>List of x-content/* types to ask the user what to do on insertion</short>
<short>List of x-content/* types where the preferred application will be launched</short>
<long>
List of x-content/* types to ask the user what to do on insertion.
List of x-content/* types for which the user have chosen to
start an application in the preference capplet. The
preferred application for the given type will be started on
insertion on media matching these types.
</long>
</locale>
</schema>
......@@ -169,9 +172,12 @@
<list_type>string</list_type>
<default>[]</default>
<locale name="C">
<short>List of x-content/* where to prompt the user on insertion</short>
<short>List of x-content/* types set to "Do Nothing"</short>
<long>
List of x-content/* types to ask the user what to do on insertion.
List of x-content/* types for which the user have chosen
"Do Nothing" in the preference capplet. No prompt will be
shown nor will any matching application be started on
insertion of media matching these types.
</long>
</locale>
</schema>
......@@ -184,10 +190,11 @@
<list_type>string</list_type>
<default>[]</default>
<locale name="C">
<short>List of x-content/* types where a folder window should be opened</short>
<short>List of x-content/* types set to "Open Folder"</short>
<long>
List of x-content/* types where a folder window should be opened
on insertion.
List of x-content/* types for which the user have chosen
"Open Folder" in the preferences capplet. A folder window
will be opened on insertion of media matching these types.
</long>
</locale>
</schema>
......
This diff is collapsed.
......@@ -44,21 +44,6 @@
#include <eel/eel-background.h>
#include <libnautilus-private/nautilus-file.h>
void _g_mount_guess_content_type_async (GMount *mount,
gboolean force_rescan,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
char ** _g_mount_guess_content_type_finish (GMount *mount,
GAsyncResult *result,
GError **error);
char ** _g_mount_guess_content_type (GMount *mount,
gboolean force_rescan,
GError **error);
typedef void (*NautilusAutorunComboBoxChanged) (gboolean selected_ask,
gboolean selected_ignore,
gboolean selected_open_folder,
......@@ -71,6 +56,7 @@ typedef void (*NautilusAutorunGetContent) (char **content, gpointer user_data);
void nautilus_autorun_prepare_combo_box (GtkWidget *combo_box,
const char *x_content_type,
gboolean include_ask,
gboolean include_open_with_other_app,
gboolean update_settings,
NautilusAutorunComboBoxChanged changed_cb,
gpointer user_data);
......
......@@ -521,7 +521,7 @@ static const PreferenceDefault preference_defaults[] = {
PREFERENCE_BOOLEAN,
GINT_TO_POINTER (FALSE)
},
{ NAUTILUS_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_ASK,
{ NAUTILUS_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_START_APP,
PREFERENCE_STRING_ARRAY,
"", NULL, NULL, NULL
},
......
......@@ -52,7 +52,7 @@ G_BEGIN_DECLS
/* Autorun options */
#define NAUTILUS_PREFERENCES_MEDIA_AUTORUN_NEVER "preferences/media_autorun_never"
#define NAUTILUS_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_ASK "preferences/media_autorun_x_content_ask"
#define NAUTILUS_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_START_APP "preferences/media_autorun_x_content_start_app"
#define NAUTILUS_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_IGNORE "preferences/media_autorun_x_content_ignore"
#define NAUTILUS_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_OPEN_FOLDER "preferences/media_autorun_x_content_open_folder"
......
......@@ -548,6 +548,7 @@ other_type_combo_box_changed (GtkComboBox *combo_box, GtkComboBox *action_combo_
x_content_type,
TRUE,
TRUE,
TRUE,
NULL, NULL);
out:
g_free (x_content_type);
......@@ -573,7 +574,7 @@ nautilus_file_management_properties_dialog_setup_media_page (GladeXML *xml_dialo
for (n = 0; s[n*2] != NULL; n++) {
nautilus_autorun_prepare_combo_box (glade_xml_get_widget (xml_dialog, s[n*2]), s[n*2 + 1],
TRUE, TRUE, NULL, NULL);
TRUE, TRUE, TRUE, NULL, NULL);
}
other_type_combo_box = glade_xml_get_widget (xml_dialog, "media_other_type_combobox");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment