optimized the code, added some bugs :)
This commit is contained in:
13
tmp_test.cpp
13
tmp_test.cpp
@@ -1,10 +1,13 @@
|
||||
#include <giomm/menumodel.h>
|
||||
#include <gio/gio.h>
|
||||
#include <gio/gdbusmenumodel.h>
|
||||
#include <gio/gio.h>
|
||||
#include <giomm/menumodel.h>
|
||||
|
||||
int main(){
|
||||
GDBusMenuModel *dbusModel = g_dbus_menu_model_get_for_bus_sync(G_BUS_TYPE_SESSION, G_DBUS_MENU_MODEL_FLAGS_NONE, "org.freedesktop.Notifications", "/Menu", nullptr, nullptr);
|
||||
if(!dbusModel) return 0;
|
||||
int main() {
|
||||
GDBusMenuModel *dbusModel = g_dbus_menu_model_get_for_bus_sync(
|
||||
G_BUS_TYPE_SESSION, G_DBUS_MENU_MODEL_FLAGS_NONE,
|
||||
"org.freedesktop.Notifications", "/Menu", nullptr, nullptr);
|
||||
if (!dbusModel)
|
||||
return 0;
|
||||
Glib::RefPtr<Gio::MenuModel> model = Glib::wrap(G_MENU_MODEL(dbusModel));
|
||||
return model ? 0 : 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user