glade

Glade3 and C programming

梦想与她 提交于 2019-12-06 13:15:23
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 ) { const char *input1 = (const char *)malloc(20); const char *input2 = (const char *)malloc(20); char

Load GTK-Glade translations in Windows using Python/PyGObject

落爺英雄遲暮 提交于 2019-12-06 11:00:32
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') , the LOCALE_DIR just points at the folder that has the compiled mo-files. Under Windows this makes

Python GUI (glade) to display output of shell process

你离开我真会死。 提交于 2019-12-06 10:39:30
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? 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/2009/07/27/redirecting-the-stdout-on-a-gtk-textview/ glade is only a program to build gui with gtk so when you

Glib-GIO-ERROR when opening an file chooser dialog

蹲街弑〆低调 提交于 2019-12-06 09:37:35
I use GTK3 , codeblcks IDE, glade3 in windows 7... In my application i have a button which when clicked should open a gtk_file_chooser_dialog... But gives the fillowing error.. Glib-GIO-ERROR** : No GSettings schemas are installed on the system static void on_save_clicked(GtkWidget *widget,gpointer data) { GtkWidget *dialog; //dialog=gtk_file_chooser_dialog_new("Save it",GTK_WINDOW(gtk_builder_get_object(builder,"mainwindow")),GTK_FILE_CHOOSER_ACTION_SAVE,GTK_STOCK_OK,GTK_RESPONSE_OK,GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL); //dialog=GTK_FILE_CHOOSER_DIALOG(gtk_builder_get_object(builder,

Tool to convert .Glade (or xml) file to C source

不想你离开。 提交于 2019-12-06 06:49:48
问题 I am looking for tool that can convert .Glade (or xml) file to C source. I have tried g2c (Glade To C Translator) but i am looking for windows binary. Any one does know any good tool for window. Thanks, PP. 回答1: glade2 works for me. though if you are using new glade3 features it won't help you.. 回答2: You don't need a tool. Just write a script in your favorite scripting language to format your glade file as a C string literal: For example, let's call it glade_file.c : const gchar *my_glade

drawing a pixbuf onto a drawing area using pygtk and glade

偶尔善良 提交于 2019-12-06 04:54:02
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.STATE_NORMAL], self.node_image, 0, 0, 0, 0) This should just draw the pixbuf onto the image in the top left

Creating columns with editable cells in Gtk treeview using Glade

六眼飞鱼酱① 提交于 2019-12-06 02:54:55
问题 I am trying to create a simple GUI with table containing x and y coordinates of samples. I use treeview, and I want the cells of the table to be editable by user. Is it possible to specify if the cells should be editable directly in Glade in cellrenderer properties, or do I have to specify it in my code? I use Glade 3.6.1 I have just found out that unticking box "Editable" in the Tree View Editor when editing my treeview, enables me to specify whether the cells shall be editable or not,

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

折月煮酒 提交于 2019-12-05 16:55:29
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 project (specifically in Eclipse); and give an example. Thanks in advance. That's how my Glade UI looks

Unable to connect signal and signal handler in Glade GTK+3

蓝咒 提交于 2019-12-05 12:41:44
Hi i'm working on a project in GTK+ 3 on Ubuntu 14.04 LTS. I'm trying to use Glade,but when i tried to connect a "toggled" signal of toggle button to a function called kaczka ,after compiling i got this in my console: (Gra_w_Statki:11072): Gtk-Warning**:Could not find signal handler 'kaczka. Did you compile with -rdynamic? The window and the button render itself and work normally except of that toggling button doesn't change anything. What am i doing wrong ? This is how i tried to connect toggle button and function Click! My Linker Settings are : pkg-config --libs gtk+-3.0 And my compiler

Tool to convert .Glade (or xml) file to C source

女生的网名这么多〃 提交于 2019-12-04 12:33:35
I am looking for tool that can convert .Glade (or xml) file to C source. I have tried g2c (Glade To C Translator) but i am looking for windows binary. Any one does know any good tool for window. Thanks, PP. glade2 works for me. though if you are using new glade3 features it won't help you.. You don't need a tool. Just write a script in your favorite scripting language to format your glade file as a C string literal: For example, let's call it glade_file.c : const gchar *my_glade_file = "<interface>" "<object class=\"GtkDialog\">" "<et-cetera />" "</object>" "</interface>"; Compile glade_file.c