rem: if (load_file_icons() == FALSE) { Log("unable to load file icons for the camcorder directory listing (not related to regular file dialog boxes)"); return 1; }
add: load_file_icons();
context: int main (int argc, char *argv[]){  /* GtkWidget is the storage type for widgets */    GtkWidget * vbox1, *hbox2, *hbox3, *hbox1, *hbox_progressbar, *hbox_tree, *hbox_label;  GtkWidget* window;  GtkWidget* s_w;  GtkTreeViewColumn *col;  GtkCellRenderer *renderer;  GtkObject* hadjustment, *vadjustment;  //GError* error = NULL;  //camcorder_files_size = 0;  Log("Starting threading...");  g_thread_init(NULL);  gdk_threads_init();  Log("Threading started");  root_directory = NULL;  set_bitrate(0);  /* This is called in all GTK applications. Arguments are parsed   * from the command line and are returned to the application. */  Log("Starting gtk...");  gtk_init (&argc, &argv);  toggle_camera_lcd_screen_is_on = TRUE;   // Handle the command line args  process_args(argc,argv);    if (do_help) {    printf("flags:\n");    printf("-d -- download all movies from the camcorder\n");    printf("-f -- clear camera's movie partition (erase all movies)\n");    printf("-h -- print this help info\n");    printf("Flags may be combined to get a combined effect\n");    exit(0);  } else if (do_download || do_format) {    int ret=0;        if (open_camcorder(NULL,NULL,NULL)) {      if (unlock_camcorder(NULL,NULL,NULL)) {        if (do_download && !download_all_movies(NULL,NULL,NULL)) ret=1;        if (do_format && !format_camcorder(NULL,NULL,NULL)) ret=1;      }      else ret=1;      close_camcorder(NULL,NULL,NULL);    }    else ret=1;        exit(ret);  }    stopwatch = 0;    /* create a new window */  main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);  window = main_window;  gtk_window_set_title (GTK_WINDOW (window), "Ops for linux");  Log("main window created");    /* When the window is given the "delete_event" signal (this is given     * by the window manager, usually by the "close" option, or on the     * titlebar), we ask it to call the delete_event () function     * as defined above. The data passed to the callback     * function is NULL and is ignored in the callback function. */  gtk_signal_connect (GTK_OBJECT (window), "delete_event",GTK_SIGNAL_FUNC(delete_event), NULL);    /* Here we connect the "destroy" event to a signal handler.       * This event occurs when we call gtk_widget_destroy() on the window,     * or if we return FALSE in the "delete_event" callback. */  gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (destroy), NULL);  vbox1 = gtk_vbox_new (FALSE, 0);  hbox2 = gtk_hbox_new (FALSE, 0);  hbox3 = gtk_hbox_new (FALSE, 0);  hbox1 = gtk_hbox_new (FALSE, 0);  hbox_tree = gtk_hbox_new(FALSE,0);  hbox_label = gtk_hbox_new(FALSE, 0);  hbox_progressbar = gtk_hbox_new (FALSE, 0);      gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (vbox1), hbox2, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (vbox1), hbox3, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (vbox1), hbox_progressbar, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (vbox1), hbox_tree, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (vbox1), hbox_label, TRUE, TRUE, 0);  gtk_container_add (GTK_CONTAINER (window), vbox1);    hadjustment = gtk_adjustment_new(0,-1,1,.1,.5,1);  vadjustment = gtk_adjustment_new(0,-1,1,.1,.5,1);    m_directory_tree = gtk_tree_view_new();  //  m_directory_model = NULL;  gtk_widget_set_size_request (m_directory_tree,			       300,			       300);  s_w = gtk_scrolled_window_new(hadjustment, vadjustment);  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(s_w),				  GTK_POLICY_AUTOMATIC,				  GTK_POLICY_AUTOMATIC);  //  gtk_container_set_height (GTK_TREE_VIEW (m_directory_tree), 300);  //ICON COLUMN  col = gtk_tree_view_column_new();  gtk_tree_view_append_column(GTK_TREE_VIEW(m_directory_tree), col);  renderer = gtk_cell_renderer_pixbuf_new();  gtk_tree_view_column_pack_start(col, renderer, FALSE);  gtk_tree_view_column_add_attribute(col, renderer, "pixbuf", COL_ICON);  //COLUMN 1  col = gtk_tree_view_column_new();  gtk_tree_view_column_set_title(col, "filename");  gtk_tree_view_append_column(GTK_TREE_VIEW(m_directory_tree), col);  renderer = gtk_cell_renderer_text_new();  gtk_tree_view_column_pack_start(col, renderer, TRUE);  gtk_tree_view_column_add_attribute(col, renderer, "text", COL_FILENAME);  //COLUMN 2  col = gtk_tree_view_column_new();  gtk_tree_view_append_column(GTK_TREE_VIEW(m_directory_tree), col);  renderer = gtk_cell_renderer_text_new();  gtk_tree_view_column_pack_start(col, renderer, TRUE);    //  gtk_tree_view_column_add_attribute(col, renderer, "text", COL_POINTER);  /*if (!g_thread_create(watch_progress_bar, NULL, FALSE, &error)) {    Log(error->message);    //go without if error    }*/    if (load_file_icons() == FALSE) {     Log("unable to load file icons for the camcorder directory listing (not related to regular file dialog boxes)");    return 1;  }  information_label = gtk_label_new("");  bitrate_label = gtk_label_new("");  m_ctl_progress = gtk_progress_bar_new();    /* Sets the border width of the window. */    //gtk_container_set_border_width (GTK_CONTAINER (window), 10);    /* Creates a new button with the label "Hello World". */  button_capture_video = gtk_button_new_with_label("Capture Video");  button_open_camcorder = gtk_button_new_with_label ("Open Camcorder");  button_unlock = gtk_button_new_with_label ("Unlock");  button_close_camcorder = gtk_button_new_with_label ("Close Camcorder");  button_download_all_movies = gtk_button_new_with_label ("Download All Movies");  button_download_last_movie = gtk_button_new_with_label ("Download Last Movie");  button_delete_file = gtk_button_new_with_label ("Delete File");  button_format_storage = gtk_button_new_with_label ("Format Storage");  button_send_monitor_command = gtk_button_new_with_label ("Send Monitor Command");  button_update_directory_listing = gtk_button_new_with_label ("Update Directory Listing");  button_download_file = gtk_button_new_with_label ("Download file");  button_upload_file = gtk_button_new_with_label ("Upload file");  button_change_camera_settings = gtk_button_new_with_label ("Camera settings");  button_toggle_camera_lcd_screen = gtk_button_new_with_label ("Toggle camera lcd screen");  button_download_memory = gtk_button_new_with_label("Download memory");  button_powerdown_camcorder = gtk_button_new_with_label("Powerdown camcorder");  button_download_flash = gtk_button_new_with_label("Download flash");  button_enable_mass_storage = gtk_button_new_with_label("Enable Mass Storage");  button_get_clock = gtk_button_new_with_label("Get Clock value");    gtk_signal_connect (GTK_OBJECT (button_open_camcorder), "clicked", 		      GTK_SIGNAL_FUNC(open_camcorder), NULL);  gtk_signal_connect (GTK_OBJECT (button_unlock), "clicked",		      GTK_SIGNAL_FUNC(unlock_camcorder), NULL);  gtk_signal_connect (GTK_OBJECT (button_close_camcorder), "clicked",		      GTK_SIGNAL_FUNC(close_camcorder), NULL);  gtk_signal_connect (GTK_OBJECT (button_download_all_movies), "clicked",  		      GTK_SIGNAL_FUNC (download_all_movies), NULL);  gtk_signal_connect (GTK_OBJECT (button_download_last_movie), "clicked",		      GTK_SIGNAL_FUNC(download_last_movie), NULL);  // g_signal_connect (G_OBJECT (button_upload_movie), "clicked",  //	    G_CALLBACK (hello), NULL);  gtk_signal_connect (GTK_OBJECT (button_format_storage), "clicked",		      GTK_SIGNAL_FUNC(format_camcorder), NULL);    gtk_signal_connect_object (GTK_OBJECT (button_close_camcorder), "clicked",			     GTK_SIGNAL_FUNC (gtk_widget_destroy),			     GTK_OBJECT (window));  gtk_signal_connect (GTK_OBJECT (button_send_monitor_command), "clicked",		      GTK_SIGNAL_FUNC(send_monitor_command), NULL);  gtk_signal_connect (GTK_OBJECT (button_update_directory_listing), "clicked",		      GTK_SIGNAL_FUNC(update_directory_listing), NULL);  gtk_signal_connect (GTK_OBJECT (button_download_file), "clicked",		      GTK_SIGNAL_FUNC(download_file), NULL);  gtk_signal_connect (GTK_OBJECT (button_upload_file), "clicked",		      GTK_SIGNAL_FUNC(upload_file), NULL);  gtk_signal_connect (GTK_OBJECT (button_delete_file), "clicked",		      GTK_SIGNAL_FUNC(delete_file), NULL);  gtk_signal_connect (GTK_OBJECT (m_directory_tree), "cursor-changed", /* "row-activated",*/		      GTK_SIGNAL_FUNC(reset_label), NULL);  gtk_signal_connect (GTK_OBJECT (button_toggle_camera_lcd_screen), "clicked",		      GTK_SIGNAL_FUNC(toggle_camera_lcd_screen), NULL);  gtk_signal_connect (GTK_OBJECT (button_download_memory), "clicked",		      GTK_SIGNAL_FUNC(download_memory), NULL);  gtk_signal_connect (GTK_OBJECT (button_powerdown_camcorder), "clicked",		      GTK_SIGNAL_FUNC(powerdown_camcorder), NULL);  gtk_signal_connect (GTK_OBJECT (button_capture_video), "clicked",		      GTK_SIGNAL_FUNC(capture_video), NULL);  gtk_signal_connect (GTK_OBJECT (button_change_camera_settings), "clicked",		      GTK_SIGNAL_FUNC(change_camera_settings), NULL);  gtk_signal_connect (GTK_OBJECT (button_download_flash), "clicked",		      GTK_SIGNAL_FUNC(download_flash), NULL);  gtk_signal_connect (GTK_OBJECT (button_enable_mass_storage), "clicked",		      GTK_SIGNAL_FUNC(enable_mass_storage), NULL);  gtk_signal_connect(GTK_OBJECT(button_get_clock), "clicked",		     GTK_SIGNAL_FUNC(get_clock), NULL);    gtk_box_pack_start (GTK_BOX (hbox1), button_open_camcorder, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox1), button_unlock, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox1), button_close_camcorder, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox1), button_powerdown_camcorder, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox2), button_download_all_movies, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox2), button_download_last_movie, TRUE, TRUE, 0);    gtk_box_pack_start (GTK_BOX (hbox2), button_delete_file, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox2), button_capture_video, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox2), button_change_camera_settings, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox2), button_enable_mass_storage, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox3), button_format_storage, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox_progressbar), m_ctl_progress, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox3), button_send_monitor_command, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox3), button_download_file, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox_tree), s_w, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox3), button_upload_file, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox3), button_download_flash, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox_label), information_label, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox_label), bitrate_label, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox_label), button_toggle_camera_lcd_screen, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox_label), button_get_clock, TRUE, TRUE, 0);  gtk_container_add (GTK_CONTAINER (s_w), m_directory_tree);  //  gtk_box_pack_start (GTK_BOX (s_w),   gtk_box_pack_start (GTK_BOX (hbox_tree), button_update_directory_listing, TRUE, TRUE, 0);  gtk_box_pack_start (GTK_BOX (hbox_tree), button_download_memory, TRUE, TRUE, 0);  /*  gtk_widget_show (button_open_camcorder);  gtk_widget_show (button_unlock);  gtk_widget_show (button_close_camcorder);  gtk_widget_show (button_download_all_movies);  gtk_widget_show (button_download_last_movie);  gtk_widget_show (button_upload_movie);  gtk_widget_show (button_change_camera_settings);  gtk_widget_show (button_format_storage);  gtk_widget_show (m_ctl_progress);  gtk_widget_show (m_directory_tree);  gtk_widget_show (button_send_monitor_command);  gtk_widget_show (button_update_directory_listing);  gtk_widget_show (hbox1);  gtk_widget_show (hbox2);  gtk_widget_show (hbox3);  gtk_widget_show (hbox_progressbar);  gtk_widget_show (hbox_tree);  gtk_widget_show (vbox1);*/  gtk_widget_show_all (window);  //  gdk_threads_enter();  //  m_progressbar_fraction = 0; // 0 % complete :)  gtk_timeout_add(REFRESH_DATA_MS,GTK_SIGNAL_FUNC(watch_progress_bar), NULL);    //if (!g_thread_create(watch_progress_bar, NULL, FALSE, &error)) {  //Log(error->message);    //go without if error  //}   gdk_threads_enter();  gtk_main ();  gdk_threads_leave();  return 0;}