Giter VIP home page Giter VIP logo

Comments (6)

ralf3u avatar ralf3u commented on July 24, 2024

Can you handle this issue or should I report it upstream to the GTK developers?

from geany-plugins.

elextr avatar elextr commented on July 24, 2024

This report should be to https://github.com/xiota/geany-preview, it is not part of the Geany project.

from geany-plugins.

ralf3u avatar ralf3u commented on July 24, 2024

The issue is about the behavior of any plugin-tab in the sidebar. Plugins have no influence on the behavior about the release of a click on the tab-title, so it belongs to Geany.

from geany-plugins.

elextr avatar elextr commented on July 24, 2024

To be clear, Geany does not know anything about the existence of any plugin or the contents of any tabs it adds to Geany notebooks, even plugins included in the Geany project itself. Therefore plugins are entirely responsible for the behaviour of their UI. Plugins should connect to the relevant signal eg "switch-page" or "focus-tab" or "clicked" on the tab or whatever and then implement the behaviour they require.

Remember I said elsewhere the tab and the contents are different things, and in standard GTK the tab can be focussed instead of the content by clicking it when the page is current. That is the standard behaviour of GTK Notebook, and is how the Documents and Symbols tabs behave. Geany modifies it for the editor notebook to move the focus by intercepting the signals and returning focus to the content (the editor widget) as well as other actions the click might invoke, and the plugin can do so for its tabs if it wishes.

Geany provides a plugin API and that is all the interaction it has with plugins, it has no knowledge of what a plugin might do or what its UI is. A plugin can add pages to the sidebar notebook using standard GTK calls and techniques without any interaction with Geany as the notebook widget is exposed in the API.

from geany-plugins.

ralf3u avatar ralf3u commented on July 24, 2024

Thank you for your explication. OK, the issue does not belong to the Geany project but to the plugin Preview.

Do you know if it is possible to solve the issue in the plugin Preview like this, that after a release of a click on the tab-title of the Preview tab the content of the tab is in focus and not the tab itself?

Plugins should connect to the relevant signal eg "switch-page" or "focus-tab" or "clicked" on the tab or whatever and then implement the behaviour they require.

I have no idea how to program software. Does something exist like "focus-content"?

Thank you for an answer.

from geany-plugins.

elextr avatar elextr commented on July 24, 2024

Does something exist like "focus-content"?

In GTK (and most other GUI systems) the concept of "focus" is the widget that is going to get keyboard input, the mouse can move around and point to things before a button click, but there is not a similar capability for the keyboard, a widget has "focus" and does not depend on the position of the mouse. So focus is usually on something in the content, like the search entry in the Symbols tab, or the tree. But you need to know it exists. You can see some of the problems around this even for built-in parts of Geany when the contents change in #3678.

from geany-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.