public inbox for rhdb@sourceware.org
 help / color / mirror / Atom feed
* [patch] planner option dialog consistency
@ 2003-06-25  2:43 Liam Stewart
  2003-06-25 13:49 ` Fernando Nasser
  0 siblings, 1 reply; 2+ messages in thread
From: Liam Stewart @ 2003-06-25  2:43 UTC (permalink / raw)
  To: rhdb

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]


The attached patch makes the planner option dialog work like the other
dialogs.  Size and location are always reset whenever the window is
opened. The menu seperators between the planner opts, db config, and
preferences menu items are removed so that all three configuration box
actions are grouped together.

Liam

-- 
Liam Stewart :: liam@ualberta.ca

[-- Attachment #2: planner.diff --]
[-- Type: text/plain, Size: 2690 bytes --]

Index: rhdb-explain/src/com/redhat/rhdb/vise/PlannerOptionsDialog.java
===================================================================
RCS file: /cvs/rhdb/src/rhdb-explain/src/com/redhat/rhdb/vise/PlannerOptionsDialog.java,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 PlannerOptionsDialog.java
*** rhdb-explain/src/com/redhat/rhdb/vise/PlannerOptionsDialog.java	27 Feb 2003 16:29:23 -0000	1.1.1.1
--- rhdb-explain/src/com/redhat/rhdb/vise/PlannerOptionsDialog.java	25 Jun 2003 00:20:09 -0000
***************
*** 27,32 ****
--- 27,33 ----
  public class PlannerOptionsDialog extends javax.swing.JDialog {
  	private ActionFactory afactory;
  	private GenericAction okAction, cancelAction;
+ 	private java.awt.Frame owner;
      private JPanel poperations;
      private JCheckBox seqscan;
      private JCheckBox indexscan;
***************
*** 77,82 ****
--- 78,84 ----
      public PlannerOptionsDialog(PlannerOptions defs, java.awt.Frame parent) {
          super(parent, true);
  		this.defopts = defs;
+ 	this.owner = parent;
  
  		// Actions
  		afactory = new ActionFactory();
***************
*** 146,152 ****
          getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.Y_AXIS));
  
          setTitle(ExplainResources.getString(ExplainResources.PLANNEROPTIONS_TITLE));
-         setLocationRelativeTo(getOwner());
          addWindowListener(new java.awt.event.WindowAdapter() {
              public void windowClosing(java.awt.event.WindowEvent evt) {
                  closeDialog(evt);
--- 148,153 ----
***************
*** 432,437 ****
--- 433,448 ----
          //dispose();
      }
      
+     /**
+      * Show the dialog.
+      */
+     public void show()
+     {
+ 	setSize(getPreferredSize());
+ 	setLocationRelativeTo(owner);
+ 	super.show();
+     }
+ 
      /**
       * Set the planner options object being edited to the new values
       * according to the user input.  If the value is the default,
Index: rhdb-explain/src/com/redhat/rhdb/vise/Vise.java
===================================================================
RCS file: /cvs/rhdb/src/rhdb-explain/src/com/redhat/rhdb/vise/Vise.java,v
retrieving revision 1.1.1.3
diff -c -r1.1.1.3 Vise.java
*** rhdb-explain/src/com/redhat/rhdb/vise/Vise.java	27 Feb 2003 16:29:23 -0000	1.1.1.3
--- rhdb-explain/src/com/redhat/rhdb/vise/Vise.java	25 Jun 2003 00:20:12 -0000
***************
*** 1900,1912 ****
  		menu.addSeparator();
  		
  		menu.add(poptsAction.getMenuItem());
- 
- 		menu.addSeparator();
- 		
  		menu.add(dbasesAction.getMenuItem());
- 
- 		menu.addSeparator();
- 		
  		menu.add(prefsAction.getMenuItem());
  
  		// Statement menu
--- 1900,1906 ----

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] planner option dialog consistency
  2003-06-25  2:43 [patch] planner option dialog consistency Liam Stewart
@ 2003-06-25 13:49 ` Fernando Nasser
  0 siblings, 0 replies; 2+ messages in thread
