]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Fix menu and about url
authorThomas Debesse <dev@illwieckz.net>
Tue, 11 Jul 2017 03:08:45 +0000 (05:08 +0200)
committerThomas Debesse <dev@illwieckz.net>
Tue, 11 Jul 2017 03:17:09 +0000 (05:17 +0200)
- remove dead url and set usable ones instead
- allow to open https:// urls

radiant/gtkdlgs.cpp
radiant/help.cpp
radiant/mainframe.cpp
radiant/preferences.cpp
radiant/preferences.h
setup/data/tools/global.xlink

index daa0f31c5f1be2b3e3d7f65740df5dd8febe6e23..d0e735f84d652f9aaa67cdccc6a79d00f35d51c5 100644 (file)
@@ -434,13 +434,19 @@ void DoSides( int type, int axis ){
 
 void about_button_changelog( GtkWidget *widget, gpointer data ){
        StringOutputStream log( 256 );
-       log << AppPath_get() << "changelog.txt";
+       log << "https://gitlab.com/xonotic/netradiant/commits/master";
        OpenURL( log.c_str() );
 }
 
 void about_button_credits( GtkWidget *widget, gpointer data ){
        StringOutputStream cred( 256 );
-       cred << AppPath_get() << "credits.html";
+       cred << "https://gitlab.com/xonotic/netradiant/network/master";
+       OpenURL( cred.c_str() );
+}
+
+void about_button_issues( GtkWidget *widget, gpointer data ){
+       StringOutputStream cred( 256 );
+       cred << "https://gitlab.com/xonotic/netradiant/issues";
        OpenURL( cred.c_str() );
 }
 
@@ -476,12 +482,11 @@ void DoAbout(){
                                GtkLabel* label = GTK_LABEL( gtk_label_new( "NetRadiant " RADIANT_VERSION "\n"
                                                                                                                        __DATE__ "\n\n"
                                                                                                                        RADIANT_ABOUTMSG "\n\n"
-                                                                                                                                                        "By alientrap.org\n\n"
+                                                                                                                                                        "By xonotic.org\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"
-                                                                                                                                                        "http://www.icculus.org/netradiant/"
+                                                                                                                                                        "you may report your problems on issue tracker.\n"
                                                                                                                        ) );
 
                                gtk_widget_show( GTK_WIDGET( label ) );
@@ -502,7 +507,11 @@ void DoAbout(){
                                        gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
                                }
                                {
-                                       GtkButton* button = create_dialog_button( "Changelog", G_CALLBACK( about_button_changelog ), 0 );
+                                       GtkButton* button = create_dialog_button( "Changes", G_CALLBACK( about_button_changelog ), 0 );
+                                       gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+                               }
+                               {
+                                       GtkButton* button = create_dialog_button( "Issues", G_CALLBACK( about_button_issues ), 0 );
                                        gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
                                }
                        }
index d5319f30c0469575d9091c8baa81e483b56c7914..07b51603de548afe5ea44394bc1be1376061bc9a 100644 (file)
@@ -75,7 +75,8 @@ void process_xlink( const char* filename, const char *menu_name, const char *bas
 
                                                xmlChar* prop = xmlGetProp( pNode, reinterpret_cast<const xmlChar*>( "url" ) );
                                                ASSERT_NOTNULL( prop );
-                                               if ( strstr( reinterpret_cast<const char*>( prop ), "http://" ) ) {
+                                               if ( strstr( reinterpret_cast<const char*>( prop ), "http://" ) ||
+                                                       strstr( reinterpret_cast<const char*>( prop ), "https://" ) ) {
                                                        // complete URL
                                                        url = reinterpret_cast<const char*>( prop );
                                                }
index 8989da307ea3585e3a549c8cd0ff688a2deb4565..b86d69ecf78fde3ecb2cb1397806c3bba9567b9c 100644 (file)
@@ -956,31 +956,16 @@ void thunk_OnSleep(){
 }
 
 void OpenUpdateURL(){
-       // build the URL
-       StringOutputStream URL( 256 );
-       URL << "http://www.icculus.org/netradiant/?cmd=update&data=dlupdate&query_dlup=1";
-#ifdef WIN32
-       URL << "&OS_dlup=1";
-#elif defined( __APPLE__ )
-       URL << "&OS_dlup=2";
-#else
-       URL << "&OS_dlup=3";
-#endif
-       URL << "&Version_dlup=" RADIANT_VERSION;
-       g_GamesDialog.AddPacksURL( URL );
-       OpenURL( URL.c_str() );
+       OpenURL( "https://gitlab.com/xonotic/netradiant/tags" );
 }
 
 // open the Q3Rad manual
 void OpenHelpURL(){
-       // at least on win32, AppPath + "docs/index.html"
-       StringOutputStream help( 256 );
-       help << AppPath_get() << "docs/index.html";
-       OpenURL( help.c_str() );
+       OpenURL( "https://gitlab.com/xonotic/xonotic/wikis/Mapping" );
 }
 
 void OpenBugReportURL(){
-       OpenURL( "http://www.icculus.org/netradiant/?cmd=bugs" );
+       OpenURL( "https://gitlab.com/xonotic/netradiant/issues" );
 }
 
 
@@ -1847,7 +1832,7 @@ GtkMenuItem* create_file_menu(){
        menu_separator( menu );
        MRU_constructMenu( menu );
        menu_separator( menu );
-       create_menu_item_with_mnemonic( menu, "Check for NetRadiant update (web)", "CheckForUpdate" ); // FIXME
+       create_menu_item_with_mnemonic( menu, "Check for NetRadiant update", "CheckForUpdate" ); // FIXME
        create_menu_item_with_mnemonic( menu, "E_xit", "Exit" );
 
        return file_menu_item;
index 4209fdb35d6c5196fc1cae7e0c1909b2663d414b..46d15c7a4e38d231cb28c879a5bf3d32b5dce6b4 100644 (file)
@@ -484,15 +484,6 @@ inline const char* GameDescription_getIdentifier( const CGameDescription& gameDe
        return identifier;
 }
 
-void CGameDialog::AddPacksURL( StringOutputStream &URL ){
-       // add the URLs for the list of game packs installed
-       // FIXME: this is kinda hardcoded for now..
-       std::list<CGameDescription *>::iterator iGame;
-       for ( iGame = mGames.begin(); iGame != mGames.end(); ++iGame )
-       {
-               URL << "&Games_dlup%5B%5D=" << GameDescription_getIdentifier( *( *iGame ) );
-       }
-}
 
 CGameDialog g_GamesDialog;
 
index 8793d03904b091a075b6cdf1a8969a09d7100b28..293541a58245b34af1c9a35bc11f66d90f4c9a39 100644 (file)
@@ -250,8 +250,6 @@ CGameDialog() :
 }
 virtual ~CGameDialog();
 
-void AddPacksURL( StringOutputStream &s );
-
 /*!
    intialize the game dialog, called at CPrefsDlg::Init
    will scan for games, load prefs, and do game selection dialog if needed
index 3ca47f1ab3d6058dccbcd811cb4a8eeb24bef1c5..4b6d0343f124f42a2b7ec31e315865a1f3b84ce7 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
 <!-- generated by Radiant setup, modify at your own risks -->
 <links>
-<item name="NetRadiant website" url="http://www.icculus.org/netradiant/"/>
-<item name="q3map2 handbook (web)" url="http://shaderlab.com/q3map2/manual/default.htm"/>
-<item name="ETB documentation (web)" url="http://www.map-craft.com/modules.php?name=ETB"/>
+<item name="NetRadiant website" url="https://gitlab.com/xonotic/netradiant"/>
+<item name="q3map2 handbook" url="http://q3map2.everyonelookbusy.net/shader_manual/"/>
+<item name="q3map2 wikibook" url="https://en.wikibooks.org/wiki/Q3Map2"/>
 </links>