2 * This file is part of Resources Organizer.
4 * Copyright (C) 2014 Nikita Zlobin <nick87720z@gmail.com>
6 * Resource Organizer is free software: you can redistribute it and/or
7 * modify it under the terms of the GNU 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.
11 * Resource Organizer is distributed in the hope that it will be
12 * useful, 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.
16 * You should have received a copy of the GNU General Public License
17 * along with Resource Organizer. If not, see
18 * <http://www.gnu.org/licenses/>.
23 #include "ladspa/search.h"
24 #include "dssi/search.h"
25 #include "lv2/search.h"
34 void gErrorReport (GError
** err
)
36 fprintf (stderr
, "gtkbuilder: %s\n", (*err
)->message
);
41 void escape_text (char ** t
)
44 *t
= g_markup_escape_text (*t
, -1);
48 void resourceAdd (Resource
* r
)
50 GtkTreeIter i
, *prev_i
= NULL
;
51 gtk_list_store_insert_after (list
, & i
, prev_i
);
52 gtk_list_store_set (list
, & i
,
54 COL_TYPE_NAME
, r
->type
->name
,
55 COL_AUTHOR
, r
->author
,
60 if (asprintf (& tip
, "%s\n"
69 fprintf (stderr
, "ERROR: Failed to asprintf() tooltip text\n");
73 gtk_list_store_set (list
, & i
, COL_TIP
, tip
, -1);
79 void setResourceHandler (ResourceHandlerFunc cb_func
)
81 ladspaResourceHandler (cb_func
);
82 dssiResourceHandler (cb_func
);
83 lv2ResourceHandler (cb_func
);
86 int main (int argc
, char ** argv
)
88 if (ui_init (argc
, argv
) != 0) return 0;
90 setResourceHandler (resourceAdd
);
95 g_object_unref (G_OBJECT (builder
));
96 gtk_widget_show_all (win
);