[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 21/43: grc: Default button in save dialog i
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 21/43: grc: Default button in save dialog is now 'save' instead of 'close without saving' |
Date: |
Thu, 2 Apr 2015 19:15:51 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 212982ca906b136ab0e4bb7bb47b5588c75de61a
Author: Ethan Trewhitt <address@hidden>
Date: Wed Feb 18 12:36:00 2015 -0500
grc: Default button in save dialog is now 'save' instead of 'close without
saving'
---
grc/gui/Dialogs.py | 4 +++-
grc/gui/MainWindow.py | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/grc/gui/Dialogs.py b/grc/gui/Dialogs.py
index cf0ca02..e1fc680 100644
--- a/grc/gui/Dialogs.py
+++ b/grc/gui/Dialogs.py
@@ -116,7 +116,7 @@ class TextDisplay(gtk.TextView):
menu.show_all()
return False
-def MessageDialogHelper(type, buttons, title=None, markup=None,
extra_buttons=None):
+def MessageDialogHelper(type, buttons, title=None, markup=None,
default_response=None, extra_buttons=None):
"""
Create a modal message dialog and run it.
@@ -128,6 +128,7 @@ def MessageDialogHelper(type, buttons, title=None,
markup=None, extra_buttons=No
Args:
title: the title of the window (string)
markup: the message text with pango markup
+ default_response: if set, determines which button is highlighted by
default
extra_buttons: a tuple containing pairs of values; each value is the
button's text and the button's return value
Returns:
@@ -137,6 +138,7 @@ def MessageDialogHelper(type, buttons, title=None,
markup=None, extra_buttons=No
if title: message_dialog.set_title(title)
if markup: message_dialog.set_markup(markup)
if extra_buttons: message_dialog.add_buttons(*extra_buttons)
+ if default_response: message_dialog.set_default_response(default_response)
response = message_dialog.run()
message_dialog.destroy()
return response
diff --git a/grc/gui/MainWindow.py b/grc/gui/MainWindow.py
index f26f30e..2d48504 100644
--- a/grc/gui/MainWindow.py
+++ b/grc/gui/MainWindow.py
@@ -351,7 +351,7 @@ class MainWindow(gtk.Window):
)
return MessageDialogHelper(
gtk.MESSAGE_QUESTION, gtk.BUTTONS_NONE, 'Unsaved Changes!',
- 'Would you like to save changes before closing?', buttons
+ 'Would you like to save changes before closing?', gtk.RESPONSE_OK,
buttons
)
def _get_files(self):
- [Commit-gnuradio] [gnuradio] 14/43: gnuradio-runtime: modified buffer length types to size_t, moved buffer length vectors into detail, (continued)
- [Commit-gnuradio] [gnuradio] 14/43: gnuradio-runtime: modified buffer length types to size_t, moved buffer length vectors into detail, git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 22/43: grc: close unsaved pages first (for cancel save option), git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 13/43: fec: ldpc GRC compat cleanup, git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 36/43: Merge remote-tracking branch 'fengzhe/chunks_to_symbols_update', git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 25/43: grc: set permissions for generated files, git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 08/43: fec: adding ldpc encoder and decoder, initial compile working, git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 23/43: grc: make use of GRC_HIER_PATH at runtime, git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 33/43: Merge remote-tracking branch 'saikwolf/hier_buff_tweak', git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 24/43: grc: use 'import' for grc-generated hier_blocks (#763), git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 02/43: gnuradio-runtime: updated hier_block2 and hier_block_detail to allow for propagation of min/max output buffer to all blocks within the hier, git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 21/43: grc: Default button in save dialog is now 'save' instead of 'close without saving',
git <=
- [Commit-gnuradio] [gnuradio] 37/43: Merge remote-tracking branch 'gnuradio-wg-grc/master_grcwg', git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 05/43: digital: bug fixed in chunks_to_symbols that the callback functiion set_symbol_table didn't work with additonal qa_tests, git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 32/43: Merge branch 'maint', git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 09/43: fec: adding objects needed to run LDPC along with example ALIST file, now imports and instantiates happily, git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 41/43: qtgui: use QPen::setWidthF for non-integer values., git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 39/43: dtv: move "static const" variables from header / class into the main code. The original code is not necessary to have in the class, and causes issues when compiling using c++11 compliance., git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 43/43: Merge remote-tracking branch 'michaelld/fixes_for_std_complex', git, 2015/04/02
- [Commit-gnuradio] [gnuradio] 38/43: dtv: redo c++0x complaint std::complex to be c++11 compliant; works on OSX with GCC (4.2 and 4.8, using listdc++) and Clang (LLVM 3.4 and 3.6, using libc++), with and without -std=c++11., git, 2015/04/02