gschem

x_menus.c File Reference

#include "config.h"
#include <missing.h>
#include "gschem.h"
#include <glib/gstdio.h>
Include dependency graph for x_menus.c:

Go to the source code of this file.

Defines

#define MAX_RECENT_FILES   10

Functions

static void g_menu_execute (GtkAction *action, gpointer user_data)
GtkWidget * get_main_menu (GSCHEM_TOPLEVEL *w_current)
static gchar * gettext_fn (const gchar *path, gpointer func_data ATTRIBUTE_UNUSED)
GtkWidget * get_main_popup (GSCHEM_TOPLEVEL *w_current)
gint do_popup (GSCHEM_TOPLEVEL *w_current, GdkEventButton *event)
void x_menus_sensitivity (GSCHEM_TOPLEVEL *w_current, const char *buf, int flag)
void x_menus_popup_sensitivity (GSCHEM_TOPLEVEL *w_current, const char *buf, int flag)
void recent_chooser_item_activated (GtkRecentChooser *chooser, GSCHEM_TOPLEVEL *w_current)
 Callback for recent-chooser.
void x_menu_attach_recent_files_submenu (GSCHEM_TOPLEVEL *w_current)
 Attach a submenu with filenames to the 'Open Recent' menu item.

Variables

static GtkItemFactoryEntry popup_items []
int npopup_items = sizeof(popup_items) / sizeof(popup_items[0])

Define Documentation

#define MAX_RECENT_FILES   10

Definition at line 389 of file x_menus.c.


Function Documentation

static void g_menu_execute ( GtkAction *  action,
gpointer  user_data 
) [static]
Todo:
Finish function documentation!!!
Function Description

Definition at line 68 of file x_menus.c.

Here is the call graph for this function:

GtkWidget* get_main_menu ( GSCHEM_TOPLEVEL w_current)
Todo:
Finish function documentation!!!
Function Description

Bug:
This function may leak memory if there is a non-local exit in Guile code. At some point, unwind handlers need to be added to clean up heap-allocated strings.

Definition at line 91 of file x_menus.c.

Here is the call graph for this function:

static gchar* gettext_fn ( const gchar *  path,
gpointer func_data  ATTRIBUTE_UNUSED 
) [static]
Todo:
Finish function documentation!!!
Function Description

Bug:
Note that we have to discard the 'const' qualifier here to avoid build warnings when gettext is disabled. This is required due to the prototype of the function pointer argument to gtk_item_factory_set_translate_func()

Definition at line 256 of file x_menus.c.

GtkWidget* get_main_popup ( GSCHEM_TOPLEVEL w_current)

Definition at line 266 of file x_menus.c.

Here is the call graph for this function:

gint do_popup ( GSCHEM_TOPLEVEL w_current,
GdkEventButton *  event 
)
Todo:
Finish function documentation!!!
Function Description
Note:
need to look at this... here and the setup

Definition at line 307 of file x_menus.c.

void x_menus_sensitivity ( GSCHEM_TOPLEVEL w_current,
const char *  buf,
int  flag 
)
Todo:
Finish function documentation!!!
Function Description

Definition at line 330 of file x_menus.c.

void x_menus_popup_sensitivity ( GSCHEM_TOPLEVEL w_current,
const char *  buf,
int  flag 
)
Todo:
Finish function documentation!!!
Function Description
This function sets the sensitivity of the items in the right button popup.
Note:
1.9.2005 -- SDB.

Definition at line 362 of file x_menus.c.

void recent_chooser_item_activated ( GtkRecentChooser *  chooser,
GSCHEM_TOPLEVEL w_current 
)

Will be called if element of recent-file-list is activated

Definition at line 395 of file x_menus.c.

Here is the call graph for this function:

void x_menu_attach_recent_files_submenu ( GSCHEM_TOPLEVEL w_current)

Called from x_window_setup().

Definition at line 416 of file x_menus.c.

Here is the call graph for this function:


Variable Documentation

GtkItemFactoryEntry popup_items[] [static]
Initial value:
 {
  { N_("/Add Net"),           NULL, i_callback_add_net,           0, NULL},
  { N_("/Add Attribute..."),  NULL, i_callback_add_attribute,     0, NULL},
  { N_("/Add Component..."),  NULL, i_callback_add_component,     0, NULL},
  { N_("/Add Bus"),           NULL, i_callback_add_bus,           0, NULL},
  { N_("/Add Text"),          NULL, i_callback_add_text,          0, NULL},
  { "/sep1", NULL, NULL, 0, "<Separator>"},
  { N_("/Zoom In"),       NULL, i_callback_view_zoom_in,      0, NULL},
  { N_("/Zoom Out"),      NULL, i_callback_view_zoom_out,     0, NULL},
  { N_("/Zoom Box"),      NULL, i_callback_view_zoom_box,     0, NULL},
  { N_("/Zoom Extents"),  NULL, i_callback_view_zoom_extents, 0, NULL},
  { "/sep1", NULL, NULL, 0, "<Separator>"},
  { N_("/Select"),    NULL, i_callback_edit_select,       0, NULL},
  { N_("/Edit..."),       NULL, i_callback_edit_edit,         0, NULL},
  { N_("/Edit pin type..."),      NULL, i_callback_edit_pin_type,         0, NULL},
  { N_("/Copy"),          NULL, i_callback_edit_copy,         0, NULL},
  { N_("/Move"),          NULL, i_callback_edit_move,         0, NULL},
  { N_("/Delete"),        NULL, i_callback_edit_delete,       0, NULL},
  
  {"/sep1", NULL, NULL, 0, "<Separator>"},
  {N_("/Down Schematic"), NULL, i_callback_hierarchy_down_schematic, 0, NULL},
  {N_("/Down Symbol"),    NULL, i_callback_hierarchy_down_symbol,    0, NULL},
  {N_("/Up"),             NULL, i_callback_hierarchy_up,             0, NULL},
}

Definition at line 36 of file x_menus.c.

int npopup_items = sizeof(popup_items) / sizeof(popup_items[0])

Definition at line 61 of file x_menus.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines