Things to improve in GtkTextView

For the past few years we have got a lot of people asking us (the gedit team) why we did not provide a way to split a document and visualize it with several GtkTextViews. In this post I will point out the three problems that stop us from doing it.

  • The cursor follows the insert mark from the TextBuffer.
  • The selection is managed in relation to the insert mark and the selection-bound mark.
  • The invisible tags are managed per document.
Why is this a problem?
  • Well right now the invisible tags are not a big problem as we don’t support code folding yet, but probably we will do it soon, although in relation to the inser and the selection it is pointless to split a document and use it from several views if you are editing a document and both views are following the cursor no matter if you are in one view or another.
What would be the way to fix this?
  • To manage the insert and selection-bound marks the GtkTextView should a per view-insert and view-selction-bound marks and follow only the ones set by it. The view should also modify the insert and selection-bound marks from the TextBuffer so this ones follow the ones from the view.
  • In relation to the invisible tags, I am not totally sure how the best way would be for this. Probably doing something similar as with the marks.
With this post I just wanted to point out these problems in case somebody wants to fix them :)
Posted in Uncategorized | 2 Comments

New things in gedit-cossa

Maybe this is not as awesome as the post from jesse, but I think it is worth to tell about it. With the new addition in GTK+ for reporting the position of the parsing error in the CSS provider, we can now edit the file and check the errors when we save the file or when we reload the theme preview. By the way, this has been already released and it is packed for fedora 16.

Posted in Uncategorized | 2 Comments

[announce] pygobject 2.90.3 released

I am pleased to announce version 2.90.3 of the Python bindings for GObject.

The new release is available from ftp.gnome.org:

http://download.gnome.org/sources/pygobject/2.90/

What’s new since PyGObject 2.90.2?

  • support skip annotation for return values (John (J5) Palmieri)
  • Test GPtrArray regression (Xavier Claessens)
  • Drop support for old constructor style. (Steve Frécinaux)
  • Drop support for sink functions. (Steve Frécinaux)
  • Reinstate copying of in-line structs in arrays (Mike Gorse)
  • fix inline struct array handling (John (J5) Palmieri)
  • fix on demos (Dieter Verfaillie)
  • Added support for __setitem__ to TreeModel and support for slices to TreeModelRow (Sebastian Pölsterl)
  • Convert ACCEL_* constants into Gtk.AccelFlags. (Olav Vitters)
  • Convert TREE_VIEW_DROP_* constants into Gtk.TreeViewDropPosition (Olav Vitters)
WARNING: This release has broken the ABI so any library like libpeas must be rebuilt.

Blurb:

GObject is a object system library used by GTK+ and GStreamer.

PyGObject provides a convenient wrapper for the GObject library for use in Python programs, and takes care of many of the boring details such as managing memory and type casting.

Like the GObject library itself PyGObject is licensed under the GNU LGPL, so is suitable for use in both free software and proprietary applications. It is already in use in many applications ranging from small single purpose scripts up to large full featured applications.

PyGObject requires glib >= 2.22.4 and Python >= 2.5.1 to build.

Introspection/Python 2 bindings requires gobject-introspection >= 0.9.5 and pycairo >=1.0.2 or py2cairo >=1.8.10

Introspection/Python 3 bindings requires gobject-introspection >= 0.9.5, pycairo >=1.8.10 and Python >= 3.1

Posted in Uncategorized | 1 Comment

Blame mode for gitg

So these days I was a bit tired of documenting my final degree project and I started to work a little on gitg. For those who don’t know what is gitg, gitg is a git repository viewer for GNOME. I really love this project and I contributed some time before too.

This time I decided to provide the blame mode which in ready in my github. Here is the screenshot, I hope you will like it:

Posted in Uncategorized | 5 Comments

[Announce] pygobject 2.28.6 released

I am pleased to announce version 2.28.6 of the Python bindings for GObject.

The new release is available from ftp.gnome.org:

http://download.gnome.org/sources/pygobject/2.28/

What’s new since PyGObject 2.28.4?

  • closure: avoid double free crash (Ignacio Casal Quinteiro)
  • [gi] backport of “GVariant has a GType” fe386a (John (J5) Palmieri)
  • [gi] fixes to backport commit 6b5a65 – in older glib GVariants are still structs (John (J5) Palmieri)
  • GVariantType is a boxed struct (Tomeu Vizoso)
  • Use _gi.Struct to wrap fundamentals (Tomeu Vizoso)
  • Added __eq__ method for Gdk.Color and Gdk.RGBA (Jason Siefken)
  • Remove useless import (Ignacio Casal Quinteiro)
  • Revert “[gi] Removed hack to avoid using GLib.Variant.new_variant.” (Ignacio Casal Quinteiro)
  • closure: Check the out arg is not null. Fixes bug #651812 (Ignacio Casal Quinteiro)
  • Fix GC-related crash during PyGObject deallocation (Daniel Drake)
  • Fix symbol names to be locale independent (Martin Pitt)
  • Updated DOAP file (Sebastian Pölsterl)

Blurb:

GObject is a object system library used by GTK+ and GStreamer.

PyGObject provides a convenient wrapper for the GObject library for use in Python programs, and takes care of many of the boring details such as managing memory and type casting. When combined with PyGTK, PyORBit and gnome-python, it can be used to write full featured Gnome 2 applications.

