[gtk+/wip/gapplication] Add a default activated implementation
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/gapplication] Add a default activated implementation
- Date: Fri, 4 Jun 2010 05:13:17 +0000 (UTC)
commit f0e13b7c4348182818000d0136bb7276a3e90a97
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jun 4 00:24:07 2010 -0400
Add a default activated implementation
The default behaviour is to present the default window.
gtk/gtkapplication.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 724e8c8..63375ca 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -81,6 +81,16 @@ gtk_application_default_run (GApplication *application)
}
static void
+gtk_application_default_activated (GApplication *application,
+ GVariant *arguments)
+{
+ GtkApplication *app = GTK_APPLICATION (application);
+
+ if (app->priv->default_window != NULL)
+ gtk_window_present (app->priv->default_window);
+}
+
+static void
gtk_application_default_action (GApplication *application,
const gchar *action,
guint timestamp)
@@ -370,6 +380,7 @@ gtk_application_class_init (GtkApplicationClass *klass)
application_class->run = gtk_application_default_run;
application_class->quit = gtk_application_default_quit;
application_class->action = gtk_application_default_action;
+ application_class->activated = gtk_application_default_activated;
g_type_class_add_private (gobject_class, sizeof (GtkApplicationPrivate));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]