gtk

How to distribute a GTK+ application on Windows?

自古美人都是妖i 提交于 2019-12-17 16:33:28
问题 I have installed GTK+ (specifically GTK3) via MSYS and MinGW on Windows. I now want to copy the GTK+ dlls to my application directory so that it can be run on a computer without a global GTK+ installation. Which dlls are required for GTK+ to operate? 回答1: You have some hints on the Windows page of the GTK+ website. This is the section named Building and distributing your application . It features a blog post about distributing a GTK+ application on Windows. The solution proposed there is to

Where can I download precompiled GTK+ 3 binaries or windows installer? [closed]

爱⌒轻易说出口 提交于 2019-12-17 15:28:51
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 months ago . I have taken a look at GTK+3 and I like it. But unfortunately compiling from source has never worked for me. Is there any okace with decent binaries or even better, a windows installer? 回答1: 07/04/2017 update: To make it clear, since 23/06/2017, the GTK+ project doesn't provide binary bundles for Windows. These

How to use pkg-config in CMake (juCi++)

北城余情 提交于 2019-12-14 04:12:32
问题 I've been happily programming in C++ and compiling with g++ for quite a while. Not long ago, I'd decided to get an IDE, and I came accross juCi++. This IDE is absolutely brilliant, but it uses CMake (or Meson) to build projects. This wasn't a problem, until I had to include a library (GTK+ 3.0 if you're wondering) using pkg-config . This could be done quite easily when compiling with g++, but, as I am completely new to CMake, I have no idea how to do it in the new IDE. Can somebody please

How can I set my Java system look and feel for JNLP apps?

为君一笑 提交于 2019-12-14 03:48:45
问题 I am running Gnome on OpenSuse. As a result, my system look and feel is GTK+, which has numerous ugly problems (see some of them here). During development of my swing app, I can run the client from command line or IDE and specify VM parameter -Dswing.systemlaf=com.sun.javax.swing.plaf.metal.CrossPlatformLookAndFeel to make it look good. But I don't know how to force Java Webstart to use this VM parameter when I start the application through JNLP. edit: This has nothing to do with the

How to find a gtkwindow by title

拟墨画扇 提交于 2019-12-14 03:44:26
问题 I'm working on the Ubuntu. I'm writing an app to capture a gtkwindow screen shot. But now, I can't get the gtkwindow pointer by the window title. Is there way to find a gtkwindow by the title? 回答1: Gtk has no API for doing this. You only get GtkWindow objects for windows you create yourself. You have to do it more low level and use xlib directly. First you must get the Display object for the your display (basically an object representing the connection to your Xserver and is needed because an

Adding GtkButton to GtkListStore with text in GTK+

最后都变了- 提交于 2019-12-14 02:27:33
问题 I want a button with text on it for a GtkListStore . I read another answer using an image as a button, but I really need the title to be text. How can I do this? I'd be fine with a solution that renders text onto a GdkPixbuf as well. I've tried this: GType *types; types = g_new0 (GType, num_fields); for(int i=0; i<num_fields; i++) { types[i] = GTK_TYPE_BUTTON; } tree_store = gtk_list_store_newv(num_fields, types); tree_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(tree_store));

Gtk clipboard spreadsheet value vs formula (Windows)

可紊 提交于 2019-12-14 00:37:48
问题 Have created a Gtk "calculator" that has a spreadsheet-like element (similar to and partially based on GtkSheet / GtkExtra ). It is capable of, amongst other things, using the usual Ctrl-X/C and Ctrl-V to Cut/Copy/Paste data/strings within itself, and also across to other apps, such as Excel/OpenOffice etc (i.e. in both directions) using GtkClipboard elements. For example, it can also perform Cut/Copy/Past of ranges (though via a different route, and this in not in Python) discussed in this

Qt vs XCB: How powerful is Qt to do low level tasks?

别等时光非礼了梦想. 提交于 2019-12-13 20:07:34
问题 I'm trying to create a program to lock the screen of a computer with Linux OS which is to be unlocked using my own authentication mechanism. Can I do it in Qt alone( The lock screen, the ability to switch to the lock screen ...) or do I need to learn XCB or something related? 回答1: Window or session management like locking the screen isn't covered by Qt. You'll need to use native API. Usually locking the screen isn't something random applications do, but something the desktop environment

Accelerators stop responding when menubar gets hidden

不问归期 提交于 2019-12-13 19:07:13
问题 I have a glade-based UI for gtk3, and I set accelerators fields for several menuitems. I'm not sure what GtkBuilder does exactly behind the scenes when it's loading the glade file (use a global GtkAccelGroup?), but the end result is, when I hide the menubar, the accelerator shortcuts stop working. I'm wondering whether there is a way of getting the accelerators working even when the menu is not visible, while still sticking to glade as much as possible. 回答1: Maybe you can try to stick the

How do I set buffer limit for gtk_text_view in C?

半腔热情 提交于 2019-12-13 18:46:34
问题 I want my GtkTextView to display only a certain number of characters at the end of a long string. Is this possible, and how can I do it? 回答1: Connect to the insert-text signal of GtkTextBuffer . In your callback, get the length of the text. If it's longer than the limit, get two start iters, and move one of them forward by the amount of characters you want to delete: GtkTextIter range_start, range_end; gtk_text_buffer_get_start_iter(buffer, &range_start); range_end = range_start; gtk_text