Like the GObject library itself PyGObject is licensed under the GNU LGPL, so is suitable for use in both free software and proprietary applications. It is already in use in many applications ranging from small single purpose scripts up to large full featured applications.

PyGObject requires glib >= 2.22.4 and Python >= 2.5.1 to build.
GIO bindings require glib >= 2.22.4.

The Introspection module is the next generation Python GObject library bindings. Instead of statically wrapping every GObject based library we can now dynamically accesses any of those libraries using GObject Introspection. It replaces the need for separate modules such as PyGTK, GIO and python-gnome to build a full GNOME 3.0 application. Once new functionality is added to gobject library it is instantly available as a Python API without the need for an intermediate Python module.

Introspection/Python 2 bindings requires gobject-introspection >= 0.9.5 and pycairo >=1.0.2 or py2cairo >=1.8.10
Introspection/Python 3 bindings requires gobject-introspection >= 0.9.5, pycairo >=1.8.10 and Python >= 3.1

Posted in Uncategorized | Comments Off

GNOME 3.0

I just wanted to say that after so much work is really good to see GNOME 3.0 something real, I am really proud for all the work made and I would like to thank everybody for this release.

Also I wanted to say that:

Posted in Uncategorized | Comments Off

Introducing GeditOverlay/GeditAnimatedOverlay

GeditOverlay is a new GtkContainer similar to GtkFixed but that only allows you to put the childs in specific positions, north-west/east, south-west/east etc. Apart from this, this container is based on the main-widget idea. Where all the requesitions and allocations are proxied from the main widget or relative widget attached.

The idea of this was in my summer of code when I decided to port the monodevelop’s animated popup to C. With the new solitudes that I had in the last weeks to make it animation-less we decided to improve it a little and create a GeditOverlay (without any animation) and GeditAnimatedOverlay that inherits from GeditOverlay and helps to provide animation specifics to the widgets implementing the GeditAnimatable interface.

To use this new widgets you can check it out from the gedit repository. The main classes are:

  • GeditOverlay: main container
  • GeditOverlayChild: this is the widget added to GeditOverlay. You will only want to create this widget if you want to animate it or make it themeable in some way. Usually you don’t have to care about it as GeditOverlay creates it for you if you are not passing one widget of this type.
  • GeditAnimatedOverlay: container inheriting from GeditOverlay where you can add widget implementing GeditAnimatable
  • GeditFloatingSlider: widget inheriting from GeditOverlayChild and implementing GeditAnimatable that provides a slide/in/out animation
  • NautilusFloatingBar: (this one in the nautilus repository) which inherits from GeditOverlayChild and provides a themed floating widget and loading visualizations

Also say that currently there are already a few applications using this: gedit, epiphany and nautilus and we hope to get it included in gtk+ 3.2

I would also like to thank Xan and Cosimo for all the help provided on making this code more polished and fixing a lot of bugs.

Posted in Uncategorized | 7 Comments

In the Python hackfest 2011

Hey everybody, I wanted to say in this post that this week I will be in Prague working on trying to get gedit ported to python introspection. So far we are having quite some progress on fixing the problems that I am finding making this work, so hopefully we will have our well known beloved gedit ;) ready for GNOME 3.0.
Even if the travel until here was quite long, I am having good moments with my mates. It is quite amazing that I finally get to know people like Steve, as we were working together for years but we did not meet in person until now.
I would like to thank the GNOME Foundation for sponsoring my travel and the hotel and I would like to thank also Collabora for all the beers that we are having. Because as you should know, nothing like a couple of beers in the night after a hard work day to get relaxed and be ready for the next hacking day :)
I also would like to encourage people to come to some hackfest as it is really good experience.

Posted in Uncategorized | 1 Comment

gtranslator meets gtk+ 3 and beer meeting in prague

Just inform that I invested the past two weeks porting gtranslator to the last new cool things around. So far is using GtkApplication, GSettings (already in the last release), libpeas, which means that you will able to have python plugins now, and all the new gtk+ 3 porting stuff needed to make it build. There are still some plugins that need to be ported to libpeas but it is not a blocking thing.

With this I want to call the translators to try either the git version or the last release using gtk+ 2 that already uses GSettings, and tell the impressions that they can have about it and of course fill some bugs. I know that the profile creation already sucks but it is something that you will do just once, so that’s why I didn’t get into do it more automagically.

Apart from this I have also been in Prague this past weekend and I managed to meet this great guys, probably you already know them, tomeu in the center and andre in the right. So as you can see in the photo we were working hardly that day :P Thank you guys for the chatting and the beers by the way :)

Posted in Uncategorized | 4 Comments

In Poland and some hacking

Hey folks, as a new experience in my life I’ll be in Poland doing the Erasmus the whole year, so if anybody from there wants to have a beer, coffee or something please let me know. I’ll be mainly in Bielsko-biala but probably I’ll visit quite frecuently Krakow.

In relation to the hack I’ve been doing this week before arriving to Poland, just tell that gtranslator is now ported to GSettings and that gedit has now the new search dialog in master. So please test it and report bugs :)

Posted in Uncategorized | 16 Comments