r21567 - gnucash/trunk - Bug #663433 follow up - Migrate report options dialog from GladeXML to
Geert Janssens
gjanssens at code.gnucash.org
Mon Nov 14 07:16:35 EST 2011
Author: gjanssens
Date: 2011-11-14 07:16:34 -0500 (Mon, 14 Nov 2011)
New Revision: 21567
Trac: http://svn.gnucash.org/trac/changeset/21567
Added:
gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-options.glade
Modified:
gnucash/trunk/po/POTFILES.in
gnucash/trunk/src/gnome-utils/dialog-options.c
gnucash/trunk/src/gnome-utils/dialog-options.h
gnucash/trunk/src/gnome-utils/dialog-preferences.c
gnucash/trunk/src/gnome-utils/gtkbuilder/Makefile.am
gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade
gnucash/trunk/src/report/report-gnome/dialog-report-column-view.c
Log:
Bug #663433 follow up - Migrate report options dialog from GladeXML to
Builder
Modified: gnucash/trunk/po/POTFILES.in
===================================================================
--- gnucash/trunk/po/POTFILES.in 2011-11-13 21:33:29 UTC (rev 21566)
+++ gnucash/trunk/po/POTFILES.in 2011-11-14 12:16:34 UTC (rev 21567)
@@ -344,6 +344,7 @@
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-options.glade
src/gnome-utils/gtkbuilder/dialog-preferences.glade
src/gnome-utils/gtkbuilder/dialog-query-list.glade
src/gnome-utils/gtkbuilder/dialog-reset-warnings.glade
Modified: gnucash/trunk/src/gnome-utils/dialog-options.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-options.c 2011-11-13 21:33:29 UTC (rev 21566)
+++ gnucash/trunk/src/gnome-utils/dialog-options.c 2011-11-14 12:16:34 UTC (rev 21567)
@@ -2,6 +2,7 @@
* dialog-options.c -- GNOME option handling *
* Copyright (C) 1998-2000 Linas Vepstas *
* Copyright (c) 2006 David Hampton <hampton at employees.org> *
+ * 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 *
@@ -79,6 +80,7 @@
{
GtkWidget * dialog;
GtkWidget * notebook;
+ GtkWidget * page_list_view;
GtkWidget * page_list;
gboolean toplevel;
@@ -106,6 +108,12 @@
GNC_RD_WID_REL_WIDGET_POS
} GNCRdPositions;
+enum page_tree
+{
+ PAGE_INDEX = 0,
+ PAGE_NAME,
+ NUM_COLUMNS
+};
static GNCOptionWinCallback global_help_cb = NULL;
gpointer global_help_cb_data = NULL;
@@ -113,10 +121,9 @@
void gnc_options_dialog_response_cb(GtkDialog *dialog, gint response,
GNCOptionWin *window);
static void gnc_options_dialog_reset_cb(GtkWidget * w, gpointer data);
-void gnc_options_dialog_list_select_cb(GtkWidget * list, GtkWidget * item,
- gpointer data);
+void gnc_options_dialog_list_select_cb (GtkTreeSelection *selection,
+ gpointer data);
-
GtkWidget *
gnc_option_get_gtk_widget (GNCOption *option)
{
@@ -289,7 +296,6 @@
* use the current value *
* Return: nothing *
\********************************************************************/
-
static void
gnc_option_set_ui_value_internal (GNCOption *option, gboolean use_default)
{
@@ -330,7 +336,6 @@
free(type);
}
-
/********************************************************************\
* gnc_option_get_ui_value_internal *
* returns the SCM representation of the GUI option value *
@@ -367,7 +372,6 @@
return result;
}
-
/********************************************************************\
* gnc_option_set_selectable_internal *
* Change the selectable state of the widget that represents a *
@@ -796,7 +800,6 @@
return frame;
}
-
static void
gnc_option_account_cb(GtkTreeSelection *selection, gpointer data)
{
@@ -1199,6 +1202,9 @@
GtkWidget *reset_button;
GtkWidget *listitem = NULL;
GtkWidget *buttonbox;
+ GtkTreeView *view;
+ GtkListStore *list;
+ GtkTreeIter iter;
gint num_options;
const char *name;
gint i, page_count, name_offset;
@@ -1213,6 +1219,7 @@
advanced = (strncmp(name, "_+", 2) == 0);
name_offset = (advanced) ? 2 : 0;
page_label = gtk_label_new(_(name + name_offset));
+ PINFO("Page_label is %s", _(name + name_offset));
gtk_widget_show(page_label);
/* Build this options page */
@@ -1257,25 +1264,32 @@
page_count = gtk_notebook_page_num(GTK_NOTEBOOK(propertybox->notebook),
page_content_box);
- if (propertybox->page_list)
+ if (propertybox->page_list_view)
{
/* Build the matching list item for selecting from large page sets */
- listitem = gtk_list_item_new_with_label(_(name + name_offset));
- gtk_widget_show(listitem);
- gtk_container_add(GTK_CONTAINER(propertybox->page_list), listitem);
+ view = GTK_TREE_VIEW(propertybox->page_list_view);
+ list = GTK_LIST_STORE(gtk_tree_view_get_model(view));
+ PINFO("Page name is %s and page_count is %d", name, page_count);
+ gtk_list_store_append(list, &iter);
+ gtk_list_store_set(list, &iter,
+ PAGE_NAME, _(name),
+ PAGE_INDEX, page_count,
+ -1);
+
if (page_count > MAX_TAB_COUNT - 1) /* Convert 1-based -> 0-based */
{
gtk_widget_show(propertybox->page_list);
gtk_notebook_set_show_tabs(GTK_NOTEBOOK(propertybox->notebook), FALSE);
gtk_notebook_set_show_border(GTK_NOTEBOOK(propertybox->notebook), FALSE);
}
+ else
+ gtk_widget_hide(propertybox->page_list);
/* Tweak "advanced" pages for later handling. */
if (advanced)
{
- notebook_page =
- gtk_notebook_get_nth_page(GTK_NOTEBOOK(propertybox->notebook),
+ notebook_page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(propertybox->notebook),
page_count);
g_object_set_data(G_OBJECT(notebook_page), "listitem", listitem);
@@ -1283,11 +1297,9 @@
GINT_TO_POINTER(advanced));
}
}
-
return(page_count);
}
-
/********************************************************************\
* gnc_options_dialog_build_contents *
* builds an options dialog given a property box and an options *
@@ -1325,6 +1337,8 @@
num_sections = gnc_option_db_num_sections(odb);
default_section_name = gnc_option_db_get_default_section(odb);
+ PINFO("Default Section name is %s", default_section_name);
+
for (i = 0; i < num_sections; i++)
{
const char *section_name;
@@ -1357,19 +1371,20 @@
gtk_notebook_popup_enable(GTK_NOTEBOOK(propertybox->notebook));
if (default_page >= 0)
{
+ /* Find the page list and set the selection to the default page */
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(propertybox->page_list_view));
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+
+ model = gtk_tree_view_get_model(GTK_TREE_VIEW(propertybox->page_list_view));
+ gtk_tree_model_iter_nth_child(model, &iter, NULL, default_page);
+ gtk_tree_selection_select_iter (selection, &iter);
gtk_notebook_set_current_page(GTK_NOTEBOOK(propertybox->notebook), default_page);
- gtk_list_select_item(GTK_LIST(propertybox->page_list), default_page);
}
- else
- {
- /* GTKList doesn't default to selecting the first item. */
- gtk_list_select_item(GTK_LIST(propertybox->page_list), 0);
- }
gnc_options_dialog_changed_internal(propertybox->dialog, FALSE);
gtk_widget_show(propertybox->dialog);
}
-
GtkWidget *
gnc_options_dialog_widget(GNCOptionWin * win)
{
@@ -1377,6 +1392,12 @@
}
GtkWidget *
+gnc_options_page_list(GNCOptionWin * win)
+{
+ return win->page_list;
+}
+
+GtkWidget *
gnc_options_dialog_notebook(GNCOptionWin * win)
{
return win->notebook;
@@ -1435,16 +1456,20 @@
}
void
-gnc_options_dialog_list_select_cb(GtkWidget * list, GtkWidget * item,
- gpointer data)
+gnc_options_dialog_list_select_cb (GtkTreeSelection *selection,
+ gpointer data)
{
GNCOptionWin * win = data;
- gint index;
+ GtkTreeModel *list;
+ GtkTreeIter iter;
+ gint index = 0;
- g_return_if_fail (list);
- g_return_if_fail (win);
-
- index = gtk_list_child_position(GTK_LIST(list), item);
+ if (!gtk_tree_selection_get_selected(selection, &list, &iter))
+ return;
+ gtk_tree_model_get(list, &iter,
+ PAGE_INDEX, &index,
+ -1);
+ PINFO("Index is %d", index);
gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), index);
}
@@ -1481,8 +1506,8 @@
/* gnc_options_dialog_new:
*
- * - Opens the preferences glade file
- * - Connects signals specified in the glade file
+ * - Opens the dialog-options glade file
+ * - Connects signals specified in the builder file
* - Sets the window's title
* - Initializes a new GtkNotebook, and adds it to the window
*
@@ -1490,25 +1515,54 @@
GNCOptionWin *
gnc_options_dialog_new(gchar *title)
{
- GNCOptionWin * retval;
- GladeXML *xml;
- GtkWidget * hbox;
+ GNCOptionWin *retval;
+ GtkBuilder *builder;
+ GtkWidget *hbox;
gint component_id;
retval = g_new0(GNCOptionWin, 1);
- xml = gnc_glade_xml_new ("preferences.glade", "GnuCash Options");
- retval->dialog = glade_xml_get_widget (xml, "GnuCash Options");
- retval->page_list = glade_xml_get_widget (xml, "page_list");
+ builder = gtk_builder_new();
+ gnc_builder_add_from_file (builder, "dialog-options.glade", "GnuCash Options");
+ retval->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "GnuCash Options"));
+ retval->page_list = GTK_WIDGET(gtk_builder_get_object (builder, "page_list_scroll"));
- glade_xml_signal_autoconnect_full( xml,
- gnc_glade_autoconnect_full_func,
- retval );
+ /* Page List */
+ {
+ GtkTreeView *view;
+ GtkListStore *store;
+ GtkTreeSelection *selection;
+ GtkCellRenderer *renderer;
+ GtkTreeViewColumn *column;
+ retval->page_list_view = GTK_WIDGET(gtk_builder_get_object (builder, "page_list_treeview"));
+
+ view = GTK_TREE_VIEW(retval->page_list_view);
+
+ store = gtk_list_store_new(NUM_COLUMNS, G_TYPE_INT, G_TYPE_STRING);
+ gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
+ g_object_unref(store);
+
+ renderer = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes(_("Page"), renderer,
+ "text", PAGE_NAME, NULL);
+ gtk_tree_view_append_column(view, column);
+
+ gtk_tree_view_column_set_alignment(column,0.5);
+
+ selection = gtk_tree_view_get_selection(view);
+ gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE);
+ g_signal_connect (selection, "changed",
+ G_CALLBACK (gnc_options_dialog_list_select_cb), retval);
+
+ }
+
+ gtk_builder_connect_signals_full (builder, gnc_builder_connect_full_func, retval);
+
if (title)
gtk_window_set_title(GTK_WINDOW(retval->dialog), title);
/* glade doesn't suport a notebook with zero pages */
- hbox = glade_xml_get_widget (xml, "notebook placeholder");
+ hbox = GTK_WIDGET(gtk_builder_get_object (builder, "notebook placeholder"));
retval->notebook = gtk_notebook_new();
gtk_widget_show(retval->notebook);
gtk_box_pack_start(GTK_BOX(hbox), retval->notebook, TRUE, TRUE, 5);
@@ -1518,6 +1572,8 @@
retval);
gnc_gui_component_set_session (component_id, gnc_get_current_session());
+ g_object_unref(G_OBJECT(builder));
+
return retval;
}
@@ -1589,7 +1645,6 @@
g_free(win);
}
-
/*****************************************************************/
/* Option Registration */
@@ -2229,7 +2284,6 @@
*
*
*/
-
static gboolean
gnc_option_set_ui_value_boolean (GNCOption *option, gboolean use_default,
GtkWidget *widget, SCM value)
@@ -2737,7 +2791,6 @@
* gui widget.
*
*/
-
static SCM
gnc_option_get_ui_value_boolean (GNCOption *option, GtkWidget *widget)
{
@@ -3045,8 +3098,9 @@
return (gnc_dateformat_option_set_value(format, months, years, custom));
}
-/* INITIALIZATION */
-
+/************************************/
+/* INITIALIZATION */
+/************************************/
static void gnc_options_initialize_options (void)
{
static GNCOptionDef_t options[] =
Modified: gnucash/trunk/src/gnome-utils/dialog-options.h
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-options.h 2011-11-13 21:33:29 UTC (rev 21566)
+++ gnucash/trunk/src/gnome-utils/dialog-options.h 2011-11-14 12:16:34 UTC (rev 21567)
@@ -41,6 +41,7 @@
void gnc_options_register_stocks (void);
GtkWidget * gnc_options_dialog_widget(GNCOptionWin * win);
+GtkWidget * gnc_options_page_list(GNCOptionWin * win);
GtkWidget * gnc_options_dialog_notebook(GNCOptionWin * win);
void gnc_options_dialog_changed (GNCOptionWin *win);
Modified: gnucash/trunk/src/gnome-utils/dialog-preferences.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-preferences.c 2011-11-13 21:33:29 UTC (rev 21566)
+++ gnucash/trunk/src/gnome-utils/dialog-preferences.c 2011-11-14 12:16:34 UTC (rev 21567)
@@ -75,7 +75,6 @@
#include "gnc-component-manager.h"
#include "dialog-preferences.h"
-#define GLADE_FILENAME "preferences.glade"
#define DIALOG_PREFERENCES_CM_CLASS "dialog-newpreferences"
#define GCONF_SECTION "dialogs/preferences"
#define PREFIX_LEN sizeof("gconf/") - 1
@@ -1518,8 +1517,8 @@
/** Create the preferences dialog. This function first reads the
* dialog-preferences.glade file to obtain the content and then
- * the dialog and set of common preferences. It then runs the list
- * of add-ins, calling a helper function to add each full/partial
+ * the dialog is created with a set of common preferences. It then
+ * runs the list of add-ins, calling a helper function to add each full/partial
* page to this dialog, Finally it builds the "interesting widgets"
* table that is used for connecting the widgets up to callback functions.
*
@@ -1676,11 +1675,11 @@
/** Create the preferences dialog. This function first reads the
- * preferences.glade file to obtain the dialog and set of common
+ * dialog-preferences.glade file to obtain the dialog and a set of common
* preferences. It then runs the list of add-ins, calling a helper
* function to add each full/partial page to this dialog, Finally it
- * runs the list of "interesting widgets" that it has built,
- * connecting these widgets up to callback functions.
+ * runs the list of "interesting widgets" that it has built and
+ * connects these widgets up to the callback functions.
*
* @internal
*
Modified: gnucash/trunk/src/gnome-utils/gtkbuilder/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome-utils/gtkbuilder/Makefile.am 2011-11-13 21:33:29 UTC (rev 21566)
+++ gnucash/trunk/src/gnome-utils/gtkbuilder/Makefile.am 2011-11-14 12:16:34 UTC (rev 21567)
@@ -6,6 +6,7 @@
dialog-commodity.glade \
dialog-file-access.glade \
dialog-object-references.glade \
+ dialog-options.glade \
dialog-preferences.glade \
dialog-query-list.glade \
dialog-reset-warnings.glade \
Added: gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-options.glade
===================================================================
--- gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-options.glade (rev 0)
+++ gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-options.glade 2011-11-14 12:16:34 UTC (rev 21567)
@@ -0,0 +1,146 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.16"/>
+ <!-- interface-naming-policy project-wide -->
+ <object class="GtkDialog" id="GnuCash Options">
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">GnuCash Options</property>
+ <property name="default_width">400</property>
+ <property name="default_height">400</property>
+ <property name="type_hint">dialog</property>
+ <signal name="response" handler="gnc_options_dialog_response_cb" swapped="no"/>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child internal-child="action_area">
+ <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>
+ <object class="GtkButton" id="helpbutton1">
+ <property name="label">gtk-help</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>
+ <child>
+ <object class="GtkButton" id="cancelbutton1">
+ <property name="label">gtk-cancel</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">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="applybutton">
+ <property name="label">gtk-apply</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">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="okbutton1">
+ <property name="label">gtk-ok</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">3</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="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkScrolledWindow" id="page_list_scroll">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="vscrollbar_policy">never</property>
+ <child>
+ <object class="GtkTreeView" id="page_list_treeview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="notebook placeholder">
+ <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">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-11">helpbutton1</action-widget>
+ <action-widget response="-6">cancelbutton1</action-widget>
+ <action-widget response="-10">applybutton</action-widget>
+ <action-widget response="-5">okbutton1</action-widget>
+ </action-widgets>
+ </object>
+</interface>
Modified: gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade
===================================================================
--- gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade 2011-11-13 21:33:29 UTC (rev 21566)
+++ gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade 2011-11-14 12:16:34 UTC (rev 21567)
@@ -2,141 +2,6 @@
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
- <object class="GtkDialog" id="GnuCash Options">
- <property name="can_focus">False</property>
- <property name="title" translatable="yes">GnuCash Options</property>
- <property name="default_width">400</property>
- <property name="default_height">400</property>
- <property name="type_hint">dialog</property>
- <signal name="response" handler="gnc_options_dialog_response_cb" swapped="no"/>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child internal-child="action_area">
- <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>
- <object class="GtkButton" id="helpbutton1">
- <property name="label">gtk-help</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>
- <child>
- <object class="GtkButton" id="cancelbutton1">
- <property name="label">gtk-cancel</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">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="applybutton">
- <property name="label">gtk-apply</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">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="okbutton1">
- <property name="label">gtk-ok</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">3</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="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkTreeView" id="page_list">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="model">liststore1</property>
- <signal name="select-child" handler="gnc_options_dialog_list_select_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="notebook placeholder">
- <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">2</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-11">helpbutton1</action-widget>
- <action-widget response="-6">cancelbutton1</action-widget>
- <action-widget response="-10">applybutton</action-widget>
- <action-widget response="-5">okbutton1</action-widget>
- </action-widgets>
- </object>
<object class="GtkDialog" id="GnuCash Preferences">
<property name="can_focus">False</property>
<property name="title" translatable="yes">GnuCash Preferences</property>
@@ -3791,7 +3656,6 @@
<property name="step_increment">1</property>
<property name="page_increment">4</property>
</object>
- <object class="GtkListStore" id="liststore1"/>
<object class="GtkAdjustment" id="max_transactions_adj">
<property name="upper">999999</property>
<property name="value">1</property>
Modified: gnucash/trunk/src/report/report-gnome/dialog-report-column-view.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/dialog-report-column-view.c 2011-11-13 21:33:29 UTC (rev 21566)
+++ gnucash/trunk/src/report/report-gnome/dialog-report-column-view.c 2011-11-14 12:16:34 UTC (rev 21567)
@@ -307,14 +307,8 @@
r->optwin = gnc_options_dialog_new(NULL);
/* Hide the generic dialog page list. */
- {
- GtkWidget *dialog, *page_list;
+ gtk_widget_hide(gnc_options_page_list(r->optwin));
- dialog = gnc_options_dialog_widget(r->optwin);
- page_list = gnc_glade_lookup_widget (dialog, "page_list");
- gtk_widget_hide(page_list);
- }
-
builder = gtk_builder_new();
gnc_builder_add_from_file (builder, "dialog-report.glade", "view_contents_table");
More information about the gnucash-changes
mailing list