gtk

Gtk# in monodevelop not working anymore after upgrading to ubuntu 11.10 unity

南笙酒味 提交于 2019-12-23 12:59:36
问题 I had some monodevelop programs with a GTK# user interface running smoothly in ubuntu 11.04 without unity. I have upgraded to ubuntu 11.10 with unity. Now I get the following error: "The type or namespace name 'Gtk' could not be found. Are you missing an assembly reference?". And indeed in my references the references atk-sharp, gdk-sharp, glade-sharp, glid-sharp, stk-sharp and pango-sharp are colored red and I can't re-add them. If I search in the software to install at gtk-sharp then it

Is it possible to modify how Text swt widget wrap word?

梦想的初衷 提交于 2019-12-23 12:34:45
问题 The development platform is an Eclipse RCP 3.4 on Fedora (It's using Gtk native component). I need to avoid word wrapping. i.e.: "Hello World" is displayed as case N°1 but I need the case N°2. 1|Hello | 2|Hello Wor| |World | |ld | Is there a simple solution ? I've seen that swt Text handle is build with OS.GTK_WRAP_WORD_CHAR wrap mode. I would like to test the behaviour with constant like OS.GTK_WRAP_WORD or OS.GTK_WRAP_NONE but I don't know how to perform this miracle ? Is it possible to

Installing Gtk2 on portable strawberry

烂漫一生 提交于 2019-12-23 12:08:03
问题 I downloaded "strawberry-perl-5.12.2.0-portable" and "gtk+-bundle_2.22.1-20101227_win32". I extracted strawberry-perl in some directory and there I put gtk folder with gtk stuff. In portableshell.bat I changed Path env and added: "%drivep%\gtk\bin;%drivep%\gtk\lib;". Don't ask me why I added lib directory, I saw that some guy added it in some website. When I run in portableshell command: "pkg-config --libs --cflags gtk+-2.0" I get: c:\test>pkg-config --libs --cflags gtk+-2.0 -mms-bitfields

PyGTK Multiprocessing and Updating GUI [closed]

橙三吉。 提交于 2019-12-23 09:36:29
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . I am trying to enable and disable a stop button for audio playback in a GUI created using Glade PyGTK 2.0. The program basically works by running and

Load and show an image from the web in Python with Gtk 3?

限于喜欢 提交于 2019-12-23 09:32:19
问题 I'm writing an app on Ubuntu 12.04 with Python and GTK 3. The problem I have is that I can't figure out how I should do to show a Gtk.Image in my app with an image file from the web. This is as far as I have come: from gi.repository import Gtk from gi.repository.GdkPixbuf import Pixbuf import urllib2 url = 'http://lolcat.com/images/lolcats/1338.jpg' response = urllib2.urlopen(url) image = Gtk.Image() image.set_from_pixbuf(Pixbuf.new_from_stream(response)) I think everything is correct except

解决Failed to load module canberra-gtk-module错误

一世执手 提交于 2019-12-23 09:02:11
更多内容,请查看博客原文: 解决Failed to load module canberra-gtk-module错误 在Ubuntu环境里,运行程序时,报错: {% asset_image 1576805206947.png %} Gtk-Message: 09:10:26.571: Failed to load module "canberra-gtk-module" 查看一下模块位置 locate libcanberra-gtk-module /usr/lib/x86_64-linux-gnu/gtk-3.0/modules/libcanberra-gtk-module.so 发现已经安装了,却加载不了。 重新安装一下吧。 sudo apt-get install libcanberra-gtk-module [ sudo ] password for simon: Reading package lists .. . Done Building dependency tree Reading state information .. . Done The following additional packages will be installed: libcanberra-gtk0 The following NEW packages will be installed:

Is there a good way to copy a Gtk widget?

只谈情不闲聊 提交于 2019-12-23 08:03:21
问题 Is there a way, using the Gtk library in C, to clone a Gtk button (for instance), and pack it somewhere else in the app. I know you can't pack the same widget twice. And that this code obviously wouldn't work, but shows what happens when I attempt a shallow copy of the button: GtkButton *a = g_object_new(GTK_TYPE_BUTTON, "label", "o_0", NULL); GtkButton *b = g_memdup(a, sizeof *a); gtk_box_pack_start_defaults(GTK_BOX(vbox), GTK_WIDGET(b)); There is surrounding code which creates a vbox and

How to set a fixed windows size for a GTK+ app in C?

拟墨画扇 提交于 2019-12-23 07:36:10
问题 How do I set a fixed window size for a GTK+ app? I have: gtk_window_set_default_size(GTK_WINDOW(mainWindow), 400, 300); gtk_window_set_policy (GTK_WINDOW(mainWindow), FALSE, FALSE, FALSE); but the window gets very small. There are no widgets yet. 回答1: Use gtk_window_set_resizable function for this purpose gtk_window_set_default_size(GTK_WINDOW(mainWindow), 400, 300); gtk_window_set_resizable (GTK_WINDOW(mainWindow), FALSE); 回答2: gtk_widget_set_size_request(mainWindow, 400, 300); gtk_window

Cabal install gtk failing

China☆狼群 提交于 2019-12-23 06:48:56
问题 I'm trying to install gtk via cabal, however, I'm getting the following type errors when building it [ 22 of 209] Compiling Graphics.UI.Gtk.Embedding.Plug ( dist/build/Graphics/UI/Gtk/Embedding/Plug.hs, dist/build/Graphics/UI/Gtk/Embedding/Plug.o ) Graphics/UI/Gtk/Embedding/Plug.chs:120:6: error: Couldn't match expected type ‘Ptr ()’ with actual type ‘Maybe DrawWindow’ In the first argument of ‘gtk_plug_new’, namely ‘(fromNativeWindowId (fromMaybe nativeWindowIdNone socketId))’ In the second

Gtk-Python : Is it possible to print a window content and how to do this?

喜夏-厌秋 提交于 2019-12-23 06:04:36
问题 I have a Gtk.Window which contains a Gtk.Grid and Gtk.Labels. I would like to print all of what is displayed on this window. Is it possible to do this and how? I've searched for tutorials but only found one to print pdf files. Here is my print function : def on_print(self, widget): print("*** Print ***") print_op = Gtk.PrintOperation() print_op.set_n_pages(1) print_op.connect("draw_page", self.print_window) res = print_op.run(Gtk.PrintOperationAction.PRINT_DIALOG, None) def print_window(self)