added code for adding a shortcut to the default ICC profile location on
2007-12-20 Sven Neumann <sven@gimp.org> * app/widgets/gimpprofilechooserdialog.c: added code for adding a shortcut to the default ICC profile location on Windows. Based on a patch by John Marshall (bug #503410). svn path=/trunk/; revision=24407
This commit is contained in:

committed by
Sven Neumann

parent
b575b82f82
commit
318bcd396d
@ -1,3 +1,9 @@
|
|||||||
|
2007-12-20 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* app/widgets/gimpprofilechooserdialog.c: added code for adding a
|
||||||
|
shortcut to the default ICC profile location on Windows. Based on
|
||||||
|
a patch by John Marshall (bug #503410).
|
||||||
|
|
||||||
2007-12-20 Sven Neumann <sven@gimp.org>
|
2007-12-20 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/actions/documents-commands.c (documents_clear_cmd_callback):
|
* app/actions/documents-commands.c (documents_clear_cmd_callback):
|
||||||
|
@ -60,6 +60,7 @@ static void gimp_profile_chooser_dialog_get_property (GObject
|
|||||||
GValue *value,
|
GValue *value,
|
||||||
GParamSpec *pspec);
|
GParamSpec *pspec);
|
||||||
|
|
||||||
|
static void gimp_profile_chooser_dialog_add_shortcut (GimpProfileChooserDialog *dialog);
|
||||||
static void gimp_profile_chooser_dialog_update_preview (GimpProfileChooserDialog *dialog);
|
static void gimp_profile_chooser_dialog_update_preview (GimpProfileChooserDialog *dialog);
|
||||||
|
|
||||||
static GtkWidget * gimp_profile_view_new (GtkTextBuffer *buffer);
|
static GtkWidget * gimp_profile_view_new (GtkTextBuffer *buffer);
|
||||||
@ -125,15 +126,7 @@ gimp_profile_chooser_dialog_constructor (GType type,
|
|||||||
|
|
||||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
|
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
|
||||||
|
|
||||||
#ifndef G_OS_WIN32
|
gimp_profile_chooser_dialog_add_shortcut (dialog);
|
||||||
{
|
|
||||||
const gchar folder[] = "/usr/share/color/icc";
|
|
||||||
|
|
||||||
if (g_file_test (folder, G_FILE_TEST_IS_DIR))
|
|
||||||
gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (dialog),
|
|
||||||
folder, NULL);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
filter = gtk_file_filter_new ();
|
filter = gtk_file_filter_new ();
|
||||||
gtk_file_filter_set_name (filter, _("All files (*.*)"));
|
gtk_file_filter_set_name (filter, _("All files (*.*)"));
|
||||||
@ -248,6 +241,37 @@ gimp_profile_chooser_dialog_get_desc (GimpProfileChooserDialog *dialog,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Add shortcut for default ICC profile location */
|
||||||
|
static void
|
||||||
|
gimp_profile_chooser_dialog_add_shortcut (GimpProfileChooserDialog *dialog)
|
||||||
|
{
|
||||||
|
#ifdef G_OS_WIN32
|
||||||
|
{
|
||||||
|
const gchar *prefix = g_getenv ("SystemRoot");
|
||||||
|
gchar *folder;
|
||||||
|
|
||||||
|
if (! prefix)
|
||||||
|
prefix = "c:\\windows";
|
||||||
|
|
||||||
|
folder = g_strconcat (prefix, "\\system32\\spool\\drivers\\color", NULL);
|
||||||
|
|
||||||
|
if (g_file_test (folder, G_FILE_TEST_IS_DIR))
|
||||||
|
gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (dialog),
|
||||||
|
folder, NULL);
|
||||||
|
|
||||||
|
g_free (folder);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
const gchar folder[] = "/usr/share/color/icc";
|
||||||
|
|
||||||
|
if (g_file_test (folder, G_FILE_TEST_IS_DIR))
|
||||||
|
gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (dialog),
|
||||||
|
folder, NULL);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_profile_chooser_dialog_update_preview (GimpProfileChooserDialog *dialog)
|
gimp_profile_chooser_dialog_update_preview (GimpProfileChooserDialog *dialog)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user