+install_data(
+ 'pixmaps/16x16/apps/roobuilder.png',
+ install_dir: get_option('datadir') + '/icons/hicolor/16x16/apps/'
+)
+
+install_data(
+ 'pixmaps/22x22/apps/roobuilder.png',
+ install_dir: get_option('datadir') + '/icons/hicolor/22x22/apps/'
+)
+
+install_data(
+ 'pixmaps/24x24/apps/roobuilder.png',
+ install_dir: get_option('datadir') + '/icons/hicolor/24x24/apps/'
+)
+
+install_data(
+ 'pixmaps/32x32/apps/roobuilder.png',
+ install_dir: get_option('datadir') + '/icons/hicolor/32x32/apps/'
+)
+
+install_data(
+ 'pixmaps/48x48/apps/roobuilder.png',
+ install_dir: get_option('datadir') + '/icons/hicolor/48x48/apps/'
+)
+
+gnome = import('gnome')
+gnome.post_install(gtk_update_icon_cache : true)
+
+
roobuilder_src = files([
'src/Builder4/About.vala',
'src/Builder4/DialogConfirm.vala',
"\tvar str = _this.searchbox.el.text.down();\t",
"\tif (j.xtype == \"Dir\") {",
"\t",
- "\t\tif (str.length < 1) {",
- "\t\t\treturn true;",
- "\t\t}",
+ "\t\t",
"\t\tfor (var i =0 ; i < j.childfiles.n_items; i++) {",
"\t\t\tvar f = (JsRender.JsRender) j.childfiles.get_item(i);",
"\t\t\tif (f.xtype != \"PlainFile\") {",
"\t\t\t\tcontinue;",
"\t\t\t}",
+ "\t\t\tif (f.content_type.contains(\"image\")) {",
+ "\t\t\t\tcontinue;",
+ "\t\t\t}",
+ "\t\t\tif (str.length < 1) {",
+ "\t\t\t\treturn true;",
+ "\t\t\t}",
"\t\t\tif (f.name.down().contains(str)) {",
"\t\t\t\treturn true;",
"\t\t\t}",
+ "\t\t\t",
"\t\t}",
+ "\t\t ",
"\t\treturn false;",
"\t}",
"\tif (j.xtype != \"PlainFile\") {",
"\t\treturn false;",
"\t}",
- "",
- "\tif (str.length < 1) {",
+ " \tif (j.content_type.contains(\"image\")) {",
+ "\t\treturn false;",
+ "\t}",
+ "\t\t\t ",
+ "\tif (str.length < 1) { // no search.",
"\t\treturn true;",
"\t}",
"\tif (j.name.down().contains(str)) {",
var str = _this.searchbox.el.text.down();
if (j.xtype == "Dir") {
- if (str.length < 1) {
- return true;
- }
+
for (var i =0 ; i < j.childfiles.n_items; i++) {
var f = (JsRender.JsRender) j.childfiles.get_item(i);
if (f.xtype != "PlainFile") {
continue;
}
+ if (f.content_type.contains("image")) {
+ continue;
+ }
+ if (str.length < 1) {
+ return true;
+ }
if (f.name.down().contains(str)) {
return true;
}
+
}
+
return false;
}
if (j.xtype != "PlainFile") {
return false;
}
-
- if (str.length < 1) {
+ if (j.content_type.contains("image")) {
+ return false;
+ }
+
+ if (str.length < 1) { // no search.
return true;
}
if (j.name.down().contains(str)) {
namespace JsRender {
int did = 1;
+
public class Dir : JsRender
{
-
+ //Gee.ArrayList<Dir> subdirs;
public Dir(Project.Project project, string path) {
base( project, path);
//add_project_arguments(['--vapidir', vapi_dir], language: 'vala')
var targets = "";
+ var icons = "";
+ var desktops = "";
foreach(var cg in this.project.compilegroups.values) {
targets += this.addTarget(cg);
+ icons += this.addIcons(cg);
+ desktops += this.addDesktop(cg);
}
var data =
$addvapidir
+$icons
+
+$desktops
$targets
";
-
+GLib.debug("write meson : %s" , data);
// removed.. add_project_arguments(['--enable-gobject-tracing', '--fatal-warnings'], language: 'vala')
try {
return str;
}
- }
+
+ string addIcons(GtkValaSettings cg)
+ {
+
+ var ret = "";
+ string[] sizes = { "16x16", "22x22","24x24","32x32", "48x48" } ;
+ foreach(var size in sizes) {
+ GLib.debug("looking for on : %s" , "pixmaps/" + size + "/apps/" + cg.name + ".png");
+ var img = this.project.getByRelPath( "pixmaps/" + size + "/apps/" + cg.name + ".png");
+ if (img == null) {
+ continue;
+ }
+ var path = img.relpath;
+ ret += @"
+install_data(
+ '$path',
+ install_dir: get_option('datadir') + '/icons/hicolor/$size/apps/'
+)
+";
+ }
+ if (ret == "") {
+ return "";
+ }
+ ret += "
+gnome = import('gnome')
+gnome.post_install(gtk_update_icon_cache : true)
+";
+ return ret;
+ }
+
+ string addDesktop(GtkValaSettings cg)
+ {
+ // we could actually generate this!?!
+ var d = this.project.getByRelPath( cg.name + ".desktop");
+ if (d == null) {
+ return "";
+ }
+ var path = d.relpath;
+ return @"
+install_data(
+ '$path',
+ install_dir : get_option('datadir') + '/applications/''
+)
+";
+
+}
}
\ No newline at end of file
subs.add(dir + "/" + fn);
continue;
}
- if (Regex.match_simple("\\.(o|cache|gif|jpg|png|gif|out|stamp|~)$", fn)) { // object..
+ if (Regex.match_simple("\\.(o|cache|out|stamp|~)$", fn)) { // object..
continue;
}
if (Regex.match_simple("^(config1.builder|a.out|stamp-h1|depcomp|config.log|config.status)$", fn)) { // object..