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 641100 - GTK 3 porting
GTK 3 porting
Status: RESOLVED FIXED
Product: cheese
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: 2.32
Assigned To: Cheese Maintainer(s)
Cheese Maintainer(s)
: 636329 641098 641099 641102 (view as bug list)
Depends on: 641512 642013 642298 642885 643286 643480
Blocks: 632834
 
 
Reported: 2011-02-01 01:28 UTC by Bastien Nocera
Modified: 2011-03-07 11:34 UTC
See Also:
GNOME target: 3.0
GNOME version: ---


Attachments
um-crop-area: Update from gnome-control-center (47.22 KB, patch)
2011-02-01 01:34 UTC, Bastien Nocera
committed Details | Review
Port cheese-flash (1.23 KB, patch)
2011-02-01 01:37 UTC, Bastien Nocera
committed Details | Review
Port cheese-widget (3.02 KB, patch)
2011-02-01 01:37 UTC, Bastien Nocera
committed Details | Review
Replaced some deprecated symbols. (5.45 KB, patch)
2011-02-09 15:45 UTC, Patricia Santana Cruz
committed Details | Review
Corrected Vala package names. (973 bytes, patch)
2011-02-09 15:46 UTC, Patricia Santana Cruz
committed Details | Review
Migrated from libunique to GtkApplication. (6.19 KB, patch)
2011-02-09 15:47 UTC, Patricia Santana Cruz
committed Details | Review
Allow user with VALAC but no valac to run autogen.sh (1.73 KB, patch)
2011-02-10 11:56 UTC, Marc-Antoine Perennou
none Details | Review
Allow user with VALAC but no valac to run autogen.sh (832 bytes, patch)
2011-02-10 11:56 UTC, Marc-Antoine Perennou
accepted-commit_now Details | Review

Description Bastien Nocera 2011-02-01 01:28:55 UTC
SSIA
Comment 1 Bastien Nocera 2011-02-01 01:34:20 UTC
Created attachment 179760 [details] [review]
um-crop-area: Update from gnome-control-center

for GTK+ 3.x porting.
Comment 2 Bastien Nocera 2011-02-01 01:35:14 UTC
*** Bug 641102 has been marked as a duplicate of this bug. ***
Comment 3 Bastien Nocera 2011-02-01 01:36:10 UTC
*** Bug 641099 has been marked as a duplicate of this bug. ***
Comment 4 Bastien Nocera 2011-02-01 01:36:20 UTC
*** Bug 641098 has been marked as a duplicate of this bug. ***
Comment 5 Bastien Nocera 2011-02-01 01:37:26 UTC
Created attachment 179761 [details] [review]
Port cheese-flash
Comment 6 Bastien Nocera 2011-02-01 01:37:44 UTC
Created attachment 179762 [details] [review]
Port cheese-widget
Comment 7 Bastien Nocera 2011-02-01 01:39:20 UTC
At least porting to GtkApplication and removing the calls for gtkrc parsing will also be necessary.
Comment 8 Murray Cumming 2011-02-01 09:21:11 UTC
*** Bug 636329 has been marked as a duplicate of this bug. ***
Comment 9 Patricia Santana Cruz 2011-02-09 15:45:18 UTC
Created attachment 180473 [details] [review]
Replaced some deprecated symbols.

Replaced Gtk.STOCK_*, Gtk.Widget.hide_all() and Gtk.Widget.size_request().
Comment 10 Patricia Santana Cruz 2011-02-09 15:46:42 UTC
Created attachment 180474 [details] [review]
Corrected Vala package names.

