Questions tagged [vala]

Questions related to the Vala programming language.

Filter by
Sorted by
Tagged with
0
votes
3answers
2k 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
2answers
197 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
33 views

error: The type name `var' could not be found

I'm trying to build a fresh clone of Granite's master branch, on elementary OS 5.1.7 Hera, but I'm getting these errors: ../lib/Widgets/SwitchModelButton.vala:65.9-65.19: error: The type name `var' ...
0
votes
1answer
30 views

How to gain access to the serialized contents of a Gtk.TextBuffer including all Gtk.TextTags?

If this isn't the appropriate forum for this question, I apologize. Please remove it if that's the case. I know that Elementary OS developers use Vala for their development and I'm unaware of a more ...
0
votes
1answer
55 views

Can I upload an app which is not built using vala?

Is it necessary for a developer to upload an app written in vala only? Can't it be something c++ or python to be uploaded on Elementary's app store? I really want to contribute for them but don't want ...
2
votes
1answer
251 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
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 ...
0
votes
0answers
25 views

Error while building gala window switcher after upgrading to elementary os odin

I've upgraded to elementary os 6 yesterday , and when tried to compile a [gala window switcher][1] i was prompted with this error . >> cmake -DCMAKE_INSTALL_PREFIX=/usr .. -- The C compiler ...
0
votes
0answers
26 views

Unable to move Hdy.ApplicationWindow by dragging Hdy.HeaderBar in Vala

Trying to use libhandy and Hdy.ApplicationWindow instead of Gtk.ApplicationWindow in my vala based application made for elementary OS. My Problem While using Hdy.ApplicationWindow and Hdy.HeaderBar ...
0
votes
1answer
44 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
0answers
6 views

Change widget size individually

Can anyone tell me how to make the size of the color selector circle not be affected by the use of the Granite.ModeSwitch?
0
votes
0answers
4 views

Error while trying to access city name using GWeather and gtk

I want to access the city name and add it to a Gtk.Label. This is how I try to do it. Can anyone tell me what is wrong with my code? Or suggest some other way to get the city name? public class Epoch....
0
votes
0answers
12 views

Create list to be added in Gtk.ListBoxRow

I created a List using this code. Now when I try to access the elements of the list, the compiler displays this error: Can someone suggest how to solve this problem? This is how I try to access each ...
0
votes
0answers
14 views

Gtk grid inside another grid not visible on the main window

I made a separate file for all the labels to be used in the main window called Labels.vala This is the code inside that file: Now, when I try to add this class to a grid inside the main window, it ...
0
votes
1answer
22 views

Technical error while using Cairo

using Cairo ; using Gtk ; using GLib ; public class ClockWidget : DrawingArea { private Time time ; private int minute_offset ; private bool dragging ; public signal void ...
0
votes
0answers
46 views

build granite on windows 10 and msys2 (mingw64)

I'd like to start write a little tool with vala for elementaryOS but also to cross-compile it for windows so I tried to compile granite on windows 10 with mingw64 from msys2 and replacing gio-unix-2.0 ...
0
votes
0answers
65 views

write an IDE for vala

I wnated to know Why elementary os does not have a decent IDE for vala language? vala is their programming language but unfortunately there is not a good IDE for it I think they should have a IDE for ...
0
votes
0answers
10 views

GLib.Process is not a type error

I am trying to recreate the processes view in the Monitor App by Stanislaw Dac in my own app. I looked at the source files for monitor and used that code in my own app. When I compile the code, ...
0
votes
0answers
13 views

HashMap not removing keys

I'm developing a simple chess game in vala (source code here) and i'm have some issues with removing keys from an HashMap. For the checkboard i'm using an HashMap with pair of Coordinate Object and ...
1
vote
1answer
30 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. ...
0
votes
0answers
6 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
37 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
22 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
65 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
1answer
53 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, ...
1
vote
1answer
61 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 ...
0
votes
1answer
86 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", "...
2
votes
1answer
82 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
44 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
99 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
88 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
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/...
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 ...
1
vote
1answer
607 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 ...
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.
0
votes
1answer
93 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?
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 ...
0
votes
0answers
126 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
418 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
70 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 ...
3
votes
1answer
126 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
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 ...
0
votes
1answer
94 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 ...
1
vote
1answer
175 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
229 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
81 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
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. ...
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
143 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
80 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 ...