Add labels for page orientations, also add the fourth one. (#339589)

2006-05-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkpagesetupunixdialog.c (populate_dialog): Add labels
	for page orientations, also add the fourth one.  (#339589)

	* gtk/stock-icons/24/gtk-orientation-reverse-portrait.png: New
	icon.

	* gtk/Makefile.am: Add it here.

	* gtk/gtkstock.[hc]: Add stock items for the page orientations.
This commit is contained in:
Matthias Clasen 2006-05-16 15:23:01 +00:00 committed by Matthias Clasen
parent 61fe062e42
commit 968149a995
10 changed files with 89 additions and 27 deletions

View File

@ -1,3 +1,15 @@
2006-05-16 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkpagesetupunixdialog.c (populate_dialog): Add labels
for page orientations, also add the fourth one. (#339589)
* gtk/stock-icons/24/gtk-orientation-reverse-portrait.png: New
icon.
* gtk/Makefile.am: Add it here.
* gtk/gtkstock.[hc]: Add stock items for the page orientations.
2006-05-16 Michael Natterer <mitch@imendio.com>
* gtk/gtktoolbar.c: added "max-child-expand" style property which

View File

@ -1,3 +1,15 @@
2006-05-16 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkpagesetupunixdialog.c (populate_dialog): Add labels
for page orientations, also add the fourth one. (#339589)
* gtk/stock-icons/24/gtk-orientation-reverse-portrait.png: New
icon.
* gtk/Makefile.am: Add it here.
* gtk/gtkstock.[hc]: Add stock items for the page orientations.
2006-05-16 Michael Natterer <mitch@imendio.com>
* gtk/gtktoolbar.c: added "max-child-expand" style property which

View File

@ -1,3 +1,8 @@
2006-05-16 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkstock.sgml:
* gtk/Makefile.am: Add fourth stock orientation.
2006-05-15 Matthias Clasen <mclasen@redhat.com>
* gtk/tree_widget.sgml: Fix up example rendering. (#341855, Guillaume

View File

@ -215,6 +215,7 @@ HTML_IMAGES = \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-landscape.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-portrait.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-reverse-landscape.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-reverse-portrait.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-paste.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-preferences.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-print.png \

View File

@ -678,7 +678,7 @@ The "Open" item.
<!-- ##### MACRO GTK_STOCK_ORIENTATION_LANDSCAPE ##### -->
<para>
The "Landscape Orientation" icon.
The "Landscape Orientation" item.
<inlinegraphic fileref="gtk-orientation-landscape.png" format="PNG"></inlinegraphic>
</para>
@ -687,7 +687,7 @@ The "Landscape Orientation" icon.
<!-- ##### MACRO GTK_STOCK_ORIENTATION_PORTRAIT ##### -->
<para>
The "Portrait Orientation" icon.
The "Portrait Orientation" item.
<inlinegraphic fileref="gtk-orientation-portrait.png" format="PNG"></inlinegraphic>
</para>
@ -696,13 +696,22 @@ The "Portrait Orientation" icon.
<!-- ##### MACRO GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE ##### -->
<para>
The "Reverse Landscape Orientation" icon.
The "Reverse Landscape Orientation" item.
<inlinegraphic fileref="gtk-orientation-reverse-landscape.png" format="PNG"></inlinegraphic>
</para>
@Since: 2.10
<!-- ##### MACRO GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT ##### -->
<para>
The "Reverse Portrait Orientation" item.
<inlinegraphic fileref="gtk-orientation-reverse-portrait.png" format="PNG"></inlinegraphic>
</para>
@Since: 2.10
<!-- ##### MACRO GTK_STOCK_PASTE ##### -->
<para>
The "Paste" item.

View File

@ -994,6 +994,7 @@ STOCK_ICONS = \
stock-icons/24/gtk-open.png \
stock-icons/24/gtk-orientation-reverse-landscape.png \
stock-icons/24/gtk-orientation-landscape.png \
stock-icons/24/gtk-orientation-reverse-portrait.png \
stock-icons/24/gtk-orientation-portrait.png \
stock-icons/24/gtk-paste.png \
stock-icons/24/gtk-preferences.png \

View File

@ -991,12 +991,33 @@ page_name_func (GtkCellLayout *cell_layout,
}
static GtkWidget *
create_radio_button (GSList *group,
const gchar *stock_id)
{
GtkWidget *radio_button, *image, *label, *hbox;
GtkStockItem item;
radio_button = gtk_radio_button_new (group);
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_LARGE_TOOLBAR);
gtk_stock_lookup (stock_id, &item);
label = gtk_label_new (item.label);
hbox = gtk_hbox_new (0, 6);
gtk_container_add (GTK_CONTAINER (radio_button), hbox);
gtk_container_add (GTK_CONTAINER (hbox), image);
gtk_container_add (GTK_CONTAINER (hbox), label);
gtk_widget_show_all (radio_button);
return radio_button;
}
static void
populate_dialog (GtkPageSetupUnixDialog *ps_dialog)
{
GtkPageSetupUnixDialogPrivate *priv = ps_dialog->priv;
GtkDialog *dialog = GTK_DIALOG (ps_dialog);
GtkWidget *table, *label, *combo, *radio_button, *ebox, *image;
GtkWidget *table, *label, *combo, *radio_button, *ebox;
GtkCellRenderer *cell;
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
@ -1007,7 +1028,7 @@ populate_dialog (GtkPageSetupUnixDialog *ps_dialog)
gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5);
gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6);
table = gtk_table_new (4, 4, FALSE);
table = gtk_table_new (5, 4, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacings (GTK_TABLE (table), 12);
gtk_container_set_border_width (GTK_CONTAINER (table), 5);
@ -1077,41 +1098,37 @@ populate_dialog (GtkPageSetupUnixDialog *ps_dialog)
GTK_FILL, 0, 0, 0);
gtk_widget_show (label);
radio_button = gtk_radio_button_new (NULL);
image = gtk_image_new_from_stock (GTK_STOCK_ORIENTATION_PORTRAIT,
GTK_ICON_SIZE_LARGE_TOOLBAR);
gtk_widget_show (image);
gtk_container_add (GTK_CONTAINER (radio_button), image);
radio_button = create_radio_button (NULL, GTK_STOCK_ORIENTATION_PORTRAIT);
priv->portrait_radio = radio_button;
gtk_table_attach (GTK_TABLE (table), radio_button,
1, 2, 3, 4,
0, 0, 0, 0);
gtk_widget_show (radio_button);
GTK_EXPAND|GTK_FILL, 0, 0, 0);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), radio_button);
radio_button = gtk_radio_button_new (gtk_radio_button_get_group (GTK_RADIO_BUTTON(radio_button)));
image = gtk_image_new_from_stock (GTK_STOCK_ORIENTATION_LANDSCAPE,
GTK_ICON_SIZE_LARGE_TOOLBAR);
gtk_widget_show (image);
gtk_container_add (GTK_CONTAINER (radio_button), image);
priv->landscape_radio = radio_button;
radio_button = create_radio_button (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_button)),
GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT);
priv->reverse_landscape_radio = radio_button;
gtk_table_attach (GTK_TABLE (table), radio_button,
2, 3, 3, 4,
0, 0, 0, 0);
GTK_EXPAND|GTK_FILL, 0, 0, 0);
radio_button = create_radio_button (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_button)),
GTK_STOCK_ORIENTATION_LANDSCAPE);
priv->landscape_radio = radio_button;
gtk_table_attach (GTK_TABLE (table), radio_button,
1, 2, 4, 5,
GTK_EXPAND|GTK_FILL, 0, 0, 0);
gtk_widget_show (radio_button);
gtk_table_set_row_spacing (GTK_TABLE (table), 3, 0);
radio_button = gtk_radio_button_new (gtk_radio_button_get_group (GTK_RADIO_BUTTON(radio_button)));
image = gtk_image_new_from_stock (GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE,
GTK_ICON_SIZE_LARGE_TOOLBAR);
gtk_widget_show (image);
gtk_container_add (GTK_CONTAINER (radio_button), image);
radio_button = create_radio_button (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_button)),
GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE);
priv->reverse_landscape_radio = radio_button;
gtk_table_attach (GTK_TABLE (table), radio_button,
3, 4, 3, 4,
0, 0, 0, 0);
gtk_widget_show (radio_button);
2, 3, 4, 5,
GTK_EXPAND|GTK_FILL, 0, 0, 0);
priv->tooltips = gtk_tooltips_new ();

View File

@ -389,6 +389,10 @@ static const GtkStockItem builtin_items [] =
{ GTK_STOCK_NO, N_("_No"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_OK, N_("_OK"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_OPEN, N_("_Open"), GDK_CONTROL_MASK, 'o', GETTEXT_PACKAGE },
{ GTK_STOCK_ORIENTATION_LANDSCAPE, N_("Landscape"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_ORIENTATION_PORTRAIT, N_("Portrait"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE, N_("Reverse landscape"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT, N_("Reverse portrait"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_PASTE, N_("_Paste"), GDK_CONTROL_MASK, 'v', GETTEXT_PACKAGE },
{ GTK_STOCK_PREFERENCES, N_("_Preferences"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_PRINT, N_("_Print"), 0, 0, GETTEXT_PACKAGE },

View File

@ -137,6 +137,7 @@ void gtk_stock_set_translate_func (const gchar *domain,
#define GTK_STOCK_ORIENTATION_PORTRAIT "gtk-orientation-portrait"
#define GTK_STOCK_ORIENTATION_LANDSCAPE "gtk-orientation-landscape"
#define GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE "gtk-orientation-reverse-landscape"
#define GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT "gtk-orientation-reverse-portrait"
#define GTK_STOCK_PASTE "gtk-paste"
#define GTK_STOCK_PREFERENCES "gtk-preferences"
#define GTK_STOCK_PRINT "gtk-print"

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B