On Sat, 2004-05-29 at 18:34 +0200, Philip Van Hoof wrote: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=110804 Because else the body of the E-mail was to big, the patch is available here: (note to list moderator: you don't have to release last E-mail) https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=100702&action=view > On the add-button if decides to use or the sharename or if that one is > empty it will use the old-style technique to choose a name. We might > want to change that functionality to a on_text_changed callback forthe > path-entry and set the generated name in the new text > on-path-text-changed or something like that. As I am not sure whether > or not this is what you like or want I decide to not yet move this > functionality (would make the patch larger and would radically modify > stuff and the way things work now. As a small contributor I feel that > this is not really my task nor decision to make). While this might not be my call or decision to make I still decided to implement also that. Attached you will find the result. It does change some stuff, including the layout of the TreeView-store but I guess if somebody wants to merge this patch he or she will be prepared for such a change by checking my patch against problems. So an overview of the changes: o. The treestore-layout has one visible column added now, shifting all existing columns starting with column tree. Because this treestore is used all over the code in mainWindow.py and shareWindow.py this caused a few changes. Basically I had to do a manual search and replace for ", 3" to ", 4" in both sources. IMHO using the treestore for passing crucial data like the "header" on which the shareWindow.py will work is not a good idea. But then again, it does work. So I guess it's okay. In C I would have done something like passing a pointer to the struct that is my section (that I am changing) which is part of an array of such structs which is the in-memory-version of my configuration file. o. I have added a sharename_entry in shareWindow.py, I have added on_text_changed signals on both the dir_entry and the sharename_entry. If the sharename_entry is changed then the dir_entry on_changed stuff is not used any longer (for that means the user really wants to set the sharename manually). If the dir_entry is changed (and never has the sharename_entry been set by the user), the sharename_entry is generated using the old logic (so the last part of the dir, making it unique yadi yada) o. When the Add button is pressed, a new section will be made with as header: what is in the sharename_entry and if that is left empty by the user then again the old logic is used. Perhaps it's better to then disable the Add-button? o. When the Edit button is pressed, it will search for the old-section header and it will set all parents of the lines in that section to the new name. It will also set the treestore column NOW four and it will set the treestore column NOW tree which is the visible column displaying the sharename. And it will change the header in the configuration. o. The parser has a small change: the header will have a parent now. The parent of the header is the value of the header itself. This eases finding the header that we will need to change in case the sharename has changed. It might be possible to do the same without this parser-modification, oh well ... I guess it doesn't matter to much? o. The glade-file has been adapted. A label and a textbox is added, the table containing those elements is enlarged and two on_text_changed signals are added. o. The bug report has been updated (again) ps. I have read that the author wants to add functionality like this application to nautilus. For that to work properly, the samba config would have to be put in gconf OR ALL application MUST agree upon using a library for writing this configuration. Else if KDE applications and GNOME applications are both going to write to the same file without a proper locking mechanism, things are going to get mixed up badly. Maybe we can ask the freedesktop.org people to work on a standard for setting this type configuration? My humble opinion is that samba is a key-part of the desktop, NOT only a Linux-server thingy. This IS very important for the average desktop user! Don't you believe me? GO visit a lanparty with your DESKTOP computer! And YES, my girlfriend (who probably presents what we call THE typical NORMAL user) has asked me how to set a fileshare on her Fedora desktop. She asked me because she didn't find the popupmenu allowing her to do this (like she was used to in Windows). So to finalise this "ps": yes, lets ditch the freaks knowing where to find the system-config-samba tool and lets support the NORMAL users this year. I think thats a very good idea... but let the freedesktop.org people take care of a standard for configuring samba. Else we end up fighting the KDE folks who are going to write their own f. tool which will probably conflict with the GNOME tools. [freax@pluisje redhat-config-samba]$ cvs diff -u > /home/freax/temp/system-config-samba-bug-110804-proposal-by-PhilipVanHoof-take-3-05_30_2004_14h16m.diff cvs server: Diffing . cvs server: Diffing doc cvs server: Diffing doc/figs cvs server: Diffing pixmaps cvs server: Diffing po cvs server: Diffing src [freax@pluisje redhat-config-samba]$ Please do inform me (or this list) when what merge happens. Then I know if this gets in, when I can update my sources using cvs. In case I feel hungry for code and want to change more .. it would create huge merge conflicts at my side, I guess.. Note: People in BCC are the people who are in CC on the bugreport @ bugzilla -- Philip Van Hoof, Software Developer @ Cronos home: me at freax dot org work: Philip dot VanHoof at cronos dot be http://www.freax.be, http://www.freax.eu.org -- Fedora-config-list mailing list Fedora-config-list@xxxxxxxxxx http://www.redhat.com/mailman/listinfo/fedora-config-list