Bookmarks button/icon "without" bookmarks
Posted by: Robert
Date: February 20, 2012 05:43PM

Hello,

I need help. By pressing the "View" - "Toolbars" - "Bookmarks" button, a little icon appears. I need only this icon/button, the rest can disappear.

Look at this picture:


I tried to change somethin in "K-Meleon\defaults\settings\menus.cfg" but it didn't work. I'am sure, someone can help me with my problem.

Thanks in advance.

Re: Bookmarks button/icon "without" bookmarks
Posted by: JujuLand
Date: February 21, 2012 08:43AM

To do that, don't use Bookmarks toolbar, but just right-click on the Bookmark button already existing in main toolbar between Home and Print.

If you prefer to invert left and right-click to open and modify bookmarks, just invert it in menus.cfg

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc



Re: Bookmarks button/icon "without" bookmarks
Posted by: rodocop
Date: February 21, 2012 09:21AM

Robert,
you can resize bookmarks panel manually (sliding the right edge to the left) when it is not locked. So, even if you theme doesn't have bookmarks button on the main panel, you can leave only what you need there...

Re: Bookmarks button/icon "without" bookmarks
Posted by: Robert
Date: February 21, 2012 01:49PM

rodocop & JujuLand

Thank you very much. Both solutions are great, but the second one adds an arrow in the bar when its manually minimised (I don't really like it). I also cannot manually hide it, when this icon is placed on an empty tab bar. I would preffer the first solution, but I don't know how to switch the buttons. sad smiley

Quote
JujuLand
If you prefer to invert left and right-click to open and modify bookmarks, just invert it in menus.cfg

It would be great if you could help me with it.

In "defaults/settings/menus.cfg" I see only this:

Quote

%ifplugin bookmarks
&Bookmarks{
&Edit...=bookmarks(Edit)

&Add Page=bookmarks(Add)

Se&ttings...=bookmarks(Config)
-
bookmarks()
}
%endif


Hmmm... I can switch menu order only.

Re: Bookmarks button/icon "without" bookmarks
Posted by: JujuLand
Date: February 21, 2012 02:59PM

Sorry, I said something wrong.
It's in toolbars.cfg in k-meleon\skins\<yourskin>

Replace this:

%ifplugin bookmarks
Bookmarks{
bookmarks(Edit)|&Bookmarks
Edit Bookmarks. Right-click to view Bookmarks menu.
mainbarhot.bmp[5]
mainbarcold.bmp[5]
mainbarcold.bmp[5]
}
%endif

by this

%ifplugin bookmarks
Bookmarks{
&Bookmarks|bookmarks(Edit)
View Bookmarks menu. Right-click to Edit Bookmarks
mainbarhot.bmp[5]
mainbarcold.bmp[5]
mainbarcold.bmp[5]
}
%endif

That's all folks !!!



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc





Edited 2 time(s). Last edit at 02/21/2012 03:03PM by JujuLand.

Re: Bookmarks button/icon "without" bookmarks
Posted by: Robert
Date: February 21, 2012 07:11PM

You mean the toolbars.cfg file?

Thank you, but I tried it earlier and it doesn't work. When I switch it (to: "&Bookmarks|bookmarks(Edit)"), I can click on the icon, but nothing happens (both mouse buttons are dead). I tried it with 2 different K-Meleon versions (1.7 and 1.5.4).

Could you please look, if it works on your pc?

Re: Bookmarks button/icon "without" bookmarks
Posted by: JujuLand
Date: February 22, 2012 08:40AM

I have the same behaviour as you. It's a bug (seems that it's not possible to have a menu entry call with left-click), and I have no other solutions for now...

You have another way, without modifying toolbars.cfg:
Having a left-click during about halt a second it's the same as right-click (same for all buttons).

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc





Edited 2 time(s). Last edit at 02/22/2012 08:43AM by JujuLand.

Re: Bookmarks button/icon "without" bookmarks
Posted by: Robert
Date: February 22, 2012 09:46AM

Thanks. It may sound weird, but half a second is not an option for me (it should immediately respond). I would use "rodocops" solution, but I found another one. I changed the menu order, now it looks like this:


I have to click on this arrow for the rest of the menu, but I can live with it.

Anyway, thanks for help. P.s. Is there a way to make fonts in the address bar bigger (without using external Windows methods that could have influence on other software)?

Re: Bookmarks button/icon "without" bookmarks
Posted by: guenter
Date: February 22, 2012 07:04PM

Quote
JujuLand
I have the same behaviour as you. It's a bug (seems that it's not possible to have a menu entry call with left-click), and I have no other solutions for now...

You can use Rebar Kplugin to have a menu entry on a left click. Example marked bold.

Browser Con&figuration(24,24){
Browser Con&figuration{
%ifplugin rebarmenu
rebarmenu(Preferences)
|Compact Menu
View Preferences. Right-click to view Compact Menu.
%endif

optionshot.bmp[0]
optionscold.bmp[0]
optionscold.bmp[0]
}

But I have no idea about exact code of the example You posted.

Maybe try Your code with my changes like this

%ifplugin bookmarks
Bookmarks{
%ifplugin rebarmenu
rebarmenu(&Bookmarks)|bookmarks(Edit)
View Bookmarks menu. Right-click to Edit Bookmarks
%endif
mainbarhot.bmp[5]
mainbarcold.bmp[5]
mainbarcold.bmp[5]
}
%endif

The following string might be needed in an extra kml addition for locales support: "View Bookmarks menu. Right-click to Edit Bookmarks".

Cave. I have not tested the changes. But IMHO they should work.



Edited 2 time(s). Last edit at 02/22/2012 11:26PM by guenter.

Re: Bookmarks button/icon 'without' bookmarks
Posted by: deadlock
Date: February 22, 2012 10:34PM

Quote
Robert
Hello,

I need help. By pressing the 'View' - 'Toolbars' - 'Bookmarks' button, a little icon appears. I need only this icon/button, the rest can disappear.

Look at this picture:


I tried to change somethin in 'K-Meleon\defaults\settings\menus.cfg' but it didn't work. I'am sure, someone can help me with my problem.

Thanks in advance.

Bookmarks.dll can be modified to do that.

I've added a new pref to plugin settings in kmeleon.js:
pref('kmeleon.plugins.bookmarks.useButtons', false);

and changed sources to disable 'the rest' if useButtons is false.

Ask guenter to compile it. He has VS 2005.

--
I've added "Use Buttons" to chrome (default=enabled):





Edited 1 time(s). Last edit at 02/23/2012 12:30AM by deadlock.

Re: Bookmarks button/icon 'without' bookmarks
Posted by: guenter
Date: February 23, 2012 06:09AM

Quote
deadlock

Bookmarks.dll can be modified to do that.

I've added a new pref to plugin settings in kmeleon.js:
pref('kmeleon.plugins.bookmarks.useButtons', false);

and changed sources to disable 'the rest' if useButtons is false.

Ask guenter to compile it. He has VS 2005.

--
I've added "Use Buttons" to chrome (default=enabled):

To compile guenter would need the sources and the permission of the source owner. Which he does not have. & then guenter would need to reinstall all the VC8 compilers and tools again. smiling smiley

Apart from that if it is only a kplugin that has to be compiled?

Only the official kplugin versions are currently compiled with VC 8. Kplugins can be compiled with any C compiler. The users just have to install the needed runtimes. So the bookmarks.dll can be done with a version of VC7.1, VC8, VC9, GCC...

It is much less complicated if the user that wants to use this new feature in this new plugin gets deadlock's finished bookmarks.dll and then installs the runtimes needed by deadlock's VC 9 compiler. smiling smiley



BTW: There is a free Version of the official VC++ compiler and tools distributed / sponsored by Microsoft. And that should be sufficient to generate a currently official kplugin. smiling smiley

Visual Studio 2005 Express-Edition additionally the SP1.

So nobody has to ask guenter who is a user and no developer since all can download and use the free version.




Nobody except deadlock has this chrome. But it is nice to know that it exist and that someone still has hope that it will be used in a beta or official version. smiling smiley



Edited 2 time(s). Last edit at 02/23/2012 06:35AM by guenter.

Re: Bookmarks button/icon 'without' bookmarks
Posted by: deadlock
Date: February 23, 2012 12:34PM

@guenter
>Apart from that if it is only a kplugin that has to be compiled?
Yes

Source:
http://kmeleon.cvs.sourceforge.net/viewvc/kmeleon/k-meleon/ns_bookmarks/ns_bookmarks_utils.cpp?view=markup&pathrev=MAIN

search:
SendMessage(hWndTB, TB_SETBUTTONWIDTH, 0, MAKELONG(0, 100));

insert below the above line:
BOOL useButtons = TRUE;
kPlugin.kFuncs->GetPreference(PREF_BOOL, 'kmeleon.plugins.bookmarks.useButtons', &useButtons, &useButtons);
useButtons &= (useButtons != NULL);
if(useButtons)
{

search:
free(buttonString);
}

insert below the above lines:
}

search (first match):
SendMessage(hWndTB, TB_INSERTBUTTON, (WPARAM)0, (LPARAM)&button);

replace with:
if(useButtons)
{
SendMessage(hWndTB, TB_INSERTBUTTON, (WPARAM)0, (LPARAM)&button);
}

Re: Bookmarks button/icon 'without' bookmarks
Posted by: guenter
Date: February 23, 2012 05:23PM

.\ns_bookmarks_utils.cpp(1034) : error C2015: Zu viele Zeichen in der Konstante


I did the editing twice. Same result. You possibly have made additional changes.
Just send me or post the file(s). I hope the problem is not caused by a difference in the compilers.

It would have been more convenient if You had to send the edited file at the first place. BTW to point me at the CVS was bollocks since You knew that I have the CVS code mirrored on my PC's HDD. You taught me Yourself how to do it. smiling smiley

Apart from that You might even as well given Robert the VC9 compiled file which is good enough IMHO or generated the VC8 file with the free version of that compiler.

I pointed at both solutions in my last post. BTW I also used VC 2005 Express instead of installing the whole hogwash of the commercial version again. smiling smiley



Edited 1 time(s). Last edit at 02/23/2012 05:40PM by guenter.

Re: Bookmarks button/icon 'without' bookmarks
Posted by: deadlock
Date: February 23, 2012 05:48PM

@guenter
>.\ns_bookmarks_utils.cpp(1034) : error C2015: Zu viele Zeichen in der Konstante
Please show it +/-3 lines around it.

>You possibly have made additional changes.
No, and it is almost the same code that is used
a few lines above.

1034 BOOL useButtons = TRUE;

>I hope it is not due to a difference in the compilers.
I doubt that is the reason.
You've inserted a comment or something.

>I have the CVS code mirrored on my PC's HDD
The CVS version is visible to anyone.

>Just send me or post the file(s).
But now it's much more interesting to reproduce that error.
Can you upload the edited file to dhost?

>the VC9 compiled file which is good enough
Some kplugins, including bookmarks, depend on VS version.

Update:
>I did the editing twice.
You can compare your edit to this one in ns_bookmarks_utils.7z.



Edited 1 time(s). Last edit at 02/23/2012 06:35PM by deadlock.

Re: Bookmarks button/icon 'without' bookmarks
Posted by: guenter
Date: February 23, 2012 07:45PM

Quote
deadlock
@guenter
>.\ns_bookmarks_utils.cpp(1034) : error C2015: Zu viele Zeichen in der Konstante
Please show it +/-3 lines around it.

>You possibly have made additional changes.
No, and it is almost the same code that is used
a few lines above.

1034 BOOL useButtons = TRUE;

>I hope it is not due to a difference in the compilers.
I doubt that is the reason.
You've inserted a comment or something.

>I have the CVS code mirrored on my PC's HDD
The CVS version is visible to anyone.

>Just send me or post the file(s).
But now it's much more interesting to reproduce that error.
Can you upload the edited file to dhost?

>the VC9 compiled file which is good enough
Some kplugins, including bookmarks, depend on VS version.

Update:
>I did the editing twice.
You can compare your edit to this one in ns_bookmarks_utils.7z.

1.)

DialogUtils.cpp
Compiling...
Utils.cpp
ns_bookmarks_utils.cpp
.\ns_bookmarks_utils.cpp(1034) : error C2015: Zu viele Zeichen in der Konstante
ns_bookmarks_edit.cpp
ns_bookmarks.cpp
hot_tracking.cpp

2.) ok.

3.) No.

4.) You told me how to download it completely in one batch operation.

5.) Silly. Either Your English description was understandable or not. It would have been better to post German since I speak/read German better.

And much better send or post it so that I do not need to edit and can make mistakes in the process.

Edit: I found the error with the help of the file You uploaded.
I made the same mistake twice & deleted a line. sad smiley

6.) Yes I can.

7.) How did You test Your changes if the compiler matters in the case of the bookmarks.dll? :O

8.) I will first reboot to my other OS & use it to try to compile. tongue sticking out smiley & :drool:

The resulting bookmarks.dll has been attached to this post, it is not tested but I assume it works.



Edited 2 time(s). Last edit at 02/23/2012 08:27PM by guenter.

Attachments: bookmarks.dll (88 KB)  
Re: Bookmarks button/icon 'without' bookmarks
Posted by: deadlock
Date: February 23, 2012 08:23PM

@guenter

1)
Code not log. smiling smiley

5.)
no problem

7.)
not using VS2005 libraries

8.)
thanks in advance

Re: Bookmarks button/icon 'without' bookmarks
Posted by: guenter
Date: February 23, 2012 08:31PM

Quote
deadlock
@guenter

1)
Code not log. smiling smiley

5.)
no problem

7.)
not using VS2005 libraries

8.)
thanks in advance

1.) I did not comprehend. sad smiley

7.) ok.

8.) Welcome.

I hope the new bookmarks.dll helps - though I do not understand the good of the improvement.



Edited 1 time(s). Last edit at 02/23/2012 08:32PM by guenter.

Re: Bookmarks button/icon 'without' bookmarks
Posted by: deadlock
Date: February 23, 2012 08:59PM

@guenter
>though I do not understand the good of the improvement.

1) exactly what Robert requested
2) empty toolbar, if bookmark menu button is disabled too
3) starting point for optimizations

Any idea how to label it in preferences?

This will prevent an empty bar:

Search:
useButtons &= (useButtons != NULL);

Insert:
if(!bChevronEnabled) {useButtons = TRUE;}

Thanks



Edited 1 time(s). Last edit at 02/23/2012 09:52PM by deadlock.

Re: Bookmarks button/icon 'without' bookmarks
Posted by: guenter
Date: February 23, 2012 10:07PM

No idea I probably do not completely understand Robert which is more from Your area. tongue sticking out smiley


For me. I think it would be better to remove the bug that alain/jujuland pointed at.

So that

bookmarks(Edit)|&Bookmarks

can be exchanged to

&Bookmarks|bookmarks(Edit)

In all three bookmarking plugins. Since adding is more common than editing it would be more intuitive that way. Many people are accustomed to click the index finger as first choice. That would use the button that is already visible.

But I guess that will raise complaints by old time users. smiling smiley


I tried to work around it with the rebarmenu. I have tested my idea since it does not seem to work either. sad smiley

K-Meleon forum is powered by Phorum.