summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-05-16 15:23:01 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-05-16 15:23:01 +0000
commit968149a9952b9be9b471dfe769ff3946773f5dad (patch)
tree98abd78f12880e7549a8912b9613b93bed50be1a
parent61fe062e42449fdc09f1e4d4beea70e339367b31 (diff)
downloadgtk+-968149a9952b9be9b471dfe769ff3946773f5dad.tar.gz
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.
-rw-r--r--ChangeLog12
-rw-r--r--ChangeLog.pre-2-1012
-rw-r--r--docs/reference/ChangeLog5
-rw-r--r--docs/reference/gtk/Makefile.am1
-rw-r--r--docs/reference/gtk/tmpl/gtkstock.sgml15
-rw-r--r--gtk/Makefile.am1
-rw-r--r--gtk/gtkpagesetupunixdialog.c65
-rw-r--r--gtk/gtkstock.c4
-rw-r--r--gtk/gtkstock.h1
-rw-r--r--gtk/stock-icons/24/gtk-orientation-reverse-portrait.pngbin0 -> 871 bytes
10 files changed, 89 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index 71512ccace..76c213521d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 71512ccace..76c213521d 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -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
diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog
index 82528ef56c..4c71597bc2 100644
--- a/docs/reference/ChangeLog
+++ b/docs/reference/ChangeLog
@@ -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
diff --git a/docs/reference/gtk/Makefile.am b/docs/reference/gtk/Makefile.am
index 62275b487e..25634b6fd0 100644
--- a/docs/reference/gtk/Makefile.am
+++ b/docs/reference/gtk/Makefile.am
@@ -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 \
diff --git a/docs/reference/gtk/tmpl/gtkstock.sgml b/docs/reference/gtk/tmpl/gtkstock.sgml
index 36ff8036a3..4bf46b73be 100644
--- a/docs/reference/gtk/tmpl/gtkstock.sgml
+++ b/docs/reference/gtk/tmpl/gtkstock.sgml
@@ -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.
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index dba3259272..77f4ada015 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -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 \
diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c
index 007618fea0..820b40c461 100644
--- a/gtk/gtkpagesetupunixdialog.c
+++ b/gtk/gtkpagesetupunixdialog.c
@@ -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 ();
diff --git a/gtk/gtkstock.c b/gtk/gtkstock.c
index 7f50d08bb5..3d8cd1d4e5 100644
--- a/gtk/gtkstock.c
+++ b/gtk/gtkstock.c
@@ -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 },
diff --git a/gtk/gtkstock.h b/gtk/gtkstock.h
index b0359f50aa..22df23ac51 100644
--- a/gtk/gtkstock.h
+++ b/gtk/gtkstock.h
@@ -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"
diff --git a/gtk/stock-icons/24/gtk-orientation-reverse-portrait.png b/gtk/stock-icons/24/gtk-orientation-reverse-portrait.png
new file mode 100644
index 0000000000..2beec10cc7
--- /dev/null
+++ b/gtk/stock-icons/24/gtk-orientation-reverse-portrait.png
Binary files differ