Bug 592646

Summary: Change 'localsave' if running on gtk to use gtkfilebrowser
Product: [Fedora] Fedora Reporter: Gavin Romig-Koch <gavin>
Component: reportAssignee: Gavin Romig-Koch <gavin>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: gavin, ihands
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 21:53:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 532613    
Attachments:
Description Flags
Adds a gtk file browser to the file selection dialog for the "local" option
none
This patch should provide the suggested fix. none

Description Gavin Romig-Koch 2010-05-15 21:49:06 UTC
This means adding a new method to IO (and GTKIO, TEXTIO, and NewtIO, and then using that new method in the localsave plugin.

Comment 1 Ian Page Hands 2010-06-19 05:50:51 UTC
Created attachment 425296 [details]
Adds a gtk file browser to the file selection dialog for the "local" option

Here is a patch that adds a gtk FileChooserDialog to the "local" store option. It works, but there is one small hack that should likely be worked out.

  if fieldName == "directory to store report in":

Is the only way I could (currently) ensure that I was on the "local" dialog and not the "ftp" dialog. I think we would need to update both queryField() and FieldDialog() to pass in a better identifier, but I am both sleepy and a python n00b. Can we override methods, and set up multiple class constructors (the __init__ method??)?

I will look at this again.

Comment 2 Gavin Romig-Koch 2010-06-21 13:12:35 UTC
(In reply to comment #1)
> Created an attachment (id=425296) [details]
> Adds a gtk file browser to the file selection dialog for the "local" option
> 
> Here is a patch that adds a gtk FileChooserDialog to the "local" store option.
> It works, but there is one small hack that should likely be worked out.
> 
>   if fieldName == "directory to store report in":
> 
> Is the only way I could (currently) ensure that I was on the "local" dialog and
> not the "ftp" dialog. I think we would need to update both queryField() and
> FieldDialog() to pass in a better identifier, but I am both sleepy and a python
> n00b. Can we override methods, and set up multiple class constructors (the
> __init__ method??)?

The way I would prefer to handle this is to create a new method in class IO; something like queryLocalFilename(fieldName).  This method would be add to all of the IO subclasses (GTKIO, NewtIO, and TextIO).  In GTKIO it would open a FileChooserDialog, in the other classes it would do exactly what queryField already does.

Then we change the localsave plugin to use queryLocalFilename rather than queryField.

Comment 3 Ian Page Hands 2010-06-21 16:00:54 UTC
Cool, I have yet to familiarize myself with the NewtIO, and TextIO classes/files, but what you are saying does make sense. I will do so as soon as I have some free time.

In the gtk method call you would like to have the gtk FileChooserDialog pop up directly right. i.e. no intermediary dialog, just choose local and get a file chooser.

Comment 4 Gavin Romig-Koch 2010-06-21 20:33:12 UTC
(In reply to comment #3)
> In the gtk method call you would like to have the gtk FileChooserDialog pop up
> directly right. i.e. no intermediary dialog, just choose local and get a file
> chooser.    

Yes.

Comment 5 Bug Zapper 2010-07-30 11:38:43 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Ian Page Hands 2010-09-17 22:32:39 UTC
Created attachment 448135 [details]
This patch should provide the suggested fix.

Gavin,

I think this should meet the suggested criteria. Let me know if it does not.

Thanks,
-Ian Page Hands

Comment 7 Fedora End Of Life 2012-08-16 21:53:57 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping