r15601 - gnucash/trunk/src - Start the FreqSpec->Recurrence migration:

Josh Sled jsled at cvs.gnucash.org
Sun Feb 18 12:40:05 EST 2007


Author: jsled
Date: 2007-02-18 12:39:54 -0500 (Sun, 18 Feb 2007)
New Revision: 15601
Trac: http://svn.gnucash.org/trac/changeset/15601

Removed:
   gnucash/trunk/src/engine/SchedXactionP.h
Modified:
   gnucash/trunk/src/backend/file/gnc-freqspec-xml-v2.c
   gnucash/trunk/src/backend/file/gnc-recurrence-xml-v2.c
   gnucash/trunk/src/backend/file/gnc-schedxaction-xml-v2.c
   gnucash/trunk/src/backend/file/sixtp-dom-parsers.h
   gnucash/trunk/src/backend/file/test/Makefile.am
   gnucash/trunk/src/doc/sx.rst
   gnucash/trunk/src/engine/Makefile.am
   gnucash/trunk/src/engine/SchedXaction.c
   gnucash/trunk/src/engine/SchedXaction.h
   gnucash/trunk/src/engine/gnc-engine.c
   gnucash/trunk/src/gnome-utils/gnc-frequency.c
   gnucash/trunk/src/gnome-utils/gnc-frequency.h
   gnucash/trunk/src/gnome/dialog-sx-editor.c
   gnucash/trunk/src/gnome/glade/sched-xact.glade
Log:
Start the FreqSpec->Recurrence migration:
- remove the "private" SX header.
- add GList<Recurrence*> to the SX model
- Parse a GList<Recurrence> from FreqSpec xml.
- GncFrequency changes
  - modify GncFrequency to load/save Recurrences.
  - simplify GncFrequency: remove "daily [m-f]", "bi-weekly" and super-monthly pages.
  - add (Recurrence-only) support for "last weekday of month" to {,semi-}monthly 
- update SX cleanup todo-list.


Modified: gnucash/trunk/src/backend/file/gnc-freqspec-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/file/gnc-freqspec-xml-v2.c	2007-02-18 17:28:44 UTC (rev 15600)
+++ gnucash/trunk/src/backend/file/gnc-freqspec-xml-v2.c	2007-02-18 17:39:54 UTC (rev 15601)
@@ -125,6 +125,9 @@
         FreqSpec        *fs;              /* FreqSpec we're parsing into. */
         QofBook         *book;            /* Book we're loading into. */
 
+        Recurrence *recurrence;
+        GList *recurrence_list;
+
         /* fields used in the union of unions... :) */
         GDate                 once_day;     /* once */
         gint64                interval;     /* all [except once] */
@@ -140,6 +143,8 @@
         fspd->fs      = NULL;
         fspd->list    = NULL;
         fspd->book    = NULL;
+        fspd->recurrence = g_new0(Recurrence, 1);
+        fspd->recurrence_list = NULL;
         fspd->interval
                 = fspd->offset
                 = fspd->day
@@ -399,10 +404,24 @@
 {
         fsParseData *fspd = data;
         FreqSpec        *fs;
+        GList *recurrences;
+
         fs = dom_tree_to_freqSpec( node, fspd->book );
         if ( fs == NULL )
                 return FALSE;
         fspd->list = g_list_append( fspd->list, fs );
+
+        recurrences = dom_tree_freqSpec_to_recurrences(node, fspd->book);
+        if (recurrences == NULL)
+                return FALSE;
+
+        {
+            GList *r_iter;
+            for (r_iter = recurrences; r_iter != NULL; r_iter = r_iter->next)
+            {
+                fspd->recurrence_list = g_list_append(fspd->recurrence_list, r_iter->data);
+            }
+        }
         return TRUE;
 }
 
@@ -417,8 +436,15 @@
         { NULL, NULL, 0, 0 },
 };
 
-static
-gboolean
+static void
+compute_date(fsParseData *parsed, GDate *date)
+{
+     g_date_clear(date, 1);
+     g_date_set_dmy(date, 1, 1, 1970);
+     g_date_add_days(date, parsed->offset);
+}
+
+static gboolean
 fs_none_handler( xmlNodePtr node, gpointer data )
 {
         fsParseData *fspd = data;
@@ -444,22 +470,27 @@
                                              fspd );
         if ( !successful )
                 return FALSE;
+        recurrenceSet(fspd->recurrence, 0, PERIOD_ONCE, &fspd->once_day);
+        
+
         fspd->fs->type         = ONCE;
         fspd->fs->s.once.date  = fspd->once_day;
         return TRUE;
 }
 
-static
-gboolean
-fs_daily_handler( xmlNodePtr node, gpointer data)
+static gboolean
+fs_daily_handler(xmlNodePtr node, gpointer data)
 {
         fsParseData *fspd = data;
+        GDate offset_date;
         gboolean        successful;
-        successful = dom_tree_generic_parse( node,
-                                             fs_union_dom_handlers,
-                                             fspd );
-        if ( !successful )
-                return FALSE;
+        successful = dom_tree_generic_parse(node, fs_union_dom_handlers, fspd );
+        if (!successful)
+             return FALSE;
+
+        compute_date(fspd, &offset_date);
+        recurrenceSet(fspd->recurrence, fspd->interval, PERIOD_DAY, &offset_date);
+
         fspd->fs->type                      = DAILY;
         fspd->fs->s.daily.interval_days     = fspd->interval;
         fspd->fs->s.daily.offset_from_epoch = fspd->offset;
@@ -471,15 +502,21 @@
 fs_weekly_handler( xmlNodePtr node, gpointer data )
 {
         fsParseData *fspd = data;
+        GDate offset_date;
         gboolean        successful;
         successful = dom_tree_generic_parse( node,
                                              fs_union_dom_handlers,
                                              fspd );
         if ( !successful )
                 return FALSE;
+
+        compute_date(fspd, &offset_date);
+        recurrenceSet(fspd->recurrence, fspd->interval, PERIOD_DAY, &offset_date);
+
         fspd->fs->type                       = WEEKLY;
         fspd->fs->s.weekly.interval_weeks    = fspd->interval;
         fspd->fs->s.weekly.offset_from_epoch = fspd->offset;
+
         return TRUE;
 }
 
@@ -488,16 +525,23 @@
 fs_monthly_handler( xmlNodePtr node, gpointer data)
 {
         fsParseData *fspd = data;
+        GDate offset_date;
         gboolean        successful;
         successful = dom_tree_generic_parse( node,
                                              fs_union_dom_handlers,
                                              fspd );
         if ( !successful )
                 return FALSE;
+        compute_date(fspd, &offset_date);
+
+        g_date_set_day(&offset_date, fspd->day);
+        recurrenceSet(fspd->recurrence, fspd->interval, PERIOD_MONTH, &offset_date);
+        
         fspd->fs->type                        = MONTHLY;
         fspd->fs->s.monthly.interval_months   = fspd->interval;
         fspd->fs->s.monthly.offset_from_epoch = fspd->offset;
         fspd->fs->s.monthly.day_of_month      = fspd->day;
+
         return successful;
 }
 
@@ -505,19 +549,8 @@
 gboolean
 fs_month_relative_handler( xmlNodePtr node, gpointer data)
 {
-        fsParseData *fspd = data;
-        gboolean        successful;
-        successful = dom_tree_generic_parse( node,
-                                             fs_union_dom_handlers,
-                                             fspd );
-        if ( !successful )
-                return FALSE;
-        fspd->fs->type                               = MONTH_RELATIVE;
-        fspd->fs->s.month_relative.interval_months   = fspd->interval;
-        fspd->fs->s.month_relative.offset_from_epoch = fspd->offset;
-        fspd->fs->s.month_relative.weekday           = fspd->day;
-        fspd->fs->s.month_relative.occurrence        = fspd->occurrence;
-        return TRUE;
+        g_critical("this was never supported, how is it in the datafile?");
+        return FALSE;
 }
 
 static
@@ -544,6 +577,7 @@
                 return FALSE;
         fspd->fs->type                  = COMPOSITE;
         fspd->fs->s.composites.subSpecs = fspd->list;
+
         return TRUE;
 }
 
@@ -604,21 +638,40 @@
     return sixtp_dom_parser_new( gnc_freqSpec_end_handler, NULL, NULL );
 }
 
+static void
+common_parse(fsParseData *fspd, xmlNodePtr node, QofBook *book)
+{
+    gboolean        successful;
+
+    fspd->book = book;
+    fspd->fs = xaccFreqSpecMalloc(book);
+    successful = dom_tree_generic_parse( node, fs_dom_handlers, fspd );
+    if (!successful)
+    {
+        xmlElemDump(stdout, NULL, node);
+        xaccFreqSpecFree( fspd->fs );
+        fspd->fs = NULL;
+    }
+}
+
+GList*
+dom_tree_freqSpec_to_recurrences(xmlNodePtr node, QofBook *book)
+{
+    fsParseData        fspd;
+    fspd_init( &fspd );
+    common_parse(&fspd, node, book);
+    if (fspd.recurrence_list == NULL)
+    {
+        fspd.recurrence_list = g_list_append(fspd.recurrence_list, fspd.recurrence);
+    }
+    return fspd.recurrence_list;
+}
+
 FreqSpec*
 dom_tree_to_freqSpec(xmlNodePtr node, QofBook *book)
 {
-    gboolean        successful;
     fsParseData        fspd;
-
     fspd_init( &fspd );
-    fspd.book = book;
-
-    fspd.fs = xaccFreqSpecMalloc(book);
-    successful = dom_tree_generic_parse( node, fs_dom_handlers, &fspd );
-    if ( !successful ) {
-        xmlElemDump(stdout, NULL, node);
-        xaccFreqSpecFree( fspd.fs );
-        fspd.fs = NULL;
-    }
+    common_parse(&fspd, node, book);
     return fspd.fs;
 }

Modified: gnucash/trunk/src/backend/file/gnc-recurrence-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/file/gnc-recurrence-xml-v2.c	2007-02-18 17:28:44 UTC (rev 15600)
+++ gnucash/trunk/src/backend/file/gnc-recurrence-xml-v2.c	2007-02-18 17:39:54 UTC (rev 15601)
@@ -90,7 +90,7 @@
     { NULL, NULL, 0, 0 }
 };
 
