some changes to the dialog that is shown if the help browser is missing.

2008-07-10  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimphelp.c: some changes to the dialog that is 
shown
	if the help browser is missing.


svn path=/trunk/; revision=26104
This commit is contained in:
Sven Neumann 2008-07-10 10:12:34 +00:00 committed by Sven Neumann
parent a52e659aa6
commit ee6c7db882
2 changed files with 38 additions and 20 deletions

View File

@ -1,3 +1,8 @@
2008-07-10 Sven Neumann <sven@gimp.org>
* app/widgets/gimphelp.c: some changes to the dialog that is shown
if the help browser is missing.
2008-07-10 Sven Neumann <sven@gimp.org>
* docs/gimp.1.in: document the --help-gegl command-line option.

View File

@ -71,8 +71,10 @@ struct _GimpIdleHelp
static gboolean gimp_idle_help (GimpIdleHelp *idle_help);
static void gimp_idle_help_free (GimpIdleHelp *idle_help);
static gboolean gimp_help_browser (Gimp *gimp);
static gboolean gimp_help_browser (Gimp *gimp,
GimpProgress *progress);
static void gimp_help_browser_error (Gimp *gimp,
GimpProgress *progress,
const gchar *title,
const gchar *primary,
const gchar *text);
@ -199,7 +201,7 @@ gimp_idle_help (GimpIdleHelp *idle_help)
if (config->help_browser == GIMP_HELP_BROWSER_GIMP)
{
if (gimp_help_browser (idle_help->gimp))
if (gimp_help_browser (idle_help->gimp, idle_help->progress))
procedure_name = "extension-gimp-help-browser-temp";
}
@ -233,7 +235,8 @@ gimp_idle_help_free (GimpIdleHelp *idle_help)
}
static gboolean
gimp_help_browser (Gimp *gimp)
gimp_help_browser (Gimp *gimp,
GimpProgress *progress)
{
static gboolean busy = FALSE;
GimpProcedure *procedure;
@ -260,11 +263,13 @@ gimp_help_browser (Gimp *gimp)
if (! procedure)
{
gimp_help_browser_error (gimp,
_("Help browser not found"),
_("Could not find GIMP help browser."),
gimp_help_browser_error (gimp, progress,
_("Help browser is missing"),
_("The GIMP help browser is not available."),
_("The GIMP help browser plug-in appears "
"to be missing from your installation."));
"to be missing from your installation. "
"You may instead use the web browser "
"for reading the help pages."));
busy = FALSE;
return FALSE;
@ -289,7 +294,7 @@ gimp_help_browser (Gimp *gimp)
if (error)
{
gimp_message (gimp, NULL, GIMP_MESSAGE_ERROR,
gimp_message (gimp, G_OBJECT (progress), GIMP_MESSAGE_ERROR,
"%s", error->message);
g_error_free (error);
}
@ -301,7 +306,7 @@ gimp_help_browser (Gimp *gimp)
if (! procedure)
{
gimp_help_browser_error (gimp,
gimp_help_browser_error (gimp, progress,
_("Help browser doesn't start"),
_("Could not start the GIMP help browser "
"plug-in."),
@ -318,19 +323,19 @@ gimp_help_browser (Gimp *gimp)
static void
gimp_help_browser_error (Gimp *gimp,
GimpProgress *progress,
const gchar *title,
const gchar *primary,
const gchar *text)
{
GtkWidget *dialog;
dialog =
gimp_message_dialog_new (title, GIMP_STOCK_WARNING,
dialog = gimp_message_dialog_new (title, GIMP_STOCK_USER_MANUAL,
NULL, 0,
NULL, NULL,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
_("Use _web browser instead"), GTK_RESPONSE_OK,
_("Use _Web Browser"), GTK_RESPONSE_OK,
NULL);
@ -339,6 +344,14 @@ gimp_help_browser_error (Gimp *gimp,
GTK_RESPONSE_CANCEL,
-1);
if (progress)
{
guint32 window = gimp_progress_get_window (progress);
if (window)
gimp_window_set_transient_for (GTK_WINDOW (dialog), window);
}
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box,
primary);
gimp_message_box_set_text (GIMP_MESSAGE_DIALOG (dialog)->box, text);