Send a message to notification area

2011-12-31 Thread Camilo Martin Culpian
Hi i need an example how to send a message to the notification area,
tanx in advance...


smime.p7s
Description: S/MIME cryptographic signature
___
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list


Caching the result produced by Gtk::Builder?

2011-12-31 Thread Nils Asmussen
Hi,

I have a list-view and a tabbed detail-view of things. If I middle-click
on an item in the list-view, I want to show the details in the
detail-view in a new tab. This tab is currently build from a glade-file,
i.e. I use Gtk::Builder for that. The problem is, that the builder (of
course) needs some time to parse the file and so on. From the
user-perspective its not acceptable to wait 1 sec. or something
everytime a new tab is loaded. Is there a way to cache the result of
Gtk::Builder or another way to speed that up?
Thanks in advance!

Best regards,
Nils Asmussen

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


Re: Caching the result produced by Gtk::Builder?

2011-12-31 Thread Nils Asmussen
Ok, forget it. After posting the question I wondered why it takes *that*
long, because 1 sec. or something is really a bit long on modern
systems ;) Therefore I searched a bit and it turned out that my
auto-scaling image causes the long load-times. More precisely,
Gdk::Pixbuf::scale_simple() takes a huge amount of time if width and
height is both 1 (apparently, on_size_allocate of the image is called
with 1x1 at the beginning). Sometimes it gets even in an endless loop.
Is this a known bug?

Anyway, the problem is solved now because if I prevent the 1x1-problem,
its really fast :)
Thanks anyway.

Best regards,
Nils Asmussen


On Sat, 2011-12-31 at 16:41 +0100, Nils Asmussen wrote:
 Hi,
 
 I have a list-view and a tabbed detail-view of things. If I middle-click
 on an item in the list-view, I want to show the details in the
 detail-view in a new tab. This tab is currently build from a glade-file,
 i.e. I use Gtk::Builder for that. The problem is, that the builder (of
 course) needs some time to parse the file and so on. From the
 user-perspective its not acceptable to wait 1 sec. or something
 everytime a new tab is loaded. Is there a way to cache the result of
 Gtk::Builder or another way to speed that up?
 Thanks in advance!
 
 Best regards,
 Nils Asmussen
 
 ___
 gtkmm-list mailing list
 gtkmm-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtkmm-list


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


Best and esiest to implemet pthread , GLib::Thread , GLib::Dispatcher

2011-12-31 Thread Kaiser .

Hello

I have made small gtkmm program that download some files from Internet by using 
libcurl..

But when the program start downloading the files it Freez until it finish (cuz 
of  single thread??)..

I knew that I must implement multi-threading to solve the problem ...

I have 3 classes in the program : WINDOW , APP , CURL 

// here are some brief of the program
CURL contains CURLREAD function to download the files and some helper functions
APP contains other utils of program and contains getPKG() which get the URLS 
and download the files throught the object curl.curlread(url ,,,)
Window has progressBAR 

CURL is object on APP  and APP is object on WINDOW

which one I should implement pthread ,  GLib::Thread  or GLib::Dispatcher ?!
  ___
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list


Re: Best and esiest to implemet pthread , GLib::Thread , GLib::Dispatcher

2011-12-31 Thread Michael Moorman
Hi Kaiser,

This one way I would approach this problem.


1. Launch a GLib::Thread to download the files. The API is quite nice and easy 
to use.
2. Register a timeout function on the main gtk loop that periodically 
checks (maybe once every half second) on the status of the thread you 
launched in 1 ( see 
http://developer.gnome.org/gtkmm-tutorial/3.2/sec-timeouts.html.en ). This can 
safely update anything on the GUI since it's invoked from 
the main loop. Update any GUI related things (progress bar, 
error/success indications, etc) using this function. 


Consider using a Glib::Mutex to facilitate safe communication between the two 
threads, i.e. synchronizing access to any shared buffer. 
Good luck!




 From: Kaiser . yahya...@hotmail.com
To: gtkmm-list@gnome.org 
Sent: Sunday, January 1, 2012 1:59 AM
Subject: Best and esiest to implemet pthread ,  GLib::Thread , GLib::Dispatcher
 

 
Hello

I have made small gtkmm program that download some files from Internet by 
using libcurl..

But when the program start downloading the files it Freez until it finish (cuz 
of  single thread??)..

I knew that I must implement multi-threading to solve the problem ...

I have 3 classes in the program : WINDOW , APP , CURL 

// here are some brief of the program
CURL contains CURLREAD function to download the files and some helper functions
APP contains other utils of program and contains getPKG() which get the URLS 
and download the files throught the object curl.curlread(url ,,,)
Window has progressBAR 

CURL is object on APP  and APP is object on WINDOW

which one I should implement pthread ,  GLib::Thread  or GLib::Dispatcher ?!

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


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