Clicked event on GtkButton

2013-10-11 Thread Mahesh Chaudhari
Does it make any difference, generating clicked event using mouse click OR 
gtk_button_clicked() call
My clicked event callback rightly changes background colour when clicked using 
mouse however change does not reflect when the event is generated using 
gtk_button_clicked() with following code :

Gtkwidget *button1;
void click_button1(GtkWidget *widget, gpointer data)
{
  GdkColor color;
  color.red = 27000;
  color.green = 30325;
  color.blue = 34181;
  gtk_widget_modify_bg(button1, GTK_STATE_NORMAL, color);
  gtk_widget_show_now(GTK_BUTTON(button1));
}


Any Clue ?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


gdk-pixbuf-query-loaders on Windows does nothing.

2013-10-11 Thread Richard Shann
Some years ago I was building GNU Denemo on windows and had some help
with running gdk-pixbuf-query-loaders. For some years now we have been
building the program by cross-compiling on GNU/Linux systems.
I don't think we have ever sorted out how to run the
gdk-pixbuf-query-loaders automatically on installation, however.

As a first step, I have tried to run gdk-pixbuf-query-loaders.exe
manually (with elevated permissions). The program executes but does not
seem to perform any I/O. It is built without debug symbols
unfortunately, but running it under gdb it will break at fopen a couple
of times, but otherwise there is no sign of it doing anything.

Does anyone have any idea what might be wrong?

(I should add that the program runs fine - apart from not loading .svg
files for which a loader is present - making extensive use of gtk)

Richard Shann





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


Re: Spell checking in GIO

2013-10-11 Thread Sébastien Wilmet
On Mon, Oct 07, 2013 at 10:38:01PM +0200, Sébastien Wilmet wrote:
 The first step is to wrap enchant in GIO.

More precisely, here are the two classes from gtkhtml that can go in 
GIO:

https://git.gnome.org/browse/gtkhtml/tree/components/editor/gtkhtml-spell-language.h
https://git.gnome.org/browse/gtkhtml/tree/components/editor/gtkhtml-spell-checker.h

Some API tweaks may be needed, but I think these features belong to GIO, 
not GTK+. We can also hide these features and adapt the GTK+ widgets 
directly, and add some widgets for the spell checking (a menu or a 
dialog window with the list of available languages, and a dialog window 
for the spell checking of a GtkTextView). But this would be less 
flexible, and custom widgets would need to use Enchant.

Anyway, what can be extracted from GtkhtmlSpellLanguage is the decoding 
of language codes, fr_BE - French (Belgium). I proposed last year to 
add functions in glib for doing that (it reads the iso-codes data). Even 
if this is not added to the public API, it can be useful to have this 
feature separately, so other projects can copy the code. The bug:

https://bugzilla.gnome.org/show_bug.cgi?id=680876

Sébastien
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Is this a cast?

2013-10-11 Thread Patrick

Apologies if this is a duplicate post. I am having some email trouble.



Hi Everyone

I have been reading GTK+ Development by Krause for some time.

Almost everything makes sense but I don't really understand this:

g_signal_connect_swapped( G_OBJECT ( button1 ) ... continues.. on..

button1 is type GtkWidget, is it being cast to type G_OBJECT ?

I am used to seeing casts like:

number1 = (int) another_num but  I suppose the parenthesis can actually 
go around the type or the variable, correct?


If I am indeed reading this write, it seems like most widgets start off 
as GtkWidget types but then are recast to more specific objects during 
function calls, does this sound right?


-Patrick

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


Re: Is this a cast?

2013-10-11 Thread Allin Cottrell

On Fri, 11 Oct 2013, Patrick wrote:


Apologies if this is a duplicate post. I am having some email trouble.


This is the wrong list (it's about the development of GTK itself); 
you want gtk-app-devel (which is about working on GTK applications).


That said,


g_signal_connect_swapped( G_OBJECT ( button1 ) ... continues.. on..

button1 is type GtkWidget, is it being cast to type G_OBJECT ?


Sort of, but with type checking. It's not a straight cast; it's a 
macro defined in glib-2.0/gobject.h.



I am used to seeing casts like:

number1 = (int) another_num but  I suppose the parenthesis can actually go 
around the type or the variable, correct?


No. In a regular C cast you can't put the parentheses around the 
variable name.


Allin Cottrell


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