]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/gtkdlgs.cpp
Merge commit 'c5065eecd29651649c2f3d04be8af9a19d189733' into master-merge
[xonotic/netradiant.git] / radiant / gtkdlgs.cpp
index 0a2206069f6a78f98c009dfc6abde978bc32f126..1d31c01882013c81628c18a151ba4ec7fbaa05c6 100644 (file)
@@ -40,7 +40,6 @@
 #include <gtk/gtk.h>
 
 #include "debugging/debugging.h"
-#include "version.h"
 #include "aboutmsg.h"
 
 #include "igl.h"
@@ -424,11 +423,24 @@ void about_button_issues( ui::Widget widget, gpointer data ){
        OpenURL( cred.c_str() );
 }
 
+static void AddParagraph( ui::VBox vbox, const char* text, bool use_markup ){
+       auto label = ui::Label( text );
+       gtk_label_set_use_markup( GTK_LABEL( label ), use_markup );
+       gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
+       gtk_label_set_justify( label, GTK_JUSTIFY_LEFT );
+       label.show();
+       vbox.pack_start( label, TRUE, TRUE, 0 );
+}
+
+static void AddParagraph( ui::VBox vbox, const char* text ){
+       AddParagraph( vbox, text, false );
+}
+
 void DoAbout(){
        ModalDialog dialog;
        ModalDialogButton ok_button( dialog, eIDOK );
 
-       auto window = MainFrame_getWindow().create_modal_dialog_window("About NetRadiant", dialog );
+       auto window = MainFrame_getWindow().create_modal_dialog_window("About " RADIANT_NAME, dialog );
 
        {
                auto vbox = create_dialog_vbox( 4, 4 );
@@ -436,11 +448,11 @@ void DoAbout(){
 
                {
             auto hbox = create_dialog_hbox( 4 );
-                       vbox.pack_start( hbox, FALSE, TRUE, 0 );
+                       vbox.pack_start( hbox, FALSE, FALSE, 0 );
 
                        {
                 auto vbox2 = create_dialog_vbox( 4 );
-                               hbox.pack_start( vbox2, TRUE, FALSE, 0 );
+                               hbox.pack_start( vbox2, FALSE, FALSE, 5 );
                                {
                                        auto frame = create_dialog_frame( 0, ui::Shadow::IN );
                                        vbox2.pack_start( frame, FALSE, FALSE, 0 );
@@ -453,29 +465,44 @@ void DoAbout(){
                        }
 
                        {
-                               char const *label_text = "NetRadiant " RADIANT_VERSION "\n"
-                                                                               __DATE__ "\n\n"
-                                        RADIANT_ABOUTMSG "\n\n"
-                                                                               "This program is free software\n"
-                                                                               "licensed under the GNU GPL.\n\n"
-                                                                               "NetRadiant is unsupported, however\n"
-                                                                               "you may report your problems at\n"
-                                                                               "https://gitlab.com/xonotic/netradiant/issues";
-
-                               auto label = ui::Label( label_text );
-
-                               label.show();
-                               hbox.pack_start( label, FALSE, FALSE, 0 );
-                               gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
-                               gtk_label_set_justify( label, GTK_JUSTIFY_LEFT );
+                               // HACK: that may not be related to font size
+                               auto about_vbox = ui::VBox( FALSE, 5 );
+                               about_vbox.show();
+                               hbox.pack_start( about_vbox, FALSE, FALSE, 0 );
+
+                               AddParagraph( about_vbox,
+                                       RADIANT_NAME " " RADIANT_VERSION_STRING " (" __DATE__ ")\n"
+                                       RADIANT_ABOUTMSG );
+                               AddParagraph( about_vbox,
+                                       "Get news and latest build at "
+                                       "<a href='https://netradiant.gitlab.io/'>"
+                                               "netradiant.gitlab.io"
+                                       "</a>\n"
+                                       "Please report your issues at "
+                                       "<a href='https://gitlab.com/xonotic/netradiant/issues'>"
+                                               "gitlab.com/xonotic/netradiant/issues"
+                                       "</a>\n"
+                                       "The team cannot provide support for custom builds.", true );
+                               AddParagraph( about_vbox,
+                                       RADIANT_NAME " is a community project maintained by "
+                                       "<a href='https://xonotic.org'>"
+                                               "Xonotic"
+                                       "</a>\n"
+                                       "and developed with help from "
+                                       "<a href='https://netradiant.gitlab.io/page/about/'>"
+                                               "other game projects"
+                                       "</a> and individuals. ", true );
+                               AddParagraph( about_vbox,
+                                       "This program is free software licensed under the GNU GPL." );
                        }
 
                        {
                 auto vbox2 = create_dialog_vbox( 4 );
-                               hbox.pack_start( vbox2, FALSE, TRUE, 0 );
+                               hbox.pack_start( vbox2, TRUE, TRUE, 0 );
                                {
                     auto button = create_modal_dialog_button( "OK", ok_button );
                                        vbox2.pack_start( button, FALSE, FALSE, 0 );
+                                       gtk_widget_grab_focus( GTK_WIDGET( button ) );
                                }
                                {
                     auto button = create_dialog_button( "Credits", G_CALLBACK( about_button_credits ), 0 );