Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugal-tweak.git;a=commitdiff;h=401f87c5a73c35e2d5e80fe1e5ab6616099ea23d

commit 401f87c5a73c35e2d5e80fe1e5ab6616099ea23d
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Tue Jan 11 22:44:37 2011 +0000

*use Gdk.threadXXX for modify GUI in multithread
*will release a version. And now that I've seen vala works fine
*after will finish vala pacman-g2 binding
*and rewrite it for don't use same .vala in some projects (create .so..)
*use autotools and add translation A real project :D

diff --git a/frugal-tweak-vala/src/MainClient.vala 
b/frugal-tweak-vala/src/MainClient.vala
index 861fdda..12de4f9 100644
--- a/frugal-tweak-vala/src/MainClient.vala
+++ b/frugal-tweak-vala/src/MainClient.vala
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
*/
-
+using GLib;
using Gtk;
using Unique;
using Popup;
@@ -68,7 +68,6 @@ void informUpdate()
systrayIcon.SetTooltip("Some update are available.");
Systray.Change_Ico change_ico = systrayIcon.SetIco;
change_ico("/usr/share/frugalware-tweak/pictures/frugalware-tweak-update.png");
-       Gtk.main_iteration();
}

//declarations
@@ -168,6 +167,7 @@ int main (string[] args) {
{
Tools.ConsoleDebug("Couldn't start thread\n");
}
+       Gdk.threads_init();
Gtk.main ();
return 0;
}
diff --git a/frugal-tweak-vala/src/static_obj.vala 
b/frugal-tweak-vala/src/static_obj.vala
index dca989f..a777e03 100644
--- a/frugal-tweak-vala/src/static_obj.vala
+++ b/frugal-tweak-vala/src/static_obj.vala
@@ -17,6 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
*/

+using GLib;
public static class static_obj {
public static pacman my_pacman;
}
diff --git a/frugal-tweak-vala/src/systray.vala 
b/frugal-tweak-vala/src/systray.vala
index 85d46dd..6108f10 100644
--- a/frugal-tweak-vala/src/systray.vala
+++ b/frugal-tweak-vala/src/systray.vala
@@ -95,8 +95,10 @@ public class Systray
try
{
_ico=ico;
+                       Gdk.threads_enter();
_trayicon.set_from_file(_ico);
_window.set_icon_from_file(_ico);
+                       Gdk.threads_leave();
}
catch(GLib.Error err)
{
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to