Add orientation stock icons.

2006-03-27  Alexander Larsson  <alexl@redhat.com>

	* gtk/Makefile.am:
	* gtk/stock-icons/24/gtk-orientation-landscape.png:
	* gtk/stock-icons/24/gtk-orientation-portrait.png:
	* gtk/stock-icons/24/gtk-orientation-reverse-landscape.png:
	* gtk/gtkiconfactory.c: (get_default_icons):
	* gtk/gtkstock.h:
	Add orientation stock icons.

	* gtk/gtkpagesetupunixdialog.c:
	Use the orientation icons.
This commit is contained in:
Alexander Larsson
2006-03-27 15:12:12 +00:00
committed by Alexander Larsson
parent 9cb581126d
commit 5cc025ae78
9 changed files with 60 additions and 28 deletions

View File

@@ -1,3 +1,16 @@
2006-03-27 Alexander Larsson <alexl@redhat.com>
* gtk/Makefile.am:
* gtk/stock-icons/24/gtk-orientation-landscape.png:
* gtk/stock-icons/24/gtk-orientation-portrait.png:
* gtk/stock-icons/24/gtk-orientation-reverse-landscape.png:
* gtk/gtkiconfactory.c: (get_default_icons):
* gtk/gtkstock.h:
Add orientation stock icons.
* gtk/gtkpagesetupunixdialog.c:
Use the orientation icons.
2006-03-27 Alexander Larsson <alexl@redhat.com>
* gtk/gtkpagesetupunixdialog.c:

View File

@@ -1,3 +1,16 @@
2006-03-27 Alexander Larsson <alexl@redhat.com>
* gtk/Makefile.am:
* gtk/stock-icons/24/gtk-orientation-landscape.png:
* gtk/stock-icons/24/gtk-orientation-portrait.png:
* gtk/stock-icons/24/gtk-orientation-reverse-landscape.png:
* gtk/gtkiconfactory.c: (get_default_icons):
* gtk/gtkstock.h:
Add orientation stock icons.
* gtk/gtkpagesetupunixdialog.c:
Use the orientation icons.
2006-03-27 Alexander Larsson <alexl@redhat.com>
* gtk/gtkpagesetupunixdialog.c:

View File

@@ -960,6 +960,9 @@ STOCK_ICONS = \
stock-icons/24/gtk-network.png \
stock-icons/24/gtk-new.png \
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-portrait.png \
stock-icons/24/gtk-paste.png \
stock-icons/24/gtk-preferences.png \
stock-icons/24/gtk-print.png \

View File

@@ -450,6 +450,9 @@ get_default_icons (GtkIconFactory *factory)
register_stock_icon (factory, GTK_STOCK_NETWORK);
register_stock_icon (factory, GTK_STOCK_NEW);
register_stock_icon (factory, GTK_STOCK_OPEN);
register_stock_icon (factory, GTK_STOCK_ORIENTATION_PORTRAIT);
register_stock_icon (factory, GTK_STOCK_ORIENTATION_LANDSCAPE);
register_stock_icon (factory, GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE);
register_stock_icon (factory, GTK_STOCK_PASTE);
register_stock_icon (factory, GTK_STOCK_PREFERENCES);
register_stock_icon (factory, GTK_STOCK_PRINT);

View File

