Re: [lazarus] Menu icons have disappeared!

2007-12-15 Thread Giuliano Colla

Paul Ishenin ha scritto:

Giuliano Colla wrote:
With last svn update almost all menu icons have suddenly disappeared 
with gtk1. They still show if IDE is compiled for gtk2 or qt.

Platform is Linux, fpc 2.2.0.
A trace back shows that the problem occurred between r. 13325 which 
was ok, and 13328 which wasn't.

problems fixed in r13334



Yes, Now it's OK. Thanks a lot.
Giuliano

--
Giuliano Colla

Whenever people agree with me, I always feel I must be wrong (O. Wilde)

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Menu icons have disappeared!

2007-12-14 Thread Giuliano Colla
With last svn update almost all menu icons have suddenly disappeared 
with gtk1. They still show if IDE is compiled for gtk2 or qt.

Platform is Linux, fpc 2.2.0.
A trace back shows that the problem occurred between r. 13325 which was 
ok, and 13328 which wasn't.


Regards

Giuliano


_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Menu

2007-07-17 Thread German C. Basisty
Good people:

 

Does anybody know where can I find documentation about creating and managing
menu? I mean, like a standard Windows app main menu or something. 

Best regards

 

German

  



Re: [lazarus] Menu

2007-07-17 Thread Tom York
I do not know where you can find information on the subject, but can 
give you a few tips. You can attach submenu's to the parent forms menu by:


-- begin code
*procedure TForm1.CreateSubMenu(Sender: TObject);
*var
Sub, SubItems: TMenuItem;
begin
// Create a sub menu
Sub := TMenuItem.Create(Menu);
Sub.Caption := 'SubMenu';
// Create items on the submenu
SubItems := TMenuItem.Create(Sub);
SubItems.Caption := 'Remove This Menu';
SubItems.OnClick := @RemoveSubMenu;
Sub.Add(SubItems);
// Add Sub menu to Forms main menu (at the 3rd position).
Menu.Items.Insert(2, Sub);
end;

procedure TForm1.RemoveSubMenu(Sender: TObject);
begin
Menu.Items.Delete(2); // Delete menu item at the third position
end;
-- end code

If you need more specific information ask away, maybe we can help.

Tom


German C. Basisty wrote:


Good people:

Does anybody know where can I find documentation about creating and 
managing menu? I mean, like a standard Windows app main menu or 
something…


Best regards

German



No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.8/904 - Release Date: 7/16/2007 5:42 PM
  


_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] menu editor

2007-05-14 Thread Paul Midgley
Hello

I am a newbie to this forum, but I have used Delphi and Lazarus on
Windows previously.

I have just installed Lazarus on an Ubuntu Linux system and the Lazarus
runs up OK, but when I try to run the menu editor it freezes Lazarus and
no matter what I do I cannot clear it from the desk top, apart from
login off and login on again.

Has any one else experienced this problem and overcome it.

Regards

Paul

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] menu editor

2007-05-14 Thread Paul Ishenin

Paul Midgley wrote:

Hello

I am a newbie to this forum, but I have used Delphi and Lazarus on
Windows previously.

I have just installed Lazarus on an Ubuntu Linux system and the Lazarus
runs up OK, but when I try to run the menu editor it freezes Lazarus and
no matter what I do I cannot clear it from the desk top, apart from
login off and login on again.

Has any one else experienced this problem and overcome it.


There was problem in 0.9.22 and it is fixed now. You can try svn version 
or one of latest snapshots.


Best regards,
Paul Ishenin.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Menu Editor problems

2006-10-18 Thread Graeme Geldenhuys

Hi,

Has anybody else noticed that the menu editor is screwed?
I use Lazarus 0.9.19 (r10047) under Linux with FPC 2.1.1 and Gtk1 widget set.

I create a form, drop a TMainMenu on the form.
Double click the TMainMenu which opens the menu editor.
I insert a Default File menu template.

Save everything and restart lazarus.

Back to my form, double click on the TMainMenu to open the Menu Editor.
Right click on 'Save' and select Delete Item, and two menu items
disappear. This happens every time I select Delete item.

Now what you see in the form designer is different to what you see
when you compile and run the app.  Form design shows a certain amount
of menu items, and when running the app it shows a different amount of
menu items. Also pressing F12 (switching between Form Designer and
Code Editor) a few times, to see what TMenuItems have been inserted in
the code editor crashed Lazarus. It pops up the the OK to ignore the
error, or Cancel to kill the app. Sometimes also showing Unable to
view a hidden or disabled window, well something like that.

Regards,
 - Graeme -


--
There's no place like 127.0.0.1

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


RE: [lazarus] Menu Editor problems

2006-10-18 Thread Crause, Christo \(JC\)
 Has anybody else noticed that the menu editor is screwed?
 I use Lazarus 0.9.19 (r10047) under Linux with FPC 2.1.1 and 
 Gtk1 widget set.
 
 I create a form, drop a TMainMenu on the form.
 Double click the TMainMenu which opens the menu editor.
 I insert a Default File menu template.
 
 Save everything and restart lazarus.
 
 Back to my form, double click on the TMainMenu to open the 
 Menu Editor.
 Right click on 'Save' and select Delete Item, and two menu 
 items disappear. This happens every time I select Delete item.
 
 Now what you see in the form designer is different to what 
 you see when you compile and run the app.  Form design shows 
 a certain amount of menu items, and when running the app it 
 shows a different amount of menu items. Also pressing F12 
 (switching between Form Designer and Code Editor) a few 
 times, to see what TMenuItems have been inserted in the code 
 editor crashed Lazarus. It pops up the the OK to ignore the 
 error, or Cancel to kill the app. Sometimes also showing 
 Unable to view a hidden or disabled window, well something 
 like that.

I can confirm that I have observed the same problem on r. 10088.

It seems as if 2 items get deleted when one selects Delete Item in the
menu editor.  I have also noticed that the menu items displayed in the
Menu Editor after deleting an item is sometimes out of sync with the
items displayed on the form, typically if one deletes the last item.

Christo

NOTICE: Please note that this eMail, and the contents thereof, 
is subject to the standard Sasol eMail legal notice which may be found at: 
http://www.sasol.com/legalnotices   
   

If you cannot access the legal notice through the URL attached and you wish 
to receive a copy thereof please send an eMail to 
[EMAIL PROTECTED]


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Menu fix

2006-03-04 Thread Colin Western
Under gtk1 on linux it is not possible to have an underscore character 
displayed. The attached patch fixes this

Colin

diff -uNr lazarus/lcl/interfaces/gtk/gtkproc.inc /dos/fpc/lazarus.w/lcl/interfaces/gtk/gtkproc.inc
--- lazarus/lcl/interfaces/gtk/gtkproc.inc	2006-03-04 11:04:49.0 +
+++ /dos/fpc/lazarus.w/lcl/interfaces/gtk/gtkproc.inc	2006-03-04 11:29:14.0 +
@@ -5663,15 +5681,21 @@
 // It would be cool, to know if a window manager with the gnome feature
 // is running, but there is probably no reliable code to do that, so we
 // simply delete all ampersands and don't set the letter shortcut.
-DeleteAmpersands(s);
+// DeleteAmpersands(s);
+// gtk_label_set_text(LabelWidget,PChar(s));
+
+// Do not use gtk_label_parse_uline as it mangles underscore characters
+System.Delete(s,ShortCutPos,1);
 gtk_label_set_text(LabelWidget,PChar(s));
-Accelerate(LCLMenuItem,MenuItemWidget,
-  gtk_label_parse_uline(LabelWidget,PChar(s)),
-  0,{$Ifdef GTK2}'activate'{$Else}'activate_item'{$EndIF});
+gtk_label_set_pattern(LabelWidget, PChar(StringOfChar(' ', ShortCutPos-1)+'_'));
+//Accelerate(LCLMenuItem,MenuItemWidget,
+  //gtk_label_parse_uline(LabelWidget,PChar(s)),
+  //0,{$Ifdef GTK2}'activate'{$Else}'activate_item'{$EndIF});
   end;
 end
 else begin
   gtk_label_set_text(LabelWidget,PChar(s));
+  gtk_label_set_pattern(LabelWidget, nil);  // Ensure any underlines removed
 end;
   end;
 


Re: [lazarus] Menu icons in KDE / Gnome

2005-09-06 Thread A.J. Venter


 That's highly distribution-specific. There are some efforts to make a
 standard, though.

 For Fedora: install the desktop-file-utils. Make a desktop-file (see an
 example in lazarus/install/gnome.ide.desktop) and then run desktop-file-
 install desktopfile.desktop. (this also makes a kde-icon and menu-entry)

Aahh, a question the distribution developer gets to answer :)
Actually, the freedesktop standard is very specific, although gnome fails to 
follow it completely unless you tweak a bunch a stuff, KDE does follow it 
perfectly so the easy way for the programmer is to install for gnome since 
KDE will pick it up.

KDE and gnome will both check /usr/share/applications/ for desktop files, so 
that's where your desktop file should go, to prevent inter-distro issues, 
install your icon picture somewhere global as well, and set a full path in 
the desktop file.
Finally, the crunch is that to get your menu item in the right place, you need 
to use categories, the reason for those are that the distro's can rename menu 
sections, but the application entries will be still be sorted like-by-like.

The easy way to do those, are to drag an item from the same part of the menu 
you want to be in onto your desktop, and look at it with a text file, the 
categories are usually the last line, just copy and paste it into the bottom 
of your own file.

A.J.
-- 
80% Of a hardware engineer's job is application of the uncertainty principle.
80% of a software engineer's job is pretending this isn't so.
A.J. Venter
Chief Software Architect
OpenLab International
http://www.getopenlab.com
http://www.silentcoder.co.za

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Menu icons in KDE / Gnome

2005-09-06 Thread Joost van der Sluis
On Tue, 2005-09-06 at 11:15 +0200, A.J. Venter wrote:
 
  That's highly distribution-specific. There are some efforts to make a
  standard, though.
 
  For Fedora: install the desktop-file-utils. Make a desktop-file (see an
  example in lazarus/install/gnome.ide.desktop) and then run desktop-file-
  install desktopfile.desktop. (this also makes a kde-icon and menu-entry)

 KDE and gnome will both check /usr/share/applications/ for desktop files, so 
 that's where your desktop file should go, to prevent inter-distro issues, 
 install your icon picture somewhere global as well, and set a full path in 
 the desktop file.

That won't work. Since all desktop-files are cached, this will only work
after a restart of gnome/kde or something.

So I would say: use the script, and don't place the files yourself.
(With the script you can also add categories, to place the menu-entry in
the right place)

Joost.


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Menu items under Windows XP

2005-08-29 Thread Razvan Adrian Bogdan
On 8/28/05, Michael Van Canneyt [EMAIL PROTECTED] wrote:
 Currently, resources for Linux are being implemented (and nearly finished),
 so make sure your {$r } statements are valid for the platform you compile for.

Now that is something Delphians will love, not having to use those
IFDEFS so much and having a native resource format, hmm this will
eliminate lazres no ?
One thing i do not want, forms added as normal resources in win32,
this makes Delphi executables easy to explore (and modify !) and the
forms should stay linked as code :)

Razvan

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Menu items under Windows XP

2005-08-28 Thread Bogusław Brandys
Micha Nelissen wrote:
 On Sat, 27 Aug 2005 23:38:29 +0200
 Bogus�aw Brandys [EMAIL PROTECTED] wrote:
 
 
Thanks.That works after resetting to default theme.
By the way : how can I include manifest file inside program EXE compiled
with lazarus ? In Delphi I created RC file , compiled and used such
statement :
{$R winxp.res}


Does it works with Lazarus also ?
 
 
 {$R ...} doesn't work. Having a file.res with the same name as the main .pp
 file, will cause it to be included in the executable. At least, this
 happens for lazarus itself AFAICT.
 
 Micha
 

I don't know how but {$R windowsxp.res} included in implementation of
main form is  working for me :-)

Of course windowsxp.res was previously compiled with Delphi but it's a
big step forward anyway !

P.S. Is there any magic lazarus WWW page with Search button for
searching about such problems ? I mean I can put there Windows Xp
manifest and get article or tutorial for doing this in Lazarus ?
Something like Lazarus knowledge database ?

Best regards
Boguslaw Brandys


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Menu items under Windows XP

2005-08-27 Thread Bogusław Brandys
Micha Nelissen wrote:
 On Sat, 27 Aug 2005 21:32:42 +0200
 Bogus�aw Brandys [EMAIL PROTECTED] wrote:
 
 
Menu items under Windows XP with theme Luna enabled (standard) have
white background but it not fill fully item canvas.Is this a known bug ?
 
 
 Can you explain more? Do you have a screenshot?
 
 
I see it also under Delphi 5.
 
 
 That would suggest a windows drawing bug then ?
 
 Micha
 

Screenshots attached.Look at whit background when menu is not rolled
down.I don't see that in my Thunderbird e-mail client.


Regards
Boguslaw Brandys

attachment: 2.jpg
attachment: 1.jpg


Re: [lazarus] Menu items under Windows XP

2005-08-27 Thread Pedro Santos

What is the version of Windows XP you are using, home or professional?

If you make a menu with several items (file, edit, view, etc) this bug 
appears in all of them? And after the first click in menu it disappear 
or keeps showing?


Now i use linux, but when i work with Windows XP I notice that bug, not 
in Lazarus but in the Windows itself.
I am not sure, but it always appears to me in the home edition, english 
version, and i see it in delphi 6 too.


Pedro Santos



Bogusław Brandys wrote:


Micha Nelissen wrote:
 


On Sat, 27 Aug 2005 21:32:42 +0200
Bogus�aw Brandys [EMAIL PROTECTED] wrote:


   


Menu items under Windows XP with theme Luna enabled (standard) have
white background but it not fill fully item canvas.Is this a known bug ?
 


Can you explain more? Do you have a screenshot?


   


I see it also under Delphi 5.
 


That would suggest a windows drawing bug then ?

Micha

   



Screenshots attached.Look at whit background when menu is not rolled
down.I don't see that in my Thunderbird e-mail client.


Regards
Boguslaw Brandys

 











_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Menu items under Windows XP

2005-08-27 Thread Micha Nelissen
On Sat, 27 Aug 2005 22:43:50 +0200
Bogusław Brandys [EMAIL PROTECTED] wrote:

 Micha Nelissen wrote:
  On Sat, 27 Aug 2005 21:32:42 +0200
  Bogus�aw Brandys [EMAIL PROTECTED] wrote:
  
  
 Menu items under Windows XP with theme Luna enabled (standard) have
 white background but it not fill fully item canvas.Is this a known bug ?
  
 Screenshots attached.Look at whit background when menu is not rolled
 down.I don't see that in my Thunderbird e-mail client.

I've seen that too. Try resetting your theme to default again in the
desktop preferences. As far as I can tell, it's a windows thingy.

Micha

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Menu items under Windows XP

2005-08-27 Thread Bogusław Brandys
Micha Nelissen wrote:
 On Sat, 27 Aug 2005 22:43:50 +0200
 Bogus�aw Brandys [EMAIL PROTECTED] wrote:
 
 
Micha Nelissen wrote:

On Sat, 27 Aug 2005 21:32:42 +0200
Bogus�aw Brandys [EMAIL PROTECTED] wrote:



Menu items under Windows XP with theme Luna enabled (standard) have
white background but it not fill fully item canvas.Is this a known bug ?

Screenshots attached.Look at whit background when menu is not rolled
down.I don't see that in my Thunderbird e-mail client.
 
 
 I've seen that too. Try resetting your theme to default again in the
 desktop preferences. As far as I can tell, it's a windows thingy.
 
 Micha
 

Thanks.That works after resetting to default theme.
By the way : how can I include manifest file inside program EXE compiled
with lazarus ? In Delphi I created RC file , compiled and used such
statement :
{$R winxp.res}


Does it works with Lazarus also ?


Regards

Boguslaw Brandys

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives