glade

How do I set a listStore model on pre-created listbox from Glade?

馋奶兔 提交于 2019-12-25 12:49:10
问题 Apparently the "proper" way to have items in a GTKListBox or Treeview is constructing with a listStore model, in the constructor. What if I want to use Glade GUI project, in which a list box is already created, and referenced by builder.get_object("appsDocumentListBox") ? Can I set the model after Gtk.builder created the window, or is there a better way to do this? I'm also wondering what the performance improvement is of using the ListStore vs manually adding with row = Gtk.ListBoxRow() ,

Glade and deprecated gtk properties

家住魔仙堡 提交于 2019-12-25 04:27:33
问题 i've been trying to run a software where i've built the UI by Glade. Glade then transform the UI in an XML file, and then in Python i just load that file. But i've a problem with (maybe) deprecated properties of gtk objects. This is what the interpreter says: Unknown property: GtkScrolledWindow.min-content-width self.__builder.add_from_file('UI2.glade') /home/jimmy/Documenti/linguaggi_dinamici/progetto/collega_GUI.py:37: GtkWarning: Unknown property: GtkScrolledWindow.min-content-height self.

Find glade gtk3 widget by unique id

妖精的绣舞 提交于 2019-12-25 04:15:40
问题 In glade I can give a unique id to each widget, however in the c-code, I have no idea how I can make use of these id's. The method "gtk_widget_get_name" seems to return something else. At least currently I only get the typenames from it, e.g. "GtkGrid", "GtkComboBoxText", "GtkStatusbar" ... thats probably the default if I did not set a different name in the c-code. So how can I read the id of a gtkwidget, which I typed into glade ? 回答1: The Glade ID is used with gtk_builder_get_object() to

R: gWidgetsRGtk2: gladeXMLNew() function not found

◇◆丶佛笑我妖孽 提交于 2019-12-24 09:39:19
问题 I'm trying to run the first two lines of the gWidgetsRGtk2 examples but I cannot find glade libraries in CRAN . So gladeXMLNew() function fails. Is there anybody who could help ? ## This requires glade libraries to be installed before compiling RGtk2 options("guiToolkit"="RGtk2") library(RGtk2) library(gWidgets) library(gWidgetsRGtk2) gladeFile <- system.file("examples/t.test.glade",package="gWidgetsRGtk2") GUI <- gladeXMLNew("t.test.glade") Thank you in advance 回答1: "Glade is a RAD tool to

Query pkg-config variable through autotools

☆樱花仙子☆ 提交于 2019-12-23 16:18:46
问题 To install a catalog file, I'd like to get the directory for Glade (an UI designer) like so: $ pkg-config --variable=catalogdir gladeui-2.0 /usr/share/glade/catalogs but in a variable inside my Makefile.am. Is there a (portable) way to do this? 回答1: Get this value in configure.ac . I think the latest version of pkg-config is 0.28. Let's assume that 0.25 or above is good enough: configure.ac ... PKG_PROG_PKG_CONFIG([0.25]) # check and set $PKG_CONFIG PKG_CHECK_MODULES([GLADEUI],[gladeui-2.0],

Python GUI (glade) to display output of shell process

自古美人都是妖i 提交于 2019-12-22 23:11:28
问题 I'm writing a python application that runs several subprocesses using subprocess.Popen objects. I have a glade GUI and want to display the output of these commands (running in subprocess.Popen) in the gui in real time. Can anyone suggest a way to do this? What glade object do I need to use and how to redirect the output? 回答1: Here is a link that also displays another way of doing this. I found this to be very insightful, maybe someone else can use these tips. http://pygabriel.wordpress.com

Python GUI (glade) to display output of shell process

走远了吗. 提交于 2019-12-22 23:11:23
问题 I'm writing a python application that runs several subprocesses using subprocess.Popen objects. I have a glade GUI and want to display the output of these commands (running in subprocess.Popen) in the gui in real time. Can anyone suggest a way to do this? What glade object do I need to use and how to redirect the output? 回答1: Here is a link that also displays another way of doing this. I found this to be very insightful, maybe someone else can use these tips. http://pygabriel.wordpress.com

Python GUI (glade) to display output of shell process

不羁的心 提交于 2019-12-22 23:11:10
问题 I'm writing a python application that runs several subprocesses using subprocess.Popen objects. I have a glade GUI and want to display the output of these commands (running in subprocess.Popen) in the gui in real time. Can anyone suggest a way to do this? What glade object do I need to use and how to redirect the output? 回答1: Here is a link that also displays another way of doing this. I found this to be very insightful, maybe someone else can use these tips. http://pygabriel.wordpress.com

Glade3 and C programming

牧云@^-^@ 提交于 2019-12-22 12:37:29
问题 I am trying to create a simple app that accepts two integer and displays Sum of two on clicking "Sum" button And I am new to Glade3, so you can expect blunders /* * Compile me with: * gcc -o test test.c $(pkg-config --cflags --libs gtk+-2.0 gmodule-2.0) */ #include <gtk/gtk.h> #include <stdio.h> #include <stdlib.h> #include <string.h> GtkBuilder *builder; GtkWidget *window; GError *error = NULL; void on_button1_clicked(GtkButton *button1, GtkEntry *entry1, GtkEntry *entry2, GtkEntry *entry3 )

Load GTK-Glade translations in Windows using Python/PyGObject

走远了吗. 提交于 2019-12-22 12:19:19
问题 I have a Python script that loads a Glade-GUI that can be translated. Everything works fine under Linux, but I am having a lot of trouble understanding the necessary steps on Windows. All that seems necessary under Linux is: import locale [...] locale.setlocale(locale.LC_ALL, locale.getlocale()) locale.bindtextdomain(APP_NAME, LOCALE_DIR) [...] class SomeClass(): self.builder = Gtk.Builder() self.builder.set_translation_domain(APP_NAME) locale.getlocale() returns for example ('de_DE', 'UTF-8'