Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [vala]

Questions related to the Vala programming language.

2
votes
0answers
40 views

Setting up a development environment for elementaryOS apps?

what's the best tool chain for building elementary applications these days? I've been playing with an existing project that contains a lot of other magic (such as meson, ninja and the like), and while ...
2
votes
1answer
19 views

Elementary app feasibility: modify any current text input

I'm using a qwerty keyboard with english layout but as a french speaker I would like to access special chars without changing the layout. To do so, I'd like to create an app that mimic the android ...
0
votes
1answer
76 views

Using cmake on Juno

I know elementary OS would like to move from cmake to meson, but cmake should still work: While CMake will continue to work, our official documentation and code examples will all be written around ...
0
votes
1answer
34 views

How to get user home folder in Vala?

I am trying to make a Elementary OS app that I need to get user home folder. I tried GLib.Environment.get_home_dir () and Granite.Services.Paths.home_folder.get_path () but they both return null. What ...
0
votes
1answer
109 views

Button CSS not working in Juno

I'm using this code to apply some dynamic css to button based on colours chosen by the user. This was working in Loki but not working in Juno Beta. Thanks in advance for any pointers. 1.Create a CSS ...
0
votes
0answers
40 views

Wingpanel extension building fails with make

I cloned the source code of https://github.com/elementary/wingpanel-indicator-network And followed the README. And configured the build directory with cmake However when try to build with make its ...
0
votes
1answer
52 views

Left Align the secondary text on Widgets.Welcome

Is there a way to right align the secondary text on the welcome widget. I have a rather longish secondary text (attached screenshot) and the text will look better if the left margin is aligned rather ...
1
vote
1answer
44 views

Customizing existing Vala app

I am planning to deep dive into vala language by reading the code that was/is developed by other developers as all the apps created for elementary os are openly coded on GitHub. But, I am Vala newbie. ...
0
votes
1answer
25 views

Can not able to get exact value of `%u` in Vala program

Vala newbie here. Learning Vala as programming language and stuck with following program int main() { string first_name; string last_name; uint age; stdout.printf("Enter your first ...
0
votes
1answer
113 views

Missing styles when building app using Gtk.CssProvider

I'm using cmake and following the instructions per Elementary OS site (https://elementary.io/docs/code/getting-started#building-and-installing-with-cmake). Everything looks good when compiling the ...
0
votes
1answer
64 views

How to add command line dependencies using CMake

I'm building a Vala app that uses youtube-dl command line. How do I make sure that it is installed when someone installs the app? In other words: Looking at the CMake build documentation, what is the ...
0
votes
1answer
70 views

Selecting text on WebKit2

What method is available to select text on webkit2gtk. I could not find anything on the API for Vala webkit2: https://valadoc.org/webkit2gtk-4.0/WebKit.WebView.html The requirement is to get the ...
0
votes
1answer
135 views

Linked style doesn't work for buttons

Only button with label has linked style. var button_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); button_box.get_style_context ().add_class (Gtk.STYLE_CLASS_LINKED); info_button = new Gtk....
-1
votes
1answer
32 views

Compiling with custom vapi leads to error

Added CUSTOM_VAPIS with vapi/libgtop-2.0.vapi to vala_precompile() in CmakeLists.txt and got this error: No rules for target '../src/vapi/libgtop-2.0.vapi' ... How to add vapi files properly?
1
vote
1answer
31 views

Language Translations not working in Bookworm

I have followed the instructions at the Elementary Getting Started (Translations) to set up the translations and I have a few translated languages including French in the po directory (fr.po). I can ...
2
votes
1answer
337 views

Proper way to include assets when compiling a Vala GUI program

First of all, your official tutorial on getting started with Vala GUI development is excellent. I am wanting to move away from hand-coding my window layouts and I want to use Glade XML files. I have ...
0
votes
2answers
99 views

Missing Library

I'm trying to get into developing for Elementary using Vala. I have been unsuccessfully trying to build Valama (an IDE for Vala) for ages but keep hitting hurdles. Currently when I try to make Valama ...
0
votes
1answer
140 views

WebKitGTK not installed / unknown version detected

Trying to build pantheon-mail I bump into this error when running cmake. CMake Error at src/CMakeLists.txt:493 (message): WebKitGTK not installed / unknown version detected Which version of ...
0
votes
1answer
400 views

Change Elementary OS Lock Screen Background With Vala and User Specific

I've been trying to change the background image of pantheon-greeter. It should change on the depending user. After browsing the code base of pantheon greeter if found that they get the background ...
0
votes
2answers
100 views

Use of STYLE_CLASS_LINKED for Linked Buttons

Hi I'm trying to get two buttons into a linked style to perform Zoom In and Zoom Out. However, I'm not able to get the look an feel of the linked buttons like the view mode buttons on Files. Here is ...
3
votes
1answer
108 views

Gtk Granite : About Dialog not appearing properly

For some reason, the Gtk About Dialog is not appearing properly. My class is a subclass of Granite.Application. The About dialog which comes as part of the elementary desktop is also with the same ...
7
votes
5answers
2k views

Concern about the future of vala

I'm prototyping an application using Vala, in hope of targeting elementary OS. It was actually the elementary website at Build for elementary OS that first steered me towards Vala. Now, Gnome is ...
1
vote
0answers
362 views

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

I am trying to run the first sample code on this site. Unfortunately I got the following error message: Package gobject-2.0 was not found in the pkg-config search path. Perhaps you should add the ...
1
vote
0answers
96 views

Changing Vala or GTK version to compile [closed]

Bit of a newbie question, but I am trying to build Writer to play around with. I followed the build/installation instructions , but am getting the following error: CMakeFiles/writer.dir/src/Widgets/...
1
vote
1answer
96 views

How does using extern functions work?

I need to edit some code regarding changing desktop wallpaper. Unfortunately I don't know Vala, but I found this piece of code in Wallpaper.vala file of the switchboard-plug-pantheon-shell package: [...
2
votes
1answer
210 views

Using Granite with a different language besides Vala

I am interested in developing for elementary OS, but what's holding me back from doing so is that I can't figure out how to use the Granite widgets from C++. I would prefer to use this instead of ...
1
vote
1answer
116 views

StatusIcon not showing/working

Good morning dear community, i have a little trouble and i can't found any proper explanation for this issue, actually i'm developing an small application to hear radio streaming using Vala and ...
0
votes
3answers
571 views

Gnome Boxes won't create a VM

Running from the GUI I get "Box setup failed" -pretty sparse there Gnome team!! (I know this is the elementary forum, but just saying...) Running from Terminal, I get: (gnome-boxes:31127): Boxes-...
0
votes
1answer
36 views

Determine if Notebook or Desktop in Vala

I'm developing extension for wingpanel-indicator-power which allows you to change the screen brightness directory from the indicator. The the moment this is only possible by accessing the power ...
0
votes
1answer
74 views

Error while compiling latest source of Files

I get two errors while compiling the latest source of Files. error: The name `with_total_usage' does not exist in the context of `Granite.Widgets.StorageBar' storagebar = new Granite....
2
votes
1answer
59 views

XHTML with WebKit

I am working on an ebook application with WebKit 3 (webkitgtk-3.0) on Elementaty OS Freya. epubs which have html display fine, however the new epub 3 with XHTML comes garbled with multi columns ...
1
vote
0answers
122 views

Buttons' Look in a Gtk.MessageDialog

Elementary's human interface guidelines specify how dialogs should look: In Valadoc, there is a minimal example on how Gtk.MessageDialog is to be used: Gtk.MessageDialog msg = new Gtk.MessageDialog (...
5
votes
1answer
204 views

Can't build package from developer getting started doc

I'm following the developer getting started document, and have worked my way here: http://elementary.io/docs/code/getting-started#launchpad-recipes I'm able to build the hello-packaging application ...
1
vote
0answers
59 views

Can't run the gtk-hello app from the elementary OS developer tutorial

After successfully compiling the gtk-hello.vala file from the official elementary OS tutorial, I tried to run the gtk-hello file from terminal with the command ./gtk-hello However it never runs ...
1
vote
1answer
99 views

GLib.OptionEntry vs. Granite.Application.options

I needed to add some command option for an app I'm developing. I get the options working nicely after adding the following function public const GLib.OptionEntry[] options = { // --version { ...
0
votes
1answer
90 views

Item list with text input error on Vala

I have an item list and I want to put a text input: using Gtk; public class TreeViewSample : Window { public TreeViewSample () { this.title = "Programa de odontologia"; ...
0
votes
0answers
45 views

segfault in my dbus client code

I was hacking around to learn some vala and mess around with undocumented API like gala's dbus server. I wrote this "helloworld" that calls the multitasking view: it works but segfaults instead of ...
1
vote
1answer
269 views

error: Package `libcanberra' not found in specified Vala API directories

When I try to compile a project with pkg libcanberra using command [valac --pkg libcanberra *.vala ], I am getting below error, error: Package `libcanberra' not found in specified Vala API ...
1
vote
1answer
50 views

Granite Widgets : Unable to append a new action item to welcome page at runtime

I am trying to add and remove action to welcome screen at run time on pressing Add and Delete buttons in Header Bar. I am unable to append a new action item to welcome page at runtime. check Code ...
4
votes
3answers
432 views

GTK+ Incorrect Window Size

I'm not sure whether to ask this question on this site or on StackOverflow, because although this is programming related, I suspect that the behavior is influenced by the OS. So I have decided to ...
3
votes
1answer
417 views

How to use Gtk.Popover() in Vala?

I can't bind Gtk.Popover() to button.
6
votes
2answers
702 views

How to install Vala on elementary OS

I am learning vala. I need to setup vala environment on my elementary OS. How to install Vala on elementary OS?
2
votes
0answers
27 views

Can I use Pantheon-Files FileChooserDialog module from custom FileChooserDialog Object?

I want to use the new Pantheon-Files FileChooserDialog module, but it doesn't seem to work when creating my own widget based on Gtk.FileChooserDialog (like seen below). Is there anyway for me to be ...
3
votes
1answer
186 views

Why is LibSoup not found when compiling Vala?

I am try to create a application in Vala, but I need libsoup and checkout with this command: pkg-config --list-all | grep soup. I have libsoup, but if I try to compiling with this command: valac --pkg ...
2
votes
1answer
73 views

Adding “quicklist” actions to apps in the dock

If i have Noise or Terminal in the dock and right click on the app icon in the dock it presents me with a bunch of options eg. "Open as Root", "About" etc etc. How do i do this for my app? I'm ...
4
votes
1answer
83 views

Creating the “About” dialog

I know i have to use Granite.Widgets.AboutDialog but how do i create it so it looks exactly like the Noise about dialog? I can't find how the About dialogue is created in Noise source code. Any help/...
1
vote
1answer
1k views

How can I use a system icon in my application?

I would like to use the refresh icon in my application. Rather than creating my own icon I would like to use the refresh icon used in Files, in a way that the icon will be updated when the user uses a ...
3
votes
1answer
131 views

Template for a “About” dialog for an Elementary OS application

I have developed an application for elementary which is a Network Utility. The details of the Nutty application can be found here at launchpad: https://launchpad.net/nutty In response to a bug report,...
1
vote
2answers
163 views

Adding atspi-2 to the PKG_CONFIG_PATH environment table

I'm currently trying to learn Vala, but it fights me right from the start. I've basically copied the first Basic Sample found here. I'm trying to build it using this command: valac --pkg gtk+-3.0 &...