Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu override #244

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
388045b
Add detailed steps to install dependencies for Ubuntu 18.04
mdmayfield Aug 14, 2018
9c9ca00
Added evince override of menubar
rilian-la-te Aug 24, 2018
2c71f27
appmenu-gtk-module: do not set menubars for appmenu-capable programs.
rilian-la-te Aug 24, 2018
48d0adf
appmenu-gtk-module: update formatting.
rilian-la-te Aug 24, 2018
54b2d85
CI: add releases
rilian-la-te Sep 1, 2018
38f5297
Merge branch 'master' into 'menu-override'
rilian-la-te Sep 1, 2018
8434cea
jayatana: Update LICENSE
rilian-la-te Sep 3, 2018
81afe2e
jayatana: enabling instructions. For #262
rilian-la-te Sep 5, 2018
4ada292
Update README.md
rilian-la-te Sep 5, 2018
2ccb11d
Remove double negation
friday Sep 5, 2018
21f5618
Merge branch 'patch-1' into 'master'
rilian-la-te Sep 5, 2018
bfb7bdf
appmenu-gtk-module: remove parentheses on hijack function. For #269.
rilian-la-te Sep 15, 2018
26eb568
hijack: use all function pointers directly. For #259
rilian-la-te Sep 21, 2018
4d9f5b5
all: fixed formatting
rilian-la-te Oct 19, 2018
45f3bc7
jayatana: use deterministic method to generate IDs.
rilian-la-te Oct 19, 2018
f156c88
CI: replace no longer maintained image
rilian-la-te Oct 19, 2018
6dd6e81
CI: add pacman -Sy
rilian-la-te Oct 19, 2018
a460461
valapanel: use new applets name in 0.5
rilian-la-te Nov 5, 2018
426e0d0
Merge branch 'detailed-compile-guide' into 'master'
rilian-la-te Nov 5, 2018
2371fe8
all: add Wnck matcher for Wnck backend.
rilian-la-te Nov 7, 2018
6a5274c
Use fixed matcher
rilian-la-te Nov 7, 2018
6d30c29
Merge branch 'master' of gitlab.com:vala-panel-project/vala-panel-app…
rilian-la-te Nov 7, 2018
db7cef8
Create first Hungarian language
Nov 22, 2018
5bd43fb
Merge branch 'patch-1' into 'master'
rilian-la-te Nov 22, 2018
0477392
all: move applets to separate dir.
rilian-la-te Jan 11, 2019
bd7d33b
Merge branch 'master' of https://gitlab.com/vala-panel-project/vala-
rilian-la-te Jan 11, 2019
5dd5a62
CMake: compile resources in applets.
rilian-la-te Jan 13, 2019
c573803
Update README.md
rilian-la-te Jan 20, 2019
a4945a6
CI: use correct arch image
rilian-la-te Feb 8, 2019
9ad0d6a
Merge branch 'master' of https://gitlab.com/vala-panel-project/vala-p…
rilian-la-te Feb 8, 2019
f97ac5b
CMake: fix build with new vala
rilian-la-te Mar 7, 2019
d96530c
CMake: check vala version correctly.
rilian-la-te Mar 8, 2019
d27fe64
Merge branch 'master' of gitlab.com:vala-panel-project/vala-panel-app…
rilian-la-te Mar 8, 2019
1add847
Update CMakeLists.txt
rilian-la-te Mar 19, 2019
617b23c
item: fix warning.
rilian-la-te Mar 23, 2019
e11b24c
ImporterModel: always preload DBusMenu.
rilian-la-te Mar 23, 2019
d52f44c
Merge branch 'master' of gitlab.com:vala-panel-project/vala-panel-app…
rilian-la-te Mar 23, 2019
b573d39
valapanel: set background widget correctly.
rilian-la-te Mar 24, 2019
5a2d630
appmenu-gtk-module: plug memleak.
rilian-la-te Apr 4, 2019
698a2df
vala-panel: use constructed function.
rilian-la-te Apr 7, 2019
8f4818b
Update .gitlab-ci.yml
rilian-la-te Apr 16, 2019
d4cc4d0
data:Renamed desktop files
rilian-la-te Apr 24, 2019
203fad4
Merge branch 'master' of gitlab.com:vala-panel-project/vala-panel-app…
rilian-la-te Apr 24, 2019
7e8f851
all: fix translations
rilian-la-te Apr 24, 2019
ab92683
Meson: non-functional now
rilian-la-te Apr 24, 2019
6d7f1ef
lib: use vapi as sources
rilian-la-te Apr 24, 2019
9cc6f68
meson: functional applet and registrar
rilian-la-te Apr 24, 2019
d9ea251
appmenu-gtk-module: @only configure for pkgconfig
rilian-la-te Apr 24, 2019
38b98f1
C: fixed compiler warnings
rilian-la-te Apr 24, 2019
838adc1
appmenu-gtk-module: use pkg-config cmake way.
rilian-la-te Apr 24, 2019
fedf943
appmenu-gtk-module: correct systemd service
rilian-la-te Apr 25, 2019
f8edda2
appmenu-gtk-module: fix CMake formatting
rilian-la-te Apr 25, 2019
8867008
appmenu-gtk-module: meson as functional as CMake
rilian-la-te Apr 25, 2019
6ffa82d
meson: fix build on new Vala
rilian-la-te Apr 25, 2019
18a30f2
importer: fix compiler warning.
rilian-la-te Apr 25, 2019
d63a78b
lib: Fix Make generator. Fixes #291
rilian-la-te Apr 25, 2019
62e52b8
Merge branch 'master' of https://gitlab.com/vala-panel-project/vala-p…
rilian-la-te Apr 25, 2019
135c289
appmenu-gtk-module: fix compiler warnings
rilian-la-te Apr 25, 2019
3d5fc6a
meson: define registrar version
rilian-la-te Apr 25, 2019
df53ff9
Added evince override of menubar
rilian-la-te Aug 24, 2018
eb91b0b
appmenu-gtk-module: do not set menubars for appmenu-capable programs.
rilian-la-te Aug 24, 2018
01e67c0
appmenu-gtk-module: update formatting.
rilian-la-te Aug 24, 2018
b0aae26
Merge branch 'menu-override' of https://gitlab.com/vala-panel-project…
rilian-la-te Apr 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,4 @@ docs/reference/unity-gtk-module/unity-gtk-module.prerequisites
docs/reference/unity-gtk-module/unity-gtk-module.signals
libtool
data/appmenu.desktop.plugin.in
data/*.desktop.in
CMakeLists.txt.user
16 changes: 10 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ cache:
- _ccache/

build-applet-main:
image: pritunl/archlinux
image: archlinux/base
stage: build
script:
- pacman -Sy
- pacman -S --noconfirm libwnck3 gtk3 vala cmake git base-devel clang ninja xfce4-panel mate-panel budgie-desktop gobject-introspection bamf
- git clone https://gitlab.com/vala-panel-project/cmake-vala.git
- cd cmake-vala && cmake . -DCMAKE_INSTALL_PREFIX=/usr -GNinja && ninja install && cd .. && rm -rf cmake-vala
Expand All @@ -30,9 +31,10 @@ build-applet-main:


build-gtk-module-main:
image: pritunl/archlinux
image: archlinux/base
stage: build
script:
- pacman -Sy
- pacman -S --noconfirm gtk3 gtk2 cmake base-devel ninja git
- git clone https://gitlab.com/vala-panel-project/cmake-vala.git
- cd cmake-vala && cmake . -DCMAKE_INSTALL_PREFIX=/usr -GNinja && ninja install && cd .. && rm -rf cmake-vala
Expand All @@ -48,9 +50,10 @@ build-gtk-module-main:


build-registrar-main:
image: pritunl/archlinux
image: archlinux/base
stage: build
script:
- pacman -Sy
- pacman -S --noconfirm glib2 cmake base-devel ninja python git
- git clone https://gitlab.com/vala-panel-project/cmake-vala.git
- cd cmake-vala && cmake . -DCMAKE_INSTALL_PREFIX=/usr -GNinja && ninja install && cd .. && rm -rf cmake-vala
Expand All @@ -66,9 +69,10 @@ build-registrar-main:


build-jayatana-main:
image: pritunl/archlinux
image: archlinux/base
stage: build
script:
- pacman -Sy
- pacman -S --noconfirm glib2 libdbusmenu-glib cmake base-devel ninja libxkbcommon jdk8-openjdk git
- git clone https://gitlab.com/vala-panel-project/cmake-vala.git
- cd cmake-vala && cmake . -DCMAKE_INSTALL_PREFIX=/usr -GNinja && ninja install && cd .. && rm -rf cmake-vala
Expand All @@ -84,10 +88,10 @@ build-jayatana-main:


release-main:
image: pritunl/archlinux
image: alpine:edge
stage: release
script:
- pacman -S --noconfirm python3 python-pip
- apk add --no-cache python3
- pip3 install gitlab_release
- python3 -m gitlab_release ${PRIVATE_TOKEN} build/vala-panel*.tar.xz subprojects/jayatana/build/jayatana*.tar.xz subprojects/registrar/build/appmenu-registrar*.tar.xz subprojects/appmenu-gtk-module/build/appmenu-gtk-module*.tar.xz
only:
Expand Down
16 changes: 7 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ set(CORE_PACKAGES
libbamf3
posix)

if(${VALA_VERSION} VERSION_LESS "0.43.91")
set(ADDONS_PACKAGE gio-addons-2.0)
endif()

#set requred variables
set(TARGET_GLIB ${GLIB_VERSION_MAJOR}.${GLIB_VERSION_MINOR})
include(CMakeDependentOption)
Expand All @@ -102,26 +106,20 @@ cmake_dependent_option(ENABLE_MATE "Enable mate-panel Integration" ON
add_feature_info(MATE ENABLE_MATE "MATE Panel Integration")

find_package(PEAS 1.14 COMPONENTS PEAS)
pkg_check_modules(VALAPANEL vala-panel IMPORTED_TARGET)
pkg_check_modules(VP_NEW vala-panel>=0.4.50 QUIET)
pkg_check_modules(VALAPANEL vala-panel>=0.4.50 IMPORTED_TARGET)
pkg_check_modules(BUDGIE budgie-1.0 IMPORTED_TARGET)

cmake_dependent_option(ENABLE_VALAPANEL "Enable Vala Panel Integration" ON
"VALAPANEL_FOUND" OFF)
if (VP_NEW_FOUND)
add_feature_info(ValaPanel ENABLE_VALAPANEL "Vala Panel Integration - 0.5.x")
set(NEW_DEFINE -D NEW)
set(NEW_IFACE ON)
else()
add_feature_info(ValaPanel ENABLE_VALAPANEL "Vala Panel Integration - 0.4.x")
endif()
add_feature_info(ValaPanel ENABLE_VALAPANEL "Vala Panel Integration - 0.5.x")

cmake_dependent_option(ENABLE_BUDGIE "Enable budgie-desktop plugin" ON
"BUDGIE_FOUND; PEAS_FOUND" OFF)
add_feature_info(Budgie ENABLE_BUDGIE "Budgie Desktop Integration")

add_subdirectory(subprojects)
ADD_SUBDIRECTORY(lib)
ADD_SUBDIRECTORY(applets)
add_subdirectory(data)
add_subdirectory(po)

Expand Down
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ Vala Panel Application Menu is a Global Menu applet for use with Vala Panel, xfc
* GTK+ (>= 3.22.0)
* valac (>= 0.24.0)
* libbamf (>=0.5.0)

---
Compilation Instructions
Compilation Instructions (Non-Distribution-Specific)
---
* Install all the required dependencies listed above. These packages may have different names depending on your distribution. Please see [below](#dependency-packages) for the package names on some specific distributions (i.e. Ubuntu).
* Clone this repository to your `home` directory by typing:
`git clone https://github.com/rilian-la-te/vala-panel-appmenu.git` then `cd` into the directory.
`git clone https://gitlab.com/vala-panel-project/vala-panel-appmenu.git` then `cd` into the directory.
* type `git submodule init && git submodule update` to download the submodules (this will download the cmake and dbus-menu submodules you see in the repository, above)
* type `mkdir build && cd build` (to keep things tidy)
* You're **almost** ready to run `cmake`. First, review the following flags:
Expand Down Expand Up @@ -104,6 +105,21 @@ export _JAVA_OPTIONS="${_JAVA_OPTIONS} -javaagent:/usr/share/java/jayatanaag.jar
export JAYATANA_FORCE=1
```

---
Dependency Packages
---
**Ubuntu 18.04**

*All variants require:* `git build-essential cmake bamfdaemon libdbusmenu-glib-dev libgtk2.0-dev gobject-introspection libbamf3-dev libdbus-glib-1-dev libffi-dev libgirepository1.0-dev libpeas-dev libstartup-notification0-dev libwnck-3-dev libwnck-common libwnck22 libxml2-utils libxres-dev libvala-0.40-0 valac valac-0.40-vapi`

*Ubuntu Budgie also needs:* `budgie-core-dev gir1.2-budgie-1.0 libbudgie-plugin0 libbudgietheme0 libraven0`

*Ubuntu MATE also needs:* `libmate-panel-applet-dev`

*Xubuntu also needs:* `exo-utils libexo-1-0 libexo-2-0 libexo-common libexo-helpers libgarcon-1-0 libgarcon-common libxfce4panel-2.0-4 libxfce4panel-2.0-dev libxfce4ui-1-0 libxfce4ui-2-0 libxfce4ui-common libxfce4util7 libxfce4util-common libxfce4util-dev libxfconf-0-2 libxfconf-0-dev xfce4-panel xfce4-panel-dev xfconf`

*Vala Panel also needs:* `libvalapanel0 libvalapanel-dev`

Author
===
* Athor <ria.freelander@gmail.com>
131 changes: 131 additions & 0 deletions applets/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
include_directories(${CMAKE_BINARY_DIR}/lib)
set(PLUGIN_VALA_FILES
valapanel-plugin-appmenu.vala
xfce4-plugin-appmenu.vala
mate-plugin-appmenu.vala
budgie-plugin-appmenu.vala
)
add_custom_target(plugin-files-ide SOURCES ${PLUGIN_VALA_FILES})
glib_compile_resources(RESOURCES
source
../lib/libappmenu.gresource.xml
)

##########
# XFCE Part
##########
if (ENABLE_XFCE)
vala_precompile(VALA_C_XFCE appmenu-xfce
xfce4-plugin-appmenu.vala
PACKAGES
${CORE_PACKAGES}
vala-panel-appmenu
${WNCK_PACKAGES}
libxfce4panel-2.0
libxfconf-0
OPTIONS
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_CURRENT_BINARY_DIR}
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/libappmenu.gresource.xml
${WNCK_DEFINE}
)
add_library (appmenu-xfce MODULE
${VALA_C_XFCE}
${RESOURCES}
)
target_link_libraries (appmenu-xfce appmenu-core PkgConfig::XFCE)
# Install plugin stuffs
install(TARGETS appmenu-xfce DESTINATION ${CMAKE_INSTALL_LIBDIR}/xfce4/panel/plugins)
endif()
##########
# ValaPanel Part
##########
if(ENABLE_VALAPANEL)
vala_precompile(VALA_C_VALAPANEL appmenu-valapanel
valapanel-plugin-appmenu.vala
PACKAGES
${CORE_PACKAGES}
vala-panel-appmenu
${WNCK_PACKAGES}
vala-panel
libpeas-1.0
OPTIONS
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_CURRENT_BINARY_DIR}
--vapidir=${CMAKE_BINARY_DIR}/dbusmenu
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/libappmenu.gresource.xml
${WNCK_DEFINE}
)

# Build library for plugins and application
add_library (appmenu-valapanel MODULE
${VALA_C_VALAPANEL}
${RESOURCES}
)
set_target_properties(appmenu-valapanel PROPERTIES
OUTPUT_NAME appmenu)
target_link_libraries (appmenu-valapanel appmenu-core PkgConfig::VALAPANEL)
# Install plugin stuffs
install(TARGETS appmenu-valapanel DESTINATION ${CMAKE_INSTALL_LIBDIR}/vala-panel/applets)
endif()
##########
# Budgie Panel Part
##########
if(ENABLE_BUDGIE)
vala_precompile(VALA_C_BUDGIE appmenu-budgie
budgie-plugin-appmenu.vala
PACKAGES
${CORE_PACKAGES}
vala-panel-appmenu
${WNCK_PACKAGES}
budgie-1.0
libpeas-1.0
OPTIONS
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_CURRENT_BINARY_DIR}
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/libappmenu.gresource.xml
${WNCK_DEFINE}
)

# Build library for plugins and application
add_library (appmenu-budgie MODULE
${VALA_C_BUDGIE}
${RESOURCES}
)
target_link_libraries (appmenu-budgie appmenu-core PEAS::PEAS PkgConfig::BUDGIE)
# Install plugin stuffs
install(TARGETS appmenu-budgie DESTINATION ${CMAKE_INSTALL_LIBDIR}/budgie-desktop/plugins/budgie-vala-panel-appmenu-plugin)
endif()
##########
# MATE Part
##########
if (ENABLE_MATE)
vala_precompile(VALA_C_MATE appmenu-mate
mate-plugin-appmenu.vala
PACKAGES
${CORE_PACKAGES}
vala-panel-appmenu
${WNCK_PACKAGES}
libmatepanelapplet-4.0
OPTIONS
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_CURRENT_BINARY_DIR}
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/libappmenu.gresource.xml
${WNCK_DEFINE}
)
add_library (appmenu-mate MODULE
${VALA_C_MATE}
${RESOURCES}
)
target_link_libraries (appmenu-mate appmenu-core PkgConfig::MATE)
# Install plugin stuffs
install(TARGETS appmenu-mate DESTINATION ${CMAKE_INSTALL_LIBDIR}/mate-panel)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ public class GlobalMenuApplet: Applet
public override Widget? get_settings_ui()
{
var dlg = new Gtk.Box(Gtk.Orientation.VERTICAL,0);
var entry = new CheckButton.with_label(_("Use Compact mode (all menus in application menu)"));
var entry = new CheckButton.with_label(dgettext(Config.GETTEXT_PACKAGE,"Use Compact mode (all menus in application menu)"));
this.settings.bind(Key.COMPACT_MODE,entry,"active",SettingsBindFlags.DEFAULT);
dlg.pack_start(entry,false,false,2);
entry = new CheckButton.with_label(_("Use bold application name"));
entry = new CheckButton.with_label(dgettext(Config.GETTEXT_PACKAGE,"Use bold application name"));
this.settings.bind(Key.BOLD_APPLICATION_NAME,entry,"active",SettingsBindFlags.DEFAULT);
dlg.pack_start(entry,false,false,2);
dlg.show();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ private bool factory_callback(MatePanel.Applet applet, string iid)
Gtk.Action a = new Gtk.Action("AppMenuAppletPreferences",N_("_Preferences"),null,Gtk.Stock.PREFERENCES);
a.activate.connect(()=>
{
var dlg = new Gtk.Dialog.with_buttons( _("Configure AppMenu"), layout.get_toplevel() as Window,
var dlg = new Gtk.Dialog.with_buttons( dgettext(Config.GETTEXT_PACKAGE,"Configure AppMenu"), layout.get_toplevel() as Window,
DialogFlags.DESTROY_WITH_PARENT,
null );
Gtk.Box dlg_vbox = dlg.get_content_area() as Gtk.Box;
var entry = new CheckButton.with_label(_("Use Compact mode (all menus in application menu)"));
var entry = new CheckButton.with_label(dgettext(Config.GETTEXT_PACKAGE,"Use Compact mode (all menus in application menu)"));
settings.bind(Key.COMPACT_MODE,entry,"active",SettingsBindFlags.DEFAULT);
dlg_vbox.pack_start(entry,false,false,2);
entry.show();
entry = new CheckButton.with_label(_("Use bold application name"));
entry = new CheckButton.with_label(dgettext(Config.GETTEXT_PACKAGE,"Use bold application name"));
settings.bind(Key.BOLD_APPLICATION_NAME,entry,"active",SettingsBindFlags.DEFAULT);
dlg_vbox.pack_start(entry,false,false,2);
entry.show();
Expand Down
39 changes: 39 additions & 0 deletions applets/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
if vala_panel_found
vp_applets_libdir = vp.get_pkgconfig_variable('applets_dir')
vp_sources = files('valapanel-plugin-appmenu.vala')
vpp = shared_module('appmenu', vp_sources, libres,
dependencies: [appmenu_dep, vp],
install: true,
install_dir: vp_applets_libdir
)
endif

if mate_found
mate_applet_libdir = join_paths(mp.get_pkgconfig_variable('libdir'),'mate-panel')
mp_sources = files('mate-plugin-appmenu.vala')
mpp = shared_module('appmenu-mate', mp_sources, libres,
dependencies: [appmenu_dep, mp],
install: true,
install_dir: mate_applet_libdir
)
endif

if xfce_found
xfce_applet_libdir = join_paths(xp.get_pkgconfig_variable('libdir'),'xfce4','panel','plugins')
xp_sources = files('xfce4-plugin-appmenu.vala')
xpp = shared_module('appmenu-xfce', xp_sources, libres,
dependencies: [appmenu_dep, xc,xp],
install: true,
install_dir: xfce_applet_libdir
)
endif

if budgie_found
budgie_applet_libdir = join_paths(bp.get_pkgconfig_variable('libdir'),'budgie-desktop','plugins','budgie-genmon-plugin')
bp_sources = files('budgie-plugin-appmenu.vala')
bpp = shared_module('appmenu-budgie', bp_sources, libres,
dependencies: [appmenu_dep, bp],
install: true,
install_dir: budgie_applet_libdir
)
endif