Skip to content

Commit

Permalink
All: Fixed compilation for 0.3.60 AFAIK.
Browse files Browse the repository at this point in the history
  • Loading branch information
rilian-la-te committed May 8, 2017
1 parent b9e038c commit 3ba9c30
Show file tree
Hide file tree
Showing 19 changed files with 78 additions and 38 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ set(CORE_PACKAGES
libpeas-gtk-1.0
gmodule-2.0
gio-addons-2.0
posix
cvalapanel)
posix)

set(PACKGAGE_CFLAGS ${CORE_CFLAGS})
set(PACKAGE_LINK_DIRS ${CORE_LIBRARY_DIRS})
Expand Down
4 changes: 2 additions & 2 deletions applets/core/clock/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ PACKAGES
vala-panel
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--target-glib=2.40
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_NAME}.gresource.xml
--thread
)
Expand Down
4 changes: 2 additions & 2 deletions applets/core/dirmenu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ PACKAGES
vala-panel
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--target-glib=2.40
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_NAME}.gresource.xml
--thread
)
Expand Down
3 changes: 2 additions & 1 deletion applets/core/kbled/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ PACKAGES
vala-panel
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--target-glib=2.40
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_NAME}.gresource.xml
--thread
${GTK314_DEFINE}
Expand Down
6 changes: 3 additions & 3 deletions applets/core/launchbar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ vala_precompile(VALA_C ${PLUGIN_NAME}
vala-panel
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--target-glib=2.40
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_NAME}.gresource.xml
--thread
)
Expand Down
2 changes: 1 addition & 1 deletion applets/core/menumodel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PACKAGES
vala-panel
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--target-glib=2.44
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_NAME}.gresource.xml
Expand Down
2 changes: 1 addition & 1 deletion applets/core/menumodel/menu-maker.vala
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ namespace MenuMaker
}
else
{
menu.append("%s %s".printf(_("Vala Panel"),Config.VERSION),"foo.improper-action");
menu.append("%s %s".printf(_("Vala Panel"),PanelConfig.VERSION),"foo.improper-action");
menu.append_section(null,MenuMaker.create_applications_menu (false));
var section = new GLib.Menu();
section.append_submenu(_("Places"),MenuMaker.create_places_menu());
Expand Down
4 changes: 2 additions & 2 deletions applets/core/separator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ PACKAGES
vala-panel
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--target-glib=2.40
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_NAME}.gresource.xml
--thread
)
Expand Down
4 changes: 2 additions & 2 deletions applets/drawing/cpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ PACKAGES
posix
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--target-glib=2.40
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_NAME}.gresource.xml
--thread
)
Expand Down
4 changes: 2 additions & 2 deletions applets/drawing/monitors/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ PACKAGES
posix
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--target-glib=2.40
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_NAME}.gresource.xml
--thread
)
Expand Down
4 changes: 2 additions & 2 deletions applets/wnck/buttons/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ PACKAGES
gdk-x11-3.0
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--target-glib=2.40
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_NAME}.gresource.xml
--thread
)
Expand Down
4 changes: 2 additions & 2 deletions applets/wnck/deskno/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ PACKAGES
gdk-x11-3.0
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--target-glib=2.40
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_NAME}.gresource.xml
--thread
)
Expand Down
4 changes: 2 additions & 2 deletions applets/wnck/icontasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ PACKAGES
gdk-x11-3.0
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--target-glib=2.40
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_NAME}.gresource.xml
--thread
)
Expand Down
4 changes: 2 additions & 2 deletions applets/wnck/pager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ PACKAGES
gdk-x11-3.0
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--target-glib=2.40
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_NAME}.gresource.xml
--thread
)
Expand Down
2 changes: 1 addition & 1 deletion applets/wnck/tasklist-xfce/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ PACKAGES
libwnck-3.0
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--vapidir=${CMAKE_CURRENT_SOURCE_DIR}
--target-glib=2.50
Expand Down
4 changes: 2 additions & 2 deletions applets/wnck/tasklist/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ PACKAGES
libwnck-3.0
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--target-glib=2.40
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_NAME}.gresource.xml
--thread
)
Expand Down
4 changes: 2 additions & 2 deletions applets/wnck/wincmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ PACKAGES
gdk-x11-3.0
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_BINARY_DIR}/vapi
--target-glib=2.40
--target-glib=2.50
--gresources=${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_NAME}.gresource.xml
--thread
)
Expand Down
8 changes: 4 additions & 4 deletions applets/wnck/xembed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ GENERATE_HEADER
xembed-internal
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_CURRENT_SOURCE_DIR}
--target-glib=2.40
--target-glib=2.50
--thread
)
set(VALA_FILES ${PLUGIN_NAME}.vala)
Expand All @@ -28,9 +28,9 @@ PACKAGES
gdk-x11-3.0
OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--vapidir=${CMAKE_BINARY_DIR}/lib
--vapidir=${CMAKE_SOURCE_DIR}/lib
--vapidir=${CMAKE_CURRENT_SOURCE_DIR}
--target-glib=2.40
--target-glib=2.50
--thread
)
#####
Expand Down
46 changes: 43 additions & 3 deletions lib/vala-panel.vapi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using GLib;
using Gtk;

