mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Only use the amount of space required to show all the entries in the
popup, not all the available space. Fixes #343242. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14309 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
dce5945569
commit
736f0c2d02
@ -1,5 +1,10 @@
|
||||
2006-06-03 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/register/register-gnome/combocell-gnome.c:
|
||||
* src/register/register-gnome/gnucash-item-list.[ch]: Only use the
|
||||
amount of space required to show all the entries in the popup, not
|
||||
all the available space. Fixes #343242.
|
||||
|
||||
* src/register/register-gnome/gnucash-sheet.c: The register code
|
||||
shouldn't process any keystrokes that have a "modifier" (e.g. Alt,
|
||||
Meta, etc.) key pressed. This allows Alt-Ctl-Pgup/Down in a
|
||||
|
@ -785,7 +785,11 @@ get_popup_height (GnomeCanvasItem *item,
|
||||
int row_height,
|
||||
gpointer user_data)
|
||||
{
|
||||
return space_available;
|
||||
PopBox *box = user_data;
|
||||
int count, pad = 4;
|
||||
|
||||
count = gnc_item_list_num_entries(box->item_list);
|
||||
return MIN(space_available, (count * (row_height + pad)) + pad);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -51,6 +51,18 @@ static guint gnc_item_list_signals[LAST_SIGNAL];
|
||||
|
||||
gboolean _gnc_item_find_selection(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data);
|
||||
|
||||
gint
|
||||
gnc_item_list_num_entries (GncItemList *item_list)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
|
||||
g_return_val_if_fail(item_list != NULL, 0);
|
||||
g_return_val_if_fail(IS_GNC_ITEM_LIST(item_list), 0);
|
||||
|
||||
model = GTK_TREE_MODEL(item_list->list_store);
|
||||
return gtk_tree_model_iter_n_children(model, NULL);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gnc_item_list_clear (GncItemList *item_list)
|
||||
|
@ -61,6 +61,8 @@ GType gnc_item_list_get_type (void);
|
||||
|
||||
GnomeCanvasItem *gnc_item_list_new (GnomeCanvasGroup *parent, GtkListStore *shared_store);
|
||||
|
||||
gint gnc_item_list_num_entries (GncItemList *item_list);
|
||||
|
||||
void gnc_item_list_clear (GncItemList *item_list);
|
||||
|
||||
void gnc_item_list_append (GncItemList *item_list, char *string);
|
||||
|
Loading…
Reference in New Issue
Block a user