Mostrando postagens com marcador OPW 2013. Mostrar todas as postagens
Mostrando postagens com marcador OPW 2013. Mostrar todas as postagens

domingo, 23 de fevereiro de 2014

We keep going!

Wow, a lot of time since my last post!
I entered in a more complicated part of my project and I was late. I wasn't having time for nothing.
I worked hard for try to come back to schedule and I'm there again. No delays. The good news is that I have more things to show to you now..
A lot of small improves in my code were done.

The lastest modifications that I did are (the more recent to more old):

1) user can set if he/she wants to use a filter for tasks

















2) a refactoring in my code, to try to put a order over there.

 I spent 10 hour in it, but it worth it! Now, the code is more organized and clear :-)
With this, I finally resolve the Clutter Actor problem, with a big and simple help from #clutter.  The guy from #clutter said that probably is about ChamplainView, that already has a parent when I'm adding it to my stage or embed already has a parent when I add it to vbox_map. When I organized everything, I verified that sometimes, maybe I could be adding my ChamplainView to my stage when it already has a parent. This errors was gone. \o/




3) now we have a sidebar showing all tags, and user can filter task by clicking in tasks :-)

















4) better than this, now the user can edit a tag, and more yet: the user can insert a location in a tag.
















5) user can relate one or more tags to a location and edit the location's name




















The sad part is I'm having problem with the "Cogl-WARNING **: X Error received while making drawable 0x02400009 " . It makes the map turn in a black image.


I don't know how to fix it, yet. I'm talking with people from #clutter and #gnome-hackers to try to find out why it's happening. I'm also studying the Cogl Reference Manual to understand more about it. It's in my to do list fix it until the end of my project :-)







That's it for now. If you have any question or would like to comment, please, do it! :-)
See ya!

segunda-feira, 27 de janeiro de 2014

Now I have something really consistent!!

Me
A few days ago I was feeling a little discouraged: I worked in the code and was thinking that nothing was going on. But I continued to develop and suddenly things got very close to what was planned for the midterm delivery! I'm still in the middle of the way, but very happy with the outcome so far. So, I'm very motivated again! Enough talk about me and let's talk about what has been done.

What I did in the last days

Creating function to load / dump locations info
I was studying the files from GTG trying to understand how and where it saved user data. My goal was to save the locations that the user marked in the map. I tried to make a parser, but Parin told me to use an existing file in GTG to deal with save and load, more specifically two functions : _store_pickled_file and _load_pickled_file , which store locations (by converting object into a byte) and allow load this locations (by a byte being converteded in a object). It uses pickle - Python Object Seralization and it turns much more easy to manipulate the data. Thus, the ground is prepared for the next step, which is to add location to a task, and save them to be shown each time a task is opened .


Add / Remove location to/from the task
To develop this feature , the idea was to use the id of each location , which is unique, and get to identify them and save them in a file on disk. Thus, for each location entered, I should keep: name, latitude and longitude.
That gave me some problems: - The first task I add locations works ok, but the second, when a location is added to it, overwrites the first task's name and shows it's location plus previous tasks locations. It was wrong!

    Print with the bad bad behaviour >:/

To fix this,  I create a method to clean-up, and the list of locations and id of the task are setted as a empty list and a empty string, respectively.

    Different tasks and different locations being shown on it

Save the last location 
The purpose is save the user's last location. Thus, when the user is offline, the map could be oppened with latest user's location, facilitating the visualization.

    You are offline and that's your last location


Treat the user location differently than other markers
Here I had to deal with the initial location of the user in a different way from other locations, preventing this initial location to be deleted. The color of this initial location is red, to highlight on the map, and has a different logic: it is set only when the user is online. When the user is offline, it is shown in map. In the future I intend to change that label to something more beautiful.

Treat release button event instead of button press event
This change was made because of the following problem: when the user was setting a marker somewhere, the cursor was changing to drag cursor when it should remain the same hand-opened cursor.
LibChamplain does not handle the button-release-event when button-press-event
is being treated by geolocalized-tasks, keeping the cursor as a closed hand. If we treat the button-release-event, the behavior is according to what we expect.

Show the location description to its name
The last thing I did. I studied the code of gnome-maps and realized that it uses Gnome Geocode Reverse
to get the location name directly from the map. This is very powerful and very cool. You can set a location directly, and it returns the name of the place for you.
I was doing it synchronously, with geocode_reverse-code(). Parin warned me that this could be annoying for a user with slower internet connection and asked me to do this asynchronously (geocode_reverse-code-async).
Thus:

    It's legen...

    ....wait for it...

    ...dary!  ;-)



And final result in a gif



That's it for now. I'm working in the next steps of my planning. If you have any question, something to correct, ask to me, or comment :-)
See you in next post.

quinta-feira, 16 de janeiro de 2014

Technical problem solved!

The problem
I was having a technical problem that was unsolvable to me. It's  about the context menu, that should be hidden on clicking/right-clicking somewhere else.



















Parin told to me to insert some debbugs in the code to try to understand what was happening there.
To resolve it, the ideia was :
to prevent that more then one context menu were created every right mouse click, I have to ensure that the context menu will be closed if another instance of it is opened, in other words, I have to ensure that just one instance of the context menu is open each time it will called.
Thus,  the verification I'm doing is:

            if (self.context is not None):
                self.context.popdown()
                self.context = None

With it, I verify if the context is the only one; if it is not, the context menu is removed and the context is assigned with None.


      Gif to show how it is working well :-)

Parin told me also that a UI file should be used for large UIs and I should create a menu inside my code and add the options right there. Then, I insert the content of UI file in my code.

