Questions tagged [vala]

Questions related to the Vala programming language.

Filter by
Sorted by
Tagged with
0 votes
1 answer
14 views

How do I set up a Vala project with multiple namespaces in Meson?

I realize this is a bit beyond the scope of elementary OS, per se, but all y'all seem to be the main users of Vala, and I'm not sure where else to ask this. I am working on a project with a large ...
user avatar
0 votes
0 answers
15 views

Is there any API to get the list of installed apps, all and available keyboard layouts?

I am working on an app for elementaryOS. I need some information and functionality from the OS, so I want to know if there any Vala/Glib/etc API to: Get a list of all the installed apps in the system ...
user avatar
0 votes
0 answers
28 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 ...
user avatar
0 votes
1 answer
36 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 ...
user avatar
  • 1
0 votes
1 answer
46 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 ...
user avatar
0 votes
1 answer
103 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/~...
user avatar
0 votes
1 answer
61 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' ...
user avatar
0 votes
1 answer
28 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 ...
user avatar
0 votes
0 answers
82 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 ...
user avatar
  • 1
0 votes
1 answer
62 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 ...
user avatar
1 vote
1 answer
39 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. ...
user avatar
1 vote
1 answer
38 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://...
user avatar
0 votes
1 answer
92 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. ...
user avatar
0 votes
1 answer
65 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, ...
user avatar
  • 13
0 votes
1 answer
115 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", "...
user avatar
  • 13
1 vote
1 answer
64 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 ...
user avatar
  • 13
2 votes
1 answer
52 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 ...
user avatar
  • 180
4 votes
2 answers
114 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.
user avatar
0 votes
1 answer
101 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/...
user avatar
  • 180
1 vote
2 answers
25 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/...
user avatar
  • 180
2 votes
1 answer
44 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 ...
user avatar
  • 21
2 votes
1 answer
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.
user avatar
  • 33
0 votes
1 answer
98 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?
user avatar
2 votes
1 answer
95 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 ...
user avatar
  • 143
1 vote
1 answer
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 ...
user avatar
0 votes
0 answers
132 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....
user avatar
3 votes
1 answer
435 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 ...
user avatar
2 votes
1 answer
28 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 ...
user avatar
1 vote
1 answer
178 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 ...
user avatar
0 votes
2 answers
219 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 ...
user avatar
0 votes
1 answer
237 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 ...
user avatar
0 votes
1 answer
90 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 ...
user avatar
2 votes
1 answer
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. ...
user avatar
  • 125
0 votes
1 answer
39 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 ...
user avatar
  • 125
0 votes
1 answer
144 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 ...
user avatar
0 votes
1 answer
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 ...
user avatar
0 votes
1 answer
97 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 ...
user avatar
0 votes
1 answer
270 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....
user avatar
  • 180
-1 votes
1 answer
45 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?
user avatar
  • 180
1 vote
1 answer
39 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 ...
user avatar
3 votes
1 answer
873 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 ...
user avatar
0 votes
2 answers
117 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 ...
user avatar
0 votes
1 answer
168 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 ...
user avatar
0 votes
1 answer
624 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 ...
user avatar
  • 123
0 votes
2 answers
143 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 ...
user avatar
3 votes
1 answer
128 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 ...
user avatar
6 votes
5 answers
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 ...
user avatar
1 vote
1 answer
621 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 ...
user avatar
1 vote
0 answers
111 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/...
user avatar
1 vote
1 answer
168 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: [...
user avatar