]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/groupdialog.cpp
* reactivated WXY_Print function to generate screenshots from the xy window
[xonotic/netradiant.git] / radiant / groupdialog.cpp
index d4570ff0a6084abd05cd4b075c5c9c6e0de53b24..2c72a8cb0020156fafba0af32c79f80aa0920e22 100644 (file)
@@ -30,6 +30,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   #include <unistd.h>
 #endif
 #include <gdk/gdkkeysyms.h>
+#include <glib/gi18n.h>
 #include "stdafx.h"
 #include "groupdialog.h"
 
@@ -38,7 +39,6 @@ GtkListStore* g_entlist_store;
 GtkListStore* g_entprops_store;
 int                                    inspector_mode;         // W_TEXTURE, W_ENTITY, or W_CONSOLE
 qboolean               multiple_entities;
-// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=17
 qboolean               disable_spawn_get = false;
 entity_t               *edit_entity;
 /*
@@ -100,12 +100,12 @@ void FillClassList ()
     GtkTreeIter iter;
     gtk_list_store_append(store, &iter);
     gtk_list_store_set(store, &iter, 0, e->name, 1, e, -1);
-  }    
+  }
 }
 
 // SetKeyValuePairs
 //
-// Reset the key/value (aka property) listbox and fill it with the 
+// Reset the key/value (aka property) listbox and fill it with the
 // k/v pairs from the entity being edited.
 //
 
@@ -142,7 +142,7 @@ void SetKeyValuePairs (bool bClearMD3)
 }
 
 // SetSpawnFlags
-// 
+//
 // Update the checkboxes to reflect the flag state of the entity
 //
 void SetSpawnFlags(void)
@@ -167,7 +167,7 @@ void SetSpawnFlags(void)
 }
 
 // GetSpawnFlags
-// 
+//
 // Update the entity flags to reflect the state of the checkboxes
 //
 // NOTE: this function had a tendency to add "spawnflags" "0" on most entities
@@ -191,7 +191,7 @@ void GetSpawnFlags(void)
     if (multiple_entities)
     {
       brush_t  *b;
-      
+
       for (b=selected_brushes.next ; b != &selected_brushes ; b=b->next)
         DeleteKey (b->owner, "spawnflags");
     }
@@ -199,12 +199,12 @@ void GetSpawnFlags(void)
       DeleteKey (edit_entity, "spawnflags");
   }
   else
-  {    
-    sprintf (sz, "%i", f);    
+  {
+    sprintf (sz, "%i", f);
     if (multiple_entities)
     {
       brush_t  *b;
-      
+
       for (b=selected_brushes.next ; b != &selected_brushes ; b=b->next)
         SetKeyValue(b->owner, "spawnflags", sz);
     }
@@ -225,7 +225,7 @@ bool UpdateSel(int iIndex, eclass_t *pec)
   int i, next_state;
   brush_t *b;
 
-  // syndrom of crappy code, we may get into stack overflowing crap with this function and Gtk 
+  // syndrom of crappy code, we may get into stack overflowing crap with this function and Gtk
   // if we play with the list of entity classes
   // using a static flag to prevent recursion
   static bool bBlockUpdate = false;
@@ -453,7 +453,7 @@ void AddProp()
     SetKeyValue(edit_entity, key, value);
 
   // refresh the prop listbox
-  SetKeyValuePairs();  
+  SetKeyValuePairs();
 
 
 #ifdef USEPLUGINENTITIES
@@ -585,7 +585,7 @@ void AssignSound()
     strcat (buffer, "/");
   }
 
-  const char *filename = file_dialog (g_pGroupDlg->m_pWidget, TRUE, "Open Wav File", buffer, "sound");
+  const char *filename = file_dialog (g_pGroupDlg->m_pWidget, TRUE, _("Open Wav File"), buffer, "sound");
   if (filename != NULL)
   {
     gtk_entry_set_text (GTK_ENTRY (EntWidgets[EntKeyField]), "noise");
@@ -599,7 +599,7 @@ void AssignSound()
       str = filename;
     }
 
-    gtk_entry_set_text (GTK_ENTRY (EntWidgets[EntValueField]), str.GetBuffer());       
+    gtk_entry_set_text (GTK_ENTRY (EntWidgets[EntValueField]), str.GetBuffer());
     AddProp();
   }
 }
@@ -618,7 +618,7 @@ void AssignModel()
     strcat (buffer, "/");
   }
 
-  const char *filename = file_dialog (g_pGroupDlg->m_pWidget, TRUE, "Open Model", buffer, MODEL_MAJOR);
+  const char *filename = file_dialog (g_pGroupDlg->m_pWidget, TRUE, _("Open Model"), buffer, MODEL_MAJOR);
   if (filename != NULL)
   {
     gtk_entry_set_text (GTK_ENTRY (EntWidgets[EntKeyField]), "model");
@@ -633,7 +633,7 @@ void AssignModel()
       str = filename;
     }
 
-    gtk_entry_set_text (GTK_ENTRY (EntWidgets[EntValueField]), str.GetBuffer());       
+    gtk_entry_set_text (GTK_ENTRY (EntWidgets[EntValueField]), str.GetBuffer());
     AddProp();
     edit_entity->brushes.onext->bModelFailed = false;
   }
@@ -664,7 +664,7 @@ void SetInspectorMode(int iType)
       iType = W_GROUP;
     else
       iType = W_ENTITY;
-  }            
+  }
 
   switch(iType)
   {
@@ -745,28 +745,28 @@ void Group_AddToItem(brush_t *b, GtkCTreeNode* item)
   }
   const char *pName = NULL;
   //  const char *pNamed = Brush_GetKeyValue(b, "name");
+
   if (!b->owner || (b->owner == world_entity))
   {
-    if (b->patchBrush) 
+    if (b->patchBrush)
     {
       pName = "Generic Patch";
       nImage = IMG_PATCH;
-    } 
-    else 
+    }
+    else
     {
       pName = "Generic Brush";
       nImage = IMG_BRUSH;
     }
-  } 
-  else 
+  }
+  else
   {
     pName = b->owner->eclass->name;
-    if (b->owner->eclass->fixedsize) 
+    if (b->owner->eclass->fixedsize)
     {
       nImage = IMG_ENTITY;
-    } 
-    else 
+    }
+    else
     {
       nImage = IMG_ENTITYGROUP;
     }
@@ -987,9 +987,8 @@ static void eclasslist_selection_changed(GtkTreeSelection* selection, gpointer d
   GtkTreeModel* model;
   GtkTreeIter selected;
   // no world entity, we are not ready yet
-  // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=917
   if( !world_entity ) {
-    return;  
+    return;
   }
   if(gtk_tree_selection_get_selected(selection, &model, &selected))
   {
@@ -1133,7 +1132,7 @@ static void groupdlg_add (GtkWidget *widget, gpointer data)
 
   if (name != NULL)
   {
-    // create a new group node 
+    // create a new group node
     GtkCTreeNode *item;
     item = gtk_ctree_insert_node (GTK_CTREE (g_wndGroup.m_pTree), g_pGroupDlg->m_hWorld, NULL, &name, 0,
                                  tree_pixmaps[IMG_GROUP], tree_masks[IMG_GROUP],
@@ -1178,7 +1177,7 @@ static void switch_page (GtkNotebook *notebook, GtkNotebookPage *page, guint pag
     else
       inspector_mode = W_GROUP;
   }
-  
+
   if (inspector_mode == W_ENTITY)
     gtk_widget_set_sensitive (GTK_WIDGET (item), TRUE);
   else
@@ -1259,7 +1258,7 @@ void GroupDlg::Create ()
         GtkWidget* split1 = gtk_vpaned_new ();
         gtk_box_pack_start (GTK_BOX (vbox), split1, TRUE, TRUE, 0);
         gtk_widget_show (split1);
-  
+
         {
           GtkWidget* split2 = gtk_vpaned_new ();
           gtk_paned_add1 (GTK_PANED (split1), split2);
@@ -1302,7 +1301,7 @@ void GroupDlg::Create ()
                 gtk_widget_show(view);
 
                 gtk_container_add(GTK_CONTAINER (scr), view);
-    
+
                 g_object_unref(G_OBJECT(store));
                 EntWidgets[EntList] = view;
                 g_entlist_store = store;
@@ -1329,7 +1328,7 @@ void GroupDlg::Create ()
 
             {
               // Spawnflags (4 colums wide max, or window gets too wide.)
-              GtkWidget* table = LayoutTable = gtk_table_new (4, 4, FALSE);
+              GtkWidget* LayoutTable = gtk_table_new (4, 4, FALSE);
               gtk_box_pack_start (GTK_BOX (vbox2), LayoutTable, FALSE, TRUE, 0);
               gtk_widget_show(LayoutTable);
 
@@ -1410,7 +1409,7 @@ void GroupDlg::Create ()
                 gtk_widget_show(view);
 
                 gtk_container_add(GTK_CONTAINER (scr), view);
-    
+
                 g_object_unref(G_OBJECT(store));
 
                 EntWidgets[EntProps] = view;