My branch on github is it, in case you wanna see my progress: https://github.com/elianerpereira/gtg/tree/geolocalized-tasks/GTG/plugins/geolocalized_tasks

If you have any question, let me know.

See you in next post!

domingo, 12 de janeiro de 2014

Welcome 2014, a lot of work to do!

**This post should have been posted last week, but shamefully, it was among the drafts, my mistake :-( **
Me 
I had a little vacation since 12/23/2014 until 01/01/2014 and it was so nice, I've been in Portugal and felt a little close to Brazil, my country :-)

Until now
While I was at the hotel, I was making small adjustments to the plugin, but without internet access, and a use case in which I had not thought about happened: what about the user is without internet access? That was my case and when I ran the program, it returned many errors.
My solution was not make the map available if the user is offiline. Thus, the program becomes more robust. I presented this solution to Parin and he suggested me that I should make the map avaible when the user is offline. And show the last user location. Parin also suggested me to take a look on the ChamplainFileCache, which I had relative performance. I take a look on gnome-maps's code and decide to use ChamplainMapSourceFactory. For now, when the user is offline, a map is shown, but  not the last user's location, yet. I spent a lot of time, searching and reading  to understand what must be done.

Progress
- Now the plugin allows the user to insert and remove markers.\o/
- I also made some fixes to install GTG properly.

To do soon
- Another suggestion from Parin: standardize the cursor to be a drag cursor and only turn the curser in a arrow when the user uses the mouse's right  button, to hold on the map or to make markers on the map.  
- Finish the problem to show the last location for the user when he is without internet acess.
- Integrate direct "tagging" with map's position (add a tag on a existing task)

See you in the next post!


domingo, 22 de dezembro de 2013

And the intership started!

First steps inside the project "Geolocalized Tasks in GTG" 

My first steps into the GTG were aiming to recognize, study and understand how the plugin works. Thus, in order to familiarize myself with GTK3, I have done:
- create a dummy plugin, that prints "Hello World!" to the terminal, when enabled
- add the plugin icon to the Task's toolbar
- show a map inside the dummy plugin
- get the location (using a Parin's code sample) and show the map with the location centered in
- implement zoom-in/zoom-out buttons

Since the internship period started

- I'm using github on the project now :-) For me it's easier to work with something that I already have used before. Here is the link of my repo and the branch I've been working on is geolocalized-tasks.
- The next step were to use (and to reuse the previous existing) UI files to handle with the widgets. Fortunately, they already had a considerable number of reusable "code".
-  I'm basing myself on Gnome Music to work with Python and Gtk Instrospection and Gnome Maps to work with geolocation. Like those projects, I split the Ui file in one file per widget.
I took this decision because when I tried to open one widget, the whole set of widgets were shown, for some reason I didn't understand.
- I had difficulties to show the map, it didn't appear inside the dialog (actually, it appeared, but only as single line), then Glade helped me: through it I could set the minimum height and width that the map would take inside the widget, only by setting properties. It also allowed me to modify/develop interfaces, just by clicking buttons, modifying the widgets properties, without touch the code. Highly recommend to everyone!
- I have discussed, with Parin, some changes about the dialog to assign Task/Tag locations. That was good, because it gave me much to think about. However the changes are still not done. it's simpler than the previous one. It took some time, I had to draw and make use cases, until understand what we need (and let's hope I have it clear now).
- I also have studied ChamplainMarkerLayer to understand how to add tags on the map. This week I've been working on integrate to give to the user the possibility to add/delete a location to/from the map.
- I was having some problems with GTG on my system (I was using Fedora 19). One of the problems was zooming-in with a single mouse click (the system was understanding 2 clicks for a single one). But the worst was related with the geocode-glib, the package is not build to Fedora 19, then, I decided to update my system ... what took me a long time (fedup doesn't work as expected) :-(

quarta-feira, 27 de novembro de 2013

So happy! I was accepted!

Good news!

On tuesday morning, I received an email from Marina Zhurakhinskaya telling that I was accepted to the Outreach Program for Women organized by the GNOME Foundation! It's so cool and I'm really happy with the possibility to work and to learn a lot during my internship period!
I would like to thanks my mentor, Parin Porechafor the great opportunity! I hope live up to his expectations and confidence that was placed in me.

What's my project is about?

My project is to add a plugin to provide "GeoLocalized Tasks" in "Getting Things GNOME". Wait a bit. Is this something new? No! GTG, a long time ago, had this functionality, however it has not been maintained for so long and is not even executable (besides the fact that was still using pyGtk). With the GTG port to Gtk3 came the necessity to rewrite the plugin and here I am :-) 
In this video, you can see the previous plugin working and it is, somehow, what I want to achieve until the end of the project.

Next Steps?

In next post I will talk about what I'm working in the scope of the project.:-)






quarta-feira, 13 de novembro de 2013

First steps

I started study Python on Coursera since September, and was just doing exercises. But I was looking for learn more deeply and I didn't knew how. Then my husband told me about OPW (Outreach Program for Women). Initially, I wasn't confident that I could be part of this program, because I don't have much technical skills with python and other things required for work.
But I started to read about each project and one of them caught my attention:
Geolocalized Tasks Plugin. It required that you learn about Python3, GTK3  and a basic knowledge of GeoClue2 and libchamplain.
We (me and my husband) started to talk with the mentor of this project, Parin, a guy who is always ready to help with doubts to know more about the project, difficulties and another problems. At this time, I became more confident about, at least, try learn something.  :-)

domingo, 3 de novembro de 2013

Hello World!

This is my first post in this blog.
This blog will be the place where I'll try post about  Gnome Outreach Program for Women - OPW, a program to encourage women to contribute with Free Software. It's a really nice idea and I'm hopeful that I'll, a least, learn a lot. :-)