Clutter-gtk, libcanberra-gtk and libcanberra.
Comment 11 Patricia Santana Cruz 2011-02-09 15:47:25 UTC
Created attachment 180475 [details] [review]
Migrated from libunique to GtkApplication.
Comment 12 Patricia Santana Cruz 2011-02-09 15:56:12 UTC
(In reply to comment #7)
> At least porting to GtkApplication and removing the calls for gtkrc parsing
> will also be necessary.

Ported libunique to GtkApplication, but I am not able to test it or go further, because the needed gtk 3 based clutter-gtk-1.0 bindings do not exist yet (look at the "Blocks" section bug 632834 ). 

Depends on: bug 641512.
Comment 13 Murray Cumming 2011-02-09 16:01:49 UTC
(In reply to comment #12)
> the needed gtk 3 based clutter-gtk-1.0 bindings do not exist yet (look
> at the "Blocks" section bug 632834 ).

You mean that the vala binding for clutter-gtk-1.0 does not exist yet? Is there a vala bug open about that?
Comment 14 Bastien Nocera 2011-02-10 09:53:12 UTC
Clutter-Gtk installs gobject-introspection libraries, so it should be possible to use the GI bindings directly instead of the vala bindings to get a head start.
Comment 15 Patricia Santana Cruz 2011-02-10 09:53:50 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > the needed gtk 3 based clutter-gtk-1.0 bindings do not exist yet (look
> > at the "Blocks" section bug 632834 ).
> 
> You mean that the vala binding for clutter-gtk-1.0 does not exist yet? Is there
> a vala bug open about that?

Yes, that is what I meant. I talked yesterday to  juergbi and he already knew about the issue and said he will try to get around to it before the next release. I filed a bug already (bug 642013).
Comment 16 Patricia Santana Cruz 2011-02-10 11:47:28 UTC
juergbi is going to do it and the plan is to do a release on the weekend.
Comment 17 Marc-Antoine Perennou 2011-02-10 11:56:14 UTC
Created attachment 180568 [details] [review]
Allow user with VALAC but no valac to run autogen.sh

When trying to build cheese to have a look on what still needs migration, I get stuck because on gentoo, we do not preserve the "valac" symlink, we only have valac-0.12 and so on, handling that setting VALAC. Currently autogen.sh checks for "valac" before looking at VALAC, so autogen.sh won't run as expected
Comment 18 Marc-Antoine Perennou 2011-02-10 11:56:52 UTC
Created attachment 180569 [details] [review]
Allow user with VALAC but no valac to run autogen.sh

wrong attachment, sorry ...
Comment 19 daniel g. siegel 2011-02-10 12:11:54 UTC
Review of attachment 180569 [details] [review]:

looks fine to me, thanks!
Comment 20 Luciana Fujii 2011-02-18 22:43:43 UTC
I didn't know about this bug, Daneil pointed me to it. I worked on branch gtk3 and it now compiles and runs with gtk3. Apparently some of the stuff I did was already done here and some were not.

There are some warnings, though. All of them are related to gtk_icon_view. For instance, when calling set_margin there are some warnings because priv->cell_area is null and it expects it not to be. I'm not really sure if it's a problem in gtk_icon_view or in cheese_thumb_view that inherits from it.
Comment 21 Murray Cumming 2011-02-21 08:53:52 UTC
It's unfortunate that you didn't check with your co-maintainer or bugzilla first.

Maybe someone needs to look at both branches and make sure that we have the best changes from both.
http://git.gnome.org/browse/cheese/log/?h=gtk3
https://github.com/Patriciasc/Cheese-GTK-3

Patricia, do you have the same GtkIconView warning?
Comment 22 Patricia Santana Cruz 2011-02-21 09:28:06 UTC
(In reply to comment #20)
> I didn't know about this bug, Daneil pointed me to it. I worked on branch gtk3
> and it now compiles and runs with gtk3. Apparently some of the stuff I did was
> already done here and some were not.
> 
> There are some warnings, though. All of them are related to gtk_icon_view. For
> instance, when calling set_margin there are some warnings because
> priv->cell_area is null and it expects it not to be. I'm not really sure if
> it's a problem in gtk_icon_view or in cheese_thumb_view that inherits from it.

It is a shame we have duplicated work unnecessary. Please, next time inform about the work you are doing. If there is not a bug filed already or you do not find one related, please, file one so this will not happen again.
Comment 23 Patricia Santana Cruz 2011-02-21 09:30:06 UTC
(In reply to comment #21)
> It's unfortunate that you didn't check with your co-maintainer or bugzilla
> first.
> 
> Maybe someone needs to look at both branches and make sure that we have the
> best changes from both.
> http://git.gnome.org/browse/cheese/log/?h=gtk3
> https://github.com/Patriciasc/Cheese-GTK-3
> 
> Patricia, do you have the same GtkIconView warning?

Yes, I am exactly working on that now and spent Friday with gdb trying to find out what the problem is. I am going to talk to Tristan today and if he does not know what the problem could be, I will go on trying with Valgrind.
Comment 24 Luciana Fujii 2011-02-21 12:58:36 UTC
I'm sorry. I'm now following Cheese bugs so I'm more aware of it. I had actually talked about helping on this with Yuvipanda when he created the branch, but he didn't work on it anymore. I was actually thinking a couple of changes would make the branch compile and I ended up spending a lot of time on it.

Patricia, I think we should use your GTK.Application patch when we merge it to master. Not only it is newer than mine, but also you probably know better what you're doing. We can use the other two too if you like, just need to rebase some stuff I think.

Murray also said you're the responsible for we having clutter-gtk vala bindng, thank you very much.
Comment 25 Patricia Santana Cruz 2011-02-22 10:50:16 UTC
Luciana, I guess that we will have to make sure that we take at the end the best of both branches (yours and mine).

These are the problems that I am currently having and their status:

1. GtkIconView. As I said, I am currently trying to find out what the problem with the GtkIconView is. I spent several time with gdb and Valgrind finding no helpful results. I tried to contact Tristan yesterday but he was not online, so I just emailed him with the problem today. Hopefully we get an answer soon and he can help.

2. The C generated code for the vfunc local_command_line() is wrong, it has one parameter more than expected. This is a problem and a blocker of our work, since it is one of the very first functions that the application calls. I already filed a bug (bug 642885) yesterday afternoon and commented it in #vala.

3. I migrated from GtkRcStyle to GtkStyleContext and in that process replaced the gtkrc file for the custom scrollbar with a .css file. This is not working right now and therefore, a default scrollbar is showing instead. I am currently investigating this.

4. Menu options (I guess they are actions) are showing as if they were inactivated. I still did not have time to look to this problem, but I did not directly change anything that had something to do with the actions, so I will have to investigate this as well.

I just made this small summary to have track of the work being done and in order to divide our efforts in a better way. I hope that it helps.
Comment 26 Matthias Clasen 2011-02-24 04:59:19 UTC
I think I saw tristan commit some icon view fixes today, might be related to your problems.
Comment 27 Patricia Santana Cruz 2011-02-24 09:54:33 UTC
Yes, I contacted Tristan with the problem and he informed me that it would be fixed within the next days.

Regarding to the problem with the local_command_line, juergbi is working on it, and hopefully we will get an answer soon.

I still do not have news about the problem with the .css file. I am trying to contact garnacho for some help, since I really do not find where the problem is.

The problem with the insensitive menus and buttons is produced by GStreamer which was not initialized. It seems that at some point it was, but it was put out of the code two years ago... I still do not understand the reason, since I did not see that Gst.init_get_option_group () initializes it. I am still working on this point because the web-cam is not detected yet and the message "No device found" is displaying.
Comment 28 Patricia Santana Cruz 2011-02-24 15:22:34 UTC
Update:

- The GtkIconView issue is still prompting the warnings after Tristan changes. I contacted him already to let him know.

- The issue with local_command_line has not been solved, but juergbi found a workaround that is working for cheese right now.

- Regarding to the .css file, I emailed Carlos Garnacho with the issue already.

- As I said before,  menus and buttons are showed insensitive still. This is caused by some problem in GStreamer. The following warning+error is prompted when running cheese:

** (cheese:19067): WARNING **: cheese-window.vala:1257: Error: No device found

and the following is displayed on the cheese screen: "No device found".

Can anybody with some experience in GStreamer help?
Comment 29 Patricia Santana Cruz 2011-02-24 15:30:31 UTC
Btw, this is the line prompting the error from the cheese source: 
https://github.com/Patriciasc/Cheese-GTK-3/blob/gtk3/libcheese/cheese-camera.c#L1202
Comment 30 Murray Cumming 2011-02-24 15:32:43 UTC
So, is cheese_camera_create_camera_source_bin() being called, to set priv->num_camera_devices ?
Comment 31 Murray Cumming 2011-02-24 15:37:02 UTC
Sorry, I mean, is the cheese_camera_add_device() callback called?
Comment 32 Luciana Fujii 2011-02-24 16:16:59 UTC
I just grabbed your changes from your branch and appart from the warnings it works for me.

Does your webcam works with a simple gst-launch line?
Comment 33 Murray Cumming 2011-02-25 10:41:34 UTC
So, it seems like time to merge stuff to master. Luciana, how do you want to do that?
Comment 34 Murray Cumming 2011-02-25 13:11:14 UTC
We think we have mostly solved the "device not available problem". It was a problem in a signal connection, in some code that was added since the GNOME 2.32 branch:
https://github.com/Patriciasc/Cheese-GTK-3/commit/01b6aa85c2263c81c4b04e4b2557fb4334bac673

Both Patricia and I only actually see the picture from the webcam when effects are enabled, but this could be due to some unrelated gstreamer or clutter problem in our jhbuild environments, so I still want to get this merged to master so more people can try it.
Comment 35 Patricia Santana Cruz 2011-02-25 13:16:40 UTC
Update:

- The GtkIconView issue is still prompting the warnings after Tristan changes.
I contacted him already to let him know. These are some of the prompting errors:

http://pastebin.com/HZ5JbJ6v

- Regarding to the .css file, garnacho answered already with a solution that I will apply today.

- When running cheese, the following error is shown in the terminal too and the image is still not displaying:
** (cheese:10017): WARNING **: Internal data flow problem.

Does anybody knows what could be causing these problems?

Apart from these issues, everything else seems to be working fine, so as Murray suggested, it would be a good idea to decide which parts to take and push.
Comment 36 Murray Cumming 2011-02-25 13:35:22 UTC
(In reply to comment #35)
> Update:
> 
> - The GtkIconView issue is still prompting the warnings after Tristan changes.
> I contacted him already to let him know. These are some of the prompting
> errors:
> 
> http://pastebin.com/HZ5JbJ6v

Patricia, I have filed bug #643286 about that, though you have a slightly different version of the warning. Maybe you could check if the backtrace is similar for you, though please let's deal with that in that other bug.

In general, let's start splitting off these remaining minor issues to other bug reports.
Comment 37 Patricia Santana Cruz 2011-02-25 14:48:33 UTC
Unfortunately, and as you already know, Luciana and I have been working on the same project for a few weeks without having knowledge of that being happening.

I am happy that we both share the same interest and I am pretty sure that we are going to make a good team together on helping cheese grow, but now, we have to make a decision and take the necessary parts of both branches. I have taken some time to have a look to Luciana's code, and it seems that all her changes are in my branch too (although this is something we two already discussed). I would like to know Luciana's opinion and then act, so everybody can have access to the code: "more eyes, more bugs fixed!" :)
Comment 38 Patricia Santana Cruz 2011-02-25 16:13:09 UTC
Update:

- I got the Gtk.StyleContext already working. Now cheese is using the custom Gtk.Scrollbar custom style.

- Cheese is already displaying the image, but when clicking on the "Effects" button, previews are showing very badly and without colour. The following error is prompting 9 times too when doing this:

** (cheese:17960): WARNING **: Internal data flow problem.

I would say that this is prompted 9 times because there are 9 time effect previews.
Comment 39 Luciana Fujii 2011-02-25 20:37:25 UTC
This "internal data flow problem" happens for me in master branch too, I don't think it has something to do with gtk3 changes.

About merging this branch, I think we can get everything or at least great majority of it from Patricia's branch. I have only worked on it for a little while to make it compile, she made many more changes on it and I have stopped working on it since I learned about her branch with other patches that were not in this bug report. One change I suggest to her branch is to reduce or remove version requirements, since I tested that the branch works with older versions of gtk3, libgnome-desktop, etc.

To get theese changes to master it would be nice to know Daniel's opinion. If you agree with him and you have the branch ready to push just go ahead.
Comment 40 Patricia Santana Cruz 2011-02-28 13:15:39 UTC
I filed a bug for the "internal data flow problem" (bug 643480). Everything else seems to be working fine, so the branch is ready for being merged.
Comment 41 Luciana Fujii 2011-03-04 13:55:59 UTC
It would be nice if we could push Patricia's branch to gtk3 branch in git.gnome.org? We would have to remove what is there right now first, but I think that happened before in this branch. I think this would make it easier to test and merge. What do you think?
Comment 42 daniel g. siegel 2011-03-04 14:55:29 UTC
yep, that makes perfect sense! thanks a lot for the work you put into this!
Comment 43 Murray Cumming 2011-03-04 15:03:31 UTC
Daniel, and could you please approve the merging to master?
Comment 44 Patricia Santana Cruz 2011-03-07 09:55:54 UTC
I rebased my gtk3 branch on top of the current cheese master and created a new branch with the changes. David King just pushed that branch some minutes ago. Thanks for that!
Comment 45 Patricia Santana Cruz 2011-03-07 09:58:18 UTC
I rebased my gtk3 branch on top of the current cheese master and created a new branch with the changes. David King just pushed that branch some minutes ago. Thanks for that!
Comment 46 Patricia Santana Cruz 2011-03-07 11:34:09 UTC
I think that now, that the gtk3 branch has been merged into master and made public, all the tasks have been accomplished. Now, more eyes will be able to check the work and we will have more chances to fix the small related bugs marked as dependencies.

One more bug closed!

Thanks for everybody's work.