View Single Post
jaeezzy's Avatar
Posts: 664 | Thanked: 160 times | Joined on Jul 2008 @ Australia
#5
Now I've found other reason why the desktop widget is making the maemo launcher/hildon-desktop to crash. I think these are the bugs:

1) I just copied the example from libhildondesktop-2.1.28+0m5 and just changed the label to button and when clicking it make the maemo-launcher or the hildon-desktop to crash with the message like I've posted in my #4 post.

2) Using g_dir_open()/g_dir_close() causing it to crash. Here's the code and its called from within the example_label_home_applet_init(ExampleLabelHomeApp let *applet){} method:

Code:
static void populate_image_list(Data *data){
	GDir *dir;
	const gchar *directory = data->directory;
	const gchar *filename;
	g_print("Directory to get files from: %s\n", directory);
	g_dir_open(directory, 0, NULL);
	g_print("%s directory opened.\n", directory);
	for (; filename = g_dir_read_name(dir); ){
		if (g_str_has_suffix(filename, ".jpg") ||
			g_str_has_suffix(filename, ".JPG") ||
			g_str_has_suffix(filename, ".gif") ||
			g_str_has_suffix(filename, ".GIF") ||
			g_str_has_suffix(filename, ".png") ||
			g_str_has_suffix(filename, ".PNG")){
				
			gchar *path = g_strconcat(directory, "/", filename, NULL);
			g_print("%s\n", path);
			data->list = g_list_prepend(data->list, path);
			data->total_images++;
		}
	}
       g_dir_close(dir);
}
  • hildon-desktop displays no other widgets either and I get the following error message in the terminal:
[sbox-FREMANTLE_X86: ~/gtk_codes] > Directory to get files from: /scratchbox/users/jay/home/jay/photoapplet
/scratchbox/users/jay/home/jay/photoapplet directory opened.
maemo-launcher: child (pid=6062) terminated due to signal=11
hildon-desktop[6060]: GLIB WARNING ** default - mb_wm_client_window_sync_properties: X error 3
hildon-desktop[6060]: GLIB WARNING ** default - mb_wm_client_window_sync_properties: X error 3


I'm not sure what these problems are but I'm dead stuck with this so if anyone can give me any suggestion or anything I would be very grateful. Thanks