Compare commits
3 Commits
b7f9e16dc9
...
da73ac6ff0
Author | SHA1 | Date |
---|---|---|
Romain de Laage | da73ac6ff0 | |
Romain de Laage | 05393d854b | |
Romain de Laage | 4ac8cc78d7 |
64
readme.gmi
64
readme.gmi
|
@ -15,3 +15,67 @@ All the source code is on my self hosted Gitea instance.
|
|||
|
||||
* I'm not a Gtk professionnal, my program might be incorrect
|
||||
* You can't register on my Gitea, you must send me your patch by email (you can use romain.delaage@rdelaage.ovh)
|
||||
|
||||
```
|
||||
,▄▄███████▄
|
||||
|
||||
,▄████▄ ,▄█████████████
|
||||
|
||||
████████▄ ▓███████████████
|
||||
|
||||
╓▄╓ ▐████████▌ .████████████████▀
|
||||
|
||||
██████p ║████████M ████████████████▀
|
||||
|
||||
║███████ ▐████████ ▐███████████████
|
||||
|
||||
║███████ ▀██████ ▐█████████████└
|
||||
|
||||
,▄▄▄ ███████ ▀███▀ ██████████▀-
|
||||
|
||||
▓█████▄ ▀████▀ ▀█████▀└
|
||||
|
||||
███████⌐ ▀▀└
|
||||
|
||||
╙██████▌ ,▄▄▄▄▄▄▄█▄▄▄▄▄▄,
|
||||
|
||||
▀████▌ ▄▄██████████████████████▄▄
|
||||
|
||||
▀▀▀ ▄██████████████████████████████
|
||||
|
||||
▄█████████████████████████████████▌
|
||||
|
||||
▄███████████████████████████████████▌
|
||||
|
||||
╓████████████████████████████████████▀
|
||||
|
||||
╓████████████████████████████████████"
|
||||
|
||||
██████████████████████████████████▀└
|
||||
|
||||
║███████████████████████████████▀╙
|
||||
|
||||
║████████████████████████████▀└
|
||||
|
||||
████████████████████████▀▀
|
||||
|
||||
▀████████████████████▀└
|
||||
|
||||
██████████████████▀ ▄▄▄▄██▄▄▄
|
||||
|
||||
████████████████ ▄████████████
|
||||
|
||||
▀██████████████ ████████████▌
|
||||
|
||||
██████████████▄ ╓████████████
|
||||
|
||||
"███████████████▄▄▄▄████████████▀
|
||||
|
||||
▀███████████████████████████└
|
||||
|
||||
╙▀█████████████████████▀└
|
||||
|
||||
╙▀██████████████▀└
|
||||
|
||||
└"╙╙╙"-
|
||||
```
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "../include/gemgui.h"
|
||||
|
||||
void linkAction (GtkWidget *widget, gpointer data);
|
||||
extern char links[1024][20];
|
||||
|
||||
void
|
||||
addH1 (GtkWidget *root,
|
||||
|
|
|
@ -24,6 +24,7 @@ int parseFile (char *path);
|
|||
#else
|
||||
|
||||
extern GtkWidget *render;
|
||||
extern char links[1024][20];
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -32,6 +33,9 @@ parseFile (char *path)
|
|||
{
|
||||
FILE *fileToParse = fopen (path, "r");
|
||||
char line[4096];
|
||||
#ifndef TESTGEMPARSE
|
||||
int linkNumber = 0;
|
||||
#endif
|
||||
|
||||
if (fileToParse == NULL)
|
||||
{
|
||||
|
@ -125,12 +129,16 @@ parseFile (char *path)
|
|||
while (beginText < size && line[beginText] == ' ')
|
||||
beginText++;
|
||||
|
||||
#ifndef TESTGEMPARSE
|
||||
strcpy (links[linkNumber], line + beginUrl);
|
||||
#endif
|
||||
|
||||
//If not text, text = url
|
||||
if (beginText == size)
|
||||
#ifdef TESTGEMPARSE
|
||||
addLink (line + beginUrl, line + beginUrl);
|
||||
addLink (line + beginUrl, links[linkNumber]);
|
||||
#else
|
||||
addLink (render, line + beginUrl, line + beginUrl);
|
||||
addLink (render, links[linkNumber], links[linkNumber]);
|
||||
#endif
|
||||
else
|
||||
{
|
||||
|
@ -140,9 +148,13 @@ parseFile (char *path)
|
|||
#ifdef TESTGEMPARSE
|
||||
addLink (line + beginUrl, line + beginText);
|
||||
#else
|
||||
addLink (render, line + beginUrl, line + beginText);
|
||||
addLink (render, links[linkNumber], line + beginText);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef TESTGEMPARSE
|
||||
linkNumber++;
|
||||
#endif
|
||||
}
|
||||
else if (size > 3 && line[0] == '`' && line[1] == '`' && line[2] == '`')
|
||||
{
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
GtkEntryBuffer *pathBarContent = NULL;
|
||||
GtkWidget *render = NULL;
|
||||
GtkWidget *scrollbar = NULL;
|
||||
char links[1024][20];
|
||||
|
||||
static void
|
||||
loadPage (const char *link)
|
||||
|
|
Loading…
Reference in New Issue