Commit 567faf5f authored by Arnaud Blanchard's avatar Arnaud Blanchard

Fix synchro problem. Still some check to do

parent c3d99649
This diff is collapsed.
......@@ -56,7 +56,6 @@ void on_key_press(GtkWidget *widget, GdkEventKey *event){
void activate_cb(GApplication *app)
{
blc_channel *input;
char tmp_title[NAME_MAX*2+1];
GtkWidget *display=NULL;
GtkWidget *grid;
......@@ -72,9 +71,9 @@ void activate_cb(GApplication *app)
grid=gtk_grid_new();
// for(i=0; input_names[i]; i++){ This is for displaying multiple images
input=new blc_channel(/*input_names[i]*/ input_name, BLC_CHANNEL_READ);
display=create_image_display(input);
if (display==NULL) EXIT_ON_CHANNEL_ERROR(input, "Format not managed.");
// input=new blc_channel(/*input_names[i]*/ input_name, BLC_CHANNEL_READ);
display=create_image_display(&input);
if (display==NULL) EXIT_ON_CHANNEL_ERROR(&input, "Format not managed.");
gtk_widget_set_hexpand(display, 1);
gtk_widget_set_vexpand(display, 1);
gtk_container_add(GTK_CONTAINER(grid), display);
......@@ -83,7 +82,6 @@ void activate_cb(GApplication *app)
gtk_widget_show_all(window);
if (keyboard_mode) g_signal_connect(G_OBJECT(window), "key_press_event", G_CALLBACK (on_key_press), NULL);
blc_command_loop_init(0);
}
/** Classical GTK application.
......@@ -106,9 +104,10 @@ int main(int argc, char *argv[])
blc_program_init(&argc, &argv, ask_quit);
input.open(input_name, mode);
blc_loop_try_add_waiting_semaphore(input.sem_new_data);
blc_loop_try_add_posting_semaphore(input.sem_ack_data);
/*
while (sem_trywait(input.sem_ack_data)==0);
while (sem_trywait(input.sem_new_data)==0);
*/
gtk_disable_setlocale();
gtk_init(&argc, &argv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment