Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#5626 closed enhancement (fixed)

[Screenshot] after taking a screenshot name field (without extension) should be selected and Save should be set as default button

Reported by: diver Owned by: julun
Priority: normal Milestone: R1
Component: Applications/Screenshot Version: R1/Development
Keywords: gsoc2010 Cc:
Blocked By: Blocking:
Platform: All

Description


Attachments (2)

screenshotEnhancement-5626.patch (3.3 KB ) - added by Shisui 14 years ago.
Automatic filename basename selection and "save" as default button for Screenshot
screenshotEnhancement-5626-saveButtonSizeFix.patch (442 bytes ) - added by Shisui 14 years ago.
Fix the incorrect sizing of the save button

Download all attachments as: .zip

Change History (11)

comment:1 by Shisui, 14 years ago

Keywords: gsoc2010 added

This patch adds the specified functionnalities to Screenshot.

I'm thinking of another enhancement for this app which would allow the user to enter a parametric filename while in commandline mode, just as "scrot" works, in order to have more flexibility than the automatic file numbering system.

comment:2 by stippi, 14 years ago

Looks good, thanks, also for keeping to the coding style! The code you repeated three times for selecting the file name part in the text view should go into an extra private method, so you avoid the duplication.

by Shisui, 14 years ago

Automatic filename basename selection and "save" as default button for Screenshot

comment:3 by Shisui, 14 years ago

This is fixed, thanks !

comment:4 by stippi, 14 years ago

Resolution: fixed
Status: newclosed

Thanks for the updated patch, applied in hrev36208. I've looked into the issue why the Save button has the wrong size when it's the default button (it should grow bigger), and the code in BButton::MakeDefault() indeed misses to invalidate the layout. However, it still won't work when this is fixed. Still looking into it, but if you beat me to it, I won't mind! :-)

by Shisui, 14 years ago

Fix the incorrect sizing of the save button

comment:5 by Shisui, 14 years ago

I only add a MakeDefault() before adding the button into the layout, which allows the Layouter to take this size in condideration. Warn me if this is a "quick and dirty" fix and not the correct way to use the Layouter :)

comment:6 by stippi, 14 years ago

Yes, it fixes the problem for this app only. In BButton::MakeDefault(), I've added InvalidateLayout() calls where needed, but I am still debugging why the window is not growing as needed, although the button does report a bigger size as a result. It should work after being attached in any case.

comment:7 by stippi, 14 years ago

Ok, we found the problem, just in case you are still looking for it too.

comment:8 by Shisui, 14 years ago

Ok, thanks :) In order to post some Screenshot enhancements patches, do I need to open a new ticket or can I left them in this ticket even if it is closed ?

in reply to:  8 comment:9 by mmadia, 14 years ago

Replying to Shisui:

In order to post some Screenshot enhancements patches, do I need to open a new ticket or can I left them in this ticket even if it is closed ?

New tickets please. It's best to have one specific issue per ticket. Thank you.

Note: See TracTickets for help on using tickets.