patchPSPP - Patches: patch #6227, Add validity predicate to dialog...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #6227: Add validity predicate to dialog boxes

Submitter:  John Darrington <jmd>
Submitted:  Sat 06 Oct 2007 06:18:22 AM UTC
   
 
Category:  None Item Group:  None
Status:  Done Assigned to:  None
Open/Closed:  Closed

Sun 07 Oct 2007 12:15:58 AM UTC, comment #2: 

Thanks Ben.

The GtkSpinButton case is covered, because it's a special case of GtkEntry so the GTK_IS_EDITABLE (w) predicate will evaluate to TRUE.

The problem with adding a warning is that there are numerous widgets which have no user interaction and therefore would need a null handler (eg GtkLabel).

I can think of a couple of different ways to work around this general problem, but I'm not entirely happy with either of them.

One widget that isn't covered is GtkComboBox, so I'll add code to catch this case, and check this in.

John Darrington <jmd>
Group administrator
Sat 06 Oct 2007 04:38:54 PM UTC, comment #1: 

Looks good to me.

I'm a little worried that if I add a new kind of widget to a dialog box (e.g. spin button), I'll forget to add it to the function that hooks up the notify change event.  But I don't know a good way to avoid that problem.  I guess that function could warn on unrecognized widget types, but I don't know whether that would have undesired side effects as GTK+ evolves.

Ben Pfaff <blp>
Group administrator
Sat 06 Oct 2007 06:18:22 AM UTC, original submission:  

This patch makes it easy(er) to set the OK and PASTE buttons of dialog boxes.

The user (the programmer implementing the dialog) must provide a predicate function which decides whether the dialog is in a valid state or not.   If this patch works properly, the widget implementations should loook after everything else.

I've added  predicates for the descriptives and compute dialogs to show how it's done.

John Darrington <jmd>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #14097:  dialog-validity.patch added by jmd (11KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by blp (Posted a comment)
  • -email is unavailable- added by jmd (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-10-07 jmd StatusWorks For Me Done
        Assigned toblp None
        Open/ClosedOpen Closed
    2007-10-06 blp StatusReady For Test/Review Works For Me
    2007-10-06 jmd Attached File- Added dialog-validity.patch, #14097

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code