Logo Search packages:      
Sourcecode: ygraph version File versions  Download package

void file_select ( Plot plot,
gint  action,
GtkItem *  file_select_button 
)

Creates a file selection dialog box for reading data into the existing window.

Parameters:
plot The Plot to which any new data should be added.
action The action initiating the call.
file_select_button The button initiating the call.

Definition at line 353 of file callbacks.c.

References _Plot::current_directory, and file_select_read().

{
  GtkWidget* fs;

  UNUSED(action);
  UNUSED(file_select_button);
  fs = gtk_file_selection_new(FILE_SELECTION_TITLE);
  gtk_file_selection_set_filename(GTK_FILE_SELECTION(fs),
                                  plot->current_directory);

  gtk_object_set_data(GTK_OBJECT(fs), "plot", plot);
  gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button),
                     "clicked", GTK_SIGNAL_FUNC(file_select_read), fs);
  gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button),
                            "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy),
                            (gpointer) fs);
  gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(fs)->cancel_button),
                            "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy),
                            (gpointer) fs);

  gtk_widget_show(fs);
}


Generated by  Doxygen 1.6.0   Back to index