mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 01:43:24 +00:00
libgimpwidgets: remove gimp_color_profile_chooser_dialog_new()
Its API was too limited, and adding parameters for what we need next would be equally random. It's a rarely used and mostly internal widget, so simply use g_object_new().
This commit is contained in:
parent
61a1c877c1
commit
2bfd0711e8
7 changed files with 13 additions and 18 deletions
|
@ -330,8 +330,9 @@ color_profile_combo_box_new (ProfileDialog *dialog)
|
||||||
gchar *label;
|
gchar *label;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
chooser =
|
chooser = g_object_new (GIMP_TYPE_COLOR_PROFILE_CHOOSER_DIALOG,
|
||||||
gimp_color_profile_chooser_dialog_new (_("Select destination profile"));
|
"title", _("Select Destination Profile"),
|
||||||
|
NULL);
|
||||||
|
|
||||||
history = gimp_personal_rc_file ("profilerc");
|
history = gimp_personal_rc_file ("profilerc");
|
||||||
combo = gimp_color_profile_combo_box_new (chooser, history);
|
combo = gimp_color_profile_combo_box_new (chooser, history);
|
||||||
|
|
|
@ -802,7 +802,7 @@ static void prefs_profile_combo_notify (GObject *config,
|
||||||
const GParamSpec *param_spec,
|
const GParamSpec *param_spec,
|
||||||
GimpColorProfileComboBox *combo);
|
GimpColorProfileComboBox *combo);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
prefs_profile_combo_changed (GimpColorProfileComboBox *combo,
|
prefs_profile_combo_changed (GimpColorProfileComboBox *combo,
|
||||||
GObject *config)
|
GObject *config)
|
||||||
{
|
{
|
||||||
|
@ -887,12 +887,16 @@ prefs_profile_combo_box_new (GObject *config,
|
||||||
const gchar *label,
|
const gchar *label,
|
||||||
const gchar *property_name)
|
const gchar *property_name)
|
||||||
{
|
{
|
||||||
GtkWidget *dialog = gimp_color_profile_chooser_dialog_new (label);
|
GtkWidget *dialog;
|
||||||
GtkWidget *combo;
|
GtkWidget *combo;
|
||||||
gchar *path;
|
gchar *path;
|
||||||
gchar *notify_name;
|
gchar *notify_name;
|
||||||
GFile *file = NULL;
|
GFile *file = NULL;
|
||||||
|
|
||||||
|
dialog = g_object_new (GIMP_TYPE_COLOR_PROFILE_CHOOSER_DIALOG,
|
||||||
|
"title", label,
|
||||||
|
NULL);
|
||||||
|
|
||||||
g_object_get (config, property_name, &path, NULL);
|
g_object_get (config, property_name, &path, NULL);
|
||||||
|
|
||||||
if (path)
|
if (path)
|
||||||
|
|
|
@ -205,7 +205,6 @@ GIMP_COLOR_SELECTION_GET_CLASS
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>gimpcolorprofilechooserdialog</FILE>
|
<FILE>gimpcolorprofilechooserdialog</FILE>
|
||||||
<TITLE>GimpColorProfileChooserDialog</TITLE>
|
<TITLE>GimpColorProfileChooserDialog</TITLE>
|
||||||
gimp_color_profile_chooser_dialog_new
|
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GIMP_COLOR_PROFILE_CHOOSER_DIALOG
|
GIMP_COLOR_PROFILE_CHOOSER_DIALOG
|
||||||
GIMP_COLOR_PROFILE_CHOOSER_DIALOG_CLASS
|
GIMP_COLOR_PROFILE_CHOOSER_DIALOG_CLASS
|
||||||
|
|
|
@ -137,15 +137,6 @@ gimp_color_profile_chooser_dialog_constructed (GObject *object)
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
|
||||||
gimp_color_profile_chooser_dialog_new (const gchar *title)
|
|
||||||
{
|
|
||||||
|
|
||||||
return g_object_new (GIMP_TYPE_COLOR_PROFILE_CHOOSER_DIALOG,
|
|
||||||
"title", title,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add shortcuts for default ICC profile locations */
|
/* Add shortcuts for default ICC profile locations */
|
||||||
static gboolean
|
static gboolean
|
||||||
add_shortcut (GimpColorProfileChooserDialog *dialog,
|
add_shortcut (GimpColorProfileChooserDialog *dialog,
|
||||||
|
|
|
@ -55,9 +55,8 @@ struct _GimpColorProfileChooserDialogClass
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
GType gimp_color_profile_chooser_dialog_get_type (void) G_GNUC_CONST;
|
GType gimp_color_profile_chooser_dialog_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GtkWidget * gimp_color_profile_chooser_dialog_new (const gchar *title);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,6 @@ EXPORTS
|
||||||
gimp_color_notebook_set_has_page
|
gimp_color_notebook_set_has_page
|
||||||
gimp_color_picker_cursors_get_resource
|
gimp_color_picker_cursors_get_resource
|
||||||
gimp_color_profile_chooser_dialog_get_type
|
gimp_color_profile_chooser_dialog_get_type
|
||||||
gimp_color_profile_chooser_dialog_new
|
|
||||||
gimp_color_profile_combo_box_add
|
gimp_color_profile_combo_box_add
|
||||||
gimp_color_profile_combo_box_add_file
|
gimp_color_profile_combo_box_add_file
|
||||||
gimp_color_profile_combo_box_get_active
|
gimp_color_profile_combo_box_get_active
|
||||||
|
|
|
@ -301,7 +301,9 @@ cdisplay_proof_configure (GimpColorDisplay *display)
|
||||||
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
|
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
|
||||||
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
|
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
|
||||||
|
|
||||||
dialog = gimp_color_profile_chooser_dialog_new (_("Choose an ICC Color Profile"));
|
dialog = g_object_new (GIMP_TYPE_COLOR_PROFILE_CHOOSER_DIALOG,
|
||||||
|
"title", _("Choose an ICC Color Profile"),
|
||||||
|
NULL);
|
||||||
|
|
||||||
history = gimp_personal_rc_file ("profilerc");
|
history = gimp_personal_rc_file ("profilerc");
|
||||||
combo = gimp_color_profile_combo_box_new (dialog, history);
|
combo = gimp_color_profile_combo_box_new (dialog, history);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue