Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-01

finding the package of the unit

15 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

ik

Hello,

How can If find what is the package that the file
lazarusidestrconsts.pas belongs to ?
I need to use some of it's text with my plugins. Strings such as srkmCatSrcNoteBook.

It looks like internal file of the IDE, but it contain a lot of text that can be used with components and plugins in general that register themselves to the IDE.

Ido

Reply by email

ik
to ik
ik wrote
Hello, How can If find what is the package that the file lazarusidestrconsts.pas belongs to ?

Answering myself: ide.lpk
"never forger to use grep lpk" :)

Show quoted text 8 lines
I need to use some of it's text with my plugins. Strings such as srkmCatSrcNoteBook. It looks like internal file of the IDE, but it contain a lot of text that can be used with components and plugins in general that register themselves to the IDE. Ido

Reply by email

Mattias Gaertner
to ik
Show quoted text 5 lines
On Mon, Jan 28, 2013 at 5:46 PM, ik wrote: > Hello, > > How can If find what is the package that the file > lazarusidestrconsts.pas belongs to ?

lazarusidestrconsts.pas is not part of any package, but of the IDE itself.

Answering myself: ide.lpk "never forger to use grep lpk" :)

The ide.lpk is a debugging tool for the IDE.

Show quoted text 6 lines
> I need to use some of it's text with my plugins. Strings such as > srkmCatSrcNoteBook. > > It looks like internal file of the IDE, but it contain a lot of text > that can be used with components and plugins in general that register > themselves to the IDE.

Keep in mind that the translators had the IDE in mind.

Maybe this unit can be moved to lazcontrols.

Mattias

Reply by email

Martin
to Mattias Gaertner
Mattias Gaertner wrote 8 lines
On Mon, 28 Jan 2013 17:50:47 +0200 ik wrote: > On Mon, Jan 28, 2013 at 5:46 PM, ik wrote: >> Hello, >> >> How can If find what is the package that the file >> lazarusidestrconsts.pas belongs to ?

Context menu on editor tabs. See if it is in one of the packages tabs, or the project. Or if it was not added to either a package or project

> Answering myself: ide.lpk > "never forger to use grep lpk" :) The ide.lpk is a debugging tool for the IDE.

NEVER use it. It exists only so the debugger can have testcases.

Maybe other testcase later.

Show quoted text 10 lines
>> I need to use some of it's text with my plugins. Strings such as >> srkmCatSrcNoteBook. >> >> It looks like internal file of the IDE, but it contain a lot of text >> that can be used with components and plugins in general that register >> themselves to the IDE. Keep in mind that the translators had the IDE in mind. Maybe this unit can be moved to lazcontrols.

IMHO: selected entries could be moved.

some to ideintf maybe. some to lazcontrols, or lazutils?

Reply by email

ik
to Martin
Martin wrote 21 lines
On 28/01/2013 15:58, Mattias Gaertner wrote: > > On Mon, 28 Jan 2013 17:50:47 +0200 > ik wrote: > >> On Mon, Jan 28, 2013 at 5:46 PM, ik wrote: >>> >>> Hello, >>> >>> How can If find what is the package that the file >>> lazarusidestrconsts.pas belongs to ? Context menu on editor tabs. See if it is in one of the packages tabs, or the project. Or if it was not added to either a package or project >> Answering myself: ide.lpk >> "never forger to use grep lpk" :) > > The ide.lpk is a debugging tool for the IDE. NEVER use it. It exists only so the debugger can have testcases.

Yes, I found out the "hard way", it is registered as "not to be installed".

Show quoted text 18 lines
Maybe other testcase later. >>> I need to use some of it's text with my plugins. Strings such as >>> srkmCatSrcNoteBook. >>> >>> It looks like internal file of the IDE, but it contain a lot of text >>> that can be used with components and plugins in general that register >>> themselves to the IDE. > > Keep in mind that the translators had the IDE in mind. > > Maybe this unit can be moved to lazcontrols. > IMHO: selected entries could be moved. some to ideintf maybe. some to lazcontrols, or lazutils?

I think that there is some sort of a mess, some sections exist under ideintf and some under IDECommands.
Here are the strings at IDECommands:

const
  CommandCategoryToolMenuName = 'ToolMenu';
  CommandCategoryCustomName = 'Custom';
  CommandCategoryTextEditingName = 'text editing commands';
  CommandCategoryViewName = 'ViewMenu';
  CommandCategoryCodeTools = 'CodeTools';

I'm not sure if they are in use only with shortcuts or also menu items.

