Bug #662864 - Migrate Various dialogs to Builder from GladeXML

Patch by Robert Fewell

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21496 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2011-10-28 12:26:27 +00:00
parent 9369eae6d7
commit 312b98ec6e
13 changed files with 833 additions and 640 deletions

View File

@ -284,10 +284,6 @@ src/gnome-utils/dialog-utils.c
src/gnome-utils/druid-gconf-setup.c
src/gnome-utils/druid-gnc-xml-import.c
src/gnome-utils/druid-utils.c
src/gnome-utils/glade/dialog-book-close.glade
src/gnome-utils/glade/dialog-object-references.glade
src/gnome-utils/glade/dialog-query-list.glade
src/gnome-utils/glade/dialog-reset-warnings.glade
src/gnome-utils/glade/druid-gconf-setup.glade
src/gnome-utils/glade/druid-gnc-xml-import.glade
src/gnome-utils/glade/druid-provider-multifile.glade
@ -349,8 +345,12 @@ src/gnome-utils/gnc-tree-view-price.c
src/gnome-utils/gnc-tree-view-sx-list.c
src/gnome-utils/gnc-window.c
src/gnome-utils/gtkbuilder/dialog-account.glade
src/gnome-utils/gtkbuilder/dialog-book-close.glade
src/gnome-utils/gtkbuilder/dialog-commodity.glade
src/gnome-utils/gtkbuilder/dialog-file-access.glade
src/gnome-utils/gtkbuilder/dialog-object-references.glade
src/gnome-utils/gtkbuilder/dialog-query-list.glade
src/gnome-utils/gtkbuilder/dialog-reset-warnings.glade
src/gnome-utils/gtkbuilder/dialog-totd.glade
src/gnome-utils/gtkbuilder/dialog-transfer.glade
src/gnome-utils/gtkbuilder/dialog-userpass.glade

View File

@ -28,7 +28,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <glade/glade.h>
#include "dialog-utils.h"
#include "gnc-engine.h"
@ -47,6 +46,9 @@
void gnc_book_close_response_cb(GtkDialog *, gint, GtkDialog *);
/* This static indicates the debugging module that this .o belongs to. */
static QofLogModule log_module = GNC_MOD_GUI;
struct CloseBookWindow
{
/* Passed in by the creator */
@ -266,6 +268,8 @@ gnc_book_close_response_cb(GtkDialog *dialog, gint response, GtkDialog *unused)
Account* income_acct;
Account* expense_acct;
ENTER("dialog %p, response %d, unused %p", dialog, response, unused);
g_return_if_fail(dialog);
cbw = g_object_get_data(G_OBJECT(dialog), "CloseBookWindow");
@ -308,12 +312,13 @@ gnc_book_close_response_cb(GtkDialog *dialog, gint response, GtkDialog *unused)
gtk_widget_destroy(GTK_WIDGET(dialog));
break;
}
LEAVE("");
}
void gnc_ui_close_book (QofBook* book)
{
struct CloseBookWindow *cbw;
GladeXML* xml;
GtkBuilder* builder;
GtkWidget* box;
GList* equity_list = NULL;
@ -324,17 +329,20 @@ void gnc_ui_close_book (QofBook* book)
cbw->book = book;
/* Open the dialog */
xml = gnc_glade_xml_new("dialog-book-close.glade", "Close Book");
cbw->dialog = glade_xml_get_widget(xml, "Close Book");
builder = gtk_builder_new();
gnc_builder_add_from_file (builder, "dialog-book-close.glade", "Close Book");
cbw->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "Close Book"));
PINFO("Closed Book Window is %p, Dialog is %p", cbw, cbw->dialog);
/* close date */
box = glade_xml_get_widget(xml, "date_box");
box = GTK_WIDGET(gtk_builder_get_object (builder, "date_box"));
cbw->close_date_widget = gnc_date_edit_new(time(NULL), FALSE, FALSE);
gtk_box_pack_start(GTK_BOX(box), cbw->close_date_widget, TRUE, TRUE, 0);
/* income acct */
equity_list = g_list_prepend(equity_list, GINT_TO_POINTER(ACCT_TYPE_EQUITY));
box = glade_xml_get_widget(xml, "income_acct_box");
box = GTK_WIDGET(gtk_builder_get_object (builder, "income_acct_box"));
cbw->income_acct_widget = gnc_account_sel_new();
gnc_account_sel_set_acct_filters(GNC_ACCOUNT_SEL(cbw->income_acct_widget),
equity_list, NULL);
@ -342,7 +350,7 @@ void gnc_ui_close_book (QofBook* book)
gtk_box_pack_start(GTK_BOX(box), cbw->income_acct_widget, TRUE, TRUE, 0);
/* expense acct */
box = glade_xml_get_widget(xml, "expense_acct_box");
box = GTK_WIDGET(gtk_builder_get_object (builder, "expense_acct_box"));
cbw->expense_acct_widget = gnc_account_sel_new();
gnc_account_sel_set_acct_filters(GNC_ACCOUNT_SEL(cbw->expense_acct_widget),
equity_list, NULL);
@ -350,11 +358,10 @@ void gnc_ui_close_book (QofBook* book)
gtk_box_pack_start(GTK_BOX(box), cbw->expense_acct_widget, TRUE, TRUE, 0);
/* desc */
cbw->desc_widget = glade_xml_get_widget(xml, "desc_entry");
cbw->desc_widget = GTK_WIDGET(gtk_builder_get_object (builder, "desc_entry"));
/* Autoconnect signals */
glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func,
cbw->dialog);
gtk_builder_connect_signals_full (builder, gnc_builder_connect_full_func, cbw->dialog);
/* Register dialog with component manager */
cbw->component_manager_id =
@ -364,11 +371,10 @@ void gnc_ui_close_book (QofBook* book)
gnc_get_current_session());
g_signal_connect(cbw->dialog, "destroy", G_CALLBACK(destroy_cb), NULL);
/* Clean up the xml data structure when the dialog is destroyed */
g_object_set_data_full(G_OBJECT(cbw->dialog), "dialog-book-close.glade",
xml, g_object_unref);
g_object_set_data_full(G_OBJECT(cbw->dialog), "CloseBookWindow", cbw,
g_free);
/* Clean up the data structure when the dialog is destroyed */
g_object_set_data_full(G_OBJECT(cbw->dialog), "CloseBookWindow", cbw, g_free);
g_object_unref(G_OBJECT(builder));
/* Run the dialog */
gtk_widget_show_all(cbw->dialog);

View File

@ -27,7 +27,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <glade/glade.h>
#include "gnc-ui.h"
#include "dialog-utils.h"
@ -39,7 +38,7 @@ void
gnc_ui_object_references_show( const gchar* explanation_text, GList* objlist )
{
GtkWidget* dialog;
GladeXML* xml;
GtkBuilder* builder;
GtkWidget* box;
GList* ds_node;
GtkButton* op;
@ -52,10 +51,11 @@ gnc_ui_object_references_show( const gchar* explanation_text, GList* objlist )
gint response;
/* Open the dialog */
xml = gnc_glade_xml_new( "dialog-object-references.glade", "Object references" );
dialog = glade_xml_get_widget( xml, "Object references" );
builder = gtk_builder_new();
gnc_builder_add_from_file (builder, "dialog-object-references.glade", "Object references" );
dialog = GTK_WIDGET(gtk_builder_get_object (builder, "Object references" ));
explanation = GTK_LABEL(glade_xml_get_widget( xml, "lbl_explanation" ));
explanation = GTK_LABEL(gtk_builder_get_object (builder, "lbl_explanation" ));
gtk_label_set_text( explanation, explanation_text );
/* Set up the list store */
@ -75,14 +75,15 @@ gnc_ui_object_references_show( const gchar* explanation_text, GList* objlist )
column = gtk_tree_view_column_new_with_attributes( "Object", renderer, "text", 0, NULL );
gtk_tree_view_append_column( GTK_TREE_VIEW(listview), column );
box = glade_xml_get_widget( xml, "hbox_list" );
box = GTK_WIDGET(gtk_builder_get_object (builder, "hbox_list" ));
gtk_container_add( GTK_CONTAINER(box), listview );
/* Autoconnect signals */
glade_xml_signal_autoconnect_full( xml, gnc_glade_autoconnect_full_func, dialog );
gtk_builder_connect_signals_full (builder, gnc_builder_connect_full_func, dialog);
/* Run the dialog */
gtk_widget_show_all( dialog );
response = gtk_dialog_run( GTK_DIALOG(dialog) );
g_object_unref(G_OBJECT(builder));
gtk_widget_destroy( dialog );
}

View File

@ -37,17 +37,14 @@
struct _DialogQueryList
{
GtkWidget * dialog;
GtkWidget * label;
GtkWidget * qlist;
GtkWidget * button_box;
GNCDisplayListButton * buttons;
gpointer user_data;
GList * books;
gint component_id;
GtkWidget * dialog;
GtkWidget * label;
GtkWidget * qlist;
GtkWidget * button_box;
GNCDisplayListButton * buttons;
gpointer user_data;
GList * books;
gint component_id;
};
static void
@ -183,23 +180,24 @@ gnc_dialog_query_list_close (GtkButton *button, DialogQueryList *dql)
DialogQueryList *
gnc_dialog_query_list_new (GList *param_list, Query *q)
{
GladeXML *xml;
GtkBuilder *builder;
DialogQueryList *dql;
GtkWidget *scroller, *close;
GList *node;
dql = g_new0 (DialogQueryList, 1);
xml = gnc_glade_xml_new ("dialog-query-list.glade", "Query List Dialog");
builder = gtk_builder_new();
gnc_builder_add_from_file (builder, "dialog-query-list.glade", "Query List Dialog");
/* Grab the dialog, save the dialog info */
dql->dialog = glade_xml_get_widget (xml, "Query List Dialog");
dql->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "Query List Dialog"));
g_object_set_data (G_OBJECT (dql->dialog), "dialog-info", dql);
/* grab the widgets */
dql->label = glade_xml_get_widget (xml, "dialog_label");
dql->button_box = glade_xml_get_widget (xml, "button_vbox");
scroller = glade_xml_get_widget (xml, "result_scroller");
close = glade_xml_get_widget (xml, "close_button");
dql->label = GTK_WIDGET(gtk_builder_get_object (builder, "dialog_label"));
dql->button_box = GTK_WIDGET(gtk_builder_get_object (builder, "button_vbox"));
scroller = GTK_WIDGET(gtk_builder_get_object (builder, "result_scroller"));
close = GTK_WIDGET(gtk_builder_get_object (builder, "close_button"));
/* build the query list */
dql->qlist = gnc_query_list_new (param_list, q);
@ -209,7 +207,6 @@ gnc_dialog_query_list_new (GList *param_list, Query *q)
g_signal_connect (G_OBJECT (dql->qlist), "double_click_entry",
G_CALLBACK(gnc_dialog_query_list_double_click_entry), dql);
/* connect to the close button */
g_signal_connect (G_OBJECT (close), "clicked",
G_CALLBACK (gnc_dialog_query_list_close), dql);
@ -218,10 +215,8 @@ gnc_dialog_query_list_new (GList *param_list, Query *q)
g_signal_connect (G_OBJECT (dql->dialog), "delete_event",
G_CALLBACK (gnc_dialog_query_list_delete_cb), dql);
/* register ourselves */
dql->component_id =
gnc_register_gui_component ("GNC Dialog Query List",
dql->component_id = gnc_register_gui_component ("GNC Dialog Query List",
gnc_dialog_query_list_refresh_handler,
close_handler, dql);
@ -233,6 +228,8 @@ gnc_dialog_query_list_new (GList *param_list, Query *q)
gnc_gui_component_watch_entity (dql->component_id, (GncGUID*)node->data,
QOF_EVENT_DESTROY);
g_object_unref(G_OBJECT(builder));
return dql;
}

View File

@ -1,29 +1,30 @@
/*
* dialog-reset-warnings.c -- "Resert Warnings" dialog
* Copyright (C) 2005 David Hampton
*
* 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@gnu.org
*/
/***********************************************************************
* dialog-reset-warnings.c -- "Resert Warnings" dialog *
* Copyright (C) 2005 David Hampton *
* Copyright (C) 2011 Robert Fewell *
* *
* 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@gnu.org *
* *
**********************************************************************/
#include "config.h"
#include <gtk/gtk.h>
#include <glade/glade.h>
#include "dialog-utils.h"
#include "gnc-gconf-utils.h"
@ -40,27 +41,46 @@ static QofLogModule log_module = GNC_MOD_PREFS;
#define GCONF_ENTRY_LIST "gconf_entries"
#define TIPS_STRING "tips"
typedef struct
{
GtkWidget *dialog;
GtkWidget *perm_vbox_label;
GtkWidget *perm_vbox;
GtkWidget *temp_vbox_label;
GtkWidget *temp_vbox;
GtkWidget *buttonbox;
GtkWidget *nolabel;
GtkWidget *applybutton;
}RWDialog;
void gnc_reset_warnings_select_all_cb (GtkButton *button, gpointer user_data);
void gnc_reset_warnings_unselect_all_cb (GtkButton *button, gpointer user_data);
void gnc_reset_warnings_response_cb (GtkDialog *dialog, gint arg1, gpointer user_data);
void gnc_reset_warnings_response_cb (GtkDialog *dialog, gint response, gpointer user_data);
static GSList *gnc_reset_warnings_add_section (RWDialog *rw_dialog,
const gchar *section, GtkWidget *box);
static void gnc_reset_warnings_release_entries (GSList *entries);
static void gnc_reset_warnings_update_widgets (RWDialog *rw_dialog);
static void gnc_reset_warnings_gconf_changed (GConfClient *client, guint cnxn_id,
GConfEntry *entry, gpointer user_data);
/****************************************************
* Update the Dialog Widgets
* @internal
* @param rw_dialog structure.
****************************************************/
static void
gnc_reset_warnings_update_widgets (GtkWidget *dialog_widget)
gnc_reset_warnings_update_widgets (RWDialog *rw_dialog)
{
GtkWidget *box1, *box2, *nada, *buttons;
GtkWidget *apply;
GList *list, *tmp;
gboolean any = FALSE, checked = FALSE;
ENTER(" ");
box1 = gnc_glade_lookup_widget(dialog_widget, "perm_vbox_and_label");
box2 = gnc_glade_lookup_widget(dialog_widget, "perm_vbox");
list = gtk_container_get_children(GTK_CONTAINER(box2));
ENTER("rw_dialog %p", rw_dialog);
list = gtk_container_get_children(GTK_CONTAINER(rw_dialog->perm_vbox));
if (list)
{
gtk_widget_show_all(box1);
gtk_widget_show_all(rw_dialog->perm_vbox_label);
for (tmp = list; tmp; tmp = g_list_next(tmp))
{
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(tmp->data)))
@ -74,15 +94,13 @@ gnc_reset_warnings_update_widgets (GtkWidget *dialog_widget)
}
else
{
gtk_widget_hide(box1);
gtk_widget_hide(rw_dialog->perm_vbox_label);
}
box1 = gnc_glade_lookup_widget(dialog_widget, "temp_vbox_and_label");
box2 = gnc_glade_lookup_widget(dialog_widget, "temp_vbox");
list = gtk_container_get_children(GTK_CONTAINER(box2));
list = gtk_container_get_children(GTK_CONTAINER(rw_dialog->temp_vbox));
if (list)
{
gtk_widget_show_all(box1);
gtk_widget_show_all(rw_dialog->temp_vbox_label);
for (tmp = list; tmp; tmp = g_list_next(tmp))
{
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(tmp->data)))
@ -96,78 +114,28 @@ gnc_reset_warnings_update_widgets (GtkWidget *dialog_widget)
}
else
{
gtk_widget_hide(box1);
gtk_widget_hide(rw_dialog->temp_vbox_label);
}
nada = gnc_glade_lookup_widget(dialog_widget, "no_warnings");
buttons = gnc_glade_lookup_widget(dialog_widget, "hbuttonbox");
apply = gnc_glade_lookup_widget(dialog_widget, "applybutton");
if (any)
{
gtk_widget_show(buttons);
gtk_widget_hide(nada);
gtk_widget_set_sensitive(apply, checked);
gtk_widget_show(rw_dialog->buttonbox);
gtk_widget_hide(rw_dialog->nolabel);
gtk_widget_set_sensitive(rw_dialog->applybutton, checked);
}
else
{
gtk_widget_hide(buttons);
gtk_widget_show(nada);
gtk_widget_set_sensitive(apply, FALSE);
}
LEAVE(" ");
}
static void
gnc_reset_warnings_select_common (GtkButton *button,
gboolean selected)
{
GtkWidget *vbox;
ENTER("button %p, selected %d", button, selected);
vbox = gnc_glade_lookup_widget(GTK_WIDGET(button), "perm_vbox");
gtk_container_foreach(GTK_CONTAINER(vbox),
(GtkCallback)gtk_toggle_button_set_active,
GINT_TO_POINTER(selected));
vbox = gnc_glade_lookup_widget(GTK_WIDGET(button), "temp_vbox");
gtk_container_foreach(GTK_CONTAINER(vbox),
(GtkCallback)gtk_toggle_button_set_active,
GINT_TO_POINTER(selected));
gnc_reset_warnings_update_widgets(GTK_WIDGET(button));
LEAVE(" ");
}
void
gnc_reset_warnings_select_all_cb (GtkButton *button,
gpointer user_data)
{
gnc_reset_warnings_select_common(button, TRUE);
}
void
gnc_reset_warnings_unselect_all_cb (GtkButton *button,
gpointer user_data)
{
gnc_reset_warnings_select_common(button, FALSE);
}
static void
gnc_reset_warnings_find_remove (GtkWidget *widget,
const gchar *name)
{
ENTER("widget %p, name %s", widget, name);
if (strcmp(gtk_widget_get_name(widget), name) == 0)
{
DEBUG("destroying widget %s", name);
gtk_widget_destroy(widget);
gtk_widget_hide(rw_dialog->buttonbox);
gtk_widget_show(rw_dialog->nolabel);
gtk_widget_set_sensitive(rw_dialog->applybutton, FALSE);
}
LEAVE(" ");
}
/***************************/
/* Helper functions */
/***************************/
static void
gnc_reset_warnings_apply_one (GtkWidget *widget,
GtkDialog *dialog)
@ -175,6 +143,7 @@ gnc_reset_warnings_apply_one (GtkWidget *widget,
const char *name;
ENTER("widget %p, dialog %p", widget, dialog);
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
{
LEAVE("not active");
@ -189,33 +158,31 @@ gnc_reset_warnings_apply_one (GtkWidget *widget,
static void
gnc_reset_warnings_apply_changes (GtkDialog *dialog)
gnc_reset_warnings_apply_changes (RWDialog *rw_dialog)
{
GtkWidget *vbox;
ENTER("rw_dialog %p", rw_dialog);
ENTER("dialog %p", dialog);
vbox = gnc_glade_lookup_widget(GTK_WIDGET(dialog), "perm_vbox");
gtk_container_foreach(GTK_CONTAINER(vbox),
gtk_container_foreach(GTK_CONTAINER(rw_dialog->perm_vbox),
(GtkCallback)gnc_reset_warnings_apply_one,
dialog);
vbox = gnc_glade_lookup_widget(GTK_WIDGET(dialog), "temp_vbox");
gtk_container_foreach(GTK_CONTAINER(vbox),
rw_dialog->dialog);
gtk_container_foreach(GTK_CONTAINER(rw_dialog->temp_vbox),
(GtkCallback)gnc_reset_warnings_apply_one,
dialog);
gnc_reset_warnings_update_widgets(GTK_WIDGET(dialog));
rw_dialog->dialog);
gnc_reset_warnings_update_widgets(rw_dialog);
LEAVE(" ");
}
static void
gnc_reset_warnings_revert_changes (GtkDialog *dialog)
gnc_reset_warnings_revert_changes (RWDialog *rw_dialog)
{
GSList *entries, *tmp;
GConfEntry *entry;
ENTER("dialog %p", dialog);
ENTER("rw_dialog %p", rw_dialog);
entries = g_object_get_data(G_OBJECT(dialog), GCONF_ENTRY_LIST);
entries = g_object_get_data(G_OBJECT(rw_dialog->dialog), GCONF_ENTRY_LIST);
for (tmp = entries; tmp; tmp = g_slist_next(tmp))
{
entry = tmp->data;
@ -226,45 +193,99 @@ gnc_reset_warnings_revert_changes (GtkDialog *dialog)
}
/***************************/
/* Dialog Callbacks */
/***************************/
void
gnc_reset_warnings_response_cb (GtkDialog *dialog,
gint response,
gpointer user_data)
{
RWDialog *rw_dialog = user_data;
ENTER("dialog %p, response %d, user_data %p", dialog, response, user_data);
switch (response)
{
case GTK_RESPONSE_APPLY:
gnc_reset_warnings_apply_changes(dialog);
gnc_reset_warnings_apply_changes(rw_dialog);
break;
case GTK_RESPONSE_OK:
gnc_gconf_remove_notification(G_OBJECT(dialog), GCONF_WARNINGS,
gnc_gconf_remove_notification(G_OBJECT(rw_dialog->dialog), GCONF_WARNINGS,
DIALOG_RESET_WARNINGS_CM_CLASS);
gnc_reset_warnings_apply_changes(dialog);
gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(dialog));
gnc_reset_warnings_apply_changes(rw_dialog);
gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(rw_dialog->dialog));
gnc_unregister_gui_component_by_data(DIALOG_RESET_WARNINGS_CM_CLASS,
dialog);
gtk_widget_destroy(GTK_WIDGET(dialog));
rw_dialog);
gtk_widget_destroy(GTK_WIDGET(rw_dialog->dialog));
break;
default:
gnc_gconf_remove_notification(G_OBJECT(dialog), GCONF_WARNINGS,
gnc_gconf_remove_notification(G_OBJECT(rw_dialog->dialog), GCONF_WARNINGS,
DIALOG_RESET_WARNINGS_CM_CLASS);
gnc_reset_warnings_revert_changes(dialog);
gnc_reset_warnings_revert_changes(rw_dialog);
gnc_unregister_gui_component_by_data(DIALOG_RESET_WARNINGS_CM_CLASS,
dialog);
gtk_widget_destroy(GTK_WIDGET(dialog));
rw_dialog);
gtk_widget_destroy(GTK_WIDGET(rw_dialog->dialog));
}
LEAVE("");
}
static void
gnc_reset_warnings_add_one (GConfEntry *entry, GtkWidget *box)
gnc_reset_warnings_select_common (RWDialog *rw_dialog,
gboolean selected)
{
ENTER("rw_dialog %p, selected %d", rw_dialog, selected);
gtk_container_foreach(GTK_CONTAINER(rw_dialog->perm_vbox),
(GtkCallback)gtk_toggle_button_set_active,
GINT_TO_POINTER(selected));
gtk_container_foreach(GTK_CONTAINER(rw_dialog->temp_vbox),
(GtkCallback)gtk_toggle_button_set_active,
GINT_TO_POINTER(selected));
gnc_reset_warnings_update_widgets(rw_dialog);
LEAVE(" ");
}
void
gnc_reset_warnings_select_all_cb (GtkButton *button,
gpointer user_data)
{
RWDialog *rw_dialog = user_data;
gnc_reset_warnings_select_common(rw_dialog, TRUE);
}
void
gnc_reset_warnings_unselect_all_cb (GtkButton *button,
gpointer user_data)
{
RWDialog *rw_dialog = user_data;
gnc_reset_warnings_select_common(rw_dialog, FALSE);
}
/**************************************************************************
* This is the call back function adds an entry to the correct dialog box.
*
* @internal
* @param rw_dialog, the data structure
* @param gconf entry.
* @param box, the required dialog box to update.
***********************************************************************/
static void
gnc_reset_warnings_add_one (RWDialog *rw_dialog, GConfEntry *entry, GtkWidget *box)
{
const gchar *name, *schema_name, *desc, *long_desc = NULL;
GtkWidget *checkbox;
GConfSchema *schema = NULL;
ENTER(" ");
ENTER("rw_dialog %p, entry %p, box %p", rw_dialog, entry, box);
name = strrchr(entry->key, '/') + 1;
schema_name = gconf_entry_get_schema_name(entry);
if (schema_name)
@ -297,27 +318,36 @@ gnc_reset_warnings_add_one (GConfEntry *entry, GtkWidget *box)
gtk_widget_set_name(checkbox, entry->key);
g_signal_connect_swapped(G_OBJECT(checkbox), "toggled",
(GCallback)gnc_reset_warnings_update_widgets,
box);
(GCallback)gnc_reset_warnings_update_widgets, rw_dialog);
gtk_box_pack_start_defaults(GTK_BOX(box), checkbox);
LEAVE(" ");
}
/********************************************************************
* This is the call back function adds the gconf section
* to the dialog box.
*
* @internal
* @param The reset warnings data structure
* @param The section in gconf.
* @param The required dialog box to update.
********************************************************************/
static GSList *
gnc_reset_warnings_add_section (const gchar *section, GtkWidget *box)
gnc_reset_warnings_add_section (RWDialog *rw_dialog, const gchar *section, GtkWidget *box)
{
GSList *entries, *tmp;
GConfEntry *entry;
ENTER(" ");
ENTER("rw_dialog %p, section %s, box %p", rw_dialog, section, box);
entries = gnc_gconf_client_all_entries(section);
for (tmp = entries; tmp; tmp = g_slist_next(tmp))
{
entry = tmp->data;
if (gconf_value_get_int(entry->value) != 0)
{
gnc_reset_warnings_add_one(entry, box);
gnc_reset_warnings_add_one(rw_dialog, entry, box);
}
}
@ -326,6 +356,9 @@ gnc_reset_warnings_add_section (const gchar *section, GtkWidget *box)
}
/****************************************
* Reset Functions for closure
****************************************/
static void
gnc_reset_warnings_release_entries (GSList *entries)
{
@ -340,34 +373,62 @@ gnc_reset_warnings_release_entries (GSList *entries)
LEAVE(" ");
}
static void
gnc_reset_warnings_find_remove (GtkWidget *widget,
const gchar *name)
{
ENTER("widget %p, name %s", widget, name);
if (strcmp(gtk_widget_get_name(widget), name) == 0)
{
DEBUG("destroying widget %s", name);
gtk_widget_destroy(widget);
}
LEAVE(" ");
}
/*************************************************************************
* This is the call back function when warning gconf entries are changed.
*
* @internal
* @param The gconf client unused.
* @param The gconf client connection id.
* @param The gconf entry.
* @param The user_data points to the dialog.
***********************************************************************/
static void
gnc_reset_warnings_gconf_changed (GConfClient *client,
guint cnxn_id,
GConfEntry *entry,
gpointer user_data)
{
GtkWidget *dialog, *box;
GList *list;
g_return_if_fail(GTK_IS_DIALOG(user_data));
RWDialog *rw_dialog = g_object_get_data(G_OBJECT(user_data),"dialog-structure");
GtkWidget *box;
GList *list;
ENTER("rw_dialog %p, entry %p, user_data %p", rw_dialog, entry, user_data);
g_return_if_fail(GTK_IS_DIALOG(rw_dialog->dialog));
ENTER("entry %p, data %p", entry, user_data);
dialog = GTK_WIDGET(user_data);
DEBUG("entry key '%s', value as %p, value as int %d", entry->key, entry->value, gconf_value_get_int(entry->value));
/* Which box is affected */
if (strstr(entry->key, "permanent") != 0)
{
box = gnc_glade_lookup_widget(GTK_WIDGET(dialog), "perm_vbox");
box = rw_dialog->perm_vbox;
}
else
{
box = gnc_glade_lookup_widget(GTK_WIDGET(dialog), "temp_vbox");
box = rw_dialog->temp_vbox;
}
if (gconf_value_get_int(entry->value) != 0)
{
gnc_reset_warnings_add_one (entry, box);
gnc_reset_warnings_add_one (rw_dialog, entry, box);
DEBUG("added checkbox for %s", entry->key);
}
else
@ -381,45 +442,75 @@ gnc_reset_warnings_gconf_changed (GConfClient *client,
g_list_foreach(list, (GFunc)gnc_reset_warnings_find_remove, entry->key);
g_list_free(list);
}
gnc_reset_warnings_update_widgets(dialog);
gnc_reset_warnings_update_widgets(rw_dialog);
LEAVE(" ");
}
/***********************************************************************
* Raise the rw dialog to the top of the window stack. This
* function is called if the user attempts to create a second rw
* dialog.
*
* @internal
* @param class Unused.
* @param component_id Unused.
* @param user_data A pointer to the rw structure.
* @param iter_data Unused.
***********************************************************************/
static gboolean
show_handler (const char *class, gint component_id,
gpointer user_data, gpointer iter_data)
{
GtkWidget *dialog;
RWDialog *rw_dialog = user_data;
ENTER(" ");
dialog = GTK_WIDGET(user_data);
gtk_window_present(GTK_WINDOW(dialog));
if (!rw_dialog)
{
LEAVE("no data strucure");
return(FALSE);
}
ENTER(" ");
gtk_window_present(GTK_WINDOW(rw_dialog->dialog));
LEAVE(" ");
return(TRUE);
}
/****************************************************
* Close the reset warnings dialog.
* @internal
* @param user_data A pointer to the rw structure.
****************************************************/
static void
close_handler (gpointer user_data)
{
GtkWidget *dialog = user_data;
RWDialog *rw_dialog = user_data;
ENTER(" ");
dialog = GTK_WIDGET(user_data);
gnc_unregister_gui_component_by_data(DIALOG_RESET_WARNINGS_CM_CLASS, dialog);
gtk_widget_destroy(dialog);
gnc_unregister_gui_component_by_data(DIALOG_RESET_WARNINGS_CM_CLASS, rw_dialog);
gtk_widget_destroy(rw_dialog->dialog);
LEAVE(" ");
}
/***********************************************/
/* Create the Reset Warnings Dialog */
/***********************************************/
void
gnc_reset_warnings_dialog (GtkWidget *main_window)
gnc_reset_warnings_dialog (GtkWindow *parent)
{
GtkWidget *dialog, *box;
GladeXML *xml;
RWDialog *rw_dialog;
GtkWidget *dialog;
GtkBuilder *builder;
GSList *perm_list, *temp_list;
rw_dialog = g_new0 (RWDialog, 1);
ENTER("");
if (gnc_forall_gui_components(DIALOG_RESET_WARNINGS_CM_CLASS,
show_handler, NULL))
@ -429,34 +520,55 @@ gnc_reset_warnings_dialog (GtkWidget *main_window)
}
DEBUG("Opening dialog-reset-warnings.glade:");
xml = gnc_glade_xml_new("dialog-reset-warnings.glade", "Reset Warnings");
dialog = glade_xml_get_widget(xml, "Reset Warnings");
glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func,
dialog);
builder = gtk_builder_new();
gnc_builder_add_from_file (builder, "dialog-reset-warnings.glade", "Reset Warnings");
dialog = GTK_WIDGET(gtk_builder_get_object (builder, "Reset Warnings"));
gtk_window_set_transient_for(GTK_WINDOW (dialog), parent);
rw_dialog->dialog = dialog;
PINFO("rw_dialog %p, dialog %p", rw_dialog, dialog);
/* Connect the signals */
gtk_builder_connect_signals_full (builder, gnc_builder_connect_full_func, rw_dialog);
DEBUG("permanent");
box = glade_xml_get_widget(xml, "perm_vbox");
perm_list = gnc_reset_warnings_add_section(GCONF_WARNINGS_PERM, box);
rw_dialog->perm_vbox_label = GTK_WIDGET(gtk_builder_get_object (builder, "perm_vbox_and_label"));
rw_dialog->perm_vbox = GTK_WIDGET(gtk_builder_get_object (builder, "perm_vbox"));
perm_list = gnc_reset_warnings_add_section(rw_dialog, GCONF_WARNINGS_PERM, rw_dialog->perm_vbox);
DEBUG("temporary");
box = glade_xml_get_widget(xml, "temp_vbox");
temp_list = gnc_reset_warnings_add_section(GCONF_WARNINGS_TEMP, box);
rw_dialog->temp_vbox_label = GTK_WIDGET(gtk_builder_get_object (builder, "temp_vbox_and_label"));
rw_dialog->temp_vbox = GTK_WIDGET(gtk_builder_get_object (builder, "temp_vbox"));
temp_list = gnc_reset_warnings_add_section(rw_dialog, GCONF_WARNINGS_TEMP, rw_dialog->temp_vbox);
g_object_set_data_full(G_OBJECT(dialog), GCONF_ENTRY_LIST,
rw_dialog->buttonbox = GTK_WIDGET(gtk_builder_get_object (builder, "hbuttonbox"));
rw_dialog->nolabel = GTK_WIDGET(gtk_builder_get_object (builder, "no_warnings"));
rw_dialog->applybutton = GTK_WIDGET(gtk_builder_get_object (builder, "applybutton"));
g_object_set_data_full(G_OBJECT(rw_dialog->dialog), GCONF_ENTRY_LIST,
g_slist_concat (perm_list, temp_list),
(GDestroyNotify)gnc_reset_warnings_release_entries);
gnc_reset_warnings_update_widgets(dialog);
/* Populate the dialog boxes with the gconf entries */
gnc_reset_warnings_update_widgets(rw_dialog);
gnc_gconf_add_notification(G_OBJECT(dialog), GCONF_WARNINGS,
/* Record the pointer to the rw data structure and claen up after */
g_object_set_data_full(G_OBJECT(rw_dialog->dialog),"dialog-structure",rw_dialog, g_free);
gnc_gconf_add_notification(G_OBJECT(rw_dialog->dialog), GCONF_WARNINGS,
gnc_reset_warnings_gconf_changed,
DIALOG_RESET_WARNINGS_CM_CLASS);
gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(dialog));
gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(rw_dialog->dialog));
gnc_register_gui_component (DIALOG_RESET_WARNINGS_CM_CLASS,
NULL, close_handler, dialog);
NULL, close_handler, rw_dialog);
gtk_widget_show(GTK_WIDGET(rw_dialog->dialog));
g_object_unref(G_OBJECT(builder));
gtk_widget_show(dialog);
LEAVE(" ");
}

View File

@ -1,23 +1,25 @@
/*
* dialog-reset-warnings.h -- "Reset Warnings" dialog
* Copyright (C) 2005 David Hampton
*
* 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@gnu.org
*/
/***********************************************************************
* dialog-reset-warnings.h -- "Resert Warnings" dialog *
* Copyright (C) 2005 David Hampton *
* Copyright (C) 2011 Robert Fewell *
* *
* 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@gnu.org *
* *
**********************************************************************/
void gnc_reset_warnings_dialog (GtkWidget *main_window);
void gnc_reset_warnings_dialog (GtkWindow *parent);

View File

@ -1,9 +1,5 @@
gladedir = $(GNC_GLADE_DIR)
glade_DATA = \
dialog-book-close.glade \
dialog-object-references.glade \
dialog-query-list.glade \
dialog-reset-warnings.glade \
druid-provider-multifile.glade \
exchange-dialog.glade \
druid-gconf-setup.glade \

View File

@ -3792,7 +3792,7 @@ gnc_main_window_cmd_view_refresh (GtkAction *action, GncMainWindow *window)
static void
gnc_main_window_cmd_actions_reset_warnings (GtkAction *action, GncMainWindow *window)
{
gnc_reset_warnings_dialog(GTK_WIDGET(window));
gnc_reset_warnings_dialog(GTK_WINDOW(window));
}
static void

View File

@ -1,8 +1,12 @@
gtkbuilderdir = $(GNC_GTKBUILDER_DIR)
gtkbuilder_DATA = \
dialog-account.glade \
dialog-book-close.glade \
dialog-commodity.glade \
dialog-file-access.glade \
dialog-object-references.glade \
dialog-query-list.glade \
dialog-reset-warnings.glade \
dialog-totd.glade \
dialog-transfer.glade \
dialog-userpass.glade \

View File

@ -1,149 +1,32 @@
<?xml version="1.0"?>
<glade-interface>
<!-- interface-requires gtk+ 2.10 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkDialog" id="Close Book">
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="Close Book">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">Close Book</property>
<property name="type_hint">dialog</property>
<signal name="response" handler="gnc_book_close_response_cb"/>
<signal name="response" handler="gnc_book_close_response_cb" swapped="no"/>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox1">
<object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkTable" id="table2">
<property name="visible">True</property>
<property name="n_rows">4</property>
<property name="n_columns">2</property>
<child>
<widget class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Closing Date:</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Income Total:</property>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Expense Total:</property>
</widget>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="date_box">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="income_acct_box">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="expense_acct_box">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Description:</property>
</widget>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="desc_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x2022;</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="position">2</property>
</packing>
</child>
<property name="can_focus">False</property>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area1">
<object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<widget class="GtkButton" id="helpbutton1">
<object class="GtkButton" id="helpbutton">
<property name="label">gtk-help</property>
<property name="response_id">-11</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@ -151,15 +34,15 @@
</packing>
</child>
<child>
<widget class="GtkButton" id="cancelbutton1">
<object class="GtkButton" id="cancelbutton">
<property name="label">gtk-cancel</property>
<property name="response_id">-6</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@ -167,29 +50,169 @@
</packing>
</child>
<child>
<widget class="GtkButton" id="okbutton1">
<object class="GtkButton" id="okbutton">
<property name="label">gtk-ok</property>
<property name="response_id">-5</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</widget>
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">4</property>
<property name="n_columns">2</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Closing Date:</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Income Total:</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Expense Total:</property>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkHBox" id="date_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="income_acct_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="expense_acct_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Description:</property>
</object>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkEntry" id="desc_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="invisible_char_set">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="y_options"></property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</widget>
</glade-interface>
<action-widgets>
<action-widget response="-11">helpbutton</action-widget>
<action-widget response="-6">cancelbutton</action-widget>
<action-widget response="-5">okbutton</action-widget>
</action-widgets>
</object>
</interface>

View File

@ -1,73 +1,86 @@
<?xml version="1.0"?>
<glade-interface>
<!-- interface-requires gtk+ 2.10 -->
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<widget class="GtkDialog" id="Object references">
<object class="GtkDialog" id="Object references">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Object references</property>
<property name="type_hint">normal</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox1">
<object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
<property name="spacing">2</property>
<child>
<widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkLabel" id="lbl_explanation">
<property name="visible">True</property>
<property name="label" translatable="yes">Explanation</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox_list">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area1">
<object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<widget class="GtkButton" id="button1">
<object class="GtkButton" id="okbutton">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</widget>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="lbl_explanation">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Explanation</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox_list">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</widget>
</glade-interface>
<action-widgets>
<action-widget response="0">okbutton</action-widget>
</action-widgets>
</object>
</interface>

View File

@ -1,26 +1,57 @@
<?xml version="1.0"?>
<glade-interface>
<!-- interface-requires gtk+ 2.10 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkDialog" id="Query List Dialog">
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="Query List Dialog">
<property name="can_focus">False</property>
<property name="default_width">500</property>
<property name="default_height">300</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox1">
<object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
<property name="spacing">8</property>
<child>
<widget class="GtkVBox" id="vbox1">
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<widget class="GtkLabel" id="dialog_label">
<object class="GtkButton" id="close_button">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="dialog_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="justify">center</property>
<property name="wrap">True</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@ -29,74 +60,58 @@
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox1">
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<widget class="GtkScrolledWindow" id="result_scroller">
<object class="GtkScrolledWindow" id="result_scroller">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<child>
<placeholder/>
</child>
</widget>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="button_vbox">
<object class="GtkVBox" id="button_vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">3</property>
<property name="position">1</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
<widget class="GtkButton" id="close_button">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</widget>
</object>
</child>
</widget>
</glade-interface>
<action-widgets>
<action-widget response="0">close_button</action-widget>
</action-widgets>
</object>
</interface>

