Update widget without re-enetring to event loop.

2005-12-04 Thread Deekshit Mantampady
Hi all,
   I have a very basic question. Is there any way to update the
window/widget without re-enetring the event loop. In my application, I
have a table with some rows. On clicking on a button It will process
each of the row. Then I need to update one of the column with the
status of the update(Just a text). I wanted to know, will it change
immediatly, or it needs to finish my processing ane re-enter to event
loop for updating.

I am looking for some thing like gtk_widget_update()


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


Help system library using GTK

2005-11-16 Thread Deekshit Mantampady
Hi all,
   I want to have a help subsystem in my application, and i am using
GTK.(No GNOME APIs). But I couldn't find any help system package (like
winhelp). I was looking for the one, written in GTK and I should be
able to compile the source in windows and Linux.

   I tried to write my own Help library for my application using
GtkHTML. But there no good ducementaion. Now I am looking into GnuCash
help system source for help.

1) Is there help subsystem library written using GTK ? Any format of
help files will do.
2) Is there any (API) documentation for GtkHTML ?


Thanks in advance
Deekshit M
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


help regarding gtk_window_default

2005-10-26 Thread Deekshit Mantampady
Hi all,
  I have been trying to make a button on my WINDOW  a default one, so
that even if my foxus is on entry field, pressing ENTER should
activate the button. I have try the following peice of code. But it
didn't work. Please help me.

===

void default_button_clicked(GtkWidget *wid, gpointer d)
{
  printf("Default button clicked...\n");
}

void non_default_button_clicked(GtkWidget *wid, gpointer d)
{
  printf("NON-Default button clicked...\n");
}

int main(int argc, char *argv[])
{
  GtkWidget *window,  *vbox, *hbox, *btn, *entry;

  gtk_init(&argc, &argv);

  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_size_request(window, 400,400);
  vbox = gtk_vbox_new(FALSE, 2);
  gtk_container_add(GTK_CONTAINER(window), vbox);
  gtk_widget_show(vbox);

hbox = gtk_hbox_new(FALSE, 2);
  gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, FALSE, 10);
  gtk_widget_show(hbox);

  entry = gtk_entry_new_with_max_length(10);
  gtk_box_pack_start(GTK_BOX(hbox), entry, TRUE, TRUE, 10);
  gtk_widget_show(entry);


  hbox = gtk_hbox_new(FALSE, 2);
  gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, FALSE, 10);
  gtk_widget_show(hbox);
  btn = gtk_button_new_with_label(" Non Default  ");
  gtk_signal_connect(GTK_OBJECT(btn), "clicked",
 GTK_SIGNAL_FUNC(non_default_button_clicked), NULL);
  gtk_box_pack_start(GTK_BOX(hbox), btn, TRUE, FALSE, 10);
  gtk_widget_show(btn);

  hbox = gtk_hbox_new(FALSE, 2);
  gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, FALSE, 10);
  gtk_widget_show(hbox);
  btn = gtk_button_new_with_label(" Default");

  GTK_WIDGET_SET_FLAGS(btn, GTK_CAN_DEFAULT);
  gtk_window_set_default(GTK_WINDOW(window), btn);
  gtk_signal_connect(GTK_OBJECT(btn), "clicked",
 GTK_SIGNAL_FUNC(default_button_clicked), NULL);
  gtk_box_pack_start(GTK_BOX(hbox), btn, TRUE, FALSE, 10);
  gtk_widget_show(btn);

  gtk_widget_show(window);
  gtk_main();

  return 0;
}
=
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to display Indian language text on a button(Urgent)

2005-10-19 Thread Deekshit Mantampady
Hi Lalith,
   Try gettext ...
   http://www.gnu.org/software/gettext/

Thanks
DM

On 10/19/05, Zeeshan Ali <[EMAIL PROTECTED]> wrote:
> On 10/19/05, Lalit Kumar <[EMAIL PROTECTED]> wrote:
> > Hi,
>
>   Hello!
>
> > Sample code for displaying hindi text or any Indian language text will help
> > me a lot.
>
>There is nothing very special you need to do. Gtk+ is full utf8
> enabled (AFAIK) and you just need to put the appropriate charachters
> in proper place (e.g in the C string). You might want to copy&paste
> individual charachters from the charachter map (this is how i did that
> to put urdu text on my widgets).
>
> --
> Regards,
>
> Zeeshan Ali
> ___
> 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


