You are not logged in.

#501 2010-08-24 12:11:09

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: jumanji - a web browser

the most efficient way if you find any regression is to create an account and fill a bug report on pwmt.org. it takes a few minutes and I'm sure it's way more easy for neldoreth to handle. he's doing the hard work (with others) so let's help him (them) with 5 minutes of our time.

Offline

#502 2010-08-24 12:19:57

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: jumanji - a web browser

hut wrote:

I don't see a way to disable/toggle javascript. Does anyone know how to do that?

@cf8: same problem here. ;(

https://bbs.archlinux.org/viewtopic.php … 18#p793718 ?

Offline

#503 2010-08-24 17:00:07

akira86
Member
Registered: 2009-01-16
Posts: 119

Re: jumanji - a web browser

cf8 wrote:

yeah. jumanji is a great all-in-one but simple and light browser. also it uses some of vimprobable code.
but i wonder why it has this speed regression...

I am looking what can cause that...

I don't think it's that but : did you compile jumanji with CFLAGS='-O2' (or maybe O3) ??

EDIT : another thing :
try to comment the following line in jumanji.c :

g_signal_connect(G_OBJECT(wv),  "event",                                G_CALLBACK(cb_wv_event),                    NULL);

it will disable mouse special command .. but it's actualy quasi unused...

Last edited by akira86 (2010-08-24 17:08:54)

Offline

#504 2010-08-24 19:10:59

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: jumanji - a web browser

bangkok_manouel wrote:
hut wrote:

I don't see a way to disable/toggle javascript. Does anyone know how to do that?

@cf8: same problem here. ;(

https://bbs.archlinux.org/viewtopic.php … 18#p793718 ?

Thank you D:
but... oh no, it seems that with javascript disabled, hints don't work. sad


akira86 wrote:

EDIT : another thing :
try to comment the following line in jumanji.c :

g_signal_connect(G_OBJECT(wv),  "event",                                G_CALLBACK(cb_wv_event),                    NULL);

it will disable mouse special command .. but it's actualy quasi unused...

This speeds up things alot, and also fixes the statusbar. big_smile (when pointing the mouse over a link, its address was displayed for a fraction of a second only, then overridden with the address of the web page)

Last edited by hut (2010-08-24 19:17:54)


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#505 2010-08-24 19:30:35

akira86
Member
Registered: 2009-01-16
Posts: 119

Re: jumanji - a web browser

hut wrote:

it seems that with javascript disabled, hints don't work. sad

which is normal since "hints" use javascript ... I don't know if it is possible to "allow only jumanji javascript function"..

hut wrote:
akira86 wrote:

EDIT : another thing :
try to comment the following line in jumanji.c :

g_signal_connect(G_OBJECT(wv),  "event",                                G_CALLBACK(cb_wv_event),                    NULL);

it will disable mouse special command .. but it's actualy quasi unused...

This speeds up things alot

Glad this work .. I will send a patch and discusse with neldoreth to ask him to remove the "mouse special command" feature.

hut wrote:

and also fixes the statusbar. big_smile (when pointing the mouse over a link, its address was displayed for a fraction of a second only, then overridden with the address of the web page)

I didn't noticed that before you say it... that's cool ... another bugfix :-)

I hope neldoreth will accept this patch.

Last edited by akira86 (2010-08-24 19:34:07)

Offline

#506 2010-08-24 19:49:01

cf8
Member
From: Russia
Registered: 2008-10-21
Posts: 83

Re: jumanji - a web browser

@akira86: thx! this helps! smile i wonder if i can buy you a can of beer or smthng? wink

i also want to know is there a way to make an alt+number hotkeys to switch tabs?

Offline

#507 2010-08-24 20:20:49

akira86
Member
Registered: 2009-01-16
Posts: 119

Re: jumanji - a web browser

cf8 wrote:

@akira86: thx! this helps! smile i wonder if i can buy you a can of beer or smthng? wink

:-) ... it works better now that's sufficiant for me

cf8 wrote:

i also want to know is there a way to make an alt+number hotkeys to switch tabs?

