Error in glib while trying to execute the gtk-demo

2005-09-26 Thread Xyber Blue
I successfully cross compiled gtk and its dependencies using the FR-V
cross compilers. The versions of the dependencies that I cross
compiled are the following:

glib-2.2.3
atk-1.2.4
jpeg-6b
zlib-1.2.3
libpng-1.2.8
expat-1.95.7
freetype-1.2.9
fontconfig-2.3.0
xrender-0.8.3
xft-2.1.2
pango-1.2.5
gtk+-2.2.4

With these packages, I was able to successfully cross compiled the gtk
without being run the make check after make. Now when I try to execute
the gtk-demo program, I came up with the error

  GLib-GObject-ERROR **: file gtype.c: line 1478
(type_iface_vtable_init_Wm): assertion failed: (iface->data && entry
&& entry->vtable == NULL && iholder && iholder->info)

Does anyone of you guys encounter and was solved this problem??? It
might be helpful to us   especially to people trying to cross compile
the gtk to other architectures. I don't know where should I start to
solve this problem. I hope someone might been able to solve or share
their ideas in solving this.

I also come up with the idea to move to higher versions to possibly
solve this problem.
Thanks and more power to gtk team
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Error in glib while trying to execute the gtk-demo

2005-09-26 Thread Ryan Schmidt

On Sep 26, 2005, at 09:45, Xyber Blue wrote:


I also come up with the idea to move to higher versions to possibly
solve this problem.


I think that's always a good first thing to try; some of those  
versions look ancient.



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


Problem with GTK/GNOME programming

2005-09-26 Thread Lalit Kumar


Hi All,
 
I am using Fedora core 3. I am facing problem with Gnome and Gtk programming.
Anyone working on GNOMe/GTK programming , please help me out how to write GNOME/GTK program.
You can mail me on [EMAIL PROTECTED]
 
Thankx in advance.
Bye,
Lalit
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


GLib 2.8.2 released

2005-09-26 Thread Matthias Clasen
GLib 2.8.2 is now available for download at:

 ftp://ftp.gtk.org/pub/gtk/v2.8/

glib-2.8.2.tar.bz2   md5sum: 7ded88401db139b7c63daf5597af7d1d
glib-2.8.2.tar.gzmd5sum: ea5ad734afef959dc5bed9333848b11d

GLib is the low-level core library that forms the basis for projects
such as GTK+ and GNOME. It provides data structure handling for C,
portability wrappers, and interfaces for such runtime functionality as
an event loop, threads, dynamic loading, and an object system.

More information about GLib is available at:

 http://www.gtk.org/

An installation guide for the GTK+ libraries, including GLib, can
be found at:

 http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html


Overview of Changes from GLib 2.8.1 to GLib 2.8.2
=
* Win32 changes
 - the g_spawn* functions now take their arguments
   in UTF-8 [Tor Lillqvist]
 - Avoid extra console windows in some situations
   [Tor Lillqvist]
* Bug fixes [Kjartan Maraas, Sebastian Wilhelmi,
  Mathias Hasselmann]
* Documentation improvements [Matthias, Mark Drago,
  Matthew F. Barnes, Behdad Esfahbod]
* Translation updates (bg,ca,cs,cy,da,de,el,en_CA,es,et,
  eu,fi,fr,gl,gu,hu,it,ja,nb,nl,no,pl,pt,pt_BR,ro,ru,sk,
  sq,sr,[EMAIL PROTECTED],sv,uk,vi,zh_TW)


A list of all bugs fixed in this release can be found at
http://bugzilla.gnome.org/buglist.cgi?bug_id=315273,315275,313744,314217,316309,316703,314393,314890


Matthias Clasen
September 26, 2005



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


Error load theme icon ... not present in theme

2005-09-26 Thread Fabian Zeindl
Hi

 I use GTK 2.8 with Cairo and wanted to start Muine
(http://muine.gooeylinux.org) when I got this error: (translated from
german)

 (muine:7975): Gtk-WARNING **: Error loading theme icon for stock:
 Symbol »gnome-dev-cdrom-audio« not present in theme
 segmentation fault

I've Gentoo and gnome-icon-theme 2.10 and hicolor-icon-theme 0.8 installed.

locate gnome-dev-cdrom-audio gives:

 /usr/share/icons/gnome/16x16/devices/gnome-dev-cdrom-audio.png
 /usr/share/icons/gnome/24x24/devices/gnome-dev-cdrom-audio.png
 /usr/share/icons/gnome/48x48/devices/gnome-dev-cdrom-audio.png
/usr/share/icons/LowContrastLargePrint/48x48/devices/gnome-dev-cdrom-audio.png

/usr/share/icons/HighContrastLargePrint/48x48/devices/gnome-dev-cdrom-audio.png
/usr/share/icons/HighContrastLargePrintInverse/48x48/devices/gnome-dev-cdrom-audio.png


What should I do? (I'm fighting with this issue for about a month now :-( )

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


(no subject)

2005-09-26 Thread jalkadir
Assignment operator for GtkWidgets?

Is there such a thing, can we do things like MyGtkWidget = SomeGtkWidget?

I get a segmentation fault when I try todo that!


What am I doing wrong?

class Data{
   public:
  std::string str;
  GtkWidget* obj;
   public:
  Data(){str = "";}
  void setStr(std::string ps){ str = ps;}
  void setObj(GtkWidget* o){obj = o;}
};

//Declare the objects
GtkWidget* MainMenueWin;
GtkWidget* VBx;
GtkWidget* Label;
GtkWidget* Separator;
GtkWidget* btnExit;
GtkWidget* btnCreateAccount;
GtkWidget* btn2;
GtkWidget* btn3;
GtkWidget* btn4;
GtkWidget* btn5;
Data* data;
std::string msg("Under Comstruction ... I am very sorry, but this \
feature has not been implemented yet. Please \
email me for any new updates on this program \
[EMAIL PROTECTED]");

//Callbacks

void Quit(GtkButton* , gpointer);
   gboolean SystemQuit(GtkWidget*, GdkEvent*, gpointer);


void Quit(GtkButton* was_clicked, gpointer user_data){
   gtk_main_quit();
}
gboolean SystemQuit(GtkWidget* widget, GdkEvent* event, gpointer user_data){
 gtk_widget_destroy(widget);
 gtk_main_quit();
 return(TRUE);
 //return(FALSE);
}

int main(int argc, char *argv[]){
   // 1. Initialize the environment
   gtk_set_locale ();
   gtk_init(&argc, &argv);
   //-liconv -liconv
   // 2. Create Widgets
   MainMenueWin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
   //gtk_window_new(GTK_WINDOW_TOPLEVEL);
   VBx = gtk_vbox_new(FALSE,10);
   Label = gtk_label_new("Jaime");
   Separator = gtk_hseparator_new();
   btnCreateAccount = gtk_button_new_with_label("Create");
   btn2 = gtk_button_new_with_label("Unknown");
   btn3 = gtk_button_new_with_label("Unknown");
   btn4 = gtk_button_new_with_label("Unknown");
   btn5 = gtk_button_new_with_label("Unknown");
   btnExit = gtk_button_new_with_label("Exit");
   // Information for GeneralMessage


   data->setObj(MainMenueWin);
   data->setStr(msg);

   // 3. Set attributs
   gtk_window_set_title(GTK_WINDOW(MainMenueWin), "Jaime");
   gtk_window_set_policy(GTK_WINDOW(MainMenueWin), //which_window
 FALSE,// allow_shrink
 FALSE,// allow_grow
 FALSE);   // auto_shrink

   gtk_container_set_border_width(GTK_CONTAINER(MainMenueWin),15);
   gtk_widget_set_name(MainMenueWin,"Gtk++ One, dos");
   gtk_widget_set_name(VBx,"vertical box");
   gtk_widget_set_name(Label,"Label");
   gtk_widget_set_name(Separator, "Separator");

   // 4. Register CallBacks
   // These three callback fun' are only to exit the application
   g_signal_connect( GTK_OBJECT(btnExit), "clicked",
 G_CALLBACK(Quit),NULL);
   g_signal_connect( GTK_OBJECT(MainMenueWin), "delete-event",
 GTK_SIGNAL_FUNC(SystemQuit), NULL);
   g_signal_connect(GTK_OBJECT(MainMenueWin), "destroy",
G_CALLBACK(SystemQuit), NULL);

   g_signal_connect(GTK_OBJECT(btnCreateAccount), "clicked",
G_CALLBACK(GeneralMsg),
reinterpret_cast(&data));

   g_signal_connect(GTK_OBJECT(btn2), "clicked",
G_CALLBACK(GeneralMsg),
reinterpret_cast(&data));
   g_signal_connect(GTK_OBJECT(btn3), "clicked",
G_CALLBACK(GeneralMsg),
reinterpret_cast(&data));
   g_signal_connect(GTK_OBJECT(btn4), "clicked",
G_CALLBACK(GeneralMsg),
reinterpret_cast(&data));
   g_signal_connect(GTK_OBJECT(btn5), "clicked",
G_CALLBACK(GeneralMsg),
reinterpret_cast(&data));

   // 5. Define instance hirarchy (pack the widgets)
   gtk_container_add(GTK_CONTAINER(MainMenueWin), VBx);
   gtk_box_pack_start_defaults(GTK_BOX(VBx), Label);
   gtk_box_pack_start(GTK_BOX(VBx), btnCreateAccount, FALSE, FALSE,1);
   gtk_box_pack_start(GTK_BOX(VBx), btn2, FALSE, FALSE,1);
   gtk_box_pack_start(GTK_BOX(VBx), btn3, FALSE, FALSE,1);
   gtk_box_pack_start(GTK_BOX(VBx), btn4, FALSE, FALSE,1);
   gtk_box_pack_start(GTK_BOX(VBx), btn5, FALSE, FALSE,1);

   gtk_box_pack_start(GTK_BOX(VBx), Separator, FALSE,FALSE, 1);
   gtk_box_pack_start_defaults(GTK_BOX(VBx), btnExit);


   // 6. Show the Widgets
   gtk_widget_show_all(MainMenueWin);

   // 7. Processing loop
   gtk_main();
   //if (data) { delete data; }
   std::cerr << "Assalam Alaykum" << std::endl;
   return 0;
}

void GeneralMsg(GtkButton* button, gpointer p) {
Data* d;
GtkWidget* label;
GtkWidget* dialog;

try {
dialog = new GtkWidget;
label = new GtkWidget;
d = new Data();
} catch(std::exception& e) { std::cout << e.what() << std::endl;}
try{d = reinterpret_cast(p);}
catch(std::exception& e){std::cerr << e.what() << std::endl;}
dialog = gtk_message_dialog_new(
   einterpret_cast(d->obj),  //Parent
   static_cast(GTK_DIALOG_MODAL |
 

Pango questions in LSB context

2005-09-26 Thread Banginwar, Rajesh
Hi,
Here some new questions that came up during LSB inclusion
process for all the Pango libraries:

- All of libpangox-1.0 library is deprecated. LSB will not include this.
Is that Ok? Any comments?

- Many of the interfaces in pango* libraries are ifdefed by
PANGO_ENABLE_ENGINE and PANGO_ENABLE_BACKEND macros. From what I could
find, these interfaces are low level and used rarely by the
applications. Should these be in LSB? Do applications require these
interfaces? Are they stable (any planned ABI changes)? 

Thanks

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


Gdk Pixbuf and Monochrome images

2005-09-26 Thread Mohit Kumar
Hi All,

I am trying to display a monochrome image in a GdkPixbuf. I have the
monochrome data in memory and to use it for the call
"gdk_pixbuf_new_from_data" i need to convert into RGB Pixels. Hence
where ever I find 1 in bit, it is replaced with 3 bytes woth 0xFF and
whereever I find a 0 in a bit, it is replaces with 3 bytes of 0x00. 

However, I am still unable to get the rendered image correctly. The following is the piece of code:

  for(int i=0;i
          {
                printf("%d",(int)tempBuffer[i]);
                guchar bitShift = 1 << 7;
                for(int shift=0;shift<8;shift++)
                {
           
        guchar bit = bitShift >>
shift;
                    if(bit & tempBuffer[i])
           
            buf[i*24 +
shift*3] = buf[i*24 + shift*3 + 1] = buf[i*24 + shift*3 + 2] = 0x00;
                    else
           
            buf[i*24 +
shift*3] = buf[i*24 + shift*3 +1] = buf[i*24 + shift*3 + 2] = 0xFF;
                }
            }

Could anyone help me with where am I going wrong?

Moreover, I find this method very inefficient as there is no use for
the user to load a monochrome image, I am using the same amount of
memory anyways. Is there a better alternative to this?

Thanks,
Mohit
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Pango questions in LSB context

2005-09-26 Thread Owen Taylor
On Mon, 2005-09-26 at 13:54 -0700, Banginwar, Rajesh wrote:
> Hi,
>   Here some new questions that came up during LSB inclusion
> process for all the Pango libraries:
> 
> - All of libpangox-1.0 library is deprecated. LSB will not include this.
> Is that Ok? Any comments?

Please do not include it. It is basically non-functional at this time,
and is included only to preserve ABI compat with apps that link to
it but don't actually use it.

> - Many of the interfaces in pango* libraries are ifdefed by
> PANGO_ENABLE_ENGINE and PANGO_ENABLE_BACKEND macros. From what I could
> find, these interfaces are low level and used rarely by the
> applications. Should these be in LSB? Do applications require these
> interfaces? Are they stable (any planned ABI changes)? 

These interfaces shouldn't be included in the LSB ... the #ifdef's
reflect a reduced level of stability and indicate that the interfaces
are not for application use: they are most of interest to someone
writing an add-on script plugin, and such plugins aren't guaranteed
to work between 1.8 and 1.10 or similar, only within a single 
1.8.x series.

Regards,
Owen


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