Skip to content

Commit

Permalink
Fixed build for applets
Browse files Browse the repository at this point in the history
  • Loading branch information
rilian-la-te committed May 9, 2017
1 parent 2c76bab commit eb46cfa
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 14 deletions.
26 changes: 13 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
# Vala
find_package (Vala REQUIRED)
include (ValaVersion)
ensure_vala_version ("0.34" MINIMUM)
ensure_vala_version ("0.32" MINIMUM)
include (ValaPrecompile)

add_definitions(-DVALA_VERSION="${VALA_SHORTVER}")
Expand All @@ -96,24 +96,24 @@ add_definitions(-Wall -Wno-unused # Vala loves to create variables
find_package (PkgConfig)

pkg_check_modules (A
gtk+-3.0>=3.22)
gtk+-3.0>=3.20)

pkg_check_modules (B
glib-2.0>=2.50)
glib-2.0>=2.48)

pkg_check_modules (C
gio-2.0>=2.50
gio-2.0>=2.48
)

pkg_check_modules (GLIB_OLD QUIET
gio-2.0<=2.52
)

pkg_check_modules (D
gio-unix-2.0>=2.50)
gio-unix-2.0>=2.48)

pkg_check_modules (E
gthread-2.0>=2.50)
gthread-2.0>=2.48)

pkg_check_modules (F
libpeas-1.0>=1.2)
Expand All @@ -122,17 +122,17 @@ pkg_check_modules (G
libpeas-gtk-1.0>=1.2)

pkg_check_modules (H
gmodule-2.0>=2.50)
gmodule-2.0>=2.48)

pkg_check_modules (CORE REQUIRED QUIET
gtk+-3.0>=3.22
glib-2.0>=2.50
gio-2.0>=2.50
gio-unix-2.0>=2.50
gthread-2.0>=2.50
gtk+-3.0>=3.20
glib-2.0>=2.48
gio-2.0>=2.48
gio-unix-2.0>=2.48
gthread-2.0>=2.48
libpeas-1.0>=1.2
libpeas-gtk-1.0>=1.2
gmodule-2.0>=2.50)
gmodule-2.0>=2.48)

set(CORE_PACKAGES
gtk+-3.0
Expand Down
2 changes: 1 addition & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@ install (TARGETS ${LIBNAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT bin)

# Install lib stuffs
install (FILES ${CMAKE_BINARY_DIR}/${APPNAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ COMPONENT dev)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}.vapi DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/vala/vapi/ COMPONENT dev)
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${APPNAME}.vapi DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/vala/vapi/ COMPONENT dev)
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${APPNAME}.deps DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/vala/vapi/ COMPONENT dev)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}-compat.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vala-panel/ COMPONENT dev RENAME ${APPNAME}.h)
108 changes: 108 additions & 0 deletions lib/vala-panel.vapi
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
-/* vala-panel.vapi generated by valac 0.34.0, do not modify. */
-
-namespace ValaPanel {
- namespace Data {
- [CCode (cheader_filename = "vala-panel.h")]
- public const string EXPANDABLE;
- [CCode (cheader_filename = "vala-panel.h")]
- public const string ONE_PER_SYSTEM;
- }
- [CCode (cheader_filename = "vala-panel.h", cname = "PanelApplet")]
- public abstract class Applet : Gtk.EventBox {
- public Applet (ValaPanel.Toplevel top, GLib.Settings? s, uint num);
- public abstract void create ();
- public void init_background ();
- public void menu_position_func (Gtk.Menu m, out int x, out int y, out bool push);
- public void popup_position_helper (Gtk.Widget popup, out int x, out int y);
- public void set_popup_position (Gtk.Widget popup);
- public void show_config_dialog ();
- public virtual void update_context_menu (ref GLib.Menu parent_menu);
- public Gtk.Widget background_widget { get; set; }
- public uint number { get; construct; }
- public GLib.Settings? settings { get; construct; }
- public ValaPanel.Toplevel toplevel { get; construct; }
- }
- [CCode (cheader_filename = "vala-panel.h")]
- public class Toplevel : Gtk.ApplicationWindow {
- public const string[] anames;
- public const string[] gnames;
- protected override bool button_release_event (Gdk.EventButton e);
- public void configure (string page);
- protected override bool configure_event (Gdk.EventConfigure e);
- [CCode (returns_floating_reference = true)]
- public static ValaPanel.Toplevel create (Gtk.Application app, string name, int mon, Gtk.PositionType e);
- protected override void destroy ();
- public GLib.List<weak Gtk.Widget> get_applets_list ();
- protected override void get_preferred_height (out int min, out int nat);
- protected override void get_preferred_width (out int min, out int nat);
- [CCode (returns_floating_reference = true)]
- public static ValaPanel.Toplevel? load (Gtk.Application app, string config_file, string config_name);
- protected override bool map_event (Gdk.EventAny e);
- protected override void size_allocate (Gtk.Allocation alloc);
- public bool autohide { get; internal set; }
- public string background_color { owned get; internal set; }
- public string background_file { get; internal set; }
- public bool dock { get; internal set; }
- public Gtk.PositionType edge { get; internal set construct; }
- public string font { get; internal set; }
- public uint font_size { get; internal set; }
- public bool font_size_only { get; internal set; }
- public string foreground_color { owned get; internal set; }
- public int height { get; internal set; }
- public uint icon_size { get; internal set; }
- public bool is_dynamic { get; internal set; }
- public int monitor { get; internal set construct; }
- public Gtk.Orientation orientation { get; }
- public int panel_margin { get; internal set; }
- public string panel_name { get; internal construct; }
- public uint round_corners_size { get; internal set; }
- public bool show_hidden { get; internal set; }
- public bool strut { get; internal set; }
- public bool use_background_color { get; internal set; }
- public bool use_background_file { get; internal set; }
- public bool use_font { get; internal set; }
- public bool use_foreground_color { get; internal set; }
- public int width { get; internal set; }
- }
- [CCode (cheader_filename = "vala-panel.h")]
- public interface AppletConfigurable {
- [CCode (returns_floating_reference = true)]
- public abstract Gtk.Dialog get_config_dialog ();
- }
- [CCode (cheader_filename = "vala-panel.h")]
- public interface AppletMenu {
- public abstract void show_system_menu ();
- }
- [CCode (cheader_filename = "vala-panel.h")]
- public interface AppletPlugin : Peas.ExtensionBase {
- public abstract ValaPanel.Applet get_applet_widget (ValaPanel.Toplevel toplevel, GLib.Settings? settings, uint number);
- }
- [CCode (cheader_filename = "vala-panel.h")]
- public static void setup_icon (Gtk.Image img, GLib.Icon icon, ValaPanel.Toplevel? top = null, int size = -1);
- [CCode (cheader_filename = "vala-panel.h")]
- public static void setup_icon_button (Gtk.Button btn, GLib.Icon? icon = null, string? label = null, ValaPanel.Toplevel? top = null);
- [CCode (cheader_filename = "vala-panel.h")]
- public static void start_panels_from_dir (Gtk.Application app, string dirname);
-}
-namespace Config {
- [CCode (cheader_filename = "vala-panel.h")]
- public const string DATADIR;
- [CCode (cheader_filename = "vala-panel.h")]
- public const string GETTEXT_PACKAGE;
- [CCode (cheader_filename = "vala-panel.h")]
- public const string INSTALL_PREFIX;
- [CCode (cheader_filename = "vala-panel.h")]
- public const string LOCALE_DIR;
- [CCode (cheader_filename = "vala-panel.h")]
- public const string PKGDATADIR;
- [CCode (cheader_filename = "vala-panel.h")]
- public const string PLUGINS_DATA;
- [CCode (cheader_filename = "vala-panel.h")]
- public const string PLUGINS_DIRECTORY;
- [CCode (cheader_filename = "vala-panel.h")]
- public const string RELEASE_NAME;
- [CCode (cheader_filename = "vala-panel.h")]
- public const string VERSION;
- [CCode (cheader_filename = "vala-panel.h")]
- public const string VERSION_INFO;
-}

0 comments on commit eb46cfa

Please sign in to comment.