as was suggested by the other post, i'll ask new question, more specific one.
GtkWidget *button[] /*to be a dynamic array */
void file_folder(GtkWidget *widget, gpointer data)
{
GtkWidget* dialog;
dialog = gtk_file_chooser_dialog_new("Choose a file", GTK_WINDOW(data),
GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_OK, GTK_RESPONSE_OK,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
gtk_widget_show_all(dialog);
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), "/home/demo/Downloads");
gint resp = gtk_dialog_run(GTK_DIALOG(dialog));
if(resp == GTK_RESPONSE_OK)
{
/*select file to execute*/
g_print("Success\n");
gtk_widget_destroy(dialog);
}
else
{
gtk_widget_destroy(dialog);
}
}
How can I execute the file selected
and how can I create this dynamic array which will contain:
app name, app icon and executable (assuming that I am developing on ubuntu).