很遗憾我什至不得不说这件事。信不信由你,我已经尝试找到这个问题的答案。
如何关闭 GNOME(特别是 Ubuntu 18.04)中的工作区?
我autorun在各种USB设备上创建了一些脚本文件,这些设备bash在安装时运行脚本.这些脚本"在后台运行",如何让它们在终端窗口中运行?(就像"终端中的应用程序"gnome Launcher类型.)
在尝试编译这个小型Java程序时,要使用java-gnome中的Notifier类(从最新的bzr分支构建):
import org.gnome.notify;
class Notifier {
public void Main(String[] args) {
Notification n = new Notification("Test notification", "Blah.", "");
n.setTimeout(2000);
n.show();
}
}
Run Code Online (Sandbox Code Playgroud)
编译时我得到以下输出:
$ javac -cp .:/usr/local/share/java/gtk-4.0.jar Notifier.java
Notifier.java:1: package org.gnome does not exist
import org.gnome.notify;
^
Notifier.java:7: cannot find symbol
symbol : class Notification
location: class Notifier
Notification n = new Notification("Test notification", "Blah.", "");
^
Notifier.java:7: cannot find symbol
symbol : class Notification
location: class Notifier
Notification n = new Notification("Test notification", "Blah.", "");
^
3 errors …Run Code Online (Sandbox Code Playgroud) 我有一个需要使用gtkmm 2.4 API的项目,但是它的文档很难找到.官方gtkmm网站有以下声明:
还提供旧版gtkmm 2 API的版本.
但是我似乎无法在任何地方找到它.有人知道一个地方获得文件的好地方吗?
在Ubuntu(Gnome)中,绝对没有办法改变GTK应用程序的鼠标滚轮速率.它在GTK中是硬编码的,由"智能"算法决定,该算法动态地取决于窗口大小.
所以我下载了源代码并找到了返回步长值的函数.我改变它首先返回一个非常小的数字,然后是0(看它是否有任何影响).
我做到了
./configure
make
sudo make install
Run Code Online (Sandbox Code Playgroud)
按照GTK网站的指示.
编译没有任何问题(我有库)
那么,我重启,它绝对没有影响.我的猜测是Ubuntu仍然使用它附带的原始GTK.你认为这里有什么问题?
我的ubuntu设置有各种shell脚本,可以帮助我完成工作.其中许多重要的是坚持不懈的.我有一个shell,它可以"加载"这些不同的持久shell.
但是我希望它能够监控所有各种子shell.并且能够在它自己关闭/任何子壳关闭之后重新创建它.
使整个事物完全自动化.
目前,每个shell都有自己独特的标题:因此,即使是所有打开的gnome终端标题的简单列表都可以工作......>.<问题是,完成了.
我想将应用程序的菜单项添加到GNOME菜单。我已经为其创建了一个桌面文件并将其放在中/usr/share/applications,但是菜单项未出现在GNOME菜单中。以下是我以Aces.desktop... 的名义创建的桌面文件
[Desktop Entry]
Encoding=UTF-8
Version 1.0
Name=Aces
Comment=Compile and Execute C programs
Categories=GNOME;Application;Development;
Exec=/usr/share/Aces/Aces
Icon=/usr/share/Aces/icon.png
Terminal=false
Type=Application
StartupNotify=true
Run Code Online (Sandbox Code Playgroud)
将其放入后/usr/share/applications,我尝试重新启动PC,但仍然无法正常工作。
任何形式的帮助都是可贵的... :)
请检查此链接,我正在尝试从Centos中删除损坏的链接.我也删除了netbeans7.3.desktop文件,但我认为我遗漏了一些东西.
有人可以帮忙吗?
我的理解是Vala和Genie有引用计数而不是垃圾收集.
Per Valadoc.org,这个:
string path = Path.build_filename ("my", "full", "path/to.txt");
Run Code Online (Sandbox Code Playgroud)
得出这个:
a newly-allocated string that must be freed with g_free
Run Code Online (Sandbox Code Playgroud)
这是正确的还是g_free由于引用计数而不是必需的?
如果string是在对象内包裹将g_free上string上物件破坏付诸行动?
现在已经花了一些时间来掌握Gnome Builder,Glade,Vala和Genie - 并考虑到优秀的Gnome人机界面指南(GHIG) - 为什么Glade不是几乎所有GTK GUI应用程序的起点?
例如,是否有任何程序将采用Glade(模板)xml文件并自动生成相应的程序化Vala或Genie源代码?如果有标准的Gtk.ApplicationWindow Glade xml文件,例如,随Glade/Gnome附带的GHIG,这些文件可以快速适应特定项目和带有信号自动生成的Genie类模板 - 加上完整的gresource/meson/flatpak结构.这只是直接导入Gnome-Builder作为起点.有这样的事吗?
更新
以下文件application.gs是使用Genie属性组合从application.ui自动生成的.不想在这里重新发明轮子 - 因此这个问题的原因.以下删除了一些字段,但实际文件已完全填写并可以使用.除了'application.ui'的内容之外,唯一需要的信息是资源路径和ui文件名.一切都已包含在Glade文件中.
/*
{PROJECT_SPACE}
'{PROJECT_NAME}' is a command line tool that will parse a glade ui
template and generate a skeleton class in the Genie language
with composite widgets. It will generate GTKTemplate, GTKChild
and GTKCallback entries.
'{PROJECT_NAME}' exists within the {PROJECT_NAMESPACE} namespace.
Copyright (C) 2018 {AUTHOR_NAME} {AUTHOR_EMAIL}
This library is free software; you can redistribute it and or
or modify it …Run Code Online (Sandbox Code Playgroud)