Re: GTK+-2.3.4 released [unstable]

2004-02-25 Thread Owen Taylor
On Wed, 2004-02-25 at 09:32, Tomasz Koczko wrote:
 On Tue, 24 Feb 2004, Owen Taylor wrote:
 [..]
  Overview of Changes from GTK+ 2.3.2 to GTK+ 2.3.4
  =
  * Fix broken gtk_binary_age setting causing wrong soname [Owen Taylor]
  * Add some extra GtkExpander docs [Federico Mena Quintero]
  * Misc bug fixes [Matthias Clasen, Damon Chaplin, Owen, Uwe Zeisberger]
  * Updated translation (ga)
 
 As same as 2.3.3 also 2.3.4 does not compiles for me and fails on:
 
 athlon-pld-linux-gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\Gtk\ 
 -DGTK_LIBDIR=\/usr/lib\ -DGTK_DATADIR=\/usr/share\ -DGTK_DATA_PREFIX=\/usr\ 
 -DGTK_SYSCONFDIR=\/etc\ -DGTK_VERSION=\2.3.4\ -DGTK_BINARY_VERSION=\2.2.0\ 
 -DGTK_HOST=\i686-pld-linux-gnu\ -DGTK_COMPILATION -I../gtk -I.. -I../gdk -I../gdk 
 -I../gdk-pixbuf -I../gdk-pixbuf -DG_DISABLE_DEPRECATED 
 -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED 
 -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -DG_ENABLE_DEBUG -pthread 
 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pango-1.0 
 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -O2 -march=i686 -Wall -MT 
 gtkfilesystem.lo -MD -MP -MF .deps/gtkfilesystem.Tpo -c gtkfilesystem.c  -fPIC -DPIC 
 -o .libs/gtkfilesystem.o
 gtkfilesystem.c: In function `gtk_file_system_module_finalize':
 gtkfilesystem.c:981: error: `gtk_file_system_module_parent_class' undeclared (first 
 use in this function)
 gtkfilesystem.c:981: error: (Each undeclared identifier is reported only once
 gtkfilesystem.c:981: error: for each function it appears in.)
 make[4]: *** [gtkfilesystem.lo] Error 1
 make[4]: *** [gtkfilesystem.lo] Error 1

Looks like we're missing a requirement on glib-2.3.3, upgrade and make
sure GTK+ is finding it and you should be fine. (G_DEFINE_TYPE changed
slightly between 2.3.2 and 2.3.3)

Regards,
Owen


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


Hex numbers

2004-02-25 Thread Tom Froysland
What should I use to get or show hex numbers.

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


threads in gtkfb?

2004-02-25 Thread Jay Vaughan
Hi,

I'm evaluating whether or not I can run my gtk app in fb mode, and am 
wondering if the single-process limit of gtkfb means I can't fire new 
threads in my app?  Its not clear from the docs, alas, whether the 
single-process requirement means no pthread() use, or what?

--

;

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


Instructions for compiling with GTK under win32

2004-02-25 Thread Richard Nairn
I have tried various combinations for compiling a test program under 
cygwin and MinGW. Can anyone provide me with a recipe for what they did 
for a successful compile of of a program using gtk under either 
environment?

--
 |   Richard Nairn  Specializing in Linux
 | Nairn Consulting Web / Database Solutions
 |Calgary, AB
 | [EMAIL PROTECTED]
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Instructions for compiling with GTK under win32

2004-02-25 Thread Vincent Torri

 I have tried various combinations for compiling a test program under 
 cygwin and MinGW. Can anyone provide me with a recipe for what they did 
 for a successful compile of of a program using gtk under either 
 environment?

with mingw, i use autotools, but you can begin by using this Makefile
(replace the name of the files, of course...): 

# Makefile

OBJECTS = messages.o menu.o utils_gui.o gems.o

all: gems

CFLAGS = -Wall -O2 `pkg-config --cflags gtk+-2.0`
WINFLAGS =  -mno-cygwin -mpentium -mms-bitfields -mwindows

# compilation 
%.o : %.c
gcc -c $(CFLAGS) $(WINFLAGS) $ -o $@

# linking
gems: $(OBJECTS)
$(CC) $(OBJECTS) -o gems `pkg-config --libs gtk+-2.0` 

clean:
@rm -f *o gems

messages.o:  messages.h
menu.o:  menu.h
utils_gui.o: menu.o utils_gui.h
gems.o:  utils_gui.o messages.o

