Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negadoctor: remember last selected notebook page #419

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions data/anselconfig.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -1833,6 +1833,12 @@
<type>int</type>
<default>0</default>
<shortdescription>last page selected in channel mixer rgb notebook</shortdescription>
</dtconfig>
<dtconfig>
<name>plugins/darkroom/negadoctor/gui_page</name>
<type>int</type>
<default>0</default>
<shortdescription>last page selected in negadoctor notebook</shortdescription>
</dtconfig>
<dtconfig>
<name>plugins/darkroom/retouch/default_algo</name>
Expand Down
9 changes: 9 additions & 0 deletions src/iop/negadoctor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,8 +1043,17 @@ void gui_init(dt_iop_module_t *self)
gtk_widget_set_tooltip_text(g->film_stock, _("toggle on or off the color controls"));

gtk_box_pack_start(GTK_BOX(self->widget), GTK_WIDGET(g->notebook), FALSE, FALSE, 0);
const int active_page = dt_conf_get_int("plugins/darkroom/negadoctor/gui_page");
gtk_widget_show(gtk_notebook_get_nth_page(g->notebook, active_page));
gtk_notebook_set_current_page(g->notebook, active_page);

}

void gui_cleanup(struct dt_iop_module_t *self)
{
dt_iop_negadoctor_gui_data_t *g = (dt_iop_negadoctor_gui_data_t *)self->gui_data;
dt_conf_set_int("plugins/darkroom/negadoctor/gui_page", gtk_notebook_get_current_page (g->notebook));
}

void gui_changed(dt_iop_module_t *self, GtkWidget *w, void *previous)
{
Expand Down
Loading