Re: Partially disable checkbox

2005-08-25 Thread Greg Breland
Disregard this question.  Apparently a treeview without a model doesn't
emit the button-press-event.  I can live with that, just have to
re-factor my code a bit.

On Wed, 2005-08-24 at 09:13, Greg Breland wrote:
 I also have a problem detecting a mouse click on a treeview control. 
 I'm currently trying the widget event button-press-event, but that
 doesn't seem to fire.


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Vector Images and GTK

2005-08-25 Thread Raghavendra
Hello everybody,
I am developing a GTK application in FC3 linux. The images for the 
application are provided by the client as WMF formats.
As this application will be dynamic i have to include those files as it is.

I heard that vector images like WMF gets rasterized when opened in GIMP.
Is that what happens also in the application when we include vector images 
in the application using gdk_create_xpm?

If yes, then how can we render the vector images as it is for the images are 
dissized that is the image seems different (as if x or y dimension has been 
increased) when displayed thru the mentioned function?

Please anyone help me
i got to complete this project within two weeks.

Sincerely Vishnu
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


gtk_button_set_markup / animation / background color

2005-08-25 Thread ramare

Dear all,

  I'm working on the look and feel of my gtk application.
  -- first : many thanks for those who developped this stuff :-)
  -- second : gtk_label_set_markup is great
  but how do I do that with button instead ?
  The only way is to put a label inside my button ?
  -- You know, gimp proposes animation like rotating and aspiring
 your image. Well, it proposes to modify your image. So I
 take a shot every 15degrees and make the animation by changing
 the image every x milliseconds ---
 A better way of doing ?
  -- Base color of widget is kind-of-gray, used and set by my kde
 environnement I guess. How to change this color for specific
 window ? Somehow a background color.
  Many thanks in advance !
  Best,
  Amities,
   Olivier


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


how to create our own help info

2005-08-25 Thread harshavardhanreddy mandeepala
Hi
I am using FC3.
using glade ,gtk,gnome how to create our own helpinformation for any project .
we developed one project using glade and gtk programming.
in that we have one button for help .
if i click help it should display help information about my project.
like we get if we click on help of any window ex caluclator,dictionary.
i gone through some of the src.rpm files,but still i couldn't find solution.
so if any one has idea plz help me.

thanks in advance

regards
Harshavardhan Reddy
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Attach objects to text in GtkTextview

2005-08-25 Thread Mathias Andre
Hi,
I'm using a GtkTextView to display some text. 
Now what'd I'd like to do is to attach some extra informations to words.
For example attach a file's uri to a particular word (like a link in web
browser). I could attach a GtkTextTag to a word, but then I would need
to create one different TextTag for every word (as most words would have
different links).

Anyone got any idea how I could do this?

Thanks,
Mathias


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Attach objects to text in GtkTextview

2005-08-25 Thread Matthias Clasen
On Thu, 2005-08-25 at 15:14 +0100, Mathias Andre wrote:
 Hi,
 I'm using a GtkTextView to display some text. 
 Now what'd I'd like to do is to attach some extra informations to words.
 For example attach a file's uri to a particular word (like a link in web
 browser). I could attach a GtkTextTag to a word, but then I would need
 to create one different TextTag for every word (as most words would have
 different links).
 
 Anyone got any idea how I could do this?
 

You could look at how the GtkAboutDialog does links in a text view,
maybe.

Matthias

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk_button_set_markup / animation / background color

2005-08-25 Thread Tristan Van Berkom

ramare wrote:

Dear all,

  I'm working on the look and feel of my gtk application.
  -- first : many thanks for those who developped this stuff :-)
  -- second : gtk_label_set_markup is great
  but how do I do that with button instead ?
  The only way is to put a label inside my button ?


Any GtkButton api's that deal with text are only convenience api's,
it often makes more sence to just deal with the label directly and add
it to the button.


  -- You know, gimp proposes animation like rotating and aspiring
 your image. Well, it proposes to modify your image. So I
 take a shot every 15degrees and make the animation by changing
 the image every x milliseconds ---
 A better way of doing ?


I dont think there is any built in functionality like this in GTK+
afaik you have to compose your animation first, maybe you can do
something with animated gifs ? (I'm really not sure).


  -- Base color of widget is kind-of-gray, used and set by my kde
 environnement I guess. How to change this color for specific
 window ? Somehow a background color.


gtk_widget_modify_bg();

Cheers,
 -Tristan
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


trouble with gtk_editable_set_editable

2005-08-25 Thread Tomaz Canabrava
The Problem:
when i try to deactivate a GtkSpinButton widget, it *DOES*, but only by the 
keyboard. if i try to use it in the not active mode using the arrows atached 
to it, the value is changed. anyone knows how to stop the buttons working 
when i try to deactivate the Spinbutton?

The Code:
static bool active = false;
GtkSpinButton *spinBase;

// Cath the spinbutton
spinBase = GTK_SPIN_BUTTON(g_object_get_data (G_OBJECT (widget), 
dados_base));

// Swap the Active state.
active = !active;

// Active/Deactive the SpinButton Widget
gtk_editable_set_editable(GTK_EDITABLE(spinBase), active);


Tomaz Canabrava, Computer Science student, and member of the GNU-Ruy 
community.
-- 
Um Computador sem Windows é como um Navio sem dançarinas de Can-Can
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk_button_set_markup / animation / background color

2005-08-25 Thread Matthias Clasen
On Thu, 2005-08-25 at 11:14 -0400, Tristan Van Berkom wrote:
 ramare wrote:
  Dear all,
  
I'm working on the look and feel of my gtk application.
-- first : many thanks for those who developped this stuff :-)
-- second : gtk_label_set_markup is great
but how do I do that with button instead ?
The only way is to put a label inside my button ?
 
 Any GtkButton api's that deal with text are only convenience api's,
 it often makes more sence to just deal with the label directly and add
 it to the button.
 
-- You know, gimp proposes animation like rotating and aspiring
   your image. Well, it proposes to modify your image. So I
   take a shot every 15degrees and make the animation by changing
   the image every x milliseconds ---
   A better way of doing ?
 
 I dont think there is any built in functionality like this in GTK+
 afaik you have to compose your animation first, maybe you can do
 something with animated gifs ? (I'm really not sure).
 

You can use gtk_image_set_from_animation() to let GTK+ take care about
the updating and timekeeping. Since 2.8, you can construct animations
from a sequence of frames, using gdk_pixbuf_simple_anim_new() instead
of loading animated GIF or ANI files.

Matthias

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Image manipulation

2005-08-25 Thread Arx Henrique
Hi all,

I'm need to manipulate image to create a dithering algoritm to a
school project, any one know some tutorial about how to manipulate
image in gtk/gdk ?

any help would be welcome!

cheers

Arx Cruz
-- 
A fé remove montanas, mas eu prefiro a dinamite
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: A few GtkFileChooserDialog questions

2005-08-25 Thread Douglas Vechinski
On Thu, 2005-08-25 at 21:40 +0200, Sven Neumann wrote:
 Hi,
 
 Douglas Vechinski [EMAIL PROTECTED] writes:
 
  First, is it possible to make a GtkFileChooserDialog when in
  GTK_FILE_CHOOSER_ACTION_SAVE action to activate when the user presses
  Enter or Return in the name entry box so that one does not have to move
  the mouse to the Save button?
 
 It already does that. Perhaps you are using an old version?

Do you know what version it should be working with.  The version I was
presently running with was 2.4.13.


 
  When a GtkFileChooserDialog is started in Load action, is it
  possible to have the name entry field present so one can also type
  in a name.
 
 You can already type in a name, you don't need an entry for that. Just
 do it.
 

Started typing in this case and a little entry pops up while typing.
Must say this doesn't seem obvious since I was looking for an actual
field or entry to start typing in.

Forgot to ask this question earlier.  What about user defined filters in
this case.  Is there any way a user can supply their own on the spot
filter when in the dialog?




___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Image manipulation

2005-08-25 Thread Afonso Costa
Hi,

try this: http://developer.gnome.org/doc/API/2.0/gdk-pixbuf/index.html

Kind regards,

Afonso

On 8/25/05, Arx Henrique [EMAIL PROTECTED] wrote:
 Hi all,
 
 I'm need to manipulate image to create a dithering algoritm to a
 school project, any one know some tutorial about how to manipulate
 image in gtk/gdk ?
 
 any help would be welcome!
 
 cheers
 
 Arx Cruz
 --
 A fé remove montanas, mas eu prefiro a dinamite
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Fwd: Vector Images and GTK

2005-08-25 Thread Raghavendra
Can libwmf built into gtk to display vectors?

Hello everybody,
I am developing a GTK application in FC3 linux. The images for the 
application are provided by the client as WMF formats.
As this application will be dynamic i have to include those files as it is.

I heard that vector images like WMF gets rasterized when opened in GIMP.
Is that what happens also in the application when we include vector images 
in the application using gdk_create_xpm?

If yes, then how can we render the vector images as it is for the images are 
dissized that is the image seems different (as if x or y dimension has been 
increased) when displayed thru the mentioned function?

Please anyone help me
i got to complete this project within two weeks.

Sincerely Vishnu
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


A question about GtkUIManager

2005-08-25 Thread Wang, Yong Y
Title: A question about GtkUIManager






Hi,


I have a question regarding GtkUIManager. Documentation for the ui property of GtkUIManager says


The ui property

 ui gchararray : Read

An XML string describing the merged UI.


Default value: NULL


However, it seems that's not true. Below is the test case and its output.


#include gtk/gtk.h


int main (int argc, char* argv[])

{

 GtkUIManager *ui_manager;

 gchar *ui = NULL;


 gtk_init (argc, argv);


 ui_manager = gtk_ui_manager_new ();


 g_object_get(G_OBJECT(ui_manager), ui, ui, NULL);

 if (ui)

 g_printf (%s, ui);


 return 0;

}


** Output **


ui

/ui


Is this a bug? Or the documentation means the stuff that actually matters between the ui tags is an empty string? If so, is this a gtk-doc bug?

Thanks

Yong




___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Announcing: Project Ridley

2005-08-25 Thread Christopher James Lahey
On Mon, 2005-08-22 at 12:23 -0400, Jonathan Blandford wrote:
 Rodrigo Moya [EMAIL PROTECTED] writes:
 
  what about libsoup/network library? Wouldn't it also make sense to move
  it to a libgnet in glib?
 
 I don't know of any plans for this.  I don't think networking makes a
 whole lot of sense in glib, and these libraries being separate is less
 harmful than the other libraries.

Except that having them separate makes it more likely for an app
developer to use the underlying system APIs which makes their app less
portable.  If we put this in glib, we tell the ISVs to use this API
which will make their app more portable.
   Chris

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: canvas notes

2005-08-25 Thread Arjan Molenaar

Quoting Alexander Larsson [EMAIL PROTECTED]:


On Mon, 2005-08-15 at 20:06 +0200, Soeren Sandmann wrote:

Havoc Pennington [EMAIL PROTECTED] writes:

 So random thoughts.

A few more random thoughts:

- Zooming is more than just setting a transformation matrix because
  the reason you want to zoom is to see more details. So somehow a
  model needs to be aware of how much detail should be drawn.


Text is extra tricky here. Do you want zooming to show you more text, or
do you want it to make the font larger. Even if you choose to just make
the font larger the text object won't scale linearly with the
magnification, because of font hinting etc. I guess you could avoid this
by always rendering text unhinted, positioned using non-device
coordinates, but this will cause pretty unreadable text.


You can not simply favour one over the other. I guess an application like
Nautilus would benefit from the first option (show more text), while Dia (or
Gaphor) would benefit from the second: Having text well readable at a 
100% zoom

factor, and having unreadebly small text at say 400%.

I found it pretty hard myself, getting the text and font stuff right (with
DiaCanvas), especially text editing. Having good support for font and text
handling is really a must.

Regards,

Arjan

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Announcing: Project Ridley

2005-08-25 Thread Alberto Manuel Brandão Simões
I am entering into the discussion thread without reading any other email 
than this one, but... as for XML we should not create the wheel again.


That leads to libxml2 or expat. In my case, I prefer libxml2. Being part 
 of w3c development maybe helps me choosing it. Well, having work with 
expat a long time ago when it was slower than libxml2 might help my 
decision as well.


Well, just to help in the discussion :)

Alberto

Olexiy Avramchenko wrote:

What about XML support ? Now we have:
- basic XML subset in GLib
- libxml2
- expat

Moving all XML features to GLib doesn't look good, neither looks good 
having three separate libraries with the same functionality.


Olexiy
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


--
Alberto Simões - Departamento de Informática - Universidade do Minho
 Campus de Gualtar - 4710-057 Braga - Portugal
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Announcing: Project Ridley

2005-08-25 Thread Philippe De Swert
Hello all,

 I don't really see much reason ever to break ABI for the forseeable
 future.  There's essentially nothing stopping us from simply leaving
 deprecated functions in there indefinitely, other than a fairly minor
 memory footprint increase which will never be paged in anyway.

This is an issue for embedded systems using gtk (like for example GPE). Maybe
a --disable-deprecated flag could do the trick? This will also enable other
people developing with gtk to test their code before the ABI gets changed (I
would not say broken).
(the last thing could also be done with a deprecated macro that warns during
compilation as done in the Linux kernel) And it would reduce the memory
footprint on disk / flash / you-name-it. Ram is indeed less of a problem.

Also looking at the number of functions I see marked as deprecated this is
could be more than a minor increase.

Regards,

Philippe

| Philippe De Swert
|
| Stag developer http://stag.mind.be/
| Emdebian developer: http://www.emdebian.org
|
| Please do not send me documents in a closed
| format.(*.doc,*.xls,*.ppt)
| Use the open alternatives. (*.pdf,*.ps,*.html,*.txt)
| http://www.gnu.org/philosophy/no-word-attachments.html  

---
A free anti-spam and anti-virus filter on all Scarlet mailboxes
More info on http://www.scarlet.be/

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: A question about GtkUIManager

2005-08-25 Thread Matthias Clasen
On Thu, 2005-08-25 at 18:21 +0800, Wang, Yong Y wrote:
 Hi,
 
 I have a question regarding GtkUIManager. Documentation for the ui
 property of GtkUIManager says
 
 The ui property 
 ui   gchararray: Read 
 An XML string describing the merged UI.
 
 Default value: NULL
 
 However, it seems that's not true. Below is the test case and its
 output.
 
 #include gtk/gtk.h
 
 int main (int argc, char* argv[]) 
 { 
 GtkUIManager *ui_manager; 
 gchar *ui = NULL;
 
 gtk_init (argc, argv);
 
 ui_manager = gtk_ui_manager_new ();
 
 g_object_get(G_OBJECT(ui_manager), ui, ui, NULL); 
 if (ui) 
 g_printf (%s, ui);
 
 return 0; 
 }
 
 ** Output **
 
 ui 
 /ui
 
 Is this a bug? Or the documentation means the stuff that actually
 matters between the ui tags is an empty string? If so, is this a
 gtk-doc bug?
 

Small documentation bug, thanks for pointing it out.

Matthias

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Defining your own new input methods?

2005-08-25 Thread Ken Beesley


 Inquiry: Definining your own new input methods?

