app: implement the "Convert to RGB Working Space" import dialog in the core
Add gimp_image_import_color_profile(), a GUI vtable entry query_profile_policy() and a new dialog which returns the profile policy and the profile to convert to. Get rid of the wrapper that calls the lcms plug-in for that dialog, the plug-in is now completely unused. This commit doesn't add any new features, it's just the former lcms plug-in dialog implemented in app/ (except the little fix that it is now aware of linear vs. gamma images).
This commit is contained in:
@ -76,6 +76,8 @@
|
||||
|
||||
#include "menus/menus.h"
|
||||
|
||||
#include "dialogs/color-profile-import-dialog.h"
|
||||
|
||||
#include "gui.h"
|
||||
#include "gui-message.h"
|
||||
#include "gui-vtable.h"
|
||||
@ -144,9 +146,17 @@ static gboolean gui_recent_list_add_file (Gimp *gimp,
|
||||
const gchar *mime_type);
|
||||
static void gui_recent_list_load (Gimp *gimp);
|
||||
|
||||
static GMountOperation * gui_get_mount_operation (Gimp *gimp,
|
||||
static GMountOperation
|
||||
* gui_get_mount_operation (Gimp *gimp,
|
||||
GimpProgress *progress);
|
||||
|
||||
static GimpColorProfilePolicy
|
||||
gui_query_profile_policy (Gimp *gimp,
|
||||
GimpImage *image,
|
||||
GimpContext *context,
|
||||
GimpColorProfile **dest_profile,
|
||||
gboolean *dont_ask);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
@ -182,6 +192,7 @@ gui_vtable_init (Gimp *gimp)
|
||||
gimp->gui.recent_list_add_file = gui_recent_list_add_file;
|
||||
gimp->gui.recent_list_load = gui_recent_list_load;
|
||||
gimp->gui.get_mount_operation = gui_get_mount_operation;
|
||||
gimp->gui.query_profile_policy = gui_query_profile_policy;
|
||||
}
|
||||
|
||||
|
||||
@ -750,3 +761,14 @@ gui_get_mount_operation (Gimp *gimp,
|
||||
|
||||
return gtk_mount_operation_new (GTK_WINDOW (toplevel));
|
||||
}
|
||||
|
||||
static GimpColorProfilePolicy
|
||||
gui_query_profile_policy (Gimp *gimp,
|
||||
GimpImage *image,
|
||||
GimpContext *context,
|
||||
GimpColorProfile **dest_profile,
|
||||
gboolean *dont_ask)
|
||||
{
|
||||
return color_profile_import_dialog_run (image, context, NULL,
|
||||
dest_profile, dont_ask);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user