mirror of https://github.com/GNOME/gimp.git
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:
parent
a52e659aa6
commit
ee6c7db882
|
@ -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>
|
2008-07-10 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* docs/gimp.1.in: document the --help-gegl command-line option.
|
* docs/gimp.1.in: document the --help-gegl command-line option.
|
||||||
|
|
|
@ -71,8 +71,10 @@ struct _GimpIdleHelp
|
||||||
static gboolean gimp_idle_help (GimpIdleHelp *idle_help);
|
static gboolean gimp_idle_help (GimpIdleHelp *idle_help);
|
||||||
static void gimp_idle_help_free (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,
|
static void gimp_help_browser_error (Gimp *gimp,
|
||||||
|
GimpProgress *progress,
|
||||||
const gchar *title,
|
const gchar *title,
|
||||||
const gchar *primary,
|
const gchar *primary,
|
||||||
const gchar *text);
|
const gchar *text);
|
||||||
|
@ -199,7 +201,7 @@ gimp_idle_help (GimpIdleHelp *idle_help)
|
||||||
|
|
||||||
if (config->help_browser == GIMP_HELP_BROWSER_GIMP)
|
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";
|
procedure_name = "extension-gimp-help-browser-temp";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,7 +235,8 @@ gimp_idle_help_free (GimpIdleHelp *idle_help)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gimp_help_browser (Gimp *gimp)
|
gimp_help_browser (Gimp *gimp,
|
||||||
|
GimpProgress *progress)
|
||||||
{
|
{
|
||||||
static gboolean busy = FALSE;
|
static gboolean busy = FALSE;
|
||||||
GimpProcedure *procedure;
|
GimpProcedure *procedure;
|
||||||
|
@ -260,11 +263,13 @@ gimp_help_browser (Gimp *gimp)
|
||||||
|
|
||||||
if (! procedure)
|
if (! procedure)
|
||||||
{
|
{
|
||||||
gimp_help_browser_error (gimp,
|
gimp_help_browser_error (gimp, progress,
|
||||||
_("Help browser not found"),
|
_("Help browser is missing"),
|
||||||
_("Could not find GIMP help browser."),
|
_("The GIMP help browser is not available."),
|
||||||
_("The GIMP help browser plug-in appears "
|
_("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;
|
busy = FALSE;
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -289,7 +294,7 @@ gimp_help_browser (Gimp *gimp)
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
gimp_message (gimp, NULL, GIMP_MESSAGE_ERROR,
|
gimp_message (gimp, G_OBJECT (progress), GIMP_MESSAGE_ERROR,
|
||||||
"%s", error->message);
|
"%s", error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
}
|
}
|
||||||
|
@ -301,7 +306,7 @@ gimp_help_browser (Gimp *gimp)
|
||||||
|
|
||||||
if (! procedure)
|
if (! procedure)
|
||||||
{
|
{
|
||||||
gimp_help_browser_error (gimp,
|
gimp_help_browser_error (gimp, progress,
|
||||||
_("Help browser doesn't start"),
|
_("Help browser doesn't start"),
|
||||||
_("Could not start the GIMP help browser "
|
_("Could not start the GIMP help browser "
|
||||||
"plug-in."),
|
"plug-in."),
|
||||||
|
@ -317,28 +322,36 @@ gimp_help_browser (Gimp *gimp)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_help_browser_error (Gimp *gimp,
|
gimp_help_browser_error (Gimp *gimp,
|
||||||
const gchar *title,
|
GimpProgress *progress,
|
||||||
const gchar *primary,
|
const gchar *title,
|
||||||
const gchar *text)
|
const gchar *primary,
|
||||||
|
const gchar *text)
|
||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
|
|
||||||
dialog =
|
dialog = gimp_message_dialog_new (title, GIMP_STOCK_USER_MANUAL,
|
||||||
gimp_message_dialog_new (title, GIMP_STOCK_WARNING,
|
NULL, 0,
|
||||||
NULL, 0,
|
NULL, NULL,
|
||||||
NULL, NULL,
|
|
||||||
|
|
||||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||||
_("Use _web browser instead"), GTK_RESPONSE_OK,
|
_("Use _Web Browser"), GTK_RESPONSE_OK,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||||
GTK_RESPONSE_OK,
|
GTK_RESPONSE_OK,
|
||||||
GTK_RESPONSE_CANCEL,
|
GTK_RESPONSE_CANCEL,
|
||||||
-1);
|
-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,
|
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box,
|
||||||
primary);
|
primary);
|
||||||
gimp_message_box_set_text (GIMP_MESSAGE_DIALOG (dialog)->box, text);
|
gimp_message_box_set_text (GIMP_MESSAGE_DIALOG (dialog)->box, text);
|
||||||
|
|
Loading…
Reference in New Issue