[haiku-commits] haiku: hrev48716 - src/preferences/shortcuts

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 24 Jan 2015 04:19:23 +0100 (CET)

hrev48716 adds 2 changesets to branch 'master'
old head: f6099728e419f4782cee75cc216178aa52be9492
new head: d2297737364abef41c0735a53a0a19bf205940c0
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=d2297737364a+%5Ef6099728e419

----------------------------------------------------------------------------

d13b9014e827: Shortcuts: Fix #11777.
  
  - Add missing B_AUTO_UPDATE_SIZE_LIMITS flag to window, otherwise it
    never recomputes its initial size in the absence of previously
    stored settings.

d2297737364a: Shortcuts: Automatic whitespace cleanup.

                                         [ Rene Gollent <rene@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

1 file changed, 11 insertions(+), 11 deletions(-)
src/preferences/shortcuts/ShortcutsWindow.cpp | 22 +++++++++++-----------

############################################################################

Commit:      d13b9014e8274cb0f1ea9968562de885743c431c
URL:         http://cgit.haiku-os.org/haiku/commit/?id=d13b9014e827
Author:      Rene Gollent <rene@xxxxxxxxxxx>
Date:        Sat Jan 24 03:17:05 2015 UTC

Ticket:      https://dev.haiku-os.org/ticket/11777

Shortcuts: Fix #11777.

- Add missing B_AUTO_UPDATE_SIZE_LIMITS flag to window, otherwise it
  never recomputes its initial size in the absence of previously
  stored settings.

----------------------------------------------------------------------------

diff --git a/src/preferences/shortcuts/ShortcutsWindow.cpp 
b/src/preferences/shortcuts/ShortcutsWindow.cpp
index 6cc3aa6..a7fe5d4 100644
--- a/src/preferences/shortcuts/ShortcutsWindow.cpp
+++ b/src/preferences/shortcuts/ShortcutsWindow.cpp
@@ -105,7 +105,7 @@ CreateKeysPopUp()
 ShortcutsWindow::ShortcutsWindow()
        :
        BWindow(BRect(0, 0, 0, 0), B_TRANSLATE_SYSTEM_NAME("Shortcuts"),
-               B_TITLED_WINDOW, 0L),
+               B_TITLED_WINDOW, B_AUTO_UPDATE_SIZE_LIMITS),
        fSavePanel(NULL),
        fOpenPanel(NULL),
        fSelectPanel(NULL),

############################################################################

Revision:    hrev48716
Commit:      d2297737364abef41c0735a53a0a19bf205940c0
URL:         http://cgit.haiku-os.org/haiku/commit/?id=d2297737364a
Author:      Rene Gollent <rene@xxxxxxxxxxx>
Date:        Sat Jan 24 03:18:25 2015 UTC

Shortcuts: Automatic whitespace cleanup.

----------------------------------------------------------------------------

diff --git a/src/preferences/shortcuts/ShortcutsWindow.cpp 
b/src/preferences/shortcuts/ShortcutsWindow.cpp
index a7fe5d4..0fc38d4 100644
--- a/src/preferences/shortcuts/ShortcutsWindow.cpp
+++ b/src/preferences/shortcuts/ShortcutsWindow.cpp
@@ -295,9 +295,9 @@ ShortcutsWindow::QuitRequested()
                                // up the file requester
                                if (fLastSaved.InitCheck() == B_OK) {
                                        if (_SaveKeySet(fLastSaved) == false) {
-                                               BAlert* alert = new 
BAlert(ERROR, 
+                                               BAlert* alert = new 
BAlert(ERROR,
                                                        B_TRANSLATE("Shortcuts 
was unable to save your "
-                                                               "KeySet 
file!"), 
+                                                               "KeySet file!"),
                                                        B_TRANSLATE("Oh no"));
                                                alert->SetFlags(alert->Flags() 
| B_CLOSE_ON_ESCAPE);
                                                alert->Go();
@@ -332,7 +332,7 @@ ShortcutsWindow::_GetSettingsFile(entry_ref* eref)
        BPath path;
        if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK)
                return false;
-       else 
+       else
                path.Append(SHORTCUTS_SETTING_FILE_NAME);
 
        if (BEntry(path.Path(), true).GetRef(eref) == B_OK)
@@ -371,7 +371,7 @@ ShortcutsWindow::_SaveKeySet(BEntry& saveEntry)
 }
 
 
-// Appends new entries from the file specified in the "spec" entry of 
+// Appends new entries from the file specified in the "spec" entry of
 // (loadMessage). Returns true iff successful.
 bool
 ShortcutsWindow::_LoadKeySet(const BMessage& loadMessage)
@@ -495,7 +495,7 @@ ShortcutsWindow::MessageReceived(BMessage* message)
                                        0, false);
                                fOpenPanel->Show();
                        }
