From fc5f8ef63a3f4aabb9ff7b1c43cb5ecef96bdeda Mon Sep 17 00:00:00 2001 From: "Gergely POLONKAI (W00d5t0ck)" Date: Tue, 17 Sep 2013 13:26:16 +0200 Subject: [PATCH] Created function ag_app_create_window() for file opening purposes --- src/ag-app.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/ag-app.c b/src/ag-app.c index 4ae4cfd..a228827 100644 --- a/src/ag-app.c +++ b/src/ag-app.c @@ -43,15 +43,22 @@ ag_app_raise(AgApp *app) g_action_group_activate_action(G_ACTION_GROUP(app), "raise", NULL); } -static void -new_window_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data) +static GtkWidget * +ag_app_create_window(AgApp *app) { - AgApp *app = AG_APP(user_data); GtkWidget *window; window = ag_window_new(app); gtk_application_add_window(GTK_APPLICATION(app), GTK_WINDOW(window)); gtk_widget_show_all(window); + + return window; +} + +static void +new_window_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data) +{ + ag_app_create_window(AG_APP(user_data)); } static void