Show quoted text 7 lines
-- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Mattias Gaertner
to ik
Show quoted text 13 lines
[...] I think that there is some sort of a mess, some sections exist under ideintf and some under IDECommands. Here are the strings at IDECommands: const CommandCategoryToolMenuName = 'ToolMenu'; CommandCategoryCustomName = 'Custom'; CommandCategoryTextEditingName = 'text editing commands'; CommandCategoryViewName = 'ViewMenu'; CommandCategoryCodeTools = 'CodeTools'; I'm not sure if they are in use only with shortcuts or also menu items.

These are constants. Not resourcestrings.

Mattias

Reply by email

Maxim Ganetsky
to ik: How can If find what is the package that the file lazarusidestrconsts.pas belongs to ? I…

28.01.2013 19:46, ik ?????:

Show quoted text 6 lines
Hello, How can If find what is the package that the file lazarusidestrconsts.pas belongs to ? I need to use some of it's text with my plugins. Strings such as srkmCatSrcNoteBook.

It is category name. Why do you need to reuse it?

It looks like internal file of the IDE, but it contain a lot of text that can be used with components and plugins in general that register themselves to the IDE.

Can you give an example with use case?

Best regards, Maxim Ganetsky mailto:

Reply by email

ik
to Maxim Ganetsky
Maxim Ganetsky wrote 11 lines
28.01.2013 19:46, ik ?????: > Hello, > > How can If find what is the package that the file > lazarusidestrconsts.pas belongs to ? > I need to use some of it's text with my plugins. Strings such as > srkmCatSrcNoteBook. It is category name. Why do you need to reuse it?

My plugins add itself to the editor tab menu, and I wanted to use the same category for shortcuts, because it belongs there imho...

Show quoted text 19 lines
> It looks like internal file of the IDE, but it contain a lot of text > that can be used with components and plugins in general that register > themselves to the IDE. Can you give an example with use case? -- Best regards, Maxim Ganetsky mailto: -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Maxim Ganetsky
to ik

29.01.2013 0:55, ik ?????:

Show quoted text 15 lines
On Mon, Jan 28, 2013 at 10:30 PM, Maxim Ganetsky wrote: > 28.01.2013 19:46, ik ?????: > >> Hello, >> >> How can If find what is the package that the file >> lazarusidestrconsts.pas belongs to ? >> I need to use some of it's text with my plugins. Strings such as >> srkmCatSrcNoteBook. > > > It is category name. Why do you need to reuse it? My plugins add itself to the editor tab menu, and I wanted to use the same category for shortcuts, because it belongs there imho...

Do you really need category resource string to add shortcut there?

Best regards, Maxim Ganetsky mailto:

Reply by email

ik
to Maxim Ganetsky
Maxim Ganetsky wrote 23 lines
29.01.2013 0:55, ik ?????: > On Mon, Jan 28, 2013 at 10:30 PM, Maxim Ganetsky wrote: >> >> 28.01.2013 19:46, ik ?????: >> >>> Hello, >>> >>> How can If find what is the package that the file >>> lazarusidestrconsts.pas belongs to ? >>> I need to use some of it's text with my plugins. Strings such as >>> srkmCatSrcNoteBook. >> >> >> >> It is category name. Why do you need to reuse it? > > > My plugins add itself to the editor tab menu, and I wanted to use the > same category for shortcuts, because it belongs there imho... Do you really need category resource string to add shortcut there?

It's not mandatory, but note that when someone translate the IDE and that string, it will display different string at the shortcut frame.

Show quoted text 11 lines
-- Best regards, Maxim Ganetsky mailto: -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Mattias Gaertner
to ik: My plugins add itself to the editor tab menu, and I wanted to use the same category for…
Show quoted text 15 lines
On Mon, Jan 28, 2013 at 10:30 PM, Maxim Ganetsky wrote: > 28.01.2013 19:46, ik ?????: > >> Hello, >> >> How can If find what is the package that the file >> lazarusidestrconsts.pas belongs to ? >> I need to use some of it's text with my plugins. Strings such as >> srkmCatSrcNoteBook. > > > It is category name. Why do you need to reuse it? My plugins add itself to the editor tab menu, and I wanted to use the same category for shortcuts, because it belongs there imho...

The srkmCatSrcNoteBook is the caption.
To find the shortcut you need the name of the category. The name is 'SourceNotebook'.

  CmdCat:=IDECommandList.FindCategoryByName('SourceNotebook');

Mattias

Reply by email

Maxim Ganetsky
to ik: It's not mandatory, but note that when someone translate the IDE and that string, it will…

29.01.2013 0:59, ik ?????:

Show quoted text 27 lines
On Mon, Jan 28, 2013 at 10:57 PM, Maxim Ganetsky wrote: > 29.01.2013 0:55, ik ?????: > >> On Mon, Jan 28, 2013 at 10:30 PM, Maxim Ganetsky wrote: >>> >>> 28.01.2013 19:46, ik ?????: >>> >>>> Hello, >>>> >>>> How can If find what is the package that the file >>>> lazarusidestrconsts.pas belongs to ? >>>> I need to use some of it's text with my plugins. Strings such as >>>> srkmCatSrcNoteBook. >>> >>> >>> >>> It is category name. Why do you need to reuse it? >> >> >> My plugins add itself to the editor tab menu, and I wanted to use the >> same category for shortcuts, because it belongs there imho... > > > Do you really need category resource string to add shortcut there? It's not mandatory, but note that when someone translate the IDE and that string, it will display different string at the shortcut frame.

Which shortcut frame?

Best regards, Maxim Ganetsky mailto:

Reply by email

ik
to Mattias Gaertner: On Mon, 28 Jan 2013 22:55:10 +0200 The srkmCatSrcNoteBook is the caption. To find the…
Mattias Gaertner wrote 24 lines
On Mon, 28 Jan 2013 22:55:10 +0200 ik wrote: > On Mon, Jan 28, 2013 at 10:30 PM, Maxim Ganetsky wrote: > > 28.01.2013 19:46, ik ?????: > > > >> Hello, > >> > >> How can If find what is the package that the file > >> lazarusidestrconsts.pas belongs to ? > >> I need to use some of it's text with my plugins. Strings such as > >> srkmCatSrcNoteBook. > > > > > > It is category name. Why do you need to reuse it? > > My plugins add itself to the editor tab menu, and I wanted to use the > same category for shortcuts, because it belongs there imho... The srkmCatSrcNoteBook is the caption. To find the shortcut you need the name of the category. The name is 'SourceNotebook'. CmdCat:=IDECommandList.FindCategoryByName('SourceNotebook');

Thanks Mattias

Show quoted text 9 lines
Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

ik
to Maxim Ganetsky: 29.01.2013 0:59, ik ?????: Which shortcut frame? Maxim Ganetsky mailto:
Maxim Ganetsky wrote 39 lines
29.01.2013 0:59, ik ?????: > On Mon, Jan 28, 2013 at 10:57 PM, Maxim Ganetsky wrote: >> >> 29.01.2013 0:55, ik ?????: >> >>> On Mon, Jan 28, 2013 at 10:30 PM, Maxim Ganetsky >>> wrote: >>>> >>>> >>>> 28.01.2013 19:46, ik ?????: >>>> >>>>> Hello, >>>>> >>>>> How can If find what is the package that the file >>>>> lazarusidestrconsts.pas belongs to ? >>>>> I need to use some of it's text with my plugins. Strings such as >>>>> srkmCatSrcNoteBook. >>>> >>>> >>>> >>>> >>>> It is category name. Why do you need to reuse it? >>> >>> >>> >>> My plugins add itself to the editor tab menu, and I wanted to use the >>> same category for shortcuts, because it belongs there imho... >> >> >> >> Do you really need category resource string to add shortcut there? > > > It's not mandatory, but note that when someone translate the IDE and > that string, it will display different string at the shortcut frame. Which shortcut frame?

Of the IDE settings. I'll try what Mattias offered.

Show quoted text 11 lines
-- Best regards, Maxim Ganetsky mailto: -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Maxim Ganetsky
to ik: It's not mandatory, but note that when someone translate the IDE and that string, it will…

29.01.2013 0:59, ik ?????:

Show quoted text 27 lines
On Mon, Jan 28, 2013 at 10:57 PM, Maxim Ganetsky wrote: > 29.01.2013 0:55, ik ?????: > >> On Mon, Jan 28, 2013 at 10:30 PM, Maxim Ganetsky wrote: >>> >>> 28.01.2013 19:46, ik ?????: >>> >>>> Hello, >>>> >>>> How can If find what is the package that the file >>>> lazarusidestrconsts.pas belongs to ? >>>> I need to use some of it's text with my plugins. Strings such as >>>> srkmCatSrcNoteBook. >>> >>> >>> >>> It is category name. Why do you need to reuse it? >> >> >> My plugins add itself to the editor tab menu, and I wanted to use the >> same category for shortcuts, because it belongs there imho... > > > Do you really need category resource string to add shortcut there? It's not mandatory, but note that when someone translate the IDE and that string, it will display different string at the shortcut frame.

I can't understand.

You add shortcut to already existing category with already translation caption. As far as I understand, your package (its ability to add shortcut) shouldn't be affected by its the
translation be lost or something? What is the problem exactly? Note that your shortcut caption can be defined and translated in your package's local PO file.

Best regards, Maxim Ganetsky mailto:

Reply by email