gtk

解决“QGtkStyle could not resolve GTK……”问题

筅森魡賤 提交于 2020-01-11 02:29:20
如果出现错误 QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries 或者出现错误 error while loading shared libraries: libgtk-x11-2.0.so.0 可以尝试以下命令 sudo apt-get install libgtk2.0-0 若出现新错误 Failed to load module “canberra-gtk-module” 则可尝试以下命令 sudo apt-get install libcanberra-gtk-module 2019.06.26 来源: CSDN 作者: wh201906 链接: https://blog.csdn.net/wh201906/article/details/103845046

How to set application title in Gnome Shell?

别说谁变了你拦得住时间么 提交于 2020-01-11 01:49:05
问题 I am new to Gtk+ development, and am trying to write an app using PyGObject and Gtk+3.0. When I run my app in Gnome Shell from the command line, however, the application name as it appears in the upper-left hand corner (immediately to the right of the Activities hot corner) is just set to the name of the Python source file that I ran to start the app. Is there any way to set the name to appear in Gnome Shell for my application? I've looked at Gtk.Application, and though it seems to do some of

Drawing in PyGobject (python3)

前提是你 提交于 2020-01-10 04:10:48
问题 I'm trying to write simple graphic editor using PyGObject and python 3. I need to draw lines with different color and width using mouse. I found many examples like this but nothing more complex. How do I save drawn image between 'draw' events? Is there incremental way of drawing or do I have to redraw pane on each 'draw' event? I found out that I can save path but how can I save width and colors of drawn lines? Is there way create image outside 'draw' callback and only apply (draw) it inside

Why do I get a segmentation fault in my GTK+ signal callback?

醉酒当歌 提交于 2020-01-09 11:27:07
问题 I am trying to measure the size of a GTK label: #include <gtk/gtk.h> static void map_event(GtkWidget *window, gpointer lab) { g_print( "In the callback..\n" ); GtkWidget *label = GTK_WIDGET(lab); g_print( "Everything is ok..\n" ); } static void activate (GtkApplication* app, gpointer user_data) { GtkWidget *window = gtk_application_window_new (app); gtk_window_set_title (GTK_WINDOW (window), "Window1"); gtk_window_set_default_size (GTK_WINDOW (window), 200, 280); GtkWidget *grid = gtk_grid

Windows下编译linphone

守給你的承諾、 提交于 2020-01-09 01:11:04
本博文介绍了再MSYS&MINGW环境中编译linphone(貌似当前版本是3.5.2),可参照解压后README.mingw文件的说明进行编译,下面把主要注意事项进行说明 1 下载最新版mingw 从官网 http://www.mingw.org/ 下载最新版mingw-get-inst.exe,例如本人从官网( http://sourceforge.net/projects/mingw/files/MinGW/ )下载到的是mingw-get-inst-20120426.exe,如图: 以默认路径安装:C:\MinGW,安装时正如README.mingw说描述,3个安装选项必须选择: Download lastest mingw-get-inst.exe from http://www.mingw.org Run mingw-get-inst.exe. Choose "download lastest catalogues". In the feature list, select: * C compiler * C++ compiler * Mingw developer toolkit Let the installer fetch and install everything. 在mingw shell命令行执行如下安装和操作: mingw-get install

GTK开发视频播放器

送分小仙女□ 提交于 2020-01-08 09:51:30
按照第三方库和软件包: sudo apt-get install libgtk-3-dev sudo apt-get install libgtk-3-doc sudo apt-get install vlc libvlc-dev 其中使用了gtk第三方库,具体API请看官网 https://developer.gnome.org/gtk3/stable/index.html 来源: https://www.cnblogs.com/wanghao-boke/p/12164797.html

Line wrapping in GtkCheckButton or GtkRadioButton labels

▼魔方 西西 提交于 2020-01-07 04:59:05
问题 Is there any way to get the label of a GtkCheckButton or GtkRadioButton to wrap when its parent container is resized small enough so the label won't fit on one line? 回答1: You can access button's child widget — it's a GtkLabel in default setup, — and set various properties on it, e.g. wrap . However, since there is no height-for-width layout negotiation in GTK+ 2.x, what you want exactly can be difficult / close to impossible to achieve. Note that you can also replace the button's child if you

How to fix No package 'atk-bridge-2.0' found error even though atk is installed and PKG_CONIG_PATH and LD_LIBRARY_PATH is set?

久未见 提交于 2020-01-06 23:46:30
问题 First I have installed all the dependent packages including atk 2.18. Then, I have added them to path. # echo $LD_LIBRARY_PATH /opt/gtk_+3.12-RHEL6/dependencies/at-spi2-atk/lib:/opt/gtk_+3.12-RHEL6/dependencies/gobject-introspection/lib:/opt/gtk_+3.12-RHEL6/dependencies/pango/lib:/opt/gtk_+3.12-RHEL6/dependencies/harfbuzz/lib:/opt/gtk_+3.12-RHEL6/dependencies/freetype/lib:/opt/gtk_+3.12-RHEL6/dependencies/icu4c/lib:/opt/gtk_+3.12-RHEL6/dependencies/cairo/lib:/opt/gtk_+3.12-RHEL6/dependencies

Gtk widget shows up with delay

蓝咒 提交于 2020-01-06 10:53:10
问题 Using python3 and gi.repository, I want to have a Gtk.HeaderBar with a Gtk.Button that is replaced by a Gtk.Spinner as soon as you click on it. After a calculation the button should appear again. Here is an example of how I think it should work but the Gtk.Spinner only shows up after the calculation (in this example sleep) for a very short time. How can I achieve that the spinner shows up for the whole calculation (or sleep)? from gi.repository import Gtk import time class window: def __init_

Passing an array to a function - Different values - Segfault

柔情痞子 提交于 2020-01-06 07:52:10
问题 I have the following code: gpointer w[3]; GtkWidget *menu_item = gtk_menu_item_new(); w[0] = menu_item; menu_item = gtk_menu_item_new(); w[1] = menu_item; GtkTextBuffer *buffer = gtk_text_buffer_new(NULL); w[2] = buffer; This is all good till now. Let's now connect a signal: g_signal_connect(w[0], "activate", G_CALLBACK(runner), w); runner function is declared as: void runner(gpointer root, gpointer w[]); Testing the values of w array before entering runner and while in it shows that they