View File

@ -1,178 +1,34 @@
<?xml version="1.0"?>
<glade-interface>
<!-- interface-requires gtk+ 2.10 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkDialog" id="Reset Warnings">
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="Reset Warnings">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Reset Warnings</property>
<property name="type_hint">normal</property>
<signal name="response" handler="gnc_reset_warnings_response_cb"/>
<signal name="response" handler="gnc_reset_warnings_response_cb" swapped="no"/>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox2">
<object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<widget class="GtkVBox" id="vbox3">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<widget class="GtkLabel" id="label65">
<property name="visible">True</property>
<property name="label" translatable="yes">You have requested that the following warning dialogs not be presented. To re-enable any of these dialogs, select the check box next to the dialog, then click OK.</property>
<property name="wrap">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="no_warnings">
<property name="visible">True</property>
<property name="label" translatable="yes">No warnings to reset.</property>
</widget>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="perm_vbox_and_label">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkLabel" id="label64">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Permanent Warnings</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="perm_vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="position">3</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="temp_vbox_and_label">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkLabel" id="label63">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Temporary Warnings</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="temp_vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="position">4</property>
</packing>
</child>
<child>
<widget class="GtkHButtonBox" id="hbuttonbox">
<property name="visible">True</property>
<property name="layout_style">spread</property>
<child>
<widget class="GtkButton" id="button3">
<property name="label" translatable="yes">_Select All</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="gnc_reset_warnings_select_all_cb"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button4">
<property name="label" translatable="yes">_Unselect All</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="gnc_reset_warnings_unselect_all_cb"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="position">2</property>
</packing>
</child>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area2">
<object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<widget class="GtkButton" id="cancelbutton">
<object class="GtkButton" id="cancelbutton">
<property name="label">gtk-cancel</property>
<property name="response_id">-6</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@ -180,15 +36,15 @@
</packing>
</child>
<child>
<widget class="GtkButton" id="applybutton">
<object class="GtkButton" id="applybutton">
<property name="label">gtk-apply</property>
<property name="response_id">-10</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@ -196,29 +52,197 @@
</packing>
</child>
<child>
<widget class="GtkButton" id="okbutton">
<object class="GtkButton" id="okbutton">
<property name="label">gtk-ok</property>
<property name="response_id">-5</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</widget>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="label65">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">You have requested that the following warning dialogs not be presented. To re-enable any of these dialogs, select the check box next to the dialog, then click OK.</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHButtonBox" id="hbuttonbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">spread</property>
<child>
<object class="GtkButton" id="button3">
<property name="label" translatable="yes">_Select All</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="gnc_reset_warnings_select_all_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button4">
<property name="label" translatable="yes">_Unselect All</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="gnc_reset_warnings_unselect_all_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="no_warnings">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">No warnings to reset.</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="perm_vbox_and_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="label64">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Permanent Warnings</property>
<property name="use_markup">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="perm_vbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="temp_vbox_and_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="label63">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Temporary Warnings</property>
<property name="use_markup">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="temp_vbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</widget>
</glade-interface>
<action-widgets>
<action-widget response="-6">cancelbutton</action-widget>
<action-widget response="-10">applybutton</action-widget>
<action-widget response="-5">okbutton</action-widget>
</action-widgets>
</object>
</interface>