Re: GtkApplication and argc/arv

2011-03-29 Thread Murray Cumming
On Fri, 2011-03-25 at 11:48 -0400, Colin Walters wrote: On Mon, Mar 21, 2011 at 6:03 AM, Murray Cumming murr...@murrayc.com wrote: I very much like the re-show-instead-of-reopening idea, and miss it since I stopped using MacOS 7.3. However, I don't understand why this should require a

Re: GtkApplication and argc/arv

2011-03-25 Thread Colin Walters
On Mon, Mar 21, 2011 at 6:03 AM, Murray Cumming murr...@murrayc.com wrote: I very much like the re-show-instead-of-reopening idea, and miss it since I stopped using MacOS 7.3. However, I don't understand why this should require a single process. How do you recommend apps implement this then?

Re: GtkApplication and argc/arv

2011-03-25 Thread Petr Tomasek
On Thu, Mar 10, 2011 at 09:01:51AM -0500, Morten Welinder wrote: What global state, for instance? locale? As a reminder, setlocale is not thread-safe. M. Wait... So it won't be possible with gnome-shell/gtk3 applications to have two instances of the same program started with two

Re: GtkApplication and argc/arv

2011-03-25 Thread Colin Walters
On Fri, Mar 25, 2011 at 12:39 PM, Petr Tomasek toma...@etf.cuni.cz wrote: Wait... So it won't be possible with gnome-shell/gtk3 applications to have two instances of the same program started with two different locales? By default, yes, that is correct. Application authors can do whatever

Re: GtkApplication and argc/arv

2011-03-25 Thread Matthias Clasen
On Fri, Mar 25, 2011 at 1:08 PM, Colin Walters walt...@verbum.org wrote: On Fri, Mar 25, 2011 at 12:39 PM, Petr Tomasek toma...@etf.cuni.cz wrote: Wait... So it won't be possible with gnome-shell/gtk3 applications to have two instances of the same program started with two different locales?

Re: GtkApplication and argc/arv

2011-03-21 Thread Murray Cumming
On Sat, 2011-03-19 at 09:44 -0400, Colin Walters wrote: Hi Murray, On Sat, Mar 19, 2011 at 9:11 AM, Murray Cumming murr...@murrayc.com wrote: For this and other unrelated reasons, I will remove Gtk::Application from gtkmm 3.0.0. I can't wrap an API that I don't understand It's not

Re: GtkApplication and argc/arv

2011-03-19 Thread Murray Cumming
On Thu, 2011-03-10 at 20:04 +0100, Murray Cumming wrote: But for applications that actually have some reason to have multiple windows (typically document-based applications) I still know of no reason why we would want to suggest that they should have all windows in one process. For this and

Re: GtkApplication and argc/arv

2011-03-19 Thread Colin Walters
Hi Murray, On Sat, Mar 19, 2011 at 9:11 AM, Murray Cumming murr...@murrayc.com wrote: For this and other unrelated reasons, I will remove Gtk::Application from gtkmm 3.0.0. I can't wrap an API that I don't understand It's not that you don't understand it exactly, it's that you don't agree,

Re: GtkApplication and argc/arv

2011-03-11 Thread jose.ali...@gmail.com
Hi On Thu, Mar 10, 2011 at 4:04 PM, Murray Cumming murr...@murrayc.com wrote: On Thu, 2011-03-10 at 18:41 +, Chris Vine wrote: On Thu, 10 Mar 2011 16:47:59 +0100 Murray Cumming murr...@murrayc.com wrote: If it's most programs then surely you can give some example. I don't think that

Re: GtkApplication and argc/arv

2011-03-10 Thread Chris Vine
On Wed, 9 Mar 2011 08:16:44 + Emmanuele Bassi eba...@gmail.com wrote: On 2011-03-08 at 22:16, Paul Davis wrote: On Tue, Mar 8, 2011 at 9:56 PM, Andrew Cowie and...@operationaldynamics.com wrote: On Tue, 2011-03-08 at 12:06 +0100, Murray Cumming wrote: I would very much like some

Re: GtkApplication and argc/arv

