]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/gtkdlgs.cpp
Increasing stack size on Windows build.
[xonotic/netradiant.git] / radiant / gtkdlgs.cpp
index e3297f77789d4fc9caffeb4caba78e112867f4e2..43ebe40ae17e2c8c710715bba8f4c03d1427a25e 100644 (file)
@@ -1998,7 +1998,6 @@ void SelectBrush (int entitynum, int brushnum)
   brush_t *b;
   int i;
 
-  // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=503
   // making this work when regioning is on too
 
   if (entitynum == 0)
@@ -2645,7 +2644,7 @@ void DoAbout ()
   gtk_widget_show (vbox2);
   gtk_box_pack_start (GTK_BOX (hbox), vbox2, TRUE, FALSE, 0);
 
-  frame = gtk_frame_new ((char*)NULL);
+  frame = gtk_frame_new (NULL);
   gtk_widget_show (frame);
   gtk_box_pack_start (GTK_BOX (vbox2), frame, FALSE, FALSE, 0);
   gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
@@ -2842,7 +2841,7 @@ void DoCommandListDlg ()
       cmds = g_slist_sort (cmds, (gint (*)(const void *, const void *))strcmp);
 
       Sys_Printf("Writing the command list to %s", path.GetBuffer() );
-      FILE* fileout = fopen (path.GetBuffer (), "wt");
+      FILE * fileout = fopen( path.GetBuffer (), "wt" );
 
       while (cmds)
       {
@@ -3159,7 +3158,7 @@ int DoCapDlg (int *type, bool *b_GroupResult)
       *type = IENDCAP; // *type = CapDialog::IENDCAP;
 
     // Gef: Added toggle for optional cap func_grouping
-    *b_GroupResult = (bool *)gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(group_toggle));
+    *b_GroupResult = (bool)gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(group_toggle));
   }
 
   gtk_grab_remove (dlg);
@@ -3586,7 +3585,6 @@ char* DoNewProjectDlg ()
   char *str;
 
   // start by a warning message
-  // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=459
 // mattn: URLs no longer valid
 //  CString msg;
 //  msg = "Are you sure you want a new project?\n";
@@ -3699,9 +3697,13 @@ static void editor_save (GtkWidget *widget, gpointer data)
     return;
   }
 
-  char *str = gtk_editable_get_chars (GTK_EDITABLE (text), 0, -1);
+  GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
+  GtkTextIter start, end;
+  gtk_text_buffer_get_bounds ( buffer, &start, &end);
+  char *str = gtk_text_buffer_get_text(buffer, &start, &end, FALSE);
   fwrite (str, 1, strlen (str), f);
   fclose (f);
+  g_free(str);
 }
 
 static void editor_close (GtkWidget *widget, gpointer data)
@@ -3713,7 +3715,6 @@ static void editor_close (GtkWidget *widget, gpointer data)
 }
 
 // several attempts
-// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=355
 #if 0
 #ifdef _WIN32
 
@@ -3936,7 +3937,6 @@ void DoTextEditor (const char* filename, int cursorpos)
   DoGtkTextEditor (filename, cursorpos);
 
   // old win32 code with EditPad bindings, broken
-  // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=355
 #if 0
   strEditCommand = g_strAppPath.GetBuffer();
   strEditCommand += "editpad.exe";