gtk

Progress bar not updating during operation

自闭症网瘾萝莉.ら 提交于 2019-12-18 01:19:51
问题 in my python program to upload a file to the internet, im using a GTK progress bar to show the upload progress. But the problems that im facing is that the progress bar does not show any activity until the upload is complete, and then it abruptly indicates upload complete. im using pycurl to make the http requests...my question is - do i need to have a multi-threaded application to upload the file and simultaneously update the gui? or is there some other mistake that im making? Thanks in

What are the differences between Gtk+ and Qt?

淺唱寂寞╮ 提交于 2019-12-17 23:42:40
问题 A lot of people seem to have an opinion about which is better. I'm not really asking for these opinions, what I'd like to know are the details: What are the things that make one graphical toolkit different from another, and which of these differences do Qt and Gtk+ have? 回答1: I can't speak directly to Gtk+, but at my previous job I used Gtkmm, and at my current job I use Qt. Both are C++, so in that regard they are consistent, but Gtkmm is/was only a wrapper to the Gtk+ code, which is in

GLib-CRITICAL **: Source ID XXX was not found when attempting to remove it

可紊 提交于 2019-12-17 23:32:18
问题 I made a treeview with a treestore as model. The window is shown as expected, but when I click in the "+" to expand the items, I get this message: GLib-CRITICAL **: Source ID 221 was not found when attempting to remove it Here is my code: #include <gtk/gtk.h> /* compile with: */ /* gcc main.c -o boxy `pkg-config --cflags --libs gtk+-2.0` */ typedef struct { GtkWidget *toplevel; GtkWidget *treeview; } Widgets; enum { ITEM_PARENT, ITEM_CHILD }; typedef struct { gint tipo; gint id; gchar *nombre

【GTK】【linux】如何使用gtk-demo里面的例程

倾然丶 夕夏残阳落幕 提交于 2019-12-17 20:19:41
gtk-demo中的例子都是在一个框架中的,如果想自己单拿出来运行,要添加主函数,大多如下: int main ( int argc , char * * argv ) { GtkWidget * window ; gtk_init ( & argc , & argv ) ; window = demo-入口函数 ( NULL ) ; g_signal_connect ( window , "destroy" , G_CALLBACK ( gtk_main_quit ) , NULL ) ; gtk_main ( ) ; return 0 ; } 例如在"editable cells"例子中源码: #include < gtk / gtk . h > #include < string . h > #include < stdlib . h > static GtkWidget * window = NULL ; typedef struct { gint number ; gchar * product ; gint yummy ; } Item ; enum { COLUMN_ITEM_NUMBER , COLUMN_ITEM_PRODUCT , COLUMN_ITEM_YUMMY , NUM_ITEM_COLUMNS } ; enum { COLUMN_NUMBER_TEXT

Is recent GTK 3.22 still Boehm GC friendly (thread issue)?

你。 提交于 2019-12-17 19:57:33
问题 The Boehm's conservative garbage collector is quite useful (e.g. Bigloo is using it, Guile is using something similar, etc....), notably on Linux (which is the only OS I care about; I'm using Debian/Sid/x86-64 if that matters, and libgc-dev package is version 1:7.4.2-8 so the Boehm GC is 7.4.2). However, Boehm's GC requires to be aware of every thread using it. Its gc_pthreads_redirects.h (more or less internal) header file is redefining pthread_create as # define pthread_create GC_pthread

GTK Modifying Background Color of GtkButton

折月煮酒 提交于 2019-12-17 19:44:28
问题 Trying to change background/foreground color....Using Gtk+ and C. GdkColor color; gdk_color_parse( "#0080FF", &color ); gtk_widget_modify_fg( GTK_WIDGET(button), GTK_STATE_SELECTED, &color ); gtk_widget_modify_fg( GTK_WIDGET(button), GTK_STATE_NORMAL, &color ); I am using above functionality but it is not giving any results. I am looking for something asked in this question(But in C): GTK: create a colored regular button how to Change Style of Button using button Style? Can anybody provide

GTK detecting window resize from the user

╄→гoц情女王★ 提交于 2019-12-17 19:33:31
问题 In GTK (or pygtk or gtkmm...) How can I detect that an application window has been manually resized by the user, as is typically done by dragging the window's edge? I need to find a way to differentiate manual resizes from resizes that originate from gtk, such as changes in window content. 回答1: Have you tried connecting to the GDK_CONFIGURE event? Check out this example under the "Moving window" section. The example shows a callback doing something when the window is moved, but the configure

Preventing window overlap in GTK

自作多情 提交于 2019-12-17 19:04:18
问题 I've got a Python/Linux application that displays bits of info I need in a GTK window. For the purposes of this discussion, it should behave exactly like a dock - exists on all virtual desktops, and maximized windows do not overlap it. The first point is pretty easy, but I have spent days bashing my head against my monitor trying to get the second point - preventing overlap. My app should not be covered if another window is maximized. Setting "always on top" is not enough, as the other

gi.repository Windows

落爺英雄遲暮 提交于 2019-12-17 18:47:23
问题 I'm developing an app which has to be 100% compatible on windows and on linux. On linux I have no problems, but on windows I came up with this message: from gi.repository import Gtk ImportError: No module named gi I installed pygobject, pygtkallinone, gtk.. what am I missing? 回答1: Most of Havok answer is correct, except that documentation has been improved a lot lately, with a Tutorial: http://python-gtk-3-tutorial.readthedocs.org/en/latest/ Including a PDF version for offline reading: http:/

R fails after installing GTK and RGtk2

心不动则不痛 提交于 2019-12-17 17:45:18
问题 I've installed R3.0 on my Mountain Lion Mac and after some trial and error the version of GTK suggested by http://r.research.att.com/ for R3.0: GTK+ 2.24.17 framework. I load the package into R3.0 and run one of the demo. I see (for an instant) that a graph is generated, but immediately R crashes. Typically the crash takes place when I run the line "win$showAll()" (CairoDevice work no problem). This is the beginning of the error log generated (with the details of my configuration). Thanks!