增加 gedit (gnome) 中最近打开的文件列表的数量

发布于 2024-09-29 13:20:28 字数 161 浏览 0 评论 0原文

我已经使用 gedit 作为编程文本编辑器有一段时间了...

我想将最近打开的文件数量从 5 增加到 10...

我检查了 gedit 首选项和 gconf-editor gedit 选项,但没有任何结果其中与最近打开的文件列表相关。

我可以在哪里更改此设置?

I have been using gedit as a programming text editor for a while...

I would like to increase the number of recently opened files from 5 to 10...

I checked the gedit preferences and the gconf-editor gedit options but there was nothing there related to the recently opened file list.

Where can I change this setting?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

§普罗旺斯的薰衣草 2024-10-06 13:20:28

配置设置位于 /schemas/apps/gedit-2/preferences/ui/recents/max_recents 中,根据 http://people.gnome.org/~bmsmith/gconf-docs/C/gedit.html

根据OP,可以通过发出命令 gconftool-2 --type int --set /apps/gedit-2/preferences/ui/recents/max_recents 10 成功更改设置(注意:/schemas 已删除!)

The configuration setting is in /schemas/apps/gedit-2/preferences/ui/recents/max_recents according to http://people.gnome.org/~bmsmith/gconf-docs/C/gedit.html.

According to OP the setting can successfully be changed by issuing the command gconftool-2 --type int --set /apps/gedit-2/preferences/ui/recents/max_recents 10 (Notice: /schemas is removed!)

伴梦长久 2024-10-06 13:20:28

我在 Ubuntu 14.04 上尝试了接受的答案,但 pevik 遇到了添加该答案没有任何作用的问题。

相反,我必须更改 dconf 中已存在的密钥:

$ dconf write /org/gnome/gedit/preferences/ui/max-recents '20'

编辑:由于重新启动后 gEdit 最近使用的项目数量再次减少到 5,我做了一些调查并发现 Launchpad 上的 bug #1024168 似乎该解决方案未在以下位置使用 dconf all,而是gsettings

$ dconf read /org/gnome/gedit/preferences/ui/max-recents
20
$ gsettings get org.gnome.gedit.preferences.ui max-recents
uint32 5
$ gsettings set org.gnome.gedit.preferences.ui max-recents 25
$ dconf read /org/gnome/gedit/preferences/ui/max-recents
25
$ gsettings get org.gnome.gedit.preferences.ui max-recents
uint32 25

所以,看起来信息流 dconf -> gsettings 无法正常工作,而 gsettings -> dconf 按预期工作。旁注:dconf 声称密钥是一个有符号的 int32,而 gsettings 声明它是一个无符号的 int32...

I tried the accepted answer with Ubuntu 14.04 and as pevik ran into the problem that adding that did not do anything.

Instead, I had to change the already existing key in dconf:

$ dconf write /org/gnome/gedit/preferences/ui/max-recents '20'

EDIT: Since after a restart gEdit's number of most recently used items was reduced to 5 again, I did some investigation and found bug #1024168 on Launchpad and it seems that the solution is not using dconf at all, but instead gsettings:

$ dconf read /org/gnome/gedit/preferences/ui/max-recents
20
$ gsettings get org.gnome.gedit.preferences.ui max-recents
uint32 5
$ gsettings set org.gnome.gedit.preferences.ui max-recents 25
$ dconf read /org/gnome/gedit/preferences/ui/max-recents
25
$ gsettings get org.gnome.gedit.preferences.ui max-recents
uint32 25

So, it seems that the information flow dconf -> gsettings does not work properly, while gsettings -> dconf works as expected. On a side-note: dconf claims the key to be a signed int32, while gsettings states that it is an unsigned int32...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文