Re: A quick question:what ide should I use to program in Linux with gtk?

2003-03-23 Thread Gaël CHAMOULAUD
En réponse à Mariano Suarez-Alvarez <[EMAIL PROTECTED]>:

> On Sun, 23 Mar 2003, jiangyi178 wrote:
> 
> > I want use GTK on Linux, but I don't know:what ide should I use to
> program
> > in Linux with gtk?
> 
> vim y?

Or emacs

More seriously, Anjuta (http://www.anjuta.org)is a very good Integrated 
Development Environment for C/C++ for linux (GNOME & GTK+). You could
read all these features in http://www.anjuta.org/right_pannel.php?load=features

Good luck and Good Hacks !

Gaël (strider)

--
Gaël CHAMOULAUD
[EMAIL PROTECTED]
--
Gnome-mlview, a simple XML editor for GNOME:
http://www.freespiders.org/projects/gmlview
--
Libcroco, GNOME CSS2 PARSING TOOLKIT:
http://savannah.nongnu.org/projects/libcroco
--
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Label with tooltip: background color mismatch

2003-03-23 Thread raymond
Hi,

I have created a GtkLabel with a tooltip by placing it in a GtkEventBox.
This works well using the default GTK theme, but when running this on
the LighthouseBlue theme (or GTK-Wimp on WinXP), the background is not
properly drawn, as shown in the following image:

http://workrave.sourceforge.net/cgi-bin/bugzilla/showattachment.cgi?attach_id=14

Is there a workaround for this? Any help is greatly appreciated...

Regards,
--
Raymond Penners -*- [EMAIL PROTECTED] -*- http://www.dotsphinx.com

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


How to Drawing a stock gtk+-widget into cell-renderers cell?

2003-03-23 Thread Mirco Müller
Greetings everybody!

   I'm still trying to write a cell-renderer version of GtkOptionMenu. 
I got to a point where the the basic infrastructure of the 
GtkCellRendererOption (that's what I called it) works somehow. But know 
I need to actually have the GtkOptionMenu drawn into the cell. I can 
draw to a cell using the normal gdk functions. But how can I attach the 
GtkOptionMenu to the cell. I know that a cell-renderer is not a widget 
and thus cannot be treated that way. But there has to be a way to do 
this. After all even GtkMenuOption uses gdk-calls to render itself.

   Any hints are greatly welcome! I looked already at the soucecode or 
"Mr Project". But there a GTK_WINDOW_POPUP is used to place all needed 
widgets relative to the active cell. This only happens when a cell is 
clicked. But I want to have the GtkOptionMenu be really drawn in the 
cell all the time. Not only when the user selects a cell.

Thanks in advance for your time and kind advice!

Best regards...

Mirco

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


RE: A quick question:what ide should I use to program in Linux with gtk?

2003-03-23 Thread jiangyi178
Thanks a lot!

So KDevelop or Kylix are not the recommended way to go, right?

Richard

-Original Message-
From: Gaël CHAMOULAUD [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 23, 2003 5:31 AM
To: jiangyi178
Cc: [EMAIL PROTECTED]
Subject: Re: A quick question:what ide should I use to program in Linux
with gtk?


En réponse à Mariano Suarez-Alvarez <[EMAIL PROTECTED]>:

> On Sun, 23 Mar 2003, jiangyi178 wrote:
>
> > I want use GTK on Linux, but I don't know:what ide should I use to
> program
> > in Linux with gtk?
>
> vim y?

Or emacs

More seriously, Anjuta (http://www.anjuta.org)is a very good Integrated
Development Environment for C/C++ for linux (GNOME & GTK+). You could
read all these features in
http://www.anjuta.org/right_pannel.php?load=features

Good luck and Good Hacks !

Gaël (strider)

--
Gaël CHAMOULAUD
[EMAIL PROTECTED]
--
Gnome-mlview, a simple XML editor for GNOME:
http://www.freespiders.org/projects/gmlview
--
Libcroco, GNOME CSS2 PARSING TOOLKIT:
http://savannah.nongnu.org/projects/libcroco
--

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: A quick question:what ide should I use to program in Linux with gtk?

2003-03-23 Thread Carl B. Constantine
* jiangyi178 ([EMAIL PROTECTED]) wrote:
> Thanks a lot!
> 
> So KDevelop or Kylix are not the recommended way to go, right?

Not for GTK/Gnome programming, no. KDevelop and Kylix are focused, and
really specificically for, Qt programming.

Anjuta can be used for Qt Development as well, but has a bit of a
bug/conflict with the Qt installation that is currently being worked
out.

For GTK/Gnome development, Anjuta is a good choice if you want a full
GUI environment like CodeWarrior on the Mac or Windows. If you're not
that kind of person, Emacs or Vim are also excellent choices.

-- 
 .''`.  Carl B. Constantine
: :' : [EMAIL PROTECTED]
`. `'GnuPG: 135F FC30 7A02 B0EB 61DB  34E3 3AF1 DC6C 9F7A 3FF8
  `-  Debian GNU/Linux -- The power of freedom


pgp0.pgp
Description: PGP signature


loading different "panes" in libglade/gtk

2003-03-23 Thread Carl B. Constantine
I have an app that I'm writting that performs data entry. There's a
menubar across the top and a status bar across the bottom. In one menu,
I want the user to be able to select "new Customer..." or "new
employee..." or "new " and have the data entry screen for that
option appear in the space below.

Essentially what I want to do is "swap in" a particular hierarchy of
GTK Widgets to do the data entry instead of opening up a brand new
window each time. So Like a table on down or something.

So, 2 questions:

1) how do I design that in glade (or can I just design a specific subset
of the window)?

2) how do I use libglade/GTK to do the "swap in" of the object hierarchy
I need?

Thanks.

-- 
 .''`.  Carl B. Constantine
: :' : [EMAIL PROTECTED]
`. `'GnuPG: 135F FC30 7A02 B0EB 61DB  34E3 3AF1 DC6C 9F7A 3FF8
  `-  Debian GNU/Linux -- The power of freedom


pgp0.pgp
Description: PGP signature


Re: A quick question:what ide should I use to program in Linuxwith gtk?

2003-03-23 Thread Ruben Porras
El dom, 23 de 03 de 2003 a las 11:31, Gaël CHAMOULAUD escribió:
> En réponse à Mariano Suarez-Alvarez <[EMAIL PROTECTED]>:
> 
> > On Sun, 23 Mar 2003, jiangyi178 wrote:
> > 
> > > I want use GTK on Linux, but I don't know:what ide should I use to
> > program
> > > in Linux with gtk?
> > 
> > vim y?
> 
> Or emacs
> 

Is there any emacs-mode to make emacs know about gtk functions (and
related)?

Thnx

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Assert messages.

2003-03-23 Thread Carl B. Constantine
I'm getting a couple of assert messages in my app kind of
all-of-a-sudden as of late. I'm curious what they really mean and how
can I track them down.

Here are the asserts I'm getting:

(dispatcher:1692): Gtk-CRITICAL **: file gtkwidget.c: line 4814 
(gtk_widget_set_size_request): assertion `height >= -1' failed

(dispatcher:1692): Gtk-WARNING **: gtkwidget.c:2653: widget `GtkCheckButton' has no 
activatable signal "toggled" without arguments

(dispatcher:1692): Gtk-WARNING **: gtkwidget.c:2653: widget `GtkCheckButton' has no 
activatable signal "toggled" without arguments


The last two seem to relate to a new window I've been working on that
includes two checkboxes in it. I've set up signals for these two buttons
(using glade) so there is a signal handler specified. I only have code
written for one of them at present (testing).

The first assert I get from time to time on a couple different windows.
They don't seem to be consistant. But I've "hard-coded" the size of the
windows (that is to say I've specified they are not resizable in Glade
and I've set a specific size for them in Glade as well).

Any ideas/help is greatly appreciated.

-- 
 .''`.  Carl B. Constantine
: :' : [EMAIL PROTECTED]
`. `'GnuPG: 135F FC30 7A02 B0EB 61DB  34E3 3AF1 DC6C 9F7A 3FF8
  `-  Debian GNU/Linux -- The power of freedom


pgp0.pgp
Description: PGP signature


Re: Assert messages.

2003-03-23 Thread Sven Neumann
Hi,

"Carl B. Constantine" <[EMAIL PROTECTED]> writes:

> I'm getting a couple of assert messages in my app kind of
> all-of-a-sudden as of late. I'm curious what they really mean and
> how can I track them down.

you can force warnings to become fatal by passing --g-fatal-warnings
to your GTK+ application. The application will then crash on the first
warning message allowing you to examine the cause of the warning in a
debugger.


Salut, Sven
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Assert messages.

2003-03-23 Thread Carl B. Constantine
* Sven Neumann ([EMAIL PROTECTED]) wrote:
> Hi,
> 
> "Carl B. Constantine" <[EMAIL PROTECTED]> writes:
> 
> > I'm getting a couple of assert messages in my app kind of
> > all-of-a-sudden as of late. I'm curious what they really mean and
> > how can I track them down.
> 
> you can force warnings to become fatal by passing --g-fatal-warnings
> to your GTK+ application. The application will then crash on the first
> warning message allowing you to examine the cause of the warning in a
> debugger.

That may quit the program, but doesn't really give me any details as to
where the program gave those warnings or why or still, what they mean.

-- 
 .''`.  Carl B. Constantine
: :' : [EMAIL PROTECTED]
`. `'GnuPG: 135F FC30 7A02 B0EB 61DB  34E3 3AF1 DC6C 9F7A 3FF8
  `-  Debian GNU/Linux -- The power of freedom


pgp0.pgp
Description: PGP signature


Re: Assert messages.

2003-03-23 Thread Sven Neumann
Hi,

"Carl B. Constantine" <[EMAIL PROTECTED]> writes:

> > you can force warnings to become fatal by passing --g-fatal-warnings
> > to your GTK+ application. The application will then crash on the first
> > warning message allowing you to examine the cause of the warning in a
> > debugger.
> 
> That may quit the program, but doesn't really give me any details as to
> where the program gave those warnings or why or still, what they mean.

that's why I mentioned the use of a debugger. I was assuming you know
how to get a stack trace using gdb.


Salut, Sven

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


found one warning

2003-03-23 Thread Carl B. Constantine
As a follow up to my previous message, I *did* find where one of my
warning messages was being generated. It's on this line:

gtk_widget_add_accelerator (company_checkbutton, "toggled", accel_group,
  GDK_c, GDK_MOD1_MASK,
  GTK_ACCEL_VISIBLE);

As soon as that line is executed, I get the following warning message:

(dispatcher:2906): Gtk-WARNING **: gtkwidget.c:2653: widget
`GtkCheckButton' has no activatable signal "toggled" without arguments

The question still remains as to *why* I get this message. I've set up a
"toggled" signal for that checkbutton and attached a handler to it
(on_button_name_toggled) so I'm not sure why I get this message. 

I've set up regular buttons with key accelerators with "clicked" signals
and do not get any warnings like this.

Any ideas/help is appreciated.

-- 
 .''`.  Carl B. Constantine
: :' : [EMAIL PROTECTED]
`. `'GnuPG: 135F FC30 7A02 B0EB 61DB  34E3 3AF1 DC6C 9F7A 3FF8
  `-  Debian GNU/Linux -- The power of freedom


pgp0.pgp
Description: PGP signature


RE: I really need to know this.....

2003-03-23 Thread jiangyi178
Carl, thank you very much for your help!

To All:

I'm new to GTK+. I just found out in GTK web site that to make dialogbox,
there's no concept of resource
like in WIndows where you set the position of controls in a dialog; with
GTK, controls on a dialog are
arranged by code(vbox, hbox, etc.) automatically.

This is a totally new philosophy to me. Aside from the pro/cons of this
approach,
I'd like to know: in GTK, is there a way to set the position of a control at
will,
for example, if I want a button to be at absolute position (x=100,y=34),
does GTK allow me to do so?

Thanks a lot in advance! I really need to know this.

Best regards to all!

Richard




-Original Message-
From: Carl B. Constantine [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 23, 2003 4:30 PM
To: jiangyi178
Cc: Gaël CHAMOULAUD; [EMAIL PROTECTED]
Subject: Re: A quick question:what ide should I use to program in Linux
with gtk?


* jiangyi178 ([EMAIL PROTECTED]) wrote:
> Thanks a lot!
>
> So KDevelop or Kylix are not the recommended way to go, right?

Not for GTK/Gnome programming, no. KDevelop and Kylix are focused, and
really specificically for, Qt programming.

Anjuta can be used for Qt Development as well, but has a bit of a
bug/conflict with the Qt installation that is currently being worked
out.

For GTK/Gnome development, Anjuta is a good choice if you want a full
GUI environment like CodeWarrior on the Mac or Windows. If you're not
that kind of person, Emacs or Vim are also excellent choices.

--
 .''`.  Carl B. Constantine
: :' : [EMAIL PROTECTED]
`. `'GnuPG: 135F FC30 7A02 B0EB 61DB  34E3 3AF1 DC6C 9F7A 3FF8
  `-  Debian GNU/Linux -- The power of freedom

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: found one warning

2003-03-23 Thread Havoc Pennington
On Sun, Mar 23, 2003 at 03:46:35PM -0800, Carl B. Constantine wrote:
> As a follow up to my previous message, I *did* find where one of my
> warning messages was being generated. It's on this line:
> 
> gtk_widget_add_accelerator (company_checkbutton, "toggled", accel_group,
>   GDK_c, GDK_MOD1_MASK,
>   GTK_ACCEL_VISIBLE);
> 
> As soon as that line is executed, I get the following warning message:
> 
> (dispatcher:2906): Gtk-WARNING **: gtkwidget.c:2653: widget
> `GtkCheckButton' has no activatable signal "toggled" without arguments
> 
> The question still remains as to *why* I get this message. I've set up a
> "toggled" signal for that checkbutton and attached a handler to it
> (on_button_name_toggled) so I'm not sure why I get this message. 
> 
> I've set up regular buttons with key accelerators with "clicked" signals
> and do not get any warnings like this.
> 
> Any ideas/help is appreciated.

Well, the possibilities according to the message are:

 - GtkCheckButton has no signal 'toggled'
 - it has the signal but it's not activatable
 - it has the activatable signal but it has arguments

In this case, I believe 'toggled' is not activatable. So it can't be
used in this context. 'clicked' should work on a check button, though.

For the size_request warning, the height passed in is not >= -1,
pretty simple. Don't pass in a negative height. ;-) 

Havoc
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: found one warning

2003-03-23 Thread Carl B. Constantine
* Havoc Pennington ([EMAIL PROTECTED]) wrote:
> > I've set up regular buttons with key accelerators with "clicked" signals
> > and do not get any warnings like this.
> > 
> > Any ideas/help is appreciated.
> 
> Well, the possibilities according to the message are:
> 
>  - GtkCheckButton has no signal 'toggled'
>  - it has the signal but it's not activatable

Well, as I mentioned, I *do* have a toggled signal defined and a handler
defined for it. So I know that's not it. Now the bit about being
activatable is interesting. What do you mean by activatable in this
context? Why wouldn't the signal be activatable? I hit a key (alt-h) and
my signal should get emitted and handled by my handler (which it does by
the way. I can either click on the checkbox or hit my accelerator key
and it works correctly. So now I'm really confused).

>  - it has the activatable signal but it has arguments

I'm not sure I understand this statement. Why would a signal not have
arguments? The handler has two arguments to it for example. Would this
mean I need a second handler just to handle this accelerator? I haven't
need to do that for other buttons where I have an accelerator key
defined.

> In this case, I believe 'toggled' is not activatable. So it can't be
> used in this context. 'clicked' should work on a check button, though.

Again, would this would mean I need two separate handlers to do the same
thing?

> For the size_request warning, the height passed in is not >= -1,
> pretty simple. Don't pass in a negative height. ;-) 

I actually found this one in the debugger and fixed it. What happened is
I had a size set in Glade for width but not height. I just removed it
and all is well, though I'm a little unsure as to why.

-- 
 .''`.  Carl B. Constantine
: :' : [EMAIL PROTECTED]
`. `'GnuPG: 135F FC30 7A02 B0EB 61DB  34E3 3AF1 DC6C 9F7A 3FF8
  `-  Debian GNU/Linux -- The power of freedom


pgp0.pgp
Description: PGP signature


Re: found one warning

2003-03-23 Thread Havoc Pennington
On Sun, Mar 23, 2003 at 08:31:20PM -0800, Carl B. Constantine wrote: 
> Well, as I mentioned, I *do* have a toggled signal defined

No you don't. ;-) If you had subclassed GtkCheckButton to define a
signal, then the error message would say "MySubclass" not
"GtkCheckButton" - and anyway GObject isn't going to let you define a
signal "toggled" when the base class alrady has one, I don't think.

"toggled" is a signal built in to GtkToggleButton and its subclass,
GtkCheckButton.

> and a handler defined for it.

That's different. The error is about the signal, not the handler.

> I know that's not it. Now the bit about being activatable is
> interesting. What do you mean by activatable in this context?

Activatable means the signal has the G_SIGNAL_ACTION flag. 
It means "can be connected to an accelerator" more or less.
The correct signal to use here is "clicked" (which will end up
emitting "toggled" as a side effect).

> Why wouldn't the signal be activatable?

Because it isn't an activatable signal. Some signals are meant to be
the target of a keybinding and some aren't.
 
> >  - it has the activatable signal but it has arguments
> 
> I'm not sure I understand this statement. Why would a signal not have
> arguments? The handler has two arguments to it for example. Would this
> mean I need a second handler just to handle this accelerator? I haven't
> need to do that for other buttons where I have an accelerator key
> defined.

Signal arguments are the things that are not the emitting object or
the user data. Emitting object and user data are arguments to signal
handlers, but are not arguments to signals.

> > In this case, I believe 'toggled' is not activatable. So it can't be
> > used in this context. 'clicked' should work on a check button, though.
> 
> Again, would this would mean I need two separate handlers to do the same
> thing?

No, since "toggled" will be emitted as a side effect of clicked.

> > For the size_request warning, the height passed in is not >= -1,
> > pretty simple. Don't pass in a negative height. ;-) 
> 
> I actually found this one in the debugger and fixed it. What happened is
> I had a size set in Glade for width but not height. I just removed it
> and all is well, though I'm a little unsure as to why.

Sounds like a glade bug.

Havoc


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


More on key accelerators

2003-03-23 Thread Carl B. Constantine
Ok, I just made a couple more changes in my Glade file. It seems there
may have been "two" accelerators defined. In my .glade file I had some
of the labels of the checkbuttons and other buttons prefixed with an
underscore (_) character so that the following letter would have an
underscore in it. GTK must treat this as automatically defining alt-key
as an accelerator and I don't need to define one myself for it to work.
I eliminated the "extra" accelerator and all is well. No more warnings.

I am a bit confused as to why this is, so any insight is helpful. But
the long and short of it is I did indeed get it to work the way I want.

Thanks.

-- 
 .''`.  Carl B. Constantine
: :' : [EMAIL PROTECTED]
`. `'GnuPG: 135F FC30 7A02 B0EB 61DB  34E3 3AF1 DC6C 9F7A 3FF8
  `-  Debian GNU/Linux -- The power of freedom


pgp0.pgp
Description: PGP signature