summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecca Schulman <rebecka@eazel.com>2001-02-20 04:06:28 +0000
committerRebecca Schulman <rebecka@src.gnome.org>2001-02-20 04:06:28 +0000
commited8b96a8d303fcbb2d4559634f8b66c09e8d1c77 (patch)
treea4626ff5653fd97958ad10614914db66df1a62a4
parent5510539d69fb21f656e79798aecf24992259014d (diff)
downloadnautilus-ed8b96a8d303fcbb2d4559634f8b66c09e8d1c77.tar.gz
Complete bug 6416, to add dialogs to explain that searches will be slow
2001-02-20 Rebecca Schulman <rebecka@eazel.com> Complete bug 6416, to add dialogs to explain that searches will be slow when medusa is disabled or blocked. The work was previously complete, but I've swapped in Vera's text, and added an info_dialog_with_details to the stock dialogs. reviewed by: Gene Ragan <gzr@eazel.com> * libnautilus-extensions/nautilus-stock-dialogs.c: (details_dialog_clicked_callback), (nautilus_show_info_dialog_with_details), (nautilus_show_error_dialog_with_details): * libnautilus-extensions/nautilus-stock-dialogs.h: * src/file-manager/fm-search-list-view.c: (display_system_services_are_blocked_dialog), (display_system_services_are_disabled_dialog):
-rw-r--r--ChangeLog18
-rw-r--r--libnautilus-extensions/nautilus-stock-dialogs.c68
-rw-r--r--libnautilus-extensions/nautilus-stock-dialogs.h4
-rw-r--r--libnautilus-private/nautilus-stock-dialogs.c68
-rw-r--r--libnautilus-private/nautilus-stock-dialogs.h4
-rw-r--r--src/file-manager/fm-search-list-view.c34
6 files changed, 139 insertions, 57 deletions
diff --git a/ChangeLog b/ChangeLog
index ff857aa3e..37f991d9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,22 @@
2001-02-20 Rebecca Schulman <rebecka@eazel.com>
+ Complete bug 6416, to add dialogs to explain
+ that searches will be slow when medusa is disabled or
+ blocked. The work was previously complete, but
+ I've swapped in Vera's text, and added an
+ info_dialog_with_details to the stock dialogs.
+
+ reviewed by: Gene Ragan <gzr@eazel.com>
+
+ * libnautilus-extensions/nautilus-stock-dialogs.c:
+ (details_dialog_clicked_callback),
+ (nautilus_show_info_dialog_with_details),
+ (nautilus_show_error_dialog_with_details):
+ * libnautilus-extensions/nautilus-stock-dialogs.h:
+ * src/file-manager/fm-search-list-view.c:
+ (display_system_services_are_blocked_dialog),
+ (display_system_services_are_disabled_dialog):
+
+2001-02-20 Rebecca Schulman <rebecka@eazel.com>
Fix bugzilla.eazel.com 6414 to add prefence to nautilus
to enable/disable medusa
diff --git a/libnautilus-extensions/nautilus-stock-dialogs.c b/libnautilus-extensions/nautilus-stock-dialogs.c
index 8ad348fb2..75f6da735 100644
--- a/libnautilus-extensions/nautilus-stock-dialogs.c
+++ b/libnautilus-extensions/nautilus-stock-dialogs.c
@@ -510,6 +510,54 @@ nautilus_show_info_dialog (const char *info,
GNOME_MESSAGE_BOX_INFO, parent);
}
+static void
+details_dialog_clicked_callback (GnomeDialog *dialog,
+ int button_number,
+ const char *detailed_message)
+{
+ GtkLabel *label;
+
+ switch (button_number) {
+ case 0: /* Details */
+ label = GTK_LABEL (gtk_object_get_data (GTK_OBJECT (dialog), "message label"));
+ gtk_label_set_text (label, detailed_message);
+ gtk_widget_hide (GTK_WIDGET (nautilus_gnome_dialog_get_button_by_index (dialog, 0)));
+ break;
+ case 1: /* OK */
+ gnome_dialog_close (dialog);
+ break;
+ }
+}
+
+
+GnomeDialog *
+nautilus_show_info_dialog_with_details (const char *info,
+ const char *dialog_title,
+ const char *detailed_info,
+ GtkWindow *parent)
+{
+ GnomeDialog *dialog;
+
+ if (detailed_info == NULL
+ || strcmp (info, detailed_info) == 0) {
+ return nautilus_show_info_dialog (info, dialog_title, parent);
+ }
+
+ dialog = show_message_box (info,
+ dialog_title == NULL ? _("Info") : dialog_title,
+ GNOME_MESSAGE_BOX_INFO,
+ _("Details"), GNOME_STOCK_BUTTON_OK, parent);
+
+ gnome_dialog_set_close (dialog, FALSE);
+ gtk_signal_connect_full (GTK_OBJECT (dialog), "clicked",
+ details_dialog_clicked_callback, NULL, g_strdup (detailed_info),
+ g_free, FALSE, FALSE);
+
+ return dialog;
+
+}
+
+
GnomeDialog *
nautilus_show_warning_dialog (const char *warning,
const char *dialog_title,
@@ -531,24 +579,6 @@ nautilus_show_error_dialog (const char *error,
GNOME_MESSAGE_BOX_ERROR, parent);
}
-static void
-clicked_callback (GnomeDialog *dialog,
- int button_number,
- const char *detailed_error_message)
-{
- GtkLabel *label;
-
- switch (button_number) {
- case 0: /* Details */
- label = GTK_LABEL (gtk_object_get_data (GTK_OBJECT (dialog), "message label"));
- gtk_label_set_text (label, detailed_error_message);
- gtk_widget_hide (GTK_WIDGET (nautilus_gnome_dialog_get_button_by_index (dialog, 0)));
- break;
- case 1: /* OK */
- gnome_dialog_close (dialog);
- break;
- }
-}
GnomeDialog *
nautilus_show_error_dialog_with_details (const char *error_message,
@@ -574,7 +604,7 @@ nautilus_show_error_dialog_with_details (const char *error_message,
/* Show the details when you click on the details button. */
gnome_dialog_set_close (dialog, FALSE);
gtk_signal_connect_full (GTK_OBJECT (dialog), "clicked",
- clicked_callback, NULL, g_strdup (detailed_error_message),
+ details_dialog_clicked_callback, NULL, g_strdup (detailed_error_message),
g_free, FALSE, FALSE);
return dialog;
diff --git a/libnautilus-extensions/nautilus-stock-dialogs.h b/libnautilus-extensions/nautilus-stock-dialogs.h
index 9f0c6bf06..c5980c2f0 100644
--- a/libnautilus-extensions/nautilus-stock-dialogs.h
+++ b/libnautilus-extensions/nautilus-stock-dialogs.h
@@ -60,6 +60,10 @@ int nautilus_run_simple_dialog (GtkWidget *parent,
GnomeDialog *nautilus_show_info_dialog (const char *informative_message,
const char *dialog_title,
GtkWindow *parent);
+GnomeDialog *nautilus_show_info_dialog_with_details (const char *informative_message,
+ const char *dialog_title,
+ const char *detailed_informative_message,
+ GtkWindow *parent);
GnomeDialog *nautilus_show_warning_dialog (const char *warning_message,
const char *dialog_title,
GtkWindow *parent);
diff --git a/libnautilus-private/nautilus-stock-dialogs.c b/libnautilus-private/nautilus-stock-dialogs.c
index 8ad348fb2..75f6da735 100644
--- a/libnautilus-private/nautilus-stock-dialogs.c
+++ b/libnautilus-private/nautilus-stock-dialogs.c
@@ -510,6 +510,54 @@ nautilus_show_info_dialog (const char *info,
GNOME_MESSAGE_BOX_INFO, parent);
}
+static void
+details_dialog_clicked_callback (GnomeDialog *dialog,
+ int button_number,
+ const char *detailed_message)
+{
+ GtkLabel *label;
+
+ switch (button_number) {
+ case 0: /* Details */
+ label = GTK_LABEL (gtk_object_get_data (GTK_OBJECT (dialog), "message label"));
+ gtk_label_set_text (label, detailed_message);
+ gtk_widget_hide (GTK_WIDGET (nautilus_gnome_dialog_get_button_by_index (dialog, 0)));
+ break;
+ case 1: /* OK */
+ gnome_dialog_close (dialog);
+ break;
+ }
+}
+
+
+GnomeDialog *
+nautilus_show_info_dialog_with_details (const char *info,
+ const char *dialog_title,
+ const char *detailed_info,
+ GtkWindow *parent)
+{
+ GnomeDialog *dialog;
+
+ if (detailed_info == NULL
+ || strcmp (info, detailed_info) == 0) {
+ return nautilus_show_info_dialog (info, dialog_title, parent);
+ }
+
+ dialog = show_message_box (info,
+ dialog_title == NULL ? _("Info") : dialog_title,
+ GNOME_MESSAGE_BOX_INFO,
+ _("Details"), GNOME_STOCK_BUTTON_OK, parent);
+
+ gnome_dialog_set_close (dialog, FALSE);
+ gtk_signal_connect_full (GTK_OBJECT (dialog), "clicked",
+ details_dialog_clicked_callback, NULL, g_strdup (detailed_info),
+ g_free, FALSE, FALSE);
+
+ return dialog;
+
+}
+
+
GnomeDialog *
nautilus_show_warning_dialog (const char *warning,
const char *dialog_title,
@@ -531,24 +579,6 @@ nautilus_show_error_dialog (const char *error,
GNOME_MESSAGE_BOX_ERROR, parent);
}
-static void
-clicked_callback (GnomeDialog *dialog,
- int button_number,
- const char *detailed_error_message)
-{
- GtkLabel *label;
-
- switch (button_number) {
- case 0: /* Details */
- label = GTK_LABEL (gtk_object_get_data (GTK_OBJECT (dialog), "message label"));
- gtk_label_set_text (label, detailed_error_message);
- gtk_widget_hide (GTK_WIDGET (nautilus_gnome_dialog_get_button_by_index (dialog, 0)));
- break;
- case 1: /* OK */
- gnome_dialog_close (dialog);
- break;
- }
-}
GnomeDialog *
nautilus_show_error_dialog_with_details (const char *error_message,
@@ -574,7 +604,7 @@ nautilus_show_error_dialog_with_details (const char *error_message,
/* Show the details when you click on the details button. */
gnome_dialog_set_close (dialog, FALSE);
gtk_signal_connect_full (GTK_OBJECT (dialog), "clicked",
- clicked_callback, NULL, g_strdup (detailed_error_message),
+ details_dialog_clicked_callback, NULL, g_strdup (detailed_error_message),
g_free, FALSE, FALSE);
return dialog;
diff --git a/libnautilus-private/nautilus-stock-dialogs.h b/libnautilus-private/nautilus-stock-dialogs.h
index 9f0c6bf06..c5980c2f0 100644
--- a/libnautilus-private/nautilus-stock-dialogs.h
+++ b/libnautilus-private/nautilus-stock-dialogs.h
@@ -60,6 +60,10 @@ int nautilus_run_simple_dialog (GtkWidget *parent,
GnomeDialog *nautilus_show_info_dialog (const char *informative_message,
const char *dialog_title,
GtkWindow *parent);
+GnomeDialog *nautilus_show_info_dialog_with_details (const char *informative_message,
+ const char *dialog_title,
+ const char *detailed_informative_message,
+ GtkWindow *parent);
GnomeDialog *nautilus_show_warning_dialog (const char *warning_message,
const char *dialog_title,
GtkWindow *parent);
diff --git a/src/file-manager/fm-search-list-view.c b/src/file-manager/fm-search-list-view.c
index 5250c52e4..5af01c0e0 100644
--- a/src/file-manager/fm-search-list-view.c
+++ b/src/file-manager/fm-search-list-view.c
@@ -358,14 +358,11 @@ display_system_services_are_blocked_dialog (gboolean unindexed_search_is_availab
/* It is not necessary to translate this text just yet; it has not been
edited yet, and will be replaced by a final copy in a few days. */
- dialog_shown = nautilus_show_info_dialog (_("To do a fast search, Find requires an index "
- "of the files on your system. "
- "Your system administrator has turned off indexing "
- "so your computer does not have an index "
- "right now. Because Find cannot use an "
- "index, this search may take several "
- "minutes. "),
- _("Indexing is Blocked on Your Computer"),
+ dialog_shown = nautilus_show_info_dialog (_("To do a fast search, Find requires an index of "
+ "the files on your system. Your system administrator "
+ "has disabled fast search on your computer, so no index "
+ "is available."),
+ _("Fast searches are not available on your computer"),
NULL);
}
@@ -374,17 +371,16 @@ display_system_services_are_blocked_dialog (gboolean unindexed_search_is_availab
static void
display_system_services_are_disabled_dialog (gboolean unindexed_search_is_available)
{
- /* It is not necessary to translate this text just yet; it has not been
- edited yet, and will be replaced by a final copy in a few days. */
- nautilus_show_info_dialog (_("To do a fast search, Find requires an index "
- "of the files on your system. "
- "You have elected not to index your computer "
- "so it does not have an index "
- "right now. Because Find cannot use an "
- "index, this search may take several "
- "minutes. "),
- _("Indexing is Disabled on Your Computer"),
- NULL);
+ nautilus_show_info_dialog_with_details (_("To do a fast search, Find requires an index of "
+ "the files on your system. Fast search is disabled "
+ "in your Search preferences, so no index is available."),
+ _("Fast searches are not available on your computer."),
+ _("To enable fast search, open the Preferences menu and "
+ "choose Preferences. Then select Search preferences and "
+ "put a checkmark in the Enable Fast Search checkbox. "
+ "An index will be generated while your computer is idle, "
+ "so your index won't be available immediately."),
+ NULL);
}
#endif