gattrib

x_fileselect.c File Reference

Functions to display file open/save dialog box. More...

#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include <glib.h>
#include <glib-object.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <config.h>
#include <libgeda/libgeda.h>
#include "../include/struct.h"
#include "../include/prototype.h"
#include "../include/globals.h"
Include dependency graph for x_fileselect.c:

Go to the source code of this file.

Functions

static void x_fileselect_setup_filechooser_filters (GtkFileChooser *filechooser)
 Set up file filter for the file chooser.
gboolean x_fileselect_load_files (GSList *filenames)
 Open all files specified in the list.
GSList * x_fileselect_open (void)
 Open file dialog.
void x_fileselect_save (void)
 File save dialog.

Detailed Description

This file holds fcns used to display the file open/save dialog box. It was cloned from x_fileselect.c in gschem/src, and then hacked by SDB for use in gattrib.

Definition in file x_fileselect.c.


Function Documentation

static void x_fileselect_setup_filechooser_filters ( GtkFileChooser *  filechooser) [static]

This fcn creates and sets the file filter for the filechooser.

Parameters:
filechooserGtkFileChooser to set up

Definition at line 84 of file x_fileselect.c.

gboolean x_fileselect_load_files ( GSList *  filenames)

Open all files specified in the list. The caller is responsible for freeing the strings and the list itself.

The function updates the user interface. At the end of the function, the toplevel's current page is set to the page of the last loaded page.

Parameters:
[in]filenameslist of files to be opened
Returns:
FALSE if any of the files could not be opened, TRUE otherwise

Definition at line 124 of file x_fileselect.c.

Here is the call graph for this function:

GSList* x_fileselect_open ( void  )

This function opens a file chooser dialog and waits for the user to select at least one file to load as toplevel's new pages.

Returns:
list of files to be opened, or NULL if the user cancelled the dialog

Definition at line 228 of file x_fileselect.c.

Here is the call graph for this function:

void x_fileselect_save ( void  )

This function opens a file chooser dialog and wait for the user to select a file where the toplevel's current page will be saved.

If the user cancels the operation (with the cancel button), the page is not saved.

The function updates the user interface.

Definition at line 274 of file x_fileselect.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines