glade

Closing window is not quitting the application

核能气质少年 提交于 2019-12-11 04:13:05
问题 I was reading about builder.connect_signals which maps handlers of glade files with methods in your python file. Apparently works, except for the Main Window, which is not destroying when you close it. If you run it from terminal is still running and have to Ctrl-C to completely close the application. Here is my python code: #!/usr/bin/env python import pygtk import gtk #from gi.repository import Gtk import gtk.glade class Mixer: def __init__(self): self.gladefile = "mixer3.glade" self.wTree

How to change the main window widgets with Python/Glade?

旧城冷巷雨未停 提交于 2019-12-11 00:49:56
问题 I am more or less new to GUI programming (just some tiny bit of Perl/Tk experience); I am new to Python, and I am new to Glade, both of which I would like to learn how to use. I have a program in mind which would require one single window, but this window's contents (widgets and all) would have to change with each step that the user has completed (like in one of the installers for Windows/Mac where you keep clicking "Next"). The trouble is that already now (at the no-code-stage) I am stumped

Python Gtk Glade app structure. What are the best practises?

て烟熏妆下的殇ゞ 提交于 2019-12-11 00:33:37
问题 Since I discovered Python, I've created four little applications with Glade + Python + Gtk. For each of them, the structure is a folder, with the name of the app, containing : an "images" folder a main .py file which contains all classes that handle all project windows a .glade file which contains all windows (main app window, about dialog, config dialog, etc.) a style.css file (other files as sqlite file and/or json file if neccessary) Now I'm wondering if this organization is a good

Creating widgets that automatically update in gtk while still being able to control other widgets

孤街浪徒 提交于 2019-12-10 22:59:10
问题 Ok, In one of my side projects in my process to learn more Python I have been trying to build a gtk app to monitor water temp and update a text box within a gtk app at 10 second intervals. I also want to be able to have a countdown timer that can be displayed in gtk while refreshing every second. I have a GUI built by using glade and gtk but I ran into the issue of the app locking up and becoming unresponsive. After a bit of reading I have figured out that I am going to have to use threading.

How do I connect glade signals using GtkBuilder in C#?

懵懂的女人 提交于 2019-12-10 22:57:49
问题 In python, I could just do builder.connect_signals(self) . It doesn't seem like this method exists in C#, and after looking at the GtkBuilder documentation, it looks like python is the exception, rather than the rule. How would I accomplish the same thing in C#? 回答1: Right now Gtk.Builder is not fully implemented in the current version of Gtk# (2.12). This thread explains the current situation. So once Gtk# 2.14 is released, you can just do: builder.Autoconnect (this); In the meantime you

Some questions about switches in python

拟墨画扇 提交于 2019-12-10 19:16:47
问题 This is my first Question here at StackOverflow, so please be patient with me if some info isn't present or I missed something important, but anyways i'll do my best :) Recently I started to code in Python2.7, so I'm not very good at it. While playing with PyGtk, PyGObject, Glade, etc I found something particular about switches (Haven't tried with any other widget, so I don't know if it happens somewhere else. Most likely it doesn't, I hope...) I made a very basic GUI with a single "window"

Using a predefined response ID in a GtkDialog in a GtkBuilder XML?

风格不统一 提交于 2019-12-10 14:42:51
问题 Is there any way to use a predefined response (e.g., GTK_RESPONSE_OK ) in a GtkDialog , without hard-coding the ID? Glade generates XML with "0" there by default, and gives me a numeric entry. While I suppose I could enter -5, that seems to defeat the point of having a constant. The Glade XML looks like this: <action-widgets> <action-widget response="0">cancel-button</action-widget> <action-widget response="0">connect-button</action-widget> </action-widgets> Even the example in the docs:

drawing a pixbuf onto a drawing area using pygtk and glade

末鹿安然 提交于 2019-12-10 11:31:20
问题 i'm trying to make a GTK application in python where I can just draw a loaded image onto the screen where I click on it. The way I am trying to do this is by loading the image into a pixbuf file, and then drawing that pixbuf onto a drawing area. the main line of code is here: def drawing_refresh(self, widget, event): #clear the screen widget.window.draw_rectangle(widget.get_style().white_gc, True, 0, 0, 400, 400) for n in self.nodes: widget.window.draw_pixbuf(widget.get_style().fg_gc[gtk

How to use a Glade UI (.glade file) in a Java Gnome/GTK program?

一世执手 提交于 2019-12-10 09:43:31
问题 I've did a research on the Internet looking for tutorials/documentations to explain me how to use a UI designed in Glade in a Java Gnome project, but no luck. I already know how to create a UI from the code using the Java Gnome/GTK. Anyway, I'd like to use a Glade UI that I've created in a Java Gnome/Gtk project, but I have no idea from where to start. Please tell me: which packages I need to install; how to integrate the UI I've create with Glade (the .glade file) with my Java Gnome/Gtk

Linux / C++ Help with glade3 and gtkmm

≯℡__Kan透↙ 提交于 2019-12-08 03:30:57
问题 Here is a C application source code, which creates GUI using Glade3 and GTK2+: // gcc -o simple simple.c $(pkg-config --cflags --libs gtk+-2.0 gmodule-2.0) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <gtk/gtk.h> GtkBuilder *builder; GtkWidget *window1; G_MODULE_EXPORT void on_window1_destroy (GtkObject *object, gpointer user_data) { gtk_main_quit(); } G_MODULE_EXPORT void on_button2_clicked (GtkObject *object, gpointer user_data) { gtk_main_quit(); } G_MODULE_EXPORT