aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/ChangeLog7
-rw-r--r--e-util/e-popup.c6
2 files changed, 13 insertions, 0 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 367105882e..d44416e18e 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,10 @@
+2007-11-13 Ondrej Jirman <megous@megous.com>
+
+ ** Fix for bug #494320
+
+ * e-popup.c: (e_popup_create_menu): Add support for redefining
+ existing menu items.
+
2007-11-05 Milan Crha <mcrha@redhat.com>
** Fix for bug #492692
diff --git a/e-util/e-popup.c b/e-util/e-popup.c
index ce723a2368..c607b9045c 100644
--- a/e-util/e-popup.c
+++ b/e-util/e-popup.c
@@ -507,9 +507,15 @@ e_popup_create_menu(EPopup *emp, EPopupTarget *target, guint32 mask)
/* create tree structure */
for (i=0;i<items->len;i++) {
struct _item_node *inode = items->pdata[i], *pnode;
+ struct _item_node *nextnode = (i + 1 < items->len) ? items->pdata[i+1] : NULL;
struct _EPopupItem *item = inode->item;
const char *tmp;
+ if (nextnode && !strcmp (nextnode->item->path, item->path)) {
+ d(printf ("skipping item %s\n", item->path));
+ continue;
+ }
+
g_string_truncate(ppath, 0);
tmp = strrchr(item->path, '/');
if (tmp) {