gtk

Gtk.Scale value-changed signal vs drag-end?

淺唱寂寞╮ 提交于 2020-01-03 17:33:30
问题 Question in brief: Does the Gtk.Scale widget have a drag-end signal as opposed to value-changed ? I'm using a gtk scale widget (a slider) and according to the docs I should use the value-changed signal to detect when the user changes the slider. Now the user grabs the slider and drags it to their desired value. When they have finished choosing their desired value (i.e. finished dragging), I want to do some stuff. However, the value-changed signal gets emitted each time the value changes

Java/Swing: Desktop.open() causes GTK-ERROR

我是研究僧i 提交于 2020-01-03 16:47:03
问题 I am currently developing a Swing Desktop application. This application is also using a tray icon which is handled by SystemTray of dorkbox. Now I need to open a file with the default application. To achieve this I am using the Desktop.open() method of AWT like this. if (Desktop.isDesktopSupported()) { System.out.println("Get desktop."); Desktop desktop = Desktop.getDesktop(); System.out.println("Got desktop."); desktop.open(file); } But now here comes the problem: On some devices (which

How to change the layout of a Gtk application on fullscreen?

别等时光非礼了梦想. 提交于 2020-01-03 10:07:19
问题 I'm developing another image viewer using Python and Gtk and the viewer is currently very simple: it consists of a GtkWindow with a GtkTreeView on the left side displaying the list of my images, and a GtkImage on the right side, displaying the actual image. So far, so good. Now, I would like to go fullscreen, and display only the image with a black background, etc. I can see several ways of doing this: I can hide() the window, and display a big GtkImage instead, but I'm loosing all the stuff

how to create from month Gtk.Calendar a week calendar and display the notes in each day in python

走远了吗. 提交于 2020-01-03 06:41:32
问题 I have created a calendar app with month and week view in python. In month view, I can write notes in each day, store them in a dictionary and save the dictionary in to disk so I can read it any time. Now I am working on week view.I managed to display the week of the month regard the day I have picked from month view (the number of the week and the days, Monday to Sunday).In code, I used Gtk.Label for the number of the week and the days of the week attached them in a Gtk.Grid . Beneath each

Can't set CSS to specified widget in GTK+

白昼怎懂夜的黑 提交于 2020-01-03 04:21:12
问题 I'm using Vala with GTK+ and now I'm trying to add custom CSS to specified widget. I can add fe. backgroudn to GtkWidget but not for #sidebar #sidebar { //It doesn't work color: white; } GtkWindow { // It works background-color: red; } I'm adding class to widget like that: sidebar = new Gtk.Label("Hello"); sidebar.set_name("sidebar"); And it's changes color to GtkWindow, but not for this label. Any ideas? 回答1: I haven't programmed in Vala, but you should add class to StyleContext. This is in

Converting PyGTK to exe

回眸只為那壹抹淺笑 提交于 2020-01-03 02:42:31
问题 I've been looking around for hours now. The only thing that makes sense to me is http://fnch.users.sourceforge.net/portablepygtkwindows.html But it takes up >40MB of space and it is too big for me. Other tutorials are either too complicated for me to go through them or the results I obtained didn't work. I've tried py2exe but the import gtk fails. I've tried pyinstaller. The GTK files were included but not the glade file. I would wish to have it all in a single standalone .exe. But now my

How to add external references in MonoDevelop?

安稳与你 提交于 2020-01-03 02:21:28
问题 I've downloaded a charting library called NPlot and I have no idea how to add it as a reference in a GTK# application I'm currently making in MonoDevelop. There is no option in the Edit References window that you could add an external reference apart from the listed ones. How do you add an external reference in MonoDevelop? 回答1: Being fairly new to Ubuntu (consequently, to using apps), I found it quite challenging to grapple with the dilemma above. After hours of searching (almost half a day

gtk custom spin button

我的未来我决定 提交于 2020-01-02 23:51:12
问题 I want to make a gtk SpinButton, but for inputting dates. Is there an easier way to input dates into GTK? If not, how can I create a SpinButton look-alike, but whose output is text representing dates instead of integers? Ideally I'd re-use the arrows, the clicks, the integration with the adjustment, etc. I really just need the output to look different, as I can even represent dates as integers. 回答1: The calendar is a bit large, but you can find code putting it in a popup. Personally I use a

Can gtk menus displayed via gtk_menu_popup release focus?

回眸只為那壹抹淺笑 提交于 2020-01-02 16:22:24
问题 I'm refactoring some code that normally requires the user to click a button for a popup menu to appear (it appears beside the button), what I'm trying to do is show the popup menu if the user hovers the mouse over the button icon for a preset duration and hide it again if the user moves onto another button icon. However, activating the menu via gtk_menu_popup steals mouse and keyboard focus, I have made little progress trying to grab focus for the button widget. Is it possible to return focus

Update a Gtk.ProgressBar from another thread or process

青春壹個敷衍的年華 提交于 2020-01-02 14:09:13
问题 I have a GUI with a progressbar. It should show the progress of the work a second thread does. I would like to have something like an event the thread can send to the GUIs progressbar immediatly on each step of the work. But I don't see how this could be done. Python itself offers a Event class for threading situations. But it would block the GUI main thread because of the Event.wait() methode. How does it change the situaton and possible solutions if the second thread is a process? My