aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ido-menu-item.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/ido-menu-item.c b/src/ido-menu-item.c
index c2a8309..306d846 100644
--- a/src/ido-menu-item.c
+++ b/src/ido-menu-item.c
@@ -324,11 +324,22 @@ ido_menu_item_set_menu_item (IdoMenuItem *self,
{
GError *error;
- icon = g_icon_new_for_string (iconstr, &error);
- if (icon == NULL)
+ /* only indent the label if icon is set to "" */
+ if (iconstr[0] == '\0')
{
- g_warning ("unable to set icon: %s", error->message);
- g_error_free (error);
+ gint width;
+
+ gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, NULL);
+ gtk_widget_set_size_request (self->priv->icon, width, -1);
+ }
+ else
+ {
+ icon = g_icon_new_for_string (iconstr, &error);
+ if (icon == NULL)
+ {
+ g_warning ("unable to set icon: %s", error->message);
+ g_error_free (error);
+ }
}
g_free (iconstr);
}