[CCode (cheader_filename = "config.h", upper_case_cprefix="")]
[CCode (cheader_filename = "config.h", lower_case_cprefix="", cprefix="")]
namespace PanelConfig {
public const string DATADIR;
public const string GETTEXT_PACKAGE;
Expand All @@ -21,6 +21,45 @@ namespace ValaPanel.Configurator
GLib.Settings settings, ...);
public static Widget generic_config_widget(GLib.Settings settings, ...);
}
[CCode (cheader_filename = "css.h", cprefix = "",lower_case_cprefix="css_")]
namespace PanelCSS
{
public void apply_with_class(Gtk.Widget w, string css, string klass, bool add);
public void toggle_class(Widget w, string klass, bool apply);
public CssProvider? add_css_to_widget(Widget w, string css);
public Gtk.CssProvider? apply_from_file_to_app_with_provider(string file);
public string apply_from_file_to_app(string file);
public void apply_from_resource(Gtk.Widget w, string file, string klass);
public string generate_background(string? name, Gdk.RGBA color);
public string generate_font_size(int size);
public string generate_font_color(Gdk.RGBA color);
public string generate_font_label(double size ,bool bold);
public string generate_flat_button(Gtk.Widget w, Gtk.PositionType e);
}
[CCode (cprefix="")]
namespace MenuMaker
{
[CCode (cheader_filename="menu-maker.h",cname="ATTRIBUTE_DND_SOURCE")]
public const string ATTRIBUTE_DND_SOURCE;
[CCode (cheader_filename="menu-maker.h",cname="ATTRIBUTE_TOOLTIP")]
public const string ATTRIBUTE_TOOLTIP;
[CCode (cheader_filename="launcher.h",cname="activate_menu_launch_id")]
public static void activate_menu_launch_id(SimpleAction? action, Variant? param, void* user_data);
[CCode (cheader_filename="launcher.h",cname="activate_menu_launch_uri")]
public static void activate_menu_launch_uri(SimpleAction? action, Variant? param, void* user_data);
[CCode (cheader_filename="launcher.h",cname="activate_menu_launch_command")]
public static void activate_menu_launch_command(SimpleAction? action, Variant? param, void* user_data);
[CCode (cheader_filename="launcher.h",cname="vala_panel_launch")]
public static bool launch(DesktopAppInfo info, GLib.List<string>? uris, Gtk.Widget parent);
[CCode (cheader_filename="launcher.h",cname="vala_panel_launch_with_context")]
public static bool launch_with_context(DesktopAppInfo info, AppLaunchContext cxt, GLib.List<string>? uris);
[CCode (cheader_filename="launcher.h",cname="vala_panel_get_default_for_uri")]
public static AppInfo get_default_for_uri(string uri);
[CCode (cheader_filename="menu-maker.h",cname="append_all_sections")]
public static void append_all_sections(GLib.Menu menu1, GLib.MenuModel menu2);
[CCode (cheader_filename="menu-maker.h",cname="apply_menu_properties")]
public static void apply_menu_properties(List<unowned Widget> w, MenuModel menu);
}
[CCode (cheader_filename = "applet-widget.h")]
namespace ValaPanel.AppletAction
{
Expand Down Expand Up @@ -69,7 +108,6 @@ namespace ValaPanel {
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; }
Expand All @@ -79,7 +117,7 @@ namespace ValaPanel {
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 Gravity panel_gravity { get;}
public uint round_corners_size { get; internal set; }
public bool strut { get; internal set; }
public bool use_background_color { get; internal set; }
Expand Down Expand Up @@ -115,6 +153,8 @@ namespace ValaPanel {
public static void scale_button_set_value_labeled(ScaleButton b, int val);
[CCode (cheader_filename="definitions.h")]
public static Gtk.Orientation orient_from_gravity(Gravity gravity);
[CCode (cheader_filename="definitions.h")]
public static Gtk.PositionType edge_from_gravity(Gravity gravity);
[CCode (cheader_filename="definitions.h")]
public static Gtk.Orientation invert_orient(Gtk.Orientation orient);
[Compact]
Expand Down

0 comments on commit 3ba9c30

Please sign in to comment.