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 770437 - general: fix issues to allow evolution integration
general: fix issues to allow evolution integration
Status: RESOLVED FIXED
Product: gnome-autoar
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Autoar maintainer(s)
GNOME Autoar maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-08-26 11:42 UTC by Razvan Chitu
Modified: 2016-09-02 17:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
general: add enum-types header to the library headers (1.13 KB, patch)
2016-08-26 11:42 UTC, Razvan Chitu
none Details | Review
AutoarCompressor, AutoarExtractor: remove redundant declaration (1.80 KB, patch)
2016-08-26 11:42 UTC, Razvan Chitu
committed Details | Review
autoar-gtk: update includes (1.59 KB, patch)
2016-08-26 11:42 UTC, Razvan Chitu
reviewed Details | Review
AutoarExtractor: make "decide-destination" emission synchronous (1.43 KB, patch)
2016-08-26 11:43 UTC, Razvan Chitu
committed Details | Review
Makefile: change gnome-autoar-gtk include directory (962 bytes, patch)
2016-09-02 15:40 UTC, Razvan Chitu
none Details | Review
general: add enum-types header to the library headers (1.19 KB, patch)
2016-09-02 15:40 UTC, Razvan Chitu
committed Details | Review
general: change gnome-autoar-gtk include directory (1.51 KB, patch)
2016-09-02 16:37 UTC, Razvan Chitu
committed Details | Review

Description Razvan Chitu 2016-08-26 11:42:44 UTC
The recent modifications in autoar API made the evolution integration not work
anymore. In order to patch the evolution autoar integration, a few issues had to
be fixed in autoar. See the patches for more details.  

Evolution bug report: https://bugzilla.gnome.org/show_bug.cgi?id=770380.
Comment 1 Razvan Chitu 2016-08-26 11:42:48 UTC
Created attachment 334218 [details] [review]
general: add enum-types header to the library headers
Comment 2 Razvan Chitu 2016-08-26 11:42:53 UTC
Created attachment 334219 [details] [review]
AutoarCompressor, AutoarExtractor: remove redundant declaration

The type getters were mistakenly redeclared in the header files.
Comment 3 Razvan Chitu 2016-08-26 11:42:58 UTC
Created attachment 334220 [details] [review]
autoar-gtk: update includes

The sources and headers for the gnome-autoar-gtk library should include headers
from the library itself, not from gnome-autoar.
Comment 4 Razvan Chitu 2016-08-26 11:43:03 UTC
Created attachment 334221 [details] [review]
AutoarExtractor: make "decide-destination" emission synchronous

Since "decide-destination" requires the client to provide a new destination, it
cannot be executed asynchronously in the main context. In order to fix this, use
g_signal_emit instead.
Comment 5 Ting-Wei Lan 2016-08-26 12:42:33 UTC
Review of attachment 334220 [details] [review]:

::: tests/test-ui.c
@@ -3,2 +3,2 @@
 #include <gnome-autoar/gnome-autoar.h>
-#include <gnome-autoar/autoar-gtk.h>
+#include <gnome-autoar/autoar-gtk-chooser.h>

