[Gnucash-changes] r14350 - gnucash/branches/deprecated-cleanup - Convert more deprecated GtkCombo widgets into GtkComboBoxEntries.
David Hampton
hampton at cvs.gnucash.org
Fri Jun 9 00:38:51 EDT 2006
Author: hampton
Date: 2006-06-09 00:38:50 -0400 (Fri, 09 Jun 2006)
New Revision: 14350
Trac: http://svn.gnucash.org/trac/changeset/14350
Modified:
gnucash/branches/deprecated-cleanup/ChangeLog
gnucash/branches/deprecated-cleanup/src/gnome-utils/dialog-commodity.c
gnucash/branches/deprecated-cleanup/src/gnome-utils/dialog-commodity.h
gnucash/branches/deprecated-cleanup/src/gnome-utils/glade/commodity.glade
gnucash/branches/deprecated-cleanup/src/import-export/binary-import/druid-commodity.c
gnucash/branches/deprecated-cleanup/src/import-export/qif-import/druid-qif-import.c
gnucash/branches/deprecated-cleanup/src/import-export/qif-import/qif.glade
Log:
Convert more deprecated GtkCombo widgets into GtkComboBoxEntries.
Modified: gnucash/branches/deprecated-cleanup/ChangeLog
===================================================================
--- gnucash/branches/deprecated-cleanup/ChangeLog 2006-06-09 04:34:59 UTC (rev 14349)
+++ gnucash/branches/deprecated-cleanup/ChangeLog 2006-06-09 04:38:50 UTC (rev 14350)
@@ -1,3 +1,16 @@
+2006-06-08 David Hampton <hampton at employees.org>
+
+ * src/import-export/qif-import/qif.glade:
+ * src/import-export/qif-import/druid-qif-import.c:
+ * src/import-export/binary-import/druid-commodity.c:
+ * src/gnome-utils/glade/commodity.glade:
+ * src/gnome-utils/dialog-commodity.[ch]: Convert more deprecated
+ GtkCombo widgets into GtkComboBoxEntries.
+
+ * src/core-utils/gnc-gtk-utils.[ch]: Allow completion without
+ requiring that the entered text be present in the model. Used for
+ new entry of new namespaces.
+
2006-06-07 David Hampton <hampton at employees.org>
* various: Pull trunk changes r13935:14346 into branch.
@@ -9,8 +22,8 @@
* src/gnome/glade/lots.glade:
* src/gnome/glade/sched-xact.glade:
* src/gnome/lot-viewer.c:
- * src/gnome-search/dialog-search.c: More GtkOptionMenu -> GtkCombo
- and CtkCList -> CtkTreeView conversions.
+ * src/gnome-search/dialog-search.c: More GtkOptionMenu -> GtkComboBox
+ and GtkCList -> GtkTreeView conversions.
2006-06-05 David Hampton <hampton at employees.org>
Modified: gnucash/branches/deprecated-cleanup/src/gnome-utils/dialog-commodity.c
===================================================================
--- gnucash/branches/deprecated-cleanup/src/gnome-utils/dialog-commodity.c 2006-06-09 04:34:59 UTC (rev 14349)
+++ gnucash/branches/deprecated-cleanup/src/gnome-utils/dialog-commodity.c 2006-06-09 04:38:50 UTC (rev 14350)
@@ -42,6 +42,7 @@
#include "dialog-commodity.h"
#include "dialog-utils.h"
#include "gnc-engine.h"
+#include "gnc-gtk-utils.h"
#include "gnc-gui-query.h"
#include "gnc-ui-util.h"
#include "gnc-ui.h"
@@ -51,9 +52,7 @@
struct select_commodity_window {
GtkWidget * dialog;
GtkWidget * namespace_combo;
- GtkWidget * namespace_entry;
GtkWidget * commodity_combo;
- GtkWidget * commodity_entry;
GtkWidget * select_user_prompt;
GtkWidget * ok_button;
@@ -102,9 +101,9 @@
dialog_commodity_mode mode);
void gnc_ui_select_commodity_new_cb(GtkButton * button,
gpointer user_data);
-void gnc_ui_select_commodity_changed_cb(GtkEditable * entry,
+void gnc_ui_select_commodity_changed_cb(GtkComboBoxEntry *cbe,
gpointer user_data);
-void gnc_ui_select_commodity_namespace_changed_cb(GtkEditable * entry,
+void gnc_ui_select_commodity_namespace_changed_cb(GtkComboBoxEntry *cbe,
gpointer user_data);
/* The commodity creation window */
@@ -229,7 +228,8 @@
{
SelectCommodityWindow * retval = g_new0(SelectCommodityWindow, 1);
GladeXML *xml;
- const char * namespace, *title, *text;
+ const char *title, *text;
+ gchar *namespace;
GtkWidget *button, *label;
xml = gnc_glade_xml_new ("commodity.glade", "Security Selector Dialog");
@@ -238,13 +238,17 @@
retval );
retval->dialog = glade_xml_get_widget (xml, "Security Selector Dialog");
- retval->namespace_combo = glade_xml_get_widget (xml, "namespace_combo");
- retval->commodity_combo = glade_xml_get_widget (xml, "commodity_combo");
- retval->commodity_entry = glade_xml_get_widget (xml, "commodity_entry");
+ retval->namespace_combo = glade_xml_get_widget (xml, "namespace_cbe");
+ retval->commodity_combo = glade_xml_get_widget (xml, "commodity_cbe");
retval->select_user_prompt = glade_xml_get_widget (xml, "select_user_prompt");
retval->ok_button = glade_xml_get_widget (xml, "ok_button");
label = glade_xml_get_widget (xml, "item_label");
+ gtk_combo_box_remove_text(GTK_COMBO_BOX(retval->namespace_combo), 0);
+ gtk_combo_box_remove_text(GTK_COMBO_BOX(retval->commodity_combo), 0);
+ gnc_cbe_require_list_item(GTK_COMBO_BOX_ENTRY(retval->namespace_combo));
+ gnc_cbe_require_list_item(GTK_COMBO_BOX_ENTRY(retval->commodity_combo));
+
gtk_label_set_text (GTK_LABEL (retval->select_user_prompt), "");
#ifdef DRH
@@ -275,12 +279,13 @@
gtk_label_set_text_with_mnemonic (GTK_LABEL(label), text);
/* build the menus of namespaces and commodities */
- gnc_ui_update_namespace_picker(retval->namespace_combo,
+ gnc_ui_update_namespace_picker(retval->namespace_combo,
gnc_commodity_get_namespace(orig_sel),
mode);
namespace = gnc_ui_namespace_picker_ns(retval->namespace_combo);
gnc_ui_update_commodity_picker(retval->commodity_combo, namespace,
gnc_commodity_get_printname(orig_sel));
+ g_free(namespace);
return retval;
}
@@ -305,7 +310,7 @@
{
SelectCommodityWindow * w = user_data;
- const char * namespace = gnc_ui_namespace_picker_ns (w->namespace_combo);
+ gchar * namespace = gnc_ui_namespace_picker_ns (w->namespace_combo);
const gnc_commodity * new_commodity =
gnc_ui_new_commodity_modal_full(namespace,
@@ -322,6 +327,7 @@
gnc_commodity_get_namespace(new_commodity),
gnc_commodity_get_printname(new_commodity));
}
+ g_free(namespace);
}
@@ -334,27 +340,28 @@
* Commodity Selection dialog. It should not be used outside of the
* dialog-commodity.c file.
*
- * @param entry A pointer to the commodity name entry widget in the
+ * @param cbe A pointer to the commodity name entry widget in the
* dialog.
*
* @param user_data A pointer to the data structure describing the
* current state of the commodity picker.
*/
void
-gnc_ui_select_commodity_changed_cb(GtkEditable * entry,
- gpointer user_data)
+gnc_ui_select_commodity_changed_cb (GtkComboBoxEntry *cbe,
+ gpointer user_data)
{
SelectCommodityWindow * w = user_data;
- const char * namespace;
- const char * fullname;
+ gchar *namespace, *fullname;
gboolean ok;
- ENTER("entry=%p, user_data=%p", entry, user_data);
+ ENTER("cbe=%p, user_data=%p", cbe, user_data);
namespace = gnc_ui_namespace_picker_ns (w->namespace_combo);
- fullname = gtk_entry_get_text(GTK_ENTRY(w->commodity_entry));
+ fullname = gtk_combo_box_get_active_text(GTK_COMBO_BOX(w->commodity_combo));
DEBUG("namespace=%s, name=%s", namespace, fullname);
w->selection = gnc_commodity_table_find_full(gnc_get_current_commodities(),
namespace, fullname);
+ g_free(fullname);
+ g_free(namespace);
ok = (w->selection != NULL);
gtk_widget_set_sensitive(w->ok_button, ok);
@@ -373,23 +380,24 @@
* Commodity Selection dialog. It should not be used outside of the
* dialog-commodity.c file.
*
- * @param entry A pointer to the commodity namespace entry widget in
+ * @param cbe A pointer to the commodity namespace entry widget in
* the dialog.
*
* @param user_data A pointer to the data structure describing the
* current state of the commodity picker.
*/
void
-gnc_ui_select_commodity_namespace_changed_cb(GtkEditable * entry,
- gpointer user_data)
+gnc_ui_select_commodity_namespace_changed_cb (GtkComboBoxEntry *cbe,
+ gpointer user_data)
{
SelectCommodityWindow * w = user_data;
- const char * namespace;
+ gchar *namespace;
- ENTER("entry=%p, user_data=%p", entry, user_data);
+ ENTER("cbe=%p, user_data=%p", cbe, user_data);
namespace = gnc_ui_namespace_picker_ns (w->namespace_combo);
DEBUG("namespace=%s", namespace);
gnc_ui_update_commodity_picker(w->commodity_combo, namespace, NULL);
+ g_free(namespace);
LEAVE(" ");
}
@@ -398,50 +406,58 @@
* gnc_ui_update_commodity_picker
********************************************************************/
static int
-g_strcmp(gconstpointer a, gconstpointer b)
+collate(gconstpointer a, gconstpointer b)
{
- return strcmp(a, b);
+ if (!a)
+ return -1;
+ if (!b)
+ return 1;
+ return g_utf8_collate(a, b);
}
void
-gnc_ui_update_commodity_picker(GtkWidget * combobox,
- const char * namespace,
- const char * init_string)
+gnc_ui_update_commodity_picker (GtkWidget *cbe,
+ const gchar * namespace,
+ const gchar * init_string)
{
GList * commodities;
GList * iterator = NULL;
GList * commodity_items = NULL;
+ GtkComboBox *combo_box;
+ GtkTreeModel *model;
gnc_commodity_table *table;
- const char * current;
+ gint current = 0, match = 0;
+ gchar *name;
+ g_return_if_fail(GTK_IS_COMBO_BOX_ENTRY(cbe));
+ g_return_if_fail(namespace);
+
+ /* Erase the old entries */
+ combo_box = GTK_COMBO_BOX(cbe);
+ model = gtk_combo_box_get_model(combo_box);
+ gtk_list_store_clear(GTK_LIST_STORE(model));
+ gtk_combo_box_set_active(combo_box, -1);
+
table = gnc_book_get_commodity_table (gnc_get_current_book ());
commodities = gnc_commodity_table_get_commodities(table, namespace);
-
for(iterator = commodities; iterator; iterator = iterator->next) {
commodity_items =
g_list_append(commodity_items,
(gpointer) gnc_commodity_get_printname(iterator->data));
}
- commodity_items = g_list_sort(commodity_items, g_strcmp);
+ g_list_free(commodities);
- if(!commodity_items) {
- commodity_items = g_list_append(commodity_items, "");
+ commodity_items = g_list_sort(commodity_items, collate);
+ for (iterator = commodity_items; iterator; iterator = iterator->next) {
+ name = (char *)iterator->data;
+ gtk_combo_box_append_text(combo_box, name);
+ if (init_string && g_utf8_collate(name, init_string) == 0)
+ match = current;
+ current++;
}
- gtk_combo_set_popdown_strings(GTK_COMBO(combobox),
- commodity_items);
- if(init_string) {
- current = init_string;
- }
- else {
- current = commodity_items->data;
- }
-
- gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combobox)->entry), current);
-
- /* free the lists */
- g_list_free(commodities);
+ gtk_combo_box_set_active(combo_box, match);
g_list_free(commodity_items);
}
@@ -466,7 +482,7 @@
gnc_ui_select_commodity_response_cb (GtkDialog * dialog, gint response, gpointer data)
{
SelectCommodityWindow * w = data;
- const gchar *namespace;
+ gchar *namespace;
const gchar *fullname;
gnc_commodity *commodity = NULL;
@@ -477,6 +493,7 @@
commodity = gnc_commodity_table_find_full (gnc_get_current_commodities (),
namespace, fullname);
+ g_free(namespace);
if (commodity != NULL) {
if (w->callback != NULL)
@@ -506,6 +523,7 @@
gnc_commodity_get_namespace (commodity),
gnc_commodity_get_printname (commodity));
}
+ g_free(namespace);
break;
default:
if (w->callback != NULL)
@@ -574,13 +592,23 @@
********************************************************************/
void
-gnc_ui_update_namespace_picker(GtkWidget * combobox,
- const char * init_string,
- dialog_commodity_mode mode)
+gnc_ui_update_namespace_picker (GtkWidget *cbe,
+ const char * init_string,
+ dialog_commodity_mode mode)
{
- GList * namespaces, *node;
- const char * active;
+ GtkComboBox *combo_box;
+ GtkTreeModel *model;
+ GList *namespaces, *node;
+ gint current = 0, match = 0;
+ g_return_if_fail(GTK_IS_COMBO_BOX_ENTRY(cbe));
+
+ /* Erase the old entries */
+ combo_box = GTK_COMBO_BOX(cbe);
+ model = gtk_combo_box_get_model(combo_box);
+ gtk_list_store_clear(GTK_LIST_STORE(model));
+ gtk_combo_box_set_active(combo_box, -1);
+
/* fetch a list of the namespaces */
switch (mode) {
case DIAG_COMM_ALL:
@@ -591,7 +619,7 @@
case DIAG_COMM_NON_CURRENCY:
namespaces =
gnc_commodity_table_get_namespaces (gnc_get_current_commodities());
- node = g_list_find_custom (namespaces, GNC_COMMODITY_NS_CURRENCY, g_strcmp);
+ node = g_list_find_custom (namespaces, GNC_COMMODITY_NS_CURRENCY, collate);
if (node) {
namespaces = g_list_remove_link (namespaces, node);
g_list_free_1 (node);
@@ -607,48 +635,34 @@
break;
}
- /* Legacy namespace should never be seen */
- node = g_list_find_custom (namespaces, GNC_COMMODITY_NS_LEGACY, g_strcmp);
- if (node) {
- namespaces = g_list_remove_link (namespaces, node);
- g_list_free_1 (node);
- }
-
/* stick them in the combobox */
- namespaces = g_list_sort(namespaces, g_strcmp);
- gtk_combo_set_popdown_strings (GTK_COMBO (combobox), namespaces);
-
- /* set the entry text */
- if (init_string)
- active = init_string;
- else if (namespaces)
- active = namespaces->data;
- else
- active = "";
-
- if (safe_strcmp (active, "CURRENCY") == 0 ||
- safe_strcmp (init_string, "CURRENCY") == 0)
- {
- active = "CURRENCY";
+ namespaces = g_list_sort(namespaces, collate);
+ for (node = namespaces; node; node = node->next) {
+ if (g_utf8_collate(node->data, GNC_COMMODITY_NS_LEGACY) == 0)
+ continue;
+ gtk_combo_box_append_text(combo_box, node->data);
+ if (init_string && (g_utf8_collate(node->data, init_string) == 0))
+ match = current;
+ current++;
}
- gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combobox)->entry), active);
+ gtk_combo_box_set_active(combo_box, match);
g_list_free(namespaces);
}
-const char *
-gnc_ui_namespace_picker_ns (GtkWidget *combobox)
+gchar *
+gnc_ui_namespace_picker_ns (GtkWidget *cbe)
{
- const char *namespace;
+ char *namespace;
- g_return_val_if_fail (combobox != NULL, NULL);
- g_return_val_if_fail (GTK_IS_COMBO (combobox), NULL);
+ g_return_val_if_fail(GTK_IS_COMBO_BOX_ENTRY (cbe), NULL);
- namespace = gtk_entry_get_text (GTK_ENTRY(GTK_COMBO (combobox)->entry));
+ namespace = gtk_combo_box_get_active_text(GTK_COMBO_BOX(cbe));
if (safe_strcmp (namespace, GNC_COMMODITY_NS_ISO) == 0) {
/* In case the user types in ISO4217, map it to CURRENCY. */
- return GNC_COMMODITY_NS_CURRENCY;
+ g_free(namespace);
+ return strdup(GNC_COMMODITY_NS_CURRENCY);
} else
return namespace;
}
@@ -660,14 +674,15 @@
{
CommodityWindow *cw = data;
gboolean get_quote, allow_src, active;
- const char *text;
+ gchar *text;
gint i;
ENTER(" ");
get_quote = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
- text = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(cw->namespace_combo)->entry));
+ text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(cw->namespace_combo));
allow_src = !gnc_commodity_namespace_is_iso(text);
+ g_free(text);
gtk_widget_set_sensitive(cw->source_label, get_quote && allow_src);
for (i = SOURCE_SINGLE; i < SOURCE_MAX; i++) {
@@ -687,7 +702,7 @@
gnc_ui_commodity_changed_cb(GtkWidget * dummy, gpointer user_data)
{
CommodityWindow * w = user_data;
- const char * namespace;
+ gchar *namespace;
const char * fullname;
const char * mnemonic;
gboolean ok;
@@ -700,6 +715,7 @@
DEBUG("namespace=%s, name=%s, mnemonic=%s", namespace, fullname, mnemonic);
ok = (fullname && namespace && mnemonic &&
fullname[0] && namespace[0] && mnemonic[0]);
+ g_free(namespace);
} else {
ok = TRUE;
}
@@ -719,37 +735,43 @@
gnc_ui_source_menu_create(QuoteSourceType type)
{
gint i, max;
- GtkMenu *menu;
- GtkWidget *item;
- GtkWidget *omenu;
+ GtkListStore *store;
+ GtkTreeIter iter;
+ GtkWidget *combo;
+ GtkCellRenderer *renderer;
gnc_quote_source *source;
- menu = GTK_MENU(gtk_menu_new());
- gtk_widget_show(GTK_WIDGET(menu));
-
+ store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_BOOLEAN);
if (type == SOURCE_CURRENCY) {
- item = gtk_menu_item_new_with_label(_("Currency"));
- gtk_widget_show(item);
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, _("Currency"),
+ 1, TRUE,
+ -1);
} else {
max = gnc_quote_source_num_entries(type);
for (i = 0; i < max; i++) {
source = gnc_quote_source_lookup_by_ti(type, i);
if (source == NULL)
break;
- item = gtk_menu_item_new_with_label(gnc_quote_source_get_user_name(source));
- gtk_widget_set_sensitive(item, gnc_quote_source_get_supported(source));
- gtk_widget_show(item);
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, gnc_quote_source_get_user_name(source),
+ 1, gnc_quote_source_get_supported(source),
+ -1);
}
}
- omenu = gtk_option_menu_new();
- gtk_widget_show(omenu);
- gtk_option_menu_set_menu(GTK_OPTION_MENU(omenu), GTK_WIDGET(menu));
- gnc_option_menu_init(omenu);
-
- return omenu;
+ combo = gtk_combo_box_new_with_model(GTK_TREE_MODEL(store));
+ renderer = gtk_cell_renderer_text_new();
+ gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), renderer, TRUE);
+ gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(combo), renderer,
+ "text", 0);
+ gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(combo), renderer,
+ "sensitive", 1);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
+ gtk_widget_show(combo);
+ return combo;
}
/********************************************************************\
@@ -795,9 +817,7 @@
static GtkWidget *
gnc_ui_quote_tz_menu_create(void)
{
- GtkMenu *menu;
- GtkWidget *item;
- GtkWidget *omenu;
+ GtkWidget *combo;
gchar **itemstr;
/* add items here as needed, but bear in mind that right now these
@@ -806,25 +826,14 @@
order to be portable to non GNU OSes, we may have to support
whatever we add here manually on those systems. */
- menu = GTK_MENU(gtk_menu_new());
- gtk_widget_show(GTK_WIDGET(menu));
-
- item = gtk_menu_item_new_with_label(_("Use local time"));
- gtk_widget_show(item);
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
-
+ combo = gtk_combo_box_new_text();
+ gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Use local time"));
for(itemstr = &known_timezones[0]; *itemstr; itemstr++) {
- item = gtk_menu_item_new_with_label(*itemstr);
- gtk_widget_show(item);
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
+ gtk_combo_box_append_text(GTK_COMBO_BOX(combo), *itemstr);
}
- omenu = gtk_option_menu_new();
- gtk_widget_show(omenu);
- gtk_option_menu_set_menu(GTK_OPTION_MENU(omenu), GTK_WIDGET(menu));
- gnc_option_menu_init(omenu);
-
- return omenu;
+ gtk_widget_show(combo);
+ return combo;
}
/** Build the new/edit commodity dialog box
@@ -876,7 +885,7 @@
/* Get widget pointers */
retval->fullname_entry = glade_xml_get_widget (xml, "fullname_entry");
retval->mnemonic_entry = glade_xml_get_widget (xml, "mnemonic_entry");
- retval->namespace_combo = glade_xml_get_widget (xml, "namespace_combo");
+ retval->namespace_combo = glade_xml_get_widget (xml, "namespace_cbe");
retval->code_entry = glade_xml_get_widget (xml, "code_entry");
retval->fraction_spinbutton = glade_xml_get_widget (xml,
"fraction_spinbutton");
@@ -966,6 +975,8 @@
gtk_entry_set_text (GTK_ENTRY (retval->fullname_entry), fullname ? fullname : "");
gtk_entry_set_text (GTK_ENTRY (retval->mnemonic_entry), mnemonic ? mnemonic : "");
+ gnc_cbe_add_completion(GTK_COMBO_BOX_ENTRY(retval->namespace_combo));
+ gtk_combo_box_remove_text(GTK_COMBO_BOX(retval->namespace_combo), 0);
gnc_ui_update_namespace_picker(retval->namespace_combo,
selected_namespace,
include_iso ? DIAG_COMM_ALL : DIAG_COMM_NON_CURRENCY);
@@ -1001,18 +1012,18 @@
if (!gnc_commodity_is_iso(commodity)) {
type = gnc_quote_source_get_type(source);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(win->source_button[type]), TRUE);
- gtk_option_menu_set_history (GTK_OPTION_MENU (win->source_menu[type]),
- gnc_quote_source_get_index(source));
+ gtk_combo_box_set_active(GTK_COMBO_BOX(win->source_menu[type]),
+ gnc_quote_source_get_index(source));
}
if (quote_tz) {
pos = gnc_find_timezone_menu_position(quote_tz);
- if(pos == 0) {
- PWARN("Unknown price quote timezone (%s), resetting to default.",
- quote_tz ? quote_tz : "(null)");
- }
+// if(pos == 0) {
+// PWARN("Unknown price quote timezone (%s), resetting to default.",
+// quote_tz ? quote_tz : "(null)");
+// }
}
- gtk_option_menu_set_history (GTK_OPTION_MENU (win->quote_tz_menu), pos);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(win->quote_tz_menu), pos);
LEAVE(" ");
}
@@ -1156,7 +1167,7 @@
gnc_quote_source *source;
QuoteSourceType type;
const char * fullname = gtk_entry_get_text(GTK_ENTRY(w->fullname_entry));
- const char * namespace = gnc_ui_namespace_picker_ns (w->namespace_combo);
+ gchar *namespace = gnc_ui_namespace_picker_ns (w->namespace_combo);
const char * mnemonic = gtk_entry_get_text(GTK_ENTRY(w->mnemonic_entry));
const char * code = gtk_entry_get_text(GTK_ENTRY(w->code_entry));
QofBook * book = gnc_get_current_book ();
@@ -1174,7 +1185,7 @@
gnc_commodity_begin_edit(c);
gnc_commodity_set_quote_flag (c, gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (w->get_quote_check)));
- selection = gnc_option_menu_get_active (w->quote_tz_menu);
+ selection = gtk_combo_box_get_active(GTK_COMBO_BOX(w->quote_tz_menu));
string = gnc_timezone_menu_position_to_string(selection);
gnc_commodity_set_quote_tz(c, string);
gnc_commodity_commit_edit(c);
@@ -1194,6 +1205,7 @@
if ((!w->edit_commodity && c) ||
(w->edit_commodity && c && (c != w->edit_commodity))) {
gnc_warning_dialog (w->dialog, _("That commodity already exists."));
+ g_free(namespace);
return FALSE;
}
@@ -1221,11 +1233,11 @@
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w->source_button[type])))
break;
}
- selection = gnc_option_menu_get_active (w->source_menu[type]);
+ selection = gtk_combo_box_get_active(GTK_COMBO_BOX(w->source_menu[type]));
source = gnc_quote_source_lookup_by_ti (type, selection);
gnc_commodity_set_quote_source(c, source);
- selection = gnc_option_menu_get_active (w->quote_tz_menu);
+ selection = gtk_combo_box_get_active(GTK_COMBO_BOX(w->quote_tz_menu));
string = gnc_timezone_menu_position_to_string(selection);
gnc_commodity_set_quote_tz(c, string);
gnc_commodity_commit_edit(c);
@@ -1238,8 +1250,10 @@
_("You must enter a non-empty \"Full name\", "
"\"Symbol/abbreviation\", "
"and \"Type\" for the commodity."));
+ g_free(namespace);
return FALSE;
}
+ g_free(namespace);
LEAVE(" ");
return TRUE;
}
Modified: gnucash/branches/deprecated-cleanup/src/gnome-utils/dialog-commodity.h
===================================================================
--- gnucash/branches/deprecated-cleanup/src/gnome-utils/dialog-commodity.h 2006-06-09 04:34:59 UTC (rev 14349)
+++ gnucash/branches/deprecated-cleanup/src/gnome-utils/dialog-commodity.h 2006-06-09 04:38:50 UTC (rev 14350)
@@ -214,7 +214,7 @@
/** Given a combo box, fill in the known commodity namespaces and then
* select one.
*
- * @param combobox The combo box to populate with information.
+ * @param cbe The widget to populate with information.
*
* @param sel The namespace that should be initially selected when
* the combo box appears.
@@ -226,25 +226,25 @@
*
* @note The returned string must be freed by the caller.
*/
-void gnc_ui_update_namespace_picker(GtkWidget * combobox,
- const char * sel,
+void gnc_ui_update_namespace_picker(GtkWidget *cbe,
+ const gchar *sel,
dialog_commodity_mode mode);
/** Given a combo box, return the currently selected namespaces.
*
- * @param combobox The combo box of namespaces.
+ * @param cbe The combo box of namespaces.
*
* @return The currently selected namespace.
*
* @note This string is owned by the engine and must not be freed by
* the caller.
*/
-const char * gnc_ui_namespace_picker_ns (GtkWidget *combobox);
+gchar *gnc_ui_namespace_picker_ns (GtkWidget *cbe);
/** Given a combo box, fill in all the known commodities for the
* specified namespace, and then select one.
*
- * @param combobox The combo box to populate with information.
+ * @param cbe The widget to populate with information.
*
* @param namespace All commodities with this namespace will be added
* to the combo box.
@@ -252,9 +252,9 @@
* @param sel The commodity that should be initially selected when
* the combo box appears.
*/
-void gnc_ui_update_commodity_picker(GtkWidget * combobox,
- const char * namespace,
- const char * sel);
+void gnc_ui_update_commodity_picker(GtkWidget *cbe,
+ const gchar *namespace,
+ const gchar *sel);
/** @} */
#endif
Modified: gnucash/branches/deprecated-cleanup/src/gnome-utils/glade/commodity.glade
===================================================================
--- gnucash/branches/deprecated-cleanup/src/gnome-utils/glade/commodity.glade 2006-06-09 04:34:59 UTC (rev 14349)
+++ gnucash/branches/deprecated-cleanup/src/gnome-utils/glade/commodity.glade 2006-06-09 04:38:50 UTC (rev 14350)
@@ -88,130 +88,6 @@
<property name="column_spacing">12</property>
<child>
- <widget class="GtkCombo" id="commodity_combo">
- <property name="visible">True</property>
- <property name="value_in_list">True</property>
- <property name="allow_empty">False</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="commodity_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- <signal name="changed" handler="gnc_ui_select_commodity_changed_cb" last_modification_time="Wed, 16 Jul 2003 20:18:37 GMT"/>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget4">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget5">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget6">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCombo" id="namespace_combo">
- <property name="visible">True</property>
- <property name="value_in_list">True</property>
- <property name="allow_empty">False</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="namespace_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- <signal name="changed" handler="gnc_ui_select_commodity_namespace_changed_cb"/>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget1">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget2">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
<widget class="GtkLabel" id="select_user_prompt">
<property name="visible">True</property>
<property name="label" translatable="yes">Select user information here...</property>
@@ -260,7 +136,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">namespace_entry</property>
+ <property name="mnemonic_widget">namespace_cbe</property>
</widget>
</child>
</widget>
@@ -299,7 +175,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">commodity_entry</property>
+ <property name="mnemonic_widget">commodity_cbe</property>
</widget>
</child>
</widget>
@@ -312,6 +188,42 @@
<property name="y_options">fill</property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkComboBoxEntry" id="namespace_cbe">
+ <property name="visible">True</property>
+ <property name="items">Dummy namespace entry</property>
+ <property name="has_frame">True</property>
+ <property name="focus_on_click">True</property>
+ <signal name="changed" handler="gnc_ui_select_commodity_namespace_changed_cb" last_modification_time="Thu, 08 Jun 2006 23:26:58 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBoxEntry" id="commodity_cbe">
+ <property name="visible">True</property>
+ <property name="items">Dummy security entry</property>
+ <property name="has_frame">True</property>
+ <property name="focus_on_click">True</property>
+ <signal name="changed" handler="gnc_ui_select_commodity_changed_cb" last_modification_time="Thu, 08 Jun 2006 23:30:40 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -479,69 +391,6 @@
</child>
<child>
- <widget class="GtkCombo" id="namespace_combo">
- <property name="visible">True</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">True</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="namespace_entry">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Enter the type of commodity. For stocks, this is often an exchange on which the stock is traded. You can choose an existing type from the list or enter a new type with the keyboard.</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">True</property>
- <signal name="changed" handler="gnc_ui_commodity_changed_cb" last_modification_time="Sat, 19 Jul 2003 20:58:53 GMT"/>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget7">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget8">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget9">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </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>
-
- <child>
<widget class="GtkEntry" id="code_entry">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Enter a unique code used to identify the commodity. Or, you may safely leave this field blank.</property>
@@ -889,7 +738,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">namespace_entry</property>
+ <property name="mnemonic_widget">namespace_cbe</property>
</widget>
</child>
</widget>
@@ -1255,6 +1104,24 @@
<property name="y_options">fill</property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkComboBoxEntry" id="namespace_cbe">
+ <property name="visible">True</property>
+ <property name="items">Dummy namespace</property>
+ <property name="has_frame">True</property>
+ <property name="focus_on_click">True</property>
+ <signal name="changed" handler="gnc_ui_commodity_changed_cb" last_modification_time="Thu, 08 Jun 2006 23:29:20 GMT"/>
+ </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="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
Modified: gnucash/branches/deprecated-cleanup/src/import-export/binary-import/druid-commodity.c
===================================================================
--- gnucash/branches/deprecated-cleanup/src/import-export/binary-import/druid-commodity.c 2006-06-09 04:34:59 UTC (rev 14349)
+++ gnucash/branches/deprecated-cleanup/src/import-export/binary-import/druid-commodity.c 2006-06-09 04:38:50 UTC (rev 14350)
@@ -393,9 +393,9 @@
{
CommodityDruid * cd = user_data;
CommodityDruidPage * dpage = g_object_get_data(G_OBJECT(page), "page_struct");
- const char * new_type;
- const char * new_name;
- const char * new_mnemonic;
+ gchar * new_type;
+ const gchar * new_name;
+ const gchar * new_mnemonic;
gnc_commodity * new_comm;
new_type = gnc_ui_namespace_picker_ns (dpage->new_type_combo);
@@ -408,6 +408,7 @@
_("You must put values for the type, name, "
"and abbreviation of the currency/stock."));
+ g_free(new_type);
return TRUE;
}
@@ -418,7 +419,7 @@
gnc_warning_dialog(cd->window,
_("You must enter an existing national "
"currency or enter a different type."));
-
+ g_free(new_type);
return TRUE;
}
new_comm = g_hash_table_lookup(cd->new_map, dpage->old_name);
@@ -429,6 +430,7 @@
gnc_commodity_set_namespace(new_comm, new_type);
gnc_commodity_set_mnemonic(new_comm, new_mnemonic);
+ g_free(new_type);
return FALSE;
}
Modified: gnucash/branches/deprecated-cleanup/src/import-export/qif-import/druid-qif-import.c
===================================================================
--- gnucash/branches/deprecated-cleanup/src/import-export/qif-import/druid-qif-import.c 2006-06-09 04:34:59 UTC (rev 14349)
+++ gnucash/branches/deprecated-cleanup/src/import-export/qif-import/druid-qif-import.c 2006-06-09 04:38:50 UTC (rev 14350)
@@ -44,6 +44,7 @@
#include "gnc-gui-query.h"
#include "gnc-ui-util.h"
#include "gnc-gconf-utils.h"
+#include "gnc-gtk-utils.h"
#include "gnc-ui.h"
#include "guile-mappings.h"
@@ -74,7 +75,6 @@
GtkWidget * filename_entry;
GtkWidget * acct_entry;
GtkWidget * date_format_combo;
- GtkWidget * date_format_entry;
GtkWidget * selected_file_view;
GtkWidget * acct_view;
GtkWidget * cat_view;
@@ -444,9 +444,6 @@
const char * path_to_load;
const gchar * default_acctname = NULL;
- GList * format_strings;
- GList * listit;
-
SCM make_qif_file = scm_c_eval_string("make-qif-file");
SCM qif_file_load = scm_c_eval_string("qif-file:read-file");
SCM qif_file_parse = scm_c_eval_string("qif-file:parse-fields");
@@ -559,24 +556,16 @@
if(SCM_LISTP(parse_return) &&
(SCM_CAR(parse_return) == SCM_BOOL_T)) {
+ gtk_combo_box_remove_text(GTK_COMBO_BOX(wind->date_format_combo), 0);
if ((date_formats = scm_call_2(qif_file_parse_results,
SCM_CDR(parse_return),
scm_str2symbol("date"))) != SCM_BOOL_F) {
- format_strings = NULL;
while(SCM_LISTP(date_formats) && !SCM_NULLP(date_formats)) {
- format_strings =
- g_list_append(format_strings,
- g_strdup(SCM_SYMBOL_CHARS(SCM_CAR(date_formats))));
+ gtk_combo_box_append_text(GTK_COMBO_BOX(wind->date_format_combo),
+ SCM_SYMBOL_CHARS(SCM_CAR(date_formats)));
date_formats = SCM_CDR(date_formats);
}
- gtk_combo_set_popdown_strings(GTK_COMBO(wind->date_format_combo),
- format_strings);
-
- for(listit = format_strings; listit; listit=listit->next) {
- free(listit->data);
- listit->data = NULL;
- }
- g_list_free(format_strings);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(wind->date_format_combo), 0);
ask_date_format = TRUE;
@@ -650,9 +639,12 @@
SCM reparse_dates = scm_c_eval_string("qif-file:reparse-dates");
SCM check_from_acct = scm_c_eval_string("qif-file:check-from-acct");
- SCM format_sym =
- scm_str2symbol(gtk_entry_get_text(GTK_ENTRY(wind->date_format_entry)));
+ SCM format_sym;
+ gchar *text;
+ text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(wind->date_format_combo));
+ format_sym = scm_str2symbol(text);
+ g_free(text);
scm_call_2(reparse_dates, wind->selected_file, format_sym);
if(scm_call_1(check_from_acct, wind->selected_file) != SCM_BOOL_T) {
@@ -1213,7 +1205,7 @@
GtkTreeSelection* selection;
const char * mnemonic = NULL;
- const char * namespace = NULL;
+ gchar * namespace = NULL;
const char * fullname = NULL;
const gchar * amount_str;
int rownum = 0;
@@ -1231,13 +1223,14 @@
page = g_object_get_data(G_OBJECT(gtkpage), "page_struct");
mnemonic = gtk_entry_get_text(GTK_ENTRY(page->new_mnemonic_entry));
- namespace = gnc_ui_namespace_picker_ns((page->new_type_combo));
+ namespace = gnc_ui_namespace_picker_ns(page->new_type_combo);
fullname = gtk_entry_get_text(GTK_ENTRY(page->new_name_entry));
gnc_commodity_set_namespace(page->commodity, namespace);
gnc_commodity_set_fullname(page->commodity, fullname);
gnc_commodity_set_mnemonic(page->commodity, mnemonic);
+ g_free(namespace);
old_commodity = page->commodity;
page->commodity = gnc_commodity_table_insert(gnc_get_current_commodities(),
page->commodity);
@@ -1469,7 +1462,7 @@
QIFImportWindow * wind = user_data;
QIFDruidPage * qpage = g_object_get_data(G_OBJECT(page), "page_struct");
- const char * namespace = gnc_ui_namespace_picker_ns(qpage->new_type_combo);
+ gchar *namespace = gnc_ui_namespace_picker_ns(qpage->new_type_combo);
const char * name = gtk_entry_get_text(GTK_ENTRY(qpage->new_name_entry));
const char * mnemonic = gtk_entry_get_text(GTK_ENTRY(qpage->new_mnemonic_entry));
int show_matches;
@@ -1477,6 +1470,8 @@
if(!namespace || (namespace[0] == 0)) {
gnc_warning_dialog(wind->window,
_("You must enter a Type for the commodity."));
+ if (namespace)
+ g_free(namespace);
return TRUE;
}
else if(!name || (name[0] == 0)) {
@@ -1498,8 +1493,10 @@
_("You must enter an existing national "
"currency or enter a different type."));
+ g_free(namespace);
return TRUE;
}
+ g_free(namespace);
if(page == (g_list_last(wind->commodity_pages))->data) {
/* it's time to import the accounts. */
@@ -1653,9 +1650,9 @@
info_label = gtk_label_new("");
gtk_box_pack_start(GTK_BOX(temp), info_label, TRUE, TRUE, 0);
- retval->new_type_combo = gtk_combo_new();
- gtk_box_pack_start(GTK_BOX(temp),
- retval->new_type_combo, TRUE, TRUE, 0);
+ retval->new_type_combo = gtk_combo_box_entry_new_text();
+ gnc_cbe_require_list_item(GTK_COMBO_BOX_ENTRY(retval->new_type_combo));
+ gtk_box_pack_start(GTK_BOX(temp), retval->new_type_combo, TRUE, TRUE, 0);
info_label = gtk_label_new("");
gtk_box_pack_start(GTK_BOX(temp), info_label, TRUE, TRUE, 0);
@@ -2042,10 +2039,9 @@
retval->druid = glade_xml_get_widget (xml, "qif_import_druid");
retval->filename_entry = glade_xml_get_widget (xml, "qif_filename_entry");
retval->acct_entry = glade_xml_get_widget (xml, "qif_account_entry");
- retval->date_format_combo = glade_xml_get_widget (xml, "date_format_combo");
- retval->date_format_entry = glade_xml_get_widget (xml, "date_format_entry");
+ retval->date_format_combo = glade_xml_get_widget (xml, "date_format_combobox");
retval->selected_file_view = glade_xml_get_widget(xml, "selected_file_view");
- retval->currency_picker = glade_xml_get_widget (xml, "currency_combo");
+ retval->currency_picker = glade_xml_get_widget (xml, "currency_comboboxentry");
retval->currency_entry = glade_xml_get_widget (xml, "currency_entry");
retval->acct_view = glade_xml_get_widget (xml, "account_page_view");
retval->cat_view = glade_xml_get_widget (xml, "category_page_view");
@@ -2204,6 +2200,7 @@
scm_gc_protect_object(retval->match_transactions);
/* set a default currency for new accounts */
+ gnc_cbe_require_list_item(GTK_COMBO_BOX_ENTRY(retval->currency_picker));
gnc_ui_update_commodity_picker(retval->currency_picker,
GNC_COMMODITY_NS_CURRENCY,
gnc_commodity_get_printname
Modified: gnucash/branches/deprecated-cleanup/src/import-export/qif-import/qif.glade
===================================================================
--- gnucash/branches/deprecated-cleanup/src/import-export/qif-import/qif.glade 2006-06-09 04:34:59 UTC (rev 14349)
+++ gnucash/branches/deprecated-cleanup/src/import-export/qif-import/qif.glade 2006-06-09 04:38:50 UTC (rev 14350)
@@ -320,56 +320,10 @@
</child>
<child>
- <widget class="GtkCombo" id="date_format_combo">
+ <widget class="GtkComboBox" id="date_format_combobox">
<property name="visible">True</property>
- <property name="value_in_list">True</property>
- <property name="allow_empty">False</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="date_format_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget3">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget4">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget5">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
+ <property name="items">Dummy Date Entry</property>
+ <property name="focus_on_click">True</property>
</widget>
<packing>
<property name="padding">0</property>
@@ -983,56 +937,11 @@
</child>
<child>
- <widget class="GtkCombo" id="currency_combo">
+ <widget class="GtkComboBoxEntry" id="currency_comboboxentry">
<property name="visible">True</property>
- <property name="value_in_list">True</property>
- <property name="allow_empty">False</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="currency_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget14">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget15">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget16">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
+ <property name="items">Dummy currency entry</property>
+ <property name="has_frame">True</property>
+ <property name="focus_on_click">True</property>
</widget>
<packing>
<property name="padding">0</property>
More information about the gnucash-changes
mailing list