]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/dialoginfo.cpp
uncrustify! now the code is only ugly on the *inside*
[xonotic/netradiant.git] / radiant / dialoginfo.cpp
index 54a7472c9923096bf3cc64c53fcb98903d933a60..c017cb0f28c95624e74c66cd487922d4daa2f829 100644 (file)
@@ -1,23 +1,23 @@
 /*
-Copyright (C) 1999-2007 id Software, Inc. and contributors.
-For a list of contributors, see the accompanying CONTRIBUTORS file.
+   Copyright (C) 1999-2007 id Software, Inc. and contributors.
+   For a list of contributors, see the accompanying CONTRIBUTORS file.
 
-This file is part of GtkRadiant.
+   This file is part of GtkRadiant.
 
-GtkRadiant is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+   GtkRadiant is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
 
-GtkRadiant is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+   GtkRadiant is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
-You should have received a copy of the GNU General Public License
-along with GtkRadiant; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-*/
+   You should have received a copy of the GNU General Public License
+   along with GtkRadiant; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
 
 //
 // InfoDialog - non-modal, not derived from Dialog
@@ -35,41 +35,38 @@ GtkWidget *s_pEdit;
 // =============================================================================
 // Global functions
 
-void ShowInfoDialog(const char* pText)
-{
-  if (g_dlgInfo == NULL)
-  {
-    GtkWidget *dlg, *scr, *text;
+void ShowInfoDialog( const char* pText ){
+       if ( g_dlgInfo == NULL ) {
+               GtkWidget *dlg, *scr, *text;
 
-    g_dlgInfo = dlg = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-    gtk_window_set_title (GTK_WINDOW (dlg), "Information");
-    gtk_signal_connect (GTK_OBJECT (dlg), "delete_event",
-                       GTK_SIGNAL_FUNC (gtk_widget_hide), NULL);
-    gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
-                       GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
-    gtk_window_set_default_size (GTK_WINDOW (dlg), 300, 150);
+               g_dlgInfo = dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL );
+               gtk_window_set_title( GTK_WINDOW( dlg ), "Information" );
+               gtk_signal_connect( GTK_OBJECT( dlg ), "delete_event",
+                                                       GTK_SIGNAL_FUNC( gtk_widget_hide ), NULL );
+               gtk_signal_connect( GTK_OBJECT( dlg ), "destroy",
+                                                       GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
+               gtk_window_set_default_size( GTK_WINDOW( dlg ), 300, 150 );
 
-    scr = gtk_scrolled_window_new (NULL, NULL);
-    gtk_widget_show (scr);
-    gtk_container_add (GTK_CONTAINER (dlg), scr);
-    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scr), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
-    gtk_container_set_border_width (GTK_CONTAINER (scr), 5);
-    gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scr), GTK_SHADOW_IN);
+               scr = gtk_scrolled_window_new( NULL, NULL );
+               gtk_widget_show( scr );
+               gtk_container_add( GTK_CONTAINER( dlg ), scr );
+               gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scr ), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC );
+               gtk_container_set_border_width( GTK_CONTAINER( scr ), 5 );
+               gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scr ), GTK_SHADOW_IN );
 
-    s_pEdit = text = gtk_text_view_new();
-    gtk_container_add (GTK_CONTAINER (scr), text);
-    gtk_widget_show (text);
-    gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text), GTK_WRAP_WORD);
-  }
+               s_pEdit = text = gtk_text_view_new();
+               gtk_container_add( GTK_CONTAINER( scr ), text );
+               gtk_widget_show( text );
+               gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( text ), GTK_WRAP_WORD );
+       }
 
-  GtkTextBuffer* buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(s_pEdit));
-  gtk_text_buffer_set_text (buffer, pText, -1);
-  gtk_widget_show (g_dlgInfo);
+       GtkTextBuffer* buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW( s_pEdit ) );
+       gtk_text_buffer_set_text( buffer, pText, -1 );
+       gtk_widget_show( g_dlgInfo );
 }
 
-void HideInfoDialog()
-{
-  if (g_dlgInfo)
-    gtk_widget_hide (g_dlgInfo);
+void HideInfoDialog(){
+       if ( g_dlgInfo ) {
+               gtk_widget_hide( g_dlgInfo );
+       }
 }
-