2011-03-10 Thread Alexandre Mazari
However, the deficiency I have found in the past with respect to implementing single instance programs using gtk+/gnome is the window manager.  Usually in the circumstances I have described you want gtk_window_present() to do what it says it does (for the remote dbus callback to bring up the

Re: GtkApplication and argc/arv

2011-03-10 Thread Murray Cumming
On Thu, 2011-03-10 at 09:59 +, Chris Vine wrote: [snip] The case for having single-instance programs in most cases for programs with a GUI interface seems self-evident to me, since most GUI programs keep some running global state which would be extremely tedious to synchronise between

Re: GtkApplication and argc/arv

2011-03-10 Thread Morten Welinder
What global state, for instance? locale? As a reminder, setlocale is not thread-safe. M. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Re: GtkApplication and argc/arv

2011-03-10 Thread Murray Cumming
On Thu, 2011-03-10 at 09:01 -0500, Morten Welinder wrote: What global state, for instance? locale? As a reminder, setlocale is not thread-safe. Sorry, I don't understand. Could you explain in more detail? Why would two separate instances (separate processes) of the same app care if

Re: GtkApplication and argc/arv

2011-03-10 Thread Morten Welinder
Sorry, I don't understand. Could you explain in more detail? If you need to run two different windows in two different locales, then single-instance is not possible. For Gnumeric this happens regularly due to the world's decimal separator mess. The reason you cannot do this in a single

Re: GtkApplication and argc/arv

2011-03-10 Thread Chris Vine
On Thu, 10 Mar 2011 14:48:12 +0100 Murray Cumming murr...@murrayc.com wrote: On Thu, 2011-03-10 at 09:59 +, Chris Vine wrote: [snip] The case for having single-instance programs in most cases for programs with a GUI interface seems self-evident to me, since most GUI programs keep some

Re: GtkApplication and argc/arv

2011-03-10 Thread Murray Cumming
On Thu, 2011-03-10 at 14:54 +, Chris Vine wrote: On Thu, 10 Mar 2011 14:48:12 +0100 Murray Cumming murr...@murrayc.com wrote: On Thu, 2011-03-10 at 09:59 +, Chris Vine wrote: [snip] The case for having single-instance programs in most cases for programs with a GUI interface

Re: GtkApplication and argc/arv

2011-03-10 Thread Paul Davis
On Thu, Mar 10, 2011 at 10:47 AM, Murray Cumming murr...@murrayc.com wrote: If it's most programs then surely you can give some example. I don't think that most applications have to deal with caching, bookmarks, and history like Firefox. i think that the kind of thing chris is referring to is

Re: GtkApplication and argc/arv

2011-03-10 Thread Murray Cumming
On Thu, 2011-03-10 at 10:54 -0500, Paul Davis wrote: On Thu, Mar 10, 2011 at 10:47 AM, Murray Cumming murr...@murrayc.com wrote: If it's most programs then surely you can give some example. I don't think that most applications have to deal with caching, bookmarks, and history like

Re: GtkApplication and argc/arv

2011-03-10 Thread Chris Vine
On Thu, 10 Mar 2011 16:47:59 +0100 Murray Cumming murr...@murrayc.com wrote: If it's most programs then surely you can give some example. I don't think that most applications have to deal with caching, bookmarks, and history like Firefox. I didn't realise you wanted examples, but most programs

Re: GtkApplication and argc/arv

2011-03-09 Thread Emmanuele Bassi
On 2011-03-08 at 22:16, Paul Davis wrote: On Tue, Mar 8, 2011 at 9:56 PM, Andrew Cowie and...@operationaldynamics.com wrote: On Tue, 2011-03-08 at 12:06 +0100, Murray Cumming wrote: I would very much like some reasoning to point people at when I tell them to use GtkApplication. I will not

Re: GtkApplication and argc/arv

2011-03-08 Thread Murray Cumming
On Thu, 2011-02-24 at 17:55 -0500, Colin Walters wrote: On Thu, Feb 24, 2011 at 5:15 PM, Morten Welinder mort...@gnome.org wrote: What actual problem was solved by all this infrastructure to keep just one instance? Basically for any application which manipulates private files in any

Re: GtkApplication and argc/arv

2011-03-08 Thread Andrew Cowie
On Tue, 2011-03-08 at 12:06 +0100, Murray Cumming wrote: I would very much like some reasoning to point people at when I tell them to use GtkApplication. I will not just hand-wave and say that people say it's good. GtkApplication is the GNOME 3.0 replacement for LibUnique, right? If so, then

Re: GtkApplication and argc/arv

2011-03-08 Thread Paul Davis
On Tue, Mar 8, 2011 at 9:56 PM, Andrew Cowie and...@operationaldynamics.com wrote: On Tue, 2011-03-08 at 12:06 +0100, Murray Cumming wrote: I would very much like some reasoning to point people at when I tell them to use GtkApplication. I will not just hand-wave and say that people say it's

Re: GtkApplication and argc/arv

2011-03-07 Thread Murray Cumming
On Fri, 2011-02-25 at 12:53 +0200, Claudio Saavedra wrote: On Fri, 2011-02-25 at 08:58 +0100, Carlos Garcia Campos wrote: Note that we moved from single process model to multiple process without changing the evince behaviour, it still behaves like a single instance app, opening an already

Re: GDBus support on Win32 + other platforms (Was Re: GtkApplication and argc/arv)

2011-03-07 Thread Tristan Van Berkom
On Sat, 2011-02-26 at 10:37 -0500, David Zeuthen wrote: Hey, On Sat, Feb 26, 2011 at 10:26 AM, Paul Davis p...@linuxaudiosystems.com wrote: On Sat, Feb 26, 2011 at 10:00 AM, David Zeuthen zeut...@gmail.com wrote: Hi, Just for the record, there's no reason that GDBus cannot be made to

Re: GDBus support on Win32 + other platforms (Was Re: GtkApplication and argc/arv)

2011-03-07 Thread Matthias Clasen
On Mon, Mar 7, 2011 at 1:22 AM, Tristan Van Berkom trista...@openismus.com wrote: On Sat, 2011-02-26 at 10:37 -0500, David Zeuthen wrote: ... do I have to pull out that change while GApplication is still unstable ? GApplication is not unstable. It is true that after all the back-and-forth,

Re: GDBus support on Win32 + other platforms (Was Re: GtkApplication and argc/arv)

2011-03-07 Thread Tristan Van Berkom
On Mon, 2011-03-07 at 16:08 -0500, Matthias Clasen wrote: On Mon, Mar 7, 2011 at 1:22 AM, Tristan Van Berkom trista...@openismus.com wrote: On Sat, 2011-02-26 at 10:37 -0500, David Zeuthen wrote: ... do I have to pull out that change while GApplication is still unstable ?

Re: GDBus support on Win32 + other platforms (Was Re: GtkApplication and argc/arv)

2011-03-07 Thread Matthias Clasen
On Mon, Mar 7, 2011 at 4:40 AM, Tristan Van Berkom trista...@openismus.com wrote: As I mentioned before, I'm not asking for an implementation on win32 of GtkApplication, I'm just asking for it to succeed, run a mainloop and do something as a fallback for a missing implementation. So, you are

Re: GDBus support on Win32 + other platforms (Was Re: GtkApplication and argc/arv)

2011-03-07 Thread Paul Davis
On Mon, Mar 7, 2011 at 4:40 AM, Tristan Van Berkom trista...@openismus.com wrote: a.) GtkApplication only available as GtkX11Application is acceptable,     because people only expect it to work on x11 (the actual stubs     should in this case only be created on x11 and the docs should    

Re: GDBus support on Win32 + other platforms (Was Re: GtkApplication and argc/arv)

2011-03-07 Thread Tristan Van Berkom
On Mon, 2011-03-07 at 16:48 -0500, Matthias Clasen wrote: On Mon, Mar 7, 2011 at 4:40 AM, Tristan Van Berkom trista...@openismus.com wrote: As I mentioned before, I'm not asking for an implementation on win32 of GtkApplication, I'm just asking for it to succeed, run a mainloop and do

Re: GDBus support on Win32 + other platforms (Was Re: GtkApplication and argc/arv)

2011-03-07 Thread Emmanuele Bassi
On 2011-03-07 at 18:40, Tristan Van Berkom wrote: Will use of GtkApplication cause my app to simply fail just because a win32/osx implementation is missing ? or will it silently succeed ? there is nothing X11-specific in GApplication or GtkApplication. in fact, if you install D-Bus on OSX or

Re: GDBus support on Win32 + other platforms (Was Re: GtkApplication and argc/arv)

2011-03-07 Thread Tristan Van Berkom
On Mon, 2011-03-07 at 22:52 +, Emmanuele Bassi wrote: On 2011-03-07 at 18:40, Tristan Van Berkom wrote: Will use of GtkApplication cause my app to simply fail just because a win32/osx implementation is missing ? or will it silently succeed ? there is nothing X11-specific in

Re: GDBus support on Win32 + other platforms (Was Re: GtkApplication and argc/arv)

2011-03-07 Thread Matthias Clasen
On Mon, Mar 7, 2011 at 6:17 AM, Tristan Van Berkom trista...@openismus.com wrote:  b.) It's damn easy to make GApplication at least startup      correctly, run the main loop and just not use any IPC,      it's the least I think that one can expect. Then lets the patch already, instead of

