GTK3Migration
Documentation :
http://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html
http://www.piware.de/2010/11/gtk-3-0gir-application-porting-successes-and-problems/
example : http://sourceforge.net/tracker/?func=detail&aid=3005736&group_id=156956&atid=801866
Phase 1
Pass GTK2 flags
Add this to debian/rules :
# GTK3 migration
CFLAGS+=-DGTK_DISABLE_SINGLE_INCLUDES
CFLAGS+=-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
CFLAGS+=-DGSEAL_ENABLE
CFLAGS+=-DGDK_PIXBUF_DISABLE_DEPRECATED
CFLAGS+=-DG_DISABLE_DEPRECATED
Phase 2
Prepare patch for the switch to GTK3 (see GNOME documentation)
Replace GdkRegion by cairo_region_t
Replace GdkPixmap by cairo surfaces
Replace colormaps by visuals (GdkColormap)
The GtkWidget::expose-event signal has been replaced by a new "draw" signal
- gtk_progress_bar_set_orientation() replaced
- "hscrollbar-policy" and "vscrollbar-policy" default changed
GtkObject and ::destroy signal removed.
- gtk_statusbar_set_has_resize_grip() and gtk_statusbar_get_has_resize_grip() removed.
Packages state
Core |
P1 |
P2 |
menu-cache |
OK |
|
libfm |
FAIL |
|
pcmanfm |
block by libfm |
|
lxdm |
OK |
|
lxpanel |
FAIL |
|
lxsession |
OK |
|
openbox |
OK |
|
lxterminal |
FAIL |
|
LXDE |
P1 |
P2 |
lxappereance |
OK |
|
lxappereance-obconf-plugin |
OK |
|
gpicview |
|
|
lxinput |
OK |
|
lxlauncher |
|
|
lxrandr |
OK |
|
lxsession-edit |
|
|
lxshortcut |
|
|
lxtask |
|
|
Lubuntu |
P1 |
P2 |
chromium-browser |
|
|
ace-of-penguins |
|
|
galculator |
|
|
gnome-mplayer |
|
|
hardinfo |
|
|
leafpad |
see http://gnomefiles.org/content/show.php/L3afpad?content=144892 |
|
mtpaint |
|
|
osmo |
|
|
scrot |
|
|
sylpheed |
|
|
xchat |
|
|
xpad |
|
|
|
|
|
Quick list of error and how to fix
Use if
#if GTK_CHECK_VERSION(X, X, X)
#else
#endif
‘GtkWidget’ has no member named ‘allocation’
GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
gtk_widget_get_allocation(GTK_WIDGET(widget), allocation);
allocation->width
allocation->y
...
g_free (allocation);
‘GtkWidget’ has no member named ‘window’
gtk_widget_set_window(widget);
gtk_widget_get_window(widget);
implicit declaration of function ‘GDK_DISPLAY’
GDK_DISPLAY_XDISPLAY(gdk_display_get_default())
‘GtkWidget’ has no member named ‘requisition’
GtkRequisition requisition;
gtk_widget_get_requisition(GTK_WIDGET(widget), &requisition);
requisition.width;
requisition.height;
‘GtkWidget’ has no member named ‘style’
gtk_widget_get_style(widget);
‘GTK_CAN_FOCUS’ undeclared (first use in this function)
gtk_widget_set_can_focus(GtkWidget *widget, gboolean can_focus);
‘GTK_CAN_DEFAULT’ undeclared (first use in this function)
gtk_widget_set_can_default(GtkWidget *widget, gboolean can_default);
implicit declaration of function ‘GTK_WIDGET_DRAWABLE’
gtk_widget_is_drawable (GtkWidget *widget);
implicit declaration of function ‘GTK_WIDGET_HAS_FOCUS’
gtk_widget_has_focus (GtkWidget *widget);
GTK_PROGRES
GtkProgressBar and gtk_progress_bar_pulse for ativity mode
LXDE-lubuntu/Developers/GTK3Migration (last edited 2021-05-03 04:40:07 by guiverc)