Please use '#include <gnome-autoar-gtk/autoar-gtk.h>' here. autoar-gtk-chooser.h is a private header.
Comment 6 Ting-Wei Lan 2016-08-26 12:48:59 UTC
(In reply to Razvan Chitu from comment #4)
> Created attachment 334221 [details] [review] [review]
> AutoarExtractor: make "decide-destination" emission synchronous
> 
> Since "decide-destination" requires the client to provide a new destination,
> it
> cannot be executed asynchronously in the main context. In order to fix this,
> use
> g_signal_emit instead.

Signals were emitted in the main context because user-provided callbacks were usually used to update the graphical interface. I remember this feature was used in autoar integration patches made for epiphany and empathy. It was probably not used in evolution because I didn't find a way to display the information.
Comment 7 Razvan Chitu 2016-08-26 14:28:17 UTC
(In reply to Ting-Wei Lan from comment #6)
> (In reply to Razvan Chitu from comment #4)
> > Created attachment 334221 [details] [review] [review] [review]
> > AutoarExtractor: make "decide-destination" emission synchronous
> > 
> > Since "decide-destination" requires the client to provide a new destination,
> > it
> > cannot be executed asynchronously in the main context. In order to fix this,
> > use
> > g_signal_emit instead.
> 
> Signals were emitted in the main context because user-provided callbacks
> were usually used to update the graphical interface. I remember this feature
> was used in autoar integration patches made for epiphany and empathy. It was
> probably not used in evolution because I didn't find a way to display the
> information.

Hey again :). I figured this eventually, but we kind of needed this decide-destination signal if we went with not automatically solving file conflicts.
Comment 8 Razvan Chitu 2016-08-26 14:29:51 UTC
(In reply to Ting-Wei Lan from comment #5)
> Review of attachment 334220 [details] [review] [review]:
> 
> ::: tests/test-ui.c
> @@ -3,2 +3,2 @@
>  #include <gnome-autoar/gnome-autoar.h>
> -#include <gnome-autoar/autoar-gtk.h>
> +#include <gnome-autoar/autoar-gtk-chooser.h>
> 
> Please use '#include <gnome-autoar-gtk/autoar-gtk.h>' here.
> autoar-gtk-chooser.h is a private header.

If I try to do this, I get:

fatal error: gnome-autoar-gtk/autoar-gtk.h: No such file or directory
 #include <gnome-autoar-gtk/autoar-gtk.h>

Any idea what could cause this?
Comment 9 Ting-Wei Lan 2016-08-26 18:38:58 UTC
(In reply to Razvan Chitu from comment #7)
> (In reply to Ting-Wei Lan from comment #6)
> > (In reply to Razvan Chitu from comment #4)
> > > Created attachment 334221 [details] [review] [review] [review] [review]
> > > AutoarExtractor: make "decide-destination" emission synchronous
> > > 
> > > Since "decide-destination" requires the client to provide a new destination,
> > > it
> > > cannot be executed asynchronously in the main context. In order to fix this,
> > > use
> > > g_signal_emit instead.
> > 
> > Signals were emitted in the main context because user-provided callbacks
> > were usually used to update the graphical interface. I remember this feature
> > was used in autoar integration patches made for epiphany and empathy. It was
> > probably not used in evolution because I didn't find a way to display the
> > information.
> 
> Hey again :). I figured this eventually, but we kind of needed this
> decide-destination signal if we went with not automatically solving file
> conflicts.

Can we have two kinds of decide-destination signal? Applications which don't want to change the destination can simply use the async signal. Applications which want to do checks and possibly change the destination can connect to both sync and async signals. The sync version is emitted first, and the async version gets emitted later with the new destination.

(In reply to Razvan Chitu from comment #8)
> (In reply to Ting-Wei Lan from comment #5)
> > Review of attachment 334220 [details] [review] [review] [review]:
> > 
> > ::: tests/test-ui.c
> > @@ -3,2 +3,2 @@
> >  #include <gnome-autoar/gnome-autoar.h>
> > -#include <gnome-autoar/autoar-gtk.h>
> > +#include <gnome-autoar/autoar-gtk-chooser.h>
> > 
> > Please use '#include <gnome-autoar-gtk/autoar-gtk.h>' here.
> > autoar-gtk-chooser.h is a private header.
> 
> If I try to do this, I get:
> 
> fatal error: gnome-autoar-gtk/autoar-gtk.h: No such file or directory
>  #include <gnome-autoar-gtk/autoar-gtk.h>
> 
> Any idea what could cause this?

A recent commit changed the installation location of autoar-gtk.h from gnome-autoar to gnome-autoar-gtk, but autoar-gtk.h is still put in gnome-autoar of the source directory. I think a possible fix is to make gnome-autoar-gtk directory in the source directory and move gnome-autoar-gtk source and pc files into it.
Comment 10 Razvan Chitu 2016-08-26 22:15:11 UTC
(In reply to Ting-Wei Lan from comment #9)

I see that we still have quite a few things to discuss about autoar's development. Would you like to do it on the Nautilus IRC? I bet Carlos Soriano (and maybe also Cosimo, if he's around) would like to participate too. We are kind of flooding the evolution bug with an ~unrelated discussion :D.
Comment 11 Razvan Chitu 2016-08-27 18:18:39 UTC
(In reply to Ting-Wei Lan from comment #9)

So, besides the header issue, are you fine with these patches?
Comment 12 Razvan Chitu 2016-08-27 18:25:23 UTC
(In reply to Razvan Chitu from comment #11)
> (In reply to Ting-Wei Lan from comment #9)
> 
> So, besides the header issue, are you fine with these patches?

What I meant to say is that even though there still are a few issues about the current state of autoar (some of them being the ones you mentioned here), these patches put it in a stable state for the 3.22 release. After that we can focus on a proper overhaul of the library and not just changing it bit by bit. Would you be fine with this approach?
Comment 13 Ting-Wei Lan 2016-08-30 08:42:19 UTC
Review of attachment 334219 [details] [review]:

Yes, I didn't find it because it didn't cause compiler warnings. :)
Comment 14 Ting-Wei Lan 2016-08-30 08:49:32 UTC
Review of attachment 334218 [details] [review]:

This patch causes circular dependencies in the Makefile:
gmake: Circular gnome-autoar/autoar-enum-types.h <- gnome-autoar/autoar-enum-types.h dependency dropped.

gnome-autoar/autoar-enum-types.h: gnome-autoar/autoar-enum-types.h.template $(libgnome_autoar_la_headers)
        $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template gnome-autoar/autoar-enum-types.h.template $(libgnome_autoar_la_headers) ) > $@
Comment 15 Ting-Wei Lan 2016-08-30 08:54:53 UTC
Review of attachment 334221 [details] [review]:

If you think this patch is required to fix evolution, you can commit this patch to gnome-3-22 branch (but not master branch). I think we will have a better solution in next cycle.
Comment 16 Ting-Wei Lan 2016-08-30 08:59:55 UTC
Review of attachment 334220 [details] [review]:

I think you have to move gnome-autoar/*autoar-gtk* to gnome-autoar-gtk/ directory in the source tree because autoar-gtk headers are now installed in $(includedir)/gnome-autoar-gtk-0/gnome-autoar-gtk.
Comment 17 Razvan Chitu 2016-09-02 15:40:18 UTC
Created attachment 334657 [details] [review]
Makefile: change gnome-autoar-gtk include directory
Comment 18 Razvan Chitu 2016-09-02 15:40:57 UTC
Created attachment 334658 [details] [review]
general: add enum-types header to the library headers
Comment 19 Razvan Chitu 2016-09-02 16:37:08 UTC
Created attachment 334661 [details] [review]
general: change gnome-autoar-gtk include directory
Comment 20 Carlos Soriano 2016-09-02 16:40:24 UTC
Review of attachment 334658 [details] [review]:

With this the enums are included as is done in GLib, which is good. This patch no longer causes a loop dependency either, which was what Ting-Wey pointed out.
So this LGTM
Comment 21 Carlos Soriano 2016-09-02 16:46:17 UTC
Review of attachment 334661 [details] [review]:

This reverts the change of creating a different folder for the -gtk library, which is what Ting-Wei pointed out, and fix the include problems in evolution. So this seems to be fine too. Thanks!
Comment 22 Razvan Chitu 2016-09-02 16:58:24 UTC
Attachment 334219 [details] pushed as dad5bf8 - AutoarCompressor, AutoarExtractor: remove redundant declaration
Attachment 334221 [details] pushed as 4ac0fd4 - AutoarExtractor: make "decide-destination" emission synchronous
Attachment 334658 [details] pushed as f88b408 - general: add enum-types header to the library headers
Attachment 334661 [details] pushed as cb2b595 - general: change gnome-autoar-gtk include directory
Comment 23 Razvan Chitu 2016-09-02 16:59:48 UTC
Attachment 334219 [details] pushed as dad5bf8 - AutoarCompressor, AutoarExtractor: remove redundant declaration
Attachment 334658 [details] pushed as f88b408 - general: add enum-types header to the library headers
Attachment 334661 [details] pushed as cb2b595 - general: change gnome-autoar-gtk include directory