├── .clang-format ├── .gitattributes ├── .gitignore ├── .gitlab-ci.yml ├── .gitmodules ├── LICENSE ├── README.md ├── applets ├── budgie-plugin-appmenu.vala ├── mate-plugin-appmenu.vala ├── meson.build ├── valapanel-plugin-appmenu.vala └── xfce4-plugin-appmenu.vala ├── data ├── .gitignore ├── appmenu-budgie.desktop.in ├── appmenu-mate.plugin.desktop.in ├── appmenu.desktop.in ├── appmenu.plugin.desktop.in ├── meson.build └── org.valapanel.appmenu.gschema.xml ├── lib ├── appmenu-abstractions.vala ├── appmenu-wnck.vala ├── appmenu.css ├── desktop-menus.ui ├── helper-dbus.vala ├── helper-dbusmenu.vala ├── helper-desktop.vala ├── helper-menumodel.vala ├── launcher.c ├── launcher.h ├── launcher.vapi ├── libappmenu.gresource.xml ├── libwnck-aux.c ├── libwnck-aux.h ├── matcher.c ├── matcher.h ├── matcher.vapi ├── menu-widget.vala ├── meson.build └── registrar.vala ├── meson.build ├── meson_options.txt ├── po ├── LINGUAS ├── LINGUAS.in ├── aa.po ├── ab.po ├── ae.po ├── af.po ├── ak.po ├── am.po ├── an.po ├── ar.po ├── as.po ├── ast.po ├── av.po ├── ay.po ├── az.po ├── ba.po ├── be.po ├── bg.po ├── bh.po ├── bi.po ├── bm.po ├── bn.po ├── bo.po ├── br.po ├── bs.po ├── ca.po ├── ce.po ├── ch.po ├── ckb.po ├── co.po ├── cr.po ├── cs.po ├── cu.po ├── cv.po ├── cy.po ├── da.po ├── de.po ├── dv.po ├── dz.po ├── ee.po ├── el.po ├── en_AU.po ├── en_CA.po ├── en_GB.po ├── eo.po ├── es.po ├── et.po ├── eu.po ├── fa.po ├── ff.po ├── fi.po ├── fj.po ├── fo.po ├── fr.po ├── fr_CA.po ├── fy.po ├── ga.po ├── gd.po ├── gl.po ├── gn.po ├── gu.po ├── gv.po ├── ha.po ├── he.po ├── hi.po ├── ho.po ├── hr.po ├── ht.po ├── hu.po ├── hy.po ├── hz.po ├── ia.po ├── id.po ├── ie.po ├── ig.po ├── ii.po ├── ik.po ├── io.po ├── is.po ├── it.po ├── iu.po ├── ja.po ├── jv.po ├── ka.po ├── kg.po ├── ki.po ├── kj.po ├── kk.po ├── kl.po ├── km.po ├── kn.po ├── ko.po ├── kr.po ├── ks.po ├── ku.po ├── kv.po ├── kw.po ├── ky.po ├── la.po ├── lb.po ├── lg.po ├── li.po ├── ln.po ├── lo.po ├── lt.po ├── lu.po ├── lv.po ├── meson.build ├── mg.po ├── mh.po ├── mi.po ├── mk.po ├── ml.po ├── mn.po ├── mo.po ├── mr.po ├── ms.po ├── mt.po ├── my.po ├── na.po ├── nb.po ├── nd.po ├── ne.po ├── ng.po ├── nl.po ├── nn.po ├── nr.po ├── nv.po ├── ny.po ├── oc.po ├── oj.po ├── om.po ├── or.po ├── os.po ├── pa.po ├── pi.po ├── pl.po ├── ps.po ├── pt.po ├── pt_BR.po ├── qu.po ├── rm.po ├── rn.po ├── ro.po ├── ru.po ├── rue.po ├── rw.po ├── sa.po ├── sc.po ├── sd.po ├── se.po ├── sg.po ├── si.po ├── sk.po ├── sl.po ├── sm.po ├── sma.po ├── sn.po ├── so.po ├── sq.po ├── sr.po ├── ss.po ├── st.po ├── stamp-it ├── su.po ├── sv.po ├── sw.po ├── ta.po ├── te.po ├── tg.po ├── th.po ├── ti.po ├── tk.po ├── tl.po ├── tn.po ├── to.po ├── tr.po ├── ts.po ├── tt.po ├── tw.po ├── ty.po ├── ug.po ├── uk.po ├── ur.po ├── uz.po ├── vala-panel-appmenu.pot ├── ve.po ├── vi.po ├── vo.po ├── wa.po ├── wo.po ├── xh.po ├── yi.po ├── yo.po ├── za.po ├── zh.po ├── zh_CN.po ├── zh_HK.po ├── zh_TW.po └── zu.po ├── subprojects ├── appmenu-glib-translator │ ├── com.canonical.dbusmenu.xml │ ├── debug.c │ ├── debug.h │ ├── definitions.h │ ├── importer-enums.c.template │ ├── importer-enums.h.template │ ├── importer.c │ ├── importer.h │ ├── item-pixbuf.c │ ├── item.c │ ├── item.h │ ├── meson.build │ ├── model.c │ ├── model.h │ ├── section.c │ ├── section.h │ ├── test.c │ ├── utils.c │ └── utils.h ├── appmenu-gtk-module │ ├── AUTHORS │ ├── LICENSE │ ├── README.md │ ├── TODO │ ├── data │ │ ├── appmenu-gtk-module.service.in │ │ ├── appmenu-gtk2-parser.pc.in │ │ ├── appmenu-gtk3-parser.pc.in │ │ ├── meson.build │ │ └── org.appmenu.gtk-module.gschema.xml │ ├── docs │ │ ├── appmenu-gtk-parser-docs.sgml │ │ ├── appmenu-gtk-parser-sections.txt │ │ ├── appmenu-gtk-parser.types │ │ ├── gtkdocentities.ent.in │ │ └── meson.build │ ├── lib │ │ ├── appmenu-gtk-action-group.h │ │ ├── appmenu-gtk-menu-shell.h │ │ ├── appmenu-gtk-parser.h │ │ ├── meson.build │ │ ├── unity-gtk-action-group-private.h │ │ ├── unity-gtk-action-group.c │ │ ├── unity-gtk-action-private.h │ │ ├── unity-gtk-action.c │ │ ├── unity-gtk-menu-item-private.h │ │ ├── unity-gtk-menu-item.c │ │ ├── unity-gtk-menu-section-private.h │ │ ├── unity-gtk-menu-section.c │ │ ├── unity-gtk-menu-shell-private.h │ │ └── unity-gtk-menu-shell.c │ ├── meson.build │ ├── meson_options.txt │ ├── src │ │ ├── appmenu-gtk-module.c │ │ ├── blacklist.c │ │ ├── blacklist.h │ │ ├── consts.h │ │ ├── datastructs-private.h │ │ ├── datastructs.c │ │ ├── datastructs.h │ │ ├── gtk-2.0 │ │ │ └── meson.build │ │ ├── gtk-3.0 │ │ │ └── meson.build │ │ ├── hijack.c │ │ ├── hijack.h │ │ ├── meson.build │ │ ├── platform.c │ │ ├── platform.h │ │ ├── support.c │ │ └── support.h │ └── tests │ │ ├── autopilot │ │ ├── __init__.py │ │ ├── test.sh │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_gedit.py │ │ ├── demos │ │ ├── altgrabber.c │ │ ├── altgrabber.h │ │ ├── altmonitor.c │ │ ├── altmonitor.h │ │ ├── black.vala │ │ ├── client.c │ │ ├── hello.c │ │ ├── menusource.c │ │ ├── menusource.h │ │ ├── test-radio.c │ │ └── unity-gtk-menu-tester.c │ │ └── meson.build ├── jayatana │ ├── AUTHORS │ ├── LICENSE │ ├── README.md │ ├── java │ │ ├── MANIFEST.MF.in │ │ ├── com │ │ │ └── jarego │ │ │ │ └── jayatana │ │ │ │ ├── Agent.java.in │ │ │ │ ├── Feature.java │ │ │ │ ├── FeatureManager.java │ │ │ │ ├── FeatureWrapper.java │ │ │ │ ├── basic │ │ │ │ ├── GMainLoop.java │ │ │ │ ├── GlobalMenu.java │ │ │ │ ├── GlobalMenuAdapter.java │ │ │ │ ├── NativeLibraries.java.in │ │ │ │ └── meson.build │ │ │ │ ├── meson.build │ │ │ │ └── swing │ │ │ │ ├── SwingGTKFixed.java │ │ │ │ ├── SwingGlobalMenu.java │ │ │ │ ├── SwingGlobalMenuWindow.java │ │ │ │ └── SwingWMClass.java │ │ └── meson.build │ ├── lib │ │ ├── com_jarego_jayatana_Agent.c │ │ ├── com_jarego_jayatana_Agent.h │ │ ├── com_jarego_jayatana_basic_GMainLoop.c │ │ ├── com_jarego_jayatana_basic_GlobalMenu.c │ │ ├── com_jarego_jayatana_jkey2xkey.c │ │ ├── com_jarego_jayatana_jkey2xkey.h │ │ ├── com_jarego_jayatana_jni.c │ │ ├── com_jarego_jayatana_jni.h │ │ ├── config.h.in │ │ ├── dbusmenu-definitions.h │ │ ├── jayatana-window.c │ │ ├── jayatana-window.h │ │ └── meson.build │ └── meson.build └── registrar │ ├── config.h.in │ ├── data │ ├── appmenu-registrar.service.in │ ├── com.canonical.AppMenu.Registrar.xml │ └── org.valapanel.AppMenu.Registrar.xml │ ├── meson.build │ ├── registrar-dbusmenu.c │ ├── registrar-dbusmenu.h │ ├── registrar-main.c │ ├── registrar-main.h │ ├── registrar-marshal.list │ ├── registrar-xml.c.in │ └── version.h.in └── vapi ├── config.vala.in ├── libmatepanelapplet-4.0.vapi ├── libxfce4panel-2.0.vapi └── libxfconf-0.vapi /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | AccessModifierOffset: 0 3 | AlignAfterOpenBracket: true 4 | AlignConsecutiveAssignments: true 5 | #uncomment for clang 3.9 6 | #AlignConsecutiveDeclarations: false 7 | AlignEscapedNewlinesLeft: false 8 | AlignOperands: true 9 | AlignTrailingComments: true 10 | AllowAllParametersOfDeclarationOnNextLine: true 11 | AllowShortBlocksOnASingleLine: false 12 | AllowShortCaseLabelsOnASingleLine: false 13 | AllowShortFunctionsOnASingleLine: None 14 | AllowShortIfStatementsOnASingleLine: false 15 | AllowShortLoopsOnASingleLine: false 16 | # AlwaysBreakAfterDefinitionReturnType: None 17 | #uncomment for clang 3.9 18 | #AlwaysBreakAfterReturnType: None 19 | AlwaysBreakBeforeMultilineStrings: true 20 | AlwaysBreakTemplateDeclarations: false 21 | BinPackArguments: false 22 | BinPackParameters: true 23 | # BraceWrapping: (not set since BreakBeforeBraces is not Custom) 24 | BreakBeforeBinaryOperators: None 25 | # BreakAfterJavaFieldAnnotations: (not java) 26 | BreakBeforeBinaryOperators: None 27 | BreakBeforeBraces: Allman 28 | BreakBeforeTernaryOperators: true 29 | BreakConstructorInitializersBeforeComma: false 30 | #uncomment for clang 3.9 31 | #BreakStringLiterals: false 32 | ColumnLimit: 100 33 | CommentPragmas: '\*\<' 34 | ConstructorInitializerAllOnOneLineOrOnePerLine: false 35 | ConstructorInitializerIndentWidth: 4 36 | ContinuationIndentWidth: 4 37 | Cpp11BracedListStyle: false 38 | DerivePointerAlignment: false 39 | DisableFormat: false 40 | ExperimentalAutoDetectBinPacking: false 41 | #Uncomment for clang 3.9 42 | #IncludeCategories: 43 | # - Regex: '^"' 44 | # Priority: 1 45 | # IncludeIsMainRegex: (project doesn't use a main includes that can add other includes via regex) 46 | IndentCaseLabels: false 47 | IndentWidth: 8 48 | IndentWrappedFunctionNames: false 49 | # JavaScriptQuotes: (not javascript) 50 | KeepEmptyLinesAtTheStartOfBlocks: false 51 | Language: Cpp 52 | MacroBlockBegin: '' 53 | MacroBlockEnd: '' 54 | MaxEmptyLinesToKeep: 1 55 | NamespaceIndentation: None 56 | # ObjCBlockIndentWidth: (not objc) 57 | # ObjCSpaceAfterProperty: (not objc) 58 | # ObjCSpaceBeforeProtocolList: (not objc) 59 | PenaltyBreakBeforeFirstCallParameter: 400 60 | PenaltyBreakComment: 0 61 | # PenaltyBreakFirstLessLess: (not cpp) 62 | PenaltyBreakString: 500 63 | PenaltyExcessCharacter: 10000 64 | PenaltyReturnTypeOnItsOwnLine: 600 65 | PointerAlignment: Right 66 | #uncomment for clang 3.9 67 | #ReflowComments: true 68 | #uncomment for clang 3.9 69 | #SortIncludes: true 70 | SpaceAfterCStyleCast: false 71 | SpaceBeforeAssignmentOperators: true 72 | SpaceBeforeParens: ControlStatements 73 | SpaceInEmptyParentheses: false 74 | SpacesBeforeTrailingComments: 1 75 | SpacesInAngles: false 76 | SpacesInCStyleCastParentheses: false 77 | # SpacesInContainerLiterals: (not objc or javascript) 78 | SpacesInParentheses: false 79 | SpacesInSquareBrackets: false 80 | Standard: Cpp11 81 | TabWidth: 8 82 | UseTab: ForIndentation 83 | ... 84 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | subprojects/* linguist-vendored 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.debhelper 2 | *.la 3 | *.lo 4 | *.log 5 | *.m4 6 | *.pc 7 | *.pyc 8 | *.stamp 9 | *.substvars 10 | .deps 11 | .libs 12 | .cache 13 | Makefile 14 | Makefile.in 15 | autom4te.cache 16 | build 17 | build-aux 18 | config.log 19 | config.status 20 | configure 21 | debian/autoreconf.after 22 | debian/autoreconf.before 23 | debian/files 24 | debian/libunity-gtk-parser-dev 25 | debian/libunity-gtk-parser-dev-common 26 | debian/libunity-gtk-parser0 27 | debian/libunity-gtk2-parser-dev 28 | debian/libunity-gtk2-parser0 29 | debian/libunity-gtk3-parser-dev 30 | debian/libunity-gtk3-parser0 31 | debian/tmp 32 | debian/unity-gtk-module 33 | debian/unity-gtk-module-common 34 | debian/unity-gtk2-module 35 | debian/unity-gtk3-module 36 | docs/reference/unity-gtk-module/html 37 | docs/reference/unity-gtk-module/xml 38 | docs/reference/unity-gtk-module/unity-gtk-module-decl-list.txt 39 | docs/reference/unity-gtk-module/unity-gtk-module-decl.txt 40 | docs/reference/unity-gtk-module/unity-gtk-module-undeclared.txt 41 | docs/reference/unity-gtk-module/unity-gtk-module-undocumented.txt 42 | docs/reference/unity-gtk-module/unity-gtk-module-unused.txt 43 | docs/reference/unity-gtk-module/unity-gtk-module.args 44 | docs/reference/unity-gtk-module/unity-gtk-module.hierarchy 45 | docs/reference/unity-gtk-module/unity-gtk-module.interfaces 46 | docs/reference/unity-gtk-module/unity-gtk-module.prerequisites 47 | docs/reference/unity-gtk-module/unity-gtk-module.signals 48 | libtool 49 | data/appmenu.desktop.plugin.in -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "cmake"] 2 | path = cmake 3 | url = https://gitlab.com/vala-panel-project/cmake-vala.git 4 | -------------------------------------------------------------------------------- /applets/meson.build: -------------------------------------------------------------------------------- 1 | if vala_panel_found 2 | vp_applets_libdir = vp.get_variable(pkgconfig:'applets_dir') 3 | vp_sources = files('valapanel-plugin-appmenu.vala') 4 | vpp = shared_module('appmenu', vp_sources, libres, 5 | dependencies: [appmenu_dep, vp], 6 | install: true, 7 | install_dir: vp_applets_libdir 8 | ) 9 | endif 10 | 11 | if mate_found 12 | mate_applet_libdir = join_paths(mp.get_variable(pkgconfig:'libdir'),'mate-panel') 13 | mp_sources = files('mate-plugin-appmenu.vala') 14 | mpp = shared_module('appmenu-mate', mp_sources, libres, 15 | dependencies: [appmenu_dep, mp], 16 | install: true, 17 | install_dir: mate_applet_libdir 18 | ) 19 | endif 20 | 21 | if xfce_found 22 | xfce_applet_libdir = join_paths(xp.get_variable(pkgconfig:'libdir'),'xfce4','panel','plugins') 23 | xp_sources = files('xfce4-plugin-appmenu.vala') 24 | xpp = shared_module('appmenu-xfce', xp_sources, libres, 25 | dependencies: [appmenu_dep, xc,xp], 26 | install: true, 27 | install_dir: xfce_applet_libdir 28 | ) 29 | endif 30 | 31 | if budgie_found 32 | budgie_applet_libdir = join_paths(bp.get_variable(pkgconfig:'libdir'),'budgie-desktop','plugins','budgie-appmenu-plugin') 33 | bp_sources = files('budgie-plugin-appmenu.vala') 34 | bpp = shared_module('appmenu-budgie', bp_sources, libres, 35 | dependencies: [appmenu_dep, bp], 36 | install: true, 37 | install_dir: budgie_applet_libdir 38 | ) 39 | endif 40 | -------------------------------------------------------------------------------- /applets/valapanel-plugin-appmenu.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2015 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | using Gtk; 20 | using GLib; 21 | using ValaPanel; 22 | using Appmenu; 23 | 24 | 25 | public class GlobalMenuApplet: Applet 26 | { 27 | unowned MenuWidget layout; 28 | public override void constructed() 29 | { 30 | (this.action_group.lookup_action(APPLET_ACTION_CONFIGURE) as SimpleAction).set_enabled(true); 31 | var layout = new Appmenu.MenuWidget(); 32 | this.layout = layout; 33 | this.background_widget = layout; 34 | this.init_background(); 35 | settings.bind(Key.COMPACT_MODE,layout,Key.COMPACT_MODE,SettingsBindFlags.DEFAULT); 36 | settings.bind(Key.BOLD_APPLICATION_NAME,layout,Key.BOLD_APPLICATION_NAME,SettingsBindFlags.DEFAULT); 37 | this.add(layout); 38 | layout.show(); 39 | this.show(); 40 | } 41 | ~GlobalMenuApplet() 42 | { 43 | layout.unref(); 44 | } 45 | public override Widget get_settings_ui() 46 | { 47 | var dlg = new Gtk.Box(Gtk.Orientation.VERTICAL,0); 48 | var entry = new CheckButton.with_label(dgettext(Config.GETTEXT_PACKAGE,"Use Compact mode (all menus in application menu)")); 49 | this.settings.bind(Key.COMPACT_MODE,entry,"active",SettingsBindFlags.DEFAULT); 50 | dlg.pack_start(entry,false,false,2); 51 | entry.show(); 52 | entry = new CheckButton.with_label(dgettext(Config.GETTEXT_PACKAGE,"Use bold application name")); 53 | this.settings.bind(Key.BOLD_APPLICATION_NAME,entry,"active",SettingsBindFlags.DEFAULT); 54 | dlg.pack_start(entry,false,false,2); 55 | entry.show(); 56 | dlg.show(); 57 | return dlg; 58 | } 59 | } // End class 60 | 61 | [ModuleInit] 62 | public void g_io_appmenu_load(GLib.TypeModule module) 63 | { 64 | // boilerplate - all modules need this 65 | GLib.IOExtensionPoint.implement(ValaPanel.APPLET_EXTENSION_POINT,typeof(GlobalMenuApplet),"org.valapanel.appmenu",10); 66 | } 67 | 68 | public void g_io_appmenu_unload(GLib.IOModule module) 69 | { 70 | // boilerplate - all modules need this 71 | } 72 | -------------------------------------------------------------------------------- /data/.gitignore: -------------------------------------------------------------------------------- 1 | /org.valapanel.appmenu.desktop.in 2 | -------------------------------------------------------------------------------- /data/appmenu-budgie.desktop.in: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=appmenu-budgie.so 3 | Name=Global Menu 4 | Description=Show menus from windows 5 | Authors=Konstantin Pugin 6 | Copyright=Copyright © 2016 Konstantin Pugin 7 | Website=https://github.com/rilian-la-te/vala-panel-appmenu 8 | Icon=view-grid-symbolic 9 | -------------------------------------------------------------------------------- /data/appmenu-mate.plugin.desktop.in: -------------------------------------------------------------------------------- 1 | [Applet Factory] 2 | Id=AppmenuAppletFactory 3 | Location=@CMAKE_INSTALL_FULL_LIBDIR@/mate-panel/libappmenu-mate.so 4 | Name=Appmenu applet factory 5 | InProcess=true 6 | 7 | [AppmenuApplet] 8 | Name=Global Application Menu 9 | Description=All menus will hosts here 10 | Icon=applications-system 11 | -------------------------------------------------------------------------------- /data/appmenu.desktop.in: -------------------------------------------------------------------------------- 1 | [Xfce Panel] 2 | Type=X-XFCE-PanelPlugin 3 | Encoding=UTF-8 4 | Name=AppMenu Plugin 5 | Comment=Display AppMenu (Global Menu) 6 | Icon=applications-system 7 | X-XFCE-Module=appmenu-xfce 8 | X-XFCE-API=2.0 9 | -------------------------------------------------------------------------------- /data/appmenu.plugin.desktop.in: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=appmenu 3 | Name=AppMenu Plugin 4 | Description=Display AppMenu (Global Menu) 5 | Icon=preferences-system-symbolic 6 | Website=https://gitlab.com/vala-panel-project/vala-panel-appmenu 7 | HelpURI=https://gitlab.com/vala-panel-project/vala-panel-appmenu 8 | License=lgpl 9 | X-ValaPanel-Expandable=true 10 | Expandable=true 11 | Version=@VERSION@ 12 | -------------------------------------------------------------------------------- /data/meson.build: -------------------------------------------------------------------------------- 1 | cdata = configuration_data() 2 | cdata.set('CMAKE_INSTALL_FULL_LIBDIR', join_paths(prefix,get_option('libdir'))) 3 | cdata.set('CMAKE_INSTALL_FULL_DATAROOTDIR', join_paths(prefix,datadir)) 4 | 5 | if vala_panel_found 6 | vp_applets_datadir = vp.get_variable(pkgconfig:'applets_data') 7 | desktop = vcs_tag( 8 | command : ['git','describe','--tags'], 9 | input: 'appmenu.plugin.desktop.in', 10 | output: 'appmenu.plugin.in', 11 | replace_string: '@VERSION@', 12 | ) 13 | i18n.merge_file( 14 | input: desktop, 15 | output: 'org.valapanel.appmenu.plugin', 16 | kwargs: desktop_kwargs, 17 | install_dir: vp_applets_datadir 18 | ) 19 | endif 20 | 21 | if mate_found 22 | mate_applet_datadir = join_paths(mp.get_variable(pkgconfig:'prefix'),datadir,'mate-panel','applets') 23 | mate_desktop = configure_file(input : 'appmenu-mate.plugin.desktop.in', 24 | output : 'appmenu-mate.desktop.in', 25 | configuration : cdata) 26 | i18n.merge_file( 27 | input: mate_desktop, 28 | output: 'org.vala-panel.appmenu.mate-panel-applet', 29 | kwargs: desktop_kwargs, 30 | install_dir: mate_applet_datadir 31 | ) 32 | endif 33 | 34 | if xfce_found 35 | xfce_applet_datadir = join_paths(xp.get_variable(pkgconfig:'prefix'),datadir,'xfce4','panel','plugins') 36 | i18n.merge_file( 37 | input: 'appmenu.desktop.in', 38 | output: 'appmenu.desktop', 39 | kwargs: desktop_kwargs, 40 | install_dir: xfce_applet_datadir 41 | ) 42 | endif 43 | 44 | if budgie_found 45 | i18n.merge_file( 46 | input: 'appmenu-budgie.desktop.in', 47 | output: 'appmenu-budgie.plugin', 48 | kwargs: desktop_kwargs, 49 | install_dir: budgie_applet_libdir 50 | ) 51 | endif 52 | 53 | if mate_found or vala_panel_found or budgie_found 54 | install_data([ 55 | 'org.valapanel.appmenu.gschema.xml' 56 | ], install_dir: schema_dir) 57 | endif 58 | -------------------------------------------------------------------------------- /data/org.valapanel.appmenu.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | 7 | false 8 | 9 | 10 | 11 | 12 | false 13 | 14 | 15 | false 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /lib/appmenu-abstractions.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2015 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | using GLib; 20 | using Gtk; 21 | 22 | namespace Appmenu 23 | { 24 | public enum ModelType 25 | { 26 | NONE, 27 | STUB, 28 | DESKTOP, 29 | MENUMODEL, 30 | DBUSMENU 31 | } 32 | internal abstract class Helper: Object 33 | { 34 | 35 | } 36 | public abstract class Backend : Object 37 | { 38 | protected ModelType type = ModelType.NONE; 39 | protected static DBusMenuRegistrarProxy proxy; 40 | static construct 41 | { 42 | proxy = new DBusMenuRegistrarProxy(); 43 | } 44 | construct 45 | { 46 | try 47 | { 48 | var con = Bus.get_sync(BusType.SESSION); 49 | con.call.begin( 50 | "org.valapanel.AppMenu.Registrar", 51 | "/org/valapanel/AppMenu/Registrar", 52 | "org.valapanel.AppMenu.Registrar", 53 | "Reference", 54 | null,null, 55 | DBusCallFlags.NONE, -1); 56 | } 57 | catch(Error e) 58 | { 59 | stderr.printf("%s\n",e.message); 60 | } 61 | } 62 | ~Backend() 63 | { 64 | try 65 | { 66 | var con = Bus.get_sync(BusType.SESSION,null); 67 | con.call.begin( 68 | "org.valapanel.AppMenu.Registrar", 69 | "/org/valapanel/AppMenu/Registrar", 70 | "org.valapanel.AppMenu.Registrar", 71 | "UnReference", 72 | null,null, 73 | DBusCallFlags.NO_AUTO_START, -1); 74 | } 75 | catch(Error e) 76 | { 77 | stderr.printf("%s\n",e.message); 78 | } 79 | } 80 | public signal void active_model_changed(); 81 | public abstract void set_active_window_menu(MenuWidget widget); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /lib/appmenu.css: -------------------------------------------------------------------------------- 1 | .-vala-panel-appmenu-private { 2 | background-color: transparent; 3 | background-image: none; 4 | color: inherit; 5 | box-shadow: inset 0 0px; 6 | } 7 | 8 | .-vala-panel-appmenu-core scrolledwindow, 9 | .-vala-panel-appmenu-private > menuitem, 10 | .-vala-panel-appmenu-private > menuitem:first-child > label { 11 | margin-top: 0; 12 | margin-bottom: 0; 13 | padding-top: 0; 14 | padding-bottom: 0; 15 | } 16 | 17 | menubar.-vala-panel-appmenu-bold > menuitem:first-child > label { 18 | font-weight: bolder; 19 | } 20 | 21 | .-vala-panel-appmenu-private > separator { 22 | 23 | background-color: transparent; 24 | background-image: none; 25 | opacity: 0; 26 | } 27 | -------------------------------------------------------------------------------- /lib/desktop-menus.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | _Desktop Settings 7 | menu.desktop-settings 8 | 9 | 10 | _System Settings 11 | menu.control-center 12 | 13 |
14 |
15 | 16 | 17 | _Files 18 | menu.populate-files 19 | 20 | 21 | _Documents 22 | menu.populate-docs 23 | 24 | 25 | _Music 26 | menu.populate-music 27 | 28 | 29 | _Pictures 30 | menu.populate-picts 31 | 32 | 33 | _Video 34 | menu.populate-video 35 | 36 | 37 | 38 |
39 | 40 | _New 41 | conf.new 42 | action-missing 43 | 44 |
45 |
46 |
47 |
48 |
49 |
50 | 51 | _Quit 52 | conf.quit 53 | action-missing 54 | 55 |
56 |
57 |
58 | -------------------------------------------------------------------------------- /lib/helper-dbusmenu.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2018 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | using GLib; 20 | using Gtk; 21 | 22 | namespace Appmenu 23 | { 24 | internal class DBusMenuHelper: Helper 25 | { 26 | private DBusMenu.Importer importer = null; 27 | private Helper dbus_helper = null; 28 | private ulong connect_handler = 0; 29 | public DBusMenuHelper(MenuWidget w, string name, ObjectPath path, string? title, DesktopAppInfo? info) 30 | { 31 | dbus_helper = new DBusAppMenu(w, title, name, info); 32 | importer = new DBusMenu.Importer(name,(string)path); 33 | connect_handler = Signal.connect(importer,"notify::model",(GLib.Callback)on_model_changed_cb,w); 34 | } 35 | private static void on_model_changed_cb(DBusMenu.Importer importer, GLib.ParamSpec pspec, MenuWidget w) 36 | { 37 | w.insert_action_group("dbusmenu",importer.action_group); 38 | w.set_menubar(importer.model); 39 | } 40 | ~DBusMenuHelper() 41 | { 42 | importer.disconnect(connect_handler); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/helper-menumodel.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2015 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | using GLib; 20 | using Gtk; 21 | 22 | namespace Appmenu 23 | { 24 | internal class MenuModelHelper: Helper 25 | { 26 | private Helper dbus_helper = null; 27 | public MenuModelHelper(MenuWidget w, 28 | string? gtk_unique_bus_name, 29 | string? app_menu_path, 30 | string? menubar_path, 31 | string? application_path, 32 | string? window_path, 33 | string? unity_path, 34 | string? title, 35 | DesktopAppInfo? info) 36 | { 37 | GLib.ActionGroup? appmenu_actions = null; 38 | GLib.ActionGroup? menubar_actions = null; 39 | GLib.ActionGroup? unity_actions = null; 40 | DBusConnection? dbusconn = null; 41 | try { 42 | dbusconn = Bus.get_sync(BusType.SESSION); 43 | } catch (Error e) { 44 | stderr.printf("%s\n",e.message); 45 | return; 46 | } 47 | if (application_path != null) 48 | appmenu_actions = DBusActionGroup.get(dbusconn,gtk_unique_bus_name,application_path); 49 | if (unity_path != null) 50 | unity_actions = DBusActionGroup.get(dbusconn,gtk_unique_bus_name,unity_path); 51 | if (window_path != null) 52 | menubar_actions = DBusActionGroup.get(dbusconn,gtk_unique_bus_name,window_path); 53 | GLib.MenuModel? appmenu = null; 54 | if (app_menu_path != null) 55 | { 56 | appmenu = new GLib.Menu(); 57 | (appmenu as GLib.Menu).append_submenu(title,DBusMenuModel.get(dbusconn,gtk_unique_bus_name,app_menu_path)); 58 | w.set_appmenu(appmenu); 59 | } 60 | else 61 | dbus_helper = new DBusAppMenu(w, title, gtk_unique_bus_name, info); 62 | if (menubar_path != null) 63 | { 64 | var menubar = DBusMenuModel.get(dbusconn,gtk_unique_bus_name,menubar_path); 65 | w.set_menubar(menubar); 66 | } 67 | else 68 | w.set_menubar(null); 69 | if (appmenu_actions != null) 70 | w.insert_action_group("app",appmenu_actions); 71 | if (menubar_actions != null) 72 | w.insert_action_group("win",menubar_actions); 73 | if (unity_actions != null) 74 | w.insert_action_group("unity",unity_actions); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /lib/launcher.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel 3 | * Copyright (C) 2015-2016 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef LAUNCHER_H 20 | #define LAUNCHER_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | bool vala_panel_launch(GDesktopAppInfo *app_info, GList *uris, GtkWidget *parent); 28 | GAppInfo *vala_panel_get_default_for_uri(const char *uri); 29 | void child_spawn_func(void *data); 30 | char *posix_get_cmdline_string(const char *filename); 31 | void menu_launch_id(GSimpleAction *action, GVariant *param, gpointer user_data); 32 | void menu_launch_uri(GSimpleAction *action, GVariant *param, gpointer user_data); 33 | void menu_launch_command(GSimpleAction *action, GVariant *param, gpointer user_data); 34 | 35 | #endif // LAUNCHER_H 36 | -------------------------------------------------------------------------------- /lib/launcher.vapi: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel 3 | * Copyright (C) 2016 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | using Gtk; 20 | using GLib; 21 | 22 | [CCode (cprefix="")] 23 | namespace Launcher 24 | { 25 | [CCode (cheader_filename="launcher.h",cname="menu_launch_id")] 26 | public static void activate_menu_launch_id(SimpleAction? action, Variant? param, void* user_data); 27 | [CCode (cheader_filename="launcher.h",cname="menu_launch_uri")] 28 | public static void activate_menu_launch_uri(SimpleAction? action, Variant? param, void* user_data); 29 | [CCode (cheader_filename="launcher.h",cname="menu_launch_command")] 30 | public static void activate_menu_launch_command(SimpleAction? action, Variant? param, void* user_data); 31 | [CCode (cname="posix_get_cmdline_string",cheader_filename="launcher.h")] 32 | public static string? posix_get_cmdline_string(string filename); 33 | } 34 | [CCode (cprefix="")] 35 | namespace MenuMaker 36 | { 37 | [CCode (cheader_filename="launcher.h",cname="vala_panel_launch")] 38 | public static bool launch(DesktopAppInfo info, GLib.List? uris, Gtk.Widget parent); 39 | [CCode (cheader_filename="launcher.h",cname="vala_panel_get_default_for_uri")] 40 | public static AppInfo get_default_for_uri(string uri); 41 | } 42 | 43 | -------------------------------------------------------------------------------- /lib/libappmenu.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | desktop-menus.ui 6 | appmenu.css 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/libwnck-aux.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel 3 | * Copyright (C) 2020 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "matcher.h" 20 | #include 21 | 22 | #ifndef WNCK_AUX_INCLUDED 23 | #define WNCK_AUX_INCLUDED 24 | 25 | G_BEGIN_DECLS 26 | 27 | char *libwnck_aux_get_utf8_prop(ulong window, const char *prop); 28 | GDesktopAppInfo *libwnck_aux_match_wnck_window(ValaPanelMatcher *self, WnckWindow *window); 29 | 30 | G_END_DECLS 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /lib/matcher.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel 3 | * Copyright (C) 2018 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef MATCHER_H 20 | #define MATCHER_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | G_DECLARE_FINAL_TYPE(ValaPanelMatcher, vala_panel_matcher, VALA_PANEL, MATCHER, GObject) 30 | 31 | ValaPanelMatcher *vala_panel_matcher_get(); 32 | GDesktopAppInfo *vala_panel_matcher_match_arbitrary(ValaPanelMatcher *self, const char *class, 33 | const char *group, const char *gtk, 34 | int64_t pid); 35 | 36 | G_END_DECLS 37 | 38 | #endif // MATCHER_H 39 | -------------------------------------------------------------------------------- /lib/matcher.vapi: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel 3 | * Copyright (C) 2018 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | [CCode(cheader_filename="matcher.h")] 20 | public class ValaPanel.Matcher : GLib.Object 21 | { 22 | [CCode (has_construct_function = false)] 23 | private Matcher(); 24 | public static Matcher @get(); 25 | public unowned GLib.DesktopAppInfo match_arbitrary(string class, string group, string gtk_id, int pid); 26 | } 27 | 28 | [CCode(cheader_filename="libwnck-aux.h")] 29 | public unowned GLib.DesktopAppInfo libwnck_aux_match_wnck_window(ValaPanel.Matcher matcher, Wnck.Window win); 30 | public string libwnck_aux_get_utf8_prop(ulong xid, string prop); 31 | -------------------------------------------------------------------------------- /lib/meson.build: -------------------------------------------------------------------------------- 1 | sources = files( 2 | 'appmenu-abstractions.vala', 3 | 'registrar.vala', 4 | 'menu-widget.vala', 5 | 'helper-desktop.vala', 6 | 'helper-dbus.vala', 7 | 'helper-dbusmenu.vala', 8 | 'helper-menumodel.vala', 9 | 'launcher.vapi', 10 | 'launcher.c', 11 | 'launcher.h' 12 | ) 13 | 14 | wnck_src = files( 15 | 'appmenu-wnck.vala', 16 | 'matcher.c', 17 | 'matcher.h', 18 | 'libwnck-aux.c', 19 | 'libwnck-aux.h', 20 | 'matcher.vapi' 21 | ) 22 | 23 | libres = gnome.compile_resources( 24 | 'lib', 'libappmenu.gresource.xml', 25 | source_dir: '.', 26 | c_name: 'lib' 27 | ) 28 | valac = meson.get_compiler('vala') 29 | posix_dep = valac.find_library('posix') 30 | 31 | importer_dep = dependency('appmenu-glib-translator', fallback : ['appmenu-glib-translator', 'importer_dep']) 32 | 33 | appmenu_deps = [giounix, gtk, importer_dep, posix_dep] 34 | appmenu_cflags = [] 35 | if backend_wnck 36 | sources += wnck_src 37 | appmenu_deps += wnck 38 | appmenu_cflags += ['-DWNCK_I_KNOW_THIS_IS_UNSTABLE'] 39 | endif 40 | 41 | appmenu_lib = static_library('libappmenu', 42 | sources, config, 43 | dependencies: appmenu_deps, 44 | c_args: appmenu_cflags, 45 | pic: true 46 | ) 47 | appmenu_inc = include_directories('.') 48 | 49 | appmenu_dep = declare_dependency( 50 | include_directories: appmenu_inc, 51 | dependencies: [gtk, giounix], 52 | link_whole: appmenu_lib 53 | ) 54 | -------------------------------------------------------------------------------- /meson.build: -------------------------------------------------------------------------------- 1 | project( 2 | 'vala-panel-appmenu', 3 | 'vala', 4 | 'c', 5 | version : '25.04', 6 | meson_version : '>=0.51.0', 7 | license : 'LGPL-3.0-or-later', 8 | default_options : ['c_std=gnu11', 'buildtype=debugoptimized', 'warning_level=1'] 9 | ) 10 | 11 | am_cflags = [ 12 | '-fstack-protector', 13 | '-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()), 14 | ] 15 | add_project_arguments(am_cflags, language: 'c') 16 | 17 | vapi_dir = join_paths(meson.current_source_dir(), 'vapi') 18 | add_project_arguments(['--vapidir', vapi_dir], language: 'vala') 19 | 20 | ################## 21 | # Module imports # 22 | ################## 23 | 24 | gnome = import('gnome') 25 | i18n = import('i18n') 26 | 27 | ############### 28 | # Directories # 29 | ############### 30 | prefix = get_option('prefix') 31 | datadir = get_option('datadir') 32 | localedir = get_option('localedir') 33 | schema_dir = join_paths(get_option('datadir'), 'glib-2.0', 'schemas') 34 | 35 | 36 | ################ 37 | # Dependencies # 38 | ################ 39 | glib_ver = '>=2.52.0' 40 | giounix = dependency('gio-unix-2.0', version: glib_ver) 41 | 42 | gdkpixbuf = dependency('gdk-pixbuf-2.0', required: false) 43 | 44 | gtk_ver = '>=3.22.0' 45 | gtk = dependency('gtk+-3.0', version: gtk_ver) 46 | 47 | backend_opt = get_option('wm_backend') 48 | backend_wnck = false 49 | 50 | wnck_ver = '>=3.4.8' 51 | wnck = dependency('libwnck-3.0', version: wnck_ver, required: backend_opt == 'wnck') 52 | 53 | if(wnck.found() and (backend_opt == 'wnck' or backend_opt == 'auto')) 54 | backend_wnck = true 55 | endif 56 | 57 | if(not (backend_wnck)) 58 | error('No backend available (libwnck3 required)') 59 | endif 60 | 61 | vp_ver = '>=24.03' 62 | vp = dependency('vala-panel', version: vp_ver, required: get_option('valapanel')) 63 | vala_panel_found = vp.found() 64 | 65 | mp_ver = '>=1.20' 66 | mp = dependency('libmatepanelapplet-4.0', version: mp_ver, required: get_option('mate')) 67 | mate_found = mp.found() 68 | 69 | xp = dependency('libxfce4panel-2.0', required: get_option('xfce')) 70 | xc = dependency('libxfconf-0', required: get_option('xfce')) 71 | xfce_found = xp.found() and xc.found() 72 | 73 | bp = dependency('budgie-1.0', required: get_option('budgie')) 74 | budgie_found = bp.found() 75 | 76 | 77 | ################# 78 | # Configuration # 79 | ################# 80 | conf_data = configuration_data() 81 | conf_data.set('GETTEXT_PACKAGE', meson.project_name()) 82 | conf_data.set('LOCALE_DIR', join_paths(prefix,localedir)) 83 | conf_data.set('CMAKE_INSTALL_PREFIX', prefix) 84 | 85 | config = configure_file(input : join_paths('vapi','config.vala.in'), 86 | output : 'config.vala', 87 | configuration : conf_data) 88 | 89 | desktop_kwargs = { 90 | 'type': 'desktop', 91 | 'args' : ['--keyword=Name','--keyword=Description','--keyword=Comment', '--keyword=Help'], 92 | 'po_dir': join_paths(meson.current_source_dir(),'po'), 93 | 'install': true, 94 | } 95 | 96 | ################# 97 | # Subprojects # 98 | ################# 99 | subproject('registrar', required: get_option('registrar')) 100 | subproject('jayatana', required: get_option('jayatana')) 101 | subproject('appmenu-gtk-module', required: get_option('appmenu-gtk-module')) 102 | 103 | subdir('lib') 104 | subdir('applets') 105 | subdir('data') 106 | subdir('po') 107 | 108 | install_data('README.md', install_dir : join_paths(get_option('datadir'), 'doc', meson.project_name())) 109 | install_data('LICENSE', install_dir : join_paths(get_option('datadir'), 'licenses', meson.project_name())) 110 | -------------------------------------------------------------------------------- /meson_options.txt: -------------------------------------------------------------------------------- 1 | option('wm_backend', type: 'combo', choices: ['auto','wnck'], value: 'auto', description: 'Backend for appmenu') 2 | 3 | option('valapanel', type: 'feature', value: 'auto', description: 'Vala Panel Integration - 0.5.x') 4 | option('xfce', type: 'feature', value: 'auto', description: 'Xfce Panel Integration') 5 | option('mate', type: 'feature', value: 'auto', description: 'MATE Panel Integration') 6 | option('budgie', type: 'feature', value: 'auto', description: 'Budgie Desktop Integration') 7 | 8 | option('registrar', type: 'feature', value: 'auto', description: 'DBusMenu registrar') 9 | option('appmenu-gtk-module', type: 'feature', value: 'auto', description: 'Gtk+ module for AppMenu') 10 | option('jayatana', type: 'feature', value: 'auto', description: 'Java support for global menus') 11 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | aa ab ae af ak am an ar as ast av ay az ba be bg bh bi bm bn bo br bs ca ce ch ckb co cr cs cu cv cy da de dv dz ee el en_AU en_CA en_GB eo es et eu fa ff fi fj fo fr fr_CA fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mo mr ms mt my na nb nd ne ng nl nn nr nv ny oc oj om or os pa pi pl ps pt pt_BR qu rm rn ro ru rue rw sa sc sd se sg si sk sl sm sma sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zh_CN zh_HK zh_TW zu 2 | -------------------------------------------------------------------------------- /po/LINGUAS.in: -------------------------------------------------------------------------------- 1 | @LINGUAS@ 2 | -------------------------------------------------------------------------------- /po/aa.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ab.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ae.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/af.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ak.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/am.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/an.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/as.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ast.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/av.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ay.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/az.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ba.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/be.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 6 | -------------------------------------------------------------------------------- /po/bg.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 6 | -------------------------------------------------------------------------------- /po/bh.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/bi.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/bm.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/bn.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/bo.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/br.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/bs.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ca.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ce.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ch.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ckb.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/co.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/cr.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/cs.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" 6 | -------------------------------------------------------------------------------- /po/cu.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/cv.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/cy.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/de.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 6 | -------------------------------------------------------------------------------- /po/dv.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/dz.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ee.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/el.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/en_AU.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/en_CA.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/en_GB.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/eo.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 6 | -------------------------------------------------------------------------------- /po/es.po: -------------------------------------------------------------------------------- 1 | 2 | # SOME DESCRIPTIVE TITLE. 3 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 4 | # This file is distributed under the same license as the PACKAGE package. 5 | # Joel Barrios , 2017. 6 | # 7 | #, fuzzy 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: \n" 11 | "Report-Msgid-Bugs-To: \n" 12 | "POT-Creation-Date: 2015-04-02 13:41+0600\n" 13 | "PO-Revision-Date: 2017-12-02 06:49-0600\n" 14 | "Last-Translator: Joel Barrios \n" 15 | "Language-Team: \n" 16 | "Language: es\n" 17 | "MIME-Version: 1.0\n" 18 | "Content-Type: text/plain; charset=UTF-8\n" 19 | "Content-Transfer-Encoding: 8bit\n" 20 | 21 | #: ../lib/appmenu-desktop.vala:39 22 | msgid "_Desktop" 23 | msgstr "_Escritorio" 24 | 25 | msgid "Use Compact mode (all menus in application menu)" 26 | msgstr "Utilizar modo compacto (Todos los menus en un menu)" 27 | 28 | #: ../lib/budgie-plugin-appmenu.vala:54 ../lib/mate-plugin-appmenu.vala:46 29 | #: ../lib/valapanel-plugin-appmenu.vala:76 30 | #: ../lib/valapanel-plugin-appmenu.vala:91 ../lib/xfce4-plugin-appmenu.vala:59 31 | msgid "Use bold application name" 32 | msgstr "Resaltar nombre de la aplicación en negrita" 33 | 34 | #: ../lib/appmenu-desktop.vala:153 35 | msgid "No files" 36 | msgstr "Sin archivos" 37 | 38 | #: ../lib/appmenu-bamf.vala:37 39 | msgid "_New Window..." 40 | msgstr "_Nueva ventana" 41 | 42 | #: ../lib/appmenu-bamf.vala:38 43 | msgid "Close _This" 44 | msgstr "Cerrar _Esto" 45 | 46 | #: ../lib/appmenu-bamf.vala:39 47 | msgid "Close _All" 48 | msgstr "Cerrar _Todo" 49 | 50 | #: ../lib/menu-widget-menumodel.vala:42 51 | msgid "_Application" 52 | msgstr "_Aplicación" 53 | 54 | #: ../lib/desktop-menus.ui:6 55 | msgid "_Desktop Settings" 56 | msgstr "Configuración del _Escritorio" 57 | 58 | #: ../lib/desktop-menus.ui:10 59 | msgid "_System Settings" 60 | msgstr "Configuración del _Sistema" 61 | 62 | #: ../lib/desktop-menus.ui:17 63 | msgid "_Files" 64 | msgstr "_Archivos" 65 | 66 | 67 | 68 | 69 | #: ../lib/desktop-menus.ui:21 70 | msgid "_Documents" 71 | msgstr "_Documentos" 72 | 73 | #: ../lib/desktop-menus.ui:25 74 | msgid "_Music" 75 | msgstr "_Música" 76 | 77 | #: ../lib/desktop-menus.ui:29 78 | msgid "_Pictures" 79 | msgstr "_Imágenes" 80 | 81 | #: ../lib/desktop-menus.ui:33 82 | msgid "_Video" 83 | msgstr "_Videos" 84 | 85 | 86 | 87 | 88 | 89 | #: ../data/xfce/appmenu.desktop.xfce.in:5 90 | msgid "AppMenu Plugin" 91 | msgstr "Módulo AppMenu" 92 | 93 | #: ../data/xfce/appmenu.desktop.xfce.in:6 94 | msgid "Display AppMenu (Global Menu)" 95 | msgstr "Mostrar AppMenu (Menú Global)" 96 | 97 | #: ../data/xfce/appmenu.desktop.xfce.in:7 98 | msgid "applications-system" 99 | msgstr "aplicaciones-sistema" 100 | 101 | msgid "_New" 102 | msgstr "_Nuevo" 103 | 104 | msgid "_Quit" 105 | msgstr "_Salir" 106 | -------------------------------------------------------------------------------- /po/et.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 6 | -------------------------------------------------------------------------------- /po/eu.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/fa.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ff.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/fi.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 6 | -------------------------------------------------------------------------------- /po/fj.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/fo.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 6 | -------------------------------------------------------------------------------- /po/fy.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ga.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/gd.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/gl.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/gn.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/gu.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/gv.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ha.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/he.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 6 | -------------------------------------------------------------------------------- /po/hi.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ho.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/hr.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 6 | -------------------------------------------------------------------------------- /po/ht.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/hy.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/hz.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ia.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/id.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ie.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ig.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ii.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ik.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/io.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/is.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/iu.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/jv.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ka.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/kg.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ki.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/kj.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/kk.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/kl.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/km.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/kn.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ko.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n" 6 | -------------------------------------------------------------------------------- /po/kr.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ks.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ku.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/kv.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/kw.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ky.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/la.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/lb.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/lg.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/li.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ln.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/lo.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/lt.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 6 | -------------------------------------------------------------------------------- /po/lu.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/lv.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2;\n" 6 | -------------------------------------------------------------------------------- /po/meson.build: -------------------------------------------------------------------------------- 1 | i18n.gettext(meson.project_name(), preset: 'glib') 2 | -------------------------------------------------------------------------------- /po/mg.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/mh.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/mi.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/mk.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ml.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/mn.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/mo.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/mr.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ms.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/mt.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/my.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/na.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/nb.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 6 | -------------------------------------------------------------------------------- /po/nd.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ne.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ng.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/nl.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 6 | -------------------------------------------------------------------------------- /po/nn.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 6 | -------------------------------------------------------------------------------- /po/nr.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/nv.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ny.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/oc.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/oj.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/om.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/or.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/os.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/pa.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/pi.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ps.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/pt_BR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=2; plural=n>1;\n" 6 | -------------------------------------------------------------------------------- /po/qu.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/rm.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/rn.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ro.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2;\n" 6 | -------------------------------------------------------------------------------- /po/rue.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/rw.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/sa.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/sc.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/sd.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/se.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/sg.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/si.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/sk.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" 6 | -------------------------------------------------------------------------------- /po/sl.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3;\n" 6 | -------------------------------------------------------------------------------- /po/sm.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/sma.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/sn.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/so.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/sq.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/sr.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 6 | -------------------------------------------------------------------------------- /po/ss.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/st.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/stamp-it: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rilian-la-te/vala-panel-appmenu/f05d28d805a22a7564895aa178772361c44b6b7a/po/stamp-it -------------------------------------------------------------------------------- /po/su.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/sv.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 6 | -------------------------------------------------------------------------------- /po/sw.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ta.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/te.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/tg.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/th.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ti.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/tk.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/tl.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/tn.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/to.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/tr.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 6 | -------------------------------------------------------------------------------- /po/ts.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/tt.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/tw.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ty.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ug.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/uk.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 6 | -------------------------------------------------------------------------------- /po/ur.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/uz.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/ve.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/vi.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n" 6 | -------------------------------------------------------------------------------- /po/vo.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/wa.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/wo.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/xh.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/yi.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/yo.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/za.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/zh.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/zh_HK.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/zh_TW.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /po/zu.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | -------------------------------------------------------------------------------- /subprojects/appmenu-glib-translator/com.canonical.dbusmenu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /subprojects/appmenu-glib-translator/debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2018 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DEBUG_H 20 | #define DEBUG_H 21 | 22 | #include 23 | G_GNUC_INTERNAL GString *g_menu_markup_print_string(GString *string, GMenuModel *model, gint indent, 24 | gint tabstop); 25 | G_GNUC_INTERNAL void g_menu_markup_print_to_console(GMenuModel *menu); 26 | G_GNUC_INTERNAL void dbus_menu_print_variant(GVariant *var); 27 | #endif // DEBUG_H 28 | -------------------------------------------------------------------------------- /subprojects/appmenu-glib-translator/importer-enums.c.template: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | #include "importer-enums.h" 3 | 4 | /*** END file-header ***/ 5 | 6 | /*** BEGIN file-production ***/ 7 | /* enumerations from "@basename@" */ 8 | #include "@basename@" 9 | 10 | /*** END file-production ***/ 11 | 12 | /*** BEGIN value-header ***/ 13 | GType 14 | @enum_name@_get_type (void) 15 | { 16 | static GType the_type = 0; 17 | 18 | if (the_type == 0) 19 | { 20 | static const G@Type@Value values[] = { 21 | /*** END value-header ***/ 22 | 23 | /*** BEGIN value-production ***/ 24 | { @VALUENAME@, 25 | "@VALUENAME@", 26 | "@valuenick@" }, 27 | /*** END value-production ***/ 28 | 29 | /*** BEGIN value-tail ***/ 30 | { 0, NULL, NULL } 31 | }; 32 | the_type = g_@type@_register_static ( 33 | g_intern_static_string ("@EnumName@"), 34 | values); 35 | } 36 | return the_type; 37 | } 38 | 39 | /** 40 | @enum_name@_get_nick: 41 | @value: The value of @EnumName@ to get the nick of 42 | 43 | Looks up in the enum table for the nick of @value. 44 | 45 | Return value: The nick for the given value or #NULL on error 46 | */ 47 | const gchar * 48 | @enum_name@_get_nick (@EnumName@ value) 49 | { 50 | GEnumClass * class = G_ENUM_CLASS(g_type_class_ref(@enum_name@_get_type())); 51 | g_return_val_if_fail(class != NULL, NULL); 52 | 53 | const gchar * ret = NULL; 54 | GEnumValue * val = g_enum_get_value(class, value); 55 | if (val != NULL) { 56 | ret = val->value_nick; 57 | } 58 | 59 | g_type_class_unref(class); 60 | return ret; 61 | } 62 | 63 | /** 64 | @enum_name@_get_value_from_nick: 65 | @nick: The enum nick to lookup 66 | 67 | Looks up in the enum table for the value of @nick. 68 | 69 | Return value: The value for the given @nick 70 | */ 71 | @EnumName@ 72 | @enum_name@_get_value_from_nick (const gchar * nick) 73 | { 74 | GEnumClass * class = G_ENUM_CLASS(g_type_class_ref(@enum_name@_get_type())); 75 | g_return_val_if_fail(class != NULL, 0); 76 | 77 | @EnumName@ ret = 0; 78 | GEnumValue * val = g_enum_get_value_by_nick(class, nick); 79 | if (val != NULL) { 80 | ret = val->value; 81 | } 82 | 83 | g_type_class_unref(class); 84 | return ret; 85 | } 86 | 87 | /*** END value-tail ***/ 88 | 89 | -------------------------------------------------------------------------------- /subprojects/appmenu-glib-translator/importer-enums.h.template: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | #ifndef IMPORTER_ENUM_TYPES_H 3 | #define IMPORTER_ENUM_TYPES_H 4 | 5 | #include 6 | 7 | G_BEGIN_DECLS 8 | 9 | /*** END file-header ***/ 10 | 11 | /*** BEGIN file-production ***/ 12 | /* Enumerations from "@basename@" */ 13 | #include "@basename@" 14 | 15 | /*** END file-production ***/ 16 | 17 | /*** BEGIN enumeration-production ***/ 18 | 19 | #define DBUS_MENU_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) 20 | 21 | GType @enum_name@_get_type (void) G_GNUC_CONST; 22 | const gchar * @enum_name@_get_nick (@EnumName@ value) G_GNUC_CONST; 23 | @EnumName@ @enum_name@_get_value_from_nick (const gchar * nick) G_GNUC_CONST; 24 | 25 | /*** END enumeration-production ***/ 26 | 27 | /*** BEGIN file-tail ***/ 28 | G_END_DECLS 29 | 30 | #endif /* VALA_PANEL_ENUM_TYPES_H */ 31 | /*** END file-tail ***/ 32 | 33 | -------------------------------------------------------------------------------- /subprojects/appmenu-glib-translator/importer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2018 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef IMPORTER_H 20 | #define IMPORTER_H 21 | 22 | #include 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | G_DECLARE_FINAL_TYPE(DBusMenuImporter, dbus_menu_importer, DBUS_MENU, IMPORTER, GObject) 28 | 29 | DBusMenuImporter *dbus_menu_importer_new(const char *bus_name, const char *object_path); 30 | 31 | G_END_DECLS 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /subprojects/appmenu-glib-translator/item-pixbuf.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | G_GNUC_INTERNAL GIcon *g_icon_new_pixbuf_from_variant(GVariant *variant) 5 | { 6 | gsize length; 7 | const unsigned char *data = 8 | (const unsigned char *)g_variant_get_fixed_array(variant, &length, sizeof(guchar)); 9 | if (length == 0) 10 | return NULL; 11 | 12 | g_autoptr(GInputStream) stream = g_memory_input_stream_new_from_data(data, length, NULL); 13 | if (stream == NULL) 14 | return NULL; 15 | 16 | g_autoptr(GError) error = NULL; 17 | GdkPixbuf *pixbuf = gdk_pixbuf_new_from_stream(stream, NULL, &error); 18 | if (error != NULL) 19 | g_warning("Unable to build GdkPixbuf from icon data: %s", error->message); 20 | 21 | return G_ICON(pixbuf); 22 | } 23 | -------------------------------------------------------------------------------- /subprojects/appmenu-glib-translator/item.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2018 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef ITEM_H 20 | #define ITEM_H 21 | 22 | #include 23 | #include 24 | 25 | #include "definitions.h" 26 | #include "model.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | typedef struct 31 | { 32 | int section_num; 33 | int place; 34 | u_int32_t id; 35 | GActionGroup *ref_action_group; 36 | // FIXME: Cannot have activatable submenu item. 37 | GAction *ref_action; 38 | GHashTable *attrs; 39 | GHashTable *links; 40 | DBusMenuActionType action_type; 41 | bool enabled; 42 | bool toggled; 43 | gpointer magic; 44 | } DBusMenuItem; 45 | 46 | G_GNUC_INTERNAL DBusMenuItem *dbus_menu_item_new(u_int32_t id, DBusMenuModel *parent_model, 47 | GVariant *props); 48 | G_GNUC_INTERNAL DBusMenuItem *dbus_menu_item_new_first_section(u_int32_t id, 49 | GActionGroup *action_group); 50 | 51 | G_GNUC_INTERNAL void dbus_menu_item_free(gpointer data); 52 | 53 | G_GNUC_INTERNAL bool dbus_menu_item_update_enabled(DBusMenuItem *item, bool enabled); 54 | 55 | G_GNUC_INTERNAL bool dbus_menu_item_update_props(DBusMenuItem *item, GVariant *props); 56 | 57 | G_GNUC_INTERNAL bool dbus_menu_item_remove_props(DBusMenuItem *item, GVariant *props); 58 | 59 | G_GNUC_INTERNAL bool dbus_menu_item_compare_immutable(DBusMenuItem *a, DBusMenuItem *b); 60 | 61 | G_GNUC_INTERNAL bool dbus_menu_item_copy_attributes(DBusMenuItem *src, DBusMenuItem *dst); 62 | 63 | G_GNUC_INTERNAL bool dbus_menu_item_is_firefox_stub(DBusMenuItem *item); 64 | 65 | G_GNUC_INTERNAL bool dbus_menu_item_copy_submenu(DBusMenuItem *src, DBusMenuItem *dst, 66 | DBusMenuModel *parent); 67 | 68 | G_GNUC_INTERNAL void dbus_menu_item_generate_action(DBusMenuItem *item, DBusMenuModel *parent); 69 | 70 | G_GNUC_INTERNAL void dbus_menu_item_preload(DBusMenuItem *item); 71 | 72 | G_GNUC_INTERNAL int dbus_menu_item_id_compare_func(const DBusMenuItem *a, gconstpointer b, 73 | gpointer user_data); 74 | 75 | G_GNUC_INTERNAL int dbus_menu_item_compare_func(const DBusMenuItem *a, const DBusMenuItem *b, 76 | gpointer user_data); 77 | 78 | G_END_DECLS 79 | 80 | #endif // ITEM_H 81 | -------------------------------------------------------------------------------- /subprojects/appmenu-glib-translator/meson.build: -------------------------------------------------------------------------------- 1 | project( 2 | 'appmenu-glib-translator', 3 | 'c', 4 | version : '25.04', 5 | meson_version : '>=0.61.0', 6 | license : 'LGPL-3.0-or-later', 7 | default_options : ['c_std=gnu11', 'buildtype=debugoptimized', 'warning_level=1'] 8 | ) 9 | 10 | gnome = import('gnome') 11 | pkgconfig = import('pkgconfig') 12 | 13 | glib_ver = '>=2.52.0' 14 | giounix = dependency('gio-unix-2.0', version: glib_ver) 15 | gdkpixbuf = dependency('gdk-pixbuf-2.0', required: false) 16 | 17 | imp_sources = files( 18 | 'definitions.h', 19 | 'debug.c', 20 | 'debug.h', 21 | 'item.c', 22 | 'item.h', 23 | 'importer.c', 24 | 'importer.h', 25 | 'model.h', 26 | 'model.c', 27 | 'section.c', 28 | 'section.h', 29 | 'utils.c', 30 | 'utils.h' 31 | ) 32 | imp_headers = files('definitions.h') 33 | enum = 'importer-enums' 34 | importer_enums_gen = gnome.mkenums( 35 | enum, 36 | sources: imp_headers, 37 | c_template: enum + '.c.template', 38 | h_template: enum + '.h.template', 39 | ) 40 | imp_dbus = gnome.gdbus_codegen( 41 | 'dbusmenu-interface', 42 | sources: 'com.canonical.dbusmenu.xml', 43 | interface_prefix: 'com.canonical', 44 | autocleanup: 'all', 45 | namespace: 'DBusMenu' 46 | ) 47 | 48 | importer_name = 'appmenu-glib-translator' 49 | 50 | importer_lib = library(importer_name, imp_sources, importer_enums_gen, imp_dbus, 51 | dependencies: [giounix, gdkpixbuf], 52 | version: meson.project_version(), 53 | install: true, 54 | soversion: 0, 55 | pic : true 56 | ) 57 | importer_inc = include_directories('.') 58 | imp_public = ['importer.h'] 59 | install_headers(imp_public, subdir : importer_name) 60 | 61 | pkgconfig.generate(importer_lib, 62 | name: importer_name, 63 | description: 'A translator from DBusMenu to GMenuModel', 64 | requires: [giounix, gdkpixbuf], 65 | extra_cflags: ['-I${includedir}/'+importer_name] 66 | ) 67 | 68 | importer_gir = gnome.generate_gir(importer_lib, 69 | sources: imp_public, 70 | includes: ['GObject-2.0', 'Gio-2.0'], 71 | header: imp_public, 72 | namespace: 'AppmenuGLibTranslator', 73 | identifier_prefix: 'DBusMenu', 74 | symbol_prefix: 'dbus_menu', 75 | nsversion: meson.project_version(), 76 | install: true 77 | ) 78 | 79 | importer_vapi = gnome.generate_vapi(importer_name, 80 | sources: importer_gir[0], 81 | packages: 'gio-2.0', 82 | install: true, 83 | ) 84 | 85 | importer_dep = declare_dependency( 86 | include_directories: importer_inc, 87 | dependencies: [importer_vapi, giounix, gdkpixbuf], 88 | link_with: importer_lib 89 | ) 90 | -------------------------------------------------------------------------------- /subprojects/appmenu-glib-translator/model.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2018 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef MODEL_H 20 | #define MODEL_H 21 | 22 | #include "dbusmenu-interface.h" 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | G_DECLARE_FINAL_TYPE(DBusMenuModel, dbus_menu_model, DBUS_MENU, MODEL, GMenuModel) 29 | G_GNUC_INTERNAL DBusMenuModel *dbus_menu_model_new(uint parent_id, DBusMenuModel *parent, 30 | DBusMenuXml *xml, GActionGroup *action_group); 31 | G_GNUC_INTERNAL void dbus_menu_model_update_layout(DBusMenuModel *menu); 32 | G_GNUC_INTERNAL bool dbus_menu_model_is_layout_update_required(DBusMenuModel *model); 33 | 34 | G_GNUC_INTERNAL GSequence *dbus_menu_model_items(DBusMenuModel *model); 35 | 36 | G_END_DECLS 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /subprojects/appmenu-glib-translator/section.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2018 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef SECTION_H 20 | #define SECTION_H 21 | 22 | #include "model.h" 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | G_DECLARE_FINAL_TYPE(DBusMenuSectionModel, dbus_menu_section_model, DBUS_MENU, SECTION_MODEL, 28 | GMenuModel) 29 | 30 | struct _DBusMenuSectionModel 31 | { 32 | GMenuModel parent_instance; 33 | 34 | DBusMenuModel *parent_model; 35 | uint section_index; 36 | }; 37 | 38 | G_GNUC_INTERNAL DBusMenuSectionModel *dbus_menu_section_model_new(DBusMenuModel *parent, int section_index); 39 | 40 | G_END_DECLS 41 | 42 | #endif // SECTION_H 43 | -------------------------------------------------------------------------------- /subprojects/appmenu-glib-translator/test.c: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2018 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "debug.h" 20 | #include "importer.h" 21 | #include 22 | #include 23 | 24 | void on_importer_model_changed(GObject *obj, GParamSpec *pspec, gpointer data) 25 | { 26 | DBusMenuImporter *importer = (DBusMenuImporter *)obj; 27 | GMenuModel *model; 28 | GActionGroup *action_group; 29 | g_object_get(importer, "model", &model, "action-group", &action_group, NULL); 30 | if (GTK_IS_MENU_SHELL(data)) 31 | { 32 | GtkMenuShell *menubar = GTK_MENU_SHELL(data); 33 | gtk_widget_insert_action_group(menubar, "dbusmenu", action_group); 34 | gtk_menu_shell_bind_model(menubar, model, NULL, true); 35 | } 36 | else if (GTK_IS_MENU_BUTTON(data)) 37 | { 38 | GtkMenuButton *btn = GTK_MENU_BUTTON(data); 39 | GtkMenu *popover = gtk_popover_new_from_model(btn, model); 40 | gtk_widget_insert_action_group(popover, "dbusmenu", action_group); 41 | gtk_menu_button_set_popover(btn, popover); 42 | } 43 | } 44 | 45 | int main(int argc, char *argv[]) 46 | { 47 | gtk_init(&argc, &argv); 48 | 49 | GtkWindow *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); 50 | gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); 51 | gtk_window_set_default_size(GTK_WINDOW(window), 1000, 1000); 52 | gtk_window_set_title(GTK_WINDOW(window), "Submenu"); 53 | 54 | GtkBox *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); 55 | gtk_container_add(GTK_CONTAINER(window), vbox); 56 | 57 | GtkMenuBar *menubar = gtk_menu_bar_new(); 58 | GtkMenuButton *menu = gtk_menu_button_new(); 59 | // DBusMenuImporter *importer = dbus_menu_importer_new("org.krusader", "/MenuBar/2"); 60 | DBusMenuImporter *importer = dbus_menu_importer_new(":1.250", "/MenuBar/1"); 61 | // DBusMenuImporter *importer = dbus_menu_importer_new(":1.49", "/MenuBar/2"); 62 | // DBusMenuImporter *importer = 63 | // dbus_menu_importer_new(":1.227", "/com/canonical/menu/300003e"); 64 | // DBusMenuImporter *importer = 65 | // dbus_menu_importer_new(":1.458", "/com/canonical/menu/4600016"); 66 | // DBusMenuImporter *importer = 67 | // dbus_menu_importer_new(":1.542", "/com/canonical/menu/2600041"); 68 | g_signal_connect(importer, "notify::model", G_CALLBACK(on_importer_model_changed), menubar); 69 | g_signal_connect(importer, "notify::model", G_CALLBACK(on_importer_model_changed), menu); 70 | g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL); 71 | gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, FALSE, 0); 72 | gtk_box_pack_start(GTK_BOX(vbox), menu, FALSE, FALSE, 0); 73 | 74 | gtk_widget_show_all(window); 75 | 76 | gtk_main(); 77 | 78 | return 0; 79 | } 80 | -------------------------------------------------------------------------------- /subprojects/appmenu-glib-translator/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2018 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef UTILS_H 20 | #define UTILS_H 21 | 22 | #include "dbusmenu-interface.h" 23 | #include "definitions.h" 24 | #include "model.h" 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | G_GNUC_INTERNAL GAction *dbus_menu_action_reference(u_int32_t id, DBusMenuXml *xml, 30 | DBusMenuModel *submenu, 31 | GActionMap *action_group, 32 | DBusMenuActionType type); 33 | 34 | G_GNUC_INTERNAL char *dbus_menu_action_get_name(uint id, DBusMenuActionType action_type, 35 | bool use_prefix); 36 | G_GNUC_INTERNAL void dbus_menu_action_replace_signals(GAction *action, DBusMenuXml *xml, 37 | DBusMenuModel *submenu, 38 | DBusMenuActionType action_type); 39 | 40 | G_GNUC_INTERNAL void dbus_menu_action_lock(GAction *action); 41 | G_GNUC_INTERNAL void dbus_menu_action_unlock(GAction *action); 42 | 43 | G_END_DECLS 44 | 45 | #endif // UTILS_H 46 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/AUTHORS: -------------------------------------------------------------------------------- 1 | Ryan Lortie 2 | William Hua 3 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | Application Menu GTK+ Module 3 | --- 4 | 5 | This is renamed port of [Launchpad repository](https://launchpad.net/unity-gtk-module) of Unity GTK+ Module. 6 | 7 | Unity GTK+ Module is small GTK Module than strips menus from all GTK programs, converts to MenuModel and send to AppMenu. 8 | Ubuntu users now does not need to install this. 9 | 10 | **REQUIRED DEPENDENCES** 11 | 12 | *All:* 13 | * GLib (>= 2.50.0) 14 | * GTK+ (>= 3.22.0) 15 | 16 | *GTK2 Support* 17 | * GTK+ (>= 2.24.0) 18 | 19 | *Demos* 20 | * valac (>= 0.24.0) 21 | 22 | --- 23 | Usage Instructions 24 | --- 25 | **XFCE** 26 | - Type following into your console: 27 | `xfconf-query -c xsettings -p /Gtk/Modules -n -t string -s "appmenu-gtk-module"` 28 | 29 | **BUDGIE*** 30 | - Type following into your console: 31 | `gsettings set org.gnome.settings-daemon.plugins.xsettings enabled-gtk-modules "['appmenu-gtk-module']"` 32 | 33 | **OTHER** 34 | - Create file .gtkrc-2.0 into your home directory, if it do not exists already 35 | - Add to this file `gtk-modules="appmenu-gtk-module"` 36 | - Create file .config/gtk-3.0/settings.ini into your home directory, if it do not exists already 37 | Add to this file: 38 | - If it is just created, `[Settings]` 39 | - And then ``gtk-modules="appmenu-gtk-module"`` 40 | 41 | **IF ABOVE DOES NOT WORK** 42 | * Add to .profile or .bashrc: 43 | 44 | ```sh 45 | if [ -n "$GTK_MODULES" ]; then 46 | GTK_MODULES="${GTK_MODULES}:appmenu-gtk-module" 47 | else 48 | GTK_MODULES="appmenu-gtk-module" 49 | fi 50 | 51 | if [ -z "$UBUNTU_MENUPROXY" ]; then 52 | UBUNTU_MENUPROXY=1 53 | fi 54 | 55 | export GTK_MODULES 56 | export UBUNTU_MENUPROXY 57 | ``` 58 | 59 | **IF NONE OF THESE ARE WORKING** 60 | * Add above snippet to any place where environment variables should set. 61 | 62 | **YOU SHOULD RELOGIN AFTER INSTALLING THIS MODULE FIRST TIME** 63 | 64 | 65 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/TODO: -------------------------------------------------------------------------------- 1 | Activating active radio menu item de-activates it. 2 | Wayland support without GTK compositor. 3 | DBusMenu backend. 4 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/data/appmenu-gtk-module.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Appmenu GTK Module Environment variables 3 | After=dbus.service 4 | Before=gnome-session.service 5 | PartOf=graphical-session.target 6 | 7 | [Service] 8 | Type=oneshot 9 | RemainAfterExit=yes 10 | ExecStart=/bin/sh -ec '\ 11 | GTK_MODULES="$${GTK_MODULES:+$GTK_MODULES:}appmenu-gtk-module";\ 12 | @CMAKE_INSTALL_FULL_BINDIR@/dbus-update-activation-environment --verbose --systemd GTK_MODULES' 13 | ExecStopPost=/bin/sh -ec '\ 14 | GTK_MODULES=$$(echo -n $${GTK_MODULES} | @CMAKE_INSTALL_FULL_BINDIR@/awk -v RS=: -v ORS=: "/^appmenu-gtk-module$/ {next} {print}" | @CMAKE_INSTALL_FULL_BINDIR@/sed -e "s/:*$//");\ 15 | @CMAKE_INSTALL_FULL_BINDIR@/dbus-update-activation-environment --verbose --systemd GTK_MODULES' 16 | 17 | [Install] 18 | WantedBy=xfce-session.target mate-session.target gnome-session.target 19 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/data/appmenu-gtk2-parser.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=@CMAKE_INSTALL_FULL_LIBEXECDIR@ 3 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 4 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 5 | 6 | Name: appmenu-gtk2-parser 7 | Description: GtkMenuShell to GMenuModel parser 8 | Version: @VERSION@ 9 | Requires: gtk+-2.0 10 | Cflags: -I${includedir}/appmenu-gtk-parser 11 | Libs: -L${libdir} -lappmenu-gtk2-parser 12 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/data/appmenu-gtk3-parser.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=@CMAKE_INSTALL_FULL_LIBEXECDIR@ 3 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 4 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 5 | 6 | Name: appmenu-gtk3-parser 7 | Description: GtkMenuShell to GMenuModel parser 8 | Version: @VERSION@ 9 | Requires: gtk+-3.0 10 | Cflags: -I${includedir}/appmenu-gtk-parser 11 | Libs: -L${libdir} -lappmenu-gtk3-parser 12 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/data/meson.build: -------------------------------------------------------------------------------- 1 | install_data([ 2 | 'org.appmenu.gtk-module.gschema.xml' 3 | ], install_dir: schema_dir) 4 | 5 | systemd = dependency('systemd', required: false) 6 | 7 | if systemd.found() 8 | userunitdir = systemd.get_variable(pkgconfig:'systemduserunitdir') 9 | configure_file( 10 | input: 'appmenu-gtk-module.service.in', 11 | output: 'appmenu-gtk-module.service', 12 | install_dir: userunitdir, 13 | configuration: {'CMAKE_INSTALL_FULL_BINDIR': join_paths(prefix,get_option('bindir'))} 14 | ) 15 | endif 16 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/data/org.appmenu.gtk-module.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Application blacklist 6 | List of applications where appmenu-gtk-module should be disabled. 7 | ['anjuta','freeciv', 'freeciv-gtk2', 'freeciv-gtk3', 'glade','gwyddion'] 8 | 9 | 10 | Application whitelist 11 | List of applications where appmenu-gtk-module should be enabled. 12 | [] 13 | 14 | 15 | Always show menus in application 16 | If this is enabled, menus will not removed from applications even if registrar found. Useful for HUD-only usage. 17 | false 18 | 19 | 20 | Run on wayland 21 | Is appmenu-gtk-module should run on Wayland. 22 | true 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/docs/appmenu-gtk-parser-docs.sgml: -------------------------------------------------------------------------------- 1 | 2 | 6 | ]> 7 | 8 | 9 | appmenu-gtk-module Reference Manual 10 | 11 | for appmenu-gtk-module 0.7. 12 | The latest version of this documentation can be found on-line at 13 | http://[SERVER]/appmenu-gtk-module/. 14 | 15 | 16 | 17 | 18 | API Reference 19 | 20 | 21 | 22 | 23 | 24 | Object Hierarchy 25 | 26 | 27 | 28 | API Index 29 | 30 | 31 | 32 | Index of deprecated API 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/docs/appmenu-gtk-parser-sections.txt: -------------------------------------------------------------------------------- 1 |
2 | unity-gtk-action-group 3 | UnityGtkActionGroup 4 | UnityGtkActionGroupClass 5 | unity_gtk_action_group_new 6 | unity_gtk_action_group_connect_shell 7 | unity_gtk_action_group_disconnect_shell 8 | unity_gtk_action_group_set_debug 9 | 10 | UNITY_GTK_ACTION_GROUP 11 | UNITY_GTK_ACTION_GROUP_CLASS 12 | UNITY_GTK_ACTION_GROUP_GET_CLASS 13 | UNITY_GTK_IS_ACTION_GROUP 14 | UNITY_GTK_IS_ACTION_GROUP_CLASS 15 | UNITY_GTK_TYPE_ACTION_GROUP 16 | unity_gtk_action_group_get_type 17 |
18 | 19 |
20 | unity-gtk-menu-shell 21 | UnityGtkMenuShell 22 | UnityGtkMenuShellClass 23 | unity_gtk_menu_shell_new 24 | unity_gtk_menu_shell_set_debug 25 | 26 | UNITY_GTK_IS_MENU_SHELL 27 | UNITY_GTK_IS_MENU_SHELL_CLASS 28 | UNITY_GTK_MENU_SHELL 29 | UNITY_GTK_MENU_SHELL_CLASS 30 | UNITY_GTK_MENU_SHELL_GET_CLASS 31 | UNITY_GTK_TYPE_MENU_SHELL 32 | unity_gtk_menu_shell_get_type 33 |
34 | 35 |
36 | appmenu-gtk-parser 37 | 38 |
39 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/docs/appmenu-gtk-parser.types: -------------------------------------------------------------------------------- 1 | unity_gtk_action_group_get_type 2 | unity_gtk_menu_shell_get_type 3 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/docs/gtkdocentities.ent.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/docs/meson.build: -------------------------------------------------------------------------------- 1 | ent_dict = { 2 | 'CMAKE_PROJECT_NAME' : meson.project_name(), 3 | 'PACKAGE_BUGREPORT': 'https://github.com/rilian-la-te/vala-panel-appmenu/issues', 4 | 'PACKAGE_STRING' : 'appmenu-gtk-parser', 5 | 'CPACK_SOURCE_PACKAGE_FILE_NAME': '@0@-@1@.tar.xz'.format(meson.project_name(),meson.project_version()), 6 | 'PACKAGE_URL' : 'https://github.com/rilian-la-te/vala-panel-appmenu', 7 | 'VERSION': meson.project_version(), 8 | 'PACKAGE_API_VERSION': meson.project_version() 9 | } 10 | ent = configure_file( 11 | input: 'gtkdocentities.ent.in', 12 | output: 'gtkdocentities.ent', 13 | configuration: ent_dict 14 | ) 15 | 16 | if get_option('gtk_doc') 17 | gnome.gtkdoc( 18 | 'appmenu-gtk-parser', 19 | content_files: ent, 20 | src_dir: parser_inc, 21 | gobject_typesfile: 'appmenu-gtk-parser.types', 22 | dependencies: gtk3_parser_dep, 23 | ignore_headers: lib_private_headers, 24 | install: true, 25 | main_sgml: join_paths(meson.current_build_dir(),'appmenu-gtk-parser-docs.sgml') 26 | ) 27 | 28 | endif 29 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/lib/appmenu-gtk-action-group.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation, version 3 of the License. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authors: Ryan Lortie 17 | * William Hua 18 | */ 19 | 20 | #ifndef __UNITY_GTK_ACTION_GROUP_H__ 21 | #define __UNITY_GTK_ACTION_GROUP_H__ 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define UNITY_GTK_TYPE_ACTION_GROUP (unity_gtk_action_group_get_type()) 28 | G_DECLARE_FINAL_TYPE(UnityGtkActionGroup, unity_gtk_action_group, UNITY_GTK, ACTION_GROUP, GObject) 29 | 30 | G_END_DECLS 31 | 32 | #include "appmenu-gtk-menu-shell.h" 33 | 34 | G_BEGIN_DECLS 35 | 36 | /** 37 | * UnityGtkActionGroup: 38 | * 39 | * Opaque action group collector for #UnityGtkMenuShell. 40 | */ 41 | struct _UnityGtkActionGroup 42 | { 43 | GObject parent_instance; 44 | 45 | /*< private >*/ 46 | GActionGroup *old_group; 47 | GHashTable *actions_by_name; 48 | GHashTable *names_by_radio_menu_item; 49 | }; 50 | 51 | GType unity_gtk_action_group_get_type(void); 52 | 53 | UnityGtkActionGroup *unity_gtk_action_group_new(GActionGroup *old_group); 54 | 55 | void unity_gtk_action_group_connect_shell(UnityGtkActionGroup *group, UnityGtkMenuShell *shell); 56 | 57 | void unity_gtk_action_group_disconnect_shell(UnityGtkActionGroup *group, UnityGtkMenuShell *shell); 58 | 59 | void unity_gtk_action_group_set_debug(gboolean debug); 60 | 61 | G_END_DECLS 62 | 63 | #endif /* __UNITY_GTK_ACTION_GROUP_H__ */ 64 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/lib/appmenu-gtk-menu-shell.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation, version 3 of the License. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authors: Ryan Lortie 17 | * William Hua 18 | */ 19 | 20 | #ifndef __UNITY_GTK_MENU_SHELL_H__ 21 | #define __UNITY_GTK_MENU_SHELL_H__ 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define UNITY_GTK_TYPE_MENU_SHELL (unity_gtk_menu_shell_get_type()) 28 | G_DECLARE_FINAL_TYPE(UnityGtkMenuShell, unity_gtk_menu_shell, UNITY_GTK, MENU_SHELL, GMenuModel) 29 | 30 | G_END_DECLS 31 | 32 | #include "appmenu-gtk-action-group.h" 33 | 34 | G_BEGIN_DECLS 35 | 36 | /** 37 | * UnityGtkMenuShell: 38 | * 39 | * Opaque #GMenuModel proxy for #GtkMenuShell. 40 | */ 41 | struct _UnityGtkMenuShell 42 | { 43 | GMenuModel parent_instance; 44 | 45 | /*< private >*/ 46 | GtkMenuShell *menu_shell; 47 | gboolean has_mnemonics; 48 | GPtrArray *items; 49 | GPtrArray *sections; 50 | GSequence *visible_indices; 51 | GSequence *separator_indices; 52 | UnityGtkActionGroup *action_group; 53 | }; 54 | 55 | GType unity_gtk_menu_shell_get_type(void); 56 | 57 | UnityGtkMenuShell *unity_gtk_menu_shell_new(GtkMenuShell *menu_shell); 58 | 59 | void unity_gtk_menu_shell_set_debug(gboolean debug); 60 | 61 | G_END_DECLS 62 | 63 | #endif /* __UNITY_GTK_MENU_SHELL_H__ */ 64 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/lib/appmenu-gtk-parser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation, version 3 of the License. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authors: Ryan Lortie 17 | * William Hua 18 | */ 19 | 20 | #ifndef __UNITY_GTK_PARSER_H__ 21 | #define __UNITY_GTK_PARSER_H__ 22 | 23 | #include 24 | #include 25 | 26 | #endif /* __UNITY_GTK_PARSER_H__ */ 27 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/lib/meson.build: -------------------------------------------------------------------------------- 1 | lib_sources = files( 2 | 'unity-gtk-action-group.c', 3 | 'unity-gtk-action.c', 4 | 'unity-gtk-menu-shell.c', 5 | 'unity-gtk-menu-section.c', 6 | 'unity-gtk-menu-item.c', 7 | ) 8 | lib_private_headers = [ 9 | 'unity-gtk-action-group-private.h', 10 | 'unity-gtk-action-private.h', 11 | 'unity-gtk-menu-shell-private.h', 12 | 'unity-gtk-menu-section-private.h', 13 | 'unity-gtk-menu-item-private.h', 14 | ] 15 | lib_headers = files( 16 | 'appmenu-gtk-action-group.h', 17 | 'appmenu-gtk-menu-shell.h', 18 | 'appmenu-gtk-parser.h' 19 | ) 20 | 21 | parser_inc = include_directories('.') 22 | parser_kwargs = { 23 | 'sources': lib_sources+lib_headers+lib_private_headers, 24 | 'install': true, 25 | 'version': meson.project_version(), 26 | 'soversion': '0' 27 | } 28 | pc_kwargs = { 29 | 'description': 'GtkMenuShell to GMenuModel parser', 30 | 'variables': ['exec_prefix=@0@'.format(join_paths(prefix,get_option('libexecdir')))], 31 | 'extra_cflags': ['-I${includedir}/appmenu-gtk-parser'] 32 | } 33 | 34 | if build_gtk2 35 | gtk2_parser_lib = shared_library( 36 | 'appmenu-gtk2-parser', 37 | dependencies: gtk2, 38 | c_args: '-Wno-deprecated-declarations', 39 | kwargs: parser_kwargs 40 | ) 41 | pkgconfig.generate(gtk2_parser_lib, 42 | requires: gtk2, 43 | kwargs: pc_kwargs 44 | ) 45 | gtk2_parser_dep = declare_dependency( 46 | include_directories: parser_inc, 47 | link_with: gtk2_parser_lib, 48 | dependencies: gtk2 49 | ) 50 | endif 51 | 52 | if build_gtk3 53 | gtk3_parser_lib = shared_library( 54 | 'appmenu-gtk3-parser', 55 | dependencies: gtk3, 56 | kwargs: parser_kwargs 57 | ) 58 | pkgconfig.generate(gtk3_parser_lib, 59 | requires: gtk3, 60 | kwargs: pc_kwargs 61 | ) 62 | gtk3_parser_dep = declare_dependency( 63 | include_directories: parser_inc, 64 | link_with: gtk3_parser_lib, 65 | dependencies: gtk3 66 | ) 67 | endif 68 | 69 | if build_gtk2 or build_gtk3 70 | install_headers(lib_headers, subdir: 'appmenu-gtk-parser') 71 | endif 72 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/lib/unity-gtk-action-group-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation, version 3 of the License. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authors: Ryan Lortie 17 | * William Hua 18 | */ 19 | 20 | #ifndef __UNITY_GTK_ACTION_GROUP_PRIVATE_H__ 21 | #define __UNITY_GTK_ACTION_GROUP_PRIVATE_H__ 22 | 23 | #include "appmenu-gtk-action-group.h" 24 | #include "unity-gtk-menu-item-private.h" 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | void unity_gtk_action_group_connect_item(UnityGtkActionGroup *group, 30 | UnityGtkMenuItem *item) G_GNUC_INTERNAL; 31 | 32 | void unity_gtk_action_group_disconnect_item(UnityGtkActionGroup *group, 33 | UnityGtkMenuItem *item) G_GNUC_INTERNAL; 34 | 35 | void unity_gtk_action_group_print(UnityGtkActionGroup *group, guint indent) G_GNUC_INTERNAL; 36 | 37 | gboolean unity_gtk_action_group_is_debug(void) G_GNUC_INTERNAL; 38 | 39 | G_END_DECLS 40 | 41 | #endif /* __UNITY_GTK_ACTION_GROUP_PRIVATE_H__ */ 42 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/lib/unity-gtk-action-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation, version 3 of the License. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authors: Ryan Lortie 17 | * William Hua 18 | */ 19 | 20 | #ifndef __UNITY_GTK_ACTION_PRIVATE_H__ 21 | #define __UNITY_GTK_ACTION_PRIVATE_H__ 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define UNITY_GTK_TYPE_ACTION (unity_gtk_action_get_type()) 28 | G_DECLARE_FINAL_TYPE(UnityGtkAction, unity_gtk_action, UNITY_GTK, ACTION, GObject) 29 | 30 | G_END_DECLS 31 | 32 | #include "unity-gtk-menu-item-private.h" 33 | 34 | G_BEGIN_DECLS 35 | 36 | struct _UnityGtkAction 37 | { 38 | GObject parent_instance; 39 | 40 | /*< private >*/ 41 | char *name; 42 | char *subname; 43 | UnityGtkMenuItem *item; 44 | GHashTable *items_by_name; 45 | }; 46 | 47 | GType unity_gtk_action_get_type(void) G_GNUC_INTERNAL; 48 | 49 | UnityGtkAction *unity_gtk_action_new(const char *name, UnityGtkMenuItem *item) G_GNUC_INTERNAL; 50 | 51 | UnityGtkAction *unity_gtk_action_new_radio(const char *name) G_GNUC_INTERNAL; 52 | 53 | void unity_gtk_action_set_name(UnityGtkAction *action, const char *name) G_GNUC_INTERNAL; 54 | 55 | void unity_gtk_action_set_subname(UnityGtkAction *action, const char *subname) G_GNUC_INTERNAL; 56 | 57 | void unity_gtk_action_set_item(UnityGtkAction *action, UnityGtkMenuItem *item) G_GNUC_INTERNAL; 58 | 59 | void unity_gtk_action_print(UnityGtkAction *action, guint indent) G_GNUC_INTERNAL; 60 | 61 | G_END_DECLS 62 | 63 | #endif /* __UNITY_GTK_ACTION_PRIVATE_H__ */ 64 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/lib/unity-gtk-menu-item-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation, version 3 of the License. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authors: Ryan Lortie 17 | * William Hua 18 | */ 19 | 20 | #ifndef __UNITY_GTK_MENU_ITEM_PRIVATE_H__ 21 | #define __UNITY_GTK_MENU_ITEM_PRIVATE_H__ 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define UNITY_GTK_TYPE_MENU_ITEM (unity_gtk_menu_item_get_type()) 28 | G_DECLARE_FINAL_TYPE(UnityGtkMenuItem, unity_gtk_menu_item, UNITY_GTK, MENU_ITEM, GObject) 29 | 30 | G_END_DECLS 31 | 32 | #include "unity-gtk-action-private.h" 33 | #include "unity-gtk-menu-shell-private.h" 34 | 35 | G_BEGIN_DECLS 36 | 37 | struct _UnityGtkMenuItem 38 | { 39 | GObject parent_instance; 40 | 41 | /*< private >*/ 42 | GtkMenuItem *menu_item; 43 | UnityGtkMenuShell *parent_shell; 44 | UnityGtkMenuShell *child_shell; 45 | guchar child_shell_valid : 1; 46 | guint item_index; 47 | UnityGtkAction *action; 48 | GtkLabel *first_label; 49 | GtkLabel *second_label; 50 | char *label_label; 51 | }; 52 | 53 | GType unity_gtk_menu_item_get_type(void) G_GNUC_INTERNAL; 54 | 55 | UnityGtkMenuItem *unity_gtk_menu_item_new(GtkMenuItem *menu_item, UnityGtkMenuShell *parent_shell, 56 | guint item_index) G_GNUC_INTERNAL; 57 | 58 | UnityGtkMenuShell *unity_gtk_menu_item_get_child_shell(UnityGtkMenuItem *item) G_GNUC_INTERNAL; 59 | 60 | void unity_gtk_menu_item_set_action(UnityGtkMenuItem *item, UnityGtkAction *action) G_GNUC_INTERNAL; 61 | 62 | const char *unity_gtk_menu_item_get_label(UnityGtkMenuItem *item) G_GNUC_INTERNAL; 63 | 64 | GIcon *unity_gtk_menu_item_get_icon(UnityGtkMenuItem *item) G_GNUC_INTERNAL; 65 | 66 | gboolean unity_gtk_menu_item_is_visible(UnityGtkMenuItem *item) G_GNUC_INTERNAL; 67 | 68 | gboolean unity_gtk_menu_item_is_sensitive(UnityGtkMenuItem *item) G_GNUC_INTERNAL; 69 | 70 | gboolean unity_gtk_menu_item_is_active(UnityGtkMenuItem *item) G_GNUC_INTERNAL; 71 | 72 | gboolean unity_gtk_menu_item_is_separator(UnityGtkMenuItem *item) G_GNUC_INTERNAL; 73 | 74 | gboolean unity_gtk_menu_item_is_check(UnityGtkMenuItem *item) G_GNUC_INTERNAL; 75 | 76 | gboolean unity_gtk_menu_item_is_radio(UnityGtkMenuItem *item) G_GNUC_INTERNAL; 77 | 78 | gboolean unity_gtk_menu_item_get_draw_as_radio(UnityGtkMenuItem *item) G_GNUC_INTERNAL; 79 | 80 | void unity_gtk_menu_item_activate(UnityGtkMenuItem *item) G_GNUC_INTERNAL; 81 | 82 | void unity_gtk_menu_item_print(UnityGtkMenuItem *item, guint indent) G_GNUC_INTERNAL; 83 | 84 | GtkLabel *gtk_menu_item_get_nth_label(GtkMenuItem *menu_item, guint index) G_GNUC_INTERNAL; 85 | 86 | const char *gtk_menu_item_get_nth_label_label(GtkMenuItem *menu_item, guint index) G_GNUC_INTERNAL; 87 | 88 | G_END_DECLS 89 | 90 | #endif /* __UNITY_GTK_MENU_ITEM_PRIVATE_H__ */ 91 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/lib/unity-gtk-menu-section-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation, version 3 of the License. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authors: Ryan Lortie 17 | * William Hua 18 | */ 19 | 20 | #ifndef __UNITY_GTK_MENU_SECTION_PRIVATE_H__ 21 | #define __UNITY_GTK_MENU_SECTION_PRIVATE_H__ 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define UNITY_GTK_TYPE_MENU_SECTION (unity_gtk_menu_section_get_type()) 28 | G_DECLARE_FINAL_TYPE(UnityGtkMenuSection, unity_gtk_menu_section, UNITY_GTK, MENU_SECTION, GMenuModel) 29 | 30 | G_END_DECLS 31 | 32 | #include "unity-gtk-menu-shell-private.h" 33 | 34 | G_BEGIN_DECLS 35 | 36 | struct _UnityGtkMenuSection 37 | { 38 | GMenuModel parent_instance; 39 | 40 | /*< private >*/ 41 | UnityGtkMenuShell *parent_shell; 42 | guint section_index; 43 | }; 44 | 45 | GType unity_gtk_menu_section_get_type(void) G_GNUC_INTERNAL; 46 | 47 | UnityGtkMenuSection *unity_gtk_menu_section_new(UnityGtkMenuShell *parent_shell, 48 | guint section_index) G_GNUC_INTERNAL; 49 | 50 | GSequenceIter *unity_gtk_menu_section_get_begin_iter(UnityGtkMenuSection *section) G_GNUC_INTERNAL; 51 | 52 | GSequenceIter *unity_gtk_menu_section_get_end_iter(UnityGtkMenuSection *section) G_GNUC_INTERNAL; 53 | 54 | GSequenceIter *unity_gtk_menu_section_get_iter(UnityGtkMenuSection *section, 55 | guint index) G_GNUC_INTERNAL; 56 | 57 | void unity_gtk_menu_section_print(UnityGtkMenuSection *section, guint indent) G_GNUC_INTERNAL; 58 | 59 | G_END_DECLS 60 | 61 | #endif /* __UNITY_GTK_MENU_SECTION_PRIVATE_H__ */ 62 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/lib/unity-gtk-menu-shell-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation, version 3 of the License. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authors: Ryan Lortie 17 | * William Hua 18 | */ 19 | 20 | #ifndef __UNITY_GTK_MENU_SHELL_PRIVATE_H__ 21 | #define __UNITY_GTK_MENU_SHELL_PRIVATE_H__ 22 | 23 | #include "appmenu-gtk-menu-shell.h" 24 | #include "unity-gtk-menu-item-private.h" 25 | 26 | #include 27 | 28 | G_BEGIN_DECLS 29 | 30 | UnityGtkMenuShell *unity_gtk_menu_shell_new_internal(GtkMenuShell *menu_shell) G_GNUC_INTERNAL; 31 | 32 | UnityGtkMenuItem *unity_gtk_menu_shell_get_item(UnityGtkMenuShell *shell, 33 | guint index) G_GNUC_INTERNAL; 34 | 35 | GSequence *unity_gtk_menu_shell_get_visible_indices(UnityGtkMenuShell *shell) G_GNUC_INTERNAL; 36 | 37 | GSequence *unity_gtk_menu_shell_get_separator_indices(UnityGtkMenuShell *shell) G_GNUC_INTERNAL; 38 | 39 | void unity_gtk_menu_shell_handle_item_notify(UnityGtkMenuShell *shell, UnityGtkMenuItem *item, 40 | const char *property) G_GNUC_INTERNAL; 41 | 42 | void unity_gtk_menu_shell_activate_item(UnityGtkMenuShell *shell, 43 | UnityGtkMenuItem *item) G_GNUC_INTERNAL; 44 | 45 | void unity_gtk_menu_shell_print(UnityGtkMenuShell *shell, guint indent) G_GNUC_INTERNAL; 46 | 47 | gboolean unity_gtk_menu_shell_is_debug(void) G_GNUC_INTERNAL; 48 | 49 | G_END_DECLS 50 | 51 | #endif /* __UNITY_GTK_MENU_SHELL_PRIVATE_H__ */ 52 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/meson.build: -------------------------------------------------------------------------------- 1 | project('appmenu-gtk-module', 'c', 2 | meson_version: '>=0.61.0', 3 | version: '25.04', 4 | license: ['LGPL-3.0-or-later'], 5 | default_options: [ 6 | 'c_std=gnu11', 7 | 'buildtype=debugoptimized', 8 | 'warning_level=1' 9 | ]) 10 | 11 | ################## 12 | # Module imports # 13 | ################## 14 | 15 | gnome = import('gnome') 16 | i18n = import('i18n') 17 | pkgconfig = import('pkgconfig') 18 | 19 | ############### 20 | # Directories # 21 | ############### 22 | prefix = get_option('prefix') 23 | datadir = get_option('datadir') 24 | localedir = get_option('localedir') 25 | schema_dir = join_paths(get_option('datadir'), 'glib-2.0', 'schemas') 26 | docdir = join_paths(prefix,datadir, 'doc') 27 | 28 | ################ 29 | # Dependencies # 30 | ################ 31 | glib_ver = '>=2.52.0' 32 | giounix = dependency('gio-unix-2.0', version: glib_ver) 33 | 34 | gtk_versions = get_option('gtk') 35 | gtk2_requested = '2' in gtk_versions 36 | gtk3_requested = '3' in gtk_versions 37 | 38 | gtk2_ver = '>=2.24.0' 39 | gtk3_ver = '>=3.22.0' 40 | 41 | gtk2 = dependency('gtk+-2.0', version: gtk2_ver, required: gtk2_requested) 42 | gtk3 = dependency('gtk+-3.0', version: gtk3_ver, required: gtk3_requested) 43 | 44 | build_gtk2 = gtk2.found() 45 | build_gtk3 = gtk3.found() 46 | 47 | ################# 48 | # Configuration # 49 | ################# 50 | 51 | readmes = [ 52 | 'README.md', 53 | 'TODO', 54 | 'AUTHORS' 55 | ] 56 | install_data(readmes, install_dir : join_paths(get_option('datadir'), 'doc', meson.project_name())) 57 | install_data('LICENSE', install_dir : join_paths(get_option('datadir'), 'licenses', meson.project_name())) 58 | 59 | 60 | subdir('lib') 61 | subdir('src') 62 | subdir('data') 63 | subdir('docs') 64 | subdir('tests') 65 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/meson_options.txt: -------------------------------------------------------------------------------- 1 | option('gtk', type: 'array', choices : ['2','3'], value: ['2','3'], description: 'Supported GTK versions') 2 | option('tests', type : 'boolean', value : false, description: 'Parser tests') 3 | option('gtk_doc', type: 'boolean', value: false, description: 'Build API reference') 4 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/src/appmenu-gtk-module.c: -------------------------------------------------------------------------------- 1 | /* 2 | * appmenu-gtk-module 3 | * Copyright 2012 Canonical Ltd. 4 | * Copyright (C) 2015-2017 Konstantin Pugin 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program. If not, see . 18 | * 19 | * Authors: Ryan Lortie 20 | * William Hua 21 | * Konstantin Pugin 22 | * Lester Carballo Perez 23 | */ 24 | 25 | #include 26 | 27 | #include "hijack.h" 28 | #include "support.h" 29 | 30 | static void sync_gtk2_settings() 31 | { 32 | #if GTK_MAJOR_VERSION < 3 33 | GParamSpec *pspec; 34 | 35 | pspec = g_object_class_find_property(g_type_class_ref(GTK_TYPE_SETTINGS), 36 | "gtk-shell-shows-menubar"); 37 | 38 | if (!G_IS_PARAM_SPEC(pspec)) 39 | { 40 | gtk_settings_install_property( 41 | g_param_spec_boolean("gtk-shell-shows-menubar", 42 | "Desktop shell shows the menubar", 43 | "Set to TRUE if the desktop environment is displaying the " 44 | "menubar, FALSE if the app should display it itself.", 45 | FALSE, 46 | G_PARAM_READWRITE)); 47 | } 48 | #endif 49 | } 50 | 51 | void gtk_module_init(void) 52 | { 53 | if (gtk_module_should_run()) 54 | { 55 | sync_gtk2_settings(); 56 | watch_registrar_dbus(); 57 | enable_debug(); 58 | store_pre_hijacked(); 59 | hijack_menu_bar_class_vtable(GTK_TYPE_MENU_BAR); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/src/blacklist.c: -------------------------------------------------------------------------------- 1 | /* 2 | * appmenu-gtk-module 3 | * Copyright 2012 Canonical Ltd. 4 | * Copyright (C) 2015-2017 Konstantin Pugin 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program. If not, see . 18 | * 19 | * Authors: Ryan Lortie 20 | * William Hua 21 | * Konstantin Pugin 22 | * Lester Carballo Perez 23 | */ 24 | 25 | #include 26 | 27 | #include "blacklist.h" 28 | #include "consts.h" 29 | 30 | static const char *const BLACKLIST[] = { "acroread", 31 | "emacs", 32 | "emacs23", 33 | "emacs23-lucid", 34 | "emacs24", 35 | "emacs24-lucid", 36 | "budgie-panel", 37 | "mate-panel", 38 | "mate-menu", 39 | "vala-panel", 40 | "wrapper-1.0", 41 | "wrapper-2.0", 42 | "indicator-applet", 43 | "mate-indicator-applet", 44 | "mate-indicator-applet-appmenu", 45 | "mate-indicator-applet-complete", 46 | "appmenu-mate", 47 | NULL }; 48 | 49 | static bool is_string_in_array(const char *string, GVariant *array) 50 | { 51 | GVariantIter iter; 52 | char *element; 53 | 54 | g_return_val_if_fail(array != NULL, false); 55 | g_return_val_if_fail(g_variant_is_of_type(array, G_VARIANT_TYPE("as")), false); 56 | 57 | g_variant_iter_init(&iter, array); 58 | while (g_variant_iter_loop(&iter, "&s", &element)) 59 | { 60 | if (g_strcmp0(element, string) == 0) 61 | return true; 62 | } 63 | 64 | return false; 65 | } 66 | 67 | static bool is_listed(const char *name, const char *key) 68 | { 69 | GSettings *settings = g_settings_new(UNITY_GTK_MODULE_SCHEMA); 70 | g_autoptr(GVariant) array = g_settings_get_value(settings, key); 71 | bool listed = is_string_in_array(name, array); 72 | g_clear_object(&settings); 73 | return listed; 74 | } 75 | 76 | G_GNUC_INTERNAL 77 | bool is_blacklisted(const char *name) 78 | { 79 | guint n; 80 | guint i; 81 | 82 | n = sizeof(BLACKLIST) / sizeof(const char *); 83 | 84 | for (i = 0; i < n; i++) 85 | { 86 | if (g_strcmp0(name, BLACKLIST[i]) == 0) 87 | return !is_listed(name, WHITELIST_KEY); 88 | } 89 | 90 | return is_listed(name, BLACKLIST_KEY); 91 | } 92 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/src/blacklist.h: -------------------------------------------------------------------------------- 1 | /* 2 | * appmenu-gtk-module 3 | * Copyright 2012 Canonical Ltd. 4 | * Copyright (C) 2015-2017 Konstantin Pugin 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program. If not, see . 18 | * 19 | * Authors: Ryan Lortie 20 | * William Hua 21 | * Konstantin Pugin 22 | * Lester Carballo Perez 23 | */ 24 | 25 | #ifndef BLACKLIST_H 26 | #define BLACKLIST_H 27 | 28 | #include 29 | #include 30 | 31 | G_GNUC_INTERNAL bool is_blacklisted(const char *name); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/src/consts.h: -------------------------------------------------------------------------------- 1 | /* 2 | * appmenu-gtk-module 3 | * Copyright 2012 Canonical Ltd. 4 | * Copyright (C) 2015-2017 Konstantin Pugin 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program. If not, see . 18 | * 19 | * Authors: Ryan Lortie 20 | * William Hua 21 | * Konstantin Pugin 22 | * Lester Carballo Perez 23 | */ 24 | 25 | #ifndef CONSTS_H 26 | #define CONSTS_H 27 | 28 | #define UNITY_GTK_MODULE_SCHEMA "org.appmenu.gtk-module" 29 | #define BLACKLIST_KEY "blacklist" 30 | #define WHITELIST_KEY "whitelist" 31 | #define INNER_MENU_KEY "always-show-inner-menu" 32 | #define RUN_ON_WAYLAND "run-on-wayland" 33 | 34 | #define _GTK_UNIQUE_BUS_NAME "_GTK_UNIQUE_BUS_NAME" 35 | #define _UNITY_OBJECT_PATH "_UNITY_OBJECT_PATH" 36 | #define _GTK_MENUBAR_OBJECT_PATH "_GTK_MENUBAR_OBJECT_PATH" 37 | #define OBJECT_PATH "/org/appmenu/gtk/window" 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/src/datastructs-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * appmenu-gtk-module 3 | * Copyright 2012 Canonical Ltd. 4 | * Copyright (C) 2015-2017 Konstantin Pugin 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program. If not, see . 18 | * 19 | * Authors: Ryan Lortie 20 | * William Hua 21 | * Konstantin Pugin 22 | * Lester Carballo Perez 23 | */ 24 | 25 | #ifndef DATASTRUCTSPRIVATE_H 26 | #define DATASTRUCTSPRIVATE_H 27 | 28 | #include 29 | #include 30 | 31 | struct _WindowData 32 | { 33 | uint window_id; 34 | ulong wayland_window_id; 35 | GMenu *menu_model; 36 | guint menu_model_export_id; 37 | GSList *menus; 38 | GMenuModel *old_model; 39 | UnityGtkActionGroup *action_group; 40 | guint action_group_export_id; 41 | }; 42 | 43 | struct _MenuShellData 44 | { 45 | GtkWindow *window; 46 | }; 47 | 48 | #endif // DATASTRUCTSPRIVATE_H 49 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/src/datastructs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * appmenu-gtk-module 3 | * Copyright 2012 Canonical Ltd. 4 | * Copyright (C) 2015-2017 Konstantin Pugin 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program. If not, see . 18 | * 19 | * Authors: Ryan Lortie 20 | * William Hua 21 | * Konstantin Pugin 22 | * Lester Carballo Perez 23 | */ 24 | 25 | #ifndef DATASTRUCTS_H 26 | #define DATASTRUCTS_H 27 | 28 | #include 29 | #include 30 | 31 | typedef struct _WindowData WindowData; 32 | 33 | G_GNUC_INTERNAL GQuark window_data_quark(void); 34 | G_GNUC_INTERNAL WindowData *window_data_new(void); 35 | G_GNUC_INTERNAL WindowData *window_data_copy(WindowData *source); 36 | G_GNUC_INTERNAL WindowData *gtk_window_get_window_data(GtkWindow *window); 37 | G_GNUC_INTERNAL void window_data_free(gpointer data); 38 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(WindowData, window_data_free); 39 | 40 | typedef struct _MenuShellData MenuShellData; 41 | 42 | G_GNUC_INTERNAL MenuShellData *menu_shell_data_new(void); 43 | G_GNUC_INTERNAL MenuShellData *menu_shell_data_copy(MenuShellData *source); 44 | G_GNUC_INTERNAL MenuShellData *gtk_menu_shell_get_menu_shell_data(GtkMenuShell *menu_shell); 45 | G_GNUC_INTERNAL bool menu_shell_data_has_window(MenuShellData *source); 46 | G_GNUC_INTERNAL GtkWindow *menu_shell_data_get_window(MenuShellData *source); 47 | G_GNUC_INTERNAL void menu_shell_data_free(gpointer data); 48 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(MenuShellData, menu_shell_data_free); 49 | 50 | G_GNUC_INTERNAL void gtk_window_connect_menu_shell(GtkWindow *window, GtkMenuShell *menu_shell); 51 | G_GNUC_INTERNAL void gtk_window_disconnect_menu_shell(GtkWindow *window, GtkMenuShell *menu_shell); 52 | 53 | #endif // DATASTRUCTS_H 54 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/src/gtk-2.0/meson.build: -------------------------------------------------------------------------------- 1 | gtk2_module = shared_module( 2 | 'appmenu-gtk-module', module_sources, 3 | dependencies: gtk2_parser_dep, 4 | c_args: '-Wno-deprecated-declarations', 5 | install: true, 6 | install_dir: join_paths(gtk2.get_variable(pkgconfig:'libdir'),'gtk-2.0','modules') 7 | ) 8 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/src/gtk-3.0/meson.build: -------------------------------------------------------------------------------- 1 | gtk3_module = shared_module( 2 | 'appmenu-gtk-module', module_sources, 3 | dependencies: gtk3_parser_dep, 4 | install: true, 5 | install_dir: join_paths(gtk3.get_variable(pkgconfig:'libdir'),'gtk-3.0','modules') 6 | ) 7 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/src/hijack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * appmenu-gtk-module 3 | * Copyright 2012 Canonical Ltd. 4 | * Copyright (C) 2015-2017 Konstantin Pugin 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program. If not, see . 18 | * 19 | * Authors: Ryan Lortie 20 | * William Hua 21 | * Konstantin Pugin 22 | * Lester Carballo Perez 23 | */ 24 | 25 | #ifndef HIJACK_H 26 | #define HIJACK_H 27 | 28 | #include 29 | #include 30 | 31 | G_GNUC_INTERNAL void store_pre_hijacked(); 32 | G_GNUC_INTERNAL void hijack_menu_bar_class_vtable(GType type); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/src/meson.build: -------------------------------------------------------------------------------- 1 | module_sources = files( 2 | 'appmenu-gtk-module.c', 3 | 'datastructs.c', 4 | 'datastructs.h', 5 | 'datastructs-private.h', 6 | 'hijack.c', 7 | 'hijack.h', 8 | 'support.c', 9 | 'support.h', 10 | 'blacklist.c', 11 | 'blacklist.h', 12 | 'platform.c', 13 | 'platform.h', 14 | 'consts.h' 15 | ) 16 | 17 | module_subdirs = ['gtk-2.0','gtk-3.0'] 18 | 19 | if build_gtk2 20 | subdir('gtk-2.0') 21 | endif 22 | 23 | if build_gtk3 24 | subdir('gtk-3.0') 25 | endif 26 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/src/platform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * appmenu-gtk-module 3 | * Copyright 2012 Canonical Ltd. 4 | * Copyright (C) 2015-2017 Konstantin Pugin 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program. If not, see . 18 | * 19 | * Authors: Ryan Lortie 20 | * William Hua 21 | * Konstantin Pugin 22 | * Lester Carballo Perez 23 | */ 24 | 25 | #ifndef PLATFORM_H 26 | #define PLATFORM_H 27 | 28 | #include 29 | #include 30 | 31 | #if GTK_MAJOR_VERSION >= 3 32 | #ifdef GDK_WINDOWING_WAYLAND 33 | #include 34 | #endif 35 | #endif 36 | 37 | #include "datastructs.h" 38 | 39 | #ifdef GDK_WINDOWING_X11 40 | G_GNUC_INTERNAL WindowData *gtk_x11_window_get_window_data(GtkWindow *window); 41 | #endif 42 | 43 | #ifdef GDK_WINDOWING_WAYLAND 44 | G_GNUC_INTERNAL WindowData *gtk_wayland_window_get_window_data(GtkWindow *window); 45 | #endif 46 | 47 | #endif // PLATFORM_H 48 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/src/support.h: -------------------------------------------------------------------------------- 1 | /* 2 | * appmenu-gtk-module 3 | * Copyright 2012 Canonical Ltd. 4 | * Copyright (C) 2015-2017 Konstantin Pugin 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program. If not, see . 18 | * 19 | * Authors: Ryan Lortie 20 | * William Hua 21 | * Konstantin Pugin 22 | * Lester Carballo Perez 23 | */ 24 | 25 | #ifndef SUPPORT_H 26 | #define SUPPORT_H 27 | 28 | #include 29 | #include 30 | 31 | G_GNUC_INTERNAL bool gtk_widget_shell_shows_menubar(GtkWidget *widget); 32 | G_GNUC_INTERNAL void gtk_widget_connect_settings(GtkWidget *widget); 33 | G_GNUC_INTERNAL void gtk_widget_disconnect_settings(GtkWidget *widget); 34 | G_GNUC_INTERNAL bool gtk_module_should_run(); 35 | G_GNUC_INTERNAL void watch_registrar_dbus(); 36 | G_GNUC_INTERNAL void enable_debug(); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/tests/autopilot/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- 2 | # Copyright 2013 Canonical 3 | # 4 | # This file is part of unity-gtk-module. 5 | 6 | """unity-gtk-module autopilot tests - top level package.""" 7 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/tests/autopilot/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for name in `autopilot list tests | head -n -3 | tail -n +3` 4 | do 5 | autopilot run $name || exit 1 6 | done 7 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/tests/autopilot/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rilian-la-te/vala-panel-appmenu/f05d28d805a22a7564895aa178772361c44b6b7a/subprojects/appmenu-gtk-module/tests/autopilot/tests/__init__.py -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/tests/demos/altgrabber.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2011 Canonical Limited 3 | * 4 | * All rights reserved. 5 | * 6 | * Author: Ryan Lortie 7 | */ 8 | 9 | #ifndef __ALT_GRABBER_H__ 10 | #define __ALT_GRABBER_H__ 11 | 12 | #include 13 | 14 | #define ALT_GRABBER_TYPE (alt_grabber_get_type()) 15 | #define ALT_GRABBER(inst) (G_TYPE_CHECK_INSTANCE_CAST((inst), ALT_GRABBER_TYPE, AltGrabber)) 16 | #define IS_ALT_GRABBER(inst) (G_TYPE_CHECK_INSTANCE_TYPE((inst), ALT_GRABBER_TYPE)) 17 | 18 | typedef struct _AltGrabber AltGrabber; 19 | 20 | typedef void (*AltGrabberCallback)(AltGrabber *grabber, gunichar c, gpointer user_data); 21 | 22 | GType alt_grabber_get_type(void) G_GNUC_CONST; 23 | AltGrabber *alt_grabber_get_for_screen(GdkScreen *screen); 24 | void alt_grabber_clear(AltGrabber *grabber); 25 | void alt_grabber_add_unichar(AltGrabber *grabber, gunichar c, AltGrabberCallback callback, 26 | gpointer user_data, GDestroyNotify notify); 27 | 28 | #endif /* __ALT_GRABBER_H__ */ 29 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/tests/demos/altmonitor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2011 Canonical Limited 3 | * 4 | * All rights reserved. 5 | * 6 | * Author: Ryan Lortie 7 | */ 8 | 9 | #ifndef __ALT_MONITOR_H__ 10 | #define __ALT_MONITOR_H__ 11 | 12 | #include 13 | 14 | #define ALT_MONITOR_TYPE (alt_monitor_get_type()) 15 | #define ALT_MONITOR(inst) (G_TYPE_CHECK_INSTANCE_CAST((inst), ALT_MONITOR_TYPE, AltMonitor)) 16 | #define IS_ALT_MONITOR(inst) (G_TYPE_CHECK_INSTANCE_TYPE((inst), ALT_MONITOR_TYPE)) 17 | 18 | typedef struct _AltMonitor AltMonitor; 19 | 20 | GType alt_monitor_get_type(void) G_GNUC_CONST; 21 | AltMonitor *alt_monitor_get_for_display(GdkDisplay *display); 22 | gboolean alt_monitor_get_alt_pressed(AltMonitor *monitor); 23 | 24 | #endif /* __ALT_MONITOR_H__ */ 25 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/tests/demos/black.vala: -------------------------------------------------------------------------------- 1 | class BlackBox : Gtk.Box { 2 | protected override bool draw (Cairo.Context cr) { 3 | cr.set_source_rgb (0.0, 0.0, 0.0); 4 | cr.paint (); 5 | return false; 6 | } 7 | } 8 | 9 | void main (string[] args) { 10 | Gtk.init (ref args); 11 | 12 | Bus.own_name (BusType.SESSION, "demo.black", 0, null, null, null); 13 | 14 | var window = new Gtk.Window (Gtk.WindowType.TOPLEVEL); 15 | window.set_default_size (400, 300); 16 | var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); 17 | window.add (box); 18 | 19 | var menubar = new Gtk.MenuBar (); 20 | 21 | var file_item = new Gtk.MenuItem.with_label ("File"); 22 | var file = new Gtk.Menu (); 23 | file_item.set_submenu (file); 24 | menubar.add (file_item); 25 | file.add (new Gtk.MenuItem.with_label ("New")); 26 | file.add (new Gtk.MenuItem.with_label ("Open")); 27 | file.add (new Gtk.MenuItem.with_label ("Save")); 28 | file.add (new Gtk.MenuItem.with_label ("Quit")); 29 | 30 | var edit_item = new Gtk.MenuItem.with_label ("Edit"); 31 | var edit = new Gtk.Menu (); 32 | edit_item.set_submenu (edit); 33 | menubar.add (edit_item); 34 | edit.add (new Gtk.MenuItem.with_label ("Cut")); 35 | edit.add (new Gtk.MenuItem.with_label ("Copy")); 36 | edit.add (new Gtk.MenuItem.with_label ("Paste")); 37 | 38 | var view_item = new Gtk.MenuItem.with_label ("View"); 39 | var view = new Gtk.Menu (); 40 | view_item.set_submenu (view); 41 | menubar.add (view_item); 42 | view.add (new Gtk.CheckMenuItem.with_label ("Fullscreen")); 43 | 44 | var help_item = new Gtk.MenuItem.with_label ("Help"); 45 | var help = new Gtk.Menu (); 46 | help_item.set_submenu (help); 47 | menubar.add (help_item); 48 | help.add (new Gtk.MenuItem.with_label ("Contents")); 49 | help.add (new Gtk.MenuItem.with_label ("About")); 50 | 51 | box.pack_start (menubar, false, false, 0); 52 | box.pack_start (new BlackBox (), true, true, 0); 53 | 54 | window.show_all (); 55 | 56 | Gtk.main (); 57 | } 58 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/tests/demos/client.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "altgrabber.h" 4 | #include "altmonitor.h" 5 | #include "menusource.h" 6 | 7 | #if 0 8 | static void 9 | items_changed (GMenuModel *menu, 10 | gint position, 11 | gint removed, 12 | gint added, 13 | gpointer user_data) 14 | { 15 | g_print ("\n change"); 16 | g_menu_markup_print_stderr (menu); 17 | g_print ("\n"); 18 | } 19 | #endif 20 | 21 | static void menu_changed(GObject *object, GParamSpec *pspec, gpointer user_data) 22 | { 23 | static GActionGroup *actions; 24 | GtkMenuBar *bar = user_data; 25 | GMenuModel *menu; 26 | 27 | if (!actions) 28 | actions = G_ACTION_GROUP(g_simple_action_group_new()); 29 | 30 | menu = menu_source_get_menu(MENU_SOURCE(object)); 31 | 32 | g_print("\n"); 33 | if (menu) 34 | { 35 | // g_signal_connect (menu, "items-changed", G_CALLBACK (items_changed), NULL); 36 | gtk_menu_shell_bind_model(GTK_MENU_SHELL(bar), G_MENU_MODEL(menu), 0, 0); 37 | } 38 | else 39 | { 40 | GMenu *empty; 41 | empty = g_menu_new(); 42 | gtk_menu_shell_bind_model(GTK_MENU_SHELL(bar), G_MENU_MODEL(empty), 0, 0); 43 | g_print("[no menu]\n"); 44 | } 45 | g_print("\n"); 46 | } 47 | 48 | int main(int argc, char **argv) 49 | { 50 | MenuSource *source; 51 | GMenuModel *m; 52 | GtkWidget *bar; 53 | GtkWidget *win; 54 | 55 | gtk_init(&argc, &argv); 56 | 57 | win = gtk_window_new(GTK_WINDOW_TOPLEVEL); 58 | bar = gtk_menu_bar_new(); 59 | gtk_window_set_accept_focus(GTK_WINDOW(win), FALSE); 60 | gtk_container_add(GTK_CONTAINER(win), bar); 61 | gtk_window_set_default_size(GTK_WINDOW(win), 800, 200); 62 | gtk_widget_show_all(win); 63 | 64 | source = menu_source_get_for_screen(gdk_screen_get_default()); 65 | g_signal_connect(source, "notify::menu", G_CALLBACK(menu_changed), bar); 66 | menu_changed(G_OBJECT(source), NULL, bar); 67 | 68 | gtk_main(); 69 | 70 | return 0; 71 | } 72 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/tests/demos/menusource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2011 Canonical Limited 3 | * 4 | * All rights reserved. 5 | * 6 | * Author: Ryan Lortie 7 | */ 8 | 9 | #ifndef __MENU_SOURCE_H__ 10 | #define __MENU_SOURCE_H__ 11 | 12 | #include 13 | 14 | #define MENU_SOURCE_TYPE (menu_source_get_type()) 15 | #define MENU_SOURCE(inst) (G_TYPE_CHECK_INSTANCE_CAST((inst), MENU_SOURCE_TYPE, MenuSource)) 16 | #define IS_MENU_SOURCE(inst) (G_TYPE_CHECK_INSTANCE_TYPE((inst), MENU_SOURCE_TYPE)) 17 | 18 | typedef struct _MenuSource MenuSource; 19 | 20 | GType menu_source_get_type(void) G_GNUC_CONST; 21 | MenuSource *menu_source_get_for_screen(GdkScreen *screen); 22 | GMenuModel *menu_source_get_menu(MenuSource *menu_source); 23 | 24 | #endif /* __MENU_SOURCE_H__ */ 25 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/tests/demos/test-radio.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | static void handle_window_destroy(GtkWindow *window, gpointer user_data) 4 | { 5 | gtk_main_quit(); 6 | } 7 | 8 | static void handle_menu_item_activate(GtkMenuItem *menu_item, gpointer user_data) 9 | { 10 | g_message("%s: %s", __func__, (const gchar *)user_data); 11 | } 12 | 13 | static void handle_check_menu_item_toggled(GtkCheckMenuItem *check_menu_item, gpointer user_data) 14 | { 15 | g_message("%s: %s", __func__, (const gchar *)user_data); 16 | } 17 | 18 | int main(int argc, char *argv[]) 19 | { 20 | GtkWidget *window; 21 | GtkWidget *grid; 22 | GtkWidget *menu_bar; 23 | GtkWidget *menu; 24 | GtkWidget *menu_item; 25 | GtkWidget *button; 26 | 27 | gtk_init(&argc, &argv); 28 | 29 | window = gtk_window_new(GTK_WINDOW_TOPLEVEL); 30 | g_signal_connect(window, "destroy", G_CALLBACK(handle_window_destroy), NULL); 31 | 32 | grid = gtk_grid_new(); 33 | gtk_container_add(GTK_CONTAINER(window), grid); 34 | 35 | menu_bar = gtk_menu_bar_new(); 36 | gtk_grid_attach(GTK_GRID(grid), menu_bar, 0, 0, 1, 1); 37 | 38 | menu_item = gtk_menu_item_new_with_label("File"); 39 | gtk_container_add(GTK_CONTAINER(menu_bar), menu_item); 40 | 41 | menu = gtk_menu_new(); 42 | gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_item), menu); 43 | 44 | menu_item = gtk_radio_menu_item_new_with_label(NULL, "Radio A"); 45 | g_signal_connect(menu_item, "activate", G_CALLBACK(handle_menu_item_activate), "Radio A"); 46 | g_signal_connect(menu_item, 47 | "toggled", 48 | G_CALLBACK(handle_check_menu_item_toggled), 49 | "Radio A"); 50 | gtk_container_add(GTK_CONTAINER(menu), menu_item); 51 | menu_item = gtk_radio_menu_item_new_with_label_from_widget(GTK_RADIO_MENU_ITEM(menu_item), 52 | "Radio B"); 53 | g_signal_connect(menu_item, "activate", G_CALLBACK(handle_menu_item_activate), "Radio B"); 54 | g_signal_connect(menu_item, 55 | "toggled", 56 | G_CALLBACK(handle_check_menu_item_toggled), 57 | "Radio B"); 58 | gtk_container_add(GTK_CONTAINER(menu), menu_item); 59 | menu_item = gtk_radio_menu_item_new_with_label_from_widget(GTK_RADIO_MENU_ITEM(menu_item), 60 | "Radio C"); 61 | g_signal_connect(menu_item, "activate", G_CALLBACK(handle_menu_item_activate), "Radio C"); 62 | g_signal_connect(menu_item, 63 | "toggled", 64 | G_CALLBACK(handle_check_menu_item_toggled), 65 | "Radio C"); 66 | gtk_container_add(GTK_CONTAINER(menu), menu_item); 67 | 68 | gtk_widget_show_all(window); 69 | 70 | gtk_main(); 71 | 72 | return 0; 73 | } 74 | -------------------------------------------------------------------------------- /subprojects/appmenu-gtk-module/tests/meson.build: -------------------------------------------------------------------------------- 1 | if build_gtk3 and get_option('tests') 2 | client_sources = files ( 3 | join_paths('demos','altgrabber.h'), 4 | join_paths('demos','altgrabber.c'), 5 | join_paths('demos','altmonitor.h'), 6 | join_paths('demos','altmonitor.c'), 7 | join_paths('demos','menusource.h'), 8 | join_paths('demos','menusource.c'), 9 | join_paths('demos','client.c')) 10 | 11 | wnck_ver = '>=3.4.8' 12 | wnck = dependency('libwnck-3.0',version: wnck_ver, required: false) 13 | x11 = dependency('x11', required: false) 14 | if(wnck.found() and x11.found()) 15 | client = executable('menumodel-client',client_sources, 16 | dependencies: [gtk3_parser_dep, wnck, x11] 17 | ) 18 | # test('client', client) 19 | endif 20 | tester = executable('tester',join_paths('demos','unity-gtk-menu-tester.c'), dependencies: gtk3) 21 | # test('tester',tester) 22 | radio = executable('radio',join_paths('demos','test-radio.c'), dependencies: gtk3) 23 | # test('radio',radio) 24 | hello = executable('hello',join_paths('demos','hello.c'), dependencies: gtk3) 25 | # test('hello',hello) 26 | vala_found = add_languages('vala', required: false) 27 | if vala_found 28 | black = executable('black',join_paths('demos','black.vala'), dependencies: gtk3) 29 | # test('black',black) 30 | endif 31 | endif 32 | 33 | #TODO: fix autopilot 34 | run_target('autopilot', 35 | command: ['autopilot/test.sh'], 36 | ) 37 | -------------------------------------------------------------------------------- /subprojects/jayatana/AUTHORS: -------------------------------------------------------------------------------- 1 | Jared Gonzalez 2 | -------------------------------------------------------------------------------- /subprojects/jayatana/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Jared González 2 | Copyright (c) 2018 Konstantin Pugin 3 | 4 | MIT 5 | 6 | Permission is hereby granted, free of charge, to any 7 | person obtaining a copy of this software and associated 8 | documentation files (the "Software"), to deal in the 9 | Software without restriction, including without limitation 10 | the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the 12 | Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice 16 | shall be included in all copies or substantial portions of 17 | the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 20 | KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 21 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 22 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 23 | OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 24 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 25 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | -------------------------------------------------------------------------------- /subprojects/jayatana/README.md: -------------------------------------------------------------------------------- 1 | This is renamed fork of [Google Code repo](https://code.google.com/archive/p/java-swing-ayatana) of Jayatana. 2 | 3 | JAyatana helps to use DBusMenu for Java Swing programs (enables Global Menu for many Java applications). 4 | 5 | *Dependencies:* 6 | 7 | * GLib (>= 2.40.0) 8 | * Java (>= 1.9.0) 9 | * xkbcommon (>= 0.5.0) 10 | * dbusmenu-glib (>= 16.04.0) 11 | 12 | *Enabling Jayatana* 13 | 14 | 1. System-wide way (recommended only if you have many Java programs with menus): 15 | - add `JAVA_TOOL_OPTIONS=-javaagent:/usr/share/java/jayatanaag.jar $JAVA_TOOL_OPTIONS` into your *.profile* file. 16 | 17 | 2. Application-specific ways (useful if you usually have one or 2 Java programs, like Android Studio) and if above does not work. 18 | 19 | *2.1. Intellij programs (Idea, PhpStorm, CLion, Android Studio)* 20 | - Edit *.vmoptions file, and add `-javaagent:/usr/share/java/jayatanaag.jar` to the end of file. 21 | - Edit *.properties file, and add `linux.native.menu=true` to the end of it. 22 | 23 | *2.2. Netbeans* 24 | - Edit netbeans.conf, and add `-J-javaagent:/usr/share/java/jayatanaag.jar` to the end of it. 25 | 26 | 3. Enable agent via desktop file (for any single application) 27 | - Add `-javaagent:/usr/share/java/jayatanaag.jar` after Exec or TryExec line of application's desktop file (if application executes JAR directly). If application executes JAR via wrapper, and this option to the end of JVM options for running actual JAR. 28 | -------------------------------------------------------------------------------- /subprojects/jayatana/java/MANIFEST.MF.in: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Created-By: @Java_VERSION_STRING@ (Oracle Corporation) 3 | Premain-Class: com.jarego.jayatana.Agent 4 | -------------------------------------------------------------------------------- /subprojects/jayatana/java/com/jarego/jayatana/Feature.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Jared Gonzalez 3 | * 4 | * Permission is hereby granted, free of charge, to any 5 | * person obtaining a copy of this software and associated 6 | * documentation files (the "Software"), to deal in the 7 | * Software without restriction, including without limitation 8 | * the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the 10 | * Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice 14 | * shall be included in all copies or substantial portions of 15 | * the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 18 | * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 19 | * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 20 | * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 21 | * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 22 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 23 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | */ 26 | package com.jarego.jayatana; 27 | 28 | /** 29 | * This interface allows you to control the deployment of different 30 | * characteristics 31 | * 32 | * @author Jared Gonzalez 33 | */ 34 | public interface Feature { 35 | /** 36 | * Deploy characteristic 37 | */ 38 | public void deploy(); 39 | } 40 | -------------------------------------------------------------------------------- /subprojects/jayatana/java/com/jarego/jayatana/basic/GMainLoop.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Jared Gonzalez 3 | * 4 | * Permission is hereby granted, free of charge, to any 5 | * person obtaining a copy of this software and associated 6 | * documentation files (the "Software"), to deal in the 7 | * Software without restriction, including without limitation 8 | * the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the 10 | * Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice 14 | * shall be included in all copies or substantial portions of 15 | * the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 18 | * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 19 | * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 20 | * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 21 | * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 22 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 23 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | */ 26 | package com.jarego.jayatana.basic; 27 | 28 | import java.util.logging.Level; 29 | import java.util.logging.Logger; 30 | 31 | import com.jarego.jayatana.Feature; 32 | 33 | /** 34 | * This class starts a GMainLoop for integration with the linux bus. 35 | * 36 | * @author Jared Gonzalez 37 | */ 38 | public class GMainLoop implements Feature { 39 | /** 40 | * Start the GMainLoop process. 41 | */ 42 | native private static void installGMainLoop(); 43 | /** 44 | * Stops the GMain Loop process. 45 | */ 46 | native private static void uninstallGMainLoop(); 47 | 48 | @Override 49 | public void deploy() { 50 | // register the output thread of the application for 51 | // stop the GMainLoop 52 | Runtime.getRuntime().addShutdownHook(new Thread() { 53 | { 54 | setDaemon(true); 55 | setName("JAyatana GMainLoop Shutdown"); 56 | } 57 | @Override 58 | public void run() { 59 | // in case the global menu thread is 60 | // active wait for the closure of this. 61 | if (GlobalMenu.shutdownThread != null) 62 | try { 63 | GlobalMenu.shutdownThread.join(); 64 | } catch (InterruptedException e) { 65 | Logger.getLogger(GMainLoop.class.getName()) 66 | .log(Level.WARNING, "can't wait Global Menu end", e); 67 | } 68 | // finish the GMainLoop 69 | uninstallGMainLoop(); 70 | } 71 | }); 72 | // start the GMainLoop 73 | installGMainLoop(); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /subprojects/jayatana/java/com/jarego/jayatana/basic/NativeLibraries.java.in: -------------------------------------------------------------------------------- 1 | package com.jarego.jayatana.basic; 2 | 3 | import java.io.File; 4 | 5 | import com.jarego.jayatana.Feature; 6 | 7 | public class NativeLibraries implements Feature { 8 | @Override 9 | public void deploy() { 10 | // load libraries for swing support 11 | System.loadLibrary("jawt"); 12 | // load library of JAyatana 13 | if (System.getenv("JAYATANA_NATIVEPATH") != null) {//opcion para desarrollo 14 | System.load(System.getenv("JAYATANA_NATIVEPATH")); 15 | System.err.println("JAYATANA_NATIVEPATH="+System.getenv("JAYATANA_NATIVEPATH")); 16 | } else { 17 | // if the library does not exist cancel integration 18 | if (!new File("@CMAKE_INSTALL_FULL_LIBDIR@/jayatana/libjayatana.so").canRead()) 19 | return; 20 | System.load("@CMAKE_INSTALL_FULL_LIBDIR@/jayatana/libjayatana.so"); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /subprojects/jayatana/java/com/jarego/jayatana/basic/meson.build: -------------------------------------------------------------------------------- 1 | native_libraries = configure_file( 2 | input: 'NativeLibraries.java.in', 3 | output: 'NativeLibraries.java', 4 | configuration: data) -------------------------------------------------------------------------------- /subprojects/jayatana/java/com/jarego/jayatana/meson.build: -------------------------------------------------------------------------------- 1 | subdir('basic') 2 | 3 | agent = configure_file( 4 | input: 'Agent.java.in', 5 | output: 'Agent.java', 6 | configuration: data) -------------------------------------------------------------------------------- /subprojects/jayatana/java/com/jarego/jayatana/swing/SwingWMClass.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Jared Gonzalez 3 | * 4 | * Permission is hereby granted, free of charge, to any 5 | * person obtaining a copy of this software and associated 6 | * documentation files (the "Software"), to deal in the 7 | * Software without restriction, including without limitation 8 | * the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the 10 | * Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice 14 | * shall be included in all copies or substantial portions of 15 | * the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 18 | * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 19 | * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 20 | * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 21 | * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 22 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 23 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | */ 26 | package com.jarego.jayatana.swing; 27 | 28 | import java.awt.Toolkit; 29 | import java.lang.reflect.Field; 30 | import java.util.logging.Level; 31 | import java.util.logging.Logger; 32 | 33 | import com.jarego.jayatana.Feature; 34 | 35 | /** 36 | * This class is a feature to modify the value of the STARTUP WINDOW MANAGER CLASS 37 | * which can be integrated into a * .desktop launcher file for integration with the 38 | * Ubuntu menu bar. 39 | * 40 | * This value can be modified with the virtual machine parameter: 41 | * jayatana.wmclass 42 | * Or with the environment variable: 43 | * JAYATANA_WMCLASS 44 | * 45 | * This value can be used in conjunction with the StartupWMClass parameter in the .desktop file 46 | * To allow to integrate with the Unity launch bar. 47 | * 48 | * @author Jared Gonzalez. 49 | */ 50 | public class SwingWMClass implements Feature { 51 | /** 52 | * Feature display to allow integration with the Unity launcher. 53 | */ 54 | @Override 55 | public void deploy() { 56 | String startupWMClass = null; 57 | 58 | if (System.getProperty("jayatana.startupWMClass") != null) 59 | startupWMClass = System.getProperty("jayatana.startupWMClass"); 60 | else if (System.getProperty("jayatana.wmclass") != null) 61 | startupWMClass = System.getProperty("jayatana.wmclass"); 62 | 63 | else if (System.getProperty("JAYATANA_STARTUPWMCLASS") != null) 64 | startupWMClass = System.getProperty("JAYATANA_STARTUPWMCLASS"); 65 | else if (System.getProperty("JAYATANA_WMCLASS") != null) 66 | startupWMClass = System.getProperty("JAYATANA_WMCLASS"); 67 | 68 | if (startupWMClass != null) { 69 | try { 70 | System.setProperty("java.awt.WM_CLASS", startupWMClass); 71 | Toolkit xToolkit = Toolkit.getDefaultToolkit(); 72 | Field awtAppClassNameField = xToolkit.getClass() 73 | .getDeclaredField("awtAppClassName"); 74 | awtAppClassNameField.setAccessible(true); 75 | awtAppClassNameField.set(xToolkit, startupWMClass); 76 | awtAppClassNameField.setAccessible(false); 77 | } catch (Exception e) { 78 | Logger.getLogger(SwingWMClass.class.getName()) 79 | .log(Level.WARNING, e.getMessage(), e); 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /subprojects/jayatana/java/meson.build: -------------------------------------------------------------------------------- 1 | subdir('com/jarego/jayatana') 2 | 3 | jayatana_java_sources = files( 4 | 'com/jarego/jayatana/Feature.java', 5 | 'com/jarego/jayatana/FeatureManager.java', 6 | 'com/jarego/jayatana/FeatureWrapper.java', 7 | 'com/jarego/jayatana/basic/GMainLoop.java', 8 | 'com/jarego/jayatana/basic/GlobalMenuAdapter.java', 9 | 'com/jarego/jayatana/basic/GlobalMenu.java', 10 | 'com/jarego/jayatana/swing/SwingGlobalMenu.java', 11 | 'com/jarego/jayatana/swing/SwingGTKFixed.java', 12 | 'com/jarego/jayatana/swing/SwingWMClass.java', 13 | 'com/jarego/jayatana/swing/SwingGlobalMenuWindow.java' 14 | ) 15 | jayatana_java_headers = files( 16 | 'com/jarego/jayatana/basic/GMainLoop.java', 17 | 'com/jarego/jayatana/basic/GlobalMenu.java', 18 | 'com/jarego/jayatana/Feature.java' 19 | ) 20 | args = ['--add-exports', 'java.desktop/com.sun.java.swing.plaf.gtk=ALL-UNNAMED'] 21 | java_install_path = join_paths(get_option('datadir'), 'java') 22 | 23 | jayatana_java = jar('jayatana', jayatana_java_sources, native_libraries, 24 | java_args : args, 25 | install: true, 26 | install_dir: java_install_path 27 | ) 28 | 29 | jayatana_jni_hdr = java.native_headers( 30 | jayatana_java_headers, 31 | package: 'com.jarego.jayatana', 32 | classes: ['GMainLoop', 'GlobalMenu'] 33 | ) 34 | 35 | jayatana_jni = declare_dependency( 36 | sources: jayatana_jni_hdr 37 | ) 38 | 39 | manifest = configure_file( 40 | input: 'MANIFEST.MF.in', 41 | output: 'MANIFEST.MF', 42 | configuration: data) 43 | 44 | 45 | agent_java = jar('jayatanaag', agent, 46 | java_args : args, 47 | install: true, 48 | install_dir: java_install_path 49 | ) 50 | 51 | # HACK: regenerate manifest after building a JAR file 52 | agent_manifest_patch = custom_target( 53 | output: 'jayatanaag.timestamp', 54 | command: ['jar', '-f', agent_java.full_path(), '-u', '-m', manifest, '-v'], 55 | capture: true, 56 | depends: agent_java, 57 | build_by_default : true, 58 | build_always_stale: true 59 | ) -------------------------------------------------------------------------------- /subprojects/jayatana/lib/com_jarego_jayatana_Agent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Jared Gonzalez 3 | * 4 | * Permission is hereby granted, free of charge, to any 5 | * person obtaining a copy of this software and associated 6 | * documentation files (the "Software"), to deal in the 7 | * Software without restriction, including without limitation 8 | * the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the 10 | * Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice 14 | * shall be included in all copies or substantial portions of 15 | * the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 18 | * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 19 | * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 20 | * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 21 | * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 22 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 23 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * File: ayatana_Collections.c 27 | * Author: Jared Gonzalez 28 | */ 29 | #ifndef COM_JAREGO_JAYATANA_AGENT_H_ 30 | #define COM_JAREGO_JAYATANA_AGENT_H_ 31 | 32 | #include 33 | 34 | /** 35 | * Cargar agente para integracion con Ubuntu/Linux 36 | */ 37 | JNIEXPORT jint JNICALL Agent_OnLoad(JavaVM *vm, char *options, void *reserved); 38 | 39 | /** 40 | * Carga libreria nativa desde agente Java para integracion 41 | * con Ubuntu/Linux 42 | */ 43 | jint JNI_OnLoad(JavaVM *vm, void *reserved); 44 | 45 | #endif /* COM_JAREGO_JAYATANA_AGENT_H_ */ 46 | -------------------------------------------------------------------------------- /subprojects/jayatana/lib/com_jarego_jayatana_basic_GMainLoop.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Jared Gonzalez 3 | * 4 | * Permission is hereby granted, free of charge, to any 5 | * person obtaining a copy of this software and associated 6 | * documentation files (the "Software"), to deal in the 7 | * Software without restriction, including without limitation 8 | * the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the 10 | * Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice 14 | * shall be included in all copies or substantial portions of 15 | * the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 18 | * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 19 | * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 20 | * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 21 | * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 22 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 23 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * File: com_jarego_jayatana_basic_GMainLoop.c 27 | * Author: Jared Gonzalez 28 | */ 29 | #include "com_jarego_jayatana_basic_GMainLoop.h" 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | /** 37 | * GMainLoop para comunicacion con glib/dbus 38 | */ 39 | GMainLoop *com_jarego_jayatana_gmainloop = NULL; 40 | 41 | /** 42 | * Hilo que mantiene en ejecucion un GMainLoop 43 | */ 44 | gpointer com_jarego_jayatana_gmainloop_thread(gpointer data) 45 | { 46 | // ejecutar GMainLoop 47 | com_jarego_jayatana_gmainloop = g_main_loop_new(NULL, FALSE); 48 | g_main_loop_run(com_jarego_jayatana_gmainloop); 49 | return NULL; 50 | } 51 | 52 | /** 53 | * Iniciar un GMainLoop para comunicacion con glib/dbus al iniciar el programa 54 | */ 55 | JNIEXPORT void JNICALL Java_com_jarego_jayatana_basic_GMainLoop_installGMainLoop(JNIEnv *env, 56 | jclass jclass) 57 | { 58 | // lanza el hilo para el GMainLoop 59 | g_thread_new("jayatana_gmainloop", com_jarego_jayatana_gmainloop_thread, NULL); 60 | } 61 | 62 | /** 63 | * Detener un GMainLoop para comunicacion con glib/dbus el finalizar el programa 64 | */ 65 | JNIEXPORT void JNICALL Java_com_jarego_jayatana_basic_GMainLoop_uninstallGMainLoop(JNIEnv *env, 66 | jclass jclass) 67 | { 68 | // detiene el GMainLoop 69 | g_main_loop_quit(com_jarego_jayatana_gmainloop); 70 | } 71 | -------------------------------------------------------------------------------- /subprojects/jayatana/lib/com_jarego_jayatana_jni.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Jared Gonzalez 3 | * 4 | * Permission is hereby granted, free of charge, to any 5 | * person obtaining a copy of this software and associated 6 | * documentation files (the "Software"), to deal in the 7 | * Software without restriction, including without limitation 8 | * the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the 10 | * Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice 14 | * shall be included in all copies or substantial portions of 15 | * the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 18 | * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 19 | * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 20 | * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 21 | * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 22 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 23 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * File: com_jarego_jayatana_jni.c 27 | * Author: Jared Gonzalez 28 | */ 29 | #include "com_jarego_jayatana_jni.h" 30 | 31 | JavaVM *jayatana_jvm; 32 | 33 | /** 34 | * Obtener el putero JavaVM para permitr integracion con Ubuntu/Linux 35 | */ 36 | jint JNI_OnLoad(JavaVM *jvm, void *reserved) 37 | { 38 | jayatana_jvm = jvm; 39 | return JNI_VERSION_1_8; 40 | } 41 | -------------------------------------------------------------------------------- /subprojects/jayatana/lib/com_jarego_jayatana_jni.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Jared Gonzalez 3 | * 4 | * Permission is hereby granted, free of charge, to any 5 | * person obtaining a copy of this software and associated 6 | * documentation files (the "Software"), to deal in the 7 | * Software without restriction, including without limitation 8 | * the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the 10 | * Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice 14 | * shall be included in all copies or substantial portions of 15 | * the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 18 | * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 19 | * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 20 | * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 21 | * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 22 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 23 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * File: com_jarego_jayatana_jni.h 27 | * Author: Jared Gonzalez 28 | */ 29 | #include 30 | 31 | #ifndef COM_JAREGO_JAYATANA_JNI_H_ 32 | #define COM_JAREGO_JAYATANA_JNI_H_ 33 | 34 | extern JavaVM *jayatana_jvm; 35 | 36 | /** 37 | * Obtener el putero JavaVM para permitr integracion con Ubuntu/Linux 38 | */ 39 | jint JNI_OnLoad(JavaVM *, void *); 40 | 41 | #endif /* COM_JAREGO_JAYATANA_JNI_H_ */ 42 | -------------------------------------------------------------------------------- /subprojects/jayatana/lib/config.h.in: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_H 2 | #define CONFIG_H 3 | 4 | #define LIBDIR "@CMAKE_INSTALL_FULL_LIBDIR@/jayatana" 5 | #define JAVADIR "@CMAKE_INSTALL_FULL_DATAROOTDIR@/java" 6 | #define JAVA_VERSION @Java_VERSION_MINOR@ 7 | #endif 8 | -------------------------------------------------------------------------------- /subprojects/jayatana/lib/dbusmenu-definitions.h: -------------------------------------------------------------------------------- 1 | #ifndef DBUSMENU_DEFINITIONS_H 2 | #define DBUSMENU_DEFINITIONS_H 3 | 4 | #define DBUS_MENU_SERVER_TYPE_DEFAULT "standard" 5 | #define DBUS_MENU_SERVER_TYPE_SEPARATOR "separator" 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /subprojects/jayatana/lib/jayatana-window.c: -------------------------------------------------------------------------------- 1 | 2 | #include "jayatana-window.h" 3 | 4 | JAyatanaWindow *jayatana_window_new() 5 | { 6 | JAyatanaWindow *ret = (JAyatanaWindow *)g_malloc0(sizeof(JAyatanaWindow)); 7 | ret->menu_items = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_object_unref); 8 | ret->menu_counter = 1; 9 | return ret; 10 | } 11 | 12 | JAyatanaWindow *jayatana_window_copy(JAyatanaWindow *src) 13 | { 14 | JAyatanaWindow *ret = (JAyatanaWindow *)g_malloc0(sizeof(JAyatanaWindow)); 15 | ret->windowXID = src->windowXID; 16 | ret->globalThat = src->globalThat; 17 | ret->menu_counter = src->menu_counter; 18 | 19 | ret->windowXIDPath = g_strdup(src->windowXIDPath); 20 | ret->gdBusProxyRegistered = src->gdBusProxyRegistered; 21 | ret->gBusWatcher = src->gBusWatcher; 22 | ret->dbBusProxy = G_DBUS_PROXY(g_object_ref(src->dbBusProxy)); 23 | ret->dbBusProxyCallSync = g_variant_ref(src->dbBusProxyCallSync); 24 | 25 | ret->dbusMenuServer = DBUSMENU_SERVER(g_object_ref(src->dbusMenuServer)); 26 | ret->dbusMenuRoot = DBUSMENU_MENUITEM(g_object_ref(src->dbusMenuRoot)); 27 | 28 | ret->registerState = src->registerState; 29 | ret->menu_items = g_hash_table_ref(src->menu_items); 30 | return ret; 31 | } 32 | 33 | void jayatana_window_free(JAyatanaWindow *window) 34 | { 35 | if (window->gdBusProxyRegistered) 36 | { 37 | g_clear_pointer(&window->windowXIDPath, g_free); 38 | g_clear_object(&window->dbBusProxy); 39 | g_clear_pointer(&window->dbBusProxyCallSync, g_variant_unref); 40 | g_clear_object(&window->dbusMenuServer); 41 | g_clear_object(&window->dbusMenuRoot); 42 | } 43 | g_clear_pointer(&window->menu_items, g_hash_table_unref); 44 | g_clear_pointer(&window, g_free); 45 | } 46 | 47 | G_DEFINE_BOXED_TYPE(JAyatanaWindow, jayatana_window, (GBoxedCopyFunc)jayatana_window_copy, 48 | (GBoxedFreeFunc)jayatana_window_free) 49 | 50 | extern void jayatana_item_activated(DbusmenuMenuitem *item, guint timestamp, gpointer user_data); 51 | extern void jayatana_item_events(DbusmenuMenuitem *item, const char *event); 52 | extern void jayatana_item_about_to_show(DbusmenuMenuitem *item); 53 | 54 | DbusmenuMenuitem *jayatana_window_get_dbusmenu_item(JAyatanaWindow *win, jint id, 55 | const char *cclabel) 56 | { 57 | DbusmenuMenuitem *it; 58 | char *checksum = g_compute_checksum_for_data(G_CHECKSUM_SHA512, 59 | (const unsigned char *)cclabel, 60 | strlen(cclabel)); 61 | it = DBUSMENU_MENUITEM(g_hash_table_lookup(win->menu_items, checksum)); 62 | if (it == NULL) 63 | { 64 | it = dbusmenu_menuitem_new_with_id(id > 0 ? id : win->menu_counter++); 65 | g_hash_table_insert(win->menu_items, checksum, it); 66 | } 67 | else 68 | { 69 | g_signal_handlers_disconnect_by_func(it, (gpointer)jayatana_item_activated, NULL); 70 | g_signal_handlers_disconnect_by_func(it, (gpointer)jayatana_item_events, NULL); 71 | g_signal_handlers_disconnect_by_func(it, 72 | (gpointer)jayatana_item_about_to_show, 73 | NULL); 74 | } 75 | return it; 76 | } 77 | 78 | void jayatana_window_remove_unparented(JAyatanaWindow *win) 79 | { 80 | GHashTableIter iter; 81 | char *key; 82 | DbusmenuMenuitem *value; 83 | g_hash_table_iter_init(&iter, win->menu_items); 84 | while (g_hash_table_iter_next(&iter, (void **)&key, (void **)&value)) 85 | { 86 | if (dbusmenu_menuitem_get_parent(value) == NULL) 87 | g_hash_table_iter_remove(&iter); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /subprojects/jayatana/lib/jayatana-window.h: -------------------------------------------------------------------------------- 1 | #ifndef JAYATANAWINDOW_H 2 | #define JAYATANAWINDOW_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | G_BEGIN_DECLS 11 | 12 | /** 13 | * Control structure of global menu 14 | */ 15 | typedef struct 16 | { 17 | jlong windowXID; 18 | jobject globalThat; 19 | 20 | int menu_counter; 21 | char *windowXIDPath; 22 | bool gdBusProxyRegistered; 23 | guint gBusWatcher; 24 | GDBusProxy *dbBusProxy; 25 | GVariant *dbBusProxyCallSync; 26 | 27 | DbusmenuServer *dbusMenuServer; 28 | DbusmenuMenuitem *dbusMenuRoot; 29 | 30 | jint registerState; 31 | GHashTable *menu_items; 32 | } JAyatanaWindow; 33 | 34 | JAyatanaWindow *jayatana_window_new(); 35 | JAyatanaWindow *jayatana_window_copy(JAyatanaWindow *src); 36 | void jayatana_window_free(JAyatanaWindow *window); 37 | 38 | void jayatana_window_remove_unparented(JAyatanaWindow *win); 39 | DbusmenuMenuitem *jayatana_window_get_dbusmenu_item(JAyatanaWindow *win, jint id, 40 | const char *cclabel); 41 | 42 | G_END_DECLS 43 | 44 | #endif // JAYATANAWINDOW_H 45 | -------------------------------------------------------------------------------- /subprojects/jayatana/lib/meson.build: -------------------------------------------------------------------------------- 1 | install_directory = join_paths(get_option('libdir') / 'jayatana') 2 | 3 | config = configure_file(input: 'config.h.in', output: 'config.h', configuration : data) 4 | agent_sources = files( 5 | 'com_jarego_jayatana_Agent.h', 6 | 'com_jarego_jayatana_Agent.c' 7 | ) 8 | jayatanaag = shared_library('jayatanaag', agent_sources, config, 9 | dependencies : [x11, jni], 10 | install: true, 11 | install_dir: install_directory 12 | ) 13 | 14 | jayatana_sources = files( 15 | 'com_jarego_jayatana_basic_GlobalMenu.c', 16 | 'com_jarego_jayatana_basic_GMainLoop.c', 17 | 'com_jarego_jayatana_jkey2xkey.c', 18 | 'com_jarego_jayatana_jkey2xkey.h', 19 | 'com_jarego_jayatana_jni.c', 20 | 'com_jarego_jayatana_jni.h', 21 | 'jayatana-window.c', 22 | 'jayatana-window.h', 23 | 'dbusmenu-definitions.h' 24 | ) 25 | 26 | jayatana = shared_library('jayatana', jayatana_sources, 27 | dependencies: [x11, jni, xkbcommon, dbusmenu, jayatana_jni, glib], 28 | install: true, 29 | install_dir: install_directory 30 | ) 31 | -------------------------------------------------------------------------------- /subprojects/jayatana/meson.build: -------------------------------------------------------------------------------- 1 | # cmake_policy(['VERSION', '3.6']) 2 | project('jayatana', 'java', 'c', 3 | meson_version: '>=1.0.0', 4 | version: '25.04', 5 | license: ['MIT'], 6 | default_options : ['c_std=gnu11', 'buildtype=debugoptimized']) 7 | 8 | x11 = dependency('x11', required: true) 9 | xkbcommon = dependency('xkbcommon', required : true) 10 | dbusmenu = dependency('dbusmenu-glib-0.4', version : '>=16.04.0') 11 | javac = meson.get_compiler('java') 12 | java = import('java') 13 | jni = dependency('jni', version: '>= 1.8.0', modules: ['jvm', 'awt'], required : true) 14 | glib = dependency('gio-2.0', required : true) 15 | 16 | java_ver = javac.version() 17 | version_array = java_ver.split('.') 18 | java_ver = version_array[0] 19 | if java_ver < '2.0' 20 | java_ver = version_array[1] 21 | endif 22 | 23 | data= { 24 | 'CMAKE_INSTALL_FULL_LIBDIR' : join_paths(get_option('prefix'),get_option('libdir')), 25 | 'CMAKE_INSTALL_FULL_DATAROOTDIR' : join_paths(get_option('prefix'),get_option('datadir')), 26 | 'Java_VERSION_MINOR' : java_ver, 27 | 'Java_VERSION_STRING' : javac.version() 28 | } 29 | 30 | subdir('java') 31 | subdir('lib') 32 | 33 | -------------------------------------------------------------------------------- /subprojects/registrar/config.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2018 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef CONFIG_H 20 | #define CONFIG_H 21 | 22 | #define GETTEXT_PACKAGE "@GETTEXT_PACKAGE@" 23 | #define LOCALE_DIR "@CMAKE_INSTALL_FULL_LOCALEDIR@" 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /subprojects/registrar/data/appmenu-registrar.service.in: -------------------------------------------------------------------------------- 1 | [D-BUS Service] 2 | Name=com.canonical.AppMenu.Registrar 3 | Exec=@CMAKE_INSTALL_FULL_LIBEXECDIR@/vala-panel/appmenu-registrar --reference 4 | -------------------------------------------------------------------------------- /subprojects/registrar/data/com.canonical.AppMenu.Registrar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /subprojects/registrar/data/org.valapanel.AppMenu.Registrar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /subprojects/registrar/meson.build: -------------------------------------------------------------------------------- 1 | project('registrar', 'c', 2 | meson_version: '>=0.61.0', 3 | version: '25.04', 4 | license: ['LGPL-3.0-or-later'], 5 | default_options: [ 6 | 'c_std=gnu11', 7 | 'buildtype=debugoptimized', 8 | 'warning_level=1' 9 | ]) 10 | 11 | ################## 12 | # Module imports # 13 | ################## 14 | 15 | gnome = import('gnome') 16 | i18n = import('i18n') 17 | pkgconfig = import('pkgconfig') 18 | 19 | ############### 20 | # Directories # 21 | ############### 22 | prefix = get_option('prefix') 23 | datadir = get_option('datadir') 24 | localedir = get_option('localedir') 25 | schema_dir = join_paths(get_option('datadir'), 'glib-2.0', 'schemas') 26 | libexecdir = get_option('libexecdir') 27 | installdir = join_paths(libexecdir, 'vala-panel') 28 | servicedir = join_paths(prefix,datadir, 'dbus-1','services') 29 | 30 | ################ 31 | # Dependencies # 32 | ################ 33 | glib_ver = '>=2.52.0' 34 | giounix = dependency('gio-unix-2.0', version: glib_ver) 35 | 36 | 37 | ################# 38 | # Configuration # 39 | ################# 40 | conf_data = configuration_data() 41 | conf_data.set('GETTEXT_PACKAGE', 'vala-panel-appmenu') 42 | conf_data.set('CMAKE_INSTALL_FULL_LOCALEDIR', join_paths(prefix,localedir)) 43 | 44 | config = configure_file(input : 'config.h.in', 45 | output : 'config.h', 46 | configuration : conf_data) 47 | 48 | version = vcs_tag( 49 | command : ['git','describe','--tags'], 50 | input: 'version.h.in', 51 | output: 'version.h', 52 | replace_string: '@VERSION@', 53 | ) 54 | 55 | ################# 56 | # Build # 57 | ################# 58 | 59 | marshal = gnome.genmarshal('registrar-marshal', sources: 'registrar-marshal.list') 60 | intro_c = run_command( 61 | 'cat', join_paths('data','com.canonical.AppMenu.Registrar.xml'), check: true 62 | ).stdout().strip().split('"') 63 | priv_c = run_command( 64 | 'cat', join_paths('data','org.valapanel.AppMenu.Registrar.xml'), check: true 65 | ).stdout().strip().split('"') 66 | 67 | intro_xml = ''.join('\"'.join(intro_c).split('\n')) 68 | priv_xml = ''.join('\"'.join(priv_c).split('\n')) 69 | 70 | xml = configure_file(input : 'registrar-xml.c.in', 71 | output : 'registrar-xml.c', 72 | configuration : { 73 | 'XML_CONTENTS' : intro_xml, 74 | 'PRIVATE_CONTENTS' : priv_xml 75 | }) 76 | sources = files( 77 | 'registrar-main.c', 78 | 'registrar-main.h', 79 | 'registrar-dbusmenu.c', 80 | 'registrar-dbusmenu.h' 81 | ) 82 | registrar = executable('appmenu-registrar', 83 | config, xml, sources, marshal, version, 84 | dependencies : giounix, 85 | install : true, 86 | install_dir : installdir 87 | ) 88 | 89 | service = configure_file(input : join_paths('data', 'appmenu-registrar.service.in'), 90 | output : 'com.canonical.AppMenu.Registrar.service', 91 | install_dir: servicedir, 92 | configuration : { 93 | 'CMAKE_INSTALL_FULL_LIBEXECDIR' : join_paths(prefix,libexecdir), 94 | }) 95 | -------------------------------------------------------------------------------- /subprojects/registrar/registrar-dbusmenu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2018 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef REGISTRARDBUSMENU_H 20 | #define REGISTRARDBUSMENU_H 21 | 22 | #include 23 | 24 | #define DBUSMENU_REG_IFACE "com.canonical.AppMenu.Registrar" 25 | #define DBUSMENU_REG_OBJECT "/com/canonical/AppMenu/Registrar" 26 | 27 | G_BEGIN_DECLS 28 | 29 | G_DECLARE_FINAL_TYPE(RegistrarDBusMenu, registrar_dbus_menu, REGISTRAR, DBUS_MENU, GObject) 30 | uint registrar_dbus_menu_register(RegistrarDBusMenu *object, GDBusConnection *connection, 31 | GError **error); 32 | void registrar_dbus_menu_unregister(RegistrarDBusMenu *data, GDBusConnection *con); 33 | 34 | G_END_DECLS 35 | 36 | #endif // REGISTRARDBUSMENU_H 37 | -------------------------------------------------------------------------------- /subprojects/registrar/registrar-main.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2018 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef REGISTRARMAIN_H 20 | #define REGISTRARMAIN_H 21 | 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | G_DECLARE_FINAL_TYPE(RegistrarApplication, registrar_application, REGISTRAR, APPLICATION, 27 | GApplication) 28 | 29 | RegistrarApplication *registrar_application_new(); 30 | 31 | G_END_DECLS 32 | 33 | #endif // REGISTRARMAIN_H 34 | -------------------------------------------------------------------------------- /subprojects/registrar/registrar-marshal.list: -------------------------------------------------------------------------------- 1 | VOID: UINT,STRING,STRING 2 | -------------------------------------------------------------------------------- /subprojects/registrar/registrar-xml.c.in: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2018 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | const char* introspection_xml = "@XML_CONTENTS@"; 20 | const char* private_xml = "@PRIVATE_CONTENTS@"; 21 | -------------------------------------------------------------------------------- /subprojects/registrar/version.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * vala-panel-appmenu 3 | * Copyright (C) 2018 Konstantin Pugin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef VERSION_H 20 | #define VERSION_H 21 | 22 | #define VERSION "@VERSION@" 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /vapi/config.vala.in: -------------------------------------------------------------------------------- 1 | namespace Config { 2 | public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@"; 3 | public const string LOCALE_DIR = "@CMAKE_INSTALL_PREFIX@/share/locale"; 4 | } 5 | --------------------------------------------------------------------------------