@@ -76,7 +76,6 @@ struct GtkPageSetupUnixDialogPrivate
GtkWidget *portrait_radio;
GtkWidget *landscape_radio;
GtkWidget *reverse_portrait_radio;
GtkWidget *reverse_landscape_radio;
guint request_details_tag;
@@ -956,14 +955,14 @@ static void
populate_dialog (GtkPageSetupUnixDialog *dialog)
{
GtkPageSetupUnixDialogPrivate *priv;
GtkWidget *table, *label, *combo, *radio_button, *ebox;
GtkWidget *table, *label, *combo, *radio_button, *ebox, *image;
GtkCellRenderer *cell;
g_return_if_fail (GTK_IS_PAGE_SETUP_UNIX_DIALOG (dialog));
priv = dialog->priv;
table = gtk_table_new (3, 5, FALSE);
table = gtk_table_new (4, 4, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
table, TRUE, TRUE, 6);
@@ -985,7 +984,7 @@ populate_dialog (GtkPageSetupUnixDialog *dialog)
NULL);
gtk_table_attach (GTK_TABLE (table), combo,
1, 3, 0, 1,
1, 4, 0, 1,
GTK_FILL | GTK_EXPAND, 0, 0, 0);
gtk_widget_show (combo);
@@ -1006,7 +1005,7 @@ populate_dialog (GtkPageSetupUnixDialog *dialog)
page_name_func, NULL, NULL);
gtk_table_attach (GTK_TABLE (table), combo,
1, 3, 1, 2,
1, 4, 1, 2,
GTK_FILL | GTK_EXPAND, 0, 0, 0);
gtk_widget_show (combo);
@@ -1016,7 +1015,7 @@ populate_dialog (GtkPageSetupUnixDialog *dialog)
dialog->priv->paper_size_eventbox = ebox;
gtk_event_box_set_visible_window (GTK_EVENT_BOX (ebox), FALSE);
gtk_table_attach (GTK_TABLE (table), ebox,
1, 3, 2, 3,
1, 4, 2, 3,
GTK_FILL, 0, 0, 0);
gtk_widget_show (ebox);
@@ -1033,37 +1032,39 @@ populate_dialog (GtkPageSetupUnixDialog *dialog)
GTK_FILL, 0, 0, 0);
gtk_widget_show (label);
radio_button = gtk_radio_button_new_with_label (NULL, "port");
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);
dialog->priv->portrait_radio = radio_button;
gtk_table_attach (GTK_TABLE (table), radio_button,
1, 2, 3, 4,
GTK_FILL, 0, 0, 0);
0, 0, 0, 0);
gtk_widget_show (radio_button);
radio_button = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON(radio_button)),
"land");
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);
dialog->priv->landscape_radio = radio_button;
gtk_table_attach (GTK_TABLE (table), radio_button,
2, 3, 3, 4,
GTK_FILL, 0, 0, 0);
0, 0, 0, 0);
gtk_widget_show (radio_button);
gtk_table_set_row_spacing (GTK_TABLE (table), 3, 0);
radio_button = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON(radio_button)),
"rport");
dialog->priv->reverse_portrait_radio = radio_button;
gtk_table_attach (GTK_TABLE (table), radio_button,
1, 2, 4, 5,
GTK_FILL, 0, 0, 0);
gtk_widget_show (radio_button);
radio_button = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON(radio_button)),
"rland");
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);
dialog->priv->reverse_landscape_radio = radio_button;
gtk_table_attach (GTK_TABLE (table), radio_button,
2, 3, 4, 5,
GTK_FILL, 0, 0, 0);
3, 4, 3, 4,
0, 0, 0, 0);
gtk_widget_show (radio_button);
dialog->priv->tooltips = gtk_tooltips_new ();
@@ -1107,8 +1108,6 @@ get_orientation (GtkPageSetupUnixDialog *dialog)
return GTK_PAGE_ORIENTATION_PORTRAIT;
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->priv->landscape_radio)))
return GTK_PAGE_ORIENTATION_LANDSCAPE;
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->priv->reverse_portrait_radio)))
return GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT;
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->priv->reverse_landscape_radio)))
return GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE;
return GTK_PAGE_ORIENTATION_PORTRAIT;
@@ -1119,15 +1118,13 @@ set_orientation (GtkPageSetupUnixDialog *dialog, GtkPageOrientation orientation)
{
switch (orientation)
{
case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT:
case GTK_PAGE_ORIENTATION_PORTRAIT:
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->portrait_radio), TRUE);
break;
case GTK_PAGE_ORIENTATION_LANDSCAPE:
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->landscape_radio), TRUE);
break;
case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT:
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->reverse_portrait_radio), TRUE);
break;
case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE:
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->reverse_landscape_radio), TRUE);
break;

View File

@@ -134,6 +134,9 @@ void gtk_stock_set_translate_func (const gchar *domain,
#define GTK_STOCK_NO "gtk-no"
#define GTK_STOCK_OK "gtk-ok"
#define GTK_STOCK_OPEN "gtk-open"
#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_PASTE "gtk-paste"
#define GTK_STOCK_PREFERENCES "gtk-preferences"
#define GTK_STOCK_PRINT "gtk-print"

Binary file not shown.

After

Width:  |  Height:  |  Size: 864 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B