Bugfixes, Dual page input now works correct, before always the left page was selected, even if you clicked on the right page

git-svn-id: svn://svn.code.sf.net/p/xournal/svn/trunk@190 9fe2bcd3-a095-4d8b-a836-9b85dc8d7627
presentation
andreasb123 14 years ago
parent 144f6108d1
commit 049562202e
  1. 1334
      .cproject
  2. 6
      .project
  3. 7
      .pydevproject
  4. 13
      src/control/Control.cpp
  5. 7
      src/control/Control.h
  6. 7
      src/gui/PageView.cpp
  7. 3
      src/gui/pageposition/PagePositionCache.h
  8. 2
      src/gui/widgets/XournalWidget.cpp
  9. 1
      ui/Makefile.in
  10. 5
      ui/main.glade
  11. 12
      ui/settings.glade

File diff suppressed because it is too large Load Diff

@ -5,6 +5,11 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.linuxtools.cdt.autotools.core.genmakebuilderV2</name>
<arguments>
@ -72,5 +77,6 @@
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2</nature>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
</pydev_project>

@ -838,18 +838,21 @@ void Control::invokeLater(ActionType type) {
/**
* Fire page selected, but first check if the page Number is valid
*
* @return the page ID or -1 if the page is not found
*/
void Control::firePageSelected(PageRef page) {
int Control::firePageSelected(PageRef page) {
XOJ_CHECK_TYPE(Control);
this->doc->lock();
int p = this->doc->indexOf(page);
int pageId = this->doc->indexOf(page);
this->doc->unlock();
if (p == -1) {
return;
if (pageId == -1) {
return -1;
}
DocumentHandler::firePageSelected(p);
DocumentHandler::firePageSelected(pageId);
return pageId;
}
void Control::firePageSelected(int page) {

@ -123,7 +123,12 @@ public:
bool searchTextOnPage(const char * text, int p, int * occures, double * top);
void firePageSelected(PageRef page);
/**
* Fire page selected, but first check if the page Number is valid
*
* @return the page ID or -1 if the page is not found
*/
int firePageSelected(PageRef page);
void firePageSelected(int page);
void addDefaultPage();

@ -120,7 +120,12 @@ void PageView::deleteViewBuffer() {
bool PageView::containsPoint(int x, int y) {
XOJ_CHECK_TYPE(PageView);
return this->layout.getLayoutAbsoluteX() <= x && this->layout.getLayoutAbsoluteX() + this->getDisplayWidth() >= this->layout.getLayoutAbsoluteX() && this->layout.getLayoutAbsoluteY() <= y && this->layout.getLayoutAbsoluteY() + this->getDisplayHeight() >= this->layout.getLayoutAbsoluteY();
bool leftOk = this->layout.getLayoutAbsoluteX() <= x;
bool rightOk = x <= this->layout.getLayoutAbsoluteX() + this->getDisplayWidth();
bool topOk = this->layout.getLayoutAbsoluteY() <= y;
bool bottomOk = y <= this->layout.getLayoutAbsoluteY() + this->getDisplayHeight();
return leftOk && rightOk && topOk && bottomOk;
}
bool PageView::searchTextOnPage(const char * text, int * occures, double * top) {

@ -22,6 +22,9 @@ public:
private:
XOJ_TYPE_ATTRIB;
/**
* PagePositionCache ID
*/
int ppId;
friend class PagePositionHandler;

@ -350,6 +350,8 @@ gboolean gtk_xournal_button_press_event(GtkWidget * widget, GdkEventButton * eve
xournal->currentInputPage = pv;
pv->translateEvent((GdkEvent*) event, xournal->x, xournal->y);
INPUTDBG2("gtk_xournal_button_press_event (pv->onButtonPressEvent) return");
xournal->view->getDocument()->indexOf(pv->getPage());
return pv->onButtonPressEvent(widget, event);
}

@ -274,6 +274,7 @@ uidir = $(datadir)/xournalpp/ui
ui_DATA = \
about.glade \
export.glade \
goto.glade \
images.glade \
main.glade \
page-background-color.glade \

@ -753,6 +753,7 @@
<property name="use_action_appearance">False</property>
<property name="label" translatable="yes">Select Object</property>
<property name="use_underline">True</property>
<property name="draw_as_radio">True</property>
</widget>
</child>
<child>
@ -1106,8 +1107,8 @@
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<accelerator key="plus" signal="activate" modifiers="GDK_CONTROL_MASK"/>
<accelerator key="KP_Add" signal="activate" modifiers="GDK_CONTROL_MASK"/>
<accelerator key="plus" signal="activate" modifiers="GDK_CONTROL_MASK"/>
</widget>
</child>
<child>
@ -1118,8 +1119,8 @@
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<accelerator key="KP_Subtract" signal="activate" modifiers="GDK_CONTROL_MASK"/>
<accelerator key="minus" signal="activate" modifiers="GDK_CONTROL_MASK"/>
<accelerator key="KP_Subtract" signal="activate" modifiers="GDK_CONTROL_MASK"/>
</widget>
</child>
<child>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<glade-interface>
<!-- interface-requires gtk+ 2.6 -->
<!-- interface-requires gtk+ 2.24 -->
<!-- interface-naming-policy project-wide -->
<widget class="GtkDialog" id="settingsDialog">
<property name="can_focus">False</property>
@ -1746,7 +1746,7 @@ Here you can disable your touchscreen.&lt;/i&gt;</property>
<widget class="GtkLabel" id="label33">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Cursor&lt;/b&gt;</property>
<property name="label" translatable="yes">&lt;b&gt;Cursor Theme&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
@ -1783,13 +1783,9 @@ Here you can disable your touchscreen.&lt;/i&gt;</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<widget class="GtkCheckButton" id="cbBigCursor">
<property name="label" translatable="yes">Big cursor for pen</property>
<widget class="GtkComboBox" id="cbCursorTheme">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="draw_indicator">True</property>
<property name="can_focus">False</property>
</widget>
<packing>
<property name="expand">True</property>

Loading…
Cancel
Save