Re: GDK_KP_Decimal (on Windows)

2015-05-08 Thread John Emmas

On 04/05/2015 16:49, LRN wrote:

-  *ksymp - GDK_KP_DECIMAL; break;
+  *ksymp = GDK_KEY_KP_Decimal; break;



I just updated from gtk-2-24 git which pulled in the above change 
(commit #1f74f12d).  Whilst the change might be technically more correct 
(and it matches the style for GTK+ version 3) it doesn't match the style 
that was being used in version 2.  In version 2, the other entries in 
'gdkkeys-win32.c' all seem to use this style:-


GDK_KP_WHATEVER

as opposed to this:-

GDK_KEY_KP_WHATEVER

I'm not criticising...  just pointing out that the two versions are 
different.  Thanks.


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


Re: GDK_KP_Decimal (on Windows)

2015-05-08 Thread Emmanuele Bassi
Hi;

On 8 May 2015 at 07:35, John Emmas john...@tiscali.co.uk wrote:
 On 04/05/2015 16:49, LRN wrote:

 -  *ksymp - GDK_KP_DECIMAL; break;
 +  *ksymp = GDK_KEY_KP_Decimal; break;


 I just updated from gtk-2-24 git which pulled in the above change (commit
 #1f74f12d).  Whilst the change might be technically more correct (and it
 matches the style for GTK+ version 3) it doesn't match the style that was
 being used in version 2.  In version 2, the other entries in
 'gdkkeys-win32.c' all seem to use this style:-

 GDK_KP_WHATEVER

 as opposed to this:-

 GDK_KEY_KP_WHATEVER

 I'm not criticising...  just pointing out that the two versions are
 different.  Thanks.

It's inconsequential. The GDK_KEY_* and GDK_* key symbol macros are
generated from the same source. The old GDK_* key symbols are
considered deprecated — mostly because they trample all over the GDK
namespace — and the GDK_KEY_* symbols are preferred, especially for
porting to GTK+ 3.x.

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[@] ebassi [@gmail.com]
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


TextTags not removed from tag table

2015-05-08 Thread Gilzad Hamuni
Hi list,

in order to keep my memory sane, I try to delete all text tags whenever I clear 
the text buffer of a text view (buffer.remove_all_tags(startIter, endIter)).
However, I get the warning that the tags I deleted are still in the tag table 
(A tag named 'tag_1' is already in the tag table.). I searched the net but 
couldn't find any hints on what I could be doing wrong.

I've attached a vala-example of my approach to this mail.

Thanks in advance for any help.

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


Re: Re: TextTags not removed from tag table

2015-05-08 Thread Gilzad Hamuni
 Gesendet: Freitag, 08. Mai 2015 um 17:18 Uhr
 Von: Gian Mario Tagliaretti
 Betreff: Re: TextTags not removed from tag table

 2015-05-08 12:00 GMT+02:00 Gilzad Hamuni:
 
 Dear Gilzad,
 
  However, I get the warning that the tags I deleted are still in the tag 
  table (A tag named 'tag_1' is already in the tag table.). I searched the 
  net but couldn't find any hints on what I could be doing wrong.
 
 You should probably remove the tag from the TagTable yourself with
 gtk_text_tag_table_remove which will also remove the tag from the
 buffer, see:
 
 https://developer.gnome.org/gtk3/stable/GtkTextTagTable.html#gtk-text-tag-table-remove


Thank you so much Gian! Works like a charm now!

Thanks again and best

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


gnotification under win32

2015-05-08 Thread Andrea Zagli

gnotification works under win?

i get a segfault on g_application_send_notification  
(GLib-GObject-CRITICAL **: g_object_new: assertion 'G_TYPE_IS_OBJECT  
(object_type)' failed)


or i did't uderstand how use it?

i tried with this code (i also tried without gtkapplication, but only  
with gapplication)


#include gtk/gtk.h

static void
print_hello (GtkWidget *widget,
 gpointer   data)
{
g_print (Hello World\n);

GNotification *notification;

notification = g_notification_new (Lunch is ready);
	g_notification_set_body (notification, Today we have pancakes and  
salad, and fruit and cake for dessert);
	g_application_send_notification (G_APPLICATION((GtkApplication  
*)data), lunch-is-ready, notification);

g_object_unref (notification);
}

static void
activate (GtkApplication *app,
  gpointeruser_data)
{
  GtkWidget *window;
  GtkWidget *button;
  GtkWidget *button_box;

  window = gtk_application_window_new (app);
  gtk_window_set_title (GTK_WINDOW (window), Window);
  gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);

  button_box = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
  gtk_container_add (GTK_CONTAINER (window), button_box);

  button = gtk_button_new_with_label (Hello World);
  g_signal_connect (button, clicked, G_CALLBACK (print_hello),  
(gpointer)app);
  g_signal_connect_swapped (button, clicked, G_CALLBACK  
(gtk_widget_destroy), window);

  gtk_container_add (GTK_CONTAINER (button_box), button);

  gtk_widget_show_all (window);
}

int
main (intargc,
  char **argv)
{
  GtkApplication *app;
  int status;

  app = gtk_application_new (org.gtk.example, G_APPLICATION_FLAGS_NONE);
  g_signal_connect (app, activate, G_CALLBACK (activate), NULL);
  status = g_application_run (G_APPLICATION (app), argc, argv);
  g_object_unref (app);

  return status;
}


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


Re: TextTags not removed from tag table

2015-05-08 Thread Gilzad Hamuni
I notice among using attachments I violated a bunch of the mailer's rules, 
sorry. Hopefully not this time.
So these few lines shall explain the trouble I have:

tag = buffer.create_tag(tag_0);//create a texttag inside of the text buffer
buffer.apply_tag(tag, lastIter, currentIter);//apply the tag to some given text.
buffer.remove_all_tags(startIter, endIter);//remove any created tag from the 
buffer.
buffer.delete(ref startIter, ref endIter);//remove the buffer's content.
tag = buffer.create_tag(tag_0);//warning: A tag named 'tag_0' is already in 
the tag table.

Here's a more complete and compilable pastebin url:
http://pastebin.com/BsTfPM5b

Thanks again.

gilzad

 Gesendet: Freitag, 08. Mai 2015 um 12:00 Uhr
 Von: Gilzad Hamuni
 Hi list,
 
 in order to keep my memory sane, I try to delete all text tags whenever I 
 clear the text buffer of a text view (buffer.remove_all_tags(startIter, 
 endIter)).
 However, I get the warning that the tags I deleted are still in the tag table 
 (A tag named 'tag_1' is already in the tag table.). I searched the net but 
 couldn't find any hints on what I could be doing wrong.
 
 I've attached a vala-example of my approach to this mail.
 
 Thanks in advance for any help.
 
 gilzad
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Aw: TextTags not removed from tag table

2015-05-08 Thread Gilzad Hamuni
I notice attachments will be rejected, so these few lines shall explain the 
trouble I have:

tag = buffer.create_tag(tag_0);//create a texttag inside of the text buffer
buffer.apply_tag(tag, lastIter, currentIter);//apply the tag to some given text.
buffer.remove_all_tags(startIter, endIter);//remove any created tag from the 
buffer.
buffer.delete(ref startIter, ref endIter);//remove the buffer's content.
tag = buffer.create_tag(tag_0);//warning: A tag named 'tag_0' is already in 
the tag table.

Here's a more complete and compilable pastebin url:
http://pastebin.com/BsTfPM5b

Thanks again.

gilzad

 Gesendet: Freitag, 08. Mai 2015 um 12:00 Uhr
 Von: Gilzad Hamuni gil...@gmx.net
 An: gtk-app-devel-list@gnome.org
 Betreff: TextTags not removed from tag table

 Hi list,
 
 in order to keep my memory sane, I try to delete all text tags whenever I 
 clear the text buffer of a text view (buffer.remove_all_tags(startIter, 
 endIter)).
 However, I get the warning that the tags I deleted are still in the tag table 
 (A tag named 'tag_1' is already in the tag table.). I searched the net but 
 couldn't find any hints on what I could be doing wrong.
 
 I've attached a vala-example of my approach to this mail.
 
 Thanks in advance for any help.
 
 gilzad
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
 
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list