Added d-bus method for active tab number
Added new d-bus method org.kde.okular.activeTab
, which returns the number of the active document tab.
This is necessary to get the active document via d-bus, when documents are shown in tabs. In that case, there is only one bus called org.kde.okular-$PID
, which has multiple objects called /okular$number
(/okular
, /okular2
, ...). Each object represents a document in a tab. Before this MR is was not possible to find the active tab via d-bus (and therefore the currently shown document of that instance).
Maybe another call can be added to return the tab's "id" (in lack of a better word), which returns the number used in the tab's d-bus object. The d-bus object of the second open tab gets the initial name /okular2
, but it is kept even if the tab position changes