After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 587011 - Integrate remove-duplicates into evolution
Integrate remove-duplicates into evolution
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Plugins
2.30.x (obsolete)
Other Linux
: Normal minor
: ---
Assigned To: evolution-plugin-maintainers
Evolution QA team
evolution[kill-bonobo]
: 253244 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-06-26 03:10 UTC by Ritesh Khadgaray ( irc:ritz)
Modified: 2011-02-12 02:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed rd 0.0.4 patch (3.55 KB, patch)
2009-08-31 19:03 UTC, Milan Crha
none Details | Review
proposed evo patch (550 bytes, patch)
2009-08-31 19:11 UTC, Milan Crha
committed Details | Review
patch (784 bytes, patch)
2009-09-08 17:12 UTC, Ritesh Khadgaray ( irc:ritz)
none Details | Review
patch (459 bytes, patch)
2009-09-08 17:45 UTC, Ritesh Khadgaray ( irc:ritz)
none Details | Review
patch (5.52 KB, patch)
2009-10-21 14:13 UTC, Ritesh Khadgaray ( irc:ritz)
none Details | Review
minor changes to Ritesh's patch to build against 2010-01-07 HEAD (5.95 KB, patch)
2010-01-07 21:08 UTC, Reid Thompson
none Details | Review
evo patch (final) (6.74 KB, patch)
2010-10-15 07:37 UTC, Milan Crha
committed Details | Review

Description Ritesh Khadgaray ( irc:ritz) 2009-06-26 03:10:50 UTC
Hi

  Unable to build remove-duplicates plugin. Seems em-popup.h is not installed. 


ref:
http://kojipkgs.fedoraproject.org/packages/evolution-remove-duplicates/
Comment 1 Matthew Barnes 2009-06-26 03:30:01 UTC
I don't imagine it would.  EMPopup is being eliminated.
Comment 2 Milan Crha 2009-08-31 19:03:55 UTC
Created attachment 142154 [details] [review]
proposed rd 0.0.4 patch

for remove-duplicates.0.0.4;

These are changes for

http://www.gnome.org/~carlosg/stuff/evolution/remove-duplicates-plugin-0.0.4.tar.gz

those should be included in the remove-duplicates sources designed for 2.29.

The evo side hack follows.
Comment 3 Milan Crha 2009-08-31 19:11:36 UTC
Created attachment 142156 [details] [review]
proposed evo patch

for evolution;

