[gnumeric] CellFormat: fix background patterns.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] CellFormat: fix background patterns.
- Date: Sat, 27 Dec 2014 03:33:34 +0000 (UTC)
commit cfab8b3a3960dfeef55e9fdb2ce721adf47d2adf
Author: Morten Welinder <terra gnome org>
Date: Fri Dec 26 22:33:08 2014 -0500
CellFormat: fix background patterns.
src/dialogs/dialog-cell-format.c | 12 ++++++++----
src/wbc-gtk-actions.c | 6 +++---
2 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/src/dialogs/dialog-cell-format.c b/src/dialogs/dialog-cell-format.c
index 1f9e3aa..9c2db31 100644
--- a/src/dialogs/dialog-cell-format.c
+++ b/src/dialogs/dialog-cell-format.c
@@ -304,7 +304,8 @@ setup_pattern_button (GdkScreen *screen,
GtkBuilder *gui,
char const *const name,
PatternPicker *picker,
- gboolean const do_icon,
+ gboolean do_image,
+ gboolean from_icon,
int const index,
int const select_index,
unsigned size)
@@ -312,9 +313,11 @@ setup_pattern_button (GdkScreen *screen,
GtkWidget *tmp = go_gtk_builder_get_widget (gui, name);
if (tmp != NULL) {
GtkButton *button = GTK_BUTTON (tmp);
- if (do_icon) {
+ if (do_image) {
char *res = g_strconcat ("/org/gnumeric/gnumeric/images/", name, ".xpm", NULL);
- GtkWidget *image = gtk_image_new_from_resource (res);
+ GtkWidget *image = from_icon
+ ? gtk_image_new_from_icon_name (name, GTK_ICON_SIZE_DIALOG)
+ : gtk_image_new_from_resource (res);
g_free (res);
gtk_widget_show (image);
gtk_container_add (GTK_CONTAINER (tmp), image);
@@ -2342,6 +2345,7 @@ fmt_dialog_impl (FormatState *state, FormatDialogPosition_t pageno, gint pages)
setup_pattern_button (gtk_widget_get_screen (GTK_WIDGET (state->dialog)),
state->gui, name, &state->border.pattern,
i != 0, /* No image for None */
+ FALSE,
line_pattern_buttons[i].pattern,
default_border_style, 54);
@@ -2391,7 +2395,7 @@ fmt_dialog_impl (FormatState *state, FormatDialogPosition_t pageno, gint pages)
for (i = 0; (name = pattern_buttons[i]) != NULL; ++i)
setup_pattern_button (gtk_widget_get_screen (GTK_WIDGET (state->dialog)),
state->gui, name,
- &state->back.pattern, TRUE,
+ &state->back.pattern, TRUE, TRUE,
i+1, /* Pattern #s start at 1 */
selected, 16);
diff --git a/src/wbc-gtk-actions.c b/src/wbc-gtk-actions.c
index 87a3955..bd95d2d 100644
--- a/src/wbc-gtk-actions.c
+++ b/src/wbc-gtk-actions.c
@@ -2230,12 +2230,12 @@ static GtkActionEntry const actions[] = {
NULL, N_("Go to the last data cell"),
G_CALLBACK (cb_edit_goto_last) },
{ "EditGoto", "go-jump", N_("_Go to Cell..."),
- "<control>G", N_("Jump to a specified cell"),
+ "<control>g", N_("Jump to a specified cell"),
G_CALLBACK (cb_edit_goto) },
- /* Tis is a navigational aid that is not supposed to appear */
+ /* This is a navigational aid that is not supposed to appear */
/* in the menu */
{ "EditGotoCellIndicator", NULL, "Go to Current Cell Indicator",
- "<shift><control>G", "Go to Current Cell Indicator",
+ "<shift><control>g", "Go to Current Cell Indicator",
G_CALLBACK (cb_edit_goto_cell_indicator) },
/* Edit */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]