Over a year ago I managed to write some new
Simple Composing Input Methods for GTK+,
and get them installed (by piggybacking them into
gtk-im-extra).

I managed to get them working and selectable
from within gedit, but it was all more painful
than it ought to be.

I'm starting to experiment with gedit and Unicode
input methods again.  Could some kind guru please
summarize the status of Defining and Installing
Your Own New Input Methods for GNOME/GTK/gedit?

1.  Are documentation/tutorials now available?

2.  Simple Composing Input Methods are really too
simple for my needs.  They allow you to specify
a sequence of Key Presses that constitute an input
sequence, and each input sequence must map to a
_single_ Unicode character output. 


I need to define input methods that map a sequence
of one-or-more Key Events (where Key Events includes information
about which modifier keys, if any, were pressed) to
one-or-more Unicode character outputs.  There might
be one-to-one, many-to-one, one-to-many, or many-to-many.

What's the current format/API/recommendation for defining
such input methods for Gnome/GTK/gedit?

3.  Has the input-method installation procedure been simplified? 


To install a new Java Input Method, you simply copy it into the
Extensions Directory of your Java installation.  That makes it
visible to all Java applications.  When you launch a Java application,
you can also using the -D command-line flag to specify a PATH
(directory, or set of directories) where the applications should
look for extensions (input methods).

Similarly, to install a new OS X input method, you simply place
it in one of several designated folders (including your own
personal folder for input methods). 


It would be welcome news to learn that installing a new input
method for GNOME/GTK/gedit was just as easy.

Thanks,

Ken

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: idea: g_alloca_printf

2005-08-25 Thread Behdad Esfahbod
On Thu, 25 Aug 2005, Stefan Kost wrote:

 gchar *status=g_strdup_printf(_(Loading file \%s\),file_name);
 g_object_set(G_OBJECT(self),status,status,NULL);
 g_free(status);

 This has the advantage that it framents memory with small strings. When e.g.
 serializing xml it can matter. A solution is:


alloca has several pitfalls and better be avoided.  An
alternative solution is to use g_string_printf.


 #define g_alloca_printf(str,format,...) \
 (sprintf((str=g_printf_upper_bound(format,args)),format,...),str)

 * how to get from '...' to 'args'

... in macros is not portable.

 Any ideas folks?

 Stefan

--behdad
http://behdad.org/
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


idea: g_alloca_printf

2005-08-25 Thread Stefan Kost

hi,

a little brainer for everyone who fells like having a look at it.
At pattern that can be found in many glib based app is:

gchar *status=g_strdup_printf(_(Loading file \%s\),file_name);
g_object_set(G_OBJECT(self),status,status,NULL);
g_free(status);

This has the advantage that it framents memory with small strings. When e.g. 
serializing xml it can matter. A solution is:


gchar *status=g_alloca(strlen(_(Loading file \%s\))+strlen(file_name)-1);
g_sprintf(status,_(Loading file \%s\),file_name);
g_object_set(G_OBJECT(self),status,status,NULL);

This is using g_alloca(). A good side-effect is, that one can forget to free it 
;) Unfortunately it not nice to write it this way.


The idea now is to wrap it all in a macro (needs to be a macro, as alloca only 
work localy). In the end I'd like to do:


g_object_set(G_OBJECT(self),
status,g_alloca_printf(_(Loading file \%s\),file_name),
NULL);

First try:

#define g_alloca_printf(str,format,...) \
(sprintf((str=g_printf_upper_bound(format,args)),format,...),str)

* how to get from '...' to 'args'
* passing 'str' as a param is not nice

Any ideas folks?

Stefan
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Announcing: Project Ridley

2005-08-25 Thread Marco Barisione

Jonathan Blandford wrote:

The primary goal of Project Ridley is to cut down on the number of
problem libraries that are part of the GNOME platform.  We propose to do
this by moving functionality into GTK+, wherever it makes sense.


What about EggRegex?

--
Marco Barisione
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list