[gtkmm-documentation] Clipboard and Socket examples: Make them non-unique.
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm-documentation] Clipboard and Socket examples: Make them non-unique.
- Date: Wed, 29 Aug 2012 18:09:23 +0000 (UTC)
commit 12b053a292ae872da7eaefc0e28ef9d16132ae39
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Wed Aug 29 19:36:51 2012 +0200
Clipboard and Socket examples: Make them non-unique.
* examples/book/clipboard/ideal/main.cc:
* examples/book/clipboard/simple/main.cc: Add Gio::APPLICATION_NON_UNIQUE to
the calls to Gtk::Application::create(), so several instances can run
simultaneously.
* examples/book/socket/plug.cc:
* examples/book/socket/socket.cc: Give plug and socket different application
ids, so they can run simultaneously. Bug #681323.
ChangeLog | 12 ++++++++++++
examples/book/clipboard/ideal/main.cc | 5 ++++-
examples/book/clipboard/simple/main.cc | 5 ++++-
examples/book/socket/plug.cc | 5 ++++-
examples/book/socket/socket.cc | 5 ++++-
5 files changed, 28 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1c310b5..b2f482c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2012-08-29 Kjell Ahlstedt <kjell ahlstedt bredband net>
+
+ Clipboard and Socket examples: Make them non-unique.
+
+ * examples/book/clipboard/ideal/main.cc:
+ * examples/book/clipboard/simple/main.cc: Add Gio::APPLICATION_NON_UNIQUE to
+ the calls to Gtk::Application::create(), so several instances can run
+ simultaneously.
+ * examples/book/socket/plug.cc:
+ * examples/book/socket/socket.cc: Give plug and socket different application
+ ids, so they can run simultaneously. Bug #681323.
+
2012-08-16 Kjell Ahlstedt <kjell ahlstedt bredband net>
Basics, Simple Example: Synchronize code and description.
diff --git a/examples/book/clipboard/ideal/main.cc b/examples/book/clipboard/ideal/main.cc
index 3c36987..e3ea615 100644
--- a/examples/book/clipboard/ideal/main.cc
+++ b/examples/book/clipboard/ideal/main.cc
@@ -21,7 +21,10 @@
int main(int argc, char *argv[])
{
- Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(argc, argv, "org.gtkmm.example");
+ //APPLICATION_NON_UNIQUE because it shall be possible to run several
+ //instances of this application simultaneously.
+ Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(
+ argc, argv, "org.gtkmm.example", Gio::APPLICATION_NON_UNIQUE);
ExampleWindow window;
diff --git a/examples/book/clipboard/simple/main.cc b/examples/book/clipboard/simple/main.cc
index 3c36987..e3ea615 100644
--- a/examples/book/clipboard/simple/main.cc
+++ b/examples/book/clipboard/simple/main.cc
@@ -21,7 +21,10 @@
int main(int argc, char *argv[])
{
- Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(argc, argv, "org.gtkmm.example");
+ //APPLICATION_NON_UNIQUE because it shall be possible to run several
+ //instances of this application simultaneously.
+ Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(
+ argc, argv, "org.gtkmm.example", Gio::APPLICATION_NON_UNIQUE);
ExampleWindow window;
diff --git a/examples/book/socket/plug.cc b/examples/book/socket/plug.cc
index 67823f7..fd8727a 100644
--- a/examples/book/socket/plug.cc
+++ b/examples/book/socket/plug.cc
@@ -33,7 +33,10 @@ class MyPlug : public Gtk::Plug
int main(int argc, char** argv)
{
- Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(argc, argv, "org.gtkmm.example");
+ // The plug and the socket have different application ids, so they can run
+ // simultaneously.
+ Glib::RefPtr<Gtk::Application> app =
+ Gtk::Application::create(argc, argv, "org.gtkmm.example.plug");
MyPlug plug;
plug.show();
diff --git a/examples/book/socket/socket.cc b/examples/book/socket/socket.cc
index 1c43dca..e6996c5 100644
--- a/examples/book/socket/socket.cc
+++ b/examples/book/socket/socket.cc
@@ -50,7 +50,10 @@ class MySocketWindow : public Gtk::Window
int main(int argc, char** argv)
{
- Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(argc, argv, "org.gtkmm.example");
+ // The plug and the socket have different application ids, so they can run
+ // simultaneously.
+ Glib::RefPtr<Gtk::Application> app =
+ Gtk::Application::create(argc, argv, "org.gtkmm.example.socket");
MySocketWindow win;
app->run(win);
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]