Clarification on recent deprecations



Based on recent discussion on threads/idles/timeouts, I wonder if I 
could get confirmation that what I'm doing to remove deprecated stuff is correct.

Current Situation:

Ubuntu 10.04

libgtk2.0-dev
3.7.0.is.3.6.7-0ubuntu1

Makefile contains:

CCFLAGS = `pkg-config --cflags gtk+-2.0 gmodule-2.0`
LIBS    = `pkg-config --libs   gtk+-2.0 gmodule-2.0`

I use glade to create the user interface file.

Code contains:

g_thread_init()
gtk_init()
gtk_builder_add_from_file()
g_slice_new()
g_object_unref ()   [to destroy builder]
gtk_main()
g_timeout_add()
G_LOCK_DEFINE_STATIC
g_idle_add()
g_thread_create()
G_LOCK()
G_UNLOCK()

I will go to:

Ubuntu 12.10

libgtk-3-dev
glade 3.14.0-0ubuntu1

Makefile to contain:

LIBS    = `pkg-config --libs   gtk+-3.0 gmodule-2.0`
CCFLAGS = `pkg-config --cflags gtk+-3.0 gmodule-2.0`

Do
 I need to change the link to gmodule-2.0? To be honest, I really don't 
understand what it's for. Is there a good explanation somewhere?

I use glade to create the user interface file.

In my code, I will only replace g_thread_create() with g_thread_new().

Have
 I got it right? My main concern is that the idle function, timeout 
function, and thread calls listed above are still ok, with the one 
change to use g_thread_new().

g_timeout_add() is called from the main iteration.
g_thread_create() is only called from the main iteration.
g_idle_add() is only called from child threads created with g_thread_create() calls in the main iteration.
G_LOCK and G_UNLOCK are called from the child threads mentioned immediately above.
G_LOCK_DEFINE_STATIC was called in the main iteration.

There's one other update on dialogs which is clear to me already.

Dave


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]