diff --git a/source/libublsettings-gtk3.c b/source/libublsettings-gtk3.c index d05e753..c1ba2bf 100644 --- a/source/libublsettings-gtk3.c +++ b/source/libublsettings-gtk3.c @@ -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 \ No newline at end of file diff --git a/source/libublsettings-gtk3.h b/source/libublsettings-gtk3.h index 7b85550..7dbedbb 100644 --- a/source/libublsettings-gtk3.h +++ b/source/libublsettings-gtk3.h @@ -5,6 +5,7 @@ #include #include +#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(); \ No newline at end of file +int yon_calendar_get_last_date(); + +config_str yon_resource_open_file(const char *path, int *size); \ No newline at end of file