We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [vala]

Questions related to the Vala programming language.

Filter by
Sorted by
Tagged with
2
votes
1answer
23 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
32 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
0answers
14 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
93 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
66 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....
0
votes
0answers
19 views

Using a library in a project won't work: taglib, tag_c.h not found

So I am tinkering with making an app that uses the taglib library. Currently I installed the library to '/usr/include/taglib/' but when I try to build my app with sudo ninja install it says that it ...
3
votes
1answer
92 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
22 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
118 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
66 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
167 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
61 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 ...
1
vote
1answer
53 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
29 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
126 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
74 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
77 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
176 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
34 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
32 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
493 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
107 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
150 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
487 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
106 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
116 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
0answers
453 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
103 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
123 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
215 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
135 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
771 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
88 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
65 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 ...
1
vote
0answers
137 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 (...
5
votes
1answer
209 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 ...
1
vote
0answers
59 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
107 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
99 views

Item list with text input error on Vala

I have an item list and I want to put a text input: using Gtk; public class TreeViewSample : Window { public TreeViewSample () { this.title = "Programa de odontologia"; ...
1
vote
1answer
363 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
50 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 ...
4
votes
3answers
481 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
452 views

How to use Gtk.Popover() in Vala?

I can't bind Gtk.Popover() to button.
5
votes
2answers
735 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?
2
votes
0answers
29 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 ...
3
votes
1answer
199 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 ...
2
votes
1answer
79 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 ...
4
votes
1answer
88 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/...