[PATCH 5/8] Expand the details pane when showing unformatted DASDs (#580463)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We are using DetailMessageWindow.  Make sure the details are expanded by
default when showing unformatted DASDs.  Other uses of this dialog
(e.g., traceback) do not want to have the details expanded by default,
so keep it False unless the use passes the expanded=True parameter.
---
 cmdline.py              |    2 +-
 gui.py                  |    8 +++++---
 installinterfacebase.py |    3 ++-
 rescue.py               |    2 +-
 text.py                 |    2 +-
 5 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/cmdline.py b/cmdline.py
index ca9abca..88f520f 100644
--- a/cmdline.py
+++ b/cmdline.py
@@ -108,7 +108,7 @@ class InstallInterface(InstallInterfaceBase):
 
     def detailedMessageWindow(self, title, text, longText=None, type="ok",
                               default=None, custom_buttons=None,
-                              custom_icon=None):
+                              custom_icon=None, expanded=False):
         if longText:
             text += "\n\n%s" % longText
 
diff --git a/gui.py b/gui.py
index 4e8eb6d..e8f8254 100755
--- a/gui.py
+++ b/gui.py
@@ -812,7 +812,7 @@ class MessageWindow:
             pass
 
 class DetailedMessageWindow(MessageWindow):
-    def __init__(self, title, text, longText=None, type="ok", default=None, custom_buttons=None, custom_icon=None, run=True, parent=None, destroyAfterRun=True):
+    def __init__(self, title, text, longText=None, type="ok", default=None, custom_buttons=None, custom_icon=None, run=True, parent=None, destroyAfterRun=True, expanded=False):
         self.title = title
 
         if flags.autostep:
@@ -844,6 +844,8 @@ class DetailedMessageWindow(MessageWindow):
         self.detailedExpander = xml.get_widget("detailedExpander")
         self.detailedView = xml.get_widget("detailedView")
 
+        self.detailedExpander.set_expanded(expanded)
+
         if parent:
             self.dialog.set_transient_for(parent)
 
@@ -1015,7 +1017,7 @@ class InstallInterface(InstallInterfaceBase):
 
     def detailedMessageWindow(self, title, text, longText=None, type="ok",
                               default=None, custom_buttons=None,
-                              custom_icon=None):
+                              custom_icon=None, expanded=False):
         if self.icw:
             parent = self.icw.window
         else:
@@ -1023,7 +1025,7 @@ class InstallInterface(InstallInterfaceBase):
 
         rc = DetailedMessageWindow (title, text, longText, type, default,
                                     custom_buttons, custom_icon, run=True,
-                                    parent=parent).getrc()
+                                    parent=parent, expanded=expanded).getrc()
         return rc
 
     def mainExceptionWindow(self, shortText, longTextFile):
diff --git a/installinterfacebase.py b/installinterfacebase.py
index 69fd043..59099b6 100644
--- a/installinterfacebase.py
+++ b/installinterfacebase.py
@@ -75,4 +75,5 @@ class InstallInterfaceBase(object):
         return self.detailedMessageWindow(title, msg, devs.strip(),
                                              type="custom",
                                              custom_icon=icon,
-                                             custom_buttons=buttons)
+                                             custom_buttons=buttons,
+                                             expanded=True)
diff --git a/rescue.py b/rescue.py
index 2df4111..2076951 100644
--- a/rescue.py
+++ b/rescue.py
@@ -53,7 +53,7 @@ class RescueInterface(InstallInterfaceBase):
 
     def detailedMessageWindow(self, title, text, longText=None, type="ok",
                               default=None, custom_icon=None,
-                              custom_buttons=[]):
+                              custom_buttons=[], expanded=False):
         return self.messageWindow(title, text, type, default, custom_icon,
                                   custom_buttons)
 
diff --git a/text.py b/text.py
index a0490b7..b0e2eed 100644
--- a/text.py
+++ b/text.py
@@ -301,7 +301,7 @@ class InstallInterface(InstallInterfaceBase):
 
     def detailedMessageWindow(self, title, text, longText=None, type="ok",
                               default=None, custom_icon=None,
-                              custom_buttons=[]):
+                              custom_buttons=[], expanded=False):
         t = TextboxReflowed(60, text, maxHeight=8)
         lt = Textbox(60, 6, longText, scroll=1, wrap=1)
         g = GridFormHelp(self.screen, title, help, 1, 3)
-- 
1.6.6.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux