gtk3

Reopen window throws Gtk-CRITICAL **: gtk_widget_get_window: assertion 'GTK_IS_WIDGET (widget)' failed

最后都变了- 提交于 2021-02-05 08:44:08
问题 I have simple python3 + gtk3 code, which connects to dbus and listen for all events. When user click on icon in tray, he must see window with all showed earlier events. Code(I don't know where is problem and code size > 100 lines): https://github.com/rakshazi/notify-feed/blob/master/main.py How to reproduce: Run python main.py L117 Click on app icon in tray - will be opened window, it can be empty or with some items if any notifications was shown after run. L83 Close window. L93 Retry step #2

How to disable buttons in GTK3

筅森魡賤 提交于 2021-02-04 17:23:27
问题 Windows API has a function called EnableWindow that disables controls so user can't interact with them any more. Is there an equivalent for GTK3 or GTK3++? 回答1: gtk_widget_set_sensitive (widget, FALSE); Note that if you need to check whether a widget is sensitive, gtk_widget_get_sensitive() returns the value set with the above function and gtk_widget_is_sensitive() will tell you whether the widget really is sensitive -- this is affected by parent widgets sensitivity as well. 回答2: For specific

How to Embed a VTK Plot in GTK GLArea Widget

社会主义新天地 提交于 2021-01-29 15:21:25
问题 How a VTK 3D plot can be plotted in a GTK GLArea widget? The examples that I found so far are for GTK2 widgets and they do not work for GTK3. System and software information: Python: 3.8.6 (x64) - GTK3 - vtk: 8.2 (x64) - Windows 10 (x64) 来源: https://stackoverflow.com/questions/65517233/how-to-embed-a-vtk-plot-in-gtk-glarea-widget

Query cursor position with GTK

不问归期 提交于 2021-01-29 07:57:32
问题 Is there a way to query the cursor position using the GTK C libraries? I am writing a program where I need to read out the position of the cursor in real time (either through a callback function or by polling the values to look for change). I have scanned through the GTK documentation, but I couldn't find anything obvious that exposes the cursor position. I am currently writing this program using the GTK C libraries because a) I already have some code written in C to interface with the low

gtk_list_store_clear() function raises Segmentation Fault in C

北城以北 提交于 2021-01-29 03:00:20
问题 I am writing a program using GTK in C. I am using GtkListStore to display some data coming from a database. After a particular signal I want to remove all the rows in the GtkListStore. I used gtk_list_store_clear() function, but it raises Segmentation Fault. What is wrong with my code? //Globally declared GtkListStore *liststore2; //Inside main() function liststore2 = GTK_LIST_STORE(gtk_builder_get_object(builder, "liststore2")); //Inside signal handler function gtk_list_store_clear

Getting a GTK Label to dislay an int in C

谁都会走 提交于 2021-01-28 12:48:30
问题 I'm trying to update a label with an integer value depending on whether I press a subtract or add button. Its not working however and I'm pretty sure it has something to do with how I pass my GTK_LABEL(sum) around, and the int I'm trying to update into it. What worked before was passing an address to the int to the button function, and then g_print ing it into the terminal, via the best answer to this question. Here is the full error message, and here's my code so far. #include <gtk/gtk.h>

Getting a GTK Label to dislay an int in C

妖精的绣舞 提交于 2021-01-28 12:47:25
问题 I'm trying to update a label with an integer value depending on whether I press a subtract or add button. Its not working however and I'm pretty sure it has something to do with how I pass my GTK_LABEL(sum) around, and the int I'm trying to update into it. What worked before was passing an address to the int to the button function, and then g_print ing it into the terminal, via the best answer to this question. Here is the full error message, and here's my code so far. #include <gtk/gtk.h>

How to fix: PyInstaller in MSYS2 MinGW 'Your platform is not yet supported'

↘锁芯ラ 提交于 2021-01-27 12:59:44
问题 I'm trying to package my GTK3+ Python 3 script using PyInstaller on Windows 10. GTK3+ and the Python bindings are installed and working, using MSYS2 MinGW as per the GTK+ instructions. In MSYS2 MinGW, when I type: pip3 install pyinstaller I get the error: Your platform is not yet supported. Please define constant PYDYLIB_NAMES for your platform. So I attempted to install PyInstaller manually from Windows PowerShell by downloading and extracting the tar.gz file for PyInstaller and then running

glade: How to edit pages in a GtkAssistant

孤街浪徒 提交于 2021-01-27 06:46:26
问题 I would like to add content to the pages of an Assistant window (GtkAssistant) in Glade. When I add a new assistant, no children appear under the GtkAssistant. Further I cannot select (or delete or change) the contents of the 3 default pages Glade produces -- I can only select the assistant itself. So, I try increasing the number of pages to 5 and then adding a widget to one of the new pages. It gives me the error message: "Widgets of type Assistant need placeholders to add children." Is this

glade: How to edit pages in a GtkAssistant

非 Y 不嫁゛ 提交于 2021-01-27 06:44:17
问题 I would like to add content to the pages of an Assistant window (GtkAssistant) in Glade. When I add a new assistant, no children appear under the GtkAssistant. Further I cannot select (or delete or change) the contents of the 3 default pages Glade produces -- I can only select the assistant itself. So, I try increasing the number of pages to 5 and then adding a widget to one of the new pages. It gives me the error message: "Widgets of type Assistant need placeholders to add children." Is this