Adde new function for loading files from resources

pull/19/head
parent 6a878f0e09
commit fe24a6b466

@ -1357,4 +1357,14 @@ void yon_calendar_popover_open(GtkEntry *TargetEntry,GtkWidget *PopupTarget){
g_signal_connect(G_OBJECT(popover),"closed",G_CALLBACK(yon_on_popover_closed),NULL);
}
config_str yon_resource_open_file(const char *path, int *size){
config_str parsed = NULL;
char *modules;
gsize sz;
GFile *file = g_file_new_for_uri(path);
g_file_load_contents(file,NULL,&modules,&sz,NULL,NULL);
parsed = yon_char_parse(modules,size,"\n");
return parsed;
}
#endif

@ -5,6 +5,7 @@
#include <gtk/gtkx.h>
#include <libublsettings.h>
#define _(String) gettext(String)
#ifdef __GTK_H__
#ifdef VTE_INCLUDE
@ -495,4 +496,6 @@ void yon_calendar_set_date_orientation(int orientation);
void yon_calendar_popover_open(GtkEntry *TargetEntry,GtkWidget *PopupTarget);
int yon_calendar_get_last_date();
int yon_calendar_get_last_date();
config_str yon_resource_open_file(const char *path, int *size);
Loading…
Cancel
Save