# End of Makefile

regards

Vincent TORRI

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


Re: Hex numbers

2004-02-25 Thread Egon Andersen
Tom Froysland wrote:
What should I use to get or show hex numbers.

How about GtkEntry() combined with gtk_entry_set/get_text(), sprintf() 
and strtoi()
sprintf() could also be g_strdup_printf()

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


Re: How do people make the semi-transparent windows?

2004-02-25 Thread Jack Chen
 --- Michael Torrie [EMAIL PROTECTED] wrote:  On Sun, 2004-02-22
at 14:08, Jack Chen wrote:
  Hello,
  
  Can anyone tell me how people make those windows semi-transparent?
 Is
  it done in gtk or in the specific window manager?
 
 Until the compositing extensions are defined and available in X11,
 there
 is no real way to make windows semi-transparent.  
 
 The semi-transparent windows and effects you have seen under X11 to
 this
 date (on XFree86 anyway) are horrible hacks that look bad and don't
 work
 well.  Essentially what you would do is take a picture of what's
 underneath your window, and then make your window have the same
 picture,
 only blended with your window's contents.  As you can see this is a
 terrible way to do transparency as it cannot reflect any animation or
 things underneath your window.  In many cases, all you get is a
 semitransparent view of the root window.
 
 See http://www.freedesktop.org to see how the new true transparency
 technologies are coming along.  What's being developed are mechanism
 for
 doing true transparency (that can be controlled at the widget or
 window
 manager level) and allows all sorts of OS X -style effects to happen.
 
 
 Michael
 


Thank you. I will check it out. But do you already know a way to do it
with gtk? I just want the popup menu to be transparent, and my
application won't have animation while the menu is popped up.

Thanks.

Jack

__ 
Post your free ad now! http://personals.yahoo.ca
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: How do people make the semi-transparent windows?

2004-02-25 Thread Jack Chen
 --- Vincent Torri [EMAIL PROTECTED] wrote:  
  Hello,
  
  Can anyone tell me how people make those windows semi-transparent?
 Is
  it done in gtk or in the specific window manager?
  
 
 this could be done with directfb and the gtk backend
 
 regards
 
 Vincent TORRI
 

Thank you. I will check it out.

Jack

__ 
Post your free ad now! http://personals.yahoo.ca
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Instructions for compiling with GTK under win32

2004-02-25 Thread Richard Nairn
Thanks for your reply. What GTK packages are you using? The ones from Tor 
Lillqvist, or  Masahiro Sakai's site. I have it compiling fine, but it 
won't run.

I have it compiled under mingw.

On Wed, 25 Feb 2004 20:08:13 +0100 (MET), Vincent Torri 
[EMAIL PROTECTED] wrote:


I have tried various combinations for compiling a test program under
cygwin and MinGW. Can anyone provide me with a recipe for what they did
for a successful compile of of a program using gtk under either
environment?
with mingw, i use autotools, but you can begin by using this Makefile
(replace the name of the files, of course...):
# Makefile

OBJECTS = messages.o menu.o utils_gui.o gems.o

all: gems

CFLAGS = -Wall -O2 `pkg-config --cflags gtk+-2.0`
WINFLAGS =  -mno-cygwin -mpentium -mms-bitfields -mwindows
# compilation
%.o : %.c
gcc -c $(CFLAGS) $(WINFLAGS) $ -o $@
# linking
gems: $(OBJECTS)
$(CC) $(OBJECTS) -o gems `pkg-config --libs gtk+-2.0`
clean:
@rm -f *o gems
messages.o:  messages.h
menu.o:  menu.h
utils_gui.o: menu.o utils_gui.h
gems.o:  utils_gui.o messages.o
# End of Makefile

regards

Vincent TORRI

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


--
|   Richard Nairn  Specializing in Linux
| Nairn Consulting Web / Database Solutions
|Calgary, AB
 | [EMAIL PROTECTED]
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Instructions for compiling with GTK under win32

2004-02-25 Thread Vincent Torri

 Thanks for your reply. What GTK packages are you using? The ones from Tor 
 Lillqvist, or  Masahiro Sakai's site. I have it compiling fine, but it 
 won't run.

those from Tor (of course...) 

regards

Vincent TORRI

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


delete a row

2004-02-25 Thread francex
Hi,

