mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-10-13 18:02:00 -05:00
Add row_activated callback to commodity and price editor tree views. Fix 334661.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13651 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
1 parent
34def736d9
commit
d31b9d27c1
3 files changed
+29
-6
No files matched your search
@@ -1,5 +1,9 @@
|
||||
2006-03-16 Andreas Köhler <andi5.py@gmx.net>
|
||||
|
||||
* src/gnome/dialog-commodities.c:
|
||||
* src/gnome/dialog-price-edit-db.c: Add row_activated callback to
|
||||
commodity and price editor tree views. Fix 334661.
|
||||
|
||||
* src/gnome/gnc-plugin-page-register.c: Make register ui update
|
||||
unconditionally if in a GncEmbeddedWindow.
|
||||
|
||||
|
||||
@@ -78,14 +78,21 @@ gnc_commodities_window_destroy_cb (GtkObject *object, CommoditiesDialog *cd)
|
||||
static void
|
||||
edit_clicked (CommoditiesDialog *cd)
|
||||
{
|
||||
gnc_commodity *commodity;
|
||||
gnc_commodity *commodity;
|
||||
|
||||
commodity = gnc_tree_view_commodity_get_selected_commodity (cd->commodity_tree);
|
||||
if (commodity == NULL)
|
||||
return;
|
||||
commodity = gnc_tree_view_commodity_get_selected_commodity (cd->commodity_tree);
|
||||
if (commodity == NULL || gnc_commodity_is_iso (commodity))
|
||||
return;
|
||||
|
||||
if (gnc_ui_edit_commodity_modal (commodity, cd->dialog))
|
||||
gnc_gui_refresh_all ();
|
||||
if (gnc_ui_edit_commodity_modal (commodity, cd->dialog))
|
||||
gnc_gui_refresh_all ();
|
||||
}
|
||||
|
||||
static void
|
||||
row_activated_cb (GtkTreeView *view, GtkTreePath *path,
|
||||
GtkTreeViewColumn *column, CommoditiesDialog *cd)
|
||||
{
|
||||
edit_clicked (cd);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -321,6 +328,8 @@ gnc_commodities_dialog_create (GtkWidget * parent, CommoditiesDialog *cd)
|
||||
g_signal_connect (G_OBJECT (selection), "changed",
|
||||
G_CALLBACK (gnc_commodities_dialog_selection_changed), cd);
|
||||
|
||||
g_signal_connect (G_OBJECT (cd->commodity_tree), "row-activated",
|
||||
G_CALLBACK (row_activated_cb), cd);
|
||||
|
||||
/* Show currency button */
|
||||
button = glade_xml_get_widget (xml, "show_currencies_button");
|
||||
|
||||
@@ -340,6 +340,13 @@ gnc_price_dialog_filter_cm_func (gnc_commodity *commodity,
|
||||
return gnc_pricedb_has_prices(pdb_dialog->price_db, commodity, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
row_activated_cb (GtkTreeView *view, GtkTreePath *path,
|
||||
GtkTreeViewColumn *column, gpointer data)
|
||||
{
|
||||
gnc_prices_dialog_edit_clicked (GTK_WIDGET (view), data);
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_prices_dialog_create (GtkWidget * parent, PricesDialog *pdb_dialog)
|
||||
{
|
||||
@@ -386,6 +393,9 @@ gnc_prices_dialog_create (GtkWidget * parent, PricesDialog *pdb_dialog)
|
||||
g_signal_connect (G_OBJECT (selection), "changed",
|
||||
G_CALLBACK (gnc_prices_dialog_selection_changed), pdb_dialog);
|
||||
|
||||
g_signal_connect (G_OBJECT (view), "row-activated",
|
||||
G_CALLBACK (row_activated_cb), pdb_dialog);
|
||||
|
||||
/* buttons */
|
||||
{
|
||||
GtkWidget *button;
|
||||
|
||||
Reference in new issue
Block a user