[gedit/wip/gtkapp-actions: 4/10] GeditApp: basic window and tab creation
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/gtkapp-actions: 4/10] GeditApp: basic window and tab creation
- Date: Fri, 3 Aug 2012 08:04:31 +0000 (UTC)
commit df4bc0e9d6520f87ca17d5ef8cad19d2f4f5cf04
Author: SÃbastien Wilmet <swilmet gnome org>
Date: Fri Aug 3 07:30:07 2012 +0200
GeditApp: basic window and tab creation
gedit/gedit-app.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index 76518a9..778de0f 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -277,6 +277,18 @@ extension_removed (PeasExtensionSet *extensions,
}
static void
+create_new_window (GeditApp *app)
+{
+ GeditWindow *window;
+
+ gedit_debug_message (DEBUG_APP, "Create main window");
+ window = gedit_app_create_window (app, NULL);
+
+ gedit_debug_message (DEBUG_APP, "Show window");
+ gtk_widget_show (GTK_WIDGET (window));
+}
+
+static void
gedit_app_startup (GApplication *application)
{
GeditApp *app = GEDIT_APP (application);
@@ -353,6 +365,11 @@ gedit_app_startup (GApplication *application)
(PeasExtensionSetForeachFunc) extension_added,
app);
+ /* Create first window */
+ create_new_window (app);
+
+ gedit_debug_message (DEBUG_APP, "Create tab");
+ gedit_window_create_tab (app->priv->active_window, TRUE);
}
static void
@@ -360,6 +377,7 @@ gedit_app_activate (GApplication *application)
{
GeditApp *app = GEDIT_APP (application);
+ gtk_window_present (GTK_WINDOW (app->priv->active_window));
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]