I have resolved problem for show/hide a column from a gtk_list_store, but
now I have a new problem. How is possible delete a row in gtk_list_store
(prev email sample) by index (for example delete directly 5th, 8th, etc.
row)?

__
Tiscali ADSL SENZA CANONE:
Attivazione GRATIS, contributo adesione GRATIS, modem GRATIS,
50 ore di navigazione GRATIS.  ABBONARTI TI COSTA SOLO UN CLICK!
http://point.tiscali.it/adsl/index.shtml



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


Re: Hex numbers

2004-02-25 Thread Roger Leigh
Tom Froysland [EMAIL PROTECTED] writes:

 What should I use to get or show hex numbers.

printf(3) and scanf(3) might be what you need.  Or use the g_printf,
g_strdup_printf and related functions from GLib.

What exactly do you want to accomplish?


-- 
Roger Leigh

Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Hex numbers

2004-02-25 Thread Paul Davis
some ideas from the world of C++. This is a C++ widget that filters
input at the keypress level and only allows hex digits to be entered.
i believe i've used it :)

--p


/*
Copyright (C) 1999 Paul Barton-Davis 

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

$Id: hexentry.h,v 1.2 2003/02/10 14:31:58 pbd Exp $
*/

#ifndef __gtkmmext_hexentry_h__
#define __gtkmmext_hexentry_h__

#include gtk--.h

namespace Gtkmmext {

class HexEntry : public Gtk::Entry

{
  public:
/* Take a byte-level representation of a series of hexadecimal
   values and use them to set the displayed text of the entry.
   Eg. if hexbuf[0] = 0xff and hexbuf[1] = 0xa1 and buflen = 2,
   then the text will be set to ff a1.
*/

void set_hex (unsigned char *hexbuf, unsigned int buflen);

/* puts byte-level representation of current entry text
   into hexbuf, and returns number of bytes written there.

   NOTE: this will release the existing memory pointed to
   by hexbuf if buflen indicates that it is not long enough
   to hold the new representation, and hexbuf is not zero.

   If the returned length is zero, the contents of hexbuf 
   are undefined.
*/

unsigned int get_hex (unsigned char *hexbuf, size_t buflen);

  private:
gint key_press_event_impl (GdkEventKey *);
};

} /* namespace */

#endif /* __gtkmmext_hexentry_h__ */

/*
Copyright (C) 2000 Paul Barton-Davis 

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

$Id: hexentry.cc,v 1.3 2002/06/01 03:32:49 trutkin Exp $
*/

#include stdio.h /* for sprintf, sigh ... */
#include string
#include ctype.h

#include gdk/gdkkeysyms.h
#include gtkmmext/hexentry.h

using namespace std;
using namespace Gtkmmext;

gint
HexEntry::key_press_event_impl (GdkEventKey *ev)

{
if ((ev-keyval = GDK_a  ev-keyval = GDK_f) ||
(ev-keyval = GDK_A  ev-keyval = GDK_A) ||
(ev-keyval = GDK_0  ev-keyval = GDK_9) ||
ev-keyval == GDK_space || 
ev-keyval == GDK_Tab ||
ev-keyval == GDK_Return ||
ev-keyval == GDK_BackSpace ||
ev-keyval == GDK_Delete) {
return Gtk::Entry::key_press_event_impl (ev);
} else {
gdk_beep ();
return FALSE;
}
}


void
HexEntry::set_hex (unsigned char *msg, unsigned int len) 

{
/* create a textual representation of the MIDI message */

if (msg  len) {
char *rep;

rep = new char[(len * 3) + 1];
for (size_t i = 0; i  len; i++) {
sprintf (rep[i*3], %02x , msg[i]);
}
rep[len * 3] = '\0';
set_text (rep);
delete [] rep;
} else {
set_text ();
}
}

unsigned int
HexEntry::get_hex (unsigned char *hexbuf, size_t buflen)

{
int fetched_len;
char buf[3];
string text = get_text();
string::size_type length = text.length ();
string::size_type offset;

fetched_len = 0;
buf[2] = '\0';
offset = 0;

while (1) {
offset = text.find_first_of (abcdef0123456789, offset);

if (offset == string::npos) {
break;
}

/* grab two characters, but no more */

buf[0] = text[offset];

if (offset  length - 1) {
buf[1] = text[offset+1];
offset += 2;
} else {
  

glib-2.2.3 build problem

2004-02-25 Thread Ed Arnold
I ran into a minor problem with build of glib-2.2.3 on a
sun-sparc-solaris2.9 system.  Can someone tell me if this is a bug
that should be reported, or a feature I should enjoy.

I run configure with only the --prefix flag.
After configure, config.log shows ENABLE_GTK_DOC_TRUE='#' has been set.
In the docs/reference/{glib,gobject}/Makefile.in files, substitution of
ENABLE_GTK_DOC_TRUE results in the all-local target being commented
out.  However, since the all-local target is in target lists for the
all-am and .PHONY targets, make spits out a fatal error because it
doesn't know how to make target all-local.

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


Re: glib-2.2.3 build problem

2004-02-25 Thread Sven Neumann
Hi,

Ed Arnold [EMAIL PROTECTED] writes:

 I ran into a minor problem with build of glib-2.2.3 on a
 sun-sparc-solaris2.9 system.  Can someone tell me if this is a bug
 that should be reported, or a feature I should enjoy.

Do yourself a favor and use GNU make to build glib and friends.


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


Hex numbers

2004-02-25 Thread Tom Froysland




How is it possible to make a (text) box to get or show a hexadesimal
number?
-- 





 







  

  
   Tom Frysland
  
  
  [EMAIL PROTECTED]
  


  
   INFN
   Universita Roma II
   V. Ricerca Scientifica
1
   00133 Roma,
  ITALY
  
  
  
  
   Mob: +39
340 9807781 
   Pho: +39 (0)6 7259 4823 
  

  








Re: GTK+-2.3.4 released [unstable]

2004-02-25 Thread Tomasz Koczko
On Tue, 24 Feb 2004, Owen Taylor wrote:
[..]
 Overview of Changes from GTK+ 2.3.2 to GTK+ 2.3.4
 =
 * Fix broken gtk_binary_age setting causing wrong soname [Owen Taylor]
 * Add some extra GtkExpander docs [Federico Mena Quintero]
 * Misc bug fixes [Matthias Clasen, Damon Chaplin, Owen, Uwe Zeisberger]
 * Updated translation (ga)

As same as 2.3.3 also 2.3.4 does not compiles for me and fails on:

athlon-pld-linux-gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\Gtk\ 
-DGTK_LIBDIR=\/usr/lib\ -DGTK_DATADIR=\/usr/share\ -DGTK_DATA_PREFIX=\/usr\ 
-DGTK_SYSCONFDIR=\/etc\ -DGTK_VERSION=\2.3.4\ -DGTK_BINARY_VERSION=\2.2.0\ 
-DGTK_HOST=\i686-pld-linux-gnu\ -DGTK_COMPILATION -I../gtk -I.. -I../gdk -I../gdk 
-I../gdk-pixbuf -I../gdk-pixbuf -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED 
-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED 
-DG_ENABLE_DEBUG -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 
-I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -O2 
-march=i686 -Wall -MT gtkfilesystem.lo -MD -MP -MF .deps/gtkfilesystem.Tpo -c 
gtkfilesystem.c  -fPIC -DPIC -o .libs/gtkfilesystem.o
gtkfilesystem.c: In function `gtk_file_system_module_finalize':
gtkfilesystem.c:981: error: `gtk_file_system_module_parent_class' undeclared (first 
use in this function)
gtkfilesystem.c:981: error: (Each undeclared identifier is reported only once
gtkfilesystem.c:981: error: for each function it appears in.)
make[4]: *** [gtkfilesystem.lo] Error 1
make[4]: *** [gtkfilesystem.lo] Error 1

kloczek
-- 
---
*Ludzie nie maj problemw, tylko sobie sami je stwarzaj*
---
Tomasz Koczko, sys adm @zie.pg.gda.pl|*e-mail: [EMAIL PROTECTED]
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GTK+-2.3.4 released [unstable]

2004-02-25 Thread Tomasz Koczko
On Wed, 25 Feb 2004, Owen Taylor wrote:
[..]
 Looks like we're missing a requirement on glib-2.3.3, upgrade and make
 sure GTK+ is finding it and you should be fine. (G_DEFINE_TYPE changed
 slightly between 2.3.2 and 2.3.3)

Yes. This was compiled on glib 2.3.2.
Why (the hel) gtk+ autoconf script have incorrect checking enviromet ? ;)

disclaimerI have RW access/dislaimer
Is it not will be good commit to gtk+ ?

Index: configure.in
===
RCS file: /cvs/gnome/gtk+/configure.in,v
retrieving revision 1.361
diff -u -r1.361 configure.in
--- configure.in25 Feb 2004 00:43:21 -  1.361
+++ configure.in25 Feb 2004 16:33:40 -
@@ -29,7 +29,7 @@
 m4_define([gtk_binary_version], [2.2.0])
 
 # required versions of other packages
-m4_define([glib_required_version], [2.3.2])
+m4_define([glib_required_version], [2.3.3])
 m4_define([pango_required_version], [1.2.0])
 m4_define([atk_required_version], [1.0.1])

or even better (because this is not first time)

Index: configure.in
===
RCS file: /cvs/gnome/gtk+/configure.in,v
retrieving revision 1.361
diff -u -r1.361 configure.in
--- configure.in25 Feb 2004 00:43:21 -  1.361
+++ configure.in25 Feb 2004 16:35:54 -
@@ -29,7 +29,7 @@
 m4_define([gtk_binary_version], [2.2.0])
 
 # required versions of other packages
-m4_define([glib_required_version], [2.3.2])
+m4_define([glib_required_version],[$gtk_major_version.$gtk_minor_version.$gtk_micro_version])
 m4_define([pango_required_version], [1.2.0])
 m4_define([atk_required_version], [1.0.1])

kloczek
-- 
---
*Ludzie nie maj problemw, tylko sobie sami je stwarzaj*
---
Tomasz Koczko, sys adm @zie.pg.gda.pl|*e-mail: [EMAIL PROTECTED]
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GTK+-2.3.4 released [unstable]

2004-02-25 Thread Tomasz Koczko
On Wed, 25 Feb 2004, Owen Taylor wrote:
[..]
  Yes. This was compiled on glib 2.3.2.
  Why (the hel) gtk+ autoconf script have incorrect checking enviromet ? ;)

 
 The politeness... Because we didn't notice???

Sorry.

  disclaimerI have RW access/dislaimer
 
   m4_define([gtk_binary_version], [2.2.0])
   
   # required versions of other packages
  -m4_define([glib_required_version], [2.3.2])
  +m4_define([glib_required_version], [2.3.3])
   m4_define([pango_required_version], [1.2.0])
   m4_define([atk_required_version], [1.0.1])
 
 This is fine to add with a changelog entry but not the other change,
 see Matthias's comment.

Commited.

kloczek
-- 
---
*Ludzie nie maj problemw, tylko sobie sami je stwarzaj*
---
Tomasz Koczko, sys adm @zie.pg.gda.pl|*e-mail: [EMAIL PROTECTED]
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Differences between Gtk1 and Gtk2

2004-02-25 Thread Marcos Leal
I used to have some users parameters passed through 'gpointer user_data'
For example, the event for pressed button I used to declare in GTK1 like :
void on_button_pressed(GtkButton *button, gpointer user_data)
I don't even know if this is the right thing to do.

There's no 'gpointer user_data' on GTK2 anymore. But, is there any way 
to do the same thing ?

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


Re: Hex Numbers in GtkEntry.

2004-02-25 Thread Muthiah Annamalai
Hello Friends,

Quoting Tom Froysland [EMAIL PROTECTED]
Subject: Hex numbers

How is it possible to make a (text) box to get or show a hexadesimal number?
-- 

The way I do it is to use sscanf  sprintf and get/set the hexadecimal numbers
that we get respectively.

//getting an hexdecimal from the gtk_entry.
const gchar *data;
int hex_value;

data=gtk_entry_get_text(GTK_ENTRY(text_box)); 
sscanf(data,%X,hex_value); //Ive not done the error checking part.


//setting an hexdecimal to the gtk_entry.
gchar data=(gchar *)g_malloc(sizeof(gchar)*MAX_SIZE);
int hex_value;

sprintf(data,%X,hex_value); //Assume hex_value has been set somehow.
gtk_entry_set_text(GTK_ENTRY(text_box),data); 



$0.02
Cheers
Muthu.








-
This mail sent through IMP(http://www.nitt.edu)
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Hex Numbers in GtkEntry.

2004-02-25 Thread Billy O'Connor
Muthiah Annamalai [EMAIL PROTECTED] writes:

 sprintf(data,%X,hex_value); //Assume hex_value has been set somehow.
^ Oops.
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list