Author: cazfi Date: Thu May 4 18:45:10 2017 New Revision: 35389 URL: http://svn.gna.org/viewcvs/freeciv?rev=35389&view=rev Log: Drop --enable-ruledit=experimental support from stable S2_6
See hrm Feature #656678 Modified: branches/S2_6/configure.ac branches/S2_6/tools/ruledit/ruledit.cpp branches/S2_6/tools/ruledit/ruledit.h branches/S2_6/tools/ruledit/tab_building.cpp branches/S2_6/tools/ruledit/tab_building.h branches/S2_6/tools/ruledit/tab_misc.cpp branches/S2_6/tools/ruledit/tab_tech.cpp branches/S2_6/tools/ruledit/tab_tech.h branches/S2_6/tools/ruledit/tab_unit.cpp branches/S2_6/tools/ruledit/tab_unit.h Modified: branches/S2_6/configure.ac URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/configure.ac?rev=35389&r1=35388&r2=35389&view=diff ============================================================================== --- branches/S2_6/configure.ac (original) +++ branches/S2_6/configure.ac Thu May 4 18:45:10 2017 @@ -1123,9 +1123,6 @@ yes) ruledit=yes ;; no) ruledit=no ;; test) ruledit=test ;; - experimental) - AC_DEFINE([RULEDIT_EXPERIMENTAL], [1], [build experimental features to freeciv-ruledit]) - ruledit=yes ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-ruledit]) ;; esac], [ruledit=test]) if test "x$ruledit" = "xyes" || test "x$ruledit" = "xtest" ; then Modified: branches/S2_6/tools/ruledit/ruledit.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/ruledit.cpp?rev=35389&r1=35388&r2=35389&view=diff ============================================================================== --- branches/S2_6/tools/ruledit/ruledit.cpp (original) +++ branches/S2_6/tools/ruledit/ruledit.cpp Thu May 4 18:45:10 2017 @@ -167,15 +167,3 @@ return ui_options; } - -/************************************************************************** - Show widget if experimental features enabled, hide otherwise -**************************************************************************/ -void show_experimental(QWidget *wdg) -{ -#ifdef RULEDIT_EXPERIMENTAL - wdg->show(); -#else - wdg->hide(); -#endif -} Modified: branches/S2_6/tools/ruledit/ruledit.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/ruledit.h?rev=35389&r1=35388&r2=35389&view=diff ============================================================================== --- branches/S2_6/tools/ruledit/ruledit.h (original) +++ branches/S2_6/tools/ruledit/ruledit.h Thu May 4 18:45:10 2017 @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13,8 +13,6 @@ #ifndef FC__RULEDIT_H #define FC__RULEDIT_H -void show_experimental(QWidget *wdg); - struct ruledit_arguments { /* Ruleset name. Is NULL if not specified. */ char *ruleset; Modified: branches/S2_6/tools/ruledit/tab_building.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/tab_building.cpp?rev=35389&r1=35388&r2=35389&view=diff ============================================================================== --- branches/S2_6/tools/ruledit/tab_building.cpp (original) +++ branches/S2_6/tools/ruledit/tab_building.cpp Thu May 4 18:45:10 2017 @@ -47,8 +47,6 @@ QVBoxLayout *main_layout = new QVBoxLayout(this); QGridLayout *bldg_layout = new QGridLayout(); QLabel *label; - QPushButton *add_button; - QPushButton *delete_button; ui = ui_in; selected = 0; @@ -78,16 +76,6 @@ bldg_layout->addWidget(label, 1, 0); bldg_layout->addWidget(same_name, 1, 1); bldg_layout->addWidget(name, 1, 2); - - add_button = new QPushButton(QString::fromUtf8(R__("Add Building")), this); - connect(add_button, SIGNAL(pressed()), this, SLOT(add_now2())); - bldg_layout->addWidget(add_button, 5, 0); - show_experimental(add_button); - - delete_button = new QPushButton(QString::fromUtf8(R__("Remove this Building")), this); - connect(delete_button, SIGNAL(pressed()), this, SLOT(delete_now())); - bldg_layout->addWidget(delete_button, 5, 2); - show_experimental(delete_button); refresh(); @@ -179,24 +167,6 @@ } /************************************************************************** - User requested building deletion -**************************************************************************/ -void tab_building::delete_now() -{ - if (selected != 0) { - ui->clear_required(improvement_rule_name(selected)); - if (is_building_needed(selected, &ruledit_qt_display_requirers)) { - return; - } - - selected->disabled = true; - - refresh(); - update_bldg_info(0); - } -} - -/************************************************************************** Initialize new tech for use. **************************************************************************/ bool tab_building::initialize_new_bldg(struct impr_type *pimpr) @@ -210,43 +180,6 @@ } /************************************************************************** - User requested new building -**************************************************************************/ -void tab_building::add_now2() -{ - struct impr_type *new_bldg; - - // Try to reuse freed building slot - improvement_iterate(pimpr) { - if (pimpr->disabled) { - if (initialize_new_bldg(pimpr)) { - pimpr->disabled = false; - update_bldg_info(pimpr); - refresh(); - } - return; - } - } improvement_iterate_end; - - // Try to add completely new building - if (game.control.num_impr_types >= B_LAST) { - return; - } - - // num_impr_types must be big enough to hold new building or - // improvement_by_number() fails. - game.control.num_impr_types++; - new_bldg = improvement_by_number(game.control.num_impr_types - 1); - if (initialize_new_bldg(new_bldg)) { - update_bldg_info(new_bldg); - - refresh(); - } else { - game.control.num_impr_types--; // Restore - } -} - -/************************************************************************** Toggled whether rule_name and name should be kept identical **************************************************************************/ void tab_building::same_name_toggle(bool checked) Modified: branches/S2_6/tools/ruledit/tab_building.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/tab_building.h?rev=35389&r1=35388&r2=35389&view=diff ============================================================================== --- branches/S2_6/tools/ruledit/tab_building.h (original) +++ branches/S2_6/tools/ruledit/tab_building.h Thu May 4 18:45:10 2017 @@ -50,8 +50,6 @@ private slots: void name_given(); void select_bldg(); - void add_now2(); // "2" in name to workaround segfault on program start. Due to compiler bug? - void delete_now(); void same_name_toggle(bool checked); }; Modified: branches/S2_6/tools/ruledit/tab_misc.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/tab_misc.cpp?rev=35389&r1=35388&r2=35389&view=diff ============================================================================== --- branches/S2_6/tools/ruledit/tab_misc.cpp (original) +++ branches/S2_6/tools/ruledit/tab_misc.cpp Thu May 4 18:45:10 2017 @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -51,7 +51,6 @@ QLabel *name_label; QLabel *version_label; QPushButton *save_button; - QPushButton *refresh_button; int row = 0; QTableWidgetItem *item; @@ -147,13 +146,6 @@ stats->horizontalHeader()->setVisible(false); stats->setEditTriggers(QAbstractItemView::NoEditTriggers); main_layout->addWidget(stats, row++, 0, 1, 2); - refresh_button = new QPushButton(QString::fromUtf8(R__("Refresh Stats")), this); - connect(refresh_button, SIGNAL(pressed()), this, SLOT(refresh_stats())); - main_layout->addWidget(refresh_button, row++, 0, 1, 2); - - // Stats never change except with experimental features. Hide useless - // button. - show_experimental(refresh_button); refresh(); Modified: branches/S2_6/tools/ruledit/tab_tech.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/tab_tech.cpp?rev=35389&r1=35388&r2=35389&view=diff ============================================================================== --- branches/S2_6/tools/ruledit/tab_tech.cpp (original) +++ branches/S2_6/tools/ruledit/tab_tech.cpp Thu May 4 18:45:10 2017 @@ -47,8 +47,6 @@ QVBoxLayout *main_layout = new QVBoxLayout(this); QGridLayout *tech_layout = new QGridLayout(); QLabel *label; - QPushButton *add_button; - QPushButton *delete_button; ui = ui_in; selected = 0; @@ -104,16 +102,6 @@ connect(root_req_button, SIGNAL(pressed()), this, SLOT(root_req_jump())); tech_layout->addWidget(label, 4, 0); tech_layout->addWidget(root_req_button, 4, 2); - - add_button = new QPushButton(QString::fromUtf8(R__("Add tech")), this); - connect(add_button, SIGNAL(pressed()), this, SLOT(add_now())); - tech_layout->addWidget(add_button, 5, 0); - show_experimental(add_button); - - delete_button = new QPushButton(QString::fromUtf8(R__("Remove this tech")), this); - connect(delete_button, SIGNAL(pressed()), this, SLOT(delete_now())); - tech_layout->addWidget(delete_button, 5, 2); - show_experimental(delete_button); refresh(); update_tech_info(0); @@ -345,24 +333,6 @@ } /************************************************************************** - User requested tech deletion -**************************************************************************/ -void tab_tech::delete_now() -{ - if (selected != 0) { - ui->clear_required(advance_rule_name(selected)); - if (is_tech_needed(selected, &ruledit_qt_display_requirers)) { - return; - } - - selected->require[AR_ONE] = A_NEVER; - - refresh(); - update_tech_info(0); - } -} - -/************************************************************************** Initialize new tech for use. **************************************************************************/ bool tab_tech::initialize_new_tech(struct advance *padv) @@ -382,41 +352,6 @@ } /************************************************************************** - User requested new tech -**************************************************************************/ -void tab_tech::add_now() -{ - struct advance *new_adv; - - // Try to reuse freed tech slot - advance_iterate(A_FIRST, padv) { - if (padv->require[AR_ONE] == A_NEVER) { - if (initialize_new_tech(padv)) { - update_tech_info(padv); - refresh(); - } - return; - } - } advance_iterate_end; - - // Try to add completely new tech - if (game.control.num_tech_types >= A_LAST) { - return; - } - - // num_tech_types must be big enough to hold new tech or - // advance_by_number() fails. - game.control.num_tech_types++; - new_adv = advance_by_number(game.control.num_tech_types - 1); - if (initialize_new_tech(new_adv)) { - update_tech_info(new_adv); - refresh(); - } else{ - game.control.num_tech_types--; // Restore - } -} - -/************************************************************************** Toggled whether rule_name and name should be kept identical **************************************************************************/ void tab_tech::same_name_toggle(bool checked) Modified: branches/S2_6/tools/ruledit/tab_tech.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/tab_tech.h?rev=35389&r1=35388&r2=35389&view=diff ============================================================================== --- branches/S2_6/tools/ruledit/tab_tech.h (original) +++ branches/S2_6/tools/ruledit/tab_tech.h Thu May 4 18:45:10 2017 @@ -72,8 +72,6 @@ void req1_menu(QAction *action); void req2_menu(QAction *action); void root_req_menu(QAction *action); - void add_now(); - void delete_now(); void same_name_toggle(bool checked); }; Modified: branches/S2_6/tools/ruledit/tab_unit.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/tab_unit.cpp?rev=35389&r1=35388&r2=35389&view=diff ============================================================================== --- branches/S2_6/tools/ruledit/tab_unit.cpp (original) +++ branches/S2_6/tools/ruledit/tab_unit.cpp Thu May 4 18:45:10 2017 @@ -47,8 +47,6 @@ QVBoxLayout *main_layout = new QVBoxLayout(this); QGridLayout *unit_layout = new QGridLayout(); QLabel *label; - QPushButton *add_button; - QPushButton *delete_button; ui = ui_in; selected = 0; @@ -78,16 +76,6 @@ unit_layout->addWidget(label, 1, 0); unit_layout->addWidget(same_name, 1, 1); unit_layout->addWidget(name, 1, 2); - - add_button = new QPushButton(QString::fromUtf8(R__("Add Unit")), this); - connect(add_button, SIGNAL(pressed()), this, SLOT(add_now())); - unit_layout->addWidget(add_button, 5, 0); - show_experimental(add_button); - - delete_button = new QPushButton(QString::fromUtf8(R__("Remove this Unit")), this); - connect(delete_button, SIGNAL(pressed()), this, SLOT(delete_now())); - unit_layout->addWidget(delete_button, 5, 2); - show_experimental(delete_button); refresh(); @@ -179,24 +167,6 @@ } /************************************************************************** - User requested unit deletion -**************************************************************************/ -void tab_unit::delete_now() -{ - if (selected != 0) { - ui->clear_required(utype_rule_name(selected)); - if (is_utype_needed(selected, &ruledit_qt_display_requirers)) { - return; - } - - selected->disabled = true; - - refresh(); - update_utype_info(0); - } -} - -/************************************************************************** Initialize new tech for use. **************************************************************************/ bool tab_unit::initialize_new_utype(struct unit_type *ptype) @@ -210,43 +180,6 @@ } /************************************************************************** - User requested new unit -**************************************************************************/ -void tab_unit::add_now() -{ - struct unit_type *new_utype; - - // Try to reuse freed utype slot - unit_type_iterate(ptype) { - if (ptype->disabled) { - if (initialize_new_utype(ptype)) { - ptype->disabled = false; - update_utype_info(ptype); - refresh(); - } - return; - } - } unit_type_iterate_end; - - // Try to add completely new unit type - if (game.control.num_unit_types >= U_LAST) { - return; - } - - // num_unit_types must be big enough to hold new unit or - // utype_by_number() fails. - game.control.num_unit_types++; - new_utype = utype_by_number(game.control.num_unit_types - 1); - if (initialize_new_utype(new_utype)) { - update_utype_info(new_utype); - - refresh(); - } else { - game.control.num_unit_types--; // Restore - } -} - -/************************************************************************** Toggled whether rule_name and name should be kept identical **************************************************************************/ void tab_unit::same_name_toggle(bool checked) Modified: branches/S2_6/tools/ruledit/tab_unit.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/tab_unit.h?rev=35389&r1=35388&r2=35389&view=diff ============================================================================== --- branches/S2_6/tools/ruledit/tab_unit.h (original) +++ branches/S2_6/tools/ruledit/tab_unit.h Thu May 4 18:45:10 2017 @@ -50,8 +50,6 @@ private slots: void name_given(); void select_unit(); - void add_now(); - void delete_now(); void same_name_toggle(bool checked); }; _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits