| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | #include <gtk/gtk.h> |
|---|
| 5 | #include <stdio.h> |
|---|
| 6 | #include "typedefs.h" |
|---|
| 7 | #include "main.h" |
|---|
| 8 | #include "gtkmisc.h" |
|---|
| 9 | #include "mainwnd.h" |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | void create_main_menu (GtkObject *window, GtkWidget *vbox) |
|---|
| 13 | { |
|---|
| 14 | #include "pixmaps/st-new.xpm" |
|---|
| 15 | #include "pixmaps/st-open.xpm" |
|---|
| 16 | #include "pixmaps/st-save.xpm" |
|---|
| 17 | #include "pixmaps/photo.xpm" |
|---|
| 18 | #include "pixmaps/info.xpm" |
|---|
| 19 | #include "pixmaps/st-undo.xpm" |
|---|
| 20 | #include "pixmaps/st-redo.xpm" |
|---|
| 21 | #include "pixmaps/st-cut.xpm" |
|---|
| 22 | #include "pixmaps/st-copy.xpm" |
|---|
| 23 | #include "pixmaps/st-paste.xpm" |
|---|
| 24 | |
|---|
| 25 | GtkWidget *handle_box, *menu_bar, *menu, *menu_in_menu, *item; |
|---|
| 26 | GtkAccelGroup *accel; |
|---|
| 27 | |
|---|
| 28 | accel = gtk_accel_group_new(); |
|---|
| 29 | gtk_window_add_accel_group(GTK_WINDOW(window), accel); |
|---|
| 30 | handle_box = gtk_handle_box_new (); |
|---|
| 31 | gtk_box_pack_start (GTK_BOX (vbox), handle_box, FALSE, FALSE, 0); |
|---|
| 32 | gtk_widget_show (handle_box); |
|---|
| 33 | |
|---|
| 34 | menu_bar = gtk_menu_bar_new (); |
|---|
| 35 | gtk_container_add (GTK_CONTAINER (handle_box), menu_bar); |
|---|
| 36 | gtk_widget_show (menu_bar); |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | menu = create_sub_menu (menu_bar, "_File", accel); |
|---|
| 40 | menu_tearoff (menu); |
|---|
| 41 | |
|---|
| 42 | create_pixmap_menu_item (menu, "_New", st_new, accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 43 | window, LC_FILE_NEW, "menu_file_new"); |
|---|
| 44 | create_pixmap_menu_item (menu, "_Open...", st_open, accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 45 | window, LC_FILE_OPEN, "menu_file_open"); |
|---|
| 46 | create_menu_item (menu, "_Merge...", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 47 | window, LC_FILE_MERGE, "menu_file_merge"); |
|---|
| 48 | menu_separator (menu); |
|---|
| 49 | |
|---|
| 50 | create_pixmap_menu_item (menu, "_Save", st_save, accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 51 | window, LC_FILE_SAVE, "menu_file_save"); |
|---|
| 52 | create_menu_item (menu, "Save _As...", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 53 | window, LC_FILE_SAVEAS, "menu_file_saveas"); |
|---|
| 54 | create_pixmap_menu_item (menu, "Save Pic_ture...", photo, accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 55 | window, LC_FILE_PICTURE, "menu_file_picture"); |
|---|
| 56 | |
|---|
| 57 | menu_in_menu = create_menu_in_menu (menu, "Ex_port", accel); |
|---|
| 58 | create_menu_item (menu_in_menu, "_HTML...", accel, GTK_SIGNAL_FUNC (OnCommandDirect), window, LC_FILE_HTML, "menu_file_html"); |
|---|
| 59 | create_menu_item (menu_in_menu, "_POV-Ray...", accel, GTK_SIGNAL_FUNC (OnCommandDirect), window, LC_FILE_POVRAY, "menu_file_povray"); |
|---|
| 60 | create_menu_item (menu_in_menu, "_Wavefront...", accel, GTK_SIGNAL_FUNC (OnCommandDirect), window, LC_FILE_WAVEFRONT, "menu_file_wavefront"); |
|---|
| 61 | create_menu_item (menu_in_menu, "_VRML97...", accel, GTK_SIGNAL_FUNC (OnCommandDirect), window, LC_FILE_VRML, "menu_file_vrml"); |
|---|
| 62 | create_menu_item (menu_in_menu, "_X3DV...", accel, GTK_SIGNAL_FUNC (OnCommandDirect), window, LC_FILE_X3DV, "menu_file_x3dv"); |
|---|
| 63 | menu_separator (menu); |
|---|
| 64 | |
|---|
| 65 | create_pixmap_menu_item (menu, "Propert_ies...", info, accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 66 | window, LC_MODEL_PROPERTIES, "menu_model_properties"); |
|---|
| 67 | create_menu_item (menu, "Pieces _Library Manager...", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 68 | window, LC_FILE_LIBRARY, "menu_file_library"); |
|---|
| 69 | create_menu_item (menu, "Terrain _Editor...", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 70 | window, LC_FILE_TERRAIN, "menu_file_terrain"); |
|---|
| 71 | menu_separator (menu); |
|---|
| 72 | |
|---|
| 73 | BaseMenuItem base; |
|---|
| 74 | base.accel = accel; |
|---|
| 75 | |
|---|
| 76 | base.widget = create_menu_item (menu, "1", accel, GTK_SIGNAL_FUNC (OnCommand), |
|---|
| 77 | window, ID_FILE_RECENT1, "menu_file_recent1"); |
|---|
| 78 | main_window->SetMenuItem (LC_MAINWND_RECENT1, &base); |
|---|
| 79 | base.widget = create_menu_item (menu, "2", accel, GTK_SIGNAL_FUNC (OnCommand), |
|---|
| 80 | window, ID_FILE_RECENT2, "menu_file_recent2"); |
|---|
| 81 | main_window->SetMenuItem (LC_MAINWND_RECENT2, &base); |
|---|
| 82 | base.widget = create_menu_item (menu, "3", accel, GTK_SIGNAL_FUNC (OnCommand), |
|---|
| 83 | window, ID_FILE_RECENT3, "menu_file_recent3"); |
|---|
| 84 | main_window->SetMenuItem (LC_MAINWND_RECENT3, &base); |
|---|
| 85 | base.widget = create_menu_item (menu, "4", accel, GTK_SIGNAL_FUNC (OnCommand), |
|---|
| 86 | window, ID_FILE_RECENT4, "menu_file_recent4"); |
|---|
| 87 | main_window->SetMenuItem (LC_MAINWND_RECENT4, &base); |
|---|
| 88 | gtk_object_set_data (window, "file_menu_accel", accel); |
|---|
| 89 | |
|---|
| 90 | menu_separator (menu); |
|---|
| 91 | create_menu_item (menu, "E_xit...", accel, GTK_SIGNAL_FUNC (OnCommand), |
|---|
| 92 | window, ID_FILE_EXIT, "menu_file_exit"); |
|---|
| 93 | |
|---|
| 94 | |
|---|
| 95 | menu = create_sub_menu (menu_bar, "_Edit", accel); |
|---|
| 96 | menu_tearoff (menu); |
|---|
| 97 | |
|---|
| 98 | create_pixmap_menu_item (menu, "_Undo", st_undo, accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 99 | window, LC_EDIT_UNDO, "menu_edit_undo"); |
|---|
| 100 | create_pixmap_menu_item (menu, "_Redo", st_redo, accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 101 | window, LC_EDIT_REDO, "menu_edit_redo"); |
|---|
| 102 | menu_separator (menu); |
|---|
| 103 | |
|---|
| 104 | create_pixmap_menu_item (menu, "Cu_t", st_cut, accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 105 | window, LC_EDIT_CUT, "menu_edit_cut"); |
|---|
| 106 | create_pixmap_menu_item (menu, "_Copy", st_copy, accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 107 | window, LC_EDIT_COPY, "menu_edit_copy"); |
|---|
| 108 | create_pixmap_menu_item (menu, "_Paste", st_paste, accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 109 | window, LC_EDIT_PASTE, "menu_edit_paste"); |
|---|
| 110 | menu_separator (menu); |
|---|
| 111 | |
|---|
| 112 | create_menu_item (menu, "Select _All", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 113 | window, LC_EDIT_SELECT_ALL, "menu_edit_select_all"); |
|---|
| 114 | create_menu_item (menu, "Select _None", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 115 | window, LC_EDIT_SELECT_NONE, "menu_edit_select_none"); |
|---|
| 116 | create_menu_item (menu, "Select _Invert", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 117 | window, LC_EDIT_SELECT_INVERT, "menu_edit_select_invert"); |
|---|
| 118 | create_menu_item (menu, "_Select by Name...", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 119 | window, LC_EDIT_SELECT_BYNAME, "menu_edit_select_byname"); |
|---|
| 120 | |
|---|
| 121 | |
|---|
| 122 | menu = create_sub_menu (menu_bar, "_Piece", accel); |
|---|
| 123 | menu_tearoff (menu); |
|---|
| 124 | |
|---|
| 125 | create_menu_item (menu, "_Insert", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 126 | window, LC_PIECE_INSERT, "menu_piece_insert"); |
|---|
| 127 | create_menu_item (menu, "De_lete", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 128 | window, LC_PIECE_DELETE, "menu_piece_delete"); |
|---|
| 129 | create_menu_item (menu, "Minifig Wi_zard...", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 130 | window, LC_PIECE_MINIFIG, "menu_piece_minifig"); |
|---|
| 131 | create_menu_item (menu, "Ar_ray...", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 132 | window, LC_PIECE_ARRAY, "menu_piece_array"); |
|---|
| 133 | menu_separator (menu); |
|---|
| 134 | |
|---|
| 135 | create_menu_item (menu, "_Group", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 136 | window, LC_PIECE_GROUP, "menu_piece_group"); |
|---|
| 137 | create_menu_item (menu, "_Ungroup", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 138 | window, LC_PIECE_UNGROUP, "menu_piece_ungroup"); |
|---|
| 139 | create_menu_item (menu, "Re_move from Group", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 140 | window, LC_PIECE_GROUP_REMOVE, "menu_piece_group_remove"); |
|---|
| 141 | create_menu_item (menu, "A_dd to Group", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 142 | window, LC_PIECE_GROUP_ADD, "menu_piece_group_add"); |
|---|
| 143 | create_menu_item (menu, "Edi_t Groups...", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 144 | window, LC_PIECE_GROUP_EDIT, "menu_piece_group_edit"); |
|---|
| 145 | menu_separator (menu); |
|---|
| 146 | |
|---|
| 147 | create_menu_item (menu, "Hide _Selected", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 148 | window, LC_PIECE_HIDE_SELECTED, "menu_piece_hide_selected"); |
|---|
| 149 | create_menu_item (menu, "Hide U_nselected", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 150 | window, LC_PIECE_HIDE_UNSELECTED, "menu_piece_hide_unselected"); |
|---|
| 151 | create_menu_item (menu, "Unhide _All", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 152 | window, LC_PIECE_UNHIDE_ALL, "menu_piece_unhide_all"); |
|---|
| 153 | |
|---|
| 154 | |
|---|
| 155 | menu = create_sub_menu (menu_bar, "_View", accel); |
|---|
| 156 | menu_tearoff (menu); |
|---|
| 157 | |
|---|
| 158 | create_menu_item (menu, "_Preferences...", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 159 | window, LC_VIEW_PREFERENCES, "menu_view_preferences"); |
|---|
| 160 | menu_separator (menu); |
|---|
| 161 | |
|---|
| 162 | menu_in_menu = create_menu_in_menu (menu, "Tool_bars", accel); |
|---|
| 163 | create_check_menu_item (menu_in_menu, "S_tandard", accel, GTK_SIGNAL_FUNC (OnCommand), |
|---|
| 164 | window, ID_VIEW_TOOLBAR_STANDARD, "menu_view_toolbar_standard"); |
|---|
| 165 | create_check_menu_item (menu_in_menu, "Dra_wing", accel, GTK_SIGNAL_FUNC (OnCommand), |
|---|
| 166 | window, ID_VIEW_TOOLBAR_DRAWING, "menu_view_toolbar_drawing"); |
|---|
| 167 | create_check_menu_item (menu_in_menu, "Ani_mation", accel, GTK_SIGNAL_FUNC (OnCommand), |
|---|
| 168 | window, ID_VIEW_TOOLBAR_ANIMATION, "menu_view_toolbar_animation"); |
|---|
| 169 | create_check_menu_item (menu_in_menu, "Mo_dify", accel, GTK_SIGNAL_FUNC (OnCommand), |
|---|
| 170 | window, ID_VIEW_TOOLBAR_MODIFY, "menu_view_toolbar_modify"); |
|---|
| 171 | create_check_menu_item (menu_in_menu, "_Pieces", accel, GTK_SIGNAL_FUNC (OnCommand), |
|---|
| 172 | window, ID_VIEW_TOOLBAR_PIECES, "menu_view_toolbar_pieces"); |
|---|
| 173 | menu_separator (menu_in_menu); |
|---|
| 174 | create_check_menu_item (menu_in_menu, "_Floating Pieces", accel, GTK_SIGNAL_FUNC (OnCommand), |
|---|
| 175 | window, ID_VIEW_TOOLBAR_FLOATING, "menu_view_toolbar_floating"); |
|---|
| 176 | item = create_radio_menu_item (menu_in_menu, NULL, "Icons _and Text", accel, |
|---|
| 177 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 178 | ID_VIEW_TOOLBAR_BOTH, "menu_view_toolbar_both"); |
|---|
| 179 | item = create_radio_menu_item (menu_in_menu, item, "_Icons only", accel, |
|---|
| 180 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 181 | ID_VIEW_TOOLBAR_ICONS, "menu_view_toolbar_icons"); |
|---|
| 182 | item = create_radio_menu_item (menu_in_menu, item, "Te_xt only", accel, |
|---|
| 183 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 184 | ID_VIEW_TOOLBAR_TEXT, "menu_view_toolbar_text"); |
|---|
| 185 | |
|---|
| 186 | create_menu_item (menu, "Zoom _In", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 187 | window, LC_VIEW_ZOOMIN, "menu_view_zoomin"); |
|---|
| 188 | create_menu_item (menu, "Zoom _Out", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 189 | window, LC_VIEW_ZOOMOUT, "menu_view_zoomout"); |
|---|
| 190 | create_menu_item (menu, "Zoom E_xtents", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 191 | window, LC_VIEW_ZOOMEXTENTS, "menu_view_zoomextents"); |
|---|
| 192 | menu_separator (menu); |
|---|
| 193 | |
|---|
| 194 | create_menu_item (menu, "_Create", accel, GTK_SIGNAL_FUNC (OnCommand), |
|---|
| 195 | window, ID_VIEW_CREATE, "menu_view_create"); |
|---|
| 196 | |
|---|
| 197 | menu_in_menu = create_menu_in_menu (menu, "Vie_wports", accel); |
|---|
| 198 | item = create_radio_menu_pixmap (menu_in_menu, NULL, "vports01.xpm", accel, |
|---|
| 199 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 200 | ID_VIEW_VIEWPORTS_01, "menu_view_viewports_01"); |
|---|
| 201 | item = create_radio_menu_pixmap (menu_in_menu, item, "vports02.xpm", accel, |
|---|
| 202 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 203 | ID_VIEW_VIEWPORTS_02, "menu_view_viewports_02"); |
|---|
| 204 | item = create_radio_menu_pixmap (menu_in_menu, item, "vports03.xpm", accel, |
|---|
| 205 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 206 | ID_VIEW_VIEWPORTS_03, "menu_view_viewports_03"); |
|---|
| 207 | item = create_radio_menu_pixmap (menu_in_menu, item, "vports04.xpm", accel, |
|---|
| 208 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 209 | ID_VIEW_VIEWPORTS_04, "menu_view_viewports_04"); |
|---|
| 210 | item = create_radio_menu_pixmap (menu_in_menu, item, "vports05.xpm", accel, |
|---|
| 211 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 212 | ID_VIEW_VIEWPORTS_05, "menu_view_viewports_05"); |
|---|
| 213 | item = create_radio_menu_pixmap (menu_in_menu, item, "vports06.xpm", accel, |
|---|
| 214 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 215 | ID_VIEW_VIEWPORTS_06, "menu_view_viewports_06"); |
|---|
| 216 | item = create_radio_menu_pixmap (menu_in_menu, item, "vports07.xpm", accel, |
|---|
| 217 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 218 | ID_VIEW_VIEWPORTS_07, "menu_view_viewports_07"); |
|---|
| 219 | item = create_radio_menu_pixmap (menu_in_menu, item, "vports08.xpm", accel, |
|---|
| 220 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 221 | ID_VIEW_VIEWPORTS_08, "menu_view_viewports_08"); |
|---|
| 222 | item = create_radio_menu_pixmap (menu_in_menu, item, "vports09.xpm", accel, |
|---|
| 223 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 224 | ID_VIEW_VIEWPORTS_09, "menu_view_viewports_09"); |
|---|
| 225 | item = create_radio_menu_pixmap (menu_in_menu, item, "vports10.xpm", accel, |
|---|
| 226 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 227 | ID_VIEW_VIEWPORTS_10, "menu_view_viewports_10"); |
|---|
| 228 | item = create_radio_menu_pixmap (menu_in_menu, item, "vports11.xpm", accel, |
|---|
| 229 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 230 | ID_VIEW_VIEWPORTS_11, "menu_view_viewports_11"); |
|---|
| 231 | item = create_radio_menu_pixmap (menu_in_menu, item, "vports12.xpm", accel, |
|---|
| 232 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 233 | ID_VIEW_VIEWPORTS_12, "menu_view_viewports_12"); |
|---|
| 234 | item = create_radio_menu_pixmap (menu_in_menu, item, "vports13.xpm", accel, |
|---|
| 235 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 236 | ID_VIEW_VIEWPORTS_13, "menu_view_viewports_13"); |
|---|
| 237 | item = create_radio_menu_pixmap (menu_in_menu, item, "vports14.xpm", accel, |
|---|
| 238 | GTK_SIGNAL_FUNC (OnCommand), window, |
|---|
| 239 | ID_VIEW_VIEWPORTS_14, "menu_view_viewports_14"); |
|---|
| 240 | |
|---|
| 241 | menu_in_menu = create_menu_in_menu (menu, "_Cameras", accel); |
|---|
| 242 | gtk_object_set_data (window, "cameras_menu", menu_in_menu); |
|---|
| 243 | |
|---|
| 244 | menu_in_menu = create_menu_in_menu (menu, "S_tep", accel); |
|---|
| 245 | create_menu_item (menu_in_menu, "Fi_rst", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 246 | window, LC_VIEW_STEP_FIRST, "menu_view_step_first"); |
|---|
| 247 | create_menu_item (menu_in_menu, "Pre_vious", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 248 | window, LC_VIEW_STEP_PREVIOUS, "menu_view_step_previous"); |
|---|
| 249 | create_menu_item (menu_in_menu, "Ne_xt", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 250 | window, LC_VIEW_STEP_NEXT, "menu_view_step_next"); |
|---|
| 251 | create_menu_item (menu_in_menu, "_Last", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 252 | window, LC_VIEW_STEP_LAST, "menu_view_step_last"); |
|---|
| 253 | menu_separator (menu_in_menu); |
|---|
| 254 | create_menu_item (menu_in_menu, "_Insert", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 255 | window, LC_VIEW_STEP_INSERT, "menu_view_step_insert"); |
|---|
| 256 | create_menu_item (menu_in_menu, "_Delete", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 257 | window, LC_VIEW_STEP_DELETE, "menu_view_step_delete"); |
|---|
| 258 | |
|---|
| 259 | menu = create_sub_menu (menu_bar, "_Help", accel); |
|---|
| 260 | menu_tearoff (menu); |
|---|
| 261 | |
|---|
| 262 | create_menu_item (menu, "_About", accel, GTK_SIGNAL_FUNC (OnCommandDirect), |
|---|
| 263 | window, LC_HELP_ABOUT, "menu_help_about"); |
|---|
| 264 | |
|---|
| 265 | |
|---|
| 266 | item = GTK_WIDGET (gtk_object_get_data (window, "menu_file_new")); |
|---|
| 267 | gtk_widget_add_accelerator (item, "activate", accel, 'N', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); |
|---|
| 268 | item = GTK_WIDGET (gtk_object_get_data (window, "menu_file_open")); |
|---|
| 269 | gtk_widget_add_accelerator (item, "activate", accel, 'O', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); |
|---|
| 270 | item = GTK_WIDGET (gtk_object_get_data (window, "menu_file_save")); |
|---|
| 271 | gtk_widget_add_accelerator (item, "activate", accel, 'S', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); |
|---|
| 272 | item = GTK_WIDGET (gtk_object_get_data (window, "menu_file_exit")); |
|---|
| 273 | gtk_widget_add_accelerator (item, "activate", accel, 'Q', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); |
|---|
| 274 | item = GTK_WIDGET (gtk_object_get_data (window, "menu_edit_undo")); |
|---|
| 275 | gtk_widget_add_accelerator (item, "activate", accel, 'Z', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); |
|---|
| 276 | item = GTK_WIDGET (gtk_object_get_data (window, "menu_edit_redo")); |
|---|
| 277 | gtk_widget_add_accelerator (item, "activate", accel, 'Y', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); |
|---|
| 278 | item = GTK_WIDGET (gtk_object_get_data (window, "menu_edit_cut")); |
|---|
| 279 | gtk_widget_add_accelerator (item, "activate", accel, 'X', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); |
|---|
| 280 | item = GTK_WIDGET (gtk_object_get_data (window, "menu_edit_copy")); |
|---|
| 281 | gtk_widget_add_accelerator (item, "activate", accel, 'C', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); |
|---|
| 282 | item = GTK_WIDGET (gtk_object_get_data (window, "menu_edit_paste")); |
|---|
| 283 | gtk_widget_add_accelerator (item, "activate", accel, 'V', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); |
|---|
| 284 | item = GTK_WIDGET (gtk_object_get_data (window, "menu_piece_array")); |
|---|
| 285 | gtk_widget_add_accelerator (item, "activate", accel, 'R', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); |
|---|
| 286 | item = GTK_WIDGET (gtk_object_get_data (window, "menu_piece_group")); |
|---|
| 287 | gtk_widget_add_accelerator (item, "activate", accel, 'G', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); |
|---|
| 288 | item = GTK_WIDGET (gtk_object_get_data (window, "menu_piece_ungroup")); |
|---|
| 289 | gtk_widget_add_accelerator (item, "activate", accel, 'U', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); |
|---|
| 290 | item = GTK_WIDGET (gtk_object_get_data (window, "menu_piece_group_remove")); |
|---|
| 291 | gtk_widget_add_accelerator (item, "activate", accel, 'M', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); |
|---|
| 292 | item = GTK_WIDGET (gtk_object_get_data (window, "menu_piece_group_add")); |
|---|
| 293 | gtk_widget_add_accelerator (item, "activate", accel, 'D', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); |
|---|
| 294 | } |
|---|