Changes

Jump to: navigation, search

Summer of Code/Zeeshan Khan

1 byte added, 16:54, 17 May 2017
About my project
For Sugar:
# As the PyGI is introduced PyGTK is no longer maintained and hence it is outdated now, so shifting toward PyGI means shifting towards new technology.
# PyGI is better than PYGTK and less maintenance is needed as compared toPyGTK.
# Major activities are divided between the recent distributions of GTK, After Migration of all the files of these activities to GTK3/PyGI, every activity will be running on its latest version with fully updated features.
# Move toward GTK3 will guarantee faster processing and lower memory usage.
activities from Gtk2 to Gtk3. Although there are many more changes which will be
implemented but these are the major ones.
* HippoCanvas removal​ - As HippoCanvas library is no longer maintained, thefirst thing to be done before porting to GTK3 is to remove from all theactivities the use of HippoCanvas library. It would be very difficult to port toGTK3 with HippoCanvas. And HippoCanvas users can easily switch to customGTK container widgets. There are many activities like chat that usesHippoCanvas so it must be removed from these activities.* Adopting the API changes in sugar-toolkit-gtk3 ​- The old API is removedin sugar-toolkit-gtk3. So the activities will be adjusted accordingly, forexample the keep button and the old style toolbar has been removedcompletely, so the activities should not use these.* Porting the activity from GTK2 to GTK3 ​- Starting from changing theimport statement, every call using GTK2 will be changed. All the calls foraccessing services and widgets in the sugar-toolkit-gtk3 will be changed. For example: “from sugar.activity import activity” will be changed to“From sugar3.activity import activity”. Setup.py will also point to the new sugar-toolkit-gtk3.* Constructor considerations ​- Now it is possible with PyGI to usepython-like constructors. And now names must be given to the constructors ifthey takes parameters. Eg : button = Gtk.button(label=”foo”).* Using GtkBox directly than using Vbox and Hbox ​- Hbox and Vbox havebeen deprecated in GTK3 instead of this, GtkBox should be used directly, asHbox and Vbox may get removed in GTK4.* GTK Alignment considerations ​- although the alignment constructor inGTK3 takes optional parameters only, x,y; align,scale, but the default valuesof the parameters are changed in GTK3, so according to the changed valuesof the parameters the codes of different activities will be changed.* Using cairo for drawing ​- In GTK3 Gtk drawable objects are not supported,the GDK drawing API has been removed so all the drawing are done with thehelp of cairo. So the idea is to run the activity under cairo. It also includeschanges when pango is used with cairo, changes when drawing a bitmap andwhen reading pixel from xlib.
* Gtk Widget::draw signal ​- A new draw signal has replaced GtkWidget
expose-event signal, and now the Widget will draw itself using its allocated
size. And all the GtkStyle drawing functions are now changed which will take
a cairo_t instead of a window, and many more. So these changes will all be implemented in the activities proposed.
* Gtk ProgressBar orientation​ - in Gtk3 both the cell renderer and thewidget will implement the GtkOrientable with additional features. There willbe a minute change in the set orientation call. Instead of one call there will betwo calls now.
* No GtkObject​ - GtkObject will not be used in GTK3, as it is removed. The
remaining functionality ”destroy signal” will be now a part of GtkWidgetClass. So changes will be there wherever the Gtk object class is used.
* Other changes ​- It includes changing the syntax for drag and drop andclipboard. GdkColormap will be replaced by GdkVisual. For using GtkPlug and GtkSocket widgets, different headers will be used i.e. (<gtk/gtk3.h>). Scrolling changes will be there. Replacement of size_request By get_preffered_width/height.Constants will be having a different format, allocation property will beChanged, import method for Pixbuff will also change. 
Many changes will be implemented for porting to Gst1.0​ like changes in; Imports,
Gst.init(), element _factory_make(), element_link_many(), Pipeline.add(),

Navigation menu