Questions tagged [vala]

Questions related to the Vala programming language.

Filter by
Sorted by
Tagged with
6
votes
5answers
3k 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 ...
6
votes
2answers
955 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?
5
votes
1answer
226 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 ...
4
votes
1answer
96 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/...
4
votes
2answers
98 views

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

I am referring to the effect eg. the session indicator has or the keyboard language adder has. I'd prefer it with the responsiveness the session listbox has.
4
votes
3answers
620 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
149 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,...
3
votes
1answer
825 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 ...
3
votes
1answer
555 views

How to use Gtk.Popover() in Vala?

I can't bind Gtk.Popover() to button.
3
votes
1answer
405 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 ...
3
votes
1answer
229 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 ...
3
votes
1answer
125 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 ...
2
votes
1answer
66 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. ...
2
votes
1answer
242 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 ...
2
votes
1answer
26 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 ...
2
votes
1answer
92 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 ...
2
votes
1answer
34 views

Delete Applications - Self Made With Gtk Tutorial

I've been playing around with Gtk and vala and I love it; however, I've created two simple apps that I don't know how to delete from my system.
2
votes
1answer
79 views

Debugging applications during development

I wanted to start working on issue https://github.com/elementary/calendar/issues/419 but I encountered a bug. So I wanted to debug the application code I added. I found this tutorial on debugging ...
2
votes
1answer
42 views

Symbol lookup error

Trying to compile this simple example, but having this error when trying to run exec: ~/projects/vala-snippets/Fast-Examples/DazzleChart(master ✔) meson build The Meson build system Version: 0.49.2 ...
2
votes
1answer
39 views

How to store data from a ListModel?

Is there some sort of standard or commonly-used way to store data in elementary apps? I currently have a bunch of GObjects contained in a ListModel and would like to persist that to the disk and ...
2
votes
1answer
69 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 ...
2
votes
1answer
240 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 (...
2
votes
0answers
31 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 ...
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 ...
1
vote
1answer
174 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 ...
1
vote
1answer
35 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 ...
1
vote
1answer
154 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: [...
1
vote
1answer
29 views

StackSIdebar is not visible

I used Gtk.StackSidebar to create a sidebar for an app that I am making. https://github.com/Suzie97/Project_X97, this is the link to my github repo. The sidebar is not correctly visible on the window. ...
1
vote
1answer
36 views

Window position and size not saved when app is closed

I made this simple application and made it so that the window position and size is saved on closing the app, so that the next time the user opens the app, he can resume his work directly. https://...
1
vote
2answers
24 views

Can't change value in struct property inside class

io = {}; io.wchar = 111111; debug((string)io.wchar); // (null) So the problem here is that io.wchar is still null. You can look at the whole class here: https://github.com/stsdc/monitor/blob/dev/src/...
1
vote
1answer
133 views

Code don't work

I made this code, but it doesn't work correctly. The window is created, but the button does not appear. I do not receive any error reports. Would anyone know why? public class MyApp : Gtk.Application ...
1
vote
1answer
603 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
1answer
224 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 ...
1
vote
1answer
609 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
57 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 ...
1
vote
2answers
195 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 &...
1
vote
1answer
60 views

Do I have to use Vala to build my app to get it on the App Store?

I notice they have Vala shown front and center, but I'd much rather use electron with React so I don't have to learn a whole new language. Would they accept a submission in React? Found this: Your ...
1
vote
0answers
110 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
0answers
63 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 ...
0
votes
1answer
80 views

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

Can't make Gtk.TextView () hexpand. Only expands to like 2/3 of parent and wraps words too early. Source: https://github.com/stsdc/monitor/blob/d3685a314712e263987da942724432c3469108e6/src/Widgets/...
0
votes
1answer
76 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 ...
0
votes
2answers
134 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 ...
0
votes
1answer
124 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
34 views

How to install newer vala compiler?

I'm trying to contribute to Granite, but I'm still on elementary OS v5, which doesn't include the required vala computed version. Thanks to jeremypw I found the relevant ppa: https://launchpad.net/~...
0
votes
1answer
37 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
259 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....
0
votes
2answers
116 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
160 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
615 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
1answer
41 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 ...