Skip to content

Commit

Permalink
Fixed archive selector's OK/Cancel buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
rdanbrook committed Nov 18, 2012
1 parent 4dbaf93 commit f944caa
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions source/linux/auxio.cpp
Expand Up @@ -72,14 +72,12 @@ static int find_current_selection(void)
void on_archok_clicked(GtkButton *button, gpointer user_data)
{
run_picker = false;
printf("Got here 1\n");
}

void on_archcancel_clicked(GtkButton *button, gpointer user_data)
{
run_picker = false;
cancelled = true;
printf("Got here 2\n");
}

static gint check_list_double(GtkWidget *widget, GdkEventButton *event, gpointer func_data)
Expand Down Expand Up @@ -699,21 +697,21 @@ int auxio_load_archive(const char *filename, unsigned char **dataout, int *datas
// get the selection object too
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(archtree));

g_signal_connect(G_OBJECT(archcancel), "clicked",
G_CALLBACK(on_archcancel_clicked), NULL);

g_signal_connect(G_OBJECT(archok), "clicked",
G_CALLBACK(on_archok_clicked), NULL);

gtk_widget_show(archselect);
run_picker = true;
cancelled = false;
while (run_picker)
{
gtk_main_iteration_do(FALSE);
gtk_main_iteration_do(TRUE);
}

sel = find_current_selection();

g_signal_connect(G_OBJECT(archcancel), "clicked",
G_CALLBACK(on_archcancel_clicked), NULL);

g_signal_connect(G_OBJECT(archok), "clicked",
G_CALLBACK(on_archok_clicked), NULL);

gtk_widget_destroy(archselect);

Expand Down

0 comments on commit f944caa

Please sign in to comment.