[anjuta] anjuta: Rename Anjuta as AnjutaApplication
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] anjuta: Rename Anjuta as AnjutaApplication
- Date: Sun, 28 Oct 2012 16:31:20 +0000 (UTC)
commit 3a8aba0c73055896c1edec731e3c681f13fde129
Author: SÃbastien Granjoux <seb sfo free fr>
Date: Sat Oct 27 19:27:06 2012 +0200
anjuta: Rename Anjuta as AnjutaApplication
Anjuta is derived from GtkApplication
src/Makefile.am | 4 +-
src/action-callbacks.c | 2 +-
src/{anjuta.c => anjuta-application.c} | 36 ++++++++++++++++----------------
src/{anjuta.h => anjuta-application.h} | 28 ++++++++++++------------
src/main.c | 6 ++--
5 files changed, 38 insertions(+), 38 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 44605b4..da469c4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -35,8 +35,8 @@ bin_PROGRAMS = anjuta
anjuta_SOURCES = \
about.c \
about.h \
- anjuta.c \
- anjuta.h \
+ anjuta-application.c \
+ anjuta-application.h \
anjuta-window.c \
anjuta-window.h \
anjuta-actions.h \
diff --git a/src/action-callbacks.c b/src/action-callbacks.c
index c790995..b91dfef 100644
--- a/src/action-callbacks.c
+++ b/src/action-callbacks.c
@@ -36,7 +36,7 @@
#include "anjuta-window.h"
#include "about.h"
#include "action-callbacks.h"
-#include "anjuta.h"
+#include "anjuta-application.h"
#define TOOLBAR_VISIBLE "toolbar-visible"
diff --git a/src/anjuta.c b/src/anjuta-application.c
similarity index 94%
rename from src/anjuta.c
rename to src/anjuta-application.c
index 130a6d8..a7838f6 100644
--- a/src/anjuta.c
+++ b/src/anjuta-application.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
- * anjuta.c
+ * anjuta-application.c
* Copyright (C) 2000 Naba Kumar <naba gnome org>
*
* This program is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
#include <libanjuta/interfaces/ianjuta-file-loader.h>
#include <libanjuta/interfaces/ianjuta-file.h>
-#include "anjuta.h"
+#include "anjuta-application.h"
#define ANJUTA_REMEMBERED_PLUGINS "remembered-plugins"
#define ANJUTA_SESSION_SKIP_LAST "session-skip-last"
@@ -458,19 +458,19 @@ create_window (GFile **files, int n_files, gboolean no_splash,
/* Application */
-G_DEFINE_TYPE (Anjuta, anjuta, GTK_TYPE_APPLICATION)
+G_DEFINE_TYPE (AnjutaApplication, anjuta_application, GTK_TYPE_APPLICATION)
static void
-anjuta_finalize (GObject *object)
+anjuta_application_finalize (GObject *object)
{
- G_OBJECT_CLASS (anjuta_parent_class)->finalize (object);
+ G_OBJECT_CLASS (anjuta_application_parent_class)->finalize (object);
}
static void
-anjuta_open (GApplication *application,
- GFile **files,
- gint n_files,
- const gchar* hint)
+anjuta_application_open (GApplication *application,
+ GFile **files,
+ gint n_files,
+ const gchar* hint)
{
int i;
GList* windows = gtk_application_get_windows (GTK_APPLICATION (application));
@@ -507,7 +507,7 @@ anjuta_open (GApplication *application,
}
static void
-anjuta_activate (GApplication *application)
+anjuta_application_activate (GApplication *application)
{
/* Show first window */
GList* windows = gtk_application_get_windows (GTK_APPLICATION (application));
@@ -516,29 +516,29 @@ anjuta_activate (GApplication *application)
}
static void
-anjuta_init (Anjuta *anjuta)
+anjuta_application_init (AnjutaApplication *anjuta)
{
}
static void
-anjuta_class_init (AnjutaClass *klass)
+anjuta_application_class_init (AnjutaApplicationClass *klass)
{
GObjectClass* object_class = G_OBJECT_CLASS (klass);
GApplicationClass* app_class = G_APPLICATION_CLASS (klass);
- object_class->finalize = anjuta_finalize;
+ object_class->finalize = anjuta_application_finalize;
- app_class->open = anjuta_open;
- app_class->activate = anjuta_activate;
+ app_class->open = anjuta_application_open;
+ app_class->activate = anjuta_application_activate;
}
-Anjuta*
-anjuta_new (void)
+AnjutaApplication*
+anjuta_application_new (void)
{
g_type_init ();
- return g_object_new (anjuta_get_type (),
+ return g_object_new (anjuta_application_get_type (),
"application-id", "org.gnome.anjuta",
"flags", G_APPLICATION_HANDLES_OPEN,
NULL);
diff --git a/src/anjuta.h b/src/anjuta-application.h
similarity index 57%
rename from src/anjuta.h
rename to src/anjuta-application.h
index 7bcbc23..9385660 100644
--- a/src/anjuta.h
+++ b/src/anjuta-application.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
- * anjuta.h
+ * anjuta-application.h
* Copyright (C) 2000 Naba Kumar <naba gnome org>
*
* This program is free software; you can redistribute it and/or modify it
@@ -18,33 +18,33 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _ANJUTA_H_
-#define _ANJUTA_H_
+#ifndef _ANJUTA_APPLICATION_H_
+#define _ANJUTA_APPLICATION_H_
#include <libanjuta/e-splash.h>
#include "anjuta-window.h"
-#define ANJUTA_TYPE_ANJUTA (anjuta_get_type ())
-#define ANJUTA(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_ANJUTA, Anjuta))
-#define ANJUTA_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), ANJUTA_TYPE_APP, AnjutaClass))
-#define ANJUTA_IS_ANJUTA(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_APP))
-#define ANJUTA_IS_ANJUTA_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_APP))
+#define ANJUTA_TYPE_APPLICATION (anjuta_application_get_type ())
+#define ANJUTA_APPLICATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_APPLICATION, AnjutaApplication))
+#define ANJUTA_APPLICATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), ANJUTA_TYPE_APPLICATION, AnjutaApplicationClass))
+#define ANJUTA_IS_APPLICATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_APPLICATION))
+#define ANJUTA_IS_APPLICATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_APPLICATION))
-typedef struct _Anjuta Anjuta;
-typedef struct _AnjutaClass AnjutaClass;
+typedef struct _AnjutaApplication AnjutaApplication;
+typedef struct _AnjutaApplicationClass AnjutaApplicationClass;
-struct _AnjutaClass
+struct _AnjutaApplicationClass
{
GtkApplicationClass parent;
};
-struct _Anjuta
+struct _AnjutaApplication
{
GtkApplication parent;
};
-GType anjuta_get_type (void);
-Anjuta *anjuta_new (void);
+GType anjuta_application_get_type (void);
+AnjutaApplication *anjuta_application_new (void);
AnjutaWindow*
create_window (GFile **files, int n_files, gboolean no_splash,
diff --git a/src/main.c b/src/main.c
index 064a958..0a209bc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -33,7 +33,7 @@
#include <libanjuta/anjuta-debug.h>
#include <libxml/parser.h>
-#include "anjuta.h"
+#include "anjuta-application.h"
#ifdef ENABLE_NLS
#include <locale.h>
@@ -130,7 +130,7 @@ main (int argc, char *argv[])
{
GOptionContext *context;
GError* error = NULL;
- Anjuta* anjuta;
+ AnjutaApplication* anjuta;
GFile** files = NULL;
gint n_files = 0;
gint status;
@@ -179,7 +179,7 @@ main (int argc, char *argv[])
}
g_set_application_name (_("Anjuta"));
- anjuta = anjuta_new ();
+ anjuta = anjuta_application_new ();
#if GLIB_2_29_2 == 1
if (no_client) g_application_set_flags (G_APPLICATION (anjuta), G_APPLICATION_NON_UNIQUE);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]