Skip to content

Commit

Permalink
Merge branch 'release-1.2' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandlo committed Jan 12, 2024
2 parents c2b7f65 + e5e00df commit 1f1265a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ override_dh_dwz:
dh_dwz --no-dwz-multifile

override_dh_auto_configure:
dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo
dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo
13 changes: 9 additions & 4 deletions src/core/gui/dialog/backgroundSelect/PdfPagesDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ PdfPagesDialog::PdfPagesDialog(GladeSearchpath* gladeSearchPath, Document* doc,
auto* pv = new PdfElementView(elements.size(), p, this);
elements.push_back(pv);
}
if (doc->getPdfPageCount() > 0) {
setSelected(0);
}

for (size_t i = 0; i < doc->getPageCount(); i++) {
PageRef p = doc->getPage(i);
Expand All @@ -45,7 +42,7 @@ PdfPagesDialog::PdfPagesDialog(GladeSearchpath* gladeSearchPath, Document* doc,
}
}

updateOkButton();
gtk_widget_set_sensitive(get("buttonOk"), false);

g_signal_connect(get("cbOnlyNotUsed"), "toggled", G_CALLBACK(onlyNotUsedCallback), this);
g_signal_connect(get("buttonOk"), "clicked", G_CALLBACK(okButtonCallback), this);
Expand Down Expand Up @@ -105,3 +102,11 @@ void PdfPagesDialog::show(GtkWindow* parent) {

BackgroundSelectDialogBase::show(parent);
}

void PdfPagesDialog::setSelected(int selected) {
BackgroundSelectDialogBase::setSelected(selected);

if (selected < this->elements.size()) {
gtk_widget_set_sensitive(get("buttonOk"), true);
}
}
1 change: 1 addition & 0 deletions src/core/gui/dialog/backgroundSelect/PdfPagesDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class PdfPagesDialog: public BackgroundSelectDialogBase {

public:
void show(GtkWindow* parent) override;
void setSelected(int selected) override;
void updateOkButton();
static double getZoom();
size_t getSelectedPage();
Expand Down

0 comments on commit 1f1265a

Please sign in to comment.