themes/Default/images/Makefile.am

2003-09-27  Sven Neumann  <sven@gimp.org>

	* themes/Default/images/Makefile.am
	* themes/Default/images/stock-cap-[butt|round|square]-16.png
	* themes/Default/images/stock-join-[miter|round|bevel]-16.png:
	added placeholders for GimpCapStyle and GimpJoinStyle icons.

	* libgimpwidgets/gimpstock.[ch]: register the new icons.

	* app/widgets/gimpstrokeeditor.c: made "options" a construct-only
	property of the editor and create the widgets in a constructor
	method. Use stock boxes with the new icons.

	* app/gui/stroke-dialog.c (stroke_dialog_new): let the Cancel
	button destroy the dialog instead of itself.
This commit is contained in:
Sven Neumann
2003-09-27 19:05:13 +00:00
committed by Sven Neumann
parent fb5b3834d9
commit fcb29af719
16 changed files with 242 additions and 75 deletions

View File

@ -1,3 +1,19 @@
2003-09-27 Sven Neumann <sven@gimp.org>
* themes/Default/images/Makefile.am
* themes/Default/images/stock-cap-[butt|round|square]-16.png
* themes/Default/images/stock-join-[miter|round|bevel]-16.png:
added placeholders for GimpCapStyle and GimpJoinStyle icons.
* libgimpwidgets/gimpstock.[ch]: register the new icons.
* app/widgets/gimpstrokeeditor.c: made "options" a construct-only
property of the editor and create the widgets in a constructor
method. Use stock boxes with the new icons.
* app/gui/stroke-dialog.c (stroke_dialog_new): let the Cancel
button destroy the dialog instead of itself.
2003-09-27 Simon Budig <simon@gimp.org>
* app/core/gimpdrawable-stroke.[ch]: changed the API of

View File

@ -94,7 +94,7 @@ stroke_dialog_new (GimpItem *item,
NULL, NULL, NULL, FALSE, FALSE,
GTK_STOCK_CANCEL, gtk_widget_destroy,
NULL, NULL, NULL, FALSE, TRUE,
NULL, 1, NULL, FALSE, TRUE,
GTK_STOCK_OK, stroke_dialog_ok_callback,
NULL, NULL, NULL, TRUE, FALSE,

View File

@ -94,7 +94,7 @@ stroke_dialog_new (GimpItem *item,
NULL, NULL, NULL, FALSE, FALSE,
GTK_STOCK_CANCEL, gtk_widget_destroy,
NULL, NULL, NULL, FALSE, TRUE,
NULL, 1, NULL, FALSE, TRUE,
GTK_STOCK_OK, stroke_dialog_ok_callback,
NULL, NULL, NULL, TRUE, FALSE,

View File

@ -27,7 +27,6 @@
#include "core/gimpstrokeoptions.h"
#include "gimpenummenu.h"
#include "gimppropwidgets.h"
#include "gimpstrokeeditor.h"
@ -36,10 +35,24 @@
#define SB_WIDTH 10
enum
{
PROP_0,
PROP_OPTIONS
};
static void gimp_stroke_editor_class_init (GimpStrokeEditorClass *klass);
static void gimp_stroke_editor_init (GimpStrokeEditor *editor);
static GObject * gimp_stroke_editor_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_stroke_editor_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_stroke_editor_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_stroke_editor_finalize (GObject *object);
@ -63,7 +76,7 @@ gimp_stroke_editor_get_type (void)
NULL, /* class_data */
sizeof (GimpStrokeEditor),
0, /* n_preallocs */
(GInstanceInitFunc) gimp_stroke_editor_init,
NULL /* instance_init */
};
view_type = g_type_register_static (GTK_TYPE_VBOX,
@ -81,12 +94,126 @@ gimp_stroke_editor_class_init (GimpStrokeEditorClass *klass)
parent_class = g_type_class_peek_parent (klass);
object_class->constructor = gimp_stroke_editor_constructor;
object_class->set_property = gimp_stroke_editor_set_property;
object_class->get_property = gimp_stroke_editor_get_property;
object_class->finalize = gimp_stroke_editor_finalize;
g_object_class_install_property (object_class, PROP_OPTIONS,
g_param_spec_object ("options", NULL, NULL,
GIMP_TYPE_STROKE_OPTIONS,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
}
static void
gimp_stroke_editor_init (GimpStrokeEditor *editor)
gimp_stroke_editor_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GimpStrokeEditor *editor = GIMP_STROKE_EDITOR (object);
switch (property_id)
{
case PROP_OPTIONS:
editor->options = GIMP_STROKE_OPTIONS (g_value_dup_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
gimp_stroke_editor_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
GimpStrokeEditor *editor = GIMP_STROKE_EDITOR (object);
switch (property_id)
{
case PROP_OPTIONS:
g_value_set_object (value, editor->options);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static GObject *
gimp_stroke_editor_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
{
GimpStrokeEditor *editor;
GtkWidget *table;
GtkWidget *menu;
GtkWidget *box;
GtkWidget *spinbutton;
GtkWidget *button;
GObject *object;
gint digits;
gint row = 0;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
editor = GIMP_STROKE_EDITOR (object);
g_assert (editor->options != NULL);
table = gtk_table_new (4, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
gtk_table_set_row_spacings (GTK_TABLE (table), 4);
gtk_box_pack_start (GTK_BOX (editor), table, FALSE, FALSE, 0);
gtk_widget_show (table);
digits = gimp_unit_get_digits (editor->options->width_unit);
spinbutton = gimp_prop_spin_button_new (G_OBJECT (editor->options), "width",
1.0, 10.0, digits);
gimp_table_attach_aligned (GTK_TABLE (table), 0, row,
_("Stroke _Width:"), 1.0, 0.5,
spinbutton, 1, FALSE);
menu = gimp_prop_unit_menu_new (G_OBJECT (editor->options), "width-unit",
"%a");
g_object_set_data (G_OBJECT (menu), "set_digits", spinbutton);
gtk_table_attach (GTK_TABLE (table), menu, 2, 3, row, row + 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (menu);
row++;
box = gimp_prop_enum_stock_box_new (G_OBJECT (editor->options), "cap-style",
"gimp-cap", 0, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
_("_Cap Style:"), 1.0, 0.5,
box, 2, TRUE);
box = gimp_prop_enum_stock_box_new (G_OBJECT (editor->options), "join-style",
"gimp-join", 0, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
_("_Join Style:"), 1.0, 0.5,
box, 2, TRUE);
gimp_prop_scale_entry_new (G_OBJECT (editor->options), "miter",
GTK_TABLE (table), 0, row++,
_("_Miter Limit:"),
1.0, 1.0, 1,
FALSE, 0.0, 0.0);
button = gimp_prop_check_button_new (G_OBJECT (editor->options), "antialias",
_("_Antialiasing"));
gtk_table_attach (GTK_TABLE (table), button, 0, 2, row, row + 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (button);
row++;
return object;
}
static void
@ -106,65 +233,9 @@ gimp_stroke_editor_finalize (GObject *object)
GtkWidget *
gimp_stroke_editor_new (GimpStrokeOptions *options)
{
GimpStrokeEditor *editor;
GtkWidget *table;
GtkWidget *menu;
GtkWidget *spinbutton;
GtkWidget *button;
gint digits;
gint row = 0;
g_return_val_if_fail (GIMP_IS_STROKE_OPTIONS (options), NULL);
editor = g_object_new (GIMP_TYPE_STROKE_EDITOR, NULL);
editor->options = options;
g_object_ref (options);
table = gtk_table_new (4, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_box_pack_start (GTK_BOX (editor), table, FALSE, FALSE, 0);
gtk_widget_show (table);
digits = gimp_unit_get_digits (options->width_unit);
spinbutton = gimp_prop_spin_button_new (G_OBJECT (options), "width",
1.0, 10.0, digits);
gimp_table_attach_aligned (GTK_TABLE (table), 0, row,
_("Stroke _Width:"), 1.0, 0.5,
spinbutton, 1, FALSE);
menu = gimp_prop_unit_menu_new (G_OBJECT (options), "width-unit", "%a");
g_object_set_data (G_OBJECT (menu), "set_digits", spinbutton);
gtk_table_attach (GTK_TABLE (table), menu, 2, 3, row, row + 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (menu);
row++;
menu = gimp_prop_enum_option_menu_new (G_OBJECT (options), "cap-style",
0, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
_("_Cap Style:"), 1.0, 0.5,
menu, 2, TRUE);
menu = gimp_prop_enum_option_menu_new (G_OBJECT (options), "join-style",
0, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
_("_Join Style:"), 1.0, 0.5,
menu, 2, TRUE);
gimp_prop_scale_entry_new (G_OBJECT (options), "miter",
GTK_TABLE (table), 0, row++,
_("_Miter Limit:"),
1.0, 1.0, 1,
FALSE, 0.0, 0.0);
button = gimp_prop_check_button_new (G_OBJECT (options), "antialias",
_("Antialiasing"));
gtk_table_attach (GTK_TABLE (table), button, 0, 2, row, row + 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (button);
row++;
return GTK_WIDGET (editor);
return GTK_WIDGET (g_object_new (GIMP_TYPE_STROKE_EDITOR,
"options", options,
NULL));
}

View File

@ -1,3 +1,8 @@
2003-09-27 Sven Neumann <sven@gimp.org>
* libgimpwidgets/libgimpwidgets-sections.txt
* libgimpwidgets/tmpl/gimpstock.sgml: added new icons.
2003-09-24 Sven Neumann <sven@gimp.org>
* app/Makefile.am

View File

@ -1,4 +1,4 @@
<SECTION>
2<SECTION>
<FILE>gimpchainbutton</FILE>
<TITLE>GimpChainButton</TITLE>
GimpChainButton
@ -317,6 +317,12 @@ GIMP_STOCK_LAYERS
GIMP_STOCK_CHANNELS
GIMP_STOCK_PATHS
GIMP_STOCK_INDEXED_PALETTE
GIMP_STOCK_CAP_BUTT
GIMP_STOCK_CAP_ROUND
GIMP_STOCK_CAP_SQUARE
GIMP_STOCK_JOIN_MITER
GIMP_STOCK_JOIN_ROUND
GIMP_STOCK_JOIN_BEVEL
GIMP_STOCK_SELECTION
GIMP_STOCK_SELECTION_ALL
GIMP_STOCK_SELECTION_NONE

View File

@ -415,6 +415,48 @@ the ones in dialog size).
<!-- ##### MACRO GIMP_STOCK_CAP_BUTT ##### -->
<para>
<inlinegraphic fileref="stock-cap-butt-16.png" format="png"></inlinegraphic>
</para>
<!-- ##### MACRO GIMP_STOCK_CAP_ROUND ##### -->
<para>
<inlinegraphic fileref="stock-cap-round-16.png" format="png"></inlinegraphic>
</para>
<!-- ##### MACRO GIMP_STOCK_CAP_SQUARE ##### -->
<para>
<inlinegraphic fileref="stock-cap-square-16.png" format="png"></inlinegraphic>
</para>
<!-- ##### MACRO GIMP_STOCK_JOIN_MITER ##### -->
<para>
<inlinegraphic fileref="stock-join-miter-16.png" format="png"></inlinegraphic>
</para>
<!-- ##### MACRO GIMP_STOCK_JOIN_ROUND ##### -->
<para>
<inlinegraphic fileref="stock-join-round-16.png" format="png"></inlinegraphic>
</para>
<!-- ##### MACRO GIMP_STOCK_JOIN_BEVEL ##### -->
<para>
<inlinegraphic fileref="stock-join-bevel-16.png" format="png"></inlinegraphic>
</para>
<!-- ##### MACRO GIMP_STOCK_SELECTION ##### -->
<para>
<inlinegraphic fileref="stock-selection-16.png" format="png"></inlinegraphic>

View File

@ -229,6 +229,13 @@ static GtkStockItem gimp_stock_items[] =
{ GIMP_STOCK_WEB, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_VIDEO, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CAP_BUTT, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CAP_ROUND, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_CAP_SQUARE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_JOIN_MITER, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_JOIN_ROUND, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_JOIN_BEVEL, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_ERROR, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_INFO, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_QUESTION, NULL, 0, 0, LIBGIMP_DOMAIN },
@ -523,7 +530,14 @@ gimp_stock_menu_pixbufs[] =
{ GIMP_STOCK_WILBER, stock_wilber_16 },
{ GIMP_TOILET_PAPER, stock_toilet_paper_16 },
{ GIMP_STOCK_WEB, stock_web_16 },
{ GIMP_STOCK_VIDEO, stock_video_16 }
{ GIMP_STOCK_VIDEO, stock_video_16 },
{ GIMP_STOCK_CAP_BUTT, stock_cap_butt_16 },
{ GIMP_STOCK_CAP_ROUND, stock_cap_round_16 },
{ GIMP_STOCK_CAP_SQUARE, stock_cap_square_16 },
{ GIMP_STOCK_JOIN_MITER, stock_join_miter_16 },
{ GIMP_STOCK_JOIN_ROUND, stock_join_round_16 },
{ GIMP_STOCK_JOIN_BEVEL, stock_join_bevel_16 }
};
static struct

View File

@ -197,6 +197,13 @@ G_BEGIN_DECLS
#define GIMP_STOCK_WEB "gimp-web"
#define GIMP_STOCK_VIDEO "gimp-video"
#define GIMP_STOCK_CAP_BUTT "gimp-cap-butt"
#define GIMP_STOCK_CAP_ROUND "gimp-cap-round"
#define GIMP_STOCK_CAP_SQUARE "gimp-cap-square"
#define GIMP_STOCK_JOIN_MITER "gimp-join-miter"
#define GIMP_STOCK_JOIN_ROUND "gimp-join-round"
#define GIMP_STOCK_JOIN_BEVEL "gimp-join-bevel"
/* in dialog size: */
#define GIMP_STOCK_ERROR "gimp-error"

View File

@ -23,6 +23,9 @@ WILBER_VARIABLES = \
## Below are compiled in stock icons
STOCK_MENU_IMAGES = \
stock-cap-butt-16.png \
stock-cap-round-16.png \
stock-cap-square-16.png \
stock-channel-16.png \
stock-channel-alpha-16.png \
stock-channel-blue-16.png \
@ -57,6 +60,9 @@ STOCK_MENU_IMAGES = \
stock-info-16.png \
stock-indexed-palette-16.png \
stock-invert-16.png \
stock-join-bevel-16.png \
stock-join-miter-16.png \
stock-join-round-16.png \
stock-landscape-16.png \
stock-layer-16.png \
stock-layer-to-imagesize-16.png \

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B