summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-program-choosing.c
diff options
context:
space:
mode:
authorRebecca Schulman <rebecka@eazel.com>2001-03-06 00:12:57 +0000
committerRebecca Schulman <rebecka@src.gnome.org>2001-03-06 00:12:57 +0000
commit87d6d540f8abab008b1258f9e2e2e7125b77bb3d (patch)
treee6422f588589732f7311915fd9490d87fa8b2a8b /libnautilus-private/nautilus-program-choosing.c
parent27595df3f8eee96513a422f757e8dafbc116190b (diff)
downloadnautilus-87d6d540f8abab008b1258f9e2e2e7125b77bb3d.tar.gz
Complete most of bug 5520, that turning medusa on when cron isn't running
2001-03-03 Rebecca Schulman <rebecka@eazel.com> Complete most of bug 5520, that turning medusa on when cron isn't running should tell the user this, and, if possible, how to start cron. reviewed by: Mike Engber <engber@eazel.com> * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_use_fast_search_changed_callback): Add dialog that comes up if the fast search preference is enabled in the preference dialog when cron is off. The dialog will tell the user about cron and how to turn it on on linux systems. * libnautilus-extensions/nautilus-medusa-support.c: (nautilus_medusa_add_system_state_changed_callback), (nautilus_medusa_check_cron_is_enabled): * libnautilus-extensions/nautilus-medusa-support.h: Add hack to check if cron is actually running using cron. * acconfig.h: * configure.in: Add HAVE_PROC_PROCESS_FILES, so we know whether we can check proc files for whether cron is running * src/nautilus-first-time-druid.c: (back_update_page_callback), (set_up_medusa_page), (next_medusa_page_callback), (set_up_cron_information_page), (nautilus_first_time_druid_show): Add cron interface to the first time druid that tells users how to turn on cron if necessary, as per Arlo's design. Final text still needs to be added here. * libnautilus-extensions/nautilus-mime-actions.c: (application_can_handle_uri), (nautilus_mime_has_any_applications_for_file), (nautilus_mime_has_any_applications_for_file_type): * libnautilus-extensions/nautilus-mime-actions.h: * libnautilus-extensions/nautilus-program-choosing.c: (choose_application_callback), (application_cannot_open_location): Old change that never got committed, reviewed by Darin Adler <darin@eazel.com>
Diffstat (limited to 'libnautilus-private/nautilus-program-choosing.c')
-rw-r--r--libnautilus-private/nautilus-program-choosing.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/libnautilus-private/nautilus-program-choosing.c b/libnautilus-private/nautilus-program-choosing.c
index 6713fc2a9..91a2f4c2c 100644
--- a/libnautilus-private/nautilus-program-choosing.c
+++ b/libnautilus-private/nautilus-program-choosing.c
@@ -332,7 +332,7 @@ choose_application_callback (NautilusFile *file,
application = NULL;
dialog = NULL;
- if (nautilus_mime_has_any_applications_for_file (file)) {
+ if (nautilus_mime_has_any_applications_for_file_type (file)) {
dialog = set_up_program_chooser (file, GNOME_VFS_MIME_ACTION_TYPE_APPLICATION,
choose_data->parent_window);
if (gnome_dialog_run (dialog) == GNOME_OK) {
@@ -407,21 +407,6 @@ nautilus_choose_application_for_file (NautilusFile *file,
g_list_free (attributes);
}
-static gboolean
-application_can_handle_uri (gpointer application_data,
- gpointer uri_scheme)
-{
- GnomeVFSMimeApplication *application;
-
- g_assert (application_data != NULL);
-
- application = (GnomeVFSMimeApplication *) application_data;
-
- return g_list_find_custom (application->supported_uri_schemes,
- uri_scheme,
- nautilus_strcmp_compare_func) != NULL;
-
-}
typedef struct {
NautilusFile *file;
@@ -496,23 +481,14 @@ application_cannot_open_location (GnomeVFSMimeApplication *application,
const char *uri_scheme,
GtkWindow *parent_window)
{
- GList *available_applications, *available_applications_for_uri;
- GList *other_applications;
GnomeDialog *message_dialog;
LaunchParameters *launch_parameters;
char *message;
char *file_name;
- available_applications = nautilus_mime_get_all_applications_for_file (file);
- available_applications_for_uri = nautilus_g_list_partition (available_applications,
- application_can_handle_uri,
- (gpointer) uri_scheme,
- &other_applications);
- gnome_vfs_mime_application_list_free (other_applications);
-
file_name = nautilus_file_get_name (file);
- if (available_applications_for_uri != NULL) {
+ if (nautilus_mime_has_any_applications_for_file (file)) {
message = g_strdup_printf (_("\"%s\" can't open \"%s\" because \"%s\" can't access files at \"%s\" "
"locations. Would you like to choose another application?"),
application->name, file_name,
@@ -536,13 +512,12 @@ application_cannot_open_location (GnomeVFSMimeApplication *application,
else {
message = g_strdup_printf (_("\"%s\" can't open \"%s\" because \"%s\" can't access files at \"%s\" "
"locations. No other applications are available to view this file. "
- "If you copy this file onto your computer, you will be able to open "
+ "If you copy this file onto your computer, you may be able to open "
"it."), application->name, file_name,
application->name, uri_scheme);
nautilus_show_info_dialog (message, _("Can't Open Location"), parent_window);
}
- gnome_vfs_mime_application_list_free (available_applications_for_uri);
g_free (file_name);
g_free (message);
}