-Recurrence *
+Recurrence*
 dom_tree_to_recurrence(xmlNodePtr node)
 {
     gboolean successful;

Modified: gnucash/trunk/src/backend/file/gnc-schedxaction-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/file/gnc-schedxaction-xml-v2.c	2007-02-18 17:28:44 UTC (rev 15600)
+++ gnucash/trunk/src/backend/file/gnc-schedxaction-xml-v2.c	2007-02-18 17:39:54 UTC (rev 15601)
@@ -1,6 +1,6 @@
 /********************************************************************
  * gnc-schedxactions-xml-v2.c -- xml routines for transactions      *
- * Copyright (C) 2001 Joshua Sled <jsled at asynchronous.org>          *
+ * Copyright (C) 2001,2007 Joshua Sled <jsled at asynchronous.org>     *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -27,7 +27,6 @@
 #include <string.h>
 
 #include "Group.h"
-#include "SchedXactionP.h"
 #include "SX-book.h"
 
 #include "gnc-xml-helper.h"
@@ -46,7 +45,10 @@
 
 #include "sixtp-dom-parsers.h"
 
-static QofLogModule log_module = GNC_MOD_SX;
+#define LOG_MOD "gnc.backend.file.sx"
+static QofLogModule log_module = LOG_MOD;
+#undef G_LOG_DOMAIN
+#define G_LOG_DOMAIN LOG_MOD
 
 /**
  * The XML output should look something like:
@@ -131,6 +133,7 @@
 #define SX_END                  "sx:end"
 #define SX_TEMPL_ACCT           "sx:templ-acct" 
 #define SX_FREQSPEC             "sx:freqspec"
+#define SX_SCHEDULE             "sx:schedule"
 #define SX_SLOTS                "sx:slots"
 #define SX_DEFER_INSTANCE       "sx:deferredInstance"
 
@@ -143,6 +146,7 @@
 #define GNC_SCHEDXACTION_TAG    "gnc:schedxaction"
 
 const gchar *schedxaction_version_string = "1.0.0";
+const gchar *schedxaction_version2_string = "2.0.0";
 
 xmlNodePtr
 gnc_schedXaction_dom_tree_create(SchedXaction *sx)
@@ -257,6 +261,8 @@
 {
   SchedXaction *sx;
   QofBook *book;
+  gboolean saw_freqspec;
+  gboolean saw_recurrence;
 };
 
 static
@@ -415,22 +421,45 @@
     return sx_set_date( node, sx, xaccSchedXactionSetEndDate );
 }
 
-static
-gboolean
+static gboolean
 sx_freqspec_handler( xmlNodePtr node, gpointer sx_pdata )
 {
     struct sx_pdata *pdata = sx_pdata;
     SchedXaction *sx = pdata->sx;
-    FreqSpec *fs;
+    GList *schedule;
 
     g_return_val_if_fail( node, FALSE );
 
-    fs = dom_tree_to_freqSpec( node, pdata->book );
-    xaccSchedXactionSetFreqSpec( sx, fs );
+    xaccSchedXactionSetFreqSpec(sx, dom_tree_to_freqSpec(node, pdata->book));
+    
+    schedule = dom_tree_freqSpec_to_recurrences(node, pdata->book);
+    gnc_sx_set_schedule(sx, schedule);
+    for (; schedule != NULL; schedule = schedule->next)
+    {
+        g_debug("parsed from freqspec [%s]", recurrenceToString((Recurrence*)schedule->data));
+    }
+    pdata->saw_freqspec = TRUE;
 
     return TRUE;
 }
 
+static gboolean
+sx_recurrence_handler(xmlNodePtr node, gpointer _pdata)
+{
+     struct sx_pdata *parsing_data = _pdata;
+     GList *schedule;
+     
+     g_return_val_if_fail(node, FALSE);
+
+     //schedule = dom_tree_to_recurrence(node);
+     //g_return_val_if_fail(schedule, FALSE);
+     
+     //gnc_sx_set_schedule(parsing_data->sx, schedule);
+     parsing_data->saw_recurrence = TRUE;
+
+     return TRUE;
+}
+
 static
 gboolean
 sx_defer_last_handler( xmlNodePtr node, gpointer gpTSD )
@@ -590,7 +619,8 @@
     { SX_REM_OCCUR,           sx_remOccur_handler,   0, 0 },
     { SX_END,                 sx_end_handler,        0, 0 },
     { SX_TEMPL_ACCT,          sx_templ_acct_handler, 0, 0 },
-    { SX_FREQSPEC,            sx_freqspec_handler,   1, 0 },
+    { SX_FREQSPEC,            sx_freqspec_handler,   0, 0 },
+    { SX_SCHEDULE,            sx_recurrence_handler, 0, 0 },
     { SX_DEFER_INSTANCE,      sx_defer_inst_handler, 0, 0 },
     { SX_SLOTS,               sx_slots_handler,      0, 0 },
     { NULL,                   NULL, 0, 0 }
@@ -620,34 +650,58 @@
 
     sx = xaccSchedXactionMalloc( gdata->bookdata );
 
-    /* FIXME: this should be removed somewhere near 1.8 release time. */
-    {
-            /* This is the just-created template acct.  It can safely be
-               removed, as we either will find or don't have a relevent
-               template_acct. */
-            xaccAccountBeginEdit (sx->template_acct);
-            xaccAccountDestroy( sx->template_acct );
-            sx->template_acct = NULL;
-    }
-
+    memset(&sx_pdata, 0, sizeof(sx_pdata));
     sx_pdata.sx = sx;
     sx_pdata.book = gdata->bookdata;
 
     g_assert( sx_dom_handlers != NULL );
 
     successful = dom_tree_generic_parse( tree, sx_dom_handlers, &sx_pdata );
-
-    if ( successful ) 
+    if (!successful) 
     {
-            gdata->cb( tag, gdata->parsedata, sx );
-    } 
-    else 
-    {
-            PERR ("failed to parse scheduled xaction");
+            g_critical("failed to parse scheduled xaction");
             xmlElemDump( stdout, NULL, tree );
             xaccSchedXactionFree( sx );
+            goto done;
     }
 
+    if (tree->properties)
+    {
+         gchar *sx_name = xaccSchedXactionGetName(sx);
+         xmlAttr *attr;
+         for (attr = tree->properties; attr != NULL; attr = attr->next)
+         {
+              xmlChar *attr_value = attr->children->content;
+              g_debug("sx attribute name[%s] value[%s]", attr->name, attr_value);
+              if (strcmp(attr->name, "version") != 0)
+              {
+                   g_warning("unknown sx attribute [%s]", attr->name);
+                   continue;
+              }
+
+              // if version == 1.0.0: ensure freqspec, no recurrence
+              // if version == 2.0.0: ensure recurrence, no freqspec.
+              if (strcmp(attr_value, schedxaction_version_string) == 0)
+              {
+                   if (!sx_pdata.saw_freqspec)
+                        g_critical("did not see freqspec in version 1 sx [%s]", sx_name);
+                   if (sx_pdata.saw_recurrence)
+                        g_warning("saw recurrence in supposedly version 1 sx [%s]", sx_name);
+              }
+
+              if (strcmp(attr_value, schedxaction_version2_string) == 0)
+              {
+                   if (sx_pdata.saw_freqspec)
+                        g_warning("saw freqspec in version 2 sx [%s]", sx_name);
+                   if (!sx_pdata.saw_recurrence)
+                        g_critical("did not find recurrence in version 2 sx [%s]", sx_name);
+              }
+         }
+    }
+
+    // generic_callback -> book_callback: insert the SX in the book
+    gdata->cb( tag, gdata->parsedata, sx );
+
     /* FIXME: this should be removed somewhere near 1.8 release time. */
     if ( sx->template_acct == NULL )
     {
@@ -668,21 +722,18 @@
             ag = gnc_book_get_template_group(book);
             if ( ag == NULL )
             {
-                    PERR( "Error getting template account group "
-                          "from being-parsed Book." );
+                    g_warning( "Error getting template account group from being-parsed Book." );
                     xmlFreeNode( tree );
                     return FALSE;
             }
-            acct = xaccGetAccountFromName( ag, id );
-            if ( acct == NULL )
+            acct = xaccGetAccountFromName(ag, id);
+            if (acct == NULL)
             {
-                    PERR( "Error getting template account "
-                          "with name \"%s\"", id );
+                    g_warning("no template account with name [%s]", id);
                     xmlFreeNode( tree );
                     return FALSE;
             }
-            DEBUG( "Got template account with name \"%s\" for "
-                   "SX with GUID \"%s\"",
+            g_debug("template account name [%s] for SX with GUID [%s]",
                    xaccAccountGetName( acct ), id );
 
             /* FIXME: free existing template account. 
@@ -693,6 +744,8 @@
 
             sx->template_acct = acct;
     }
+
+ done:
     xmlFreeNode( tree );
 
     return successful;
@@ -731,8 +784,8 @@
                            applies for
                            SchedXaction.c:xaccSchedXactionInit... */
                         com = gnc_commodity_new( txd->book,
-						 "template", "template",
                                                  "template", "template",
+                                                 "template", "template",
                                                  1 );
                         xaccAccountSetCommodity( acc, com );
                 }
@@ -813,7 +866,7 @@
         } 
         else 
         {
-                PERR ("failed to parse template transaction");
+                g_warning("failed to parse template transaction");
                 xmlElemDump( stdout, NULL, tree );
         }
 

Modified: gnucash/trunk/src/backend/file/sixtp-dom-parsers.h
===================================================================
--- gnucash/trunk/src/backend/file/sixtp-dom-parsers.h	2007-02-18 17:28:44 UTC (rev 15600)
+++ gnucash/trunk/src/backend/file/sixtp-dom-parsers.h	2007-02-18 17:39:54 UTC (rev 15601)
@@ -39,6 +39,7 @@
 gnc_commodity *dom_tree_to_commodity_ref_no_engine(xmlNodePtr node, QofBook *);
 
 FreqSpec* dom_tree_to_freqSpec( xmlNodePtr node, QofBook *book);
+GList* dom_tree_freqSpec_to_recurrences(xmlNodePtr node, QofBook *book);
 Recurrence* dom_tree_to_recurrence(xmlNodePtr node);
 
 Timespec dom_tree_to_timespec(xmlNodePtr node);

Modified: gnucash/trunk/src/backend/file/test/Makefile.am
===================================================================
--- gnucash/trunk/src/backend/file/test/Makefile.am	2007-02-18 17:28:44 UTC (rev 15600)
+++ gnucash/trunk/src/backend/file/test/Makefile.am	2007-02-18 17:39:54 UTC (rev 15601)
@@ -74,6 +74,7 @@
   ${top_srcdir}/src/backend/file/gnc-account-xml-v2.c \
   ${top_srcdir}/src/backend/file/gnc-lot-xml-v2.c \
   ${top_srcdir}/src/backend/file/gnc-schedxaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-recurrence-xml-v2.c \
   ${top_srcdir}/src/backend/file/gnc-freqspec-xml-v2.c \
   ${top_srcdir}/src/backend/file/gnc-transaction-xml-v2.c \
   ${top_srcdir}/src/backend/file/gnc-commodity-xml-v2.c \
@@ -92,6 +93,7 @@
   ${top_srcdir}/src/backend/file/gnc-account-xml-v2.c \
   ${top_srcdir}/src/backend/file/gnc-lot-xml-v2.c \
   ${top_srcdir}/src/backend/file/gnc-schedxaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-recurrence-xml-v2.c \
   ${top_srcdir}/src/backend/file/gnc-freqspec-xml-v2.c \
   ${top_srcdir}/src/backend/file/gnc-transaction-xml-v2.c \
   ${top_srcdir}/src/backend/file/gnc-commodity-xml-v2.c \
@@ -110,6 +112,7 @@
   ${top_srcdir}/src/backend/file/gnc-account-xml-v2.c \
   ${top_srcdir}/src/backend/file/gnc-lot-xml-v2.c \
   ${top_srcdir}/src/backend/file/gnc-schedxaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-recurrence-xml-v2.c \
   ${top_srcdir}/src/backend/file/gnc-freqspec-xml-v2.c \
   ${top_srcdir}/src/backend/file/gnc-transaction-xml-v2.c \
   ${top_srcdir}/src/backend/file/gnc-commodity-xml-v2.c \

Modified: gnucash/trunk/src/doc/sx.rst
===================================================================
--- gnucash/trunk/src/doc/sx.rst	2007-02-18 17:28:44 UTC (rev 15600)
+++ gnucash/trunk/src/doc/sx.rst	2007-02-18 17:39:54 UTC (rev 15601)
@@ -112,17 +112,38 @@
 
 - use Recurrence instead of FreqSpec
 ! - [ ] XML migration, handling
+    - xml:freqSpec -> obj:Recurrence
+      - [ ] none (Recurrence doesn't support)
+      - [x] once
+      - [x] daily
+      - [ ] daily [m-f] (composite)
+      - [x] weekly, single
+      - [ ] weekly, multiple (composite)
+      - [x] monthly (+quarterly, tri-anually, semi-annually, yearly)
+      - [ ] semi-monthly (composite)
+  - gnc-frequency
+!   - [x] Support Recurrence
+      - [x] in
+      - [x] out
+!   - [x] Support 'last-day-of-month'
+    - [x] simplify
+      - [x] remove daily [m-f] (-> weekly)
+      - [x] remove biweekly page (-> weekly)
+      - [x] remove > monthly pages (-> monthly)
+    - [ ] clean up, reformat source
+  - dialog-sx-editor
+    - [ ] gnc_sxed_check_changed
+    - [ ] gnc_sxed_check_consistent
+    - [ ] gnc_sxed_update_cal
+    - [x] gnc_sxed_save_sx
   - [ ] remove FreqSpec code
     - [ ] SX code
     - [ ] src/gnome/druid-acct-period.c
-  - gnc-frequency
-!   - [ ] Use Recurrence
-!   - [ ] Support 'last-day-of-month'
-    - [ ] clean up, reformat
 
 - since-last-run
 ! - [ ] save/restore dialog window size
   - [ ] "reminder" instances show number of days until due
+  - [ ] "Find unfinished" button; count; sensitize Ok as function of unfinished.
 ! - [x] rewrite adapter (re-)population logic
   - [x] move "effect_change" up to app-utils/, test.
   - [x] move state-change up to app-utils

Modified: gnucash/trunk/src/engine/Makefile.am
===================================================================
--- gnucash/trunk/src/engine/Makefile.am	2007-02-18 17:28:44 UTC (rev 15600)
+++ gnucash/trunk/src/engine/Makefile.am	2007-02-18 17:39:54 UTC (rev 15601)
@@ -97,7 +97,6 @@
   FreqSpecP.h \
   GroupP.h \
   QueryP.h \
-  SchedXactionP.h \
   ScrubP.h \
   SplitP.h \
   SX-book.h \

Modified: gnucash/trunk/src/engine/SchedXaction.c
===================================================================
--- gnucash/trunk/src/engine/SchedXaction.c	2007-02-18 17:28:44 UTC (rev 15600)
+++ gnucash/trunk/src/engine/SchedXaction.c	2007-02-18 17:39:54 UTC (rev 15601)
@@ -1,6 +1,6 @@
 /********************************************************************\
  * SchedXaction.c -- Scheduled Transaction implementation.          *
- * Copyright (C) 2001 Joshua Sled <jsled at asynchronous.org>          *
+ * Copyright (C) 2001,2007 Joshua Sled <jsled at asynchronous.org>     *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -37,7 +37,6 @@
 #include "SX-book.h"
 #include "SX-ttinfo.h"
 #include "SchedXaction.h"
-#include "SchedXactionP.h"
 #include "Transaction.h"
 #include "gnc-engine.h"
 
@@ -57,6 +56,7 @@
 
    qof_instance_init (&sx->inst, GNC_ID_SCHEDXACTION, book);
 
+   sx->schedule = NULL;
    sx->freq = xaccFreqSpecMalloc(book);
 
    g_date_clear( &sx->last_date, 1 );
@@ -74,13 +74,12 @@
 
    /* create a new template account for our splits */
    sx->template_acct = xaccMallocAccount(book);
-   /* THREAD-UNSAFE */
    xaccAccountSetName( sx->template_acct,
                        guid_to_string( &sx->inst.entity.guid ));
    xaccAccountSetCommodity
      (sx->template_acct,
       gnc_commodity_new( book,
-			 "template", "template",
+                         "template", "template",
                          "template", "template", 1 ) );
    xaccAccountSetType( sx->template_acct, ACCT_TYPE_BANK );
    ag = gnc_book_get_template_group( book );
@@ -111,7 +110,6 @@
   return;
 }
 
-
 static void
 delete_template_trans(SchedXaction *sx)
 {
@@ -230,6 +228,22 @@
    gnc_sx_commit_edit(sx);
 }
 
+GList*
+gnc_sx_get_schedule(SchedXaction *sx)
+{
+   return sx->schedule;
+}
+
+void
+gnc_sx_set_schedule(SchedXaction *sx, GList *schedule)
+{
+   g_return_if_fail(sx && schedule);
+   gnc_sx_begin_edit(sx);
+   sx->schedule = schedule;
+   qof_instance_set_dirty(&sx->inst);
+   gnc_sx_commit_edit(sx);
+}
+
 gchar *
 xaccSchedXactionGetName( SchedXaction *sx )
 {
@@ -287,7 +301,7 @@
      * This warning is only human readable - the caller
      * doesn't know the call failed.  This is bad
      */
-    PWARN( "New end date before start date" ); 
+    g_critical("New end date before start date"); 
     return;
   }
 
@@ -346,7 +360,7 @@
   /* FIXME This condition can be tightened up */
   if ( numRemain > sx->num_occurances_total ) 
   {
-    PWARN("The number remaining is greater than the total occurrences");
+    g_warning("The number remaining is greater than the total occurrences");
   }
   else
   {

Modified: gnucash/trunk/src/engine/SchedXaction.h
===================================================================
--- gnucash/trunk/src/engine/SchedXaction.h	2007-02-18 17:28:44 UTC (rev 15600)
+++ gnucash/trunk/src/engine/SchedXaction.h	2007-02-18 17:39:54 UTC (rev 15601)
@@ -40,16 +40,79 @@
 #include <glib.h>
 #include "qof.h"
 #include "FreqSpec.h"
+#include "Recurrence.h"
 #include "gnc-engine.h"
 
 #define GNC_IS_SX(obj)  (QOF_CHECK_TYPE((obj), GNC_ID_SCHEDXACTION))
 #define GNC_SX(obj)     (QOF_CHECK_CAST((obj), GNC_ID_SCHEDXACTION, SchedXaction))
 
+typedef struct _SchedXaction SchedXaction;
+
 /**
- * The SchedXaction data.
-*/
-typedef struct gncp_SchedXaction SchedXaction;
+ * A single scheduled transaction.
+ *
+ * Scheduled transactions have a list of transactions, and a frequency
+ * [and associated date anchors] with which they are scheduled.
+ *
+ * Things that make sense to have in a template transaction:
+ *   [not] Date [though eventually some/multiple template transactions
+ *               might have relative dates].
+ *   Memo
+ *   Account
+ *   Funds In/Out... or an expr involving 'amt' [A, x, y, a?] for
+ *     variable expenses.
+ *
+ * Template transactions are instantiated by:
+ *  . copying the fields of the template
+ *  . setting the date to the calculated "due" date.
+ *
+ * We should be able to use the GeneralLedger [or, yet-another-subtype
+ * of the internal ledger] for this editing.
+ **/
+struct _SchedXaction
+{
+  QofInstance     inst;
+  gchar           *name;
 
+  GList           *schedule;
+  FreqSpec        *freq;
+  
+  GDate           last_date;
+  
+  GDate           start_date;
+  /* if end_date is invalid, then no end. */
+  GDate           end_date;
+
+  /* if num_occurances_total == 0, then no limit */
+  gint            num_occurances_total;
+  /* reminaing occurances are as-of the 'last_date'. */
+  gint            num_occurances_remain;
+
+  /* the current instance-count of the SX. */
+  gint            instance_num;
+  
+  gboolean        enabled;
+  gboolean        autoCreateOption;
+  gboolean        autoCreateNotify;
+  gint            advanceCreateDays;
+  gint            advanceRemindDays;
+ 
+  Account        *template_acct;
+  
+  /** The list of deferred SX instances.  This list is of temporalStateData
+   * instances.  */
+  GList /* <temporalStateData*> */ *deferredList;
+};
+
+/** Just the variable temporal bits from the SX structure. */
+typedef struct _temporalStateData {
+  GDate last_date;
+  gint num_occur_rem;
+  gint num_inst;
+} temporalStateData;
+
+#define xaccSchedXactionSetGUID(X,G) qof_entity_set_guid(QOF_ENTITY(X),(G))
+
 /**
  * Creates and initializes a scheduled transaction.
 */
@@ -63,6 +126,11 @@
 void gnc_sx_begin_edit (SchedXaction *sx);
 void gnc_sx_commit_edit (SchedXaction *sx);
 
+/** @return GList<Recurrence*> **/
+GList* gnc_sx_get_schedule(SchedXaction *sx);
+/** @param[in] schedule A GList<Recurrence*> **/
+void gnc_sx_set_schedule(SchedXaction *sx, GList *schedule);
+
 FreqSpec *xaccSchedXactionGetFreqSpec( SchedXaction *sx );
 /**
  * The FreqSpec is given to the SchedXaction for mem mgmt; it should
@@ -162,7 +230,7 @@
 /** @} */
 
 /** \brief Returns the next occurance of a scheduled transaction.
-
+ *
  *   If the transaction hasn't occured, then it's based off the start date.
  * Otherwise, it's based off the last-occurance date.
  *

Deleted: gnucash/trunk/src/engine/SchedXactionP.h
===================================================================
--- gnucash/trunk/src/engine/SchedXactionP.h	2007-02-18 17:28:44 UTC (rev 15600)
+++ gnucash/trunk/src/engine/SchedXactionP.h	2007-02-18 17:39:54 UTC (rev 15601)
@@ -1,93 +0,0 @@
-/********************************************************************\
- * SchedXactionP.h -- Scheduled Transaction private header          *
- * Copyright (C) 2001 Linux Developers Group                        *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
- * Boston, MA  02110-1301,  USA       gnu at gnu.org                   *
- *                                                                  *
-\********************************************************************/
-
-#ifndef XACC_SCHEDXACTION_P_H
-#define XACC_SCHEDXACTION_P_H
-
-#include "SchedXaction.h"
-
-/**
- * A single scheduled transaction.
- *
- * Scheduled transactions have a list of transactions, and a frequency
- * [and associated date anchors] with which they are scheduled.
- *
- * Things that make sense to have in a template transaction:
- *   [not] Date [though eventually some/multiple template transactions
- *               might have relative dates].
- *   Memo
- *   Account
- *   Funds In/Out... or an expr involving 'amt' [A, x, y, a?] for
- *     variable expenses.
- *
- * Template transactions are instantiated by:
- *  . copying the fields of the template
- *  . setting the date to the calculated "due" date.
- *
- * We should be able to use the GeneralLedger [or, yet-another-subtype
- * of the internal ledger] for this editing.
- **/
-struct gncp_SchedXaction
-{
-  QofInstance     inst;
-  gchar           *name;
-
-  FreqSpec        *freq;
-  
-  GDate           last_date;
-  
-  GDate           start_date;
-  /* if end_date is invalid, then no end. */
-  GDate           end_date;
-
-  /* if num_occurances_total == 0, then no limit */
-  gint            num_occurances_total;
-  /* reminaing occurances are as-of the 'last_date'. */
-  gint            num_occurances_remain;
-
-  /* the current instance-count of the SX. */
-  gint            instance_num;
-  
-  gboolean        enabled;
-  gboolean        autoCreateOption;
-  gboolean        autoCreateNotify;
-  gint            advanceCreateDays;
-  gint            advanceRemindDays;
- 
-  Account        *template_acct;
-  
-  /** The list of deferred SX instances.  This list is of temporalStateData
-   * instances.  */
-  GList /* <temporalStateData*> */ *deferredList;
-};
-
-/** Just the variable temporal bits from the SX structure. */
-typedef struct _temporalStateData {
-  GDate last_date;
-  gint num_occur_rem;
-  gint num_inst;
-} temporalStateData;
-
-#define xaccSchedXactionSetGUID(X,G) qof_entity_set_guid(QOF_ENTITY(X),(G))
-
-#endif /* XACC_SCHEDXACTION_P_H */

Modified: gnucash/trunk/src/engine/gnc-engine.c
===================================================================
--- gnucash/trunk/src/engine/gnc-engine.c	2007-02-18 17:28:44 UTC (rev 15600)
+++ gnucash/trunk/src/engine/gnc-engine.c	2007-02-18 17:39:54 UTC (rev 15601)
@@ -34,7 +34,6 @@
 #include "TransactionP.h"
 #include "gnc-commodity.h"
 #include "gnc-lot-p.h"
-#include "SchedXactionP.h"
 #include "FreqSpecP.h"
 #include "gnc-pricedb-p.h"
 

Modified: gnucash/trunk/src/gnome/dialog-sx-editor.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-editor.c	2007-02-18 17:28:44 UTC (rev 15600)
+++ gnucash/trunk/src/gnome/dialog-sx-editor.c	2007-02-18 17:39:54 UTC (rev 15601)
@@ -972,6 +972,7 @@
                 FreqSpec *fs;
                 GDate gdate;
                 GString *str;
+                GList *schedule = NULL;
 
                 fs = xaccSchedXactionGetFreqSpec( sxed->sx );
                 gnc_frequency_save_state( sxed->gncfreq, fs, &gdate );
@@ -980,10 +981,13 @@
                 xaccFreqSpecGetFreqStr( fs, str );
                 g_debug("fs: %s", str->str);
 
+                gnc_frequency_save_to_recurrence(sxed->gncfreq, &schedule, &gdate);
+                gnc_sx_set_schedule(sxed->sx, schedule);
+                g_debug("recurrences parsed [%s]", recurrenceListToString(schedule));
+
                 /* now that we have it, set the start date */
                 xaccSchedXactionSetStartDate( sxed->sx, &gdate );
         }
-
 }
 
 static void
@@ -1259,10 +1263,13 @@
         GtkBox *b;
 
         b = GTK_BOX(glade_xml_get_widget( sxed->gxml, "gncfreq_hbox" ));
+        /*sxed->gncfreq =
+                GNC_FREQUENCY( gnc_frequency_new( xaccSchedXactionGetFreqSpec(sxed->sx),
+                xaccSchedXactionGetStartDate(sxed->sx) ) );*/
         sxed->gncfreq =
-                GNC_FREQUENCY( gnc_frequency_new( xaccSchedXactionGetFreqSpec(sxed->sx),
-                                                  xaccSchedXactionGetStartDate(sxed->sx) ) );
-        g_assert( sxed->gncfreq );
+             GNC_FREQUENCY(gnc_frequency_new_from_recurrence(gnc_sx_get_schedule(sxed->sx),
+                                                             xaccSchedXactionGetStartDate(sxed->sx)));
+        g_assert(sxed->gncfreq);
         g_signal_connect( sxed->gncfreq, "changed",
                           G_CALLBACK(gnc_sxed_freq_changed),
                           sxed );

Modified: gnucash/trunk/src/gnome/glade/sched-xact.glade
===================================================================
--- gnucash/trunk/src/gnome/glade/sched-xact.glade	2007-02-18 17:28:44 UTC (rev 15600)
+++ gnucash/trunk/src/gnome/glade/sched-xact.glade	2007-02-18 17:39:54 UTC (rev 15601)
@@ -16,7 +16,6 @@
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
   <property name="has_separator">True</property>
 
   <child internal-child="vbox">
@@ -115,10 +114,6 @@
 			  <property name="xpad">5</property>
 			  <property name="ypad">0</property>
 			  <property name="mnemonic_widget">sxe_name</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
@@ -184,10 +179,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>
@@ -209,10 +200,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>
@@ -324,10 +311,6 @@
 				  <property name="yalign">0.5</property>
 				  <property name="xpad">0</property>
 				  <property name="ypad">0</property>
-				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				  <property name="width_chars">-1</property>
-				  <property name="single_line_mode">False</property>
-				  <property name="angle">0</property>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>
@@ -407,10 +390,6 @@
 				  <property name="yalign">0.5</property>
 				  <property name="xpad">0</property>
 				  <property name="ypad">0</property>
-				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				  <property name="width_chars">-1</property>
-				  <property name="single_line_mode">False</property>
-				  <property name="angle">0</property>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>
@@ -511,10 +490,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>
@@ -536,10 +511,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>
@@ -585,10 +556,6 @@
 				  <property name="yalign">0.5</property>
 				  <property name="xpad">0</property>
 				  <property name="ypad">0</property>
-				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				  <property name="width_chars">-1</property>
-				  <property name="single_line_mode">False</property>
-				  <property name="angle">0</property>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>
@@ -610,10 +577,6 @@
 				  <property name="yalign">0.5</property>
 				  <property name="xpad">0</property>
 				  <property name="ypad">0</property>
-				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				  <property name="width_chars">-1</property>
-				  <property name="single_line_mode">False</property>
-				  <property name="angle">0</property>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>
@@ -642,10 +605,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
@@ -756,10 +715,6 @@
 				      <property name="yalign">0.5</property>
 				      <property name="xpad">3</property>
 				      <property name="ypad">0</property>
-				      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				      <property name="width_chars">-1</property>
-				      <property name="single_line_mode">False</property>
-				      <property name="angle">0</property>
 				    </widget>
 				    <packing>
 				      <property name="left_attach">2</property>
@@ -784,10 +739,6 @@
 				      <property name="yalign">0.5</property>
 				      <property name="xpad">3</property>
 				      <property name="ypad">0</property>
-				      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				      <property name="width_chars">-1</property>
-				      <property name="single_line_mode">False</property>
-				      <property name="angle">0</property>
 				    </widget>
 				    <packing>
 				      <property name="left_attach">2</property>
@@ -909,10 +860,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>
@@ -1010,10 +957,6 @@
 	      <property name="yalign">0.5</property>
 	      <property name="xpad">0</property>
 	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
 	    </widget>
 	    <packing>
 	      <property name="padding">0</property>
@@ -1035,10 +978,6 @@
 	      <property name="yalign">0.5</property>
 	      <property name="xpad">0</property>
 	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
 	    </widget>
 	    <packing>
 	      <property name="padding">0</property>
@@ -1087,179 +1026,115 @@
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
 
   <child>
-    <widget class="GtkVBox" id="gncfreq_vbox">
+    <widget class="GtkEventBox" id="eventbox2">
       <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
+      <property name="visible_window">True</property>
+      <property name="above_child">False</property>
 
       <child>
-	<widget class="GtkTable" id="gncfreq_table">
+	<widget class="GtkVBox" id="gncfreq_vbox">
 	  <property name="visible">True</property>
-	  <property name="n_rows">2</property>
-	  <property name="n_columns">2</property>
 	  <property name="homogeneous">False</property>
-	  <property name="row_spacing">0</property>
-	  <property name="column_spacing">0</property>
+	  <property name="spacing">0</property>
 
 	  <child>
-	    <widget class="GtkLabel" id="freq label">
+	    <widget class="GtkTable" id="gncfreq_table">
 	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Frequency:</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">1</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">5</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">0</property>
-	      <property name="bottom_attach">1</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
+	      <property name="n_rows">2</property>
+	      <property name="n_columns">2</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">0</property>
+	      <property name="column_spacing">0</property>
 
-	  <child>
-	    <widget class="GtkLabel" id="startdate label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Start Date:</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">1</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">5</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">1</property>
-	      <property name="bottom_attach">2</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
+	      <child>
+		<widget class="GtkLabel" id="freq label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Frequency:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">5</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	  <child>
-	    <widget class="GtkComboBox" id="freq_combobox">
-	      <property name="visible">True</property>
-	      <property name="items" translatable="yes">None
+	      <child>
+		<widget class="GtkLabel" id="startdate label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Start Date:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">5</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkComboBox" id="freq_combobox">
+		  <property name="visible">True</property>
+		  <property name="items" translatable="yes">None
 Once
 Daily
-Daily [M-F]
 Weekly
-Bi-Weekly
 Semi-Monthly
-Monthly
-Quarterly
-Tri-Yearly
-Semi-Yearly
-Yearly</property>
-	      <property name="add_tearoffs">False</property>
-	      <property name="focus_on_click">True</property>
+Monthly</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
 	    </widget>
 	    <packing>
-	      <property name="left_attach">1</property>
-	      <property name="right_attach">2</property>
-	      <property name="top_attach">0</property>
-	      <property name="bottom_attach">1</property>
-	      <property name="y_options">fill</property>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
 	    </packing>
 	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
 
-      <child>
-	<widget class="GtkNotebook" id="gncfreq_nb">
-	  <property name="visible">True</property>
-	  <property name="show_tabs">False</property>
-	  <property name="show_border">True</property>
-	  <property name="tab_pos">GTK_POS_TOP</property>
-	  <property name="scrollable">True</property>
-	  <property name="enable_popup">False</property>
-
 	  <child>
-	    <widget class="GtkLabel" id="label847767">
+	    <widget class="GtkNotebook" id="gncfreq_nb">
 	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Not scheduled</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="tab_expand">False</property>
-	      <property name="tab_fill">True</property>
-	    </packing>
-	  </child>
+	      <property name="show_tabs">False</property>
+	      <property name="show_border">True</property>
+	      <property name="tab_pos">GTK_POS_TOP</property>
+	      <property name="scrollable">True</property>
+	      <property name="enable_popup">False</property>
 
-	  <child>
-	    <widget class="GtkLabel" id="label847753">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">None</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">tab</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkHBox" id="hbox114">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">True</property>
-	      <property name="spacing">0</property>
-
 	      <child>
-		<widget class="GtkLabel" id="label847776">
+		<widget class="GtkLabel" id="label847767">
 		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Select occurrence date above.</property>
+		  <property name="label" translatable="yes">Not scheduled</property>
 		  <property name="use_underline">False</property>
 		  <property name="use_markup">False</property>
 		  <property name="justify">GTK_JUSTIFY_CENTER</property>
@@ -1269,237 +1144,51 @@
 		  <property name="yalign">0.5</property>
 		  <property name="xpad">0</property>
 		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
 		</widget>
 		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
+		  <property name="tab_expand">False</property>
+		  <property name="tab_fill">True</property>
 		</packing>
 	      </child>
-	    </widget>
-	    <packing>
-	      <property name="tab_expand">False</property>
-	      <property name="tab_fill">True</property>
-	    </packing>
-	  </child>
 
-	  <child>
-	    <widget class="GtkLabel" id="label847735">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Once</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">tab</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkHBox" id="hbox108">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">True</property>
-	      <property name="spacing">0</property>
-
 	      <child>
-		<widget class="GtkHBox" id="hbox115">
+		<widget class="GtkLabel" id="label847753">
 		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847746">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Every </property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">4</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="daily_spin">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">1</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">True</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 1 365 1 10 10</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847747">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">days.</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_CENTER</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">5</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
+		  <property name="label" translatable="yes">None</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
 		</widget>
 		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
+		  <property name="type">tab</property>
 		</packing>
 	      </child>
-	    </widget>
-	    <packing>
-	      <property name="tab_expand">False</property>
-	      <property name="tab_fill">True</property>
-	    </packing>
-	  </child>
 
-	  <child>
-	    <widget class="GtkLabel" id="label847736">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Daily</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">tab</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkHBox" id="hbox138">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">True</property>
-	      <property name="spacing">0</property>
-
 	      <child>
-		<widget class="GtkHBox" id="hbox139">
+		<widget class="GtkHBox" id="hbox114">
 		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
+		  <property name="homogeneous">True</property>
 		  <property name="spacing">0</property>
 
 		  <child>
-		    <widget class="GtkLabel" id="label847772">
+		    <widget class="GtkLabel" id="label847776">
 		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Every </property>
+		      <property name="label" translatable="yes">Select occurrence date above.</property>
 		      <property name="use_underline">False</property>
 		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">4</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="dailymf_spin">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">1</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">True</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 1 365 1 10 10</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847773">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">weeks.</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
 		      <property name="justify">GTK_JUSTIFY_CENTER</property>
 		      <property name="wrap">False</property>
 		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
+		      <property name="xalign">0.5</property>
 		      <property name="yalign">0.5</property>
-		      <property name="xpad">5</property>
+		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>
@@ -1509,205 +1198,55 @@
 		  </child>
 		</widget>
 		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
+		  <property name="tab_expand">False</property>
+		  <property name="tab_fill">True</property>
 		</packing>
 	      </child>
-	    </widget>
-	    <packing>
-	      <property name="tab_expand">False</property>
-	      <property name="tab_fill">True</property>
-	    </packing>
-	  </child>
 
-	  <child>
-	    <widget class="GtkLabel" id="daily_mf">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Daily [M-F]</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">tab</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkVBox" id="vbox113">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
 	      <child>
-		<widget class="GtkHBox" id="hbox110">
+		<widget class="GtkLabel" id="label847735">
 		  <property name="visible">True</property>
-		  <property name="homogeneous">True</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847748">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Every</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="weekly_spin">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">1</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">False</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 1 100 1 10 10</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847749">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">weeks.</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_FILL</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
+		  <property name="label" translatable="yes">Once</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
 		</widget>
 		<packing>
-		  <property name="padding">5</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
+		  <property name="type">tab</property>
 		</packing>
 	      </child>
 
 	      <child>
-		<widget class="GtkFrame" id="frame51">
-		  <property name="border_width">2</property>
+		<widget class="GtkHBox" id="hbox108">
 		  <property name="visible">True</property>
-		  <property name="label_xalign">0.5</property>
-		  <property name="label_yalign">0.5</property>
-		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">0</property>
 
 		  <child>
-		    <widget class="GtkHBox" id="hbox122">
+		    <widget class="GtkHBox" id="hbox115">
 		      <property name="visible">True</property>
 		      <property name="homogeneous">False</property>
 		      <property name="spacing">0</property>
 
 		      <child>
-			<widget class="GtkVBox" id="vbox114">
+			<widget class="GtkLabel" id="label847746">
 			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">0</property>
-
-			  <child>
-			    <widget class="GtkCheckButton" id="wd_check_sun">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">Sunday</property>
-			      <property name="use_underline">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
-			      <property name="focus_on_click">True</property>
-			      <property name="active">False</property>
-			      <property name="inconsistent">False</property>
-			      <property name="draw_indicator">True</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkCheckButton" id="wd_check_mon">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">Monday</property>
-			      <property name="use_underline">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
-			      <property name="focus_on_click">True</property>
-			      <property name="active">False</property>
-			      <property name="inconsistent">False</property>
-			      <property name="draw_indicator">True</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkCheckButton" id="wd_check_tue">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">Tuesday</property>
-			      <property name="use_underline">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
-			      <property name="focus_on_click">True</property>
-			      <property name="active">False</property>
-			      <property name="inconsistent">False</property>
-			      <property name="draw_indicator">True</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
+			  <property name="label" translatable="yes">Every </property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">4</property>
+			  <property name="ypad">0</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
@@ -1717,67 +1256,16 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkVBox" id="vbox117">
+			<widget class="GtkSpinButton" id="daily_spin">
 			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">0</property>
-
-			  <child>
-			    <widget class="GtkCheckButton" id="wd_check_wed">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">Wednesday</property>
-			      <property name="use_underline">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
-			      <property name="focus_on_click">True</property>
-			      <property name="active">False</property>
-			      <property name="inconsistent">False</property>
-			      <property name="draw_indicator">True</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkCheckButton" id="wd_check_thu">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">Thursday</property>
-			      <property name="use_underline">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
-			      <property name="focus_on_click">True</property>
-			      <property name="active">False</property>
-			      <property name="inconsistent">False</property>
-			      <property name="draw_indicator">True</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkCheckButton" id="wd_check_fri">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">Friday</property>
-			      <property name="use_underline">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
-			      <property name="focus_on_click">True</property>
-			      <property name="active">False</property>
-			      <property name="inconsistent">False</property>
-			      <property name="draw_indicator">True</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">1</property>
+			  <property name="digits">0</property>
+			  <property name="numeric">True</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">True</property>
+			  <property name="wrap">False</property>
+			  <property name="adjustment">1 1 365 1 10 10</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
@@ -1787,29 +1275,18 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkVBox" id="vbox162">
+			<widget class="GtkLabel" id="label847747">
 			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">0</property>
-
-			  <child>
-			    <widget class="GtkCheckButton" id="wd_check_sat">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">Saturday</property>
-			      <property name="use_underline">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
-			      <property name="focus_on_click">True</property>
-			      <property name="active">False</property>
-			      <property name="inconsistent">False</property>
-			      <property name="draw_indicator">True</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
+			  <property name="label" translatable="yes">days.</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">5</property>
+			  <property name="ypad">0</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
@@ -1818,77 +1295,23 @@
 			</packing>
 		      </child>
 		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847969">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Days</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
 		    <packing>
-		      <property name="type">label_item</property>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
 		    </packing>
 		  </child>
 		</widget>
 		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
+		  <property name="tab_expand">False</property>
+		  <property name="tab_fill">True</property>
 		</packing>
 	      </child>
-	    </widget>
-	    <packing>
-	      <property name="tab_expand">False</property>
-	      <property name="tab_fill">True</property>
-	    </packing>
-	  </child>
 
-	  <child>
-	    <widget class="GtkLabel" id="label847738">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Weekly</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">tab</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkHBox" id="hbox111">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">True</property>
-	      <property name="spacing">0</property>
-
 	      <child>
-		<widget class="GtkLabel" id="label847777">
+		<widget class="GtkLabel" id="label847736">
 		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Select initial date, above.</property>
+		  <property name="label" translatable="yes">Daily</property>
 		  <property name="use_underline">False</property>
 		  <property name="use_markup">False</property>
 		  <property name="justify">GTK_JUSTIFY_CENTER</property>
@@ -1898,68 +1321,26 @@
 		  <property name="yalign">0.5</property>
 		  <property name="xpad">0</property>
 		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
 		</widget>
 		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
+		  <property name="type">tab</property>
 		</packing>
 	      </child>
-	    </widget>
-	    <packing>
-	      <property name="tab_expand">False</property>
-	      <property name="tab_fill">True</property>
-	    </packing>
-	  </child>
 
-	  <child>
-	    <widget class="GtkLabel" id="label847739">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Bi-Weekly</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">tab</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkHBox" id="hbox112">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
 	      <child>
-		<widget class="GtkVBox" id="vbox119">
-		  <property name="border_width">5</property>
+		<widget class="GtkVBox" id="vbox113">
 		  <property name="visible">True</property>
 		  <property name="homogeneous">False</property>
 		  <property name="spacing">0</property>
 
 		  <child>
-		    <widget class="GtkHBox" id="hbox126">
+		    <widget class="GtkHBox" id="hbox110">
 		      <property name="visible">True</property>
 		      <property name="homogeneous">True</property>
 		      <property name="spacing">0</property>
 
 		      <child>
-			<widget class="GtkLabel" id="label847757">
+			<widget class="GtkLabel" id="label847748">
 			  <property name="visible">True</property>
 			  <property name="label" translatable="yes">Every</property>
 			  <property name="use_underline">False</property>
@@ -1971,27 +1352,23 @@
 			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
 			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkSpinButton" id="semimonthly_spin">
+			<widget class="GtkSpinButton" id="weekly_spin">
 			  <property name="visible">True</property>
 			  <property name="can_focus">True</property>
 			  <property name="climb_rate">1</property>
 			  <property name="digits">0</property>
 			  <property name="numeric">False</property>
 			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-			  <property name="snap_to_ticks">True</property>
+			  <property name="snap_to_ticks">False</property>
 			  <property name="wrap">False</property>
 			  <property name="adjustment">1 1 100 1 10 10</property>
 			</widget>
@@ -2003,26 +1380,22 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label847758">
+			<widget class="GtkLabel" id="label847749">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">months.</property>
+			  <property name="label" translatable="yes">weeks.</property>
 			  <property name="use_underline">False</property>
 			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="justify">GTK_JUSTIFY_FILL</property>
 			  <property name="wrap">False</property>
 			  <property name="selectable">False</property>
 			  <property name="xalign">0</property>
 			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
-			  <property name="expand">False</property>
+			  <property name="expand">True</property>
 			  <property name="fill">True</property>
 			</packing>
 		      </child>
@@ -2035,334 +1408,362 @@
 		  </child>
 
 		  <child>
-		    <widget class="GtkHBox" id="hbox127">
+		    <widget class="GtkFrame" id="frame51">
+		      <property name="border_width">2</property>
 		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
+		      <property name="label_xalign">0.5</property>
+		      <property name="label_yalign">0.5</property>
+		      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
 		      <child>
-			<widget class="GtkLabel" id="label847759">
+			<widget class="GtkHBox" id="hbox122">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">First on the:</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">1</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
 
-		      <child>
-			<widget class="GtkComboBox" id="semimonthly_first">
-			  <property name="visible">True</property>
-			  <property name="items" translatable="yes">1st
-2nd
-3rd
-4th
-5th
-6th
-7th
-8th
-9th
-10th
-11th
-12th
-13th
-14th
-15th
-16th
-17th
-18th
-19th
-20th
-21st
-22nd
-23rd
-24th
-25th
-26th
-27th
-28th
-[29th/last]
-[30th/last]
-[31st/last]</property>
-			  <property name="add_tearoffs">False</property>
-			  <property name="focus_on_click">True</property>
+			  <child>
+			    <widget class="GtkVBox" id="vbox114">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkCheckButton" id="wd_check_sun">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Sunday</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="wd_check_mon">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Monday</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="wd_check_tue">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Tuesday</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkVBox" id="vbox117">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkCheckButton" id="wd_check_wed">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Wednesday</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="wd_check_thu">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Thursday</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="wd_check_fri">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Friday</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkVBox" id="vbox162">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkCheckButton" id="wd_check_sat">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Saturday</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
 			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
 		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">3</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
 
-		  <child>
-		    <widget class="GtkHBox" id="hbox128">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
-
 		      <child>
-			<widget class="GtkLabel" id="label847760">
+			<widget class="GtkLabel" id="label847969">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">then on the:</property>
+			  <property name="label" translatable="yes">Days</property>
 			  <property name="use_underline">False</property>
 			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
 			  <property name="wrap">False</property>
 			  <property name="selectable">False</property>
-			  <property name="xalign">1</property>
+			  <property name="xalign">0.5</property>
 			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
 			</widget>
 			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
+			  <property name="type">label_item</property>
 			</packing>
 		      </child>
-
-		      <child>
-			<widget class="GtkComboBox" id="semimonthly_second">
-			  <property name="visible">True</property>
-			  <property name="items" translatable="yes">1st
-2nd
-3rd
-4th
-5th
-6th
-7th
-8th
-9th
-10th
-11th
-12th
-13th
-14th
-15th
-16th
-17th
-18th
-19th
-20th
-21st
-22nd
-23rd
-24th
-25th
-26th
-27th
-28th
-[29th/last]
-[30th/last]
-[31st/last]</property>
-			  <property name="add_tearoffs">False</property>
-			  <property name="focus_on_click">True</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
 		    </widget>
 		    <packing>
-		      <property name="padding">3</property>
+		      <property name="padding">0</property>
 		      <property name="expand">False</property>
 		      <property name="fill">False</property>
 		    </packing>
 		  </child>
 		</widget>
 		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
+		  <property name="tab_expand">False</property>
+		  <property name="tab_fill">True</property>
 		</packing>
 	      </child>
-	    </widget>
-	    <packing>
-	      <property name="tab_expand">False</property>
-	      <property name="tab_fill">True</property>
-	    </packing>
-	  </child>
 
-	  <child>
-	    <widget class="GtkLabel" id="label847740">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Semi-Monthly</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">tab</property>
-	    </packing>
-	  </child>
+	      <child>
+		<widget class="GtkLabel" id="label847738">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Weekly</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">tab</property>
+		</packing>
+	      </child>
 
-	  <child>
-	    <widget class="GtkHBox" id="hbox113">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
 	      <child>
-		<widget class="GtkVBox" id="vbox118">
+		<widget class="GtkHBox" id="hbox112">
 		  <property name="visible">True</property>
 		  <property name="homogeneous">False</property>
 		  <property name="spacing">0</property>
 
 		  <child>
-		    <widget class="GtkHBox" id="hbox124">
+		    <widget class="GtkVBox" id="vbox119">
+		      <property name="border_width">5</property>
 		      <property name="visible">True</property>
-		      <property name="homogeneous">True</property>
+		      <property name="homogeneous">False</property>
 		      <property name="spacing">0</property>
 
 		      <child>
-			<widget class="GtkLabel" id="label847754">
+			<widget class="GtkHBox" id="hbox126">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Every </property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_CENTER</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">1</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
 
-		      <child>
-			<widget class="GtkSpinButton" id="monthly_spin">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="climb_rate">1</property>
-			  <property name="digits">0</property>
-			  <property name="numeric">True</property>
-			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-			  <property name="snap_to_ticks">True</property>
-			  <property name="wrap">True</property>
-			  <property name="adjustment">1 1 100 1 10 10</property>
+			  <child>
+			    <widget class="GtkLabel" id="label847757">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Every</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="semimonthly_spin">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">0</property>
+			      <property name="numeric">False</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">True</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">1 1 100 1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847758">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">months.</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
 			</widget>
 			<packing>
-			  <property name="padding">0</property>
+			  <property name="padding">5</property>
 			  <property name="expand">False</property>
 			  <property name="fill">False</property>
 			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label847755">
+			<widget class="GtkHBox" id="hbox127">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">months.</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_CENTER</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">5</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
 
-		  <child>
-		    <widget class="GtkHBox" id="hbox125">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
+			  <child>
+			    <widget class="GtkLabel" id="label847759">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">First on the:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
 
-		      <child>
-			<widget class="GtkLabel" id="label847756">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">On the</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">1</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">2</property>
-			  <property name="expand">False</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkComboBox" id="monthly_day">
-			  <property name="visible">True</property>
-			  <property name="items" translatable="yes">1st
+			  <child>
+			    <widget class="GtkComboBox" id="semimonthly_first">
+			      <property name="visible">True</property>
+			      <property name="items" translatable="yes">1st
 2nd
 3rd
 4th
@@ -2390,159 +1791,62 @@
 26th
 27th
 28th
-[29th/last]
-[30th/last]
-[31st/last]</property>
-			  <property name="add_tearoffs">False</property>
-			  <property name="focus_on_click">True</property>
+29th (or last)
+30th (or last)
+31st (or last)
+Last Monday
+Last Tuesday
+Last Wednesday
+Last Thursday
+Last Friday
+Last Saturday
+Last Sunday</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
 			</widget>
 			<packing>
-			  <property name="padding">0</property>
+			  <property name="padding">3</property>
 			  <property name="expand">False</property>
 			  <property name="fill">False</property>
 			</packing>
 		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">5</property>
-		      <property name="expand">False</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">5</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="tab_expand">False</property>
-	      <property name="tab_fill">True</property>
-	    </packing>
-	  </child>
 
-	  <child>
-	    <widget class="GtkLabel" id="label847741">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Monthly</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">tab</property>
-	    </packing>
-	  </child>
+		      <child>
+			<widget class="GtkHBox" id="hbox128">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
 
-	  <child>
-	    <widget class="GtkVBox" id="vbox120">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
+			  <child>
+			    <widget class="GtkLabel" id="label847760">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">then on the:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
 
-	      <child>
-		<widget class="GtkHBox" id="hbox134">
-		  <property name="border_width">3</property>
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847766">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Occuring in</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">5</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkComboBox" id="quarterly_occur">
-		      <property name="visible">True</property>
-		      <property name="items" translatable="yes">Jan, Apr, Jul, Oct
-Feb, May, Aug, Nov
-Mar, Jun, Sep, Dec</property>
-		      <property name="add_tearoffs">False</property>
-		      <property name="focus_on_click">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox129">
-		  <property name="border_width">3</property>
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847761">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">On the</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">5</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkComboBox" id="quarterly_day">
-		      <property name="visible">True</property>
-		      <property name="items" translatable="yes">1st
+			  <child>
+			    <widget class="GtkComboBox" id="semimonthly_second">
+			      <property name="visible">True</property>
+			      <property name="items" translatable="yes">1st
 2nd
 3rd
 4th
@@ -2570,11 +1874,30 @@
 26th
 27th
 28th
-[29th/last]
-[30th/last]
-[31st/last]</property>
-		      <property name="add_tearoffs">False</property>
-		      <property name="focus_on_click">True</property>
+29th (or last)
+30th (or last)
+31st (or last)
+Last Monday
+Last Tuesday
+Last Wednesday
+Last Thursday
+Last Friday
+Last Saturday
+Last Sunday</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">3</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>
@@ -2584,314 +1907,147 @@
 		  </child>
 		</widget>
 		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
+		  <property name="tab_expand">False</property>
+		  <property name="tab_fill">True</property>
 		</packing>
 	      </child>
-	    </widget>
-	    <packing>
-	      <property name="tab_expand">False</property>
-	      <property name="tab_fill">True</property>
-	    </packing>
-	  </child>
 
-	  <child>
-	    <widget class="GtkLabel" id="label847742">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Quarterly</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">tab</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkVBox" id="vbox121">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
 	      <child>
-		<widget class="GtkHBox" id="hbox133">
-		  <property name="border_width">3</property>
+		<widget class="GtkLabel" id="label847740">
 		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847765">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Occuring in</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">5</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkComboBox" id="triyearly_occur">
-		      <property name="visible">True</property>
-		      <property name="items" translatable="yes">Jan, May, Sep
-Feb, Jun, Oct
-Mar, Jul, Nov</property>
-		      <property name="add_tearoffs">False</property>
-		      <property name="focus_on_click">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
+		  <property name="label" translatable="yes">Semi-Monthly</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
 		</widget>
 		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
+		  <property name="type">tab</property>
 		</packing>
 	      </child>
 
 	      <child>
-		<widget class="GtkHBox" id="hbox130">
-		  <property name="border_width">3</property>
+		<widget class="GtkHBox" id="hbox113">
 		  <property name="visible">True</property>
 		  <property name="homogeneous">False</property>
 		  <property name="spacing">0</property>
 
 		  <child>
-		    <widget class="GtkLabel" id="label847762">
+		    <widget class="GtkVBox" id="vbox118">
 		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">On the</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">5</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
 
-		  <child>
-		    <widget class="GtkComboBox" id="triyearly_day">
-		      <property name="visible">True</property>
-		      <property name="items" translatable="yes">1st
-2nd
-3rd
-4th
-5th
-6th
-7th
-8th
-9th
-10th
-11th
-12th
-13th
-14th
-15th
-16th
-17th
-18th
-19th
-20th
-21st
-22nd
-23rd
-24th
-25th
-26th
-27th
-28th
-[29th/last]
-[30th/last]
-[31st/last]</property>
-		      <property name="add_tearoffs">False</property>
-		      <property name="focus_on_click">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="tab_expand">False</property>
-	      <property name="tab_fill">True</property>
-	    </packing>
-	  </child>
+		      <child>
+			<widget class="GtkHBox" id="hbox124">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
 
-	  <child>
-	    <widget class="GtkLabel" id="label847743">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Tri-Yearly</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">tab</property>
-	    </packing>
-	  </child>
+			  <child>
+			    <widget class="GtkLabel" id="label847754">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Every </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
 
-	  <child>
-	    <widget class="GtkVBox" id="vbox122">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
+			  <child>
+			    <widget class="GtkSpinButton" id="monthly_spin">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">0</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">True</property>
+			      <property name="wrap">True</property>
+			      <property name="adjustment">1 1 100 1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
 
-	      <child>
-		<widget class="GtkHBox" id="hbox131">
-		  <property name="border_width">3</property>
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
+			  <child>
+			    <widget class="GtkLabel" id="label847755">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">months.</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">5</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
 
-		  <child>
-		    <widget class="GtkLabel" id="label847763">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Occuring in</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_CENTER</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">5</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
+		      <child>
+			<widget class="GtkHBox" id="hbox125">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
 
-		  <child>
-		    <widget class="GtkComboBox" id="semiyearly_occur">
-		      <property name="visible">True</property>
-		      <property name="items" translatable="yes">Jan, Jul
-Feb, Aug
-Mar, Sep
-Apr, Oct
-May, Nov
-Jun, Dec</property>
-		      <property name="add_tearoffs">False</property>
-		      <property name="focus_on_click">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
+			  <child>
+			    <widget class="GtkLabel" id="label847756">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">On the</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">2</property>
+			      <property name="expand">False</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
 
-	      <child>
-		<widget class="GtkHBox" id="hbox132">
-		  <property name="border_width">3</property>
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847764">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">On the</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_CENTER</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">5</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkComboBox" id="semiyearly_day">
-		      <property name="visible">True</property>
-		      <property name="items" translatable="yes">1st
+			  <child>
+			    <widget class="GtkComboBox" id="monthly_day">
+			      <property name="visible">True</property>
+			      <property name="items" translatable="yes">1st
 2nd
 3rd
 4th
@@ -2919,325 +2075,70 @@
 26th
 27th
 28th
-[29th/last]
-[30th/last]
-[31st/last]</property>
-		      <property name="add_tearoffs">False</property>
-		      <property name="focus_on_click">True</property>
+29th (or last)
+30th (or last)
+31st (or last)
+Last Monday
+Last Tuesday
+Last Wednesday
+Last Thursday
+Last Friday
+Last Saturday
+Last Sunday</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">5</property>
+			  <property name="expand">False</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
 		    </widget>
 		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="tab_expand">False</property>
-	      <property name="tab_fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label847744">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Semi-Yearly</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">tab</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkVBox" id="vbox123">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox135">
-		  <property name="border_width">5</property>
-		  <property name="visible">True</property>
-		  <property name="homogeneous">True</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847768">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Every</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_CENTER</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">5</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
+		      <property name="padding">5</property>
+		      <property name="expand">True</property>
 		      <property name="fill">True</property>
 		    </packing>
 		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="yearly_spin">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">1</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">True</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 1 100 1 10 10</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847769">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">year(s).</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_CENTER</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">5</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
 		</widget>
 		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
+		  <property name="tab_expand">False</property>
+		  <property name="tab_fill">True</property>
 		</packing>
 	      </child>
 
 	      <child>
-		<widget class="GtkHBox" id="hbox136">
-		  <property name="border_width">3</property>
+		<widget class="GtkLabel" id="label847741">
 		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847770">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Month</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">5</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkComboBox" id="yearly_month">
-		      <property name="visible">True</property>
-		      <property name="items" translatable="yes">January
-February
-March
-April
-May
-June
-July
-August
-September
-October
-November
-December</property>
-		      <property name="add_tearoffs">False</property>
-		      <property name="focus_on_click">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
+		  <property name="label" translatable="yes">Monthly</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
 		</widget>
 		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
+		  <property name="type">tab</property>
 		</packing>
 	      </child>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox137">
-		  <property name="border_width">3</property>
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847771">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Day</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">5</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkComboBox" id="yearly_day">
-		      <property name="visible">True</property>
-		      <property name="items" translatable="yes">1st
-2nd
-3rd
-4th
-5th
-6th
-7th
-8th
-9th
-10th
-11th
-12th
-13th
-14th
-15th
-16th
-17th
-18th
-19th
-20th
-21st
-22nd
-23rd
-24th
-25th
-26th
-27th
-28th
-[29th/last]
-[30th/last]
-[31st/last]</property>
-		      <property name="add_tearoffs">False</property>
-		      <property name="focus_on_click">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
 	    </widget>
 	    <packing>
-	      <property name="tab_expand">False</property>
-	      <property name="tab_fill">True</property>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
 	    </packing>
 	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label847745">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Yearly</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">tab</property>
-	    </packing>
-	  </child>
 	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
       </child>
     </widget>
   </child>
@@ -3256,7 +2157,6 @@
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
   <property name="has_separator">True</property>
 
   <child internal-child="vbox">
@@ -3351,10 +2251,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">3</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">0</property>
@@ -3379,10 +2275,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">3</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">0</property>
@@ -3407,10 +2299,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">3</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">0</property>
@@ -3452,8 +2340,6 @@
 Monthly
 Quarterly
 Yearly</property>
-		      <property name="add_tearoffs">False</property>
-		      <property name="focus_on_click">True</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">1</property>
@@ -3616,10 +2502,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="type">label_item</property>
@@ -3681,7 +2563,6 @@
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
 
   <child>
     <widget class="GnomeDruid" id="sincelast_druid">
@@ -3728,7 +2609,6 @@
 		      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
 		      <property name="fraction">0</property>
 		      <property name="pulse_step">0.10000000149</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
 		    </widget>
 		  </child>
 
@@ -3745,10 +2625,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="type">label_item</property>
@@ -3794,10 +2670,6 @@
 		  <property name="yalign">0.5</property>
 		  <property name="xpad">0</property>
 		  <property name="ypad">11</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
 		</widget>
 		<packing>
 		  <property name="padding">0</property>
@@ -3836,10 +2708,6 @@
 			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
 			</widget>
 		      </child>
 
@@ -3855,10 +2723,6 @@
 			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
 			</widget>
 		      </child>
 
@@ -3874,10 +2738,6 @@
 			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
 			</widget>
 		      </child>
 		    </widget>
@@ -3971,10 +2831,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			  </child>
 
@@ -3990,10 +2846,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			  </child>
 			</widget>
@@ -4030,10 +2882,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">3</property>
 			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
@@ -4143,10 +2991,6 @@
 					      <property name="yalign">0.5</property>
 					      <property name="xpad">0</property>
 					      <property name="ypad">0</property>
-					      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-					      <property name="width_chars">-1</property>
-					      <property name="single_line_mode">False</property>
-					      <property name="angle">0</property>
 					    </widget>
 					    <packing>
 					      <property name="left_attach">1</property>
@@ -4170,10 +3014,6 @@
 					      <property name="yalign">0.5</property>
 					      <property name="xpad">0</property>
 					      <property name="ypad">0</property>
-					      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-					      <property name="width_chars">-1</property>
-					      <property name="single_line_mode">False</property>
-					      <property name="angle">0</property>
 					    </widget>
 					    <packing>
 					      <property name="left_attach">0</property>
@@ -4214,10 +3054,6 @@
 				      <property name="yalign">0.5</property>
 				      <property name="xpad">3</property>
 				      <property name="ypad">3</property>
-				      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				      <property name="width_chars">-1</property>
-				      <property name="single_line_mode">False</property>
-				      <property name="angle">0</property>
 				    </widget>
 				    <packing>
 				      <property name="padding">0</property>
@@ -4261,10 +3097,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="type">label_item</property>
@@ -4323,10 +3155,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="type">label_item</property>
@@ -4399,10 +3227,6 @@
 		  <property name="yalign">0.5</property>
 		  <property name="xpad">0</property>
 		  <property name="ypad">11</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
 		</widget>
 		<packing>
 		  <property name="padding">0</property>
@@ -4442,10 +3266,6 @@
 			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
 			</widget>
 		      </child>
 
@@ -4461,10 +3281,6 @@
 			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
 			</widget>
 		      </child>
 
@@ -4480,10 +3296,6 @@
 			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
 			</widget>
 		      </child>
 		    </widget>
@@ -4564,7 +3376,6 @@
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
 
   <child>
     <widget class="GnomeDruid" id="loan_druid">
@@ -4626,10 +3437,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">0</property>
@@ -4654,10 +3461,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">0</property>
@@ -4682,10 +3485,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">0</property>
@@ -4710,10 +3509,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">0</property>
@@ -4738,10 +3533,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">0</property>
@@ -4804,8 +3595,6 @@
 			  <property name="visible">True</property>
 			  <property name="items" translatable="yes">months
 years</property>
-			  <property name="add_tearoffs">False</property>
-			  <property name="focus_on_click">True</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
@@ -4898,10 +3687,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
@@ -4934,10 +3719,6 @@
 		      <property name="yalign">0</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">2</property>
@@ -4961,10 +3742,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">2</property>
@@ -5012,10 +3789,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="type">label_item</property>
@@ -5042,8 +3815,6 @@
 5/1 Year ARM
 7/1 Year ARM
 10/1 Year ARM</property>
-		      <property name="add_tearoffs">False</property>
-		      <property name="focus_on_click">True</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">3</property>
@@ -5094,10 +3865,6 @@
 		  <property name="yalign">0.5</property>
 		  <property name="xpad">0</property>
 		  <property name="ypad">10</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
 		</widget>
 		<packing>
 		  <property name="padding">0</property>
@@ -5174,10 +3941,6 @@
 				  <property name="yalign">0.5</property>
 				  <property name="xpad">0</property>
 				  <property name="ypad">0</property>
-				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				  <property name="width_chars">-1</property>
-				  <property name="single_line_mode">False</property>
-				  <property name="angle">0</property>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>
@@ -5275,10 +4038,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">0</property>
@@ -5303,10 +4062,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">0</property>
@@ -5331,10 +4086,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">0</property>
@@ -5359,10 +4110,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">0</property>
@@ -5387,10 +4134,6 @@
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">2</property>
@@ -5510,10 +4253,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="type">label_item</property>
@@ -5593,10 +4332,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="left_attach">0</property>
@@ -5621,10 +4356,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="left_attach">0</property>
@@ -5649,10 +4380,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="left_attach">0</property>
@@ -5677,10 +4404,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="left_attach">2</property>
@@ -5775,10 +4498,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="left_attach">0</property>
@@ -5803,10 +4522,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="left_attach">2</property>
@@ -5985,10 +4700,6 @@
 				  <property name="yalign">0.5</property>
 				  <property name="xpad">0</property>
 				  <property name="ypad">0</property>
-				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				  <property name="width_chars">-1</property>
-				  <property name="single_line_mode">False</property>
-				  <property name="angle">0</property>
 				</widget>
 				<packing>
 				  <property name="type">label_item</property>
@@ -6063,10 +4774,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">5</property>
 			      <property name="ypad">5</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
@@ -6088,8 +4795,6 @@
 Now + 1 Year
 Whole Loan
 Custom</property>
-				  <property name="add_tearoffs">False</property>
-				  <property name="focus_on_click">True</property>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>
@@ -6143,10 +4848,6 @@
 				  <property name="yalign">0.5</property>
 				  <property name="xpad">5</property>
 				  <property name="ypad">5</property>
-				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				  <property name="width_chars">-1</property>
-				  <property name="single_line_mode">False</property>
-				  <property name="angle">0</property>
 				</widget>
 				<packing>
 				  <property name="left_attach">0</property>
@@ -6171,10 +4872,6 @@
 				  <property name="yalign">0.5</property>
 				  <property name="xpad">5</property>
 				  <property name="ypad">5</property>
-				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				  <property name="width_chars">-1</property>
-				  <property name="single_line_mode">False</property>
-				  <property name="angle">0</property>
 				</widget>
 				<packing>
 				  <property name="left_attach">0</property>
@@ -6201,10 +4898,6 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="type">label_item</property>
@@ -6362,7 +5055,6 @@
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
 
   <child>
     <widget class="GtkTable" id="sx_prefs">
@@ -6387,10 +5079,6 @@
 	  <property name="yalign">0.5</property>
 	  <property name="xpad">0</property>
 	  <property name="ypad">0</property>
-	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	  <property name="width_chars">-1</property>
-	  <property name="single_line_mode">False</property>
-	  <property name="angle">0</property>
 	</widget>
 	<packing>
 	  <property name="left_attach">0</property>
@@ -6415,10 +5103,6 @@
 	  <property name="yalign">0.5</property>
 	  <property name="xpad">0</property>
 	  <property name="ypad">0</property>
-	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	  <property name="width_chars">-1</property>
-	  <property name="single_line_mode">False</property>
-	  <property name="angle">0</property>
 	</widget>
 	<packing>
 	  <property name="left_attach">0</property>
@@ -6443,10 +5127,6 @@
 	  <property name="yalign">0.5</property>
 	  <property name="xpad">0</property>
 	  <property name="ypad">0</property>
-	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	  <property name="width_chars">-1</property>
-	  <property name="single_line_mode">False</property>
-	  <property name="angle">0</property>
 	</widget>
 	<packing>
 	  <property name="left_attach">0</property>
@@ -6533,10 +5213,6 @@
 	      <property name="xpad">0</property>
 	      <property name="ypad">0</property>
 	      <property name="mnemonic_widget">gconf/dialogs/scheduled_trans/transaction_editor/create_days</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
 	    </widget>
 	  </child>
 	</widget>
@@ -6575,10 +5251,6 @@
 	      <property name="yalign">0.5</property>
 	      <property name="xpad">0</property>
 	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
 	    </widget>
 	  </child>
 	</widget>
@@ -6631,10 +5303,6 @@
 	      <property name="yalign">0.5</property>
 	      <property name="xpad">0</property>
 	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
 	    </widget>
 	    <packing>
 	      <property name="padding">0</property>
@@ -6692,10 +5360,6 @@
 	      <property name="yalign">0.5</property>
 	      <property name="xpad">0</property>
 	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
 	    </widget>
 	    <packing>
 	      <property name="padding">0</property>
@@ -6758,7 +5422,6 @@
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
   <property name="has_separator">True</property>
 
   <child internal-child="vbox">
@@ -6812,10 +5475,6 @@
 	      <property name="yalign">0.5</property>
 	      <property name="xpad">0</property>
 	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
 	    </widget>
 	    <packing>
 	      <property name="padding">0</property>
@@ -6840,9 +5499,6 @@
 		  <property name="rules_hint">False</property>
 		  <property name="reorderable">False</property>
 		  <property name="enable_search">False</property>
-		  <property name="fixed_height_mode">False</property>
-		  <property name="hover_selection">False</property>
-		  <property name="hover_expand">False</property>
 		</widget>
 	      </child>
 	    </widget>
@@ -6876,7 +5532,6 @@
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
 
   <child>
     <widget class="GtkVPaned" id="sx-list-vbox">
@@ -6903,10 +5558,6 @@
 	      <property name="yalign">0.5</property>
 	      <property name="xpad">0</property>
 	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
 	    </widget>
 	    <packing>
 	      <property name="padding">0</property>
@@ -6949,9 +5600,6 @@
 			  <property name="rules_hint">False</property>
 			  <property name="reorderable">True</property>
 			  <property name="enable_search">True</property>
-			  <property name="fixed_height_mode">False</property>
-			  <property name="hover_selection">False</property>
-			  <property name="hover_expand">False</property>
 			</widget>
 		      </child>
 		    </widget>
@@ -6996,10 +5644,6 @@
 	      <property name="yalign">0.5</property>
 	      <property name="xpad">0</property>
 	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
 	    </widget>
 	    <packing>
 	      <property name="padding">0</property>
@@ -7021,10 +5665,6 @@
 	      <property name="yalign">0.5</property>
 	      <property name="xpad">0</property>
 	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
 	    </widget>
 	    <packing>
 	      <property name="padding">0</property>
@@ -7088,7 +5728,6 @@
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
   <property name="has_separator">True</property>
 
   <child internal-child="vbox">
@@ -7167,9 +5806,6 @@
 		      <property name="rules_hint">False</property>
 		      <property name="reorderable">False</property>
 		      <property name="enable_search">True</property>
-		      <property name="fixed_height_mode">False</property>
-		      <property name="hover_selection">False</property>
-		      <property name="hover_expand">False</property>
 		    </widget>
 		  </child>
 		</widget>

Modified: gnucash/trunk/src/gnome-utils/gnc-frequency.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-frequency.c	2007-02-18 17:28:44 UTC (rev 15600)
+++ gnucash/trunk/src/gnome-utils/gnc-frequency.c	2007-02-18 17:39:54 UTC (rev 15601)
@@ -46,8 +46,8 @@
 /** Private Defs ********************/
 
 typedef enum {
-  GNCFREQ_CHANGED,
-  LAST_SIGNAL
+    GNCFREQ_CHANGED,
+    LAST_SIGNAL
 } GNCF_Signals;
 
 static guint gnc_frequency_signals[LAST_SIGNAL] = { 0 };
@@ -80,31 +80,36 @@
 
 /** Static Inits ********************/
 
-static const struct pageDataTuple PAGES[] = {
-        {  0, UIFREQ_NONE,         "None" },
-        {  1, UIFREQ_ONCE,         "Once" },
-        {  2, UIFREQ_DAILY,        "Daily" },
-        {  3, UIFREQ_DAILY_MF,     "Daily [M-F]" },
-        {  4, UIFREQ_WEEKLY,       "Weekly" },
-        {  5, UIFREQ_BI_WEEKLY,    "Bi-Weekly" },
-        {  6, UIFREQ_SEMI_MONTHLY, "Semi-Monthly" },
-        {  7, UIFREQ_MONTHLY,      "Monthly" },
-        {  8, UIFREQ_QUARTERLY,    "Quarterly" },
-        {  9, UIFREQ_TRI_ANUALLY,  "Tri-Anually" },
-        { 10, UIFREQ_SEMI_YEARLY,  "Semi-Yearly" },
-        { 11, UIFREQ_YEARLY,       "Yearly" },
-        { 0, 0, 0 }
+enum
+{
+    PAGE_NONE = 0,
+    PAGE_ONCE,
+    PAGE_DAILY,
+    PAGE_WEEKLY,
+    PAGE_SEMI_MONTHLY,
+    PAGE_MONTHLY
 };
 
+static const struct pageDataTuple PAGES[] =
+{
+    { PAGE_NONE,         UIFREQ_NONE,         "None" },
+    { PAGE_ONCE,         UIFREQ_ONCE,         "Once" },
+    { PAGE_DAILY,        UIFREQ_DAILY,        "Daily" },
+    { PAGE_WEEKLY,       UIFREQ_WEEKLY,       "Weekly" },
+    { PAGE_SEMI_MONTHLY, UIFREQ_SEMI_MONTHLY, "Semi-Monthly" },
+    { PAGE_MONTHLY,      UIFREQ_MONTHLY,      "Monthly" },
+    { 0, 0, 0 }
+};
+
 static const char *CHECKBOX_NAMES[] = {
-        "wd_check_sun",
-        "wd_check_mon",
-        "wd_check_tue",
-        "wd_check_wed",
-        "wd_check_thu",
-        "wd_check_fri",
-        "wd_check_sat",
-        NULL
+    "wd_check_sun",
+    "wd_check_mon",
+    "wd_check_tue",
+    "wd_check_wed",
+    "wd_check_thu",
+    "wd_check_fri",
+    "wd_check_sat",
+    NULL
 };
 
 /** Implementations ********************/
@@ -112,145 +117,132 @@
 GType
 gnc_frequency_get_type()
 {
-     static GType gncfreq_type = 0;
-     if (gncfreq_type == 0) {
-          static GTypeInfo gncfreq_info = {
-               sizeof(GncFrequencyClass),
-               NULL,
-               NULL,
-               (GClassInitFunc)gnc_frequency_class_init,
-               NULL,
-               NULL,
-               sizeof(GncFrequency),
-               0,
-               (GInstanceInitFunc)gnc_frequency_init
-          };
+    static GType gncfreq_type = 0;
+    if (gncfreq_type == 0) {
+        static GTypeInfo gncfreq_info = {
+            sizeof(GncFrequencyClass),
+            NULL,
+            NULL,
+            (GClassInitFunc)gnc_frequency_class_init,
+            NULL,
+            NULL,
+            sizeof(GncFrequency),
+            0,
+            (GInstanceInitFunc)gnc_frequency_init
+        };
                 
-          gncfreq_type = g_type_register_static (GTK_TYPE_VBOX,
-                                                 "GncFrequency",
-                                                 &gncfreq_info, 0);
-     }
+        gncfreq_type = g_type_register_static (GTK_TYPE_VBOX,
+                                               "GncFrequency",
+                                               &gncfreq_info, 0);
+    }
 
-     return gncfreq_type;
+    return gncfreq_type;
 }
 
 static void
 gnc_frequency_class_init( GncFrequencyClass *klass )
 {
-        GObjectClass *object_class;
+    GObjectClass *object_class;
         
-        object_class = G_OBJECT_CLASS (klass);
+    object_class = G_OBJECT_CLASS (klass);
 
     gnc_frequency_signals[GNCFREQ_CHANGED] =
-         g_signal_new ("changed",
-                       G_OBJECT_CLASS_TYPE (object_class),
-                       G_SIGNAL_RUN_FIRST,
-                       G_STRUCT_OFFSET (GncFrequencyClass, changed),
-                       NULL,
-                       NULL,
-                       g_cclosure_marshal_VOID__VOID,
-                       G_TYPE_NONE,
-                       0);
+        g_signal_new ("changed",
+                      G_OBJECT_CLASS_TYPE (object_class),
+                      G_SIGNAL_RUN_FIRST,
+                      G_STRUCT_OFFSET (GncFrequencyClass, changed),
+                      NULL,
+                      NULL,
+                      g_cclosure_marshal_VOID__VOID,
+                      G_TYPE_NONE,
+                      0);
 }
 
 void
 gnc_frequency_init(GncFrequency *gf)
 {
-        int    i;
-        GtkVBox  *vb;
-        GtkWidget   *o;
-        GtkAdjustment  *adj;
+    int    i;
+    GtkVBox  *vb;
+    GtkWidget   *o;
+    GtkAdjustment  *adj;
 
-        static const struct comboBoxTuple {
-                char *name;
-                void (*fn)();
-        } comboBoxes[] = {
-                { "freq_combobox",      freq_combo_changed },
-                { "semimonthly_first",  semimonthly_sel_changed },
-                { "semimonthly_second", semimonthly_sel_changed },
-                { "monthly_day",        monthly_sel_changed },
-                { "quarterly_occur",    quarterly_sel_changed },
-                { "quarterly_day",      quarterly_sel_changed },
-                { "triyearly_occur",    triyearly_sel_changed },
-                { "triyearly_day",      triyearly_sel_changed },
-                { "semiyearly_occur",   semiyearly_sel_changed },
-                { "semiyearly_day",     semiyearly_sel_changed },
-                { "yearly_month",       yearly_sel_changed },
-                { "yearly_day",         yearly_sel_changed },
-                { NULL,                 NULL }
-        };
+    static const struct comboBoxTuple {
+        char *name;
+        void (*fn)();
+    } comboBoxes[] = {
+        { "freq_combobox",      freq_combo_changed },
+        { "semimonthly_first",  semimonthly_sel_changed },
+        { "semimonthly_second", semimonthly_sel_changed },
+        { "monthly_day",        monthly_sel_changed },
+        { NULL,                 NULL }
+    };
 
-        static const struct spinvalTuple {
-                char *name;
-                void (*fn)();
-        } spinVals[] = {
-                { "daily_spin",       spin_changed_helper },
-                { "dailymf_spin",     spin_changed_helper },
-                { "weekly_spin",      spin_changed_helper },
-                { "semimonthly_spin", spin_changed_helper },
-                { "monthly_spin",     spin_changed_helper },
-                { "yearly_spin",      spin_changed_helper },
-                { NULL,               NULL }
-        };
+    static const struct spinvalTuple {
+        char *name;
+        void (*fn)();
+    } spinVals[] = {
+        { "daily_spin",       spin_changed_helper },
+        { "weekly_spin",      spin_changed_helper },
+        { "semimonthly_spin", spin_changed_helper },
+        { "monthly_spin",     spin_changed_helper },
+        { NULL,               NULL }
+    };
 
-        gf->gxml = gnc_glade_xml_new( "sched-xact.glade", "gncfreq_vbox" );
-        o = glade_xml_get_widget( gf->gxml, "gncfreq_nb" );
-        gf->nb = GTK_NOTEBOOK(o);
-        o = glade_xml_get_widget( gf->gxml, "freq_combobox" );
-        gf->freqComboBox = GTK_COMBO_BOX(o);
-        gf->startDate = GNC_DATE_EDIT(gnc_date_edit_new( time(NULL), FALSE, FALSE ));
-        /* Add the new widget to the table. */
+    gf->gxml = gnc_glade_xml_new("sched-xact.glade", "gncfreq_vbox");
+    o = glade_xml_get_widget(gf->gxml, "gncfreq_nb");
+    gf->nb = GTK_NOTEBOOK(o);
+    o = glade_xml_get_widget(gf->gxml, "freq_combobox");
+    gf->freqComboBox = GTK_COMBO_BOX(o);
+    gf->startDate = GNC_DATE_EDIT(gnc_date_edit_new(time(NULL), FALSE, FALSE));
+    /* Add the new widget to the table. */
+    {
+        GtkWidget *table = glade_xml_get_widget(gf->gxml, "gncfreq_table");
+        gtk_table_attach(GTK_TABLE(table), GTK_WIDGET(gf->startDate),
+                         1, 2, 1, 2, (GTK_EXPAND | GTK_FILL), 0,
+                         0, 0);
+    }
+    vb = GTK_VBOX(glade_xml_get_widget(gf->gxml, "gncfreq_vbox"));
+    gf->vb = vb;
+    gtk_container_add(GTK_CONTAINER(&gf->widget), GTK_WIDGET(gf->vb));
+
+    /* initialize the combo boxes */
+    for (i=0; comboBoxes[i].name != NULL; i++)
+    {
+        o = glade_xml_get_widget(gf->gxml, comboBoxes[i].name);
+        gtk_combo_box_set_active(GTK_COMBO_BOX(o), 0);
+        if (comboBoxes[i].fn != NULL)
         {
-                GtkWidget *table = glade_xml_get_widget( gf->gxml, "gncfreq_table" );
-                gtk_table_attach( GTK_TABLE(table), GTK_WIDGET(gf->startDate),
-                                  1, 2, 1, 2,
-                                  ( GTK_EXPAND | GTK_FILL ), 0,
-                                  0, 0 );
+            g_signal_connect(o, "changed", G_CALLBACK(comboBoxes[i].fn), gf);
         }
-        vb = GTK_VBOX( glade_xml_get_widget( gf->gxml, "gncfreq_vbox" ) );
-        gf->vb = vb;
-        gtk_container_add( GTK_CONTAINER(&gf->widget), GTK_WIDGET(gf->vb) );
+    }
 
-        /* initialize the combo boxes */
-        for ( i=0; comboBoxes[i].name != NULL; i++ ) {
-                o = glade_xml_get_widget( gf->gxml, comboBoxes[i].name );
-                gtk_combo_box_set_active(GTK_COMBO_BOX(o), 0);
-                if ( comboBoxes[i].fn != NULL ) {
-                        g_signal_connect( o, "changed",
-                                          G_CALLBACK(comboBoxes[i].fn), gf );
-                }
-        }
-
-        /* initialize the spin buttons */
-        for ( i=0; spinVals[i].name != NULL; i++ ) 
+    /* initialize the spin buttons */
+    for (i=0; spinVals[i].name != NULL; i++)
+    {
+        if (spinVals[i].fn != NULL) 
         {
-                if ( spinVals[i].fn != NULL ) 
-                {
-                        o = glade_xml_get_widget( gf->gxml,
-                                          spinVals[i].name );
-                        adj = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON(o) );
-                        g_signal_connect( adj, "value_changed",
-                                          G_CALLBACK(spinVals[i].fn), gf );
-                }
+            o = glade_xml_get_widget(gf->gxml, spinVals[i].name);
+            adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(o));
+            g_signal_connect(adj, "value_changed", G_CALLBACK(spinVals[i].fn), gf);
         }
+    }
 
-        /* initialize the weekly::day-of-week checkbox-selection hooks */
-        for ( i=0; i<7; i++ ) {
-                o = glade_xml_get_widget( gf->gxml, CHECKBOX_NAMES[i] );
-                g_signal_connect( o, "clicked",
-                                  G_CALLBACK(weekly_days_changed), gf );
-        }
+    /* initialize the weekly::day-of-week checkbox-selection hooks */
+    for (i=0; i < 7; i++)
+    {
+        o = glade_xml_get_widget(gf->gxml, CHECKBOX_NAMES[i]);
+        g_signal_connect(o, "clicked",
+                          G_CALLBACK(weekly_days_changed), gf);
+    }
 
-        gtk_widget_show_all( GTK_WIDGET(&gf->widget) );
+    gtk_widget_show_all(GTK_WIDGET(&gf->widget));
 
-        /* respond to start date changes */
-        g_signal_connect( gf->startDate, "date_changed",
-                          G_CALLBACK(start_date_changed), gf );
-
+    /* respond to start date changes */
+    g_signal_connect(gf->startDate, "date_changed", G_CALLBACK(start_date_changed), gf);
 }
 
 static void
-do_frequency_setup( GncFrequency *gf, FreqSpec *fs, time_t *secs)
+do_frequency_setup(GncFrequency *gf, FreqSpec *fs, time_t *secs)
 {
         UIFreqType uift;
         int i, page;
@@ -269,6 +261,7 @@
          * don't change any other settings.  */
         if (NULL == fs) return;
 
+#if 0        
         uift = xaccFreqSpecGetUIType( fs );
         page = -1;
         for ( i=0; i < UIFREQ_NUM_UI_FREQSPECS+1; i++ ) 
@@ -283,6 +276,7 @@
 
         gtk_notebook_set_current_page( gf->nb, page );
         gtk_combo_box_set_active( gf->freqComboBox, page );
+#endif // 0
 
         switch ( uift ) 
         {
@@ -300,6 +294,9 @@
                 }
                 g_date_to_struct_tm( &theDate, &stm );
                 gnc_date_edit_set_time( gf->startDate, mktime(&stm) );
+
+                gtk_notebook_set_current_page( gf->nb, PAGE_ONCE);
+                gtk_combo_box_set_active( gf->freqComboBox, PAGE_ONCE);
         }
         break;
         case UIFREQ_DAILY:
@@ -313,32 +310,14 @@
                 }
                 o = glade_xml_get_widget( gf->gxml, "daily_spin" );
                 gtk_spin_button_set_value( GTK_SPIN_BUTTON( o ), dailyMult );
+
+                gtk_notebook_set_current_page( gf->nb, PAGE_DAILY);
+                gtk_combo_box_set_active( gf->freqComboBox, PAGE_DAILY);
         }
         break;
         case UIFREQ_DAILY_MF:
-        {
-                GtkWidget *o;
-                GList *fsList;
-                FreqSpec *subFS;
-                int weekMult, dayOfWeek;
-
-                /*  set the mult */
-                fsList = xaccFreqSpecCompositeGet( fs );
-                if ( g_list_length( fsList ) != 5 ) {
-                     g_warning("Invalid Daily[M-F] FreqSpec");
-                     return;
-                }
-                subFS = (FreqSpec*)fsList->data;
-                if ( xaccFreqSpecGetWeekly( subFS, &weekMult, &dayOfWeek ) < 0 ) {
-                     g_warning("Inappropriate FreqSpec type [gnc-frequency: %d vs. FreqSpec: %d]",
-                               uift, xaccFreqSpecGetUIType( fs ) );
-                     return;
-                }
-                o = glade_xml_get_widget( gf->gxml, "dailymf_spin" );
-                gtk_spin_button_set_value( GTK_SPIN_BUTTON(o), weekMult );
-        }
-        break;
         case UIFREQ_WEEKLY:
+        case UIFREQ_BI_WEEKLY:
         {
                 const char * str;
                 int weeklyMult = -1;
@@ -391,12 +370,14 @@
                         gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(o), TRUE );
                 }
                 o = glade_xml_get_widget( gf->gxml, "weekly_spin" );
+                if (uift == UIFREQ_BI_WEEKLY)
+                    weeklyMult = 2;
                 gtk_spin_button_set_value( GTK_SPIN_BUTTON(o), weeklyMult );
+
+                gtk_notebook_set_current_page( gf->nb, PAGE_WEEKLY);
+                gtk_combo_box_set_active( gf->freqComboBox, PAGE_WEEKLY);
         }
         break;
-        case UIFREQ_BI_WEEKLY:
-                /*  set the initial date...? */
-                break;
         case UIFREQ_SEMI_MONTHLY:
         {
                 GtkWidget *o;
@@ -428,9 +409,16 @@
                      return;
                 }
                 gtk_combo_box_set_active( GTK_COMBO_BOX(o), secondDayOfMonth-1 );
+
+                gtk_notebook_set_current_page( gf->nb, PAGE_SEMI_MONTHLY);
+                gtk_combo_box_set_active( gf->freqComboBox, PAGE_SEMI_MONTHLY);
         }
         break;
         case UIFREQ_MONTHLY:
+        case UIFREQ_QUARTERLY:
+        case UIFREQ_TRI_ANUALLY:
+        case UIFREQ_SEMI_YEARLY:
+        case UIFREQ_YEARLY:
         {
                 GtkWidget *o;
                 int monthlyMult, dayOfMonth, monthOffset;
@@ -446,97 +434,11 @@
                 o = glade_xml_get_widget( gf->gxml, "monthly_day" );
                 gtk_combo_box_set_active( GTK_COMBO_BOX(o), dayOfMonth-1 );
                 /*  set the day-of-month */
-        }
-        break;
-        case UIFREQ_QUARTERLY:
-        {
-                int monthlyMult, dayOfMonth, monthOffset;
 
-                if ( xaccFreqSpecGetMonthly( fs, &monthlyMult,
-                                             &dayOfMonth, &monthOffset ) < 0 ) {
-                     g_warning("Inappropriate FreqSpec type [gnc-frequency: %d, FreqSpec: %d]",
-                               uift, xaccFreqSpecGetUIType( fs ) );
-                     return;
-                }
-                if ( monthlyMult != 3 ) {
-                     g_warning("monthly multiplier != 3 [=%d]", monthlyMult);
-                     return;
-                }
-                year_range_menu_helper( glade_xml_get_widget( gf->gxml,
-                                                              "quarterly_day" ),
-                                        glade_xml_get_widget( gf->gxml,
-                                                              "quarterly_occur" ),
-                                        3, gnc_date_edit_get_date( gf->startDate ) );
+                gtk_notebook_set_current_page( gf->nb, PAGE_MONTHLY);
+                gtk_combo_box_set_active( gf->freqComboBox, PAGE_MONTHLY);
         }
         break;
-        case UIFREQ_TRI_ANUALLY:
-        {
-                int monthlyMult, dayOfMonth, monthOffset;
-
-                if ( xaccFreqSpecGetMonthly( fs, &monthlyMult,
-                                             &dayOfMonth, &monthOffset ) < 0 ) {
-                     g_warning("Inappropriate FreqSpec type [gnc-frequency: %d, FreqSpec: %d]",
-                               uift, xaccFreqSpecGetUIType( fs ) );
-                     return;
-                }
-                if ( monthlyMult != 4 ) {
-                     g_warning("Month-multiplier != 4 [=%d]", monthlyMult);
-                     return;
-                }
-                year_range_menu_helper( glade_xml_get_widget( gf->gxml,
-                                                              "triyearly_day" ),
-                                        glade_xml_get_widget( gf->gxml,
-                                                              "triyearly_occur" ),
-                                        4, gnc_date_edit_get_date( gf->startDate ) );
-        }
-        break;
-        case UIFREQ_SEMI_YEARLY:
-        {
-                int monthlyMult, dayOfMonth, monthOffset;
-
-                if ( xaccFreqSpecGetMonthly( fs, &monthlyMult,
-                                             &dayOfMonth, &monthOffset ) < 0 ) {
-                     g_warning("Inappropriate FreqSpec type [gnc-frequency: %d, FreqSpec: %d]",
-                               uift, xaccFreqSpecGetUIType( fs ) );
-                     return;
-                }
-                if ( monthlyMult != 6 ) {
-                     g_warning( "month-mult != 6 [=%d]", monthlyMult );
-                     return;
-                }
-                year_range_menu_helper( glade_xml_get_widget( gf->gxml,
-                                                              "semiyearly_day" ),
-                                        glade_xml_get_widget( gf->gxml,
-                                                              "semiyearly_occur" ),
-                                        6, gnc_date_edit_get_date( gf->startDate ) );
-        }
-        break;
-        case UIFREQ_YEARLY:
-        {
-                GtkWidget *o;
-                int monthlyMult, dayOfMonth, monthOffset;
-
-                if ( xaccFreqSpecGetMonthly( fs, &monthlyMult,
-                                             &dayOfMonth, &monthOffset ) < 0 ) {
-                     g_warning("Inappropriate FreqSpec type [gnc-frequency: %d, FreqSpec: %d]",
-                               uift, xaccFreqSpecGetUIType( fs ) );
-                     return;
-                }
-                if ( (monthlyMult % 12) != 0) {
-                     g_warning( "monthly-mult %% 12 != 0 [=%d]", ( monthlyMult % 12 ) );
-                     return;
-                }
-
-                /* set the mult */
-                o = glade_xml_get_widget( gf->gxml, "yearly_spin" );
-                gtk_spin_button_set_value( GTK_SPIN_BUTTON(o),
-                                           (int)rint(floor(monthlyMult / 12)) );
-                o = glade_xml_get_widget( gf->gxml, "yearly_month" );
-                gtk_combo_box_set_active( GTK_COMBO_BOX(o), monthOffset );
-                o = glade_xml_get_widget( gf->gxml, "yearly_day" );
-                gtk_combo_box_set_active( GTK_COMBO_BOX(o), dayOfMonth-1 );
-        }
-        break;
         default:
              g_critical( "unknown ui freq type %d", uift);
              break;
@@ -545,66 +447,66 @@
         g_signal_emit_by_name( gf, "changed" );
 }
 
-void
+static void
 gnc_frequency_setup_default( GncFrequency *gf, FreqSpec *fs, GDate *date )
 {
-   time_t secs;
+    time_t secs;
 
-   /* If no freq-spec, then set the widget to blank */
-   if (NULL == fs)
-   {
-      UIFreqType uift = UIFREQ_NONE;
-      int i, page;
+    /* If no freq-spec, then set the widget to blank */
+    if (NULL == fs)
+    {
+        UIFreqType uift = UIFREQ_NONE;
+        int i, page;
 
-      page = -1;
-      for ( i=0; i < UIFREQ_NUM_UI_FREQSPECS+1; i++ ) 
-      {
-         if ( PAGES[i].uiFTVal == uift ) 
-         {
-             page = PAGES[i].idx;
-             break;
-         }
-      }
-      g_assert( page != -1 );
+        page = -1;
+        for ( i=0; i < UIFREQ_NUM_UI_FREQSPECS+1; i++ ) 
+        {
+            if ( PAGES[i].uiFTVal == uift ) 
+            {
+                page = PAGES[i].idx;
+                break;
+            }
+        }
+        g_assert( page != -1 );
    
-      gtk_notebook_set_current_page( gf->nb, page );
-      gtk_combo_box_set_active( gf->freqComboBox, page );
-   }
+        gtk_notebook_set_current_page( gf->nb, page );
+        gtk_combo_box_set_active( gf->freqComboBox, page );
+    }
 
-   /* Setup the start date */
-   if (!date ||  ! g_date_valid(date) ) 
-   {
-      secs = time(NULL);
-   } 
-   else 
-   {
-      struct tm stm;
-      g_date_to_struct_tm( date, &stm);
-      secs = mktime (&stm);
-   }
+    /* Setup the start date */
+    if (!date ||  ! g_date_valid(date) ) 
+    {
+        secs = time(NULL);
+    } 
+    else 
+    {
+        struct tm stm;
+        g_date_to_struct_tm( date, &stm);
+        secs = mktime (&stm);
+    }
  
-   do_frequency_setup(gf, fs, &secs);
+    do_frequency_setup(gf, fs, &secs);
 }
 
 void
 gnc_frequency_setup( GncFrequency *gf, FreqSpec *fs, GDate *date )
 {
-   time_t secs;
+    time_t secs;
 
-   if (!gf) return;
+    if (!gf) return;
 
-   /* Setup the start date */
-   if (!date ||  ! g_date_valid(date) ) 
-   {
-      do_frequency_setup(gf, fs, NULL);
-   } 
-   else 
-   {
-      struct tm stm;
-      g_date_to_struct_tm( date, &stm);
-      secs = mktime (&stm);
-      do_frequency_setup(gf, fs, &secs);
-   }
+    /* Setup the start date */
+    if (!date || !g_date_valid(date)) 
+    {
+        do_frequency_setup(gf, fs, NULL);
+    } 
+    else 
+    {
+        struct tm stm;
+        g_date_to_struct_tm( date, &stm);
+        secs = mktime (&stm);
+        do_frequency_setup(gf, fs, &secs);
+    }
 }
 
 GtkWidget *
@@ -671,31 +573,6 @@
                         xaccFreqSpecSetUIType( fs, uift );
                 }
                 break;
-        case UIFREQ_DAILY_MF:
-                xaccFreqSpecSetComposite( fs );
-                xaccFreqSpecSetUIType( fs, uift );
-                o = glade_xml_get_widget( gf->gxml, "dailymf_spin" );
-                tmpInt = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(o) );
-                /*  Okay.  Assume that the calendar is upgraded to */
-                /*  support selecting weeks, returning the Sunday selected. */
-                /*  Normalize to sunday. */
-                {
-                        struct tm stm;
-                        g_date_to_struct_tm( &gd, &stm );
-                        /*  month-day += (week-day - current-week-day ) % 7 */
-                        /*  week-day <- 0 */
-                        stm.tm_mday -= ( stm.tm_wday ) % 7;
-                        g_date_set_time_t( &gd, mktime(&stm) );
-                }
-
-                /*  1 == "mon", 5 == "fri" */
-                for ( i=1; i<6; i++ ) {
-                        g_date_add_days( &gd, 1 );
-                        tmpFS = xaccFreqSpecMalloc(gnc_get_current_book ());
-                        xaccFreqSpecSetWeekly( tmpFS, &gd, tmpInt );
-                        xaccFreqSpecCompositeAdd( fs, tmpFS );
-                }
-                break;
         case UIFREQ_WEEKLY:
         {
                 struct tm stm;
@@ -730,11 +607,6 @@
                 }
                 break;
         }
-        case UIFREQ_BI_WEEKLY:
-                xaccFreqSpecSetUIType( fs, uift );
-                o = glade_xml_get_widget( gf->gxml, "biweekly_cal" );
-                xaccFreqSpecSetWeekly( fs, &gd, 2 );
-                break;
         case UIFREQ_SEMI_MONTHLY:
         {
                 struct tm stm;
@@ -747,6 +619,11 @@
 
                 o = glade_xml_get_widget( gf->gxml, "semimonthly_first" );
                 day = gtk_combo_box_get_active( GTK_COMBO_BOX(o) )+1;
+                if (day > 30)
+                {
+                    g_critical("freq spec doesn't support last-day-of-month");
+                    break;
+                }
                 tmpFS = xaccFreqSpecMalloc(gnc_get_current_book ());
                 g_date_to_struct_tm( &gd, &stm);
                 if ( day >= stm.tm_mday ) {
@@ -761,6 +638,11 @@
 
                 o = glade_xml_get_widget( gf->gxml, "semimonthly_second" );
                 day = gtk_combo_box_get_active( GTK_COMBO_BOX(o) )+1;
+                if (day > 30)
+                {
+                    g_critical("freq spec doesn't support last-day-of-month");
+                    break;
+                }
                 tmpFS = xaccFreqSpecMalloc(gnc_get_current_book ());
                 start_tt = gnc_date_edit_get_date( gf->startDate );
                 g_date_set_time_t( &gd, start_tt );
@@ -784,6 +666,10 @@
 
                 o = glade_xml_get_widget( gf->gxml, "monthly_day" );
                 day = gtk_combo_box_get_active( GTK_COMBO_BOX(o) ) + 1;
+                if (day > 30)
+                {
+                    g_critical("freq spec doesn't support last-day-of-month");
+                }
                 g_date_set_time_t(&gd, time(NULL));
                 g_date_set_month(&gd, 1);
                 g_date_set_day(&gd, day);
@@ -796,24 +682,6 @@
                 xaccFreqSpecSetUIType( fs, uift );
                 break;
         }
-        case UIFREQ_QUARTERLY:
-                xaccFreqSpecSetMonthly( fs, &gd, 3 );
-                xaccFreqSpecSetUIType( fs, uift );
-                break;
-        case UIFREQ_TRI_ANUALLY:
-                xaccFreqSpecSetMonthly( fs, &gd, 4 );
-                xaccFreqSpecSetUIType( fs, uift );
-                break;
-        case UIFREQ_SEMI_YEARLY:
-                xaccFreqSpecSetMonthly( fs, &gd, 6 );
-                xaccFreqSpecSetUIType( fs, uift );
-                break;
-        case UIFREQ_YEARLY:
-                o = glade_xml_get_widget( gf->gxml, "yearly_spin" );
-                tmpInt = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(o) );
-                xaccFreqSpecSetMonthly( fs, &gd, tmpInt * 12 );
-                xaccFreqSpecSetUIType( fs, uift );
-                break;
         default:
              g_critical("Unknown UIFreqType %d", uift);
              break;
@@ -898,94 +766,6 @@
         g_signal_emit_by_name( gf, "changed" );
 }
 
-static void
-quarterly_sel_changed( GtkButton *b, gpointer d )
-{
-        GncFrequency *gf;
-        gf = (GncFrequency*)d;
-        year_range_sels_changed( gf, 3,
-                                 glade_xml_get_widget( gf->gxml, "quarterly_occur" ),
-                                 glade_xml_get_widget( gf->gxml, "quarterly_day" ) );
-}
-
-static void
-triyearly_sel_changed( GtkButton *b, gpointer d )
-{
-        GncFrequency *gf;
-        gf = (GncFrequency*)d;
-        year_range_sels_changed( gf, 4,
-                                 glade_xml_get_widget( gf->gxml, "triyearly_occur" ),
-                                 glade_xml_get_widget( gf->gxml, "triyearly_day" ) );
-}
-
-static void
-semiyearly_sel_changed( GtkButton *b, gpointer d )
-{
-        GncFrequency *gf;
-        gf = (GncFrequency*)d;
-        year_range_sels_changed( gf, 6,
-                                 glade_xml_get_widget( gf->gxml, "semiyearly_occur" ),
-                                 glade_xml_get_widget( gf->gxml, "semiyearly_day" ) );
-}
-
-static void
-year_range_sels_changed( GncFrequency *gf,
-                         int monthsInRange,
-                         GtkWidget *occurW,
-                         GtkWidget *dayOfMonthW )
-{
-        int occur, day;
-        time_t tmpTT;
-        struct tm *tmpTm;
-
-        occur = gtk_combo_box_get_active( GTK_COMBO_BOX(occurW) );
-        day = gtk_combo_box_get_active( GTK_COMBO_BOX(dayOfMonthW) ) + 1;
-
-        tmpTT = gnc_date_edit_get_date( gf->startDate );
-        tmpTm = localtime( &tmpTT );
-        tmpTm->tm_mday = day;
-        // jump the month to the closest appropriate month.
-        // FIXME: this could probably be made more "appropriate".
-        tmpTm->tm_mon += occur - (tmpTm->tm_mon % monthsInRange);
-        tmpTT = mktime( tmpTm );
-        gnc_date_edit_set_time( gf->startDate, tmpTT );
-
-        g_signal_emit_by_name( gf, "changed" );
-}
-
-static void
-yearly_sel_changed( GtkButton *b, gpointer d )
-{
-        GncFrequency  *gf;
-        GtkWidget  *o;
-        time_t    tmptt;
-        struct tm  *tmptm;
-
-        gf = (GncFrequency*)d;
-
-        tmptt = gnc_date_edit_get_date( gf->startDate );
-        tmptm = localtime( &tmptt );
-
-        o = glade_xml_get_widget( gf->gxml, "yearly_month" );
-        tmptm->tm_mon = gtk_combo_box_get_active( GTK_COMBO_BOX(o) );
-        o = glade_xml_get_widget( gf->gxml, "yearly_day" );
-        tmptm->tm_mday = gtk_combo_box_get_active( GTK_COMBO_BOX(o) )+1;
-
-        /* FIXME: correct for
-           option_menu_selected_day > minn(31,correct_days_in_month)
-           problem */
-        while ( ! g_date_valid_dmy( tmptm->tm_mday,
-                                    tmptm->tm_mon+1,
-                                    tmptm->tm_year+1900 ) ) {
-                tmptm->tm_mday -= 1;
-        }
-
-        tmptt = mktime( tmptm );
-        gnc_date_edit_set_time( gf->startDate, tmptt );
-
-        g_signal_emit_by_name( gf, "changed" );
-}
-
 static inline guint32 minn( guint32 a, guint32 b )
 {
         return a > b ? b : a;
@@ -1038,33 +818,6 @@
                 gtk_combo_box_set_active( GTK_COMBO_BOX(o),
                                           tmpTm->tm_mday - 1 );
                 break;
-        case UIFREQ_QUARTERLY:
-                /* on the <startdate_dom> */
-                o = glade_xml_get_widget( gf->gxml, "quarterly_day" );
-                gtk_combo_box_set_active( GTK_COMBO_BOX(o),
-                                          tmpTm->tm_mday - 1 );
-                break;
-        case UIFREQ_TRI_ANUALLY:
-                /* on the <startdate_dom> */
-                o = glade_xml_get_widget( gf->gxml, "triyearly_day" );
-                gtk_combo_box_set_active( GTK_COMBO_BOX(o),
-                                          tmpTm->tm_mday - 1 );
-                break;
-        case UIFREQ_SEMI_YEARLY:
-                /* on the <startdate_dom> */
-                o = glade_xml_get_widget( gf->gxml, "semiyearly_day" );
-                gtk_combo_box_set_active( GTK_COMBO_BOX(o),
-                                          tmpTm->tm_mday - 1 );
-                break;
-        case UIFREQ_YEARLY:
-                /* on the <startdate_mon>, <startdate_dom> */
-                o = glade_xml_get_widget( gf->gxml, "yearly_month" );
-                gtk_combo_box_set_active( GTK_COMBO_BOX(o),
-                                          tmpTm->tm_mon );
-                o = glade_xml_get_widget( gf->gxml, "yearly_day" );
-                gtk_combo_box_set_active( GTK_COMBO_BOX(o),
-                                          tmpTm->tm_mday - 1 );
-                break;
         default:
                 /* nuttin can be done, for whatever reason. */
                 break;
@@ -1073,20 +826,6 @@
 }
 
 static void
