[evolution/wip/webkit-composer] EActionComboBox: Render pixbuf even when action doesn't have an icon
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit-composer] EActionComboBox: Render pixbuf even when action doesn't have an icon
- Date: Fri, 7 Mar 2014 12:33:29 +0000 (UTC)
commit 7d6c4687d4c699a960f7874ddfe0e9a9f0366036
Author: Tomas Popela <tpopela redhat com>
Date: Fri Mar 7 13:27:55 2014 +0100
EActionComboBox: Render pixbuf even when action doesn't have an icon
Previously when action have to be disabled (i.e. Header 1 block format
in plain text composer mode) EActionComboBox left the pixbuf unchanged,
just rendering action text as insensitive. So the action looked insensitive,
but still was sensitive thus the previously mentioned example could be triggered
in plain text composer mode.
e-util/e-action-combo-box.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/e-util/e-action-combo-box.c b/e-util/e-action-combo-box.c
index 14731a7..9967124 100644
--- a/e-util/e-action-combo-box.c
+++ b/e-util/e-action-combo-box.c
@@ -103,10 +103,6 @@ action_combo_box_render_pixbuf (GtkCellLayout *layout,
gboolean visible;
gint width;
- /* Do any of the actions have an icon? */
- if (!combo_box->priv->group_has_icons)
- return;
-
gtk_tree_model_get (model, iter, COLUMN_ACTION, &action, -1);
/* A NULL action means the row is a separator. */
@@ -121,8 +117,12 @@ action_combo_box_render_pixbuf (GtkCellLayout *layout,
"visible", &visible,
NULL);
- /* Keep the pixbuf renderer a fixed size for proper alignment. */
- gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, NULL);
+ /* If some action has an icon */
+ if (combo_box->priv->group_has_icons)
+ /* Keep the pixbuf renderer a fixed size for proper alignment. */
+ gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, NULL);
+ else
+ width = 0;
/* We can't set both "icon-name" and "stock-id" because setting
* one unsets the other. So pick the one that has a non-NULL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]