mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-24 18:25:50 +00:00
![David Zeuthen](/assets/img/avatar_default.png)
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
82 lines
2.9 KiB
C
82 lines
2.9 KiB
C
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
|
|
|
|
/*
|
|
* Nautilus
|
|
*
|
|
* Copyright (C) 2008 Red Hat, Inc.
|
|
*
|
|
* Nautilus is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*
|
|
* Author: David Zeuthen <davidz@redhat.com>
|
|
*/
|
|
|
|
/* TODO:
|
|
*
|
|
* - automount all user-visible media on startup
|
|
* - but avoid doing autorun for these
|
|
* - unmount all the media we've automounted on shutdown
|
|
* - finish x-content / * types
|
|
* - finalize the semi-spec
|
|
* - add probing/sniffing code
|
|
* - clean up code
|
|
* - implement missing features
|
|
* - "Open Folder when mounted"
|
|
* - Autorun spec (e.g. $ROOT/.autostart)
|
|
*
|
|
*/
|
|
|
|
#ifndef NAUTILUS_AUTORUN_H
|
|
#define NAUTILUS_AUTORUN_H
|
|
|
|
#include <gtk/gtk.h>
|
|
#include <eel/eel-background.h>
|
|
#include <libnautilus-private/nautilus-file.h>
|
|
|
|
typedef void (*NautilusAutorunComboBoxChanged) (gboolean selected_ask,
|
|
gboolean selected_ignore,
|
|
gboolean selected_open_folder,
|
|
GAppInfo *selected_app,
|
|
gpointer user_data);
|
|
|
|
typedef void (*NautilusAutorunOpenWindow) (GMount *mount, gpointer user_data);
|
|
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);
|
|
|
|
void nautilus_autorun_set_preferences (const char *x_content_type, gboolean pref_ask, gboolean pref_ignore, gboolean pref_open_folder);
|
|
void nautilus_autorun_get_preferences (const char *x_content_type, gboolean *pref_ask, gboolean *pref_ignore, gboolean *pref_open_folder);
|
|
|
|
void nautilus_autorun (GMount *mount, NautilusAutorunOpenWindow open_window_func, gpointer user_data);
|
|
|
|
char **nautilus_autorun_get_cached_x_content_types_for_mount (GMount *mount);
|
|
|
|
void nautilus_autorun_get_x_content_types_for_mount_async (GMount *mount,
|
|
NautilusAutorunGetContent callback,
|
|
GCancellable *cancellable,
|
|
gpointer user_data);
|
|
|
|
void nautilus_autorun_launch_for_mount (GMount *mount, GAppInfo *app_info);
|
|
|
|
void nautilus_allow_autorun_for_volume (GVolume *volume);
|
|
void nautilus_allow_autorun_for_volume_finish (GVolume *volume);
|
|
|
|
#endif /* NAUTILUS_AUTORUN_H */
|