-                       fOpenPanel->SetButtonLabel(B_DEFAULT_BUTTON, 
fLastOpenWasAppend ? 
+                       fOpenPanel->SetButtonLabel(B_DEFAULT_BUTTON, 
fLastOpenWasAppend ?
                                B_TRANSLATE("Append") : B_TRANSLATE("Open"));
                        break;
 
@@ -545,14 +545,14 @@ ShortcutsWindow::MessageReceived(BMessage* message)
                                BMessage fileMsg;
                                {
                                        BFile file(&ref, B_READ_ONLY);
-                                       if ((file.InitCheck() != B_OK) 
+                                       if ((file.InitCheck() != B_OK)
                                                || (fileMsg.Unflatten(&file) != 
B_OK)) {
                                                if (isStartMsg) {
                                                        // use this to save to 
anyway
                                                        fLastSaved = 
BEntry(&ref);
                                                        break;
                                                } else {
-                                                       BAlert* alert = new 
BAlert(ERROR, 
+                                                       BAlert* alert = new 
BAlert(ERROR,
                                                                
B_TRANSLATE("Shortcuts was couldn't open your "
                                                                "KeySet 
file!"), B_TRANSLATE("OK"));
                                                        
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
@@ -582,7 +582,7 @@ ShortcutsWindow::MessageReceived(BMessage* message)
                                        _GetSettingsFile(&eref);
                                        if (ref == eref) fKeySetModified = 
false;
                                } else {
-                                       BAlert* alert = new BAlert(ERROR, 
+                                       BAlert* alert = new BAlert(ERROR,
                                                B_TRANSLATE("Shortcuts was 
unable to parse your "
                                                "KeySet file!"), 
B_TRANSLATE("OK"));
                                        alert->SetFlags(alert->Flags() | 
B_CLOSE_ON_ESCAPE);
@@ -637,7 +637,7 @@ ShortcutsWindow::MessageReceived(BMessage* message)
 
                        if (showSaveError) {
                                BAlert* alert = new BAlert(ERROR,
-                                       B_TRANSLATE("Shortcuts wasn't able to 
save your keyset."), 
+                                       B_TRANSLATE("Shortcuts wasn't able to 
save your keyset."),
                                        B_TRANSLATE("OK"));
                                alert->SetFlags(alert->Flags() | 
B_CLOSE_ON_ESCAPE);
                                alert->Go(NULL);
@@ -673,7 +673,7 @@ ShortcutsWindow::MessageReceived(BMessage* message)
                                _MarkKeySetModified();
 
                                // Rules for new selection: If there is an item 
at (index),
-                               // select it. Otherwise, if there is an item at 
(index-1), 
+                               // select it. Otherwise, if there is an item at 
(index-1),
                                // select it. Otherwise, select nothing.
                                int num = fColumnListView->CountRows();
                                if (num > 0) {


Other related posts:

  • » [haiku-commits] haiku: hrev48716 - src/preferences/shortcuts - anevilyak