patchFreeciv - Patches: patch #3494, popup_incite_dialog(struct city...

 
 
Show feedback again

patch #3494: popup_incite_dialog(struct city *pcity, int cost) implementation

Submitted by:  None
Submitted on:  Thu 09 Aug 2012 05:37:38 PM UTC  
 
Category: client-qtPriority: 5 - Normal
Status: Wont DoPrivacy: Public
Assigned to: mir3x <mir3x>Originator Email: -unavailable-
Open/Closed: ClosedPlanned Release: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 22 Jun 2013 12:17:28 PM UTC, comment #2:

Missing translations, code style and patch itself :D

mir3x <mir3x>
Project MemberIn charge of this item.
Sat 11 Aug 2012 12:09:14 AM UTC, comment #1:

See http://freeciv.wikia.com/wiki/How_to_Contribute for instructions how to create patch (diff) that we can apply to our own source trees. Add such patch as file attachment to ticket, not inline comment.

Marko Lindqvist <cazfi>
Project Administrator
Thu 09 Aug 2012 05:37:38 PM UTC, original submission:

void popup_incite_dialog(struct city *pcity, int cost)
{
QMessageBox ask(gui()->central_wdg);
int ret;
QString askText = "Treasury contains "+ QString::number(client.conn.playing->economic.gold, 10)+" gold.";

if(INCITE_IMPOSSIBLE_COST == cost){
askText = "You can't incite a revolt in ";
askText.append(pcity->name);
ask.setText(askText);
ask.setWindowTitle("City can't be incited!");
ask.setStandardButtons(QMessageBox::Ok);
ask.setDefaultButton(QMessageBox::Ok);
ask.setIcon(QMessageBox::Information);
}
if(cost <= client.conn.playing->economic.gold){
askText.prepend("Incite a revolt for " + QString::number(cost, 10) + " gold?\n");
ask.setText(askText);
ask.setWindowTitle("Incite a Revolt!");
ask.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
ask.setDefaultButton(QMessageBox::Yes);
ask.setIcon(QMessageBox::Question);
} else {
askText.prepend("Incite a revolt for " + QString::number(cost, 10) + " gold?\n");
ask.setWindowTitle("Traitors Demand Too Much!");
ask.setText(askText);
ask.setStandardButtons(QMessageBox::Ok);
ask.setDefaultButton(QMessageBox::Ok);
ask.setIcon(QMessageBox::Information);
}
ret = ask.exec();

switch (ret) {
case QMessageBox::Yes:
request_diplomat_action(DIPLOMAT_INCITE, diplomat_id,
diplomat_target_id, 0);
break;
case QMessageBox::Ok:
case QMessageBox::No:
break;
}

}

Anonymous

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mir3x (Posted a comment)
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 22 Jun 2013 12:17:28 PM UTCmir3xStatusNone=>Wont Do
      Assigned toNone=>mir3x
      Open/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup