GNOME Bugzilla – Bug 727073
"Close all" and "Save All" should be enabled according to tabs status.
Last modified: 2014-03-28 20:06:32 UTC
If we don't have tabs > 1 , then "close all" should be disabled. and if tabs > 0 then only "save all" is enabled.
Created attachment 272957 [details] [review] Bug 727073 "Close all" and "Save All" should be enabled according to tabs status.
Created attachment 273082 [details] [review] Bug 727073 "Close all" and "Save All" should be enabled according to tabs status. check added for "save all" option. If files are not changed then "save all " wont be enable.
I don't like the get_is_modified name. I was thinking more about _gedit_window_tabs_need_saving : - it's more expressive - it's callable from other gedit code - it's in part with _gedit_document_needs_saving name Maybe we can outsource the tabs = _gedit_window_get_all_tabs (window); part and use _gedit_window_tabs_need_saving (GeditWindow *window, GSlist *Tabs) so we this function can serve for another list of tabs, let say notebooks one. One more problem and not your fault : - load a file in gedit - change it from another editor Gedit show you an info bar with reload or cancel - choose cancel From this point my file and gedit buffer are different but i have no acces to save-all.
Uhm, actually I'd prefer to not check the modified state at all for save realated functions. Even if a document is not modified I still want to be able to save it ("just to be sure") and save-all should be consistent too. So for now I'd just remove that part from the patch
Created attachment 273157 [details] [review] Bug 727073 "Close all" and "Save All" should be enabled according to tabs status. Removed the check and also added check for "Reload" option.
Created attachment 273160 [details] [review] Bug 727073 "Close all" and "Save All" should be enabled according to tabs status. Removed Unnecessary code.
Created attachment 273164 [details] [review] Bug 727073 "Close all" and "Save All" should be enabled according to tabs status. num_tabs > 0 check made for the "close-all" option.
pushed!
Review of attachment 273164 [details] [review]: thank you!