ibus-ui-gtk3: Add quit item in menu.
This commit is contained in:
Родитель
ff9556cc21
Коммит
30d217ac85
|
@ -94,7 +94,8 @@ int get_set_engine(string[] argv) {
|
|||
return -1;
|
||||
print("%s\n", desc.get_name());
|
||||
return 0;
|
||||
} else {
|
||||
}
|
||||
|
||||
if(!bus.set_global_engine(engine))
|
||||
return -1;
|
||||
var desc = bus.get_global_engine();
|
||||
|
@ -110,8 +111,6 @@ int get_set_engine(string[] argv) {
|
|||
warning("execute setxkblayout failed");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int message_watch(string[] argv) {
|
||||
|
@ -140,10 +139,10 @@ struct CommandEntry {
|
|||
public int main(string[] argv) {
|
||||
const CommandEntry commands[] = {
|
||||
{ "engine", get_set_engine },
|
||||
{ "exit", exit_daemon },
|
||||
{ "list-engine", list_engine },
|
||||
{ "watch", message_watch },
|
||||
{ "restart", restart_daemon },
|
||||
{ "exit", exit_daemon }
|
||||
{ "restart", restart_daemon }
|
||||
};
|
||||
|
||||
if (argv.length >= 2) {
|
||||
|
|
|
@ -293,11 +293,15 @@ class Panel : IBus.PanelService {
|
|||
|
||||
m_sys_menu.append(new SeparatorMenuItem());
|
||||
|
||||
item = new Gtk.ImageMenuItem.from_stock(Gtk.Stock.QUIT, null);
|
||||
item = new Gtk.ImageMenuItem.from_stock(Gtk.Stock.REFRESH, null);
|
||||
item.set_label(_("Restart"));
|
||||
item.activate.connect((i) => m_bus.exit(true));
|
||||
m_sys_menu.append(item);
|
||||
|
||||
item = new Gtk.ImageMenuItem.from_stock(Gtk.Stock.QUIT, null);
|
||||
item.activate.connect((i) => m_bus.exit(false));
|
||||
m_sys_menu.append(item);
|
||||
|
||||
m_sys_menu.show_all();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче