Text samples
[dia.git] / app / diagram_tree_menu_callbacks.c
blobc95488ac43c278b6108296a9053b08045190aa12
1 /* Dia -- a diagram creation/manipulation program
2 * Copyright (C) 1998 Alexander Larsson
4 * diagram_tree_menu_callbacks.c : callbacks for the diagram tree menus.
5 * Copyright (C) 2001 Jose A Ortega Ruiz
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 #ifdef HAVE_CONFIG_H
24 # include <config.h>
25 #endif
27 #include <gtk/gtk.h>
29 #include "diagram_tree_menu_callbacks.h"
30 #include "diagram_tree_menu.h"
31 #include "diagram_tree_window.h"
32 #include "preferences.h"
34 void
35 on_locate_object_activate(gpointer user_data,
36 guint action, GtkMenuItem *menuitem)
39 diagram_tree_raise((DiagramTree *)user_data);
42 void
43 on_properties_activate(gpointer user_data,
44 guint action, GtkMenuItem *menuitem)
46 diagram_tree_show_properties((DiagramTree *)user_data);
49 void
50 on_sort_objects_activate(gpointer user_data,
51 guint action, GtkMenuItem *menuitem)
53 diagram_tree_sort_objects((DiagramTree *)user_data, action);
56 void
57 on_sort_all_objects_activate(gpointer user_data,
58 guint action, GtkMenuItem *menuitem)
60 diagram_tree_sort_all_objects((DiagramTree *)user_data, action);
63 void
64 on_sort_def_activate(gpointer user_data,
65 guint action, GtkMenuItem *item)
67 prefs.dia_tree.obj_sort = action;
68 diagram_tree_set_object_sort_type((DiagramTree *)user_data, action);
71 void
72 on_delete_object_activate(gpointer user_data,
73 guint action, GtkMenuItem *menuitem)
78 void
79 on_locate_dia_activate(gpointer user_data,
80 guint action, GtkMenuItem *menuitem)
82 diagram_tree_raise((DiagramTree *)user_data);
86 void
87 on_sort_diagrams_activate(gpointer user_data,
88 guint action, GtkMenuItem *menuitem)
90 diagram_tree_sort_diagrams((DiagramTree *)user_data, action);
94 void
95 on_sort_dia_def_activate(gpointer user_data,
96 guint action, GtkMenuItem *item)
98 prefs.dia_tree.dia_sort = action;
99 diagram_tree_set_diagram_sort_type((DiagramTree *)user_data, action);
102 void
103 on_hide_object_activate(gpointer user_data,
104 guint action, GtkMenuItem *menuitem)
106 diagram_tree_hide_type((DiagramTree *)user_data);