I'm working on a plugin for the text editor Gedit in which I need to know when a new document is opened. Is there a signal which is emitted when that happens? The method do_activate in the ViewActivatable extension point is called when a new view (tab) is created but when a document is opened in an empty Gedit session the tab "Unsaved Document 1" is reused so no new view is created.
Detecting when new document is opened in Gedit plugin
20 Views Asked by August Karlstrom At
1
There are 1 best solutions below
Related Questions in GTK
- Do GTK file chooser dialogs come with localized strings for buttons and titles?
- Why does GTK beep when calling `gtk_entry_set_text` (while resizing a window)?
- Distributing a GTK4 Windows application
- Callback function doesn't modify widget
- getting arguments with g_signal_connect GTK4
- ValueError: Namespace Xdp not available
- How do I link gtk/gtk.h to my compiler in VSCode
- Using GTK v0.18.1 on rust to draw
- How to set transparent background for gtk_plug_new window
- GTK Cairo. Why gtk_widget_queue_draw called from function (in iddle callback) does not work?
- GTK4 Window Created from XML, Closes Immediately After Run()
- How do I receive UDP broadcast packets using GTK / GIO?
- Install Gtk 3.0 problem with depencies in linux
- Ubuntu 22.04 libgtk-3.so: undefined reference to symbol 'gdk_window_hide'
- GTK: "Object with ID not found" error, but the ID is empty
Related Questions in GEDIT
- Why does gedit randomly not maintain/apply preferences?
- How to edit a sqlite3 large text field with paragraphs & newlines?
- Detecting when new document is opened in Gedit plugin
- Get style of text from Gedit plugin
- Unicode arrow characters used in Kali gedit
- Bash script is waiting to open second file in gedit until I close the first one
- I want to record a timestamp in gedit app (open terminator then write "gedit" hit enter)
- Linux gedit plugins "go to definition"
- using groff inside of a flatpak container
- Snippets for Gedit: how to change the text in a placeholder to make the letters uppercase?
- gedit - ENable middle-mouse copy/paste
- open gedit with shell script and then do another process after closing gedit
- install gedit with a specific libboost version
- Custom line break in gedit 3.36.2
- Using awk with gedit external tools
Related Questions in GEDIT-PLUGIN
- Detecting when new document is opened in Gedit plugin
- Get style of text from Gedit plugin
- Unicode arrow characters used in Kali gedit
- Linux gedit plugins "go to definition"
- (MATE) pluma "PLUMA_SELECTED_TEXT" is missing from environment
- How can I create a gedit plugin using python?
- Is it possible to use gedit text editor with Java LibGDX?
- Add Java import statements automatically via script
- How to apply style to all paragraphs with upper case text?
- gedit plugin error - plugin loader 'python3' was not found
- How to save current document of Gedit using external tools?
- How to best configure gedit to work with Django?
- Accel not working in gedit 3 plugin
- Emacs-like line navigation in gedit
- How do I troubleshoot ipython-listener and/or gedit's ipython plugin?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Gedit changes the window title to the title of the open document. This happens whenever you open or rename a document or switch between document tabs. I don't know exactly how a plugin is executed, but I believe it is possible to use
Gtk.Label.connect("notify::label", your_callback_function)in Gtk.Label responsible for the title to detect this change and thus know if a new document has been open.Of course, you will need to filter changes that occur due to switching tabs or renaming the file, but that doesn't seem like a big problem to me.