mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-29 04:04:07 -06:00
Make "rename page" action work again.
In r15774 the structure of main window notebook tab labels changed, but in gnc_main_window_cmd_actions_rename_page() the GtkLabel lookup was still hard-coded and has not been adjusted. Use main_window_find_tab_items() instead. BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16934 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
440ef0516a
commit
ac20287d9a
@ -3238,8 +3238,7 @@ gnc_main_window_cmd_actions_rename_page (GtkAction *action, GncMainWindow *windo
|
||||
{
|
||||
GncMainWindowPrivate *priv;
|
||||
GncPluginPage *page;
|
||||
GtkWidget *tab_hbox, *widget, *label = NULL, *entry = NULL;
|
||||
GList *children, *tmp;
|
||||
GtkWidget *label, *entry;
|
||||
|
||||
ENTER(" ");
|
||||
priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
|
||||
@ -3249,21 +3248,8 @@ gnc_main_window_cmd_actions_rename_page (GtkAction *action, GncMainWindow *windo
|
||||
return;
|
||||
}
|
||||
|
||||
tab_hbox = gtk_notebook_get_tab_label(GTK_NOTEBOOK(priv->notebook),
|
||||
page->notebook_page);
|
||||
children = gtk_container_get_children(GTK_CONTAINER(tab_hbox));
|
||||
for (tmp = children; tmp; tmp = g_list_next(tmp)) {
|
||||
widget = tmp->data;
|
||||
if (GTK_IS_LABEL(widget)) {
|
||||
label = widget;
|
||||
} else if (GTK_IS_ENTRY(widget)) {
|
||||
entry = widget;
|
||||
}
|
||||
}
|
||||
g_list_free(children);
|
||||
|
||||
if (!label || !entry) {
|
||||
LEAVE("Missing label or entry.");
|
||||
if (!main_window_find_tab_items(window, page, &label, &entry)) {
|
||||
LEAVE("can't find required widgets");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user