Hot answers tagged

7 votes
Accepted

Concern about the future of vala

Emmanuele's position seems to be that there are better alternatives to Vala, so you should use them instead; based on his tweet about LLVM-based languages, I'm guessing he is a fan of Rust. I've ...
user avatar
  • 430
6 votes
Accepted

How can I use a system icon in my application?

You just load the icon using the name. Gtk will select the one appropriate for the current theme. In your case, you would use something like: var icon = Gtk.Image.from_icon_name("view-refresh", Gtk....
user avatar
  • 1,250
5 votes
Accepted

How to install Vala on elementary OS

You should check the elementary Development Guide. In the section "Developer SDK" we cover grabbing essential development libraries, including the Vala compiler. For development tasks, you're going ...
user avatar
  • 9,724
5 votes
Accepted

Creating the "About" dialog

The about dialog is part of granite http://valadoc.org/#!api=granite/Granite.Widgets.AboutDialog The content is filled in the class that is subclassing Granite.Application http://bazaar.launchpad....
user avatar
  • 2,869
4 votes
Accepted

Template for a "About" dialog for an Elementary OS application

I believe that you are looking for Granite.Widgets.AboutDialog. You can find everything about it here : Valadoc Granite.Widgets.AboutDialog If you can't recognize a widget in a particular ...
user avatar
4 votes

Concern about the future of vala

More update: I came from the future. Vala is still alive and kicking! Update: They would and pretty much they are the upstream considering the commits come from them. People keep pushing code ...
user avatar
3 votes
Accepted

Proper way to include assets when compiling a Vala GUI program

This is one of those things where you probably want to use a build system to handle everything for you. First you need an XML file to describe your resources. Something like <?xml version="1.0" ...
user avatar
  • 430
3 votes

How to use Gtk.Popover() in Vala?

You can associate the popover creation with a button event, like in the following example: var button = new Gtk.Button (); var imag = new Gtk.Image.from_icon_name ("help-info", Gtk.IconSize.MENU); ...
user avatar
  • 2,268
3 votes
Accepted

Using Granite with a different language besides Vala

Granite is written in Vala, so it provides a C API which you can use from C++. Using it should be fairly straightforward; just #include <granite.h> in your code, and build with something like ...
user avatar
  • 430
3 votes
Accepted

GTK+ Incorrect Window Size

One of these windows is using client-side decorations and the other is using sever-side decorations. There is a bug right now where client-side decorations include the shadow as part of the window ...
user avatar
  • 9,724
3 votes
Accepted

Customizing existing Vala app

After change, how can I see the output of changed code? Do I have to build each time? Yes, that's how compiled languages work. Note, however, that the build system will skip a lot of work it doesn't ...
user avatar
  • 430
3 votes
Accepted

I want to add the listbox scroll fade effect in my app - how?

The most common way a designer can do this is by applying on an upper layer a semitransparent png image or gradient with fading transparency from 1 to 0 and white color. Another option is a gtk box ...
user avatar
  • 1,264
2 votes
Accepted

Adding "quicklist" actions to apps in the dock

Just add at the end of the .desktop file something like [Desktop Action Screen] Name=Take a Screenshot of the Whole Screen Exec=gnome-screenshot See this for more information https://wiki.ubuntu.com/...
user avatar
  • 2,869
2 votes
Accepted

GLib.OptionEntry vs. Granite.Application.options

take a look at this commit for a possible solution. http://bazaar.launchpad.net/~elementary-apps/screenshot-tool/trunk/revision/147
user avatar
  • 2,869
2 votes
Accepted

Language Translations not working in Bookworm

This issue was due to a line in the code pointing at a wrong place for the translations: Intl.bindtextdomain(GETTEXT_PACKAGE, "./locale"); Many thanks to Corentin Noel for spotting the issue.
user avatar
2 votes

Concern about the future of vala

It's important to understand how GNOME works: individual contributors can say whatever they want as “PSAs” on social media, but the GNOME Foundation does not have an official stance on Vala. In fact, ...
user avatar
2 votes

How does using extern functions work?

What you're looking at here is an interface with an abstract method. Virtually all OOP languages have a similar concept to interfaces, but since you didn't specify which language(s) you do know I can'...
user avatar
  • 430
2 votes
Accepted

Using cmake on Juno

I'm still on Loki, but it seems like the required FindVala.cmake file would come from cmake-elementary: $ dpkg-query -L cmake-elementary ... /usr/share/cmake-3.5/Modules/FindVala.cmake ... which is ...
user avatar
  • 136
2 votes

Elementary app feasibility: modify any current text input

All feature requests must be written to the proper GitHub page, they do not belong here. I believe that in your case gala is a good starting point. https://github.com/elementary/gala Good luck
user avatar
  • 1,942
2 votes
Accepted

Can't make Gtk.TextView () fill whole parent Gtk.Box

A lovely application you built here, I particularly like the native indicator! Looking into your Application.css: .command_wrapper { background-color: #fdf6e3; border-radius: 3px; ...
user avatar
  • 2,150
1 vote

Missing Library

For this kind of errors I always search in the AUR for missing dependencies, when I install all the dependencies the problem, most of times fixes, if not you should read the oficial git/webpage ...
user avatar
1 vote
Accepted

WebKitGTK not installed / unknown version detected

Found it: sudo apt-get build-dep pantheon-mail installs all dev dependencies.
user avatar
1 vote
Accepted

Change Elementary OS Lock Screen Background With Vala and User Specific

I've found a solution in the official code of the elementary settings app. [DBus (name = "org.freedesktop.Accounts.User")] interface AccountsServiceUser : Object { public abstract void ...
user avatar
  • 123
1 vote

Use of STYLE_CLASS_LINKED for Linked Buttons

This is actually a recently closed issue in our system stylesheet. See this issue report on GitHub. An update containing this fix should be available relatively soon.
user avatar
  • 9,724
1 vote
Accepted

Use of STYLE_CLASS_LINKED for Linked Buttons

In Files, view switch use Gtk.STYLE_CLASS_FLAT instead Gtk.STYLE_CLASS_LINKED. However , you can use Granite.Widgets.ModeButton You can see the code at : Files on Launchpad: linked Files on ...
user avatar
  • 2,268
1 vote

Can't find gtk header file for vala-code compilation

Just had the same issue on elementary OS Hera. I've fixed it by adding this line to my .bashrc: export PKG_CONFIG_PATH="/usr/share/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:$...
user avatar
  • 11
1 vote
Accepted

StatusIcon not showing/working

GtkStatusIcon is deprecated since GTK 3.14. It is more for Windows and KDE and not supported on elementary OS or Gnome 3.
user avatar
  • 2,869
1 vote

Determine if Notebook or Desktop in Vala

What makes you think it's not possible to adjust brightness on a desktop? It may not be possible on your desktop, but that doesn't mean it isn't possible on someone else's… You're also going to run ...
user avatar
  • 430
1 vote

Error while compiling latest source of Files

Those two errors are pretty self-explanatory. Granite.Widgets.StorageBar.with_total_usage and Granite.Widgets.StorageBar.ItemDescription.FILES don't exist in the version of granite you have installed....
user avatar
  • 430

Only top scored, non community-wiki answers of a minimum length are eligible