Yes it's possible ... but for instance quite boring to configure :

add to "Shortcut shortcuts[] = {" :

{GDK_MOD1_MASK,                  GDK_1,             sc_nav_tabs,          NORMAL,       { SPECIFIC,               "1" } },
{GDK_MOD1_MASK,                  GDK_2,             sc_nav_tabs,          NORMAL,       { SPECIFIC,               "2" } },
...3
etc.

Maybe there is a simpler solution...

I can't test it by myself since gnome take "Alt+1" to switch to first desktop... but it should work.

For my part I use :

{GDK_CONTROL_MASK,   GDK_Page_Down,     sc_nav_tabs,          NORMAL,       { NEXT,               NULL } },
{GDK_CONTROL_MASK,   GDK_Page_Up,       sc_nav_tabs,          NORMAL,       { PREVIOUS,           NULL } },

and, in buffer_commands :

{"^[0-9]+g$",    bcmd_nav_tabs,          { SPECIFIC,          NULL } },

Last edited by akira86 (2010-08-24 20:30:27)

Offline

#508 2010-08-24 21:44:49

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: jumanji - a web browser

akira86 wrote:
hut wrote:
akira86 wrote:

EDIT : another thing :
try to comment the following line in jumanji.c :

g_signal_connect(G_OBJECT(wv),  "event",                                G_CALLBACK(cb_wv_event),                    NULL);

it will disable mouse special command .. but it's actualy quasi unused...

This speeds up things alot

Glad this work .. I will send a patch and discusse with neldoreth to ask him to remove the "mouse special command" feature.

Wah, no need to scrap the feature entirely. The problem is just that the function gets called in *any* event, calling update_status() way too often.
Here's a more conservative solution: Bind the callback to the event "button-release-event" rather than "event":

g_signal_connect(G_OBJECT(wv),  "button-release-event",                 G_CALLBACK(cb_wv_event),                    NULL);

"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#509 2010-08-24 21:55:34

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: jumanji - a web browser

JumNav got even better! Get version 0.4 from here. Remember to patch jumanji.c in the latest git with the patch given here.

Note: There is a nasty positioning bug in this script. To fix it you have to change a few lines. See this post with the fix.

Changelog
Version 0.4
- More element types will be handled properly if selected ("clicked").
- Positioning algorithm reworked.
  Labels and element links will now be (almost) correctly placed on
  most pages.
- Element links will be positioned in the last selected hinting group.
- Element links keep their position when hinting mode was toggled on and
  off again.
- Viewport follows current element link.
- Vieport follows hinting group if all elements of it were outside
  when the group has been partly selected.
- Element link colors optimized.
- Numbers can be excluded from optimal hint label strings
  ("useNumbersInOptimal" option).

Some known problems
- There are still pages where the hinting labels will not be properly
  positioned initially. In most cases they can made to "snap in" if
  you switch into navigation mode and toggle raw mode on and off again.
  These positions will be kept after switching back to hinting mode.

- When switching back from navigation mode to hinting mode the jumanji
  input buffer would be out of sync. Thus all hinting labels will be
  shown again with that label recently selected in navigation mode
  being highlighted, however. You can select this one as usual.

- On pages with a real lot of linkable elements JumNav will not respond
  immediately on initial call. It can take several seconds (example: up to
  10 seconds expired on a page sporting 2137 links using a 2 GHz Athlon)
  until the hints will be shown.
  Currently JumNav cannot notify the user about the hinting labels building
  progress, so if in doubt about a page please be patient.

Unfortunately it is huge (1813 lines total) but it is heavily commented. Some stuff to read if you are interested.

There is one more feature to come. Word content matching will be implemented so there are three interchangeably usable navigation modes:
- selecting hinting labels
- navigating forward and back
and soon
- word match contents of element text.

Last edited by bernarcher (2010-08-26 13:06:58)


To know or not to know ...
... the questions remain forever.

Offline

#510 2010-08-24 22:20:24

akira86
Member
Registered: 2009-01-16
Posts: 119

Re: jumanji - a web browser

hut wrote:

Here's a more conservative solution: Bind the callback to the event "button-release-event" rather than "event":

g_signal_connect(G_OBJECT(wv),  "button-release-event",                 G_CALLBACK(cb_wv_event),                    NULL);

Yes, it's better that way.
But personally I think that's not a very useful feature ... (even by default it doesn't do nothing).

@bernarcher did you ask neldoreth to apply your patch and include your script in the main project ?

EDIT : do you think the mouse array in config.h should be kept or not ?? I recall that it doesn't do nothing by default ...

Last edited by akira86 (2010-08-24 23:16:11)

Offline

#511 2010-08-25 06:12:39

cf8
Member
From: Russia
Registered: 2008-10-21
Posts: 83

Re: jumanji - a web browser

akira86 wrote:

add to "Shortcut shortcuts[] = {" :
{GDK_MOD1_MASK,                  GDK_1,             sc_nav_tabs,          NORMAL,       { SPECIFIC,               "1" } },
{GDK_MOD1_MASK,                  GDK_2,             sc_nav_tabs,          NORMAL,       { SPECIFIC,               "2" } },
...3
etc.
Maybe there is a simpler solution...

Unfortunately this doesnt help sad With this lines in config.h, when i press alt+number - jumanji just crashs.

I think this is because sc_nav_tabs just calls bcmd_nav_tabs with NULL in place of the first argument:

void
sc_nav_tabs(Argument* argument)
{
  bcmd_nav_tabs(NULL, argument);
}

and bcmd_nav_tabs function looks like this:

void
bcmd_nav_tabs(char* buffer, Argument* argument)
{
  int current_tab     = gtk_notebook_get_current_page(Jumanji.UI.view);
  int number_of_tabs  = gtk_notebook_get_n_pages(Jumanji.UI.view);
  int step            = 1;

  if(argument->n == PREVIOUS)
    step = -1;

  int new_tab = (current_tab + step) % number_of_tabs;

  if(argument->n == SPECIFIC)
  {
    int digit_end = 0;
    while(g_ascii_isdigit(buffer[digit_end]))
      digit_end = digit_end + 1;

    char* number = g_strndup(buffer, digit_end);
    new_tab      = atoi(number) - 1;
    g_free(number);
  }

  gtk_notebook_set_current_page(Jumanji.UI.view, new_tab);
  gtk_widget_grab_focus(GTK_WIDGET(GET_CURRENT_TAB_WIDGET()));

  update_status();
}

I actualy dont see a profit of making a separate sc_nav_tabs function.

Last edited by cf8 (2010-08-25 06:19:03)

Offline

#512 2010-08-25 06:23:43

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: jumanji - a web browser

There is a nasty bug in JumNav v. 0.4 in that the viewport always jumps to the top when the hinting labels are to be shown the first time. To cure this, replace on line 1229:

            if (curLabelNum < 0)
                curLabelNum = 0,

(which is faulty in itself because of the typo sad )
by

            if (curLabelNum < 0) {
                visibility = inViewport( labelsOverlays[i] );
                if ( visibility > -1 && visibility <= 3 ) 
                    curLabelNum = i;
            }

Apologies for the inconvenience.

akira86 wrote:

@bernarcher did you ask neldoreth to apply your patch and include your script in the main project ?

I don't think it would be accepted as jumanji will get its own hinting mechanism sooner or later. JumNav is basically thought as an intermediary until the hinting branch will be released.

Although JumNav apparently got its own life now... wink

Last edited by bernarcher (2010-08-25 06:32:19)


To know or not to know ...
... the questions remain forever.

Offline

#513 2010-08-25 07:40:18

neldoreth
Member
From: AT
Registered: 2009-02-01
Posts: 212

Re: jumanji - a web browser

Hello,

The performance problem has been solved (latest git commit): The cb_wv_event callback has been dropped (Thanks for the patch), but the update of the scroll value in the statusbar is now managed somewhere else.

bernarcher wrote:

I don't think it would be accepted as jumanji will get its own hinting mechanism sooner or later. JumNav is basically thought as an intermediary until the hinting branch will be released.

Although JumNav apparently got its own life now... wink

Since this is the best working solution right now (We still have to wait a bit for WebKit for the hinting branch), we could update the jumanji.c for your script (if we have too) and put it on the wiki if you want to.

Best regards


pwmt.org : programs with movie titles

Offline

#514 2010-08-25 09:06:57

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: jumanji - a web browser

neldoreth wrote:
bernarcher wrote:

I don't think it would be accepted as jumanji will get its own hinting mechanism sooner or later. JumNav is basically thought as an intermediary until the hinting branch will be released.

Although JumNav apparently got its own life now... wink

Since this is the best working solution right now (We still have to wait a bit for WebKit for the hinting branch), we could update the jumanji.c for your script (if we have too) and put it on the wiki if you want to

I would be glad to have the patch applied in the git repository. This patch mainly provides some basic communication means with the global buffer whithout (hopefully) interfering with other tasks. So it would probably ease other communication tasks as well.

As an aside, there is as yet no possibility for the script to force the jumanji global buffer to a certain value. At least I found no easy, non interfering way to do so. But as currently set up JumNav can live with this.

I will have a look at the wiki. If I get to it I'd gladly put a JumNav introduction there the next days.

Is it possible to include the JumNav script into the git repository? At least until the hinting branch will be released.


To know or not to know ...
... the questions remain forever.

Offline

#515 2010-08-25 10:25:29

pielgrzym
Member
Registered: 2010-02-18
Posts: 49

Re: jumanji - a web browser

Hi,

I really love your browser, but I can't open any new window (doh wink). Neither with w/W nor with :winopen. They all open in new tabs. I have latest git version sad

Offline

#516 2010-08-25 10:31:23

cf8
Member
From: Russia
Registered: 2008-10-21
Posts: 83

Re: jumanji - a web browser

pielgrzym wrote:

Hi,

I really love your browser, but I can't open any new window (doh wink). Neither with w/W nor with :winopen. They all open in new tabs. I have latest git version sad

g33k wrote:

Try
set single_instance 0
in ~/.config/jumanji/jumanjirc.

Offline

#517 2010-08-25 10:36:46

pielgrzym
Member
Registered: 2010-02-18
Posts: 49

Re: jumanji - a web browser

cf8, that helped smile thanks a lot smile

Offline

#518 2010-08-25 11:37:17

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: jumanji - a web browser

Just pulled in the latest git and now the bookmark access doesn't work. Hit o (for :open),then I type in bbs and then hit Tab (to get access to the bookmarks.

However, this takes the cursor into the first available text box on the page. My home page is gmail ...so it takes me into the username -- to log into gmail sad

Is there any other way to access the bookmarks?


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#519 2010-08-25 12:55:01

neldoreth
Member
From: AT
Registered: 2009-02-01
Posts: 212

Re: jumanji - a web browser

Hello,

Inxsible wrote:

Just pulled in the latest git and now the bookmark access doesn't work. Hit o (for :open),then I type in bbs and then hit Tab (to get access to the bookmarks.

Works here

Inxsible wrote:

However, this takes the cursor into the first available text box on the page. My home page is gmail ...so it takes me into the username -- to log into gmail sad

I am sorry, but I cant follow you.

Inxsible wrote:

Is there any other way to access the bookmarks?

No, only over commands that use the cc_open completion.

Best regards


pwmt.org : programs with movie titles

Offline

#520 2010-08-25 14:01:20

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: jumanji - a web browser

Inxsible wrote:

Just pulled in the latest git and now the bookmark access doesn't work. Hit o (for :open),then I type in bbs and then hit Tab (to get access to the bookmarks.

I experience the same since august 22nd. As soon as I hit Tab on an :open command the input line seemingly becomes unresponsive, even to Esc. Emptying the line with BS and then pressing Return causes jumanji trying to load a seemingly random pattern. However, I did not try harder to find out, being busy with JumNav.

Time to file a bug report, I think.

Last edited by bernarcher (2010-08-25 14:02:28)


To know or not to know ...
... the questions remain forever.

