Re: Using g_signal_connect in class

2008-07-16 Thread Dave Foster
On Tue, Jul 15, 2008 at 6:36 AM, Gabriele Greco <[EMAIL PROTECTED]>
wrote:

>
>  static void handle_click_cbk(GtkWidget *mywidget_, MyClass *data) {
> data->handle_click(); }
>

You can't make a callback function intended to be used by C code be inside
of the C++ class.  It will not be able to find it.

Marco, I recommend using the full gtkmm API - this mix of gtk+ and gtkmm
will lead to a lot of headaches unless you know where the boundaries of the
two are (you can use them together, but typically not in a way you are using
it now).

Read the excellent docs at http://gtkmm.org/documentation.shtml,
specifically the book at
http://gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/index.html

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


Re: Wrting to a text file in N800 /media/mmc1

2008-07-16 Thread sphurti durgade
Hi Nisha,

I think here is not problem of writing into file. This problem is 
because of file permission. check the permission of  the 
respective file , does it has writing permission  for the user as well? , if 
not  give the write permission.
as I know on maemo if your application creates a file it will not give the 
write 
permission to that same file ... 
I also faced bit same problem on Maemo and solved by changing the permission 
might be this will solve your problem.

 
regards
Sphurti




- Original Message 
From: nisha jain <[EMAIL PROTECTED]>
To: gtk-app-devel-list@gnome.org
Sent: Sunday, 6 July, 2008 9:46:22 AM
Subject: Wrting to a text file in N800 /media/mmc1

Hi All,

Does any Hildon or gtk API supports writing into text files my following
code written in C is not
working for N800 which works perfectly fine under MAEMO ARMEL
mode.Please if some
one has some information let me know...

Regards,
Nisha

-- Forwarded message --
From: nisha jain <[EMAIL PROTECTED]>
Date: Jul 5, 2008 4:09 PM
Subject: Re: Wrting to a text file in N800 /media/mmc1
To: [EMAIL PROTECTED]
Cc: gary liquid <[EMAIL PROTECTED]>

Hi All,

I just checked in N800 the following program for writing into a file which

doesn't work Any clues what is going wrong? I neither get any error not
it is

creating a file and writing into it.

#include

void main()
{
FILE *Gfile;
if ((Gfile = fopen("/media/mmc1/test.txt", "w+")) == NULL)
{
printf("Error in file creation");
}

if(Gfile)
fprintf(Gfile,"%02x",0x10);
fclose(Gfile);
}

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



  Get an email ID as [EMAIL PROTECTED] or [EMAIL PROTECTED] Click here 
http://in.promos.yahoo.com/address
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk_widget_set_sensitive and mouse pointer

2008-07-16 Thread John Boncek


Eric Masson @ Savant Protection wrote:
> 
> Hi All,
> 
> I had a small problem that was bugging me for a while, and I figured I'd 
> share the results of my findings.
> 
> The problem was this:
> You have several widgets inside of a container and you call 
> gtk_widget_set_sensitive with false to gray out the container + all 
> children.  If you leave your mouse positioned over a button inside that 
> container, and call gtk_widget_set_sensitive with true, you will no 
> longer be able to click on that button.
> 
> The explanation is simple, the button widget has not received an enter 
> signal after becoming sensitive.
> 
> To fix this, do the following after making the widget sensitive:
> gint x,y;
> GdkWindow *windowUnderMouse=gdk_window_at_pointer(&x,&y);
> if(windowUnderMouse){
> GdkEventCrossing e;
> e.type=GDK_ENTER_NOTIFY;
> e.window=windowUnderMouse;
> e.send_event=1;
> e.subwindow=0;
> e.time=GDK_CURRENT_TIME;
> e.x=0;
> e.y=0;
> e.x_root=0;
> e.y_root=0;
> e.mode=GDK_CROSSING_NORMAL;
> e.detail=GDK_NOTIFY_UNKNOWN;
> e.focus=true;
> e.state=0;
> gdk_event_put((GdkEvent *)&e);
> }
> 
> 

That big chunk of code is not required.  Just hide, then show, the widget
that was set sensitive (noted as a work-around in the bug report).
-- 
View this message in context: 
http://www.nabble.com/gtk_widget_set_sensitive-and-mouse-pointer-tp18444013p18489265.html
Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com.

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


Re: newbie Question

2008-07-16 Thread Tomas Carnecky
These questions were just examples. Have you read gtk tutorials? Have 
you looked at the gtk examples? Do you know how the glib object system 
(gobject) works? Have you even started writing the code? I doubt it. 
Don't ask the question unless you actually need the answers. When you 
start writing the code other problems will come up, much simpler 
problems. And you'll have to ask much simpler questions. The two 
questions I took as an example are quite advanced ones, you'll need to 
ask those after you have figured out the UI layout and code for it written.


tom

Craig Petty wrote:

how to list available wireless networks and create a custom widget?



--- On Tue, 7/15/08, Tomas Carnecky <[EMAIL PROTECTED]> wrote:


From: Tomas Carnecky <[EMAIL PROTECTED]>
Subject: Re: newbie Question
To: [EMAIL PROTECTED]
Cc: gtk-app-devel-list@gnome.org
Date: Tuesday, July 15, 2008, 11:40 AM
Craig Petty wrote:

How would i make a gtk+ for a wireless networking?

First read gtk tutorials. Then compile, run and modify some
gtk samples, 
just so you get into how gtk works. Then you can read the
sourcecode of 
other gtk applications to understand how a 'big'
application is 
structured. And then, if you have a specific question about
for example 
how to create a custom widget, or how to list available
wireless 
networks, you can get back to this mailinglist and ask it.


tom



  
___

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: Getting a Column Number

2008-07-16 Thread Gabriele Greco
>
> How do you get the column number from a GtkTreeViewColumn pointer?  Is
> there a way to get the previous and/or next Column or column number?
>


Use  gtk_tree_view_get_columns() to get a GList of all the column and check
the pointer of focus_column against the GList with g_list_index(), this will
return your column number.

You can also add the column number as data to your GtkTreeViewColumn objects
with something like:

g_object_set_data(column, "colnum", GINT_TO_POINTER(X))

when you create the columns...

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