Re: Building a GUI-Application

2005-10-19 Thread Deekshit Mantampady
You can fixed layout (GtkFixed).
For objects if you have a very few colors, You can use pixmap (.xpm) files.

Thanks
Deekshit M

On 10/19/05, Kranz, Willi <[EMAIL PROTECTED]> wrote:
> Hallo!
>
>
>
> I want to build a new GUI-Application under Linux with GTK.
>
> First I built an easy Application under Windows with Borland C++.
>
> But because the new Application has to be more "safety", I have to
>
> work with Linux.
>
>
>
> The Application has to show in different colors the state of some so
> called
>
> Power Drive Units (PDU). In a very easy way green means ok and red means
> not ok.
>
> On a "MouseOver-Event" I have to show the state more detailed perhaps
> with an hint.
>
>
>
> The arrangement of the PDUs is not easy. It is nearly like this:
>
>
>
>
>
>xx  xx
> x
>
>   x  x   x   x x
> xx
>
> x  x
>
> xx
> x
>
>  x  x
>
>   x   x  x
> x
>
>x  x
> x   x
>
>
>
> The coordinates are well defined and the arrangement in the application
> must have to do
>
> something with the real coordinates.
>
> (It was very easy to do this with Borland C++. I use a label without
> text but with a background-
>
> color green or red. And I place this label on that position I want.)
>
>
>
> What are the best GTK-Objects for the PDUs?
>
> How can I place the Objects on any position?
>
>
>
> Thanks for useful hints
>
>
>
> Willi Kranz
>
>
>
> eMail: [EMAIL PROTECTED]
>
>
>
> ___
> 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


Setting cusros position does not work in text_changed callback

2005-10-02 Thread Deekshit Mantampady
Hi all,
   I am not able to set the cursor positon in an entry widget using
gtk_editable_set_position(), inside a textchanged callback. In the
following code, I always set the cursor postion to 0, for each text
changed. But it does not happen.

Please help me.

Thanks in advance
Deekshit M

===
#include 

gboolean window_deleted(GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
  gtk_widget_destroy(widget);
  gtk_main_quit();
  return FALSE;
}

gboolean text_changed(GtkEditable *editable, gpointer data)
{
  gtk_editable_set_position(GTK_EDITABLE(editable), 0);
}

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

  GtkWidget *window, *vbox, *hbox, *entry;

  gtk_init(&argc, &argv);

  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_signal_connect(GTK_OBJECT(window), "delete_event",
 GTK_SIGNAL_FUNC(window_deleted), NULL);
  vbox = gtk_vbox_new(FALSE, 2);
  gtk_container_add(GTK_CONTAINER(window), vbox);
  gtk_widget_show(vbox);
  hbox = gtk_hbox_new(FALSE, 2);

  gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 2);
  gtk_widget_show(hbox);

  entry = gtk_entry_new();
  gtk_box_pack_start(GTK_BOX(hbox), entry, TRUE, TRUE, 2);
  gtk_signal_connect(GTK_OBJECT(entry), "delete_event",
  gtk_signal_connect(GTK_OBJECT(entry), "changed",
 GTK_SIGNAL_FUNC(text_changed), NULL);
  gtk_widget_show(entry);

  gtk_widget_show(window);
  gtk_main();

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


Re: delete event for contained widget does not work

2005-10-02 Thread Deekshit Mantampady
Thank you very much. That worked.

On 10/2/05, Daniel Pekelharing <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I notice that you're connecting the entry with "destroy_event",
> I think you're wanting the "destroy" signal...
>
> Hope this helps
>
> - Daniel
>
> On Sun, 2005-10-02 at 11:39 +0530, Deekshit Mantampady wrote:
> > Hi all,
> >I have an entry in  window with containment as
> >window > vbox > hbox >entry. (Code pasted below).
> >   I registered for window delete_event, I call destroy on window, in
> > the callback. I was expecting it to destroy the etry also. In that
> > case destroy/delete event callback for entry should be called. But it
> > does not happen.
> >   In my real application, I need to free up memory allocated for a
> > data structure(application specific) associated with the entry. I
> > cannot do it when window is deleted.
> >
> > Is there any way to catch, the event when the entry or any such widget
> > is deleted ?
> >
> > Please help me.
>
> --
> Daniel Pekelharing
> <[EMAIL PROTECTED]>
>
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


delete event for contained widget does not work

2005-10-01 Thread Deekshit Mantampady
Hi all,
   I have an entry in  window with containment as
   window > vbox > hbox >entry. (Code pasted below).
  I registered for window delete_event, I call destroy on window, in
the callback. I was expecting it to destroy the etry also. In that
case destroy/delete event callback for entry should be called. But it
does not happen.
  In my real application, I need to free up memory allocated for a
data structure(application specific) associated with the entry. I
cannot do it when window is deleted.

Is there any way to catch, the event when the entry or any such widget
is deleted ?

Please help me.

code that I tried
==
#include 


gboolean window_deleted(GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
  gtk_widget_destroy(widget);
  printf("Window deleted...\n");
  gtk_main_quit();
  return FALSE;
}

gboolean entry_deleted(GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
  printf("Entry Deleted ...\n"); /* This is not called */

  return FALSE;
}

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

  GtkWidget *window, *vbox, *hbox, *entry;

  gtk_init(&argc, &argv);

  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_signal_connect(GTK_OBJECT(window), "delete_event",
 GTK_SIGNAL_FUNC(window_deleted), NULL);
  vbox = gtk_vbox_new(FALSE, 2);
  gtk_container_add(GTK_CONTAINER(window), vbox);
  gtk_widget_show(vbox);

  hbox = gtk_hbox_new(FALSE, 2);
  gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 2);
  gtk_widget_show(hbox);
entry = gtk_entry_new();
  gtk_box_pack_start(GTK_BOX(hbox), entry, TRUE, TRUE, 2);
  gtk_signal_connect(GTK_OBJECT(entry), "delete_event",
 GTK_SIGNAL_FUNC(window_deleted), NULL);
  gtk_signal_connect(GTK_OBJECT(entry), "destroy_event",
 GTK_SIGNAL_FUNC(window_deleted), NULL);
  gtk_widget_show(entry);

  gtk_widget_show(window);
  gtk_main();

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


Re: coloring vbox/scrolled window

2005-09-24 Thread Deekshit Mantampady
That worked. Thank you very much..

Deekshith M

On 9/24/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> hi,
>
> you need to use an event_box() to cover the region you want to colour,
> then  set the background of the event box to the colour you want.
>
> your hierarchy could be one of several options, one being:
>
> event box > vbox1 > scl > vbox2 > button
>
> cheers,
>
> richard
>
> > Hi all,
> >  witha  few of of VBOX scrolled window etc. Here is the containment.
> >
> > vbox1 > scl > vbox2 > button.
> >
> > I want to make the background area of button to be area. That is the
> > remaining uncovered part of scl/vbox2 should be in read. I tried to
> > set the BG/FG  color for scl/vbox2 it didn't work.
> >
> > Please help me
> >
> > +-+
> > |  |
> > |  <--| This aread should be red.
> > |  |
> > |  |
> > |+---+   |
> > | |||
> > | |||
> > | |||
> > |+---+   |
> > |  |
> > |  |
> > |  |
> > |  |
> > |  |
> > +-+
> >
> > Thanks and Regards
> > Deekshit M
> > ___
> > gtk-list mailing list
> > gtk-list@gnome.org
> > http://mail.gnome.org/mailman/listinfo/gtk-list
> >
> >
>
>
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


coloring vbox/scrolled window

2005-09-24 Thread Deekshit Mantampady
Hi all,
 witha  few of of VBOX scrolled window etc. Here is the containment.

vbox1 > scl > vbox2 > button.

I want to make the background area of button to be area. That is the
remaining uncovered part of scl/vbox2 should be in read. I tried to
set the BG/FG  color for scl/vbox2 it didn't work.

Please help me

+-+
|  |
|  <--| This aread should be red.
|  |
|  |
|+---+   |
| |||
| |||
| |||
|+---+   |
|  |
|  |
|  |
|  |
|  |
+-+

Thanks and Regards
Deekshit M
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


shortcut keys for buttons.

2005-09-18 Thread Deekshit Mantampady
Hi all,
   I have  a window, which has some buttons. Say OK, cancel and help.
I want to activate one of the button by ppressing a short cut key.
Say, when I press, "F10", OK should be actvated. "Pressing "ESC"
should activate cacnel and "F1" should activate "Help" button.


Any help...?


Thanks in advance
Deekshit M
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk_window_set_default does not work (for me)

2005-09-18 Thread Deekshit Mantampady
Does it mean, I cannot do this on a window. I mean do I need to
use GtkDialog instead of window..

Thanks
Deekshith M

On 9/13/05, Christian Neumair <[EMAIL PROTECTED]> wrote:
> Am Montag, den 12.09.2005, 18:11 +0530 schrieb Deekshit Mantampady:
> > Hi all,
> >   I have a window where I want to make the OK button to repond to
> > enter keys. I used
> > gtk_window_set_default(window, okbtn); I also set GTK_CAN_DEFAULT flag
> > before using that. But pressing the entre key does not work.
> 
> You should use gtk_dialog_set_default_response and, if the dialog
> contains an entry, gtk_entry_set_activates_default.
> 
> --
> Christian Neumair <[EMAIL PROTECTED]>
> 
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.1 (GNU/Linux)
> 
> iD4DBQBDJc96WfvsaU5lO4kRAkF8AJjhVVWteHWwS0KY+ueq6B4y3Ns+AJ0fI6h6
> NU+VVJkVKWHAvN7QooJ7Fg==
> =Zf4Q
> -END PGP SIGNATURE-
> 
> 
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


gtk_window_set_default does not work (for me)

2005-09-12 Thread Deekshit Mantampady
Hi all,
  I have a window where I want to make the OK button to repond to
enter keys. I used
gtk_window_set_default(window, okbtn); I also set GTK_CAN_DEFAULT flag
before using that. But pressing the entre key does not work.

Any help...?

I am using GTK 2.4.x on windows. Xp


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


Re: Local on GTK windows

2005-09-05 Thread Deekshit Mantampady
Hi,
   Here is the exact error message.
  Gtk-WARNING **: Locale not supported by C library.
  Using the fallback 'C' locale.

Thanks
Deekshit M

On 9/5/05, Tor Lillqvist <[EMAIL PROTECTED]> wrote:
> Deekshit Mantampady writes:
>  > But when I run my GTK application. I get error like
>  > (I don't remember the exact one)
>  >  "Charset is not supported"
>  >  Falling back to "C" charset,
>  > Any help?
> 
> Not really unless you tell exactly what error message you get, and
> what exactly you did when you got it. (That message sounds
> suspiciously like one the X library produces?) I can't find that
> message in GTK at least.
> 
> --tml
> 
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Local on GTK windows

2005-09-05 Thread Deekshit Mantampady
Hi,
  Thanks for the reply. I set Malayalam as my language in windows
regional settings. Now, I see Window Date settings window shows some
malayalam words. But when I run my GTK application. I get error like
(I don't remember the exact one)
 "Charset is not supported"
 Falling back to "C" charset,

Any help?

On 9/2/05, Tor Lillqvist <[EMAIL PROTECTED]> wrote:
> Deekshit Mantampady writes:
>  > I wanted to know what all Locales are supported on GTK-Win32. To
>  > to be specific Indian languages.
> 
> Locales in what sense? The same GTK+ message catalogs are available
> (in a full installation) on Windows as on Unix. Taking a quick glance,
> I recognize at least hi (Hindi), bn (Bangla), mr (Marathi), ml
> (Malayalam) and ta (Tamil) as Indic languages.
> 
> If you mean Indic keyboard support, there are some known problems in
> supporting 3rd-party keyboard layouts, which are claimed to be popular
> at least for some languages.
> 
> If you mean Indic script support, yes, Pango on Windows handles them.
> Or actually, all the hard work is done by the Uniscribe component in
> Windows. I.e. if Windows itself supports an Indic script, it should
> work in GTK+, too.
> 
> --tml
> 
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Local on GTK windows

2005-09-01 Thread Deekshit Mantampady
Hi all,
   I wanted to know what all Locales are supported   on GTK-Win32. To
to be specific Indian languages. I see some threads in this list. But
not useful for me.
   
Thanks
Deekshit M
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to insert GtkLabel inside GtkButton ?

2005-04-04 Thread Deekshit Mantampady
 How about
gtk_button_new_with_label("Test");
  or
gtk_container_add(GTK_CONTAINER(button), my_gtk_label)

Thanks
Deekshit

On Apr 5, 2005 12:13 PM, dimitri PIEL <[EMAIL PROTECTED]> wrote:
> Hi
> 
> Could you tell me how to insert a child like a GtkLabel inside a GtkButton ? 
> Should I use the image property of the GtkButton ?
> 
> Thanks
> 
> Dimitri
> ___
> 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