Skip to content

Commit

Permalink
Change notnew to work
Browse files Browse the repository at this point in the history
  • Loading branch information
jun7 committed Nov 14, 2024
1 parent 6a2c92a commit 48d26d3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion general.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static Conf dconf[] = {
{DSET , "msgcolor" , "#c07"},
{DSET , "msgmsec" , "600"},
{DSET , "keepfavicondb" , "false"},
{DSET , "newwinhandle" , "normal", "ignore | back | normal"},
{DSET , "newwinhandle" , "normal", "notnew | ignore | back | normal"},
{DSET , "scriptdialog" , "true"},

//loading
Expand Down
13 changes: 12 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4003,7 +4003,18 @@ static GtkWidget *createcb(Win *win)
{
char *handle = getset(win, "newwinhandle");

if (!g_strcmp0(handle, "notnew")) showmsg(win, "notnew no longer works");
if (!g_strcmp0(handle, "notnew"))
if (win->link)
{
showmsg(win, "Create window is canceled");
openuri(win, win->link);
}
else
{
Win *new = newwin(NULL, win, win, 0);
showmsg(new, "Link URL was not set");
return new->kitw;
}
else if (!g_strcmp0(handle, "ignore")) showmsg(win, "Create window is ignored") ;
else if (!g_strcmp0(handle, "back" )) return newwin(NULL, win, win, 1)->kitw;
else /*normal*/ return newwin(NULL, win, win, 0)->kitw;
Expand Down

0 comments on commit 48d26d3

Please sign in to comment.