]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/mainframe.cpp
* renamed class LoadModule into CLoadModule because LoadModule is already a registere...
[xonotic/netradiant.git] / radiant / mainframe.cpp
index fd54a116334037a196c2e69fb8d0429007f9ba7e..ad0035ebb6d4d68cc677542d868ba38a8b35f862 100644 (file)
@@ -502,11 +502,11 @@ void gamemode_set(const char* gamemode)
 
 #include "os/dir.h"
 
-class LoadModule
+class CLoadModule
 {
   const char* m_path;
 public:
-  LoadModule(const char* path) : m_path(path)
+  CLoadModule(const char* path) : m_path(path)
   {
   }
   void operator()(const char* name) const
@@ -532,7 +532,7 @@ const char* const c_library_extension =
 
 void Radiant_loadModules(const char* path)
 {
-  Directory_forEach(path, MatchFileExtension<LoadModule>(c_library_extension, LoadModule(path)));
+  Directory_forEach(path, MatchFileExtension<CLoadModule>(c_library_extension, CLoadModule(path)));
 }
 
 void Radiant_loadModulesFromRoot(const char* directory)
@@ -2417,6 +2417,12 @@ void File_constructToolbar(GtkToolbar* toolbar)
   toolbar_append_button(toolbar, "Save the active map (CTRL + S)", "file_save.bmp", "SaveMap");
 }
 
+void UndoRedo_constructToolbar(GtkToolbar* toolbar)
+{
+  toolbar_append_button(toolbar, "Undo (CTRL + Z)", "undo.bmp", "Undo");
+  toolbar_append_button(toolbar, "Redo (CTRL + Y)", "redo.bmp", "Redo");
+}
+
 void RotateFlip_constructToolbar(GtkToolbar* toolbar)
 {
   toolbar_append_button(toolbar, "x-axis Flip", "brush_flipx.bmp", "MirrorSelectionX");
@@ -2480,6 +2486,10 @@ GtkToolbar* create_main_toolbar(MainFrame::EViewStyle style)
 
   gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
 
+  UndoRedo_constructToolbar(toolbar);
+
+  gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
+
   RotateFlip_constructToolbar(toolbar);
 
   gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
@@ -2528,6 +2538,10 @@ GtkToolbar* create_main_toolbar(MainFrame::EViewStyle style)
   // TODO: call light inspector
   //GtkButton* g_view_lightinspector_button = toolbar_append_button(toolbar, "Light Inspector", "lightinspector.bmp", "ToggleLightInspector");
 
+  gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
+  GtkButton* g_refresh_models_button = toolbar_append_button(toolbar, "Refresh Models", "refresh_models.bmp", "RefreshReferences");
+
+
   // disable the console and texture button in the regular layouts
   if(style == MainFrame::eRegular || style == MainFrame::eRegularLeft)
   {
@@ -2560,6 +2574,7 @@ GtkWidget* create_main_statusbar(GtkWidget *pStatusLabel[c_count_status])
     gtk_frame_set_shadow_type(frame, GTK_SHADOW_IN);
 
     GtkLabel* label = GTK_LABEL(gtk_label_new ("Label"));
+       gtk_label_set_ellipsize( label, PANGO_ELLIPSIZE_END);
     gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
     gtk_misc_set_padding(GTK_MISC(label), 4, 2);
     gtk_widget_show(GTK_WIDGET(label));
@@ -2876,7 +2891,7 @@ void MainFrame::Create()
 
 #if !defined(WIN32)
   {
-    GdkPixbuf* pixbuf = pixbuf_new_from_file_with_mask("icon.bmp");
+    GdkPixbuf* pixbuf = pixbuf_new_from_file_with_mask("bitmaps/icon.bmp");
     if(pixbuf != 0)
     {
       gtk_window_set_icon(window, pixbuf);
@@ -3296,7 +3311,11 @@ void GlobalGL_sharedContextCreated()
   GlobalShaderCache().realise();
   Textures_Realise();
 
+#ifdef __linux__
+  g_font = glfont_create("fixed 8");
+#else
   g_font = glfont_create("courier 8");
+#endif
   GlobalOpenGL().m_font = g_font.getDisplayList();
   GlobalOpenGL().m_fontHeight = g_font.getPixelHeight();
 }