Offline

#521 2010-08-25 14:56:31

cf8
Member
From: Russia
Registered: 2008-10-21
Posts: 83

Re: jumanji - a web browser

Wuh, i've finally made a patch for switching to specific tab by an alt+num hotkeys smile

Here it is:

diff --git a/jumanji.c b/jumanji.c
index 0e57738..833bc34 100644
--- a/jumanji.c
+++ b/jumanji.c
@@ -1770,7 +1770,17 @@ sc_nav_history(Argument* argument)
 void
 sc_nav_tabs(Argument* argument)
 {
-  bcmd_nav_tabs(NULL, argument);
+    if (argument->n == SPECIFIC) 
+    {
+        int new_tab = atoi(argument->data) - 1;
+        gtk_notebook_set_current_page(Jumanji.UI.view, new_tab);
+        gtk_widget_grab_focus(GTK_WIDGET(GET_CURRENT_TAB_WIDGET()));
+        update_status();
+    }
+    else 
+    {
+        bcmd_nav_tabs(NULL, argument);
+    }
 }
 
 void

also need to add this lines :

  /* alt+number hotkeys */
  {GDK_ALT_MASK,       GDK_1,             sc_nav_tabs,        NORMAL,       { SPECIFIC,           "1" } },
  {GDK_ALT_MASK,       GDK_2,             sc_nav_tabs,        NORMAL,       { SPECIFIC,           "2" } },
  {GDK_ALT_MASK,       GDK_3,             sc_nav_tabs,        NORMAL,       { SPECIFIC,           "3" } },
  {GDK_ALT_MASK,       GDK_4,             sc_nav_tabs,        NORMAL,       { SPECIFIC,           "4" } },
  {GDK_ALT_MASK,       GDK_5,             sc_nav_tabs,        NORMAL,       { SPECIFIC,           "5" } },
  {GDK_ALT_MASK,       GDK_6,             sc_nav_tabs,        NORMAL,       { SPECIFIC,           "6" } },
  {GDK_ALT_MASK,       GDK_7,             sc_nav_tabs,        NORMAL,       { SPECIFIC,           "7" } },
  {GDK_ALT_MASK,       GDK_8,             sc_nav_tabs,        NORMAL,       { SPECIFIC,           "8" } },
  {GDK_ALT_MASK,       GDK_9,             sc_nav_tabs,        NORMAL,       { SPECIFIC,           "9" } },

to Shortcut shortcuts[] array in config.h

...need to make a feature request at pwmt.org

Offline

#522 2010-08-25 16:12:12

akira86
Member
Registered: 2009-01-16
Posts: 119

Re: jumanji - a web browser

Are you sure you use GDK_ALT_MASK ?? it doesn't compile for me ... maybe you mean  GDK_MODE1_MASK (I am not sure..)

Offline

#523 2010-08-25 16:26:51

portix
Member
Registered: 2009-01-13
Posts: 757

Re: jumanji - a web browser

akira86 wrote:

Are you sure you use GDK_ALT_MASK ?? it doesn't compile for me ... maybe you mean  GDK_MODE1_MASK (I am not sure..)

It has to be GDK_MOD1_MASK.

Offline

#524 2010-08-25 16:30:07

cf8
Member
From: Russia
Registered: 2008-10-21
Posts: 83

Re: jumanji - a web browser

akira86 wrote:

Are you sure you use GDK_ALT_MASK ?? it doesn't compile for me ... maybe you mean  GDK_MODE1_MASK (I am not sure..)

Yes. Sorry, i've missed a

#define GDK_ALT_MASK GDK_MOD1_MASK

smile

Offline

#525 2010-08-25 16:32:21

akira86
Member
Registered: 2009-01-16
Posts: 119

Re: jumanji - a web browser

@cf8 maybe following may be preferable :

 void
 sc_nav_tabs(Argument* argument)
 {
-  bcmd_nav_tabs(NULL, argument);
+  bcmd_nav_tabs(argument->data, argument);
}

I didn't test it ... but you get the idea...

Offline

Board footer

Powered by FluxBB