-void MainFrame::create_main_menu (GtkWidget *window, GtkWidget *vbox)
-{
- GtkWidget *handle_box, *menu_bar, *menu, *menu_in_menu, *menu_3, *item;
- GtkAccelGroup *accel;
-
- g_bIgnoreCommands++;
- accel = gtk_accel_group_new ();
- global_accel = accel;
- gtk_window_add_accel_group (GTK_WINDOW (window), accel);
-
- handle_box = gtk_handle_box_new ();
- gtk_box_pack_start (GTK_BOX (vbox), handle_box, FALSE, FALSE, 0);
- gtk_widget_show (handle_box);
-
- menu_bar = gtk_menu_bar_new ();
- gtk_container_add (GTK_CONTAINER (handle_box), menu_bar);
- gtk_widget_show (menu_bar);
-
- // File menu
- menu = create_sub_menu_with_mnemonic (menu_bar, _("_File"));
- if (g_PrefsDlg.m_bDetachableMenus)
- menu_tearoff (menu);
-
- create_menu_item_with_mnemonic (menu, _("_New Map"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_NEW);
- menu_separator (menu);
-
- //++timo temporary experimental stuff for sleep mode..
- item = create_menu_item_with_mnemonic (menu, _("_Sleep"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_SLEEP);
- g_object_set_data (G_OBJECT (window), "menu_file_sleep", item );
- menu_separator (menu);
- // end experimental
-
- item = create_menu_item_with_mnemonic (menu, _("_Open..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_OPEN);
- g_object_set_data (G_OBJECT (window), "menu_file_open", item);
- create_menu_item_with_mnemonic (menu, _("_Import..."), // Hydra: give it it's proper name
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_IMPORTMAP);
- item = create_menu_item_with_mnemonic (menu, _("_Save"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_SAVE);
- g_object_set_data (G_OBJECT (window), "menu_file_save", item);
- create_menu_item_with_mnemonic (menu, _("Save _as..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_SAVEAS);
- create_menu_item_with_mnemonic (menu, _("Save s_elected..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_EXPORTMAP);
- menu_separator (menu);
- item = create_menu_item_with_mnemonic (menu, _("Save re_gion..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_SAVEREGION);
- g_object_set_data (G_OBJECT (window), "menu_file_saveregion", item);
- menu_separator (menu);
- create_menu_item_with_mnemonic (menu, _("New p_roject..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_NEWPROJECT);
- create_menu_item_with_mnemonic (menu, _("Load _project..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_LOADPROJECT);
- create_menu_item_with_mnemonic (menu, _("Pro_ject settings..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_PROJECTSETTINGS);
- menu_separator (menu);
- create_menu_item_with_mnemonic (menu, _("_Pointfile..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_POINTFILE);
- menu_separator (menu);
- item = create_menu_item_with_mnemonic (menu, _("Recent Files"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_RECENT1);
- g_object_set_data (G_OBJECT (item), "accel", accel);
- gtk_widget_set_sensitive (item, FALSE);
- MRU_AddWidget (item, 0);
- item = create_menu_item_with_mnemonic (menu, "2",
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_RECENT2);
- gtk_widget_hide (item);
- MRU_AddWidget (item, 1);
- item = create_menu_item_with_mnemonic (menu, "3",
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_RECENT3);
- gtk_widget_hide (item);
- MRU_AddWidget (item, 2);
- item = create_menu_item_with_mnemonic (menu, "4",
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_RECENT4);
- gtk_widget_hide (item);
- MRU_AddWidget (item, 3);
- menu_separator (menu);
- item = create_menu_item_with_mnemonic (menu, _("Check for GtkRadiant update (web)"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_CHECKUPDATE);
- // disable, the functionality is no longer available
- gtk_widget_set_sensitive( item, FALSE );
-
- create_menu_item_with_mnemonic (menu, _("E_xit"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_FILE_EXIT);
-
- // Edit menu
- menu = create_sub_menu_with_mnemonic (menu_bar, _("_Edit"));
- if (g_PrefsDlg.m_bDetachableMenus)
- menu_tearoff (menu);
- item = create_menu_item_with_mnemonic (menu, _("_Undo"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_EDIT_UNDO);
- g_object_set_data (G_OBJECT (window), "menu_edit_undo", item);
- item = create_menu_item_with_mnemonic (menu, _("_Redo"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_EDIT_REDO);
- g_object_set_data (G_OBJECT (window), "menu_edit_redo", item);
- menu_separator (menu);
- item = create_menu_item_with_mnemonic (menu, _("_Copy"), GTK_SIGNAL_FUNC (HandleCommand), ID_EDIT_COPYBRUSH);
- item = create_menu_item_with_mnemonic (menu, _("_Paste"), GTK_SIGNAL_FUNC (HandleCommand), ID_EDIT_PASTEBRUSH);
- item = create_menu_item_with_mnemonic (menu, _("P_aste To Camera"), GTK_SIGNAL_FUNC (HandleCommand), ID_EDIT_PASTEBRUSHTOCAMERA);
- item = create_menu_item_with_mnemonic (menu, _("_Delete"), GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_DELETE);
- g_object_set_data (G_OBJECT (window), "menu_selection_delete", item);
- menu_separator (menu);
- create_menu_item_with_mnemonic (menu, _("Map Info..."), GTK_SIGNAL_FUNC (HandleCommand), ID_EDIT_MAPINFO);
- create_menu_item_with_mnemonic (menu, _("Entity Info..."), GTK_SIGNAL_FUNC (HandleCommand), ID_EDIT_ENTITYINFO);
- menu_separator (menu);
- create_menu_item_with_mnemonic (menu, _("Brush Scripts..."), GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_SCRIPTS);
- menu_separator (menu);
- create_menu_item_with_mnemonic (menu, _("Load Pre_fab..."), GTK_SIGNAL_FUNC (HandleCommand), ID_EDIT_LOADPREFAB);
- create_menu_item_with_mnemonic (menu, _("Save Selection as Prefab..."), GTK_SIGNAL_FUNC (HandleCommand), ID_EDIT_SAVEPREFAB);
- menu_separator (menu);
- create_menu_item_with_mnemonic (menu, _("Preferences..."), GTK_SIGNAL_FUNC (HandleCommand), ID_PREFS);
-
- // View menu
- menu = create_sub_menu_with_mnemonic (menu_bar, _("_View"));
- if (g_PrefsDlg.m_bDetachableMenus)
- menu_tearoff (menu);
-
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Toggle"));
- create_menu_item_with_mnemonic (menu_in_menu, _("Camera View"), GTK_SIGNAL_FUNC (HandleCommand), ID_TOGGLECAMERA);
- create_menu_item_with_mnemonic (menu_in_menu, _("Console View"), GTK_SIGNAL_FUNC (HandleCommand), ID_TOGGLECONSOLE);
- item = create_menu_item_with_mnemonic (menu_in_menu, _("Entity View"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_ENTITY);
- g_object_set_data (G_OBJECT (window), "menu_view_entity", item);
- // create_menu_item_with_mnemonic (menu_in_menu, "Groups View", GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_GROUPS);
- create_menu_item_with_mnemonic (menu_in_menu, _("XY (Top)"), GTK_SIGNAL_FUNC (HandleCommand), ID_TOGGLEVIEW);
- create_menu_item_with_mnemonic (menu_in_menu, _("YZ (Side)"), GTK_SIGNAL_FUNC (HandleCommand), ID_TOGGLEVIEW_YZ);
- create_menu_item_with_mnemonic (menu_in_menu, _("XZ (Front)"), GTK_SIGNAL_FUNC (HandleCommand), ID_TOGGLEVIEW_XZ);
- create_menu_item_with_mnemonic (menu_in_menu, _("Z View"), GTK_SIGNAL_FUNC (HandleCommand), ID_TOGGLEZ);
- menu_separator (menu);
- item = create_menu_item_with_mnemonic (menu, _("_Center"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_CENTER);
- item = create_menu_item_with_mnemonic (menu, _("_Center 2d"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_CENTERVIEW);
- item = create_menu_item_with_mnemonic (menu, _("_Up Floor"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_UPFLOOR);
- item = create_menu_item_with_mnemonic (menu, _("_Down Floor"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_DOWNFLOOR);
- menu_separator (menu);
- item = create_menu_item_with_mnemonic (menu, _("_Next (XY, YZ, XY)"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_NEXTVIEW);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Layout"));
- create_menu_item_with_mnemonic (menu_in_menu, _("XY (Top)"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_XY);
- create_menu_item_with_mnemonic (menu_in_menu, _("YZ"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_SIDE);
- create_menu_item_with_mnemonic (menu_in_menu, _("XZ"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_FRONT);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Zoom"));
- create_menu_item_with_mnemonic (menu_in_menu, _("_XY 100%"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_100);
- item = create_menu_item_with_mnemonic (menu_in_menu, _("XY Zoom _In"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_ZOOMIN);
- item = create_menu_item_with_mnemonic (menu_in_menu, _("XY Zoom _Out"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_ZOOMOUT);
- menu_separator (menu_in_menu);
- create_menu_item_with_mnemonic (menu_in_menu, _("_Z 100%"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_Z100);
- item = create_menu_item_with_mnemonic (menu_in_menu, _("Z Zoo_m In"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_ZZOOMIN);
- g_object_set_data (G_OBJECT (window), "menu_view_zzoomin", item);
- item = create_menu_item_with_mnemonic (menu_in_menu, _("Z Zoom O_ut"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_ZZOOMOUT);
- g_object_set_data (G_OBJECT (window), "menu_view_zzoomout", item);
- menu_separator (menu_in_menu);
- item = create_menu_item_with_mnemonic (menu_in_menu, _("Cubic Clip Zoom In"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_CUBEIN);
- item = create_menu_item_with_mnemonic (menu_in_menu, _("Cubic Clip Zoom Out"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_CUBEOUT);
- menu_separator (menu);
-
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Show"));
- item = create_check_menu_item_with_mnemonic (menu_in_menu, _("Show _Angles"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_SHOWANGLES, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_showangles", item);
- item = create_check_menu_item_with_mnemonic (menu_in_menu, _("Show _Names"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_SHOWNAMES, TRUE);
- g_object_set_data (G_OBJECT (window), "menu_view_shownames", item);
- item = create_check_menu_item_with_mnemonic (menu_in_menu, _("Show Blocks"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_SHOWBLOCKS, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_showblocks", item);
- item = create_check_menu_item_with_mnemonic (menu_in_menu, _("Show C_oordinates"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_SHOWCOORDINATES, TRUE);
- g_object_set_data (G_OBJECT (window), "menu_view_showcoordinates", item);
- item = create_check_menu_item_with_mnemonic (menu_in_menu, _("Show Window Outline"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_SHOWOUTLINE, TRUE);
- g_object_set_data (G_OBJECT (window), "menu_view_showoutline", item);
- item = create_check_menu_item_with_mnemonic (menu_in_menu, _("Show ZBuffered Outline"), GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_NOOUTLINE, TRUE);
- g_object_set_data (G_OBJECT (window), "menu_selection_nooutline", item);
- item = create_check_menu_item_with_mnemonic (menu_in_menu, _("Show Axes"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_SHOWAXES, TRUE);
- g_object_set_data (G_OBJECT (window), "menu_view_showaxes", item);
- item = create_check_menu_item_with_mnemonic (menu_in_menu, _("Show Workzone"), GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_SHOWWORKZONE, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_showworkzone", item);
-
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Filter"));
- create_check_menu_item_with_mnemonic (menu_in_menu, _("World"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_WORLD, FALSE);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Entities"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_ENTITIES, FALSE);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Areaportals"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_AREAPORTALS, FALSE);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Translucent"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_TRANSLUCENT, FALSE);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Liquids"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_LIQUIDS, FALSE);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Caulk"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_CAULK, FALSE);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Clips"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_CLIPS, FALSE);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Paths"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_PATHS, FALSE);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Clusterportals"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_CLUSTERPORTALS, FALSE);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Lights"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_LIGHTS, FALSE);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Structural"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_STRUCTURAL, FALSE);
- item = create_check_menu_item_with_mnemonic (menu_in_menu, _("Lightgrid"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_LIGHTGRID, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_filter_lightgrid", item);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Patches"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_PATCHES, FALSE);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Details"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_DETAILS, FALSE);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Hints"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_HINTSSKIPS, FALSE);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Models"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_MODELS, FALSE);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Triggers"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_TRIGGERS, FALSE);
- create_check_menu_item_with_mnemonic (menu_in_menu, _("Botclips"), GTK_SIGNAL_FUNC (HandleCommand), ID_FILTER_BOTCLIPS, FALSE);
-
- menu_separator (menu);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Hide/Show"));
- create_menu_item_with_mnemonic (menu_in_menu, _("Hide Selected"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_HIDESHOW_HIDESELECTED);
- create_menu_item_with_mnemonic (menu_in_menu, _("Show Hidden"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_HIDESHOW_SHOWHIDDEN);
- menu_separator (menu);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Entities as"));
- g_object_set_data (G_OBJECT (window), "view_entitiesas_menu", menu_in_menu);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, NULL, _("Bounding box"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_ENTITIESAS_BOUNDINGBOX,FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_entitiesas_boundingbox", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("Wireframe"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_ENTITIESAS_WIREFRAME,FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_entitiesas_wireframe", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("Selected Wireframe"),
- GTK_SIGNAL_FUNC (HandleCommand),ID_VIEW_ENTITIESAS_SELECTEDWIREFRAME,FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_entitiesas_selectedwireframe", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("Selected Skinned"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_ENTITIESAS_SELECTEDSKINNED,FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_entitiesas_selectedskinned", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("Skinned"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_ENTITIESAS_SKINNED,FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_entitiesas_skinned", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("Skinned and Boxed"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_ENTITIESAS_SKINNEDANDBOXED,FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_entitiesas_skinnedandboxed", item);
- menu_separator (menu);
- item = create_check_menu_item_with_mnemonic (menu, _("Cubic Clipping"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_CUBICCLIPPING, TRUE);
- g_object_set_data (G_OBJECT (window), "menu_view_cubicclipping", item);
- menu_separator (menu);
- item = create_check_menu_item_with_mnemonic (menu, _("OpenGL Lighting"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_OPENGLLIGHTING, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_opengllighting", item);
-
- // Selection menu
- menu = create_sub_menu_with_mnemonic (menu_bar, _("_Selection"));
- if (g_PrefsDlg.m_bDetachableMenus)
- menu_tearoff (menu);
-
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Drag"));
- create_menu_item_with_mnemonic (menu_in_menu, _("Drag _Edges"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_DRAGEDGES);
- create_menu_item_with_mnemonic (menu_in_menu, _("Drag _Vertices"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_DRAGVERTECIES);
- menu_separator (menu);
- create_menu_item_with_mnemonic (menu, _("_Clone"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_CLONE);
- item = create_menu_item_with_mnemonic (menu, _("Deselect"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_DESELECT);
- item = create_menu_item_with_mnemonic (menu, _("Invert"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_INVERT);
-#ifndef QUAKE3
- create_menu_item_with_mnemonic (menu, _("_Delete"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_DELETE);
-#endif
- menu_separator (menu);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Flip"));
- create_menu_item_with_mnemonic (menu_in_menu, _("Flip _X"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_FLIPX);
- create_menu_item_with_mnemonic (menu_in_menu, _("Flip _Y"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_FLIPY);
- create_menu_item_with_mnemonic (menu_in_menu, _("Flip _Z"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_FLIPZ);
- menu_separator (menu);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Rotate"));
- create_menu_item_with_mnemonic (menu_in_menu, _("Rotate X"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_ROTATEX);
- create_menu_item_with_mnemonic (menu_in_menu, _("Rotate Y"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_ROTATEY);
- create_menu_item_with_mnemonic (menu_in_menu, _("Rotate Z"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_ROTATEZ);
- create_menu_item_with_mnemonic (menu_in_menu, _("Arbitrary rotation..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_ARBITRARYROTATION);
- menu_separator (menu);
- create_menu_item_with_mnemonic (menu, _("Scale..."), GTK_SIGNAL_FUNC (HandleCommand), ID_SELECT_SCALE);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("CSG"));
- create_menu_item_with_mnemonic (menu_in_menu, _("Make _Hollow"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_MAKEHOLLOW);
- create_menu_item_with_mnemonic (menu_in_menu, _("CSG _Subtract"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_CSGSUBTRACT);
- create_menu_item_with_mnemonic (menu_in_menu, _("CSG _Merge"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_CSGMERGE);
- menu_separator (menu);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Select"));
- create_menu_item_with_mnemonic (menu_in_menu, _("Select Complete _Tall"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_SELECTCOMPLETETALL);
- create_menu_item_with_mnemonic (menu_in_menu, _("Select T_ouching"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_SELECTTOUCHING);
- create_menu_item_with_mnemonic (menu_in_menu, _("Select _Partial Tall"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_SELECTPARTIALTALL);
- create_menu_item_with_mnemonic (menu_in_menu, _("Select _Inside"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_SELECTINSIDE);
- create_menu_item_with_mnemonic (menu_in_menu, "Select Func _Group", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECT_FUNC_GROUP);
-#ifndef QUAKE3
- create_menu_item_with_mnemonic (menu_in_menu, _("Nudge Left"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_SELECT_NUDGELEFT);
- create_menu_item_with_mnemonic (menu_in_menu, _("Nudge Right"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_SELECT_NUDGERIGHT);
- create_menu_item_with_mnemonic (menu_in_menu, _("Nudge Up"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_SELECT_NUDGEUP);
- create_menu_item_with_mnemonic (menu_in_menu, _("Nudge Down"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_SELECT_NUDGEDOWN);
-#endif
- menu_separator (menu);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Clipper"));
- create_menu_item_with_mnemonic (menu_in_menu, _("Toggle Clipper"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_CLIPPER);
- menu_separator (menu_in_menu);
- create_menu_item_with_mnemonic (menu_in_menu, _("Clip selection"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CLIP_SELECTED);
- create_menu_item_with_mnemonic (menu_in_menu, _("Split selection"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SPLIT_SELECTED);
- create_menu_item_with_mnemonic (menu_in_menu, _("Flip Clip orientation"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_FLIP_CLIP);
- menu_separator (menu);
- create_menu_item_with_mnemonic (menu, _("Connect entities"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_CONNECT);
- create_menu_item_with_mnemonic (menu, _("Ungroup entity"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_UNGROUPENTITY);
- create_menu_item_with_mnemonic (menu, _("Make detail"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_MAKE_DETAIL);
- create_menu_item_with_mnemonic (menu, _("Make structural"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_MAKE_STRUCTURAL);
-
- // BSP menu
- menu = create_sub_menu_with_mnemonic (menu_bar, _("_Bsp"));
-
- menu_separator (menu);
- g_object_set_data (G_OBJECT (window), "menu_bsp", menu);
-
- // Grid menu
- menu = create_sub_menu_with_mnemonic (menu_bar, _("_Grid"));
- if (g_PrefsDlg.m_bDetachableMenus)
- menu_tearoff (menu);
-
- item = create_radio_menu_item_with_mnemonic (menu, NULL, _("Grid0.25"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_GRID_025, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_grid_025", item);
- item = create_radio_menu_item_with_mnemonic (menu, item, _("Grid0.5"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_GRID_05, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_grid_05", item);
- item = create_radio_menu_item_with_mnemonic (menu, item, _("Grid1"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_GRID_1, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_grid_1", item);
- item = create_radio_menu_item_with_mnemonic (menu, item, _("Grid2"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_GRID_2, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_grid_2", item);
- item = create_radio_menu_item_with_mnemonic (menu, item, _("Grid4"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_GRID_4, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_grid_4", item);
- item = create_radio_menu_item_with_mnemonic (menu, item, _("Grid8"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_GRID_8, TRUE);
- g_object_set_data (G_OBJECT (window), "menu_grid_8", item);
- item = create_radio_menu_item_with_mnemonic (menu, item, _("Grid16"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_GRID_16, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_grid_16", item);
- item = create_radio_menu_item_with_mnemonic (menu, item, _("Grid32"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_GRID_32, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_grid_32", item);
- item = create_radio_menu_item_with_mnemonic (menu, item, _("Grid64"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_GRID_64, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_grid_64", item);
- item = create_radio_menu_item_with_mnemonic (menu, item, _("Grid128"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_GRID_128, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_grid_128", item);
- item = create_radio_menu_item_with_mnemonic (menu, item, _("Grid256"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_GRID_256, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_grid_256", item);
- menu_separator (menu);
- item = create_check_menu_item_with_mnemonic (menu, _("Snap to grid"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_SNAPTOGRID, TRUE);
- g_object_set_data (G_OBJECT (window), "menu_snaptogrid", item);
-
- // Textures menu
- menu = create_sub_menu_with_mnemonic (menu_bar, _("_Textures"));
- if (g_PrefsDlg.m_bDetachableMenus)
- menu_tearoff (menu);
-
- item = create_check_menu_item_with_mnemonic (menu, _("Show In _Use"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURES_SHOWINUSE, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_textures_showinuse", item);
- item = create_check_menu_item_with_mnemonic (menu, _("Show _All"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURES_SHOWALL, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_textures_showall", item);
- menu_separator (menu);
- item = create_check_menu_item_with_mnemonic (menu, _("Show shaders"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURES_SHADERS_SHOW, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_textures_shaders_show", item);
- item = create_menu_item_with_mnemonic (menu, _("Flush & Reload Shaders"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURES_RELOADSHADERS);
- g_object_set_data (G_OBJECT (window), "menu_textures_reloadshaders", item);
- item = create_menu_item_with_mnemonic (menu, _("Load directory..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURES_LOAD);
- g_object_set_data (G_OBJECT (window), "menu_textures_load", item);
- item = create_menu_item_with_mnemonic (menu, _("Directory list..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURES_LOADLIST);
- menu_separator (menu);
-
- item = create_menu_item_with_mnemonic (menu, _("_Surface Inspector"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURES_INSPECTOR);
- menu_separator (menu);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Render Quality"));
- g_object_set_data (G_OBJECT (window), "render_quality_menu", menu_in_menu);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, NULL, _("_Wireframe"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURES_WIREFRAME, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_textures_wireframe", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("_Flat shade"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURES_FLATSHADE, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_textures_flatshade", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("_Nearest"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_NEAREST, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_nearest", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("Nearest _Mipmap"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_NEARESTMIPMAP, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_nearestmipmap", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("_Linear"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_LINEAR, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_linear", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("_Bilinear"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_BILINEAR, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_bilinear", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("B_ilinear Mipmap"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_BILINEARMIPMAP, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_bilinearmipmap", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("T_rilinear"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_TRILINEAR, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_view_trilinear", item);
- create_menu_item_with_mnemonic (menu, _("Find / Replace..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURE_REPLACEALL);
-
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Texture Lock"));
- item = create_check_menu_item_with_mnemonic (menu_in_menu, _("Moves"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TOGGLE_LOCK, TRUE);
- g_object_set_data (G_OBJECT (window), "menu_toggle_lock", item);
- item = create_check_menu_item_with_mnemonic (menu_in_menu, _("Rotations"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TOGGLE_ROTATELOCK, TRUE);
- g_object_set_data (G_OBJECT (window), "menu_toggle_rotatelock", item);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Texture Window Scale"));
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, NULL, _("200%"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURES_TEXTUREWINDOWSCALE_200, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_textures_texturewindowscale_200", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("100%"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURES_TEXTUREWINDOWSCALE_100, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_textures_texturewindowscale_100", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("50%"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURES_TEXTUREWINDOWSCALE_50, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_textures_texturewindowscale_50", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("25%"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURES_TEXTUREWINDOWSCALE_25, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_textures_texturewindowscale_25", item);
- item = create_radio_menu_item_with_mnemonic (menu_in_menu, item, _("10%"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURES_TEXTUREWINDOWSCALE_10, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_textures_texturewindowscale_10", item);
- item = menu_separator (menu);
- item = create_check_menu_item_with_mnemonic (menu, _("shaderlist.txt only"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTURES_SHADERLISTONLY, FALSE);
- g_object_set_data (G_OBJECT (window), "menu_textures_shaderlistonly", item);
- item = menu_separator (menu);
- g_object_set_data (G_OBJECT (window), "menu_textures_separator", item);
- g_object_set_data (G_OBJECT (window), "menu_textures", menu);
-
- // Misc menu
- menu = create_sub_menu_with_mnemonic (menu_bar, _("_Misc"));
- if (g_PrefsDlg.m_bDetachableMenus)
- menu_tearoff (menu);
-
- create_menu_item_with_mnemonic (menu, _("_Benchmark"), GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_BENCHMARK);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Colors"));
- menu_3 = create_menu_in_menu_with_mnemonic (menu_in_menu, _("Themes"));
- create_menu_item_with_mnemonic (menu_3, _("QE4 Original"), GTK_SIGNAL_FUNC (HandleCommand), ID_COLOR_SETORIGINAL);
- create_menu_item_with_mnemonic (menu_3, _("Q3Radiant Original"), GTK_SIGNAL_FUNC (HandleCommand), ID_COLOR_SETQER);
- create_menu_item_with_mnemonic (menu_3, _("Black and Green"), GTK_SIGNAL_FUNC (HandleCommand), ID_COLOR_SETBLACK);
- create_menu_item_with_mnemonic (menu_3, _("Maya/Max/Lightwave Emulation"), GTK_SIGNAL_FUNC (HandleCommand), ID_COLOR_SETYDNAR);
-
- menu_separator (menu_in_menu);
- create_menu_item_with_mnemonic (menu_in_menu, _("_Texture Background..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTUREBK);
- create_menu_item_with_mnemonic (menu_in_menu, _("Grid Background..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_COLORS_XYBK);
- create_menu_item_with_mnemonic (menu_in_menu, _("Grid Major..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_COLORS_MAJOR);
- create_menu_item_with_mnemonic (menu_in_menu, _("Grid Minor..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_COLORS_MINOR);
- create_menu_item_with_mnemonic (menu_in_menu, _("Grid Major Small..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_COLORS_MAJOR_ALT);
- create_menu_item_with_mnemonic (menu_in_menu, _("Grid Minor Small..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_COLORS_MINOR_ALT);
- create_menu_item_with_mnemonic (menu_in_menu, _("Grid Text..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_COLORS_GRIDTEXT);
- create_menu_item_with_mnemonic (menu_in_menu, _("Grid Block..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_COLORS_GRIDBLOCK);
- create_menu_item_with_mnemonic (menu_in_menu, _("Default Brush..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_COLORS_BRUSH);
- create_menu_item_with_mnemonic (menu_in_menu, _("Camera Background..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_COLORS_CAMERABACK);
- create_menu_item_with_mnemonic (menu_in_menu, _("Selected Brush..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_COLORS_SELECTEDBRUSH);
- create_menu_item_with_mnemonic (menu_in_menu, _("Selected Brush (Camera)..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_COLORS_SELECTEDBRUSH3D);
- create_menu_item_with_mnemonic (menu_in_menu, _("Clipper..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_COLORS_CLIPPER);
- create_menu_item_with_mnemonic (menu_in_menu, _("Active View name..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_COLORS_VIEWNAME);
-
- create_menu_item_with_mnemonic (menu, _("_Gamma..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_GAMMA);
- create_menu_item_with_mnemonic (menu, _("Find brush..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_FINDBRUSH);
- item = create_menu_item_with_mnemonic (menu, _("Next leak spot"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_NEXTLEAKSPOT);
- item = create_menu_item_with_mnemonic (menu, _("Previous leak spot"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_PREVIOUSLEAKSPOT);
- create_menu_item_with_mnemonic (menu, _("_Print XY View"), GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_PRINTXY);
- item = create_menu_item_with_mnemonic (menu, _("_Select Entity Color..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_SELECTENTITYCOLOR);
- g_object_set_data (G_OBJECT (window), "menu_misc_selectentitycolor", item);
-
- // Region menu
- menu = create_sub_menu_with_mnemonic (menu_bar, _("_Region"));
- if (g_PrefsDlg.m_bDetachableMenus)
- menu_tearoff (menu);
-
- create_menu_item_with_mnemonic (menu, _("_Off"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_REGION_OFF);
- create_menu_item_with_mnemonic (menu, _("_Set XY"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_REGION_SETXY);
- create_menu_item_with_mnemonic (menu, _("Set _Tall Brush"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_REGION_SETTALLBRUSH);
- create_menu_item_with_mnemonic (menu, _("Set _Brush"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_REGION_SETBRUSH);
- create_menu_item_with_mnemonic (menu, _("Set Se_lected Brushes"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_REGION_SETSELECTION);
-
- // Brush menu
- menu = create_sub_menu_with_mnemonic (menu_bar, _("_Brush"));
- if (g_PrefsDlg.m_bDetachableMenus)
- menu_tearoff (menu);
-
- item = create_menu_item_with_mnemonic (menu, _("3 sided"), GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_3SIDED);
- item = create_menu_item_with_mnemonic (menu, _("4 sided"), GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_4SIDED);
- item = create_menu_item_with_mnemonic (menu, _("5 sided"), GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_5SIDED);
- item = create_menu_item_with_mnemonic (menu, _("6 sided"), GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_6SIDED);
- item = create_menu_item_with_mnemonic (menu, _("7 sided"), GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_7SIDED);
- item = create_menu_item_with_mnemonic (menu, _("8 sided"), GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_8SIDED);
- item = create_menu_item_with_mnemonic (menu, _("9 sided"), GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_9SIDED);
- menu_separator (menu);
- create_menu_item_with_mnemonic (menu, _("Arbitrary sided..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_ARBITRARYSIDED);
- menu_separator (menu);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Primitives"));
- create_menu_item_with_mnemonic (menu_in_menu, _("Cone..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_MAKECONE);
- create_menu_item_with_mnemonic (menu_in_menu, _("Sphere..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_BRUSH_PRIMITIVES_SPHERE);
-
- // Curve menu
- if (!g_pGameDescription->mNoPatch)
- {
- menu = create_sub_menu_with_mnemonic (menu_bar, _("_Curve"));
- if (g_PrefsDlg.m_bDetachableMenus)
- menu_tearoff (menu);
-
- create_menu_item_with_mnemonic (menu, _("Cylinder"), GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_PATCHTUBE);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("More Cylinders"));
- create_menu_item_with_mnemonic (menu_in_menu, _("Dense Cylinder"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_PATCHDENSETUBE);
- create_menu_item_with_mnemonic (menu_in_menu, _("Very Dense Cylinder"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_PATCHVERYDENSETUBE);
- create_menu_item_with_mnemonic (menu_in_menu, _("Square Cylinder"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_PATCHSQUARE);
- menu_separator (menu);
- create_menu_item_with_mnemonic (menu, _("End cap"), GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_PATCHENDCAP);
- create_menu_item_with_mnemonic (menu, _("Bevel"), GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_PATCHBEVEL);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("More End caps, Bevels"));
- create_menu_item_with_mnemonic (menu_in_menu, _("Square Endcap"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_MOREENDCAPSBEVELS_SQUAREBEVEL);
- create_menu_item_with_mnemonic (menu_in_menu, _("Square Bevel"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_MOREENDCAPSBEVELS_SQUAREENDCAP);
- menu_separator (menu);
- create_menu_item_with_mnemonic (menu, _("Cone"), GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_PATCHCONE);
- item = create_menu_item_with_mnemonic (menu, _("Sphere"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_PRIMITIVES_SPHERE);
- gtk_widget_set_sensitive (item, FALSE);
- menu_separator (menu);
- item = create_menu_item_with_mnemonic (menu, _("Simple Patch Mesh..."),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_SIMPLEPATCHMESH);
- g_object_set_data (G_OBJECT (window), "menu_simplepatchmesh", item);
- menu_separator (menu);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Insert"));
- create_menu_item_with_mnemonic (menu_in_menu, _("Insert (2) Columns"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_INSERT_INSERTCOLUMN);
- create_menu_item_with_mnemonic (menu_in_menu, _("Add (2) Columns"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_INSERT_ADDCOLUMN);
- menu_separator (menu_in_menu);
- create_menu_item_with_mnemonic (menu_in_menu, _("Insert (2) Rows"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_INSERT_INSERTROW);
- create_menu_item_with_mnemonic (menu_in_menu, _("Add (2) Rows"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_INSERT_ADDROW);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Delete"));
- create_menu_item_with_mnemonic (menu_in_menu, _("First (2) Columns"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_DELETE_FIRSTCOLUMN);
- create_menu_item_with_mnemonic (menu_in_menu, _("Last (2) Columns"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_DELETE_LASTCOLUMN);
- menu_separator (menu_in_menu);
- create_menu_item_with_mnemonic (menu_in_menu, _("First (2) Rows"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_DELETE_FIRSTROW);
- create_menu_item_with_mnemonic (menu_in_menu, _("Last (2) Rows"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_DELETE_LASTROW);
- menu_separator (menu);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Matrix"));
- create_menu_item_with_mnemonic (menu_in_menu, _("Invert"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_NEGATIVE);
- menu_3 = create_menu_in_menu_with_mnemonic (menu_in_menu, _("Re-disperse"));
- create_menu_item_with_mnemonic (menu_3, _("Rows"), GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_REDISPERSE_ROWS);
- create_menu_item_with_mnemonic (menu_3, _("Cols (Intermediate)"), GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_REDISPERSE_INTERMEDIATE_COLS);
- create_menu_item_with_mnemonic (menu_3, _("Rows (Intermediate)"), GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_REDISPERSE_INTERMEDIATE_ROWS);
- create_menu_item_with_mnemonic (menu_in_menu, _("Transpose"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_MATRIX_TRANSPOSE);
- menu_separator (menu);
- create_menu_item_with_mnemonic (menu, _("Cap Selection"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_CAP);
- create_menu_item_with_mnemonic (menu, _("Cycle Cap Texture"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_CYCLECAP);
- menu_separator (menu);
- menu_in_menu = create_menu_in_menu_with_mnemonic (menu, _("Overlay"));
- create_menu_item_with_mnemonic (menu_in_menu, _("Set"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_OVERLAY_SET);
- create_menu_item_with_mnemonic (menu_in_menu, _("Clear"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_OVERLAY_CLEAR);
- menu_separator (menu);
- create_menu_item_with_mnemonic (menu, _("Thicken..."), GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_THICKEN);
- }
- // Plugins menu
- menu = create_sub_menu_with_mnemonic (menu_bar, _("_Plugins"));
- if (g_PrefsDlg.m_bDetachableMenus)
- menu_tearoff (menu);
-
- /*
- create_menu_item_with_mnemonic (menu, "Refresh", GTK_SIGNAL_FUNC (HandleCommand), ID_PLUGINS_REFRESH);
- */
- // NOTE: the seperator is used when doing a refresh of the list, everything past the seperator is removed
- item = menu_separator (menu);
- g_object_set_data (G_OBJECT (window), "menu_plugin_separator", item);
- g_object_set_data (G_OBJECT (window), "menu_plugin", menu);
-
- // Help menu
- menu = create_sub_menu_with_mnemonic (menu_bar, _("_Help"));
- if (g_PrefsDlg.m_bDetachableMenus)
- menu_tearoff (menu);
-
- item = create_menu_item_with_mnemonic (menu, _("Manual"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_HELP);
- gtk_widget_add_accelerator (item, "activate", accel, GDK_F1, (GdkModifierType)0, GTK_ACCEL_VISIBLE);
-
- // this creates all the per-game drop downs for the game pack helps
- // it will take care of hooking the Sys_OpenURL calls etc.
- create_game_help_menu(menu, accel);
-
- // TTimo: this is in global.xlink now
- //create_menu_item_with_mnemonic (menu, "Links",
- // GTK_SIGNAL_FUNC (HandleCommand), ID_HELP_LINKS);
- create_menu_item_with_mnemonic (menu, _("Bug report"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_HELP_BUGREPORT);
- create_menu_item_with_mnemonic (menu, _("Shortcuts list"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_HELP_COMMANDLIST);
- create_menu_item_with_mnemonic (menu, _("_About"),
- GTK_SIGNAL_FUNC (HandleCommand), ID_HELP_ABOUT);
-
-
- // leo: Hidden menu to make the accelerators work,
- // this is a hack that needs to be changed later if someone has a better idea.
- // NOTE TTimo
- // maybe the better idea would be NOT to use any such accelerator scheme and do all key listening and interpret ourselves
- menu = create_sub_menu_with_mnemonic (menu_bar, "Hidden");
- if (g_PrefsDlg.m_bDetachableMenus)
- menu_tearoff (menu);
-
- gtk_widget_hide (gtk_menu_get_attach_widget (GTK_MENU (menu)));
-
- create_menu_item_with_mnemonic (menu, "BendMode", GTK_SIGNAL_FUNC (HandleCommand), ID_PATCH_BEND);
- create_menu_item_with_mnemonic (menu, "FitTexture", GTK_SIGNAL_FUNC (HandleCommand), IDC_BTN_FACEFIT);
- create_menu_item_with_mnemonic (menu, "ViewTextures", GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_TEXTURE);
- create_menu_item_with_mnemonic (menu, "PatchInspector", GTK_SIGNAL_FUNC (HandleCommand), ID_PATCH_INSPECTOR);
- create_menu_item_with_mnemonic (menu, "InvertCurveTextureX", GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_NEGATIVETEXTUREY);
- create_menu_item_with_mnemonic (menu, "InvertCurveTextureY", GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_NEGATIVETEXTUREX);
- create_menu_item_with_mnemonic (menu, "IncPatchColumn", GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_INSERTCOLUMN);
- create_menu_item_with_mnemonic (menu, "IncPatchRow", GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_INSERTROW);
- create_menu_item_with_mnemonic (menu, "DecPatchColumn", GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_DELETECOLUMN);
- create_menu_item_with_mnemonic (menu, "DecPatchRow", GTK_SIGNAL_FUNC (HandleCommand), ID_CURVE_DELETEROW);
- create_menu_item_with_mnemonic (menu, "Patch TAB", GTK_SIGNAL_FUNC (HandleCommand), ID_PATCH_TAB);
- create_menu_item_with_mnemonic (menu, "Patch TAB", GTK_SIGNAL_FUNC (HandleCommand), ID_PATCH_TAB);
- create_menu_item_with_mnemonic (menu, "SelectNudgeDown", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_SELECT_NUDGEDOWN);
- create_menu_item_with_mnemonic (menu, "CameraForward", GTK_SIGNAL_FUNC (HandleCommand), ID_CAMERA_FORWARD);
- create_menu_item_with_mnemonic (menu, "CameraBack", GTK_SIGNAL_FUNC (HandleCommand), ID_CAMERA_BACK);
- create_menu_item_with_mnemonic (menu, "CameraLeft", GTK_SIGNAL_FUNC (HandleCommand), ID_CAMERA_LEFT);
- create_menu_item_with_mnemonic (menu, "CameraRight", GTK_SIGNAL_FUNC (HandleCommand), ID_CAMERA_RIGHT);
- create_menu_item_with_mnemonic (menu, "CameraUp", GTK_SIGNAL_FUNC (HandleCommand), ID_CAMERA_UP);
- create_menu_item_with_mnemonic (menu, "CameraDown", GTK_SIGNAL_FUNC (HandleCommand), ID_CAMERA_DOWN);
- create_menu_item_with_mnemonic (menu, "CameraAngleUp", GTK_SIGNAL_FUNC (HandleCommand), ID_CAMERA_ANGLEUP);
- create_menu_item_with_mnemonic (menu, "CameraAngleDown", GTK_SIGNAL_FUNC (HandleCommand), ID_CAMERA_ANGLEDOWN);
- create_menu_item_with_mnemonic (menu, "CameraStrafeRight", GTK_SIGNAL_FUNC (HandleCommand), ID_CAMERA_STRAFERIGHT);
- create_menu_item_with_mnemonic (menu, "CameraStrafeLeft", GTK_SIGNAL_FUNC (HandleCommand), ID_CAMERA_STRAFELEFT);
- create_menu_item_with_mnemonic (menu, "ToggleGrid", GTK_SIGNAL_FUNC (HandleCommand), ID_GRID_TOGGLE);
- create_menu_item_with_mnemonic (menu, "ToggleCrosshairs", GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_CROSSHAIR);
- create_menu_item_with_mnemonic (menu, "ToggleRealtime", GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_CAMERAUPDATE);
- create_menu_item_with_mnemonic (menu, "MouseRotate", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECT_MOUSEROTATE);
- create_menu_item_with_mnemonic (menu, "TexRotateClock", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_TEXTURE_ROTATECLOCK);
- create_menu_item_with_mnemonic (menu, "TexRotateCounter", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_TEXTURE_ROTATECOUNTER);
- create_menu_item_with_mnemonic (menu, "TexScaleUp", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_TEXTURE_SCALEUP);
- create_menu_item_with_mnemonic (menu, "TexScaleDown", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_TEXTURE_SCALEDOWN);
- create_menu_item_with_mnemonic (menu, "TexShiftLeft", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_TEXTURE_SHIFTLEFT);
- create_menu_item_with_mnemonic (menu, "TexShiftRight", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_TEXTURE_SHIFTRIGHT);
- create_menu_item_with_mnemonic (menu, "TexShiftUp", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_TEXTURE_SHIFTUP);
- create_menu_item_with_mnemonic (menu, "TexShiftDown", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_TEXTURE_SHIFTDOWN);
- create_menu_item_with_mnemonic (menu, "GridDown", GTK_SIGNAL_FUNC (HandleCommand), ID_GRID_PREV);
- create_menu_item_with_mnemonic (menu, "GridUp", GTK_SIGNAL_FUNC (HandleCommand), ID_GRID_NEXT);
- create_menu_item_with_mnemonic (menu, "TexScaleLeft", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_TEXTURE_SCALELEFT);
- create_menu_item_with_mnemonic (menu, "TexScaleRight", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_TEXTURE_SCALERIGHT);
- create_menu_item_with_mnemonic (menu, "MoveSelectionDOWN", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_MOVEDOWN);
- create_menu_item_with_mnemonic (menu, "MoveSelectionUP", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_MOVEUP);
- create_menu_item_with_mnemonic (menu, "DumpSelectedBrush", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_PRINT);
- create_menu_item_with_mnemonic (menu, "ToggleSizePaint", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_TOGGLESIZEPAINT);
- create_menu_item_with_mnemonic (menu, "SelectNudgeLeft", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_SELECT_NUDGELEFT);
- create_menu_item_with_mnemonic (menu, "SelectNudgeRight", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_SELECT_NUDGERIGHT);
- create_menu_item_with_mnemonic (menu, "SelectNudgeUp", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_SELECT_NUDGEUP);
- create_menu_item_with_mnemonic (menu, "NaturalizePatch", GTK_SIGNAL_FUNC (HandleCommand), ID_PATCH_NATURALIZE);
- create_menu_item_with_mnemonic (menu, "SnapPatchToGrid", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECT_SNAPTOGRID);
- create_menu_item_with_mnemonic (menu, "SelectAllOfType", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECT_ALL);
- create_menu_item_with_mnemonic (menu, "CycleOutlineStyle", GTK_SIGNAL_FUNC (HandleCommand), ID_SELECTION_OUTLINESTYLE);
- create_menu_item_with_mnemonic (menu, "TextureWindowScaleup", GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTUREWINDOW_SCALEUP);
- create_menu_item_with_mnemonic (menu, "TextureWindowScaledown", GTK_SIGNAL_FUNC (HandleCommand), ID_TEXTUREWINDOW_SCALEDOWN);
-
- g_bIgnoreCommands--;
-}
-
-void MainFrame::create_main_toolbar (GtkWidget *window, GtkWidget *vbox)
-{
- GtkWidget *handle_box, *toolbar, *w;
-
- handle_box = gtk_handle_box_new ();
- gtk_box_pack_start (GTK_BOX (vbox), handle_box, FALSE, FALSE, 0);
- gtk_widget_show (handle_box);
- g_object_set_data (G_OBJECT (window), "tb_handle_box", handle_box);
-
- toolbar = gtk_toolbar_new ();
- gtk_toolbar_set_orientation (GTK_TOOLBAR(toolbar), GTK_ORIENTATION_HORIZONTAL);
- gtk_toolbar_set_style (GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS);
- // gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), user_rc.toolbar_style);
- gtk_container_add (GTK_CONTAINER (handle_box), toolbar);
-
- gtk_widget_show (toolbar);
-
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), _("Open"), _("Open an existing map"), "",
- new_pixmap (window, "file_open.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_FILE_OPEN));
- g_object_set_data (G_OBJECT (window), "tb_file_open", w);
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), _("Save"), _("Save the active map"), "",
- new_pixmap (window, "file_save.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_FILE_SAVE));
- g_object_set_data (G_OBJECT (window), "tb_file_save", w);
- gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("x-axis Flip"), "",
- new_pixmap (window, "brush_flipx.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_BRUSH_FLIPX));
- g_object_set_data (G_OBJECT (window), "tb_brush_flipx", w);
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("x-axis Rotate"), "",
- new_pixmap (window, "brush_rotatex.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_BRUSH_ROTATEX));
- g_object_set_data (G_OBJECT (window), "tb_brush_rotatex", w);
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("y-axis Flip"), "",
- new_pixmap (window, "brush_flipy.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_BRUSH_FLIPY));
- g_object_set_data (G_OBJECT (window), "tb_brush_flipy", w);
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("y-axis Rotate"), "",
- new_pixmap (window, "brush_rotatey.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_BRUSH_ROTATEY));
- g_object_set_data (G_OBJECT (window), "tb_brush_rotatey", w);
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("z-axis Flip"), "",
- new_pixmap (window, "brush_flipz.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_BRUSH_FLIPZ));
- g_object_set_data (G_OBJECT (window), "tb_brush_flipz", w);
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("z-axis Rotate"), "",
- new_pixmap (window, "brush_rotatez.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_BRUSH_ROTATEZ));
- g_object_set_data (G_OBJECT (window), "tb_brush_rotatez", w);
- gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
-
- if (g_PrefsDlg.m_bWideToolbar)
- {
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("Complete Tall"), "",
- new_pixmap (window, "selection_selectcompletetall.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_SELECTION_SELECTCOMPLETETALL));
- g_object_set_data (G_OBJECT (window), "tb_selection_selectcompletetall", w);
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("Select Touching"), "",
- new_pixmap (window, "selection_selecttouching.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_SELECTION_SELECTTOUCHING));
- g_object_set_data (G_OBJECT (window), "tb_selection_selecttouching", w);
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("Select Partial Tall"), "",
- new_pixmap (window, "selection_selectpartialtall.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_SELECTION_SELECTPARTIALTALL));
- g_object_set_data (G_OBJECT (window), "tb_selection_selectpartialtall", w);
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("Select Inside"), "",
- new_pixmap (window, "selection_selectinside.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_SELECTION_SELECTINSIDE));
- g_object_set_data (G_OBJECT (window), "tb_selection_selectinside", w);
- } else
- {
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("Selection"), "",
- new_pixmap (window, "popup_selection.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_POPUP_SELECTION));
- g_object_set_data (G_OBJECT (window), "tb_popup_selection", w);
- }
- gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
-
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("CSG Subtract"), "",
- new_pixmap (window, "selection_csgsubtract.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_SELECTION_CSGSUBTRACT));
- g_object_set_data (G_OBJECT (window), "tb_selection_csgsubtract", w);
-
- if (g_PrefsDlg.m_bWideToolbar)
- {
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("CSG Merge"), "",
- new_pixmap (window, "selection_csgmerge.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_SELECTION_CSGMERGE));
- g_object_set_data (G_OBJECT (window), "tb_selection_csgmerge", w);
- }
-
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("Hollow"), "",
- new_pixmap (window, "selection_makehollow.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_SELECTION_MAKEHOLLOW));
- g_object_set_data (G_OBJECT (window), "tb_selection_makehollow", w);
-
- if (g_PrefsDlg.m_bWideToolbar)
- {
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Clipper"), "", new_pixmap (window, "view_clipper.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_VIEW_CLIPPER));
- g_object_set_data (G_OBJECT (window), "tb_view_clipper", w);
- }
-
- gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
-
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("Change views"), "",
- new_pixmap (window, "view_change.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_VIEW_CHANGE));
- g_object_set_data (G_OBJECT (window), "tb_view_change", w);
-
- if (!g_PrefsDlg.m_bWideToolbar)
- {
- gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
- }
-
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("Texture view mode"), "",
- new_pixmap (window, "textures_popup.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_TEXTURES_POPUP));
- g_object_set_data (G_OBJECT (window), "tb_textures_popup", w);
-
- if (g_PrefsDlg.m_bWideToolbar)
- {
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Cubic clip the camera view"), "",
- new_pixmap (window, "view_cubicclipping.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_VIEW_CUBICCLIPPING));
- g_object_set_data (G_OBJECT (window), "tb_view_cubicclipping", w);
- }
-
- gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
-
- if (!g_PrefsDlg.m_bWideToolbar)
- {
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Camera preview"), "", new_pixmap (window, "view_cameratoggle.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_VIEW_CAMERATOGGLE));
- g_object_set_data (G_OBJECT (window), "tb_view_cameratoggle", w);
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", "Update Camera", "",
- new_pixmap (window, "view_cameraupdate.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_VIEW_CAMERAUPDATE));
- g_object_set_data (G_OBJECT (window), "tb_view_cameraupdate", w);
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Cubic clip the camera view"), "",
- new_pixmap (window, "view_cubicclipping.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_VIEW_CUBICCLIPPING));
- g_object_set_data (G_OBJECT (window), "tb_view_cubicclipping", w);
- gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Entity inspector"), "", new_pixmap (window, "view_entity.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_VIEW_ENTITY));
- g_object_set_data (G_OBJECT (window), "tb_view_entity", w);
- gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Clipper"), "", new_pixmap (window, "view_clipper.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_VIEW_CLIPPER));
- g_object_set_data (G_OBJECT (window), "tb_view_clipper", w);
- gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
- }
-
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Free Rotation"), "", new_pixmap (window, "select_mouserotate.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_SELECT_MOUSEROTATE));
- g_object_set_data (G_OBJECT (window), "tb_select_mouserotate", w);
- gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Free Scaling"), "", new_pixmap (window, "select_mousescale.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_SELECT_MOUSESCALE));
- g_object_set_data (G_OBJECT (window), "tb_select_mousescale", w);
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Scale X"), "", new_pixmap (window, "scalelockx.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_SCALELOCKX));
- g_object_set_data (G_OBJECT (window), "tb_scalelockx", w);
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Scale Y"), "", new_pixmap (window, "scalelocky.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_SCALELOCKY));
- g_object_set_data (G_OBJECT (window), "tb_scalelocky", w);
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Scale Z"), "", new_pixmap (window, "scalelockz.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_SCALELOCKZ));
- g_object_set_data (G_OBJECT (window), "tb_scalelockz", w);
-
- if (g_PrefsDlg.m_bWideToolbar)
- {
- gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Don't select model brushes"), "",
- new_pixmap (window, "dontselectmodel.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_DONTSELECTMODEL));
- gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
- g_object_set_data (G_OBJECT (window), "tb_dontselectmodel", w);
-
- if (!g_pGameDescription->mNoPatch)
- {
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Don't select curved brushes"), "",
- new_pixmap (window, "dontselectcurve.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_DONTSELECTCURVE));
- g_object_set_data (G_OBJECT (window), "tb_dontselectcurve", w);
- }
- }
-
- // bug #292, patch toolbar option
- if (g_PrefsDlg.m_bPatchToolbar)
- {
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Show patch bounding box"), "",
- new_pixmap (window, "patch_showboundingbox.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_PATCH_SHOWBOUNDINGBOX));
- g_object_set_data (G_OBJECT (window), "tb_patch_showboundingbox", w);
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Show patches as wireframes"), "",
- new_pixmap (window, "patch_wireframe.bmp"),
- GTK_SIGNAL_FUNC (HandleCommand), GINT_TO_POINTER (ID_PATCH_WIREFRAME));
- g_object_set_data (G_OBJECT (window), "tb_patch_wireframe", w);
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Patch Bend mode"), "",
- new_pixmap (window, "patch_bend.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_PATCH_BEND));
- g_object_set_data (G_OBJECT (window), "tb_patch_bend", w);
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("Put caps on the current patch"), "",
- new_pixmap (window, "curve_cap.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_CURVE_CAP));
- g_object_set_data (G_OBJECT (window), "tb_curve_cap", w);
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Welds equal patch points during moves"), "",
- new_pixmap (window, "patch_weld.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_PATCH_WELD));
- g_object_set_data (G_OBJECT (window), "tb_patch_weld", w);
- w = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
- "", _("Selects drill down rows and columns"), "",
- new_pixmap (window, "patch_drilldown.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_PATCH_DRILLDOWN));
- g_object_set_data (G_OBJECT (window), "tb_patch_drilldown", w);
- }
-
- if (g_PrefsDlg.m_bWideToolbar)
- {
- gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
- w = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "", _("Show Entities as"), "",
- new_pixmap (window, "show_entities.bmp"), GTK_SIGNAL_FUNC (HandleCommand),
- GINT_TO_POINTER (ID_SHOW_ENTITIES));
- g_object_set_data (G_OBJECT (window), "tb_show_entities", w);
- }
-
- /*
- uh? that is OLD
-#ifndef QUAKE3
- w = g_object_get_data (G_OBJECT (window), "tb_dontselectcurve");
- gtk_widget_hide (w);
- w = g_object_get_data (G_OBJECT (window), "tb_patch_showboundingbox");
- gtk_widget_hide (w);
- w = g_object_get_data (G_OBJECT (window), "tb_patch_weld");
- gtk_widget_hide (w);
- w = g_object_get_data (G_OBJECT (window), "tb_patch_wireframe");
- gtk_widget_hide (w);
-#endif
- */