Skip to main content

Questions tagged [vala]

Questions related to the Vala programming language.

Filter by
Sorted by
Tagged with
0 votes
1 answer
113 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 ...
Elsie Hupp's user avatar
0 votes
1 answer
70 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 ...
Barry's user avatar
  • 1
0 votes
1 answer
97 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 ...
Atheesh Thirumalairajan's user avatar
0 votes
1 answer
632 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/~...
Peter Uithoven's user avatar
0 votes
1 answer
124 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' ...
Peter Uithoven's user avatar
0 votes
1 answer
35 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 ...
Rajdeep Singha's user avatar
0 votes
0 answers
158 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 ...
farhad's user avatar
  • 1
0 votes
1 answer
67 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 ...
Abhay Salvi's user avatar
1 vote
1 answer
65 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. ...
Rajdeep Singha's user avatar
1 vote
1 answer
55 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://...
Rajdeep Singha's user avatar
0 votes
1 answer
265 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. ...
Rajdeep Singha's user avatar
0 votes
1 answer
105 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, ...
Brendan's user avatar
  • 13
0 votes
1 answer
228 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", "...
Brendan's user avatar
  • 13
1 vote
1 answer
70 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 ...
Brendan's user avatar
  • 13
2 votes
1 answer
63 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 ...
stsdc's user avatar
  • 180
4 votes
2 answers
243 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.
user258456's user avatar
0 votes
1 answer
207 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/...
stsdc's user avatar
  • 180
1 vote
2 answers
32 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/...
stsdc's user avatar
  • 180
2 votes
1 answer
61 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 ...
qard's user avatar
  • 21
2 votes
1 answer
40 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.
Zan's user avatar
  • 33
0 votes
1 answer
109 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
169 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 ...
dfsg76's user avatar
  • 143
1 vote
1 answer
138 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 ...
Felipe Cristiano's user avatar
0 votes
0 answers
182 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....
berliner's user avatar
3 votes
1 answer
495 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 ...
Kristian Rink's 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 ...
Monstercrunch's user avatar
1 vote
1 answer
199 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 ...
Peter Uithoven's user avatar
1 vote
2 answers
305 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 ...
CuriousStudent's user avatar
0 votes
1 answer
301 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 ...
Siddhartha Das's user avatar
0 votes
1 answer
113 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 ...
Siddhartha Das's user avatar
2 votes
1 answer
75 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. ...
Kiran's user avatar
  • 125
0 votes
1 answer
43 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 ...
Kiran's user avatar
  • 125
0 votes
1 answer
172 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 ...
Bernardo Anderson's user avatar
0 votes
1 answer
88 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 ...
Bernardo Anderson's user avatar
0 votes
1 answer
99 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 ...
Siddhartha Das's user avatar
0 votes
1 answer
297 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....
stsdc's user avatar
  • 180
-1 votes
1 answer
50 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?
stsdc's user avatar
  • 180
1 vote
1 answer
45 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 ...
Siddhartha Das's user avatar
3 votes
1 answer
1k 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 ...
Garry Pettet's user avatar
0 votes
2 answers
124 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 ...
Garry Pettet's user avatar
0 votes
1 answer
174 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 ...
Kees de Kooter's user avatar
0 votes
1 answer
644 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 ...
Oliver's user avatar
  • 123
0 votes
2 answers
152 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 ...
Siddhartha Das's user avatar
3 votes
1 answer
133 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 ...
Siddhartha Das's 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 ...
user2241515's user avatar
1 vote
1 answer
669 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 ...
FloodLuszt's user avatar
1 vote
0 answers
116 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/...
cmonagle's user avatar
1 vote
1 answer
215 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: [...
Martin Heralecký's user avatar
2 votes
1 answer
258 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 ...
Samuel Goodell's user avatar
1 vote
1 answer
237 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 ...
Frankity's user avatar