mirror of https://github.com/GNOME/gimp.git
save some space by showing the stock_id instead of the colorselector's
2003-07-19 Sven Neumann <sven@gimp.org> * libgimpwidgets/gimpcolornotebook.c: save some space by showing the stock_id instead of the colorselector's name. * libgimpwidgets/gimpcolorselect.c * modules/colorsel_cmyk.c * modules/colorsel_triangle.c * modules/colorsel_water.c: removed now unused mnemonics. * app/widgets/gimpcoloreditor.c: no need to strip mnemonics from the name here any longer.
This commit is contained in:
parent
6df61084be
commit
30c946afb1
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2003-07-19 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpwidgets/gimpcolornotebook.c: save some space by showing
|
||||
the stock_id instead of the colorselector's name.
|
||||
|
||||
* libgimpwidgets/gimpcolorselect.c
|
||||
* modules/colorsel_cmyk.c
|
||||
* modules/colorsel_triangle.c
|
||||
* modules/colorsel_water.c: removed now unused mnemonics.
|
||||
|
||||
* app/widgets/gimpcoloreditor.c: no need to strip mnemonics from
|
||||
the name here any longer.
|
||||
|
||||
2003-07-18 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/gui/info-window.c: show CMYK color values.
|
||||
|
|
|
@ -179,30 +179,9 @@ gimp_color_editor_init (GimpColorEditor *editor)
|
|||
gtk_container_add (GTK_CONTAINER (button), image);
|
||||
gtk_widget_show (image);
|
||||
|
||||
if (selector_class->name)
|
||||
{
|
||||
gchar *stripped_name;
|
||||
gchar *p, *q;
|
||||
|
||||
stripped_name = g_strdup (selector_class->name);
|
||||
|
||||
p = q = stripped_name;
|
||||
|
||||
while (*q)
|
||||
{
|
||||
if (*q == '_')
|
||||
q++;
|
||||
else
|
||||
*p++ = *q++;
|
||||
}
|
||||
|
||||
*p = '\0';
|
||||
|
||||
gimp_help_set_help_data (button, stripped_name,
|
||||
selector_class->help_page);
|
||||
|
||||
g_free (stripped_name);
|
||||
}
|
||||
gimp_help_set_help_data (button,
|
||||
selector_class->name,
|
||||
selector_class->help_page);
|
||||
|
||||
g_object_set_data (G_OBJECT (button), "selector", selector);
|
||||
|
||||
|
|
|
@ -123,12 +123,11 @@ gimp_color_notebook_class_init (GimpColorNotebookClass *klass)
|
|||
static void
|
||||
gimp_color_notebook_init (GimpColorNotebook *notebook)
|
||||
{
|
||||
GimpColorSelector *selector;
|
||||
GtkWidget *page;
|
||||
GtkWidget *label;
|
||||
GType *selector_types;
|
||||
gint n_selector_types;
|
||||
gint i;
|
||||
GimpColorSelector *selector;
|
||||
GimpColorSelectorClass *selector_class;
|
||||
GType *selector_types;
|
||||
gint n_selector_types;
|
||||
gint i;
|
||||
|
||||
selector = GIMP_COLOR_SELECTOR (notebook);
|
||||
|
||||
|
@ -136,11 +135,14 @@ gimp_color_notebook_init (GimpColorNotebook *notebook)
|
|||
gtk_box_pack_start (GTK_BOX (notebook), notebook->notebook, TRUE, TRUE, 0);
|
||||
gtk_widget_show (notebook->notebook);
|
||||
|
||||
gtk_notebook_popup_enable (GTK_NOTEBOOK (notebook->notebook));
|
||||
|
||||
g_signal_connect (notebook->notebook, "switch_page",
|
||||
G_CALLBACK (gimp_color_notebook_switch_page),
|
||||
notebook);
|
||||
|
||||
selector_types = g_type_children (GIMP_TYPE_COLOR_SELECTOR, &n_selector_types);
|
||||
selector_types = g_type_children (GIMP_TYPE_COLOR_SELECTOR,
|
||||
&n_selector_types);
|
||||
|
||||
if (n_selector_types == 2)
|
||||
{
|
||||
|
@ -150,6 +152,9 @@ gimp_color_notebook_init (GimpColorNotebook *notebook)
|
|||
|
||||
for (i = 0; i < n_selector_types; i++)
|
||||
{
|
||||
GtkWidget *page;
|
||||
GtkWidget *image;
|
||||
|
||||
/* skip ourselves */
|
||||
if (g_type_is_a (selector_types[i], GIMP_TYPE_COLOR_NOTEBOOK))
|
||||
continue;
|
||||
|
@ -166,11 +171,18 @@ gimp_color_notebook_init (GimpColorNotebook *notebook)
|
|||
if (! page)
|
||||
continue;
|
||||
|
||||
selector_class = GIMP_COLOR_SELECTOR_GET_CLASS (page);
|
||||
|
||||
gimp_color_selector_set_show_alpha (GIMP_COLOR_SELECTOR (page), FALSE);
|
||||
|
||||
label = gtk_label_new_with_mnemonic (GIMP_COLOR_SELECTOR_GET_CLASS (page)->name);
|
||||
image = gtk_image_new_from_stock (selector_class->stock_id,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook->notebook), page, label);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook->notebook),
|
||||
page, image);
|
||||
|
||||
gtk_notebook_set_menu_label_text (GTK_NOTEBOOK (notebook->notebook),
|
||||
page, selector_class->name);
|
||||
|
||||
if (! notebook->cur_page)
|
||||
notebook->cur_page = GIMP_COLOR_SELECTOR (page);
|
||||
|
|
|
@ -260,7 +260,7 @@ gimp_color_select_class_init (GimpColorSelectClass *klass)
|
|||
|
||||
object_class->finalize = gimp_color_select_finalize;
|
||||
|
||||
selector_class->name = "GI_MP";
|
||||
selector_class->name = "GIMP";
|
||||
selector_class->help_page = "built_in.html";
|
||||
selector_class->stock_id = GIMP_STOCK_WILBER;
|
||||
selector_class->set_toggles_visible = gimp_color_select_togg_visible;
|
||||
|
|
|
@ -69,7 +69,7 @@ static const GimpModuleInfo colorsel_cmyk_info =
|
|||
GIMP_MODULE_ABI_VERSION,
|
||||
N_("CMYK color selector"),
|
||||
"Sven Neumann <sven@gimp.org>",
|
||||
"v0.1",
|
||||
"v0.2",
|
||||
"(c) 2003, released under the GPL",
|
||||
"July 2003"
|
||||
};
|
||||
|
@ -126,7 +126,7 @@ colorsel_cmyk_class_init (ColorselCmykClass *klass)
|
|||
|
||||
selector_class = GIMP_COLOR_SELECTOR_CLASS (klass);
|
||||
|
||||
selector_class->name = _("_CMYK");
|
||||
selector_class->name = _("CMYK");
|
||||
selector_class->help_page = "cmyk.html";
|
||||
selector_class->stock_id = GTK_STOCK_PRINT; /* FIXME */
|
||||
selector_class->set_color = colorsel_cmyk_set_color;
|
||||
|
|
|
@ -179,7 +179,7 @@ colorsel_triangle_class_init (ColorselTriangleClass *klass)
|
|||
|
||||
object_class->finalize = colorsel_triangle_finalize;
|
||||
|
||||
selector_class->name = _("_Triangle");
|
||||
selector_class->name = _("Triangle");
|
||||
selector_class->help_page = "triangle.html";
|
||||
selector_class->stock_id = GIMP_STOCK_COLOR_TRIANGLE;
|
||||
selector_class->set_color = colorsel_triangle_set_color;
|
||||
|
|
|
@ -173,7 +173,7 @@ colorsel_water_class_init (ColorselWaterClass *klass)
|
|||
|
||||
object_class->finalize = colorsel_water_finalize;
|
||||
|
||||
selector_class->name = _("_Watercolor");
|
||||
selector_class->name = _("Watercolor");
|
||||
selector_class->help_page = "watercolor.html";
|
||||
selector_class->stock_id = GIMP_STOCK_TOOL_PAINTBRUSH;
|
||||
selector_class->set_color = colorsel_water_set_color;
|
||||
|
|
Loading…
Reference in New Issue