Questions tagged [vala]

Questions related to the Vala programming language.

Filter by
Sorted by
Tagged with
0
votes
0answers
4 views

How to use Granite.SettingsSidebar?

I want to use the Granite.SettingsSidebar widget in my app. Can anyone teach me how to do it? I looked for tutorials and tips on the internet. I couldn't find any complete Vala tutorials so now I'm ...
1
vote
1answer
25 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://...
0
votes
0answers
15 views

How can I make the HeaderBar invisible in an app?

I am learning to make apps for Elementary OS. I have a question, how do I make the HeaderBar invisible? I mean how I can I make an app like Planner by Alainm. As you can see in the picture, the ...
0
votes
1answer
40 views

gsettings schema isnt installed

I am learning to make apps for Elementary OS. I wrote my app it compiles well without any errors. But when I try to open the application, it displays a message stating gsettings schema isnt installed. ...
0
votes
0answers
13 views

I'm very new to Vala. Trying to set up debugging for Vala in VSCODE

I'm watching a youtube series to learn how to code in Vala, but I can't seem to get the configurations right in the launch.json to debug and see the code in real-time. The error I get is:
0
votes
0answers
6 views

Developer Portal: Internal error while running

I am trying to get my application into review but the bot fails to run my app and all it does is tell me "Internal error while running". This is extremely frustrating because I have no idea ...
0
votes
1answer
14 views

How to add granite package

What package do I need to add to my project in order to use granite? All I get is "The name `Granite' does not exist in the context of..." I tried libgranite-dev but it isn't found. Also, ...
0
votes
0answers
23 views

How to use Math in Vala

I can't seem to get Math.floor to work in my code. I have glib-2.0 installed and tried linking it in the build statement. This is what happens when I build my app: /usr/bin/ld: /tmp/cc4KsgDT.o: ...
0
votes
1answer
24 views

How to send message headers with libsoup in Vala?

I cannot for the life of me figure out how to append the headers to my get request. var session = new Soup.Session (); var msg = new Soup.Message ( "GET", "...
1
vote
1answer
44 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 ...
2
votes
1answer
30 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 ...
4
votes
2answers
60 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.
0
votes
1answer
56 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/...
1
vote
2answers
22 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/...
2
votes
1answer
34 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
32 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.
0
votes
1answer
71 views

VALA GTK Header Bar with switch distorted

I'm trying to create a Window with a HeaderBar, and in the HeaderBar there will be a Switch. But, the switch gets sized vertically, and gets distorted (non proportional), is there some fix?
2
votes
1answer
47 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 ...
1
vote
1answer
125 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 ...
0
votes
0answers
97 views

Missing title in GTK+ 3 Dialog

I'm writing a vala GTK+ application and want to add a modal dialog like this: var dialog = new Gtk.Dialog.with_buttons (_("My title"), this, Gtk.DialogFlags.MODAL | Gtk.DialogFlags....
3
votes
1answer
285 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
24 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 ...
1
vote
1answer
150 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
2answers
135 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
209 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
1answer
69 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 ...
2
votes
1answer
64 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
36 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
138 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
78 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
87 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
233 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
42 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
34 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 ...
3
votes
1answer
700 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
113 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
155 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
583 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
129 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
119 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 ...
6
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
1answer
538 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
108 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
138 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
228 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
188 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
1k 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
40 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
106 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
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 ...