-year_range_menu_helper( GtkWidget *dayOptMenu,
-                        GtkWidget *occurOptMenu,
-                        gint monthsInRange,
-                        time_t startDate )
-{
-        struct tm  *tmpTm;
-        tmpTm = localtime( &startDate );
-        gtk_combo_box_set_active( GTK_COMBO_BOX(occurOptMenu),
-                                  tmpTm->tm_mon % monthsInRange );
-        gtk_combo_box_set_active( GTK_COMBO_BOX(dayOptMenu),
-                                   tmpTm->tm_mday - 1 );
-}
-
-static void
 start_date_changed( GNCDateEdit *gde, gpointer d )
 {
         GncFrequency  *gf;
@@ -1108,9 +847,7 @@
         switch (uift) {
         case UIFREQ_ONCE:      /* FALLTHROUGH */
         case UIFREQ_DAILY:     /* FALLTHROUGH */
-        case UIFREQ_DAILY_MF:  /* FALLTHROUGH */
         case UIFREQ_WEEKLY:    /* FALLTHROUGH */
-        case UIFREQ_BI_WEEKLY:
                 break;
 
         case UIFREQ_SEMI_MONTHLY:
@@ -1136,36 +873,6 @@
                 gtk_combo_box_set_active( GTK_COMBO_BOX(o),
                                              (tmpTm->tm_mday-1) );
                 break;
-        case UIFREQ_QUARTERLY:
-                year_range_menu_helper( glade_xml_get_widget(
-                                                gf->gxml, "quarterly_day" ),
-                                        glade_xml_get_widget(
-                                                gf->gxml, "quarterly_occur" ),
-                                        3, dateFromGDE );
-                break;
-        case UIFREQ_TRI_ANUALLY:
-                year_range_menu_helper( glade_xml_get_widget(
-                                                gf->gxml, "triyearly_day" ),
-                                        glade_xml_get_widget(
-                                                gf->gxml, "triyearly_occur" ),
-                                        4, dateFromGDE );
-                break;
-        case UIFREQ_SEMI_YEARLY:
-                year_range_menu_helper( glade_xml_get_widget(
-                                                gf->gxml, "semiyearly_day" ),
-                                        glade_xml_get_widget(
-                                                gf->gxml, "semiyearly_occur" ),
-                                        6, dateFromGDE );
-                break;
-        case UIFREQ_YEARLY:
-                o = glade_xml_get_widget( gf->gxml, "yearly_month" );
-                tmpTm = localtime( &dateFromGDE );
-                gtk_combo_box_set_active( GTK_COMBO_BOX(o),
-                                          tmpTm->tm_mon );
-                o = glade_xml_get_widget( gf->gxml, "yearly_day" );
-                gtk_combo_box_set_active( GTK_COMBO_BOX(o),
-                                          tmpTm->tm_mday-1 );
-                break;
         default:
              g_critical("unknown uift value %d", uift);
              break;
@@ -1177,21 +884,346 @@
 /* Relabel some of the labels */
 
 void 
-gnc_frequency_set_frequency_label_text (GncFrequency *gf, const gchar *txt)
+gnc_frequency_set_frequency_label_text(GncFrequency *gf, const gchar *txt)
 {
-   GtkLabel *lbl;
-   if (!gf || !txt) return;
-   lbl = GTK_LABEL (glade_xml_get_widget (gf->gxml, "freq label"));
-   gtk_label_set_text (lbl, txt);
+    GtkLabel *lbl;
+    if (!gf || !txt) return;
+    lbl = GTK_LABEL (glade_xml_get_widget (gf->gxml, "freq label"));
+    gtk_label_set_text (lbl, txt);
 }
 
 void 
-gnc_frequency_set_date_label_text (GncFrequency *gf, const gchar *txt)
+gnc_frequency_set_date_label_text(GncFrequency *gf, const gchar *txt)
 {
-   GtkLabel *lbl;
-   if (!gf || !txt) return;
-   lbl = GTK_LABEL (glade_xml_get_widget (gf->gxml, "startdate label"));
-   gtk_label_set_text (lbl, txt);
+    GtkLabel *lbl;
+    if (!gf || !txt) return;
+    lbl = GTK_LABEL (glade_xml_get_widget (gf->gxml, "startdate label"));
+    gtk_label_set_text (lbl, txt);
 }
 
-/* ========================= END OF FILE =========================== */
+
+GtkWidget*
+gnc_frequency_new_from_recurrence(GList *recurrences, GDate *start_date)
+{
+    GncFrequency *toRet;
+    toRet = g_object_new(gnc_frequency_get_type(), NULL);
+    gnc_frequency_setup_recurrence(toRet, recurrences, start_date);
+    return GTK_WIDGET(toRet);
+}
+
+static gboolean
+_test_for_semi_monthly(GList *recurrences)
+{
+    if (g_list_length(recurrences) != 2)
+        return FALSE;
+
+    // should be a "semi-monthly":
+    {
+        Recurrence *first = (Recurrence*)g_list_nth_data(recurrences, 0);
+        Recurrence *second = (Recurrence*)g_list_nth_data(recurrences, 1);
+        PeriodType first_period, second_period;
+        first_period = recurrenceGetPeriodType(first);
+        second_period = recurrenceGetPeriodType(second);
+             
+        if (!((first_period == PERIOD_MONTH
+               || first_period == PERIOD_END_OF_MONTH
+               || first_period == PERIOD_LAST_WEEKDAY)
+              && (second_period == PERIOD_MONTH
+                  || second_period == PERIOD_END_OF_MONTH
+                  || second_period == PERIOD_LAST_WEEKDAY)))
+        {
+            /*g_error("unknown 2-recurrence composite with period_types first [%d] second [%d]",
+              first_period, second_periodD);*/
+            return FALSE;
+        }
+    }
+    return TRUE;
+}
+
+static gboolean
+_test_for_weekly_multiple(GList *recurrences)
+{
+    GList *r_iter;
+   
+    for (r_iter = recurrences; r_iter != NULL; r_iter = r_iter->next)
+    {
+        Recurrence *r = (Recurrence*)r_iter->data;
+
+        if (!(recurrenceGetPeriodType(r) == PERIOD_WEEK))
+        {
+            return FALSE;
+        }
+    }
+    return TRUE;
+}
+
+static void
+_setup_weekly_recurrence(GncFrequency *gf, Recurrence *r)
+{
+    GDate recurrence_date;
+    GDateWeekday day_of_week;
+    guint multiplier = recurrenceGetMultiplier(r);
+    const char *checkbox_widget_name;
+    GtkWidget *weekday_checkbox;
+
+    GtkWidget *multipler_spin = glade_xml_get_widget(gf->gxml, "weekly_spin");
+    gtk_spin_button_set_value(GTK_SPIN_BUTTON(multipler_spin), multiplier);
+
+    recurrence_date = recurrenceGetDate(r);
+    day_of_week = g_date_get_weekday(&recurrence_date);
+    g_assert(day_of_week >= G_DATE_MONDAY && day_of_week <= G_DATE_SUNDAY);
+    // this `mod 7' is explicit knowledge of the values of (monday=1)-based
+    // GDateWeekday, vs. our (sunday=0)-based checkbox names array.
+    checkbox_widget_name = CHECKBOX_NAMES[day_of_week % 7];
+    weekday_checkbox = glade_xml_get_widget(gf->gxml, checkbox_widget_name);
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(weekday_checkbox), TRUE);
+}
+
+static int
+_get_monthly_combobox_index(Recurrence *r)
+{
+    GDate recurrence_date = recurrenceGetDate(r);
+    int day_of_month_index = g_date_get_day(&recurrence_date) - 1;
+    if (recurrenceGetPeriodType(r) == PERIOD_LAST_WEEKDAY)
+    {
+        gint last_day_of_month_list_offset = 30;
+        day_of_month_index
+            = last_day_of_month_list_offset
+            + g_date_get_weekday(&recurrence_date);
+    }
+    return day_of_month_index;
+}
+
+void
+gnc_frequency_setup_recurrence(GncFrequency *gf, GList *recurrences, GDate *start_date)
+{
+     gboolean made_changes = FALSE;
+
+     // setup start-date, if present
+     if (start_date != NULL
+         && g_date_valid(start_date))
+     {
+          gnc_date_edit_set_gdate(gf->startDate, start_date);
+          made_changes = TRUE;
+     }
+
+     if (recurrences == NULL)
+     {
+          goto maybe_signal;
+          // return...
+     }
+
+     if (g_list_length(recurrences) > 1)
+     {
+         if (_test_for_weekly_multiple(recurrences))
+         {
+             for (; recurrences != NULL; recurrences = recurrences->next)
+             {
+                 _setup_weekly_recurrence(gf, (Recurrence*)recurrences->data);
+             }
+             gtk_notebook_set_current_page(gf->nb, PAGE_WEEKLY);
+             gtk_combo_box_set_active(gf->freqComboBox, PAGE_WEEKLY);
+         }
+         else if (_test_for_semi_monthly(recurrences))
+         {
+             Recurrence *first, *second;
+             GtkWidget *multiplier_spin;
+             GtkWidget *dom_combobox;
+
+             first = (Recurrence*)g_list_nth_data(recurrences, 0);
+             second = (Recurrence*)g_list_nth_data(recurrences, 1);
+
+             multiplier_spin = glade_xml_get_widget(gf->gxml, "semimonthly_spin");
+             gtk_spin_button_set_value(GTK_SPIN_BUTTON(multiplier_spin), recurrenceGetMultiplier(first));
+
+             dom_combobox = glade_xml_get_widget(gf->gxml, "semimonthly_first");
+             gtk_combo_box_set_active(GTK_COMBO_BOX(dom_combobox), _get_monthly_combobox_index(first));
+             dom_combobox = glade_xml_get_widget(gf->gxml, "semimonthly_second");
+             gtk_combo_box_set_active(GTK_COMBO_BOX(dom_combobox), _get_monthly_combobox_index(second));
+
+             gtk_notebook_set_current_page(gf->nb, PAGE_SEMI_MONTHLY);
+             gtk_combo_box_set_active(gf->freqComboBox, PAGE_SEMI_MONTHLY);
+         }
+         else
+         {
+             g_error("unknown composite recurrence with [%d] entries", g_list_length(recurrences));
+         }
+     }
+     else
+     {
+         Recurrence *r = (Recurrence*)recurrences->data;
+         g_debug("recurrence period [%d]", recurrenceGetPeriodType(r));
+         switch (recurrenceGetPeriodType(r))
+         {
+         case PERIOD_ONCE: {
+             GDate recurrence_date = recurrenceGetDate(r);
+             if (g_date_compare(start_date, &recurrence_date) != 0)
+             {
+                 char start_date_str[128], recur_date_str[128];
+                 g_date_strftime(start_date_str, 127, "%x", start_date);
+                 g_date_strftime(recur_date_str, 127, "%x", &recurrence_date);
+                 g_critical("start_date [%s] != recurrence_date [%s]", start_date_str, recur_date_str);
+             }
+
+             gtk_notebook_set_current_page(gf->nb, PAGE_ONCE);
+             gtk_combo_box_set_active(gf->freqComboBox, PAGE_ONCE);
+         } break;
+         case PERIOD_DAY: {
+             guint multiplier;
+             GtkWidget *spin_button;
+             multiplier = recurrenceGetMultiplier(r);
+             spin_button = glade_xml_get_widget(gf->gxml, "daily_spin");
+             gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button), multiplier);
+             made_changes = TRUE;
+
+             gtk_notebook_set_current_page(gf->nb, PAGE_DAILY);
+             gtk_combo_box_set_active(gf->freqComboBox, PAGE_DAILY);
+         } break;
+         case PERIOD_WEEK: {
+             _setup_weekly_recurrence(gf, r);
+
+             gtk_notebook_set_current_page(gf->nb, PAGE_WEEKLY);
+             gtk_combo_box_set_active(gf->freqComboBox, PAGE_WEEKLY);
+         } break;
+         case PERIOD_END_OF_MONTH:
+         case PERIOD_MONTH:
+         case PERIOD_YEAR:
+         case PERIOD_LAST_WEEKDAY: {
+             guint multiplier;
+             GtkWidget *multipler_spin, *day_of_month;
+             GDate recurrence_day;
+             int day_of_month_index;
+             
+             multipler_spin = glade_xml_get_widget(gf->gxml, "monthly_spin");
+             multiplier = recurrenceGetMultiplier(r);
+             if (recurrenceGetPeriodType(r) == PERIOD_YEAR)
+                 multiplier *= 12;
+             gtk_spin_button_set_value(GTK_SPIN_BUTTON(multipler_spin), multiplier);
+
+             day_of_month = glade_xml_get_widget(gf->gxml, "monthly_day");
+             
+             gtk_combo_box_set_active(GTK_COMBO_BOX(day_of_month), _get_monthly_combobox_index(r));
+
+             gtk_notebook_set_current_page(gf->nb, PAGE_MONTHLY);
+             gtk_combo_box_set_active(gf->freqComboBox, PAGE_MONTHLY);
+         } break; 
+         case PERIOD_NTH_WEEKDAY:
+             g_critical("unhandled period type [%d]", recurrenceGetPeriodType(r));
+             break;
+         default:
+             g_error("unknown recurrence period type [%d]", recurrenceGetPeriodType(r));
+             break;
+         }
+     }
+
+maybe_signal:
+     if (made_changes)
+          g_signal_emit_by_name(gf, "changed");
+}
+
+static gint
+_get_multiplier_from_widget(GncFrequency *gf, char *widget_name)
+{
+    GtkWidget *multiplier_spin;
+    multiplier_spin = glade_xml_get_widget(gf->gxml, widget_name);
+    return gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(multiplier_spin));
+}
+
+static Recurrence*
+_get_day_of_month_recurrence(GncFrequency *gf, GDate *start_date, int multiplier, char *combo_name)
+{
+    Recurrence *r;
+    GtkWidget *day_of_month_combo = glade_xml_get_widget(gf->gxml, combo_name);
+    int day_of_month_index = gtk_combo_box_get_active(GTK_COMBO_BOX(day_of_month_combo));
+        
+    r = g_new0(Recurrence, 1);
+    if (day_of_month_index > 30)
+    {
+        GDate *day_of_week_date = g_date_new_julian(g_date_get_julian(start_date));
+        // increment until we align on the DOW, but stay inside the month
+        g_date_set_day(day_of_week_date, 1);
+        while (g_date_get_weekday(day_of_week_date) != (day_of_month_index - 30))
+            g_date_add_days(day_of_week_date, 1);
+        recurrenceSet(r, multiplier, PERIOD_LAST_WEEKDAY, day_of_week_date);
+    }
+    else
+    {
+        GDate *day_of_month = g_date_new_julian(g_date_get_julian(start_date));
+        g_date_set_month(day_of_month, 1);
+        g_date_set_day(day_of_month, day_of_month_index + 1);
+        recurrenceSet(r, multiplier, PERIOD_MONTH, day_of_month);
+    }
+    return r;
+}
+
+void
+gnc_frequency_save_to_recurrence(GncFrequency *gf, GList **recurrences, GDate *out_start_date)
+{
+    GDate start_date;
+    gint page_index;
+
+    gnc_date_edit_get_gdate(gf->startDate, &start_date);
+    if (out_start_date != NULL)
+        *out_start_date = start_date;
+
+    if (recurrences == NULL)
+        return;
+
+    page_index = gtk_notebook_get_current_page(gf->nb);
+
+    switch (page_index)
+    {
+    case PAGE_NONE:
+        g_critical("recurrence can't support none");
+        break;
+    case PAGE_ONCE: {
+        Recurrence *r = g_new0(Recurrence, 1);
+        recurrenceSet(r, 1, PERIOD_ONCE, &start_date);
+        *recurrences = g_list_append(*recurrences, r);
+    } break;
+    case PAGE_DAILY: {
+        gint multiplier = _get_multiplier_from_widget(gf, "daily_spin");
+        Recurrence *r = g_new0(Recurrence, 1);
+        recurrenceSet(r, multiplier, PERIOD_DAY, &start_date);
+        *recurrences = g_list_append(*recurrences, r);
+    } break;
+    case PAGE_WEEKLY: {
+        int multiplier = _get_multiplier_from_widget(gf, "weekly_spin");
+        int checkbox_idx;
+        for (checkbox_idx = 0; CHECKBOX_NAMES[checkbox_idx] != NULL; checkbox_idx++)
+        {
+            GDate *day_of_week_date;
+            Recurrence *r;
+            const char *day_widget_name = CHECKBOX_NAMES[checkbox_idx];
+            GtkWidget *weekday_checkbox = glade_xml_get_widget(gf->gxml, day_widget_name);
+
+            if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(weekday_checkbox)))
+                continue;
+
+            day_of_week_date = g_date_new_julian(g_date_get_julian(&start_date));
+            // increment until we align on the DOW.
+            g_date_set_day(day_of_week_date, 1);
+            while ((g_date_get_weekday(day_of_week_date) % 7) != checkbox_idx)
+                g_date_add_days(day_of_week_date, 1);
+
+            r = g_new0(Recurrence, 1);
+            recurrenceSet(r, multiplier, PERIOD_WEEK, day_of_week_date);
+            
+            *recurrences = g_list_append(*recurrences, r);
+        }
+    } break;
+    case PAGE_SEMI_MONTHLY: {
+        int multiplier = _get_multiplier_from_widget(gf, "semimonthly_spin");
+        *recurrences = g_list_append(*recurrences, _get_day_of_month_recurrence(gf, &start_date, multiplier, "semimonthly_first"));
+        *recurrences = g_list_append(*recurrences, _get_day_of_month_recurrence(gf, &start_date, multiplier, "semimonthly_second"));
+    } break;
+    case PAGE_MONTHLY: {
+        int multiplier = _get_multiplier_from_widget(gf, "monthly_spin");
+        Recurrence *r = _get_day_of_month_recurrence(gf, &start_date, multiplier, "monthly_day");
+        *recurrences = g_list_append(*recurrences, r);
+    } break;
+    default:
+        g_error("unknown page index [%d]", page_index);
+        break;
+    }
+}

Modified: gnucash/trunk/src/gnome-utils/gnc-frequency.h
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-frequency.h	2007-02-18 17:28:44 UTC (rev 15600)
+++ gnucash/trunk/src/gnome-utils/gnc-frequency.h	2007-02-18 17:39:54 UTC (rev 15601)
@@ -26,6 +26,7 @@
 #define GNC_FREQUENCY_H
 
 #include "gnc-date-edit.h"
+#include "Recurrence.h"
 #include "FreqSpec.h"
 
 #define GNC_TYPE_FREQUENCY	  (gnc_frequency_get_type())
@@ -41,54 +42,55 @@
  **/
 typedef struct _GncFrequency 
 {
-	GtkVBox	        widget;
-
-  	GtkVBox         *vb;
-	GtkNotebook     *nb;
-	GtkComboBox     *freqComboBox;
-	GNCDateEdit     *startDate;
-	GladeXML        *gxml;
+    GtkVBox	        widget;
+    GtkVBox         *vb;
+    GtkNotebook     *nb;
+    GtkComboBox     *freqComboBox;
+    GNCDateEdit     *startDate;
+    GladeXML        *gxml;
 } GncFrequency;
 
 typedef struct _GncFrequencyClass
 {
-	GtkVBoxClass parent_class;
+    GtkVBoxClass parent_class;
 
-	void (*changed) (GncFrequency *gf);
+    void (*changed) (GncFrequency *gf);
 } GncFrequencyClass;
 
 struct pageDataTuple 
 {
-	int		idx;
-	UIFreqType	uiFTVal;
-	char		*name;
+    int idx;
+    UIFreqType uiFTVal;
+    char *name;
 };
 
-GType gnc_frequency_get_type( void );
+GType gnc_frequency_get_type(void);
 
 /**
- * Create a new GncFrequencey widget.
- * The menus and panels will be initialized to correspond to the
- * settings in the FreqSpec, and the date window will show the 
- * indicated date.  Either or both may be NULL.
- * For the default freq spec widget, use 'NULL'.
+ * Create a new GncFrequencey widget, reflecting the given FreqSpec \a fs and
+ * starting on \a start_date.  Either or both may be NULL for reasonable
+ * defaults.
  **/
 GtkWidget* gnc_frequency_new(FreqSpec *fs, GDate *start_date);
-void gnc_frequency_init( GncFrequency *gf );
+GtkWidget* gnc_frequency_new_from_recurrence(GList *recurrences, GDate *start_date);
 
+void gnc_frequency_init(GncFrequency *gf);
+
 /**
- * Change the given GncFrequency with the given FreqSpec and GDate.  
+ * Change the given GncFrequency with the given FreqSpec and GDate.
  * If the FreqSpec is NULL, then no change is made to the widget menus.
  * If the date is NULL, then no change is made to the widget date field.
  **/
-void gnc_frequency_setup( GncFrequency *gf, FreqSpec *fs, GDate *date );
+void gnc_frequency_setup(GncFrequency *gf, FreqSpec *fs, GDate *date);
+void gnc_frequency_setup_recurrence(GncFrequency *gf, GList *recurrences, GDate *start_date);
 
 /**
- * Saves the state of the GNCFrequenecy widget.
+ * Saves the state of the GncFrequency widget.
  * Updates the given FreqSpec if it's not NULL.
  * Places the date in outDate, if it's not NULL.
  **/
-void gnc_frequency_save_state( GncFrequency *gf, FreqSpec *fs, GDate *outDate);
+void gnc_frequency_save_state(GncFrequency *gf, FreqSpec *fs, GDate *outDate);
+void gnc_frequency_save_to_recurrence(GncFrequency *gf, GList **recurrences, GDate *out_start_date);
 
 /**
  * Set the label text for the frequency option menu.  In the current
@@ -102,6 +104,4 @@
  */
 void gnc_frequency_set_date_label_text (GncFrequency *gf, const gchar *txt);
 
-void gnc_frequency_setup_default( GncFrequency *gf, FreqSpec *fs, GDate *date );
-
 #endif /* !defined( GNC_FREQUENCY_H ) */



More information about the gnucash-changes mailing list