From: Fernando Nasser @ 2003-06-25 13:49 UTC (permalink / raw)
  To: Liam Stewart; +Cc: rhdb

Thank you Liam.  This patch will be incorporated in the next release (we 
are under code freeze right now). It will also be applied to the cvs tip 
as soon as we get the 3.0 sources in.

Regards,
Fernando

Liam Stewart wrote:
> The attached patch makes the planner option dialog work like the other
> dialogs.  Size and location are always reset whenever the window is
> opened. The menu seperators between the planner opts, db config, and
> preferences menu items are removed so that all three configuration box
> actions are grouped together.
> 
> Liam
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: rhdb-explain/src/com/redhat/rhdb/vise/PlannerOptionsDialog.java
> ===================================================================
> RCS file: /cvs/rhdb/src/rhdb-explain/src/com/redhat/rhdb/vise/PlannerOptionsDialog.java,v
> retrieving revision 1.1.1.1
> diff -c -r1.1.1.1 PlannerOptionsDialog.java
> *** rhdb-explain/src/com/redhat/rhdb/vise/PlannerOptionsDialog.java	27 Feb 2003 16:29:23 -0000	1.1.1.1
> --- rhdb-explain/src/com/redhat/rhdb/vise/PlannerOptionsDialog.java	25 Jun 2003 00:20:09 -0000
> ***************
> *** 27,32 ****
> --- 27,33 ----
>   public class PlannerOptionsDialog extends javax.swing.JDialog {
>   	private ActionFactory afactory;
>   	private GenericAction okAction, cancelAction;
> + 	private java.awt.Frame owner;
>       private JPanel poperations;
>       private JCheckBox seqscan;
>       private JCheckBox indexscan;
> ***************
> *** 77,82 ****
> --- 78,84 ----
>       public PlannerOptionsDialog(PlannerOptions defs, java.awt.Frame parent) {
>           super(parent, true);
>   		this.defopts = defs;
> + 	this.owner = parent;
>   
>   		// Actions
>   		afactory = new ActionFactory();
> ***************
> *** 146,152 ****
>           getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.Y_AXIS));
>   
>           setTitle(ExplainResources.getString(ExplainResources.PLANNEROPTIONS_TITLE));
> -         setLocationRelativeTo(getOwner());
>           addWindowListener(new java.awt.event.WindowAdapter() {
>               public void windowClosing(java.awt.event.WindowEvent evt) {
>                   closeDialog(evt);
> --- 148,153 ----
> ***************
> *** 432,437 ****
> --- 433,448 ----
>           //dispose();
>       }
>       
> +     /**
> +      * Show the dialog.
> +      */
> +     public void show()
> +     {
> + 	setSize(getPreferredSize());
> + 	setLocationRelativeTo(owner);
> + 	super.show();
> +     }
> + 
>       /**
>        * Set the planner options object being edited to the new values
>        * according to the user input.  If the value is the default,
> Index: rhdb-explain/src/com/redhat/rhdb/vise/Vise.java
> ===================================================================
> RCS file: /cvs/rhdb/src/rhdb-explain/src/com/redhat/rhdb/vise/Vise.java,v
> retrieving revision 1.1.1.3
> diff -c -r1.1.1.3 Vise.java
> *** rhdb-explain/src/com/redhat/rhdb/vise/Vise.java	27 Feb 2003 16:29:23 -0000	1.1.1.3
> --- rhdb-explain/src/com/redhat/rhdb/vise/Vise.java	25 Jun 2003 00:20:12 -0000
> ***************
> *** 1900,1912 ****
>   		menu.addSeparator();
>   		
>   		menu.add(poptsAction.getMenuItem());
> - 
> - 		menu.addSeparator();
> - 		
>   		menu.add(dbasesAction.getMenuItem());
> - 
> - 		menu.addSeparator();
> - 		
>   		menu.add(prefsAction.getMenuItem());
>   
>   		// Statement menu
> --- 1900,1906 ----


-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-25 13:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-25  2:43 [patch] planner option dialog consistency Liam Stewart
2003-06-25 13:49 ` Fernando Nasser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).