To let evolution-plugin.pc require necessary libraries by default. I added those I faced here.
Comment 4 Ritesh Khadgaray ( irc:ritz) 2009-09-08 10:51:34 UTC
User still needs to select all the messages in a folder, before he right clicks on folder and selects "Remove duplicates" for the plugin to work, as it should.
Comment 5 Milan Crha 2009-09-08 12:08:17 UTC
(In reply to comment #4)
> User still needs to select all the messages in a folder, before he right clicks
> on folder and selects "Remove duplicates" for the plugin to work, as it should.

I think I do not understand. The change only added proper code for the UI, otherwise I thought it works just like before, isn't it?
Comment 6 Ritesh Khadgaray ( irc:ritz) 2009-09-08 16:00:28 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > User still needs to select all the messages in a folder, before he right clicks
> > on folder and selects "Remove duplicates" for the plugin to work, as it should.
> 
> I think I do not understand. The change only added proper code for the UI,
> otherwise I thought it works just like before, isn't it?

It works as earlier. The plugin required user to select the messages in question, and run the required action on them. As the pop-up has been moved to folder action, rather than "many messages selection" user would manually need to select the messages he/she wishes to run the action against before he/she right clicks on folder to select "remove duplicate"
Comment 7 Milan Crha 2009-09-08 16:30:17 UTC
oh. I think I was told before by someone else that the option is on a different place. I thought from a code that the menu item was above the folder, not above the selection. Thus alittle change of .eplugin should be done, to navigate to a proper place.
Comment 8 Ritesh Khadgaray ( irc:ritz) 2009-09-08 16:35:00 UTC
rrom 

static void
action_mail_remove_duplicates_cb (GtkAction *action, EShellView *shell_view)
{
        ...
        message_list = e_mail_reader_get_message_list (reader);
        selected = message_list_get_selected (message_list);
        ...

We would need to select ( all ? ) the messages in the folder in question.
Comment 9 Ritesh Khadgaray ( irc:ritz) 2009-09-08 17:12:00 UTC
Created attachment 142712 [details] [review]
patch

Additional patch to fix the above issue. This will select all the messages in the folder, run remove_duplicate, and unselect them.
Comment 10 Milan Crha 2009-09-08 17:20:42 UTC
I thought it's desired to do it only on actually selected messages, not on all messages. But maybe users will like this approach too. Though, why selecting and unselecting? Just use messages shown in message-list, not selected in messages-list. (I didn't look whether such function is there, but there should be for sure.)
Comment 11 Ritesh Khadgaray ( irc:ritz) 2009-09-08 17:37:35 UTC
makes sense(In reply to comment #10)
> I thought it's desired to do it only on actually selected messages, not on all
> messages. But maybe users will like this approach too. Though, why selecting
to me, remove_dups as a menu option for folder makes sense. With all tools I have seen/worked with which provide similar functionality, work at folder level, rather than with selected messages in a folder.

> and unselecting? Just use messages shown in message-list, not selected in
> messages-list. (I didn't look whether such function is there, but there should
> be for sure.)
makes sense.
Comment 12 Ritesh Khadgaray ( irc:ritz) 2009-09-08 17:45:20 UTC
Created attachment 142713 [details] [review]
patch

thanks for the input, Indeed, we have message_list_get_uids .
Comment 13 Milan Crha 2009-09-09 08:24:43 UTC
Heh, the patch is created in the opposite direction, but yes, the function can be used.
Comment 14 Milan Crha 2009-09-17 17:42:09 UTC
Comment on attachment 142156 [details] [review]
proposed evo patch

Created commit ac7b41f in evo master (2.29.1+)

because it's blocking build of evolution-mapi.
Comment 15 David Ronis 2009-09-18 18:47:17 UTC
I just upgraded the git master of evolution and tried rebuilding remove-duplicates (applying Milan's patches, but not the one in comment #8).   Unlike yesterday's build, this one dies with:


 /usr/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I.. -DORBIT2=1 -pthread -I/opt/garnome-svn-2.27/include/evolution-2.30 -I/opt/garnome-svn-2.27/include/evolution-data-server-2.30 -I/opt/garnome-svn-2.27/include/libxml2 -I/opt/garnome-svn-2.27/include/unique-1.0 -I/opt/garnome-svn-2.27/include/libgtkhtml-3.14 -I/opt/garnome-svn-2.27/include/glib-2.0 -I/opt/garnome-svn-2.27/lib/glib-2.0/include -I/opt/garnome-svn-2.27/include -I/opt/garnome-svn-2.27/include/gconf/2 -I/opt/garnome-svn-2.27/include/libsoup-2.4 -I/opt/garnome-svn-2.27/include/libbonobo-2.0 -I/opt/garnome-svn-2.27/include/orbit-2.0 -I/opt/garnome-svn-2.27/include/dbus-1.0 -I/opt/garnome-svn-2.27/lib/dbus-1.0/include -I/opt/garnome-svn-2.27/include/bonobo-activation-2.0 -I/opt/garnome-svn-2.27/include/gtk-2.0 -I/opt/garnome-svn-2.27/lib/gtk-2.0/include -I/opt/garnome-svn-2.27/include/atk-1.0 -I/opt/garnome-svn-2.27/include/cairo -I/opt/garnome-svn-2.27/include/pango-1.0 -I/opt/garnome-svn-2.27/include/pixman-1 -I/opt/garnome-svn-2.27/include/freetype2 -I/opt/garnome-svn-2.27/include/enchant -I/usr/include/libpng12 -I/opt/garnome-svn-2.27/include -I/opt/garnome-svn-2.27/include -L/opt/garnome-svn-2.27/lib -O2 -g -pipe -MT remove-duplicates.lo -MD -MP -MF .deps/remove-duplicates.Tpo -c remove-duplicates.c  -fPIC -DPIC -o .libs/remove-duplicates.o
In file included from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree-scrolled.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/message-list.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/e-mail-reader.h:28,
                 from remove-duplicates.c:37:
/opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree.h:28:41: error: libgnomecanvas/gnome-canvas.h: No such file or directory
In file included from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-cell.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-table-extras.h:28,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree.h:31,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree-scrolled.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/message-list.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/e-mail-reader.h:28,
                 from remove-duplicates.c:37:
/opt/garnome-svn-2.27/include/evolution-2.30/table/e-table-tooltip.h:38: error: expected specifier-qualifier-list before 'GnomeCanvasItem'
In file included from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree.h:36,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree-scrolled.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/message-list.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/e-mail-reader.h:28,
                 from remove-duplicates.c:37:
/opt/garnome-svn-2.27/include/evolution-2.30/table/e-table-item.h:45: error: expected specifier-qualifier-list before 'GnomeCanvasItem'
/opt/garnome-svn-2.27/include/evolution-2.30/table/e-table-item.h:175: error: expected specifier-qualifier-list before 'GnomeCanvasItemClass'
In file included from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree-scrolled.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/message-list.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/e-mail-reader.h:28,
                 from remove-duplicates.c:37:
/opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree.h:312: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
make[5]: *** [remove-duplicates.lo] Error 1
Comment 16 David Ronis 2009-09-18 18:50:31 UTC
I just upgraded the git master of evolution and tried rebuilding remove-duplicates (applying the patches here).   Unlike yesterday's build, this one dies with:


 /usr/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I.. -DORBIT2=1 -pthread -I/opt/garnome-svn-2.27/include/evolution-2.30 -I/opt/garnome-svn-2.27/include/evolution-data-server-2.30 -I/opt/garnome-svn-2.27/include/libxml2 -I/opt/garnome-svn-2.27/include/unique-1.0 -I/opt/garnome-svn-2.27/include/libgtkhtml-3.14 -I/opt/garnome-svn-2.27/include/glib-2.0 -I/opt/garnome-svn-2.27/lib/glib-2.0/include -I/opt/garnome-svn-2.27/include -I/opt/garnome-svn-2.27/include/gconf/2 -I/opt/garnome-svn-2.27/include/libsoup-2.4 -I/opt/garnome-svn-2.27/include/libbonobo-2.0 -I/opt/garnome-svn-2.27/include/orbit-2.0 -I/opt/garnome-svn-2.27/include/dbus-1.0 -I/opt/garnome-svn-2.27/lib/dbus-1.0/include -I/opt/garnome-svn-2.27/include/bonobo-activation-2.0 -I/opt/garnome-svn-2.27/include/gtk-2.0 -I/opt/garnome-svn-2.27/lib/gtk-2.0/include -I/opt/garnome-svn-2.27/include/atk-1.0 -I/opt/garnome-svn-2.27/include/cairo -I/opt/garnome-svn-2.27/include/pango-1.0 -I/opt/garnome-svn-2.27/include/pixman-1 -I/opt/garnome-svn-2.27/include/freetype2 -I/opt/garnome-svn-2.27/include/enchant -I/usr/include/libpng12 -I/opt/garnome-svn-2.27/include -I/opt/garnome-svn-2.27/include -L/opt/garnome-svn-2.27/lib -O2 -g -pipe -MT remove-duplicates.lo -MD -MP -MF .deps/remove-duplicates.Tpo -c remove-duplicates.c  -fPIC -DPIC -o .libs/remove-duplicates.o
In file included from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree-scrolled.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/message-list.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/e-mail-reader.h:28,
                 from remove-duplicates.c:37:
/opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree.h:28:41: error: libgnomecanvas/gnome-canvas.h: No such file or directory
In file included from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-cell.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-table-extras.h:28,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree.h:31,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree-scrolled.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/message-list.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/e-mail-reader.h:28,
                 from remove-duplicates.c:37:
/opt/garnome-svn-2.27/include/evolution-2.30/table/e-table-tooltip.h:38: error: expected specifier-qualifier-list before 'GnomeCanvasItem'
In file included from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree.h:36,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree-scrolled.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/message-list.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/e-mail-reader.h:28,
                 from remove-duplicates.c:37:
/opt/garnome-svn-2.27/include/evolution-2.30/table/e-table-item.h:45: error: expected specifier-qualifier-list before 'GnomeCanvasItem'
/opt/garnome-svn-2.27/include/evolution-2.30/table/e-table-item.h:175: error: expected specifier-qualifier-list before 'GnomeCanvasItemClass'
In file included from /opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree-scrolled.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/message-list.h:29,
                 from /opt/garnome-svn-2.27/include/evolution-2.30/mail/e-mail-reader.h:28,
                 from remove-duplicates.c:37:
/opt/garnome-svn-2.27/include/evolution-2.30/table/e-tree.h:312: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
make[5]: *** [remove-duplicates.lo] Error 1
Comment 17 David Ronis 2009-09-18 18:51:56 UTC
Hmmm... I thought that I told bugzilla to overwrite comment 15....  Oh well, please ingore it.
Comment 18 David Ronis 2009-09-18 19:37:34 UTC
The problem is that e-tree.h has #include <libgnomecanvas/gnome-canvas.h> and that's not being found.   I "fixed" this by adding -I[gnome_path]/include/libgnomecanvas-2.0 to the compile flags.   This should be done automatically by using a .pc file.
Comment 19 Matthew Barnes 2009-09-19 14:03:49 UTC
I've added an evolution-mail.pc to git master.  remove-duplicates should use that.  Its requirements list may still be incomplete, but just add to it as needed.
Comment 20 Milan Crha 2009-09-25 07:41:12 UTC
As we talked about this on IRC some other day, we can either point the developer of the plugin to this bug, or ask him whether he's willing to have his plugin as part of the evolution core plugins (and evolution sources). Then we can either close this bug as NotGnome or fix it and close this bug as fixed. Both works fine for me.
Comment 21 Carlos Garnacho 2009-09-25 13:06:08 UTC
It'd be great to have it merged into the evolution codebase IMHO, the plugin has broken a couple of times before due to incompatible changes in the evolution .pc files, it'd be the best way to keep it up-to-date indeed :)
Comment 22 Matthew Barnes 2009-09-28 21:24:34 UTC
Removing this from the regression list since remove-duplicates isn't our problem.

If we're going to merge this into Evolution I would prefer it be "Select Duplicates" instead of "Remove Duplicates".  I'm also opposed to shipping this feature as a plugin.  Integrate it properly.
Comment 23 Carlos Garnacho 2009-09-29 09:46:57 UTC
Actually, (lack of) backwards compatibility used to be a problem :P, maybe the evolution plugins platform never cared about that.

I hope someone with a better knowledge of evolution internal tackles integrating this, I don't see myself doing it in the short term.
Comment 24 Ritesh Khadgaray ( irc:ritz) 2009-09-29 14:59:06 UTC
stupid question, where should this be added to, if not plugin ?
Comment 25 Matthew Barnes 2009-09-29 15:14:29 UTC
Build it into the core mail module: modules/mail
Comment 26 Ritesh Khadgaray ( irc:ritz) 2009-10-14 22:25:41 UTC
I would still prefer "Remove Duplicate" to remove duplicate, rather than select them, and also there no way to currently to see only selected message in a folder.

-- ritz
Comment 27 Ritesh Khadgaray ( irc:ritz) 2009-10-21 14:13:20 UTC
Created attachment 145954 [details] [review]
patch

integrated remove-dups into modules/mail
Comment 28 David Ronis 2009-10-21 19:37:03 UTC
I tried Ritesh's patch (comment 27).  It applies and builds fine in the git/master.   It took me a bit to find the trigger button (Folder->Select Duplicated Messages) and tried it on one of my folders.

The summary now reads:  '6 selected, 2102 total', but the message summary shows the entire folder; the 6 selected aren't highlighted or marked in any other way.   Shouldn't only the 6 be displayed.  Also, what are the 6?  That is are they say, 3x2 messages (the "original and the "duplicate") or are they 6 duplicates, the originals not being selected.
Comment 29 David Ronis 2009-10-21 21:45:02 UTC
I spoke too fast--turns out that the selected messages are highlighted; they are a darker grey than the usual white/gray theme I have in the message summary.  I'd suggest using a stronger color (e.g., like the blue the normal search selection uses).    Also,  the ability to only show the selected items is essential (some of my mailboxes have 1000s of entries).  Finally, I took the plunge and pressed delete--it worked as it should.
Comment 30 Matthew Barnes 2009-10-22 04:31:54 UTC
Sounds like a "Show: Duplicate Messages" combo box item would be better than a main menu item.  That way it would filter on duplicate messages instead of just selecting them.
Comment 31 Ritesh Khadgaray ( irc:ritz) 2009-10-23 12:00:17 UTC
How about, an option "Remove all duplicates" right above "Expuge", instead of "Select all duplicates" ? Makes much better sense to me.

reason : remove duplicate is very accurate, and this simplifies the operation to user.
Comment 32 David Booth 2009-11-25 02:29:51 UTC
In case one doesn't want to use this plugin, I wrote a perl script called cleanemail.perl for deleting duplicate 
or previously moved or deleted messages from your Evolution or Eudora
email files.  It is especially useful for cases in which your 
email client loses track of which messages it has downloaded from your 
mail server, and consequently downloads all messages again, thus creating
thousands of duplicate messages in your Inbox.  (Thus, unfortunately, happens to me regularly in Evolution, and it is quite a pain because it takes a LONG time to re-download all of my messages.)

The source code is available
at http://dbooth.org/2009/cleanemail/
and the opening comment explains its usage.
Comment 33 Matthew Barnes 2009-11-25 14:48:45 UTC
(In reply to comment #31)
> How about, an option "Remove all duplicates" right above "Expuge", instead of
> "Select all duplicates" ? Makes much better sense to me.

I've had a change of heart on the select vs. remove issue and your suggestion sounds best.  Do you think we should have a confirmation dialog, since this is a destructive action and might be triggered accidentally?
Comment 34 Ritesh Khadgaray ( irc:ritz) 2009-11-25 14:58:30 UTC
(In reply to comment #33)
> I've had a change of heart on the select vs. remove issue and your suggestion
> sounds best.  Do you think we should have a confirmation dialog, since this is
> a destructive action and might be triggered accidentally?

Confirmation dialog would be good. duplicate emails are marked as deleted and can be recovered from Trash. imho.

-- ritz
Comment 35 Reid Thompson 2009-12-08 18:09:43 UTC
Applied patch from comment 27 ( Created an attachment (id=145954) ).  Getting the following build error:
libtool: compile:  ccache gcc -DHAVE_CONFIG_H -I. -I../../../../evolution/modules/mail -I../.. -DG_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -Wall -Wextra -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wformat-security -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -I../../../../evolution -I../../../../evolution/mail -I../../../../evolution/widgets -DORBIT2=1 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gail-1.0 -I/usr/include/libart-2.0 -I/usr/include/libxml2 -I/usr/include/gnome-desktop-2.0 -I/usr/include/startup-notification-1.0 -DORBIT2=1 -pthread -I/opt/evo/include/evolution-data-server-2.30 -I/opt/evo/include/libgtkhtml-3.14 -I/opt/evo/include/libgtkhtml-3.14/editor -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/nss -I/usr/include/nspr -I/usr/include/libxml2 -I/usr/include/gconf/2 -I/usr/include/libsoup-2.4 -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/gtk-2.0 -I/usr/include/enchant -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libglade-2.0 -I/usr/include/unique-1.0 -DORBIT2=1 -pthread -I/opt/evo/include/evolution-data-server-2.30 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/nss -I/usr/include/nspr -I/usr/include/libxml2 -I/usr/include/gconf/2 -I/usr/include/libsoup-2.4 -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -DEVOLUTION_ETSPECDIR=\"/opt/evo/share/evolution/2.30/etspec\" -DEVOLUTION_UIDIR=\"/opt/evo/share/evolution/2.30/ui\" -DEVOLUTION_PRIVDATADIR=\"/opt/evo/share/evolution/2.30\" -DG_LOG_DOMAIN=\"evolution-module-mail\" -ggdb -O2 -march=prescott -g -MT libevolution_module_mail_la-em-account-prefs.lo -MD -MP -MF .deps/libevolution_module_mail_la-em-account-prefs.Tpo -c ../../../../evolution/modules/mail/em-account-prefs.c  -fPIC -DPIC -o .libs/libevolution_module_mail_la-em-account-prefs.o
../../../../evolution/modules/mail/e-mail-shell-view-actions.c: In function ‘action_mail_folder_select_duplicate’:
../../../../evolution/modules/mail/e-mail-shell-view-actions.c:465: warning: assignment from incompatible pointer type
../../../../evolution/modules/mail/e-mail-shell-view-actions.c:505: error: implicit declaration of function ‘message_list_free_uids’
../../../../evolution/modules/mail/e-mail-shell-view-actions.c:505: warning: nested extern declaration of ‘message_list_free_uids’
make[4]: *** [libevolution_module_mail_la-e-mail-shell-view-actions.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
mv -f .deps/libevolution_module_mail_la-em-account-prefs.Tpo .deps/libevolution_module_mail_la-em-account-prefs.Plo
mv -f .deps/libevolution_module_mail_la-e-mail-shell-view-private.Tpo .deps/libevolution_module_mail_la-e-mail-shell-view-private.Plo
make[4]: Leaving directory `/home/rthompso/evo-git-head/obj/evolution/modules/mail'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/rthompso/evo-git-head/obj/evolution/modules'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/rthompso/evo-git-head/obj/evolution'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/rthompso/evo-git-head/obj/evolution'
make: *** [.stamp/evolution.build] Error 2
rthompso@raker>~/evo-git-head
Comment 36 Reid Thompson 2009-12-08 21:13:42 UTC
replaced call to message_list_free_uids with em_utils_uids_free and build finished -- appears to work
Comment 37 Ritesh Khadgaray ( irc:ritz) 2009-12-09 04:42:48 UTC
@Reid

you would also need to add  "#include <mail/message-list.h>" , and replace "e_error_run" with "e_alert_run_dialog_for_args" , atleast with the latest git snapshot.
Comment 38 Reid Thompson 2009-12-09 14:59:04 UTC
Slightly confused here.  I only applied the patch noted in comment 27 from Ritesh.  That patch contains no reference to e_error_run or e_alert_run_dialog_for_args.

Should I also apply any of the earlier patches?
What minimal testing I've performed seems to indicate that I can select a folder then select Folder/Select All Duplicate Messages and it works...
Comment 39 Ritesh Khadgaray ( irc:ritz) 2009-12-10 05:27:44 UTC
  (In reply to comment #38)
> Slightly confused here.  I only applied the patch noted in comment 27 from
> Ritesh.  That patch contains no reference to e_error_run or
> e_alert_run_dialog_for_args.
> 
> Should I also apply any of the earlier patches?
> What minimal testing I've performed seems to indicate that I can select a
> folder then select Folder/Select All Duplicate Messages and it works...

my bad, I had misread the comment. I was assuming you were building remove-duplicate plugin. The patch in comment #37 should be fine, along with move to em_utils_uids_free.
Comment 40 Milan Crha 2009-12-16 20:24:54 UTC
So Matt, what is your decision here, use ritz' builtin version? I would say yes.
Comment 41 Matthew Barnes 2009-12-16 21:35:46 UTC
Yes, though I'd still like a confirmation dialog.

Unnecessary dialogs suck, so it should only be shown if there actually -are- duplicates in the folder.  Maybe it could even tell you how many it found:

    Are you sure you want to delete NN duplicate
    messages in FOLDER_NAME?

                       [Do Not Delete]  [Delete]

Another question is whether this action makes sense for search folders.  If that's going to complicate the design then I'd be in favor of just disabling the action when a search folder is selected.  At least for now.
Comment 42 Reid Thompson 2010-01-07 21:08:41 UTC
Created attachment 150997 [details] [review]
minor changes to Ritesh's patch to build against 2010-01-07 HEAD

minor changes to Ritesh's patch to build against 2010-01-07 HEAD
Comment 43 Chris Gidden 2010-10-07 14:05:07 UTC
see 
https://bugzilla.novell.com/show_bug.cgi?id=644122

Bug 644122 – evolution remove-duplicate-email fails to compile missing components in only 11.3

em-popup is missing cannot find a lib with this component it compiled ok in 11.2

can there be a resolution to this one?
Comment 44 Milan Crha 2010-10-15 07:37:33 UTC
Created attachment 172408 [details] [review]
evo patch (final)

for evolution;

This is final patch, taken things from the last patch, and adapted to actual git master, together with informational messages about "are you sure to remove" and "no duplicate messages found".
Comment 45 Milan Crha 2010-10-15 07:40:17 UTC
Created commit df6f8dc in evo master (2.91.1+)
Comment 46 Casual J. Programmer 2010-10-19 08:38:18 UTC
Has it actually occurred to any of the Evolution developers, that this is a coverup for the real Bug ?

To me it seems like fixing a broken pipe by putting a bucket and a cloth next to it.

To my knowledge no other E-Mail client manages to produce duplicate messages regularly.
Comment 47 Ritesh Khadgaray ( irc:ritz) 2010-10-20 06:46:54 UTC
This aint from what I have seen, you probably have not used evolution with zimbra or mailing list where duplicate suppression is disabled. This also can be seen when using evolution with pop over slow/broken connections. 

  If you do see this issue, please talk over evolution list.
Comment 48 Ritesh Khadgaray ( irc:ritz) 2010-10-20 06:48:13 UTC
@Casual J. Programmer

This aint from what I have seen, you probably have not used evolution with zimbra or mailing list where duplicate suppression is disabled. This also can be seen when using evolution with pop over slow/broken connections. 

  If you do see this issue, please talk over evolution list.
Comment 49 David Ronis 2010-10-26 17:14:05 UTC
I just rebuilt the git-master and voila--there is a remove duplicate messages button.    When I pushed it I get a popup asking me to confirm deleting x duplicate messages.   All as expected; however, there was no option to actually look at the messages.   Not sure this is really necessary, but deleting cold is a bit scary :).


Thanks Milan.
Comment 50 Milan Crha 2010-10-27 06:31:35 UTC
Yeah, no such option there. And also other change from the original plugin. it worked for selected messages, whereas I changed it to work on all messages shown in the folder, because it was confusing to me that it does nothing when I had selected only one message. It has its pros and cons though. Maybe we can change it. (it also produces bug #632683).

Nonetheless, there is really no "show me duplicates". You can expunge trash before doing this and then see what is new in it.
Comment 51 Matthew Barnes 2011-02-12 02:52:46 UTC
*** Bug 253244 has been marked as a duplicate of this bug. ***