mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
misc bogosity for the accounting period druid
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8857 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
288827aac2
commit
915549af4e
@ -33,8 +33,6 @@
|
||||
#include "global-options.h"
|
||||
#include "qofbook.h"
|
||||
#include "gnc-component-manager.h"
|
||||
// #include "gnc-ui.h"
|
||||
// #include "gnc-ui-util.h"
|
||||
#include "messages.h"
|
||||
|
||||
|
||||
@ -46,6 +44,9 @@ typedef struct
|
||||
{
|
||||
GtkWidget * window;
|
||||
GtkWidget * druid;
|
||||
GtkOptionMenu *period_menu;
|
||||
GnomeDateEdit *closing_date_edit;
|
||||
GtkLabel * earliest_date;
|
||||
|
||||
} AcctPeriodInfo;
|
||||
|
||||
@ -79,11 +80,32 @@ ap_druid_cancel (GnomeDruid *druid, gpointer user_data)
|
||||
gnc_close_gui_component_by_data (DRUID_ACCT_PERIOD_CM_CLASS, info);
|
||||
}
|
||||
|
||||
static void
|
||||
ap_changed (GtkWidget *widget,
|
||||
gpointer arg1,
|
||||
gpointer user_data)
|
||||
{
|
||||
AcctPeriodInfo *info = user_data;
|
||||
time_t closing_date;
|
||||
GtkMenuItem *item;
|
||||
|
||||
/*
|
||||
closing_date = gnome_date_edit_get_date (info->closing_date_edit);
|
||||
*/
|
||||
|
||||
item = GTK_MENU_ITEM (gtk_menu_get_active (GTK_MENU(info->period_menu->menu)));
|
||||
printf ("something changed, time=%ld item=%p\n", closing_date, item);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* =============================================================== */
|
||||
|
||||
static void
|
||||
ap_druid_create (AcctPeriodInfo *info)
|
||||
{
|
||||
GtkWidget *page;
|
||||
GladeXML *xml;
|
||||
GtkWidget *page;
|
||||
|
||||
xml = gnc_glade_xml_new ("acctperiod.glade", "Acct Period Druid");
|
||||
|
||||
@ -91,17 +113,34 @@ ap_druid_create (AcctPeriodInfo *info)
|
||||
|
||||
info->druid = glade_xml_get_widget (xml, "acct_period_druid");
|
||||
|
||||
info->period_menu =
|
||||
GTK_OPTION_MENU (glade_xml_get_widget (xml, "period menu"));
|
||||
info->closing_date_edit =
|
||||
GNOME_DATE_EDIT (glade_xml_get_widget (xml, "closing date edit"));
|
||||
info->earliest_date =
|
||||
GTK_LABEL (glade_xml_get_widget (xml, "earliest trans label"));
|
||||
|
||||
/* generic finished/close/abort signals */
|
||||
gtk_signal_connect (GTK_OBJECT (info->window), "destroy",
|
||||
GTK_SIGNAL_FUNC (ap_window_destroy_cb), info);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (info->druid), "cancel",
|
||||
GTK_SIGNAL_FUNC (ap_druid_cancel), info);
|
||||
|
||||
|
||||
page = glade_xml_get_widget (xml, "doit");
|
||||
|
||||
page = glade_xml_get_widget (xml, "finish_page");
|
||||
gtk_signal_connect (GTK_OBJECT (page), "finish",
|
||||
GTK_SIGNAL_FUNC (ap_finish), info);
|
||||
|
||||
/* User changes the accouting period or date signals */
|
||||
// XXX doesn't work ...
|
||||
gtk_signal_connect (GTK_OBJECT (info->period_menu), "clicked",
|
||||
GTK_SIGNAL_FUNC (ap_changed), info);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (info->period_menu->menu), "selection_done",
|
||||
GTK_SIGNAL_FUNC (ap_changed), info);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (info->closing_date_edit), "date_changed",
|
||||
GTK_SIGNAL_FUNC (ap_changed), info);
|
||||
}
|
||||
|
||||
|
||||
@ -120,6 +159,7 @@ ap_close_handler (gpointer user_data)
|
||||
* Args: none *
|
||||
* Return: nothing *
|
||||
\********************************************************************/
|
||||
|
||||
void
|
||||
gnc_acct_period_dialog (void)
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ it is still under development.</text>
|
||||
|
||||
<widget>
|
||||
<class>GtkOptionMenu</class>
|
||||
<name>freqeuncy option menu</name>
|
||||
<name>period menu</name>
|
||||
<can_focus>True</can_focus>
|
||||
<items>Weekly
|
||||
Monthly
|
||||
@ -161,8 +161,8 @@ Annual
|
||||
|
||||
<widget>
|
||||
<class>GnomeDateEdit</class>
|
||||
<name>dateedit1</name>
|
||||
<show_time>True</show_time>
|
||||
<name>closing date edit</name>
|
||||
<show_time>False</show_time>
|
||||
<use_24_format>True</use_24_format>
|
||||
<week_start_monday>False</week_start_monday>
|
||||
<lower_hour>7</lower_hour>
|
||||
@ -227,7 +227,7 @@ Annual
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>earliest trans label</name>
|
||||
<label></label>
|
||||
<label>xxx</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0</xalign>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/********************************************************************
|
||||
* window-main.c -- open/close/configure GNOME MDI main window *
|
||||
* Copyright (C) 1998,1999 Jeremy Collins *
|
||||
* Copyright (C) 1998,1999,2000 Linas Vepstas *
|
||||
* Copyright (C) 1998,1999 Jeremy Collins *
|
||||
* Copyright (C) 1998,1999,2000 Linas Vepstas <linas@linas.org> *
|
||||
* Copyright (C) 2001 Bill Gribble *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
@ -42,6 +42,7 @@
|
||||
#include "dialog-totd.h"
|
||||
#include "dialog-transfer.h"
|
||||
#include "dialog-utils.h"
|
||||
#include "druid-acct-period.h"
|
||||
#include "druid-loan.h"
|
||||
#include "gfec.h"
|
||||
#include "global-options.h"
|
||||
@ -599,7 +600,7 @@ gnc_main_window_fincalc_cb(GtkWidget *widget, gpointer data)
|
||||
static void
|
||||
gnc_main_window_books_druid_cb(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
printf ("hello world\n");
|
||||
gnc_acct_period_dialog();
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user