Changeset 2968 for vidalia/trunk/src

Show
Ignore:
Timestamp:
08/15/08 00:53:56 (3 months ago)
Author:
edmanm
Message:

Make pressing "Return" mean the same thing as clicking "OK" in the config
dialog, and make pressing "Escape" mean the same thing as clicking "Cancel".

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vidalia/trunk/src/vidalia/config/configdialog.cpp

    r2653 r2968  
    5353   * translations. */ 
    5454  QPushButton *button = ui.buttonBox->button(QDialogButtonBox::Ok); 
    55   if (button) 
     55  if (button) { 
    5656    button->setText(tr("OK")); 
     57    Vidalia::createShortcut(QKeySequence(Qt::Key_Return),  
     58                            this, button, SLOT(click())); 
     59  } 
    5760  button = ui.buttonBox->button(QDialogButtonBox::Cancel); 
    58   if (button) 
     61  if (button) { 
    5962    button->setText(tr("Cancel")); 
     63    Vidalia::createShortcut(QKeySequence(Qt::Key_Escape), 
     64                            this, button, SLOT(click())); 
     65  } 
    6066   
    6167  /* Connect the button box signals to the appropriate slots */