Re: GDBus support on Win32 + other platforms (Was Re: GtkApplication and argc/arv)

2011-03-07 Thread Alberto Ruiz
2011/3/7 Matthias Clasen matthias.cla...@gmail.com: On Mon, Mar 7, 2011 at 6:17 AM, Tristan Van Berkom trista...@openismus.com wrote:  b.) It's damn easy to make GApplication at least startup      correctly, run the main loop and just not use any IPC,      it's the least I think that one can

Re: GtkApplication and argc/arv

2011-03-02 Thread Murray Cumming
On Thu, 2011-02-24 at 23:41 +, Emmanuele Bassi wrote: On 2011-02-21 at 21:57, Murray Cumming wrote: I'll leave the other points, as they've received a reply already. 2. How should we use GOptionContext to parse command line arguments from argc/argv when using GtkApplication. Is

Re: GtkApplication and argc/arv

2011-03-02 Thread Alexandre Mazari
On Wed, Mar 2, 2011 at 9:30 AM, Murray Cumming murr...@murrayc.com wrote: On Thu, 2011-02-24 at 23:41 +, Emmanuele Bassi wrote: On 2011-02-21 at 21:57, Murray Cumming wrote: I'll leave the other points, as they've received a reply already. 2. How should we use GOptionContext to parse

Re: GtkApplication and argc/arv

2011-03-02 Thread Emmanuele Bassi
On 2011-03-02 at 09:30, Murray Cumming wrote: • you can defer all command line parsing to the remote instance, by passing the G_APPLICATION_HANDLES_COMMAND_LINE flag to the constructor and by connecting to the ::command-line signal; and example is in the Dictionary:

Re: GtkApplication and argc/arv

2011-03-02 Thread Murray Cumming
On Wed, 2011-03-02 at 10:07 +, Emmanuele Bassi wrote: [snip] Thanks for the suggestion, but why wouldn't you use the GApplication::local_command_line vfunc for local command-line parsing? http://library.gnome.org/devel/gio/unstable/GApplication.html#GApplicationClass.local-command-line

Re: GtkApplication and argc/arv

2011-03-02 Thread Emmanuele Bassi
On 2011-03-03 at 07:18, Murray Cumming wrote: On Wed, 2011-03-02 at 10:07 +, Emmanuele Bassi wrote: [snip] Thanks for the suggestion, but why wouldn't you use the GApplication::local_command_line vfunc for local command-line parsing?

Re: GtkApplication and argc/arv

2011-02-26 Thread David Zeuthen
Hey, On Fri, Feb 25, 2011 at 2:28 PM, Havoc Pennington h...@pobox.com wrote: So upstream's advice is, don't restart, because apps won't handle it. If you want to fix all the apps, you can do so. There are no dbus-daemon changes required. If you really wanted to handle the dbus package got

GDBus support on Win32 + other platforms (Was Re: GtkApplication and argc/arv)

2011-02-26 Thread David Zeuthen
Hi, Just for the record, there's no reason that GDBus cannot be made to work very nicely on Win32 or any other platform we care about. GDBus (and D-Bus itself) was designed with this goal in mind. That is to say, it is possible to make a Win32 build of GLib where GDBus works as expect in both

Re: GDBus support on Win32 + other platforms (Was Re: GtkApplication and argc/arv)

2011-02-26 Thread Paul Davis
On Sat, Feb 26, 2011 at 10:00 AM, David Zeuthen zeut...@gmail.com wrote: Hi, Just for the record, there's no reason that GDBus cannot be made to work very nicely on Win32 or any other platform we care about. GDBus (and D-Bus itself) was designed with this goal in mind. what functionality is

Re: GDBus support on Win32 + other platforms (Was Re: GtkApplication and argc/arv)

2011-02-26 Thread David Zeuthen
Hey, On Sat, Feb 26, 2011 at 10:26 AM, Paul Davis p...@linuxaudiosystems.com wrote: On Sat, Feb 26, 2011 at 10:00 AM, David Zeuthen zeut...@gmail.com wrote: Hi, Just for the record, there's no reason that GDBus cannot be made to work very nicely on Win32 or any other platform we care about.

Re: GtkApplication and argc/arv

2011-02-25 Thread Carlos Garcia Campos
Excerpts from Tristan Van Berkom's message of vie feb 25 00:52:21 +0100 2011: On Fri, Feb 25, 2011 at 8:25 AM, jose.ali...@gmail.com jose.ali...@gmail.com wrote: Hi, On Tue, Feb 22, 2011 at 6:45 AM, Murray Cumming murr...@murrayc.com wrote: On Mon, 2011-02-21 at 21:57 +0100, Murray

Re: GtkApplication and argc/arv

2011-02-25 Thread Murray Cumming
On Thu, 2011-02-24 at 17:51 -0500, Colin Walters wrote: 1. Are we still meant to call gtk_init(argc, argv) when using GtkApplication, which takes argc/argv again via g_application_run(). Or is gtk_init() then superfluous? gtk_init is superfluous, yes; I guess we should mention

Re: GtkApplication and argc/arv

2011-02-25 Thread Claudio Saavedra
On Fri, 2011-02-25 at 08:58 +0100, Carlos Garcia Campos wrote: Just to point out an example, Evince does not use GtkApplication and it's not single instanced (there is one process per each document you see) and I don't think there are plans to make it single instanced. Note that

Re: GtkApplication and argc/arv

2011-02-25 Thread Bastien Nocera
On Thu, 2011-02-24 at 17:51 -0500, Colin Walters wrote: On Mon, Feb 21, 2011 at 3:57 PM, Murray Cumming murr...@murrayc.com wrote: snip 2. How should we use GOptionContext to parse command line arguments from argc/argv when using GtkApplication. Is this the ideal way, using the

Re: GtkApplication and argc/arv

2011-02-25 Thread Morten Welinder
On Thu, Feb 24, 2011 at 5:55 PM, Colin Walters walt...@verbum.org wrote: On Thu, Feb 24, 2011 at 5:15 PM, Morten Welinder mort...@gnome.org wrote: What actual problem was solved by all this infrastructure to keep just one instance? Basically for any application which manipulates private

Re: GtkApplication and argc/arv

2011-02-25 Thread Matthias Clasen
On Thu, Feb 24, 2011 at 8:51 PM, Wen-Yen Chuang ca...@calno.com wrote: Because dbus is slow and unreliable. Starting with this premise is not going to be very useful... D-Bus is generally considered a good thing here. We have other speedy and reliable IPC to be used for single instance apps.

Re: GtkApplication and argc/arv

2011-02-25 Thread Havoc Pennington
Hi, On Thu, Feb 24, 2011 at 8:51 PM, Wen-Yen Chuang ca...@calno.com wrote: a.) restart dbus daemon (and keep everything communicating to dbus    still working) is not supported by upstream in a sensible way.    [1][2][3][4] upstream doesn't support this because it isn't a dbus issue. The

Re: GtkApplication and argc/arv

2011-02-25 Thread Havoc Pennington
Hi, On Fri, Feb 25, 2011 at 9:13 PM, Wen-Yen Chuang ca...@calno.com wrote: I suppose GtkApplication users do not need to handle dbus directly. So if GtkApplication can handle dbus restart / dbus crash, I may also consider using GtkApplication for single instance app. However, the whole

Re: GtkApplication and argc/arv

2011-02-24 Thread Tristan Van Berkom
On Thu, 2011-02-24 at 13:11 +0800, Wen-Yen Chuang wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/24/11 08:41, Tristan Van Berkom wrote: As far as I know, GtkApplication depends on GIO, which should have some extension points for services on different operating systems...

Re: GtkApplication and argc/arv

2011-02-24 Thread Christian Hergert
On Thu, 2011-02-24 at 13:11 +0800, Wen-Yen Chuang wrote: b.) Running multiple versions of the same application For example, running firefox 3.5, 3.6, and 4.0 at the same time. I don't think your example actually works without running each instance using a different firefox user

Re: GtkApplication and argc/arv

2011-02-24 Thread Morten Welinder
There are many other reasons to not use single instance. I agree. d. Running on a different $DISPLAY. Look and you'll find no end of complaints over firefox' inability to do this sanely. e. Running with different locale settings. This happens for Gnumeric when people want different decimal

Re: GtkApplication and argc/arv

2011-02-24 Thread Colin Walters
On Mon, Feb 21, 2011 at 3:57 PM, Murray Cumming murr...@murrayc.com wrote: I'm trying to wrap GtkApplication for gtkmm but I can't really do that until I understand how it's meant to be used. In general, I find the documentation lacks overview and advice, partly because it's spread between

Re: GtkApplication and argc/arv

2011-02-24 Thread Colin Walters
On Thu, Feb 24, 2011 at 5:15 PM, Morten Welinder mort...@gnome.org wrote: What actual problem was solved by all this infrastructure to keep just one instance? Basically for any application which manipulates private files in any form (in Firefox' case, this is the history database), it avoids

Re: GtkApplication and argc/arv

2011-02-24 Thread Tristan Van Berkom
On Fri, Feb 25, 2011 at 8:25 AM, jose.ali...@gmail.com jose.ali...@gmail.com wrote: Hi, On Tue, Feb 22, 2011 at 6:45 AM, Murray Cumming murr...@murrayc.com wrote: On Mon, 2011-02-21 at 21:57 +0100, Murray Cumming wrote: I'm trying to wrap GtkApplication for gtkmm but I can't really do that

Re: GtkApplication and argc/arv

2011-02-24 Thread Wen-Yen Chuang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/24/11 10:58, Tristan Van Berkom wrote: Why do you care what GTK+ uses if you dont have to deal with the dbus apis yourself anyway ? Because dbus is slow and unreliable. a.) restart dbus daemon (and keep everything communicating to dbus

Re: GtkApplication and argc/arv

2011-02-23 Thread Wen-Yen Chuang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Murray Cumming wrote: 3. Will we recommend that all GTK+ applications generally use GtkApplication? As far as I know, GtkApplication depends on dbus. You can not use GtkApplication without dbus. (Please correct me if I am wrong.) So, I think the

Re: GtkApplication and argc/arv

2011-02-23 Thread Tristan Van Berkom
On Wed, Feb 23, 2011 at 12:15 PM, Wen-Yen Chuang ca...@calno.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Murray Cumming wrote: 3. Will we recommend that all GTK+ applications generally use GtkApplication? As far as I know, GtkApplication depends on dbus. You can not use

Re: GtkApplication and argc/arv

2011-02-23 Thread Wen-Yen Chuang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/24/11 08:41, Tristan Van Berkom wrote: As far as I know, GtkApplication depends on GIO, which should have some extension points for services on different operating systems... using dbus on linux (not exactly sure how this works currently in

Re: GtkApplication and argc/arv

2011-02-22 Thread Murray Cumming
On Mon, 2011-02-21 at 21:57 +0100, Murray Cumming wrote: I'm trying to wrap GtkApplication for gtkmm but I can't really do that until I understand how it's meant to be used. In general, I find the documentation lacks overview and advice, partly because it's spread between GApplication and

GtkApplication and argc/arv

2011-02-21 Thread Murray Cumming
I'm trying to wrap GtkApplication for gtkmm but I can't really do that until I understand how it's meant to be used. In general, I find the documentation lacks overview and advice, partly because it's spread between GApplication and GtkApplication and mentions some concepts without explaining