[gtranslator] Refactor all methods from gtranslator* to gtr*
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtranslator] Refactor all methods from gtranslator* to gtr*
- Date: Sun, 7 Feb 2010 20:32:57 +0000 (UTC)
commit cdc6aff9e8ff0b2a67969a4a908587d852fc1af4
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sun Feb 7 21:11:50 2010 +0100
Refactor all methods from gtranslator* to gtr*
src/dialogs/gtr-assistant.c | 58 ++--
src/dialogs/gtr-assistant.h | 8 +-
src/dialogs/gtr-close-confirmation-dialog.c | 36 +-
src/dialogs/gtr-close-confirmation-dialog.h | 18 +-
src/dialogs/gtr-comment-dialog.c | 36 +-
src/dialogs/gtr-comment-dialog.h | 8 +-
src/dialogs/gtr-file-dialogs.c | 2 +-
src/dialogs/gtr-file-dialogs.h | 2 +-
src/dialogs/gtr-header-dialog.c | 66 ++--
src/dialogs/gtr-header-dialog.h | 8 +-
src/dialogs/gtr-jump-dialog.c | 28 +-
src/dialogs/gtr-jump-dialog.h | 8 +-
src/dialogs/gtr-preferences-dialog.c | 174 ++++----
src/dialogs/gtr-preferences-dialog.h | 12 +-
src/dialogs/gtr-profile-dialog.c | 164 ++++----
src/dialogs/gtr-profile-dialog.h | 8 +-
src/dialogs/gtr-search-dialog.c | 94 +++---
src/dialogs/gtr-search-dialog.h | 50 ++--
src/gtr-actions-documents.c | 12 +-
src/gtr-actions-edit.c | 64 ++--
src/gtr-actions-file.c | 168 ++++----
src/gtr-actions-go.c | 84 ++--
src/gtr-actions-help.c | 28 +-
src/gtr-actions-search.c | 170 ++++----
src/gtr-actions-view.c | 16 +-
src/gtr-actions.h | 82 ++--
src/gtr-application.c | 138 ++++---
src/gtr-application.h | 38 +-
src/gtr-context.c | 30 +-
src/gtr-context.h | 10 +-
src/gtr-dirs.c | 32 +-
src/gtr-dirs.h | 24 +-
src/gtr-header.c | 178 ++++----
src/gtr-header.h | 58 ++--
src/gtr-history-entry.c | 74 ++--
src/gtr-history-entry.h | 30 +-
src/gtr-message-table-model.c | 81 ++--
src/gtr-message-table-model.h | 12 +-
src/gtr-message-table.c | 78 ++--
src/gtr-message-table.h | 12 +-
src/gtr-msg.c | 154 ++++----
src/gtr-msg.h | 62 ++--
src/gtr-notebook.c | 36 +-
src/gtr-notebook.h | 14 +-
src/gtr-po.c | 190 +++++-----
src/gtr-po.h | 74 ++--
src/gtr-prefs-manager-app.c | 182 ++++----
src/gtr-prefs-manager-app.h | 40 +-
src/gtr-prefs-manager-private.h | 4 +-
src/gtr-prefs-manager.c | 114 +++---
src/gtr-prefs-manager.h | 86 ++--
src/gtr-profile.c | 84 ++--
src/gtr-profile.h | 56 ++--
src/gtr-statusbar.c | 56 ++--
src/gtr-statusbar.h | 26 +-
src/gtr-tab.c | 430 ++++++++++----------
src/gtr-tab.h | 74 ++--
src/gtr-utils.c | 68 ++--
src/gtr-utils.h | 50 ++--
src/gtr-view.c | 110 +++---
src/gtr-view.h | 28 +-
src/gtr-window.c | 402 +++++++++---------
src/gtr-window.h | 38 +-
src/main.c | 28 +-
src/plugin-system/gtr-module.c | 50 ++--
src/plugin-system/gtr-module.h | 18 +-
src/plugin-system/gtr-plugin-info-priv.h | 12 +-
src/plugin-system/gtr-plugin-info.c | 50 ++--
src/plugin-system/gtr-plugin-info.h | 30 +-
src/plugin-system/gtr-plugin-manager.c | 118 +++---
src/plugin-system/gtr-plugin-manager.h | 12 +-
src/plugin-system/gtr-plugin.c | 32 +-
src/plugin-system/gtr-plugin.h | 30 +-
src/plugin-system/gtr-plugins-engine.c | 128 +++---
src/plugin-system/gtr-plugins-engine.h | 26 +-
src/translation-memory/berkeley/gtr-berkeley.c | 92 ++--
src/translation-memory/berkeley/gtr-berkeley.h | 8 +-
src/translation-memory/berkeley/gtr-db-base.c | 28 +-
src/translation-memory/berkeley/gtr-db-base.h | 14 +-
src/translation-memory/berkeley/gtr-db-keys.c | 30 +-
src/translation-memory/berkeley/gtr-db-keys.h | 16 +-
src/translation-memory/berkeley/gtr-db-orig.c | 34 +-
src/translation-memory/berkeley/gtr-db-orig.h | 12 +-
src/translation-memory/berkeley/gtr-db-trans.c | 42 +-
src/translation-memory/berkeley/gtr-db-trans.h | 14 +-
src/translation-memory/berkeley/gtr-db-words.c | 36 +-
src/translation-memory/berkeley/gtr-db-words.h | 12 +-
src/translation-memory/gtr-translation-memory-ui.c | 42 +-
src/translation-memory/gtr-translation-memory-ui.h | 8 +-
src/translation-memory/gtr-translation-memory.c | 48 ++--
src/translation-memory/gtr-translation-memory.h | 14 +-
91 files changed, 2778 insertions(+), 2783 deletions(-)
---
diff --git a/src/dialogs/gtr-assistant.c b/src/dialogs/gtr-assistant.c
index cfcc97a..9856c5d 100644
--- a/src/dialogs/gtr-assistant.c
+++ b/src/dialogs/gtr-assistant.c
@@ -45,7 +45,7 @@
GtrAssistantPrivate))
-G_DEFINE_TYPE (GtrAssistant, gtranslator_assistant,
+G_DEFINE_TYPE (GtrAssistant, gtr_assistant,
GTK_TYPE_ASSISTANT)
struct _GtrAssistantPrivate
@@ -102,25 +102,25 @@ add_to_database (gpointer data_pointer)
GError *error = NULL;
GtrPo *po;
- po = gtranslator_po_new ();
+ po = gtr_po_new ();
location = (GFile *) l->data;
- gtranslator_po_parse (po, location, &error);
+ gtr_po_parse (po, location, &error);
if (error)
return TRUE;
- msg_list = gtranslator_po_get_messages (po);
+ msg_list = gtr_po_get_messages (po);
for (l2 = msg_list; l2; l2 = g_list_next (l2))
{
GtrMsg *msg;
msg = GTR_MSG (l2->data);
- if (gtranslator_msg_is_translated (msg))
- gtranslator_translation_memory_store (data->tm,
- gtranslator_msg_get_msgid
+ if (gtr_msg_is_translated (msg))
+ gtr_translation_memory_store (data->tm,
+ gtr_msg_get_msgid
(msg),
- gtranslator_msg_get_msgstr
+ gtr_msg_get_msgstr
(msg));
}
@@ -197,56 +197,56 @@ on_assistant_apply (GtkAssistant * assistant)
GList *profiles_list;
gulong close_signal_id;
- profile = gtranslator_profile_new ();
+ profile = gtr_profile_new ();
- gtranslator_profile_set_name (profile,
+ gtr_profile_set_name (profile,
gtk_entry_get_text (GTK_ENTRY
(as->priv->
profile_name)));
- gtranslator_profile_set_author_name (profile,
+ gtr_profile_set_author_name (profile,
gtk_entry_get_text (GTK_ENTRY
(as->priv->name)));
- gtranslator_profile_set_author_email (profile,
+ gtr_profile_set_author_email (profile,
gtk_entry_get_text (GTK_ENTRY
(as->priv->
email)));
- gtranslator_profile_set_language_name (profile,
+ gtr_profile_set_language_name (profile,
gtk_entry_get_text (GTK_ENTRY
(as->priv->
language)));
- gtranslator_profile_set_language_code (profile,
+ gtr_profile_set_language_code (profile,
gtk_entry_get_text (GTK_ENTRY
(as->priv->
lang_code)));
- gtranslator_profile_set_group_email (profile,
+ gtr_profile_set_group_email (profile,
gtk_entry_get_text (GTK_ENTRY
(as->priv->
team_email)));
- gtranslator_profile_set_charset (profile,
+ gtr_profile_set_charset (profile,
gtk_entry_get_text (GTK_ENTRY
(as->priv->charset)));
- gtranslator_profile_set_encoding (profile,
+ gtr_profile_set_encoding (profile,
gtk_entry_get_text (GTK_ENTRY
(as->priv->
trans_enc)));
- gtranslator_profile_set_plurals (profile,
+ gtr_profile_set_plurals (profile,
gtk_entry_get_text (GTK_ENTRY
(as->priv->
plural_form)));
- gtranslator_application_set_active_profile (GTR_APP, profile);
+ gtr_application_set_active_profile (GTR_APP, profile);
- profiles_list = gtranslator_application_get_profiles (GTR_APP);
+ profiles_list = gtr_application_get_profiles (GTR_APP);
- gtranslator_application_set_profiles (GTR_APP,
+ gtr_application_set_profiles (GTR_APP,
g_list_append (profiles_list,
profile));
@@ -267,10 +267,10 @@ on_assistant_apply (GtkAssistant * assistant)
po_name = gtk_entry_get_text (GTK_ENTRY (as->priv->po_name));
- gtranslator_utils_scan_dir (dir, &data->list, po_name);
+ gtr_utils_scan_dir (dir, &data->list, po_name);
data->tm =
- GTR_TRANSLATION_MEMORY (gtranslator_application_get_translation_memory
+ GTR_TRANSLATION_MEMORY (gtr_application_get_translation_memory
(GTR_APP));
data->progress = GTK_PROGRESS_BAR (as->priv->add_db_progressbar);
data->parent = GTK_WINDOW (as);
@@ -796,7 +796,7 @@ create_finish_page (GtrAssistant * as)
}
static void
-gtranslator_assistant_init (GtrAssistant * as)
+gtr_assistant_init (GtrAssistant * as)
{
as->priv = GTR_ASSISTANT_GET_PRIVATE (as);
@@ -812,20 +812,20 @@ gtranslator_assistant_init (GtrAssistant * as)
}
static void
-gtranslator_assistant_finalize (GObject * object)
+gtr_assistant_finalize (GObject * object)
{
- G_OBJECT_CLASS (gtranslator_assistant_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_assistant_parent_class)->finalize (object);
}
static void
-gtranslator_assistant_class_init (GtrAssistantClass * klass)
+gtr_assistant_class_init (GtrAssistantClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkAssistantClass *assistant_class = GTK_ASSISTANT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrAssistantPrivate));
- object_class->finalize = gtranslator_assistant_finalize;
+ object_class->finalize = gtr_assistant_finalize;
assistant_class->prepare = on_assistant_prepare;
assistant_class->apply = on_assistant_apply;
assistant_class->cancel = on_assistant_cancel;
@@ -833,7 +833,7 @@ gtranslator_assistant_class_init (GtrAssistantClass * klass)
}
void
-gtranslator_show_assistant (GtrWindow * window)
+gtr_show_assistant (GtrWindow * window)
{
static GtrAssistant *assist = NULL;
diff --git a/src/dialogs/gtr-assistant.h b/src/dialogs/gtr-assistant.h
index 18c0363..e71d304 100644
--- a/src/dialogs/gtr-assistant.h
+++ b/src/dialogs/gtr-assistant.h
@@ -29,7 +29,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_ASSISTANT (gtranslator_assistant_get_type ())
+#define GTR_TYPE_ASSISTANT (gtr_assistant_get_type ())
#define GTR_ASSISTANT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_ASSISTANT, GtrAssistant))
#define GTR_ASSISTANT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_ASSISTANT, GtrAssistantClass))
#define GTR_IS_ASSISTANT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_ASSISTANT))
@@ -65,12 +65,12 @@ struct _GtrAssistantClass
* Public methods
*/
GType
-gtranslator_assistant_get_type (void)
+gtr_assistant_get_type (void)
G_GNUC_CONST;
- GType gtranslator_assistant_register_type (GTypeModule * module);
+ GType gtr_assistant_register_type (GTypeModule * module);
- void gtranslator_show_assistant (GtrWindow * window);
+ void gtr_show_assistant (GtrWindow * window);
G_END_DECLS
#endif /* __ASSISTANT_H__ */
diff --git a/src/dialogs/gtr-close-confirmation-dialog.c b/src/dialogs/gtr-close-confirmation-dialog.c
index f6b32bb..f91cf3f 100644
--- a/src/dialogs/gtr-close-confirmation-dialog.c
+++ b/src/dialogs/gtr-close-confirmation-dialog.c
@@ -1,5 +1,5 @@
/*
- * gtranslator-close-confirmation-dialog.c
+ * gtr-close-confirmation-dialog.c
* This file is part of gtranslator
*
* Copyright (C) 2004-2005 GNOME Foundation
@@ -80,7 +80,7 @@ struct _GtrCloseConfirmationDialogPrivate
SINGLE_DOC_MODE : MULTIPLE_DOCS_MODE)
G_DEFINE_TYPE (GtrCloseConfirmationDialog,
- gtranslator_close_confirmation_dialog, GTK_TYPE_DIALOG)
+ gtr_close_confirmation_dialog, GTK_TYPE_DIALOG)
static void set_unsaved_document (GtrCloseConfirmationDialog *
dlg, const GList * list);
@@ -136,7 +136,7 @@ set_logout_mode (GtrCloseConfirmationDialog * dlg,
}
static void
-gtranslator_close_confirmation_dialog_init (GtrCloseConfirmationDialog
+gtr_close_confirmation_dialog_init (GtrCloseConfirmationDialog
* dlg)
{
AtkObject *atk_obj;
@@ -162,7 +162,7 @@ gtranslator_close_confirmation_dialog_init (GtrCloseConfirmationDialog
}
static void
-gtranslator_close_confirmation_dialog_finalize (GObject * object)
+gtr_close_confirmation_dialog_finalize (GObject * object)
{
GtrCloseConfirmationDialogPrivate *priv;
@@ -175,12 +175,12 @@ gtranslator_close_confirmation_dialog_finalize (GObject * object)
g_list_free (priv->selected_documents);
/* Call the parent's destructor */
- G_OBJECT_CLASS (gtranslator_close_confirmation_dialog_parent_class)->
+ G_OBJECT_CLASS (gtr_close_confirmation_dialog_parent_class)->
finalize (object);
}
static void
-gtranslator_close_confirmation_dialog_set_property (GObject * object,
+gtr_close_confirmation_dialog_set_property (GObject * object,
guint prop_id,
const GValue * value,
GParamSpec * pspec)
@@ -206,7 +206,7 @@ gtranslator_close_confirmation_dialog_set_property (GObject * object,
}
static void
-gtranslator_close_confirmation_dialog_get_property (GObject * object,
+gtr_close_confirmation_dialog_get_property (GObject * object,
guint prop_id,
GValue * value,
GParamSpec * pspec)
@@ -232,16 +232,16 @@ gtranslator_close_confirmation_dialog_get_property (GObject * object,
}
static void
-gtranslator_close_confirmation_dialog_class_init
+gtr_close_confirmation_dialog_class_init
(GtrCloseConfirmationDialogClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->set_property =
- gtranslator_close_confirmation_dialog_set_property;
+ gtr_close_confirmation_dialog_set_property;
gobject_class->get_property =
- gtranslator_close_confirmation_dialog_get_property;
- gobject_class->finalize = gtranslator_close_confirmation_dialog_finalize;
+ gtr_close_confirmation_dialog_get_property;
+ gobject_class->finalize = gtr_close_confirmation_dialog_finalize;
g_type_class_add_private (klass,
sizeof
@@ -294,7 +294,7 @@ get_selected_docs (GtkTreeModel * store)
}
GList *
-gtranslator_close_confirmation_dialog_get_selected_documents
+gtr_close_confirmation_dialog_get_selected_documents
(GtrCloseConfirmationDialog * dlg)
{
g_return_val_if_fail (GTR_IS_CLOSE_CONFIRMATION_DIALOG (dlg), NULL);
@@ -303,7 +303,7 @@ gtranslator_close_confirmation_dialog_get_selected_documents
}
GtkWidget *
-gtranslator_close_confirmation_dialog_new (GtkWindow * parent,
+gtr_close_confirmation_dialog_new (GtkWindow * parent,
GList * unsaved_documents,
gboolean logout_mode)
{
@@ -324,7 +324,7 @@ gtranslator_close_confirmation_dialog_new (GtkWindow * parent,
}
GtkWidget *
-gtranslator_close_confirmation_dialog_new_single (GtkWindow * parent,
+gtr_close_confirmation_dialog_new_single (GtkWindow * parent,
GtrPo * doc,
gboolean logout_mode)
{
@@ -334,7 +334,7 @@ gtranslator_close_confirmation_dialog_new_single (GtkWindow * parent,
unsaved_documents = g_list_prepend (NULL, doc);
- dlg = gtranslator_close_confirmation_dialog_new (parent,
+ dlg = gtr_close_confirmation_dialog_new (parent,
unsaved_documents,
logout_mode);
@@ -371,7 +371,7 @@ build_single_doc_dialog (GtrCloseConfirmationDialog * dlg)
gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5);
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
- location = gtranslator_po_get_location (doc);
+ location = gtr_po_get_location (doc);
doc_name = g_file_get_path (location);
g_object_unref (location);
@@ -419,7 +419,7 @@ populate_model (GtkTreeModel * store, GList * docs)
po = GTR_PO (docs->data);
- location = gtranslator_po_get_location (po);
+ location = gtr_po_get_location (po);
name = g_file_get_path (location);
g_object_unref (location);
@@ -631,7 +631,7 @@ set_unsaved_document (GtrCloseConfirmationDialog * dlg,
}
const GList *
-gtranslator_close_confirmation_dialog_get_unsaved_documents
+gtr_close_confirmation_dialog_get_unsaved_documents
(GtrCloseConfirmationDialog * dlg)
{
g_return_val_if_fail (GTR_IS_CLOSE_CONFIRMATION_DIALOG (dlg), NULL);
diff --git a/src/dialogs/gtr-close-confirmation-dialog.h b/src/dialogs/gtr-close-confirmation-dialog.h
index 3cfc73c..a93d0c9 100644
--- a/src/dialogs/gtr-close-confirmation-dialog.h
+++ b/src/dialogs/gtr-close-confirmation-dialog.h
@@ -1,5 +1,5 @@
/*
- * gtranslator-close-confirmation-dialog.h
+ * gtr-close-confirmation-dialog.h
* This file is part of gtranslator
*
* Copyright (C) 2004-2005 GNOME Foundation
@@ -21,8 +21,8 @@
*/
/*
- * Modified by the gtranslator Team, 2004-2005. See the AUTHORS file for a
- * list of people on the gtranslator Team.
+ * Modified by the gedit Team, 2004-2005. See the AUTHORS file for a
+ * list of people on the gtr Team.
* See the ChangeLog files for a list of changes.
*/
@@ -34,7 +34,7 @@
#include "gtr-po.h"
-#define GTR_TYPE_CLOSE_CONFIRMATION_DIALOG (gtranslator_close_confirmation_dialog_get_type ())
+#define GTR_TYPE_CLOSE_CONFIRMATION_DIALOG (gtr_close_confirmation_dialog_get_type ())
#define GTR_CLOSE_CONFIRMATION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTR_TYPE_CLOSE_CONFIRMATION_DIALOG, GtrCloseConfirmationDialog))
#define GTR_CLOSE_CONFIRMATION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTR_TYPE_CLOSE_CONFIRMATION_DIALOG, GtrCloseConfirmationDialogClass))
#define GTR_IS_CLOSE_CONFIRMATION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTR_TYPE_CLOSE_CONFIRMATION_DIALOG))
@@ -62,15 +62,15 @@ struct _GtrCloseConfirmationDialogClass
};
GType
-gtranslator_close_confirmation_dialog_get_type (void)
+gtr_close_confirmation_dialog_get_type (void)
G_GNUC_CONST;
- GtkWidget *gtranslator_close_confirmation_dialog_new (GtkWindow * parent,
+ GtkWidget *gtr_close_confirmation_dialog_new (GtkWindow * parent,
GList *
unsaved_documents,
gboolean
logout_mode);
- GtkWidget *gtranslator_close_confirmation_dialog_new_single (GtkWindow *
+ GtkWidget *gtr_close_confirmation_dialog_new_single (GtkWindow *
parent,
GtrPo
* doc,
@@ -78,11 +78,11 @@ gtranslator_close_confirmation_dialog_get_type (void)
logout_mode);
const GList
- *gtranslator_close_confirmation_dialog_get_unsaved_documents
+ *gtr_close_confirmation_dialog_get_unsaved_documents
(GtrCloseConfirmationDialog * dlg);
GList
- *gtranslator_close_confirmation_dialog_get_selected_documents
+ *gtr_close_confirmation_dialog_get_selected_documents
(GtrCloseConfirmationDialog * dlg);
#endif /* __GTR_CLOSE_CONFIRMATION_DIALOG_H__ */
diff --git a/src/dialogs/gtr-comment-dialog.c b/src/dialogs/gtr-comment-dialog.c
index 4782744..3c36824 100644
--- a/src/dialogs/gtr-comment-dialog.c
+++ b/src/dialogs/gtr-comment-dialog.c
@@ -39,7 +39,7 @@
GtrCommentDialogPrivate))
-G_DEFINE_TYPE (GtrCommentDialog, gtranslator_comment_dialog,
+G_DEFINE_TYPE (GtrCommentDialog, gtr_comment_dialog,
GTK_TYPE_DIALOG)
struct _GtrCommentDialogPrivate
{
@@ -56,15 +56,15 @@ G_DEFINE_TYPE (GtrCommentDialog, gtranslator_comment_dialog,
GtrPo *po;
GList *msg;
- tab = gtranslator_window_get_active_tab (window);
- po = gtranslator_tab_get_po (tab);
- msg = gtranslator_po_get_current_message (po);
+ tab = gtr_window_get_active_tab (window);
+ po = gtr_tab_get_po (tab);
+ msg = gtr_po_get_current_message (po);
gtk_text_buffer_get_bounds (buffer, &start, &end);
text = gtk_text_buffer_get_text (buffer, &start, &end, TRUE);
- gtranslator_msg_set_comment (msg->data, text);
- gtranslator_po_set_state (po, GTR_PO_STATE_MODIFIED);
+ gtr_msg_set_comment (msg->data, text);
+ gtr_po_set_state (po, GTR_PO_STATE_MODIFIED);
}
static void
@@ -78,7 +78,7 @@ dialog_response_handler (GtkDialog * dlg, gint res_id)
}
static void
-gtranslator_comment_dialog_init (GtrCommentDialog * dlg)
+gtr_comment_dialog_init (GtrCommentDialog * dlg)
{
gboolean ret;
GtkWidget *error_widget;
@@ -110,8 +110,8 @@ gtranslator_comment_dialog_init (GtrCommentDialog * dlg)
"response", G_CALLBACK (dialog_response_handler), NULL);
/*Glade */
- path = gtranslator_dirs_get_ui_file ("gtr-comment-dialog.ui");
- ret = gtranslator_utils_get_ui_objects (path,
+ path = gtr_dirs_get_ui_file ("gtr-comment-dialog.ui");
+ ret = gtr_utils_get_ui_objects (path,
root_objects,
&error_widget,
"main_box", &dlg->priv->main_box,
@@ -136,29 +136,29 @@ gtranslator_comment_dialog_init (GtrCommentDialog * dlg)
}
static void
-gtranslator_comment_dialog_finalize (GObject * object)
+gtr_comment_dialog_finalize (GObject * object)
{
- G_OBJECT_CLASS (gtranslator_comment_dialog_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_comment_dialog_parent_class)->finalize (object);
}
static void
-gtranslator_comment_dialog_class_init (GtrCommentDialogClass * klass)
+gtr_comment_dialog_class_init (GtrCommentDialogClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrCommentDialogPrivate));
- object_class->finalize = gtranslator_comment_dialog_finalize;
+ object_class->finalize = gtr_comment_dialog_finalize;
}
void
-gtranslator_show_comment_dialog (GtrWindow * window)
+gtr_show_comment_dialog (GtrWindow * window)
{
static GtrCommentDialog *dlg = NULL;
static GtkTextBuffer *buf;
- GtrTab *tab = gtranslator_window_get_active_tab (window);
- GtrPo *po = gtranslator_tab_get_po (tab);
- GList *msg = gtranslator_po_get_current_message (po);
+ GtrTab *tab = gtr_window_get_active_tab (window);
+ GtrPo *po = gtr_tab_get_po (tab);
+ GList *msg = gtr_po_get_current_message (po);
g_return_if_fail (GTR_IS_WINDOW (window));
@@ -174,7 +174,7 @@ gtranslator_show_comment_dialog (GtrWindow * window)
gtk_widget_show (GTK_WIDGET (dlg));
}
- gtk_text_buffer_set_text (buf, gtranslator_msg_get_comment (msg->data), -1);
+ gtk_text_buffer_set_text (buf, gtr_msg_get_comment (msg->data), -1);
if (GTK_WINDOW (window) != gtk_window_get_transient_for (GTK_WINDOW (dlg)))
{
diff --git a/src/dialogs/gtr-comment-dialog.h b/src/dialogs/gtr-comment-dialog.h
index d39c816..11b2bb4 100644
--- a/src/dialogs/gtr-comment-dialog.h
+++ b/src/dialogs/gtr-comment-dialog.h
@@ -30,7 +30,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_COMMENT_DIALOG (gtranslator_comment_dialog_get_type ())
+#define GTR_TYPE_COMMENT_DIALOG (gtr_comment_dialog_get_type ())
#define GTR_COMMENT_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_COMMENT_DIALOG, GtrCommentDialog))
#define GTR_COMMENT_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_COMMENT_DIALOG, GtrCommentDialogClass))
#define GTR_IS_COMMENT_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_COMMENT_DIALOG))
@@ -67,12 +67,12 @@ struct _GtrCommentDialogClass
* Public methods
*/
GType
-gtranslator_comment_dialog_get_type (void)
+gtr_comment_dialog_get_type (void)
G_GNUC_CONST;
- GType gtranslator_comment_dialog_register_type (GTypeModule * module);
+ GType gtr_comment_dialog_register_type (GTypeModule * module);
- void gtranslator_show_comment_dialog (GtrWindow * window);
+ void gtr_show_comment_dialog (GtrWindow * window);
G_END_DECLS
#endif /* __COMMENT_DIALOG_H__ */
diff --git a/src/dialogs/gtr-file-dialogs.c b/src/dialogs/gtr-file-dialogs.c
index 06b0375..23edbd9 100644
--- a/src/dialogs/gtr-file-dialogs.c
+++ b/src/dialogs/gtr-file-dialogs.c
@@ -29,7 +29,7 @@
* File chooser dialog
*/
GtkWidget *
-gtranslator_file_chooser_new (GtkWindow * parent,
+gtr_file_chooser_new (GtkWindow * parent,
FileselMode mode,
const gchar * title, const gchar * dir)
{
diff --git a/src/dialogs/gtr-file-dialogs.h b/src/dialogs/gtr-file-dialogs.h
index 0390f2e..a559ce6 100644
--- a/src/dialogs/gtr-file-dialogs.h
+++ b/src/dialogs/gtr-file-dialogs.h
@@ -29,7 +29,7 @@ typedef enum
FILESEL_SAVE
} FileselMode;
-GtkWidget *gtranslator_file_chooser_new (GtkWindow * parent,
+GtkWidget *gtr_file_chooser_new (GtkWindow * parent,
FileselMode mode,
const gchar * title,
const gchar * dir);
diff --git a/src/dialogs/gtr-header-dialog.c b/src/dialogs/gtr-header-dialog.c
index a9dfd9e..b46f6ff 100644
--- a/src/dialogs/gtr-header-dialog.c
+++ b/src/dialogs/gtr-header-dialog.c
@@ -39,7 +39,7 @@
GTR_TYPE_HEADER_DIALOG, \
GtrHeaderDialogPrivate))
-G_DEFINE_TYPE (GtrHeaderDialog, gtranslator_header_dialog,
+G_DEFINE_TYPE (GtrHeaderDialog, gtr_header_dialog,
GTK_TYPE_DIALOG)
struct _GtrHeaderDialogPrivate
@@ -69,19 +69,19 @@ struct _GtrHeaderDialogPrivate
};
static void
-gtranslator_header_dialog_finalize (GObject *object)
+gtr_header_dialog_finalize (GObject *object)
{
- G_OBJECT_CLASS (gtranslator_header_dialog_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_header_dialog_parent_class)->finalize (object);
}
static void
-gtranslator_header_dialog_class_init (GtrHeaderDialogClass *klass)
+gtr_header_dialog_class_init (GtrHeaderDialogClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrHeaderDialogPrivate));
- object_class->finalize = gtranslator_header_dialog_finalize;
+ object_class->finalize = gtr_header_dialog_finalize;
}
static void
@@ -94,7 +94,7 @@ take_my_options_checkbutton_toggled (GtkToggleButton *button,
active = gtk_toggle_button_get_active (button);
- gtranslator_prefs_manager_set_use_profile_values (active);
+ gtr_prefs_manager_set_use_profile_values (active);
gtk_widget_set_sensitive (dlg->priv->translator, !active);
gtk_widget_set_sensitive (dlg->priv->tr_email, !active);
@@ -115,7 +115,7 @@ prj_comment_changed (GtkTextBuffer * buffer,
if (text)
{
- gtranslator_header_set_comments (dlg->priv->header, text);
+ gtr_header_set_comments (dlg->priv->header, text);
g_free (text);
}
}
@@ -129,7 +129,7 @@ prj_id_version_changed (GtkWidget *widget,
text = gtk_entry_get_text (GTK_ENTRY (widget));
if (text)
- gtranslator_header_set_prj_id_version (dlg->priv->header, text);
+ gtr_header_set_prj_id_version (dlg->priv->header, text);
}
static void
@@ -141,7 +141,7 @@ rmbt_changed (GtkWidget *widget,
text = gtk_entry_get_text (GTK_ENTRY (widget));
if (text)
- gtranslator_header_set_rmbt (dlg->priv->header, text);
+ gtr_header_set_rmbt (dlg->priv->header, text);
}
static void
@@ -154,7 +154,7 @@ translator_changed (GtkWidget *widget,
email = gtk_entry_get_text (GTK_ENTRY (dlg->priv->tr_email));
if (name && email)
- gtranslator_header_set_translator (dlg->priv->header, name, email);
+ gtr_header_set_translator (dlg->priv->header, name, email);
}
static void
@@ -167,11 +167,11 @@ language_changed (GtkWidget *widget,
lg_email = gtk_entry_get_text (GTK_ENTRY (dlg->priv->lg_email));
if (language && lg_email)
- gtranslator_header_set_language (dlg->priv->header, language, lg_email);
+ gtr_header_set_language (dlg->priv->header, language, lg_email);
}
static void
-gtranslator_header_dialog_fill_from_header (GtrHeaderDialog * dlg)
+gtr_header_dialog_fill_from_header (GtrHeaderDialog * dlg)
{
GtrHeader *header;
GtkTextBuffer *buffer;
@@ -181,63 +181,63 @@ gtranslator_header_dialog_fill_from_header (GtrHeaderDialog * dlg)
/* Project Information */
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dlg->priv->prj_comment));
- gtk_text_buffer_set_text (buffer, gtranslator_header_get_comments (header),
+ gtk_text_buffer_set_text (buffer, gtr_header_get_comments (header),
-1);
- text = gtranslator_header_get_prj_id_version (header);
+ text = gtr_header_get_prj_id_version (header);
gtk_entry_set_text (GTK_ENTRY (dlg->priv->prj_id_version),
text);
g_free (text);
- text = gtranslator_header_get_pot_date (header);
+ text = gtr_header_get_pot_date (header);
gtk_entry_set_text (GTK_ENTRY (dlg->priv->pot_date),
text);
g_free (text);
- text = gtranslator_header_get_po_date (header);
+ text = gtr_header_get_po_date (header);
gtk_entry_set_text (GTK_ENTRY (dlg->priv->po_date),
text);
g_free (text);
- text = gtranslator_header_get_rmbt (header);
+ text = gtr_header_get_rmbt (header);
gtk_entry_set_text (GTK_ENTRY (dlg->priv->rmbt),
text);
g_free (text);
/* Translator and Language Information */
- text = gtranslator_header_get_translator (header);
+ text = gtr_header_get_translator (header);
gtk_entry_set_text (GTK_ENTRY (dlg->priv->translator),
text);
g_free (text);
- text = gtranslator_header_get_tr_email (header);
+ text = gtr_header_get_tr_email (header);
gtk_entry_set_text (GTK_ENTRY (dlg->priv->tr_email),
text);
g_free (text);
- text = gtranslator_header_get_language (header);
+ text = gtr_header_get_language (header);
gtk_entry_set_text (GTK_ENTRY (dlg->priv->language),
text);
g_free (text);
- text = gtranslator_header_get_lg_email (header);
+ text = gtr_header_get_lg_email (header);
gtk_entry_set_text (GTK_ENTRY (dlg->priv->lg_email),
text);
g_free (text);
- text = gtranslator_header_get_charset (header);
+ text = gtr_header_get_charset (header);
gtk_entry_set_text (GTK_ENTRY (dlg->priv->charset),
text);
g_free (text);
- text = gtranslator_header_get_encoding (header);
+ text = gtr_header_get_encoding (header);
gtk_entry_set_text (GTK_ENTRY (dlg->priv->encoding),
text);
g_free (text);
}
static void
-gtranslator_header_dialog_init (GtrHeaderDialog * dlg)
+gtr_header_dialog_init (GtrHeaderDialog * dlg)
{
gboolean ret;
GtkWidget *error_widget;
@@ -265,8 +265,8 @@ gtranslator_header_dialog_init (GtrHeaderDialog * dlg)
g_signal_connect (dlg, "response", G_CALLBACK (gtk_widget_destroy), NULL);
- path = gtranslator_dirs_get_ui_file ("gtr-header-dialog.ui");
- ret = gtranslator_utils_get_ui_objects (path,
+ path = gtr_dirs_get_ui_file ("gtr-header-dialog.ui");
+ ret = gtr_utils_get_ui_objects (path,
root_objects,
&error_widget,
"main_box", &dlg->priv->main_box,
@@ -306,14 +306,14 @@ gtranslator_header_dialog_init (GtrHeaderDialog * dlg)
gtk_container_set_border_width (GTK_CONTAINER (dlg->priv->notebook), 5);
- if (gtranslator_application_get_profiles (GTR_APP) == NULL)
+ if (gtr_application_get_profiles (GTR_APP) == NULL)
{
gtk_widget_set_sensitive (dlg->priv->take_my_options, FALSE);
}
else
{
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->priv->take_my_options),
- gtranslator_prefs_manager_get_use_profile_values ());
+ gtr_prefs_manager_get_use_profile_values ());
}
gtk_text_view_set_editable (GTK_TEXT_VIEW (dlg->priv->prj_comment), TRUE);
@@ -342,8 +342,8 @@ set_default_values (GtrHeaderDialog *dlg,
GtkTextBuffer *buffer;
/* Write header's values on Header dialog */
- dlg->priv->header = gtranslator_window_get_header_from_active_tab (window);
- gtranslator_header_dialog_fill_from_header (GTR_HEADER_DIALOG (dlg));
+ dlg->priv->header = gtr_window_get_header_from_active_tab (window);
+ gtr_header_dialog_fill_from_header (GTR_HEADER_DIALOG (dlg));
/*Connect signals */
g_signal_connect (dlg->priv->take_my_options, "toggled",
@@ -384,15 +384,15 @@ set_default_values (GtrHeaderDialog *dlg,
}
void
-gtranslator_show_header_dialog (GtrWindow * window)
+gtr_show_header_dialog (GtrWindow * window)
{
static GtrHeaderDialog *dlg = NULL;
GtrPo *po;
GtrTab *tab;
- tab = gtranslator_window_get_active_tab (window);
+ tab = gtr_window_get_active_tab (window);
g_return_if_fail (tab != NULL);
- po = gtranslator_tab_get_po (tab);
+ po = gtr_tab_get_po (tab);
g_return_if_fail (GTR_IS_WINDOW (window));
diff --git a/src/dialogs/gtr-header-dialog.h b/src/dialogs/gtr-header-dialog.h
index 6c3fb61..28deea0 100644
--- a/src/dialogs/gtr-header-dialog.h
+++ b/src/dialogs/gtr-header-dialog.h
@@ -29,7 +29,7 @@
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_HEADER_DIALOG (gtranslator_header_dialog_get_type ())
+#define GTR_TYPE_HEADER_DIALOG (gtr_header_dialog_get_type ())
#define GTR_HEADER_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_HEADER_DIALOG, GtrHeaderDialog))
#define GTR_HEADER_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_HEADER_DIALOG, GtrHeaderDialogClass))
#define GTR_IS_HEADER_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_HEADER_DIALOG))
@@ -66,11 +66,11 @@ struct _GtrHeaderDialogClass
* Public methods
*/
GType
-gtranslator_header_dialog_get_type (void)
+gtr_header_dialog_get_type (void)
G_GNUC_CONST;
- GType gtranslator_header_dialog_register_type (GTypeModule * module);
+ GType gtr_header_dialog_register_type (GTypeModule * module);
- void gtranslator_show_header_dialog (GtrWindow * window);
+ void gtr_show_header_dialog (GtrWindow * window);
#endif
diff --git a/src/dialogs/gtr-jump-dialog.c b/src/dialogs/gtr-jump-dialog.c
index ea18bfe..1ef191f 100644
--- a/src/dialogs/gtr-jump-dialog.c
+++ b/src/dialogs/gtr-jump-dialog.c
@@ -38,7 +38,7 @@
GtrJumpDialogPrivate))
-G_DEFINE_TYPE (GtrJumpDialog, gtranslator_jump_dialog,
+G_DEFINE_TYPE (GtrJumpDialog, gtr_jump_dialog,
GTK_TYPE_DIALOG)
struct _GtrJumpDialogPrivate
@@ -62,8 +62,8 @@ dialog_response_handler (GtkDialog * dlg, gint res_id)
number =
gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON
(dialog->priv->jump));
- tab = gtranslator_window_get_active_tab (dialog->priv->window);
- gtranslator_tab_go_to_number (tab, number - 1);
+ tab = gtr_window_get_active_tab (dialog->priv->window);
+ gtr_tab_go_to_number (tab, number - 1);
gtk_widget_destroy (GTK_WIDGET (dlg));
break;
@@ -73,7 +73,7 @@ dialog_response_handler (GtkDialog * dlg, gint res_id)
}
static void
-gtranslator_jump_dialog_init (GtrJumpDialog * dlg)
+gtr_jump_dialog_init (GtrJumpDialog * dlg)
{
gboolean ret;
GtkWidget *error_widget;
@@ -110,8 +110,8 @@ gtranslator_jump_dialog_init (GtrJumpDialog * dlg)
"response", G_CALLBACK (dialog_response_handler), NULL);
/*Glade */
- path = gtranslator_dirs_get_ui_file ("gtr-jump-dialog.ui");
- ret = gtranslator_utils_get_ui_objects (path,
+ path = gtr_dirs_get_ui_file ("gtr-jump-dialog.ui");
+ ret = gtr_utils_get_ui_objects (path,
root_objects,
&error_widget,
"main_box", &dlg->priv->main_box,
@@ -134,23 +134,23 @@ gtranslator_jump_dialog_init (GtrJumpDialog * dlg)
}
static void
-gtranslator_jump_dialog_finalize (GObject * object)
+gtr_jump_dialog_finalize (GObject * object)
{
- G_OBJECT_CLASS (gtranslator_jump_dialog_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_jump_dialog_parent_class)->finalize (object);
}
static void
-gtranslator_jump_dialog_class_init (GtrJumpDialogClass * klass)
+gtr_jump_dialog_class_init (GtrJumpDialogClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrJumpDialogPrivate));
- object_class->finalize = gtranslator_jump_dialog_finalize;
+ object_class->finalize = gtr_jump_dialog_finalize;
}
void
-gtranslator_show_jump_dialog (GtrWindow * window)
+gtr_show_jump_dialog (GtrWindow * window)
{
static GtrJumpDialog *dlg = NULL;
@@ -170,9 +170,9 @@ gtranslator_show_jump_dialog (GtrWindow * window)
dlg->priv->window = window;
/* Set the maximum number of the spin button */
- tab = gtranslator_window_get_active_tab (window);
- po = gtranslator_tab_get_po (tab);
- messages = gtranslator_po_get_messages_count (po);
+ tab = gtr_window_get_active_tab (window);
+ po = gtr_tab_get_po (tab);
+ messages = gtr_po_get_messages_count (po);
gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->jump),
1.0, (gdouble) messages);
diff --git a/src/dialogs/gtr-jump-dialog.h b/src/dialogs/gtr-jump-dialog.h
index 941ae3e..2444bb1 100644
--- a/src/dialogs/gtr-jump-dialog.h
+++ b/src/dialogs/gtr-jump-dialog.h
@@ -29,7 +29,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_JUMP_DIALOG (gtranslator_jump_dialog_get_type ())
+#define GTR_TYPE_JUMP_DIALOG (gtr_jump_dialog_get_type ())
#define GTR_JUMP_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_JUMP_DIALOG, GtrJumpDialog))
#define GTR_JUMP_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_JUMP_DIALOG, GtrJumpDialogClass))
#define GTR_IS_JUMP_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_JUMP_DIALOG))
@@ -65,12 +65,12 @@ struct _GtrJumpDialogClass
* Public methods
*/
GType
-gtranslator_jump_dialog_get_type (void)
+gtr_jump_dialog_get_type (void)
G_GNUC_CONST;
- GType gtranslator_jump_dialog_register_type (GTypeModule * module);
+ GType gtr_jump_dialog_register_type (GTypeModule * module);
- void gtranslator_show_jump_dialog (GtrWindow * window);
+ void gtr_show_jump_dialog (GtrWindow * window);
G_END_DECLS
#endif /* __JUMP_DIALOG_H__ */
diff --git a/src/dialogs/gtr-preferences-dialog.c b/src/dialogs/gtr-preferences-dialog.c
index 6f22591..0433173 100644
--- a/src/dialogs/gtr-preferences-dialog.c
+++ b/src/dialogs/gtr-preferences-dialog.c
@@ -51,7 +51,7 @@
GtrPreferencesDialogPrivate))
-G_DEFINE_TYPE (GtrPreferencesDialog, gtranslator_preferences_dialog,
+G_DEFINE_TYPE (GtrPreferencesDialog, gtr_preferences_dialog,
GTK_TYPE_DIALOG)
struct _GtrPreferencesDialogPrivate
{
@@ -119,7 +119,7 @@ G_DEFINE_TYPE (GtrPreferencesDialog, gtranslator_preferences_dialog,
static void setup_profile_pages (GtrPreferencesDialog * dlg);
GtkWidget
- *gtranslator_preferences_dialog_get_treeview
+ *gtr_preferences_dialog_get_treeview
(GtrPreferencesDialog * dlg)
{
g_return_val_if_fail (GTR_IS_PREFERENCES_DIALOG (dlg), NULL);
@@ -138,7 +138,7 @@ warn_if_contains_fuzzy_checkbutton_toggled (GtkToggleButton * button,
GTK_TOGGLE_BUTTON (dlg->priv->
warn_if_contains_fuzzy_checkbutton));
- gtranslator_prefs_manager_set_warn_if_contains_fuzzy
+ gtr_prefs_manager_set_warn_if_contains_fuzzy
(gtk_toggle_button_get_active (button));
}
@@ -150,7 +150,7 @@ delete_compiled_checkbutton_toggled (GtkToggleButton * button,
GTK_TOGGLE_BUTTON (dlg->priv->
delete_compiled_checkbutton));
- gtranslator_prefs_manager_set_delete_compiled (gtk_toggle_button_get_active
+ gtr_prefs_manager_set_delete_compiled (gtk_toggle_button_get_active
(button));
}
@@ -161,11 +161,11 @@ setup_files_general_page (GtrPreferencesDialog * dlg)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(dlg->priv->
warn_if_contains_fuzzy_checkbutton),
- gtranslator_prefs_manager_get_warn_if_contains_fuzzy
+ gtr_prefs_manager_get_warn_if_contains_fuzzy
());
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(dlg->priv->delete_compiled_checkbutton),
- gtranslator_prefs_manager_get_delete_compiled
+ gtr_prefs_manager_get_delete_compiled
());
/*Connect signals */
@@ -189,7 +189,7 @@ autosave_checkbutton_toggled (GtkToggleButton * button,
gtk_widget_set_sensitive (dlg->priv->autosave_interval_spinbutton,
autosave);
- gtranslator_prefs_manager_set_autosave (autosave);
+ gtr_prefs_manager_set_autosave (autosave);
}
static void
@@ -203,7 +203,7 @@ create_backup_checkbutton_toggled (GtkToggleButton * button,
create_backup = gtk_toggle_button_get_active (button);
- gtranslator_prefs_manager_set_create_backup (create_backup);
+ gtr_prefs_manager_set_create_backup (create_backup);
}
static void
@@ -215,7 +215,7 @@ autosave_interval_spinbutton_value_changed (GtkSpinButton * spin_button,
GTK_SPIN_BUTTON (dlg->priv->
autosave_interval_spinbutton));
- gtranslator_prefs_manager_set_autosave_interval
+ gtr_prefs_manager_set_autosave_interval
(gtk_spin_button_get_value_as_int (spin_button));
}
@@ -226,15 +226,15 @@ setup_files_autosave_page (GtrPreferencesDialog * dlg)
gint autosave_interval;
/*Set initial value */
- autosave = gtranslator_prefs_manager_get_autosave ();
+ autosave = gtr_prefs_manager_get_autosave ();
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(dlg->priv->autosave_checkbutton), autosave);
- backup = gtranslator_prefs_manager_get_create_backup ();
+ backup = gtr_prefs_manager_get_create_backup ();
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(dlg->priv->create_backup_checkbutton),
backup);
- autosave_interval = gtranslator_prefs_manager_get_autosave_interval ();
+ autosave_interval = gtr_prefs_manager_get_autosave_interval ();
gtk_spin_button_set_value (GTK_SPIN_BUTTON
(dlg->priv->autosave_interval_spinbutton),
@@ -272,7 +272,7 @@ highlight_syntax_checkbutton_toggled (GtkToggleButton * button,
GTK_TOGGLE_BUTTON (dlg->priv->
highlight_syntax_checkbutton));
- gtranslator_prefs_manager_set_highlight_syntax (gtk_toggle_button_get_active
+ gtr_prefs_manager_set_highlight_syntax (gtk_toggle_button_get_active
(button));
}
@@ -284,7 +284,7 @@ visible_whitespace_checkbutton_toggled (GtkToggleButton * button,
GTK_TOGGLE_BUTTON (dlg->priv->
visible_whitespace_checkbutton));
- gtranslator_prefs_manager_set_visible_whitespace
+ gtr_prefs_manager_set_visible_whitespace
(gtk_toggle_button_get_active (button));
}
@@ -300,7 +300,7 @@ use_custom_font_checkbutton_toggled (GtkToggleButton * button,
use_custom_font = gtk_toggle_button_get_active (button);
- gtranslator_prefs_manager_set_use_custom_font (use_custom_font);
+ gtr_prefs_manager_set_use_custom_font (use_custom_font);
gtk_widget_set_sensitive (dlg->priv->editor_font_hbox, use_custom_font);
}
@@ -318,7 +318,7 @@ editor_font_set (GtkFontButton * button, GtrPreferencesDialog * dlg)
(dlg->priv->editor_font_fontbutton));
if (editor_font)
- gtranslator_prefs_manager_set_editor_font (editor_font);
+ gtr_prefs_manager_set_editor_font (editor_font);
//FIXME:else set default font
}
@@ -331,21 +331,21 @@ setup_editor_text_display_page (GtrPreferencesDialog * dlg)
/*Set initial value */
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(dlg->priv->highlight_syntax_checkbutton),
- gtranslator_prefs_manager_get_highlight_syntax
+ gtr_prefs_manager_get_highlight_syntax
());
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(dlg->priv->visible_whitespace_checkbutton),
- gtranslator_prefs_manager_get_visible_whitespace
+ gtr_prefs_manager_get_visible_whitespace
());
- use_custom_font = gtranslator_prefs_manager_get_use_custom_font ();
+ use_custom_font = gtr_prefs_manager_get_use_custom_font ();
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(dlg->priv->use_custom_font_checkbutton),
use_custom_font);
if (use_custom_font)
{
- editor_font = gtranslator_prefs_manager_get_editor_font ();
+ editor_font = gtr_prefs_manager_get_editor_font ();
if (editor_font)
gtk_font_button_set_font_name (GTK_FONT_BUTTON
(dlg->priv->editor_font_fontbutton),
@@ -376,7 +376,7 @@ unmark_fuzzy_when_changed_checkbutton_toggled (GtkToggleButton * button,
GTK_TOGGLE_BUTTON (dlg->priv->
unmark_fuzzy_when_changed_checkbutton));
- gtranslator_prefs_manager_set_unmark_fuzzy_when_changed
+ gtr_prefs_manager_set_unmark_fuzzy_when_changed
(gtk_toggle_button_get_active (button));
}
@@ -387,7 +387,7 @@ spellcheck_checkbutton_toggled (GtkToggleButton * button,
g_return_if_fail (button ==
GTK_TOGGLE_BUTTON (dlg->priv->spellcheck_checkbutton));
- gtranslator_prefs_manager_set_spellcheck (gtk_toggle_button_get_active
+ gtr_prefs_manager_set_spellcheck (gtk_toggle_button_get_active
(button));
}
@@ -398,11 +398,11 @@ setup_editor_contents (GtrPreferencesDialog * dlg)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(dlg->priv->
unmark_fuzzy_when_changed_checkbutton),
- gtranslator_prefs_manager_get_unmark_fuzzy_when_changed
+ gtr_prefs_manager_get_unmark_fuzzy_when_changed
());
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(dlg->priv->spellcheck_checkbutton),
- gtranslator_prefs_manager_get_spellcheck ());
+ gtr_prefs_manager_get_spellcheck ());
/*Connect signals */
g_signal_connect (dlg->priv->unmark_fuzzy_when_changed_checkbutton,
@@ -438,7 +438,7 @@ active_toggled_cb (GtkCellRendererToggle * cell_renderer,
GFile *file;
- config_folder = gtranslator_dirs_get_user_config_dir ();
+ config_folder = gtr_dirs_get_user_config_dir ();
filename = g_build_filename (config_folder, "profiles.xml", NULL);
g_free (config_folder);
@@ -459,32 +459,32 @@ active_toggled_cb (GtkCellRendererToggle * cell_renderer,
{
old_profile_active =
- gtranslator_application_get_active_profile (GTR_APP);
+ gtr_application_get_active_profile (GTR_APP);
gtk_list_store_set (GTK_LIST_STORE (model),
&iter, TRUE, TOGGLE_COL, -1);
gtk_tree_model_get (model, &iter, PROFILE_NAME_COL, &profile_row, -1);
- profiles_list = gtranslator_application_get_profiles (GTR_APP);
+ profiles_list = gtr_application_get_profiles (GTR_APP);
for (l = profiles_list; l; l = l->next)
{
GtrProfile *profile;
profile = (GtrProfile *) l->data;
- if (!strcmp (gtranslator_profile_get_name (profile), profile_row))
+ if (!strcmp (gtr_profile_get_name (profile), profile_row))
{
- gtranslator_application_set_active_profile (GTR_APP, profile);
+ gtr_application_set_active_profile (GTR_APP, profile);
}
}
}
gtk_list_store_clear (GTK_LIST_STORE (model));
- gtranslator_preferences_fill_profile_treeview (dlg, model);
+ gtr_preferences_fill_profile_treeview (dlg, model);
gtk_tree_path_free (path);
}
void
-gtranslator_preferences_fill_profile_treeview (GtrPreferencesDialog *
+gtr_preferences_fill_profile_treeview (GtrPreferencesDialog *
dlg, GtkTreeModel * model)
{
GtkTreeIter iter;
@@ -493,10 +493,10 @@ gtranslator_preferences_fill_profile_treeview (GtrPreferencesDialog *
gtk_list_store_clear (GTK_LIST_STORE (model));
- profiles_list = gtranslator_application_get_profiles (GTR_APP);
+ profiles_list = gtr_application_get_profiles (GTR_APP);
- active_profile = gtranslator_application_get_active_profile (GTR_APP);
+ active_profile = gtr_application_get_active_profile (GTR_APP);
for (l = profiles_list; l; l = l->next)
{
@@ -506,11 +506,11 @@ gtranslator_preferences_fill_profile_treeview (GtrPreferencesDialog *
profile = (GtrProfile *) l->data;
- profile_name = gtranslator_profile_get_name (profile);
+ profile_name = gtr_profile_get_name (profile);
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
if (!strcmp
- (gtranslator_profile_get_name (active_profile), profile_name))
+ (gtr_profile_get_name (active_profile), profile_name))
{
gtk_list_store_set (GTK_LIST_STORE (model),
&iter,
@@ -570,7 +570,7 @@ setup_profile_pages (GtrPreferencesDialog * dlg)
g_object_set (name_column, "expand", TRUE, NULL);
- gtranslator_preferences_fill_profile_treeview (dlg, GTK_TREE_MODEL (model));
+ gtr_preferences_fill_profile_treeview (dlg, GTK_TREE_MODEL (model));
}
/***************Interface pages****************/
@@ -579,7 +579,7 @@ style_changed_cb (GtkComboBox * combobox, GtrPreferencesDialog * dlg)
{
g_return_if_fail (combobox == GTK_COMBO_BOX (dlg->priv->gdl_combobox));
- gtranslator_prefs_manager_set_color_scheme (gtk_combo_box_get_active_text
+ gtr_prefs_manager_set_color_scheme (gtk_combo_box_get_active_text
(combobox));
}
@@ -590,7 +590,7 @@ scheme_color_changed_cb (GtkComboBox * combobox,
g_return_if_fail (combobox ==
GTK_COMBO_BOX (dlg->priv->scheme_color_combobox));
- gtranslator_prefs_manager_set_color_scheme (gtk_combo_box_get_active_text
+ gtr_prefs_manager_set_color_scheme (gtk_combo_box_get_active_text
(combobox));
}
@@ -606,7 +606,7 @@ setup_interface_pages (GtrPreferencesDialog * dlg)
GtkCellRenderer *cell;
/*Set initial value */
- pane_switcher_style = gtranslator_prefs_manager_get_pane_switcher_style ();
+ pane_switcher_style = gtr_prefs_manager_get_pane_switcher_style ();
if (pane_switcher_style)
gtk_combo_box_set_active (GTK_COMBO_BOX (dlg->priv->gdl_combobox),
pane_switcher_style);
@@ -627,7 +627,7 @@ setup_interface_pages (GtrPreferencesDialog * dlg)
manager = gtk_source_style_scheme_manager_get_default ();
scheme_ids = gtk_source_style_scheme_manager_get_scheme_ids (manager);
- scheme_active = gtranslator_prefs_manager_get_color_scheme ();
+ scheme_active = gtr_prefs_manager_get_color_scheme ();
while (scheme_ids[i] != NULL)
{
gtk_combo_box_append_text (GTK_COMBO_BOX
@@ -661,7 +661,7 @@ response_filechooser_cb (GtkDialog * dialog,
gtk_entry_set_text (GTK_ENTRY (dlg->priv->directory_entry),
gtk_file_chooser_get_filename (GTK_FILE_CHOOSER
(dialog)));
- gtranslator_prefs_manager_set_po_directory
+ gtr_prefs_manager_set_po_directory
(gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)));
gtk_widget_destroy (GTK_WIDGET (dialog));
}
@@ -721,24 +721,24 @@ add_to_database (gpointer data_pointer)
GError *error = NULL;
GtrPo *po;
- po = gtranslator_po_new ();
+ po = gtr_po_new ();
location = (GFile *) l->data;
- gtranslator_po_parse (po, location, &error);
+ gtr_po_parse (po, location, &error);
if (error)
return TRUE;
- msg_list = gtranslator_po_get_messages (po);
+ msg_list = gtr_po_get_messages (po);
for (l2 = msg_list; l2; l2 = l2->next)
{
GtrMsg *msg;
msg = GTR_MSG (l2->data);
- if (gtranslator_msg_is_translated (msg))
- gtranslator_translation_memory_store (data->tm,
- gtranslator_msg_get_msgid
+ if (gtr_msg_is_translated (msg))
+ gtr_translation_memory_store (data->tm,
+ gtr_msg_get_msgid
(msg),
- gtranslator_msg_get_msgstr
+ gtr_msg_get_msgstr
(msg));
}
@@ -806,19 +806,19 @@ on_add_database_button_pulsed (GtkButton * button,
data = g_new0 (IdleData, 1);
data->list = NULL;
- dir_name = gtranslator_prefs_manager_get_po_directory ();
+ dir_name = gtr_prefs_manager_get_po_directory ();
dir = g_file_new_for_path (dir_name);
- if (gtranslator_prefs_manager_get_restrict_to_filename ())
- gtranslator_utils_scan_dir (dir, &data->list,
- gtranslator_prefs_manager_get_filename_restriction
+ if (gtr_prefs_manager_get_restrict_to_filename ())
+ gtr_utils_scan_dir (dir, &data->list,
+ gtr_prefs_manager_get_filename_restriction
());
else
- gtranslator_utils_scan_dir (dir, &data->list, NULL);
+ gtr_utils_scan_dir (dir, &data->list, NULL);
data->tm =
- GTR_TRANSLATION_MEMORY (gtranslator_application_get_translation_memory
+ GTR_TRANSLATION_MEMORY (gtr_application_get_translation_memory
(GTR_APP));
data->progress = GTK_PROGRESS_BAR (dlg->priv->add_database_progressbar);
data->parent = GTK_WINDOW (dlg);
@@ -835,7 +835,7 @@ static void
on_use_lang_profile_checkbutton_changed (GtkToggleButton * button,
gpointer user_data)
{
- gtranslator_prefs_manager_set_restrict_to_filename
+ gtr_prefs_manager_set_restrict_to_filename
(gtk_toggle_button_get_active (button));
}
@@ -851,7 +851,7 @@ tm_lang_entry_changed (GObject * gobject,
text = gtk_entry_get_text (GTK_ENTRY (gobject));
if (text)
- gtranslator_prefs_manager_set_filename_restriction (text);
+ gtr_prefs_manager_set_filename_restriction (text);
}
@@ -863,7 +863,7 @@ on_missing_words_spinbutton_changed (GtkSpinButton * spinbutton,
value = gtk_spin_button_get_value_as_int (spinbutton);
- gtranslator_prefs_manager_set_max_missing_words (value);
+ gtr_prefs_manager_set_max_missing_words (value);
}
static void
@@ -874,7 +874,7 @@ on_sentence_length_spinbutton_changed (GtkSpinButton * spinbutton,
value = gtk_spin_button_get_value_as_int (spinbutton);
- gtranslator_prefs_manager_set_max_length_diff (value);
+ gtr_prefs_manager_set_max_length_diff (value);
}
static void
@@ -890,7 +890,7 @@ directory_entry_changed (GObject * gobject,
text = gtk_entry_get_text (GTK_ENTRY (gobject));
if (text)
- gtranslator_prefs_manager_set_po_directory (text);
+ gtr_prefs_manager_set_po_directory (text);
}
@@ -903,32 +903,32 @@ setup_tm_pages (GtrPreferencesDialog * dlg)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(dlg->priv->use_lang_profile_in_tm),
- gtranslator_prefs_manager_get_restrict_to_filename
+ gtr_prefs_manager_get_restrict_to_filename
());
- profile = gtranslator_application_get_active_profile (GTR_APP);
+ profile = gtr_application_get_active_profile (GTR_APP);
if (profile != NULL)
{
- language_code = gtranslator_profile_get_language_code (profile);
+ language_code = gtr_profile_get_language_code (profile);
filename = (const gchar *) g_strconcat (language_code, ".po", NULL);
gtk_entry_set_text (GTK_ENTRY (dlg->priv->tm_lang_entry), filename);
}
if (filename != NULL)
- gtranslator_prefs_manager_set_filename_restriction (filename);
+ gtr_prefs_manager_set_filename_restriction (filename);
gtk_spin_button_set_value (GTK_SPIN_BUTTON
(dlg->priv->missing_words_spinbutton),
(gdouble)
- gtranslator_prefs_manager_get_max_missing_words
+ gtr_prefs_manager_get_max_missing_words
());
gtk_spin_button_set_value (GTK_SPIN_BUTTON
(dlg->priv->sentence_length_spinbutton),
(gdouble)
- gtranslator_prefs_manager_get_max_length_diff
+ gtr_prefs_manager_get_max_length_diff
());
g_signal_connect (GTK_BUTTON (dlg->priv->search_button), "clicked",
@@ -969,7 +969,7 @@ setup_plugin_pages (GtrPreferencesDialog * dlg)
alignment = gtk_alignment_new (0., 0., 1., 1.);
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 12, 12, 12, 12);
- page_content = gtranslator_plugin_manager_new ();
+ page_content = gtr_plugin_manager_new ();
g_return_if_fail (page_content != NULL);
gtk_container_add (GTK_CONTAINER (alignment), page_content);
@@ -995,8 +995,8 @@ static void
add_button_pulsed (GtkWidget * button, GtrPreferencesDialog * dlg)
{
GtrProfile *profile;
- profile = gtranslator_profile_new ();
- gtranslator_show_profile_dialog (dlg, profile, NEW_PROFILE);
+ profile = gtr_profile_new ();
+ gtr_show_profile_dialog (dlg, profile, NEW_PROFILE);
}
static void
@@ -1023,20 +1023,20 @@ edit_button_pulsed (GtkWidget * button, GtrPreferencesDialog * dlg)
gtk_tree_model_get (model, &iter, PROFILE_NAME_COL, &profile_row, -1);
- profiles_list = gtranslator_application_get_profiles (GTR_APP);
- active_profile = gtranslator_application_get_active_profile (GTR_APP);
+ profiles_list = gtr_application_get_profiles (GTR_APP);
+ active_profile = gtr_application_get_active_profile (GTR_APP);
for (l = profiles_list; l; l = l->next)
{
GtrProfile *profile;
profile = (GtrProfile *) l->data;
- if (!strcmp (gtranslator_profile_get_name (profile), profile_row))
+ if (!strcmp (gtr_profile_get_name (profile), profile_row))
{
- old_profile_name = gtranslator_profile_get_name (profile);
+ old_profile_name = gtr_profile_get_name (profile);
edited_profile = profile;
}
}
- gtranslator_show_profile_dialog (dlg, edited_profile, EDIT_PROFILE);
+ gtr_show_profile_dialog (dlg, edited_profile, EDIT_PROFILE);
}
}
@@ -1068,20 +1068,20 @@ delete_confirm_dialog_cb (GtkWidget * dialog,
gtk_tree_model_get (model, &iter, PROFILE_NAME_COL, &profile_row,
-1);
- profiles_list = gtranslator_application_get_profiles (GTR_APP);
+ profiles_list = gtr_application_get_profiles (GTR_APP);
for (l = profiles_list; l; l = l->next)
{
GtrProfile *profile;
profile = (GtrProfile *) l->data;
if (!strcmp
- (gtranslator_profile_get_name (profile), profile_row))
+ (gtr_profile_get_name (profile), profile_row))
{
new_list = g_list_remove (profiles_list, profile);
- gtranslator_application_set_profiles (GTR_APP, new_list);
+ gtr_application_set_profiles (GTR_APP, new_list);
}
}
- gtranslator_preferences_fill_profile_treeview (dlg, model);
+ gtr_preferences_fill_profile_treeview (dlg, model);
}
gtk_widget_destroy (dialog);
}
@@ -1113,10 +1113,10 @@ delete_button_pulsed (GtkWidget * button, GtrPreferencesDialog * dlg)
gtk_tree_model_get (model, &iter, PROFILE_NAME_COL, &profile_row, -1);
- active_profile = gtranslator_application_get_active_profile (GTR_APP);
+ active_profile = gtr_application_get_active_profile (GTR_APP);
if (!strcmp
- (gtranslator_profile_get_name (active_profile), profile_row))
+ (gtr_profile_get_name (active_profile), profile_row))
{
dialog = gtk_message_dialog_new (GTK_WINDOW (dlg),
@@ -1162,7 +1162,7 @@ delete_button_pulsed (GtkWidget * button, GtrPreferencesDialog * dlg)
}
static void
-gtranslator_preferences_dialog_init (GtrPreferencesDialog * dlg)
+gtr_preferences_dialog_init (GtrPreferencesDialog * dlg)
{
gboolean ret;
GtkWidget *error_widget;
@@ -1200,8 +1200,8 @@ gtranslator_preferences_dialog_init (GtrPreferencesDialog * dlg)
/*Glade */
- path = gtranslator_dirs_get_ui_file ("gtr-preferences-dialog.ui");
- ret = gtranslator_utils_get_ui_objects (path,
+ path = gtr_dirs_get_ui_file ("gtr-preferences-dialog.ui");
+ ret = gtr_utils_get_ui_objects (path,
root_objects,
&error_widget,
"notebook", &dlg->priv->notebook,
@@ -1308,14 +1308,14 @@ gtranslator_preferences_dialog_init (GtrPreferencesDialog * dlg)
}
static void
-gtranslator_preferences_dialog_finalize (GObject * object)
+gtr_preferences_dialog_finalize (GObject * object)
{
- G_OBJECT_CLASS (gtranslator_preferences_dialog_parent_class)->
+ G_OBJECT_CLASS (gtr_preferences_dialog_parent_class)->
finalize (object);
}
static void
-gtranslator_preferences_dialog_class_init (GtrPreferencesDialogClass *
+gtr_preferences_dialog_class_init (GtrPreferencesDialogClass *
klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -1323,11 +1323,11 @@ gtranslator_preferences_dialog_class_init (GtrPreferencesDialogClass *
g_type_class_add_private (klass,
sizeof (GtrPreferencesDialogPrivate));
- object_class->finalize = gtranslator_preferences_dialog_finalize;
+ object_class->finalize = gtr_preferences_dialog_finalize;
}
void
-gtranslator_show_preferences_dialog (GtrWindow * window)
+gtr_show_preferences_dialog (GtrWindow * window)
{
static GtkWidget *dlg = NULL;
diff --git a/src/dialogs/gtr-preferences-dialog.h b/src/dialogs/gtr-preferences-dialog.h
index f665e5a..348014b 100644
--- a/src/dialogs/gtr-preferences-dialog.h
+++ b/src/dialogs/gtr-preferences-dialog.h
@@ -37,7 +37,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_PREFERENCES_DIALOG (gtranslator_preferences_dialog_get_type ())
+#define GTR_TYPE_PREFERENCES_DIALOG (gtr_preferences_dialog_get_type ())
#define GTR_PREFERENCES_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_PREFERENCES_DIALOG, GtrPreferencesDialog))
#define GTR_PREFERENCES_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_PREFERENCES_DIALOG, GtrPreferencesDialogClass))
#define GTR_IS_PREFERENCES_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_PREFERENCES_DIALOG))
@@ -75,20 +75,20 @@ struct _GtrPreferencesDialogClass
* Public methods
*/
GType
-gtranslator_preferences_dialog_get_type (void)
+gtr_preferences_dialog_get_type (void)
G_GNUC_CONST;
- GType gtranslator_preferences_dialog_register_type (GTypeModule *
+ GType gtr_preferences_dialog_register_type (GTypeModule *
module);
- void gtranslator_show_preferences_dialog (GtrWindow * window);
+ void gtr_show_preferences_dialog (GtrWindow * window);
GtkWidget
- *gtranslator_preferences_dialog_get_treeview
+ *gtr_preferences_dialog_get_treeview
(GtrPreferencesDialog * dlg);
void
- gtranslator_preferences_fill_profile_treeview
+ gtr_preferences_fill_profile_treeview
(GtrPreferencesDialog * dlg, GtkTreeModel * model);
G_END_DECLS
diff --git a/src/dialogs/gtr-profile-dialog.c b/src/dialogs/gtr-profile-dialog.c
index ce11881..985348b 100644
--- a/src/dialogs/gtr-profile-dialog.c
+++ b/src/dialogs/gtr-profile-dialog.c
@@ -43,7 +43,7 @@
GTR_TYPE_PROFILE_DIALOG, \
GtrProfileDialogPrivate))
-G_DEFINE_TYPE (GtrProfileDialog, gtranslator_profile_dialog,
+G_DEFINE_TYPE (GtrProfileDialog, gtr_profile_dialog,
GTK_TYPE_DIALOG)
struct _GtrProfileDialogPrivate
@@ -69,19 +69,19 @@ struct _GtrProfileDialogPrivate
};
static void
-gtranslator_profile_dialog_finalize (GObject * object)
+gtr_profile_dialog_finalize (GObject * object)
{
- G_OBJECT_CLASS (gtranslator_profile_dialog_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_profile_dialog_parent_class)->finalize (object);
}
static void
-gtranslator_profile_dialog_class_init (GtrProfileDialogClass * klass)
+gtr_profile_dialog_class_init (GtrProfileDialogClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrProfileDialogPrivate));
- object_class->finalize = gtranslator_profile_dialog_finalize;
+ object_class->finalize = gtr_profile_dialog_finalize;
}
/***************PROFILES****************/
@@ -97,7 +97,7 @@ profile_name_entry_changed (GObject * gobject,
text = gtk_entry_get_text (GTK_ENTRY (gobject));
if (text)
- gtranslator_profile_set_name (profile_dlg->priv->new_profile,
+ gtr_profile_set_name (profile_dlg->priv->new_profile,
(gchar *) text);
}
@@ -113,7 +113,7 @@ author_name_entry_changed (GObject * gobject,
text = gtk_entry_get_text (GTK_ENTRY (gobject));
if (text)
- gtranslator_profile_set_author_name (profile_dlg->priv->new_profile,
+ gtr_profile_set_author_name (profile_dlg->priv->new_profile,
(gchar *) text);
}
@@ -129,7 +129,7 @@ author_email_entry_changed (GObject * gobject,
text = gtk_entry_get_text (GTK_ENTRY (gobject));
if (text)
- gtranslator_profile_set_author_email (profile_dlg->priv->new_profile,
+ gtr_profile_set_author_email (profile_dlg->priv->new_profile,
(gchar *) text);
}
@@ -145,7 +145,7 @@ language_name_entry_changed (GObject * gobject,
text = gtk_entry_get_text (GTK_ENTRY (gobject));
if (text)
- gtranslator_profile_set_language_name (profile_dlg->priv->new_profile,
+ gtr_profile_set_language_name (profile_dlg->priv->new_profile,
(gchar *) text);
}
@@ -161,7 +161,7 @@ language_code_entry_changed (GObject * gobject,
text = gtk_entry_get_text (GTK_ENTRY (gobject));
if (text)
- gtranslator_profile_set_language_code (profile_dlg->priv->new_profile,
+ gtr_profile_set_language_code (profile_dlg->priv->new_profile,
(gchar *) text);
}
@@ -177,7 +177,7 @@ charset_entry_changed (GObject * gobject,
text = gtk_entry_get_text (GTK_ENTRY (gobject));
if (text)
- gtranslator_profile_set_charset (profile_dlg->priv->new_profile,
+ gtr_profile_set_charset (profile_dlg->priv->new_profile,
(gchar *) text);
}
@@ -193,7 +193,7 @@ encoding_entry_changed (GObject * gobject,
text = gtk_entry_get_text (GTK_ENTRY (gobject));
if (text)
- gtranslator_profile_set_encoding (profile_dlg->priv->new_profile,
+ gtr_profile_set_encoding (profile_dlg->priv->new_profile,
(gchar *) text);
}
@@ -209,7 +209,7 @@ group_email_entry_changed (GObject * gobject,
text = gtk_entry_get_text (GTK_ENTRY (gobject));
if (text)
- gtranslator_profile_set_group_email (profile_dlg->priv->new_profile,
+ gtr_profile_set_group_email (profile_dlg->priv->new_profile,
(gchar *) text);
}
@@ -225,7 +225,7 @@ plurals_entry_changed (GObject * gobject,
text = gtk_entry_get_text (GTK_ENTRY (gobject));
if (text)
- gtranslator_profile_set_plurals (profile_dlg->priv->new_profile,
+ gtr_profile_set_plurals (profile_dlg->priv->new_profile,
(gchar *) text);
}
@@ -239,14 +239,14 @@ save_new_profile (GtkWidget * widget, GtrProfileDialog * profile_dlg)
GtkTreeModel *model;
profile_exists = FALSE;
- profiles_list = gtranslator_application_get_profiles (GTR_APP);
+ profiles_list = gtr_application_get_profiles (GTR_APP);
for (l = profiles_list; l; l = l->next)
{
GtrProfile *profile_in_list;
profile_in_list = (GtrProfile *) l->data;
- if (!strcmp (gtranslator_profile_get_name (profile_in_list),
- gtranslator_profile_get_name (profile_dlg->priv->
+ if (!strcmp (gtr_profile_get_name (profile_in_list),
+ gtr_profile_get_name (profile_dlg->priv->
new_profile)))
profile_exists = TRUE;
}
@@ -277,10 +277,10 @@ save_new_profile (GtkWidget * widget, GtrProfileDialog * profile_dlg)
GList *initial_list = NULL;
initial_list =
g_list_append (profiles_list, profile_dlg->priv->new_profile);
- gtranslator_application_set_active_profile (GTR_APP,
+ gtr_application_set_active_profile (GTR_APP,
profile_dlg->priv->
new_profile);
- gtranslator_application_set_profiles (GTR_APP, initial_list);
+ gtr_application_set_profiles (GTR_APP, initial_list);
}
else
{
@@ -294,12 +294,12 @@ save_new_profile (GtkWidget * widget, GtrProfileDialog * profile_dlg)
*/
dlg = profile_dlg->priv->prefs_dlg;
- treeview = gtranslator_preferences_dialog_get_treeview (dlg);
+ treeview = gtr_preferences_dialog_get_treeview (dlg);
model = gtk_tree_view_get_model (GTK_TREE_VIEW (treeview));
g_return_if_fail (GTK_IS_LIST_STORE (model));
- gtranslator_preferences_fill_profile_treeview (dlg, model);
+ gtr_preferences_fill_profile_treeview (dlg, model);
gtk_widget_destroy (gtk_widget_get_ancestor (widget, GTK_TYPE_DIALOG));
}
@@ -314,13 +314,13 @@ save_modified_profile (GtkWidget * widget,
g_return_if_fail (GTR_IS_PREFERENCES_DIALOG (profile_dlg->priv->prefs_dlg));
treeview =
- gtranslator_preferences_dialog_get_treeview (profile_dlg->priv->
+ gtr_preferences_dialog_get_treeview (profile_dlg->priv->
prefs_dlg);
model = gtk_tree_view_get_model (GTK_TREE_VIEW (treeview));
g_return_if_fail (GTK_IS_LIST_STORE (model));
- gtranslator_preferences_fill_profile_treeview (profile_dlg->priv->prefs_dlg,
+ gtr_preferences_fill_profile_treeview (profile_dlg->priv->prefs_dlg,
model);
gtk_widget_destroy (gtk_widget_get_ancestor (widget, GTK_TYPE_DIALOG));
}
@@ -328,34 +328,34 @@ save_modified_profile (GtkWidget * widget,
static void
destroy_without_changes (GtkWidget * widget, GtrProfileDialog * dlg)
{
- gtranslator_profile_set_name (dlg->priv->new_profile,
- gtranslator_profile_get_name (dlg->priv->
+ gtr_profile_set_name (dlg->priv->new_profile,
+ gtr_profile_get_name (dlg->priv->
old_profile));
- gtranslator_profile_set_author_name (dlg->priv->new_profile,
- gtranslator_profile_get_author_name
+ gtr_profile_set_author_name (dlg->priv->new_profile,
+ gtr_profile_get_author_name
(dlg->priv->old_profile));
- gtranslator_profile_set_author_email (dlg->priv->new_profile,
- gtranslator_profile_get_author_email
+ gtr_profile_set_author_email (dlg->priv->new_profile,
+ gtr_profile_get_author_email
(dlg->priv->old_profile));
- gtranslator_profile_set_language_name (dlg->priv->new_profile,
- gtranslator_profile_get_language_name
+ gtr_profile_set_language_name (dlg->priv->new_profile,
+ gtr_profile_get_language_name
(dlg->priv->old_profile));
- gtranslator_profile_set_language_code (dlg->priv->new_profile,
- gtranslator_profile_get_language_code
+ gtr_profile_set_language_code (dlg->priv->new_profile,
+ gtr_profile_get_language_code
(dlg->priv->old_profile));
- gtranslator_profile_set_charset (dlg->priv->new_profile,
- gtranslator_profile_get_charset (dlg->
+ gtr_profile_set_charset (dlg->priv->new_profile,
+ gtr_profile_get_charset (dlg->
priv->
old_profile));
- gtranslator_profile_set_encoding (dlg->priv->new_profile,
- gtranslator_profile_get_encoding (dlg->
+ gtr_profile_set_encoding (dlg->priv->new_profile,
+ gtr_profile_get_encoding (dlg->
priv->
old_profile));
- gtranslator_profile_set_group_email (dlg->priv->new_profile,
- gtranslator_profile_get_group_email
+ gtr_profile_set_group_email (dlg->priv->new_profile,
+ gtr_profile_get_group_email
(dlg->priv->old_profile));
- gtranslator_profile_set_plurals (dlg->priv->new_profile,
- gtranslator_profile_get_plurals (dlg->
+ gtr_profile_set_plurals (dlg->priv->new_profile,
+ gtr_profile_get_plurals (dlg->
priv->
old_profile));
@@ -363,7 +363,7 @@ destroy_without_changes (GtkWidget * widget, GtrProfileDialog * dlg)
}
static void
-gtranslator_profile_dialog_init (GtrProfileDialog * dlg)
+gtr_profile_dialog_init (GtrProfileDialog * dlg)
{
gboolean ret;
GtkWidget *error_widget;
@@ -383,8 +383,8 @@ gtranslator_profile_dialog_init (GtrProfileDialog * dlg)
gtk_container_set_border_width (GTK_CONTAINER (dlg), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->vbox), 2);
- path = gtranslator_dirs_get_ui_file ("gtr-profile-dialog.ui");
- ret = gtranslator_utils_get_ui_objects (path,
+ path = gtr_dirs_get_ui_file ("gtr-profile-dialog.ui");
+ ret = gtr_utils_get_ui_objects (path,
root_objects,
&error_widget,
"profiles_dialog",
@@ -429,14 +429,14 @@ gtranslator_profile_dialog_init (GtrProfileDialog * dlg)
}
void
-gtranslator_show_profile_dialog (GtrPreferencesDialog * dialog,
+gtr_show_profile_dialog (GtrPreferencesDialog * dialog,
GtrProfile * profile, gint action)
{
static GtrProfileDialog *dlg = NULL;
GtkButton *ok_button, *cancel_button;
GtrProfile *old_profile;
- old_profile = gtranslator_profile_new ();
+ old_profile = gtr_profile_new ();
cancel_button = GTK_BUTTON (gtk_button_new_from_stock (GTK_STOCK_CANCEL));
gtk_widget_show (GTK_WIDGET (cancel_button));
@@ -466,98 +466,98 @@ gtranslator_show_profile_dialog (GtrPreferencesDialog * dialog,
gtk_window_set_transient_for (GTK_WINDOW (dlg), GTK_WINDOW (dialog));
}
- if (gtranslator_profile_get_name (profile) != NULL)
+ if (gtr_profile_get_name (profile) != NULL)
{
gtk_entry_set_text (GTK_ENTRY
(GTR_PROFILE_DIALOG (dlg)->priv->
profile_name_entry),
- gtranslator_profile_get_name (profile));
- gtranslator_profile_set_name (old_profile,
- gtranslator_profile_get_name (profile));
+ gtr_profile_get_name (profile));
+ gtr_profile_set_name (old_profile,
+ gtr_profile_get_name (profile));
}
- if (gtranslator_profile_get_author_name (profile) != NULL)
+ if (gtr_profile_get_author_name (profile) != NULL)
{
gtk_entry_set_text (GTK_ENTRY
(GTR_PROFILE_DIALOG (dlg)->priv->author_name_entry),
- gtranslator_profile_get_author_name (profile));
- gtranslator_profile_set_author_name (old_profile,
- gtranslator_profile_get_author_name
+ gtr_profile_get_author_name (profile));
+ gtr_profile_set_author_name (old_profile,
+ gtr_profile_get_author_name
(profile));
}
- if (gtranslator_profile_get_author_email (profile) != NULL)
+ if (gtr_profile_get_author_email (profile) != NULL)
{
gtk_entry_set_text (GTK_ENTRY
(GTR_PROFILE_DIALOG (dlg)->priv->
author_email_entry),
- gtranslator_profile_get_author_email (profile));
- gtranslator_profile_set_author_email (old_profile,
- gtranslator_profile_get_author_email
+ gtr_profile_get_author_email (profile));
+ gtr_profile_set_author_email (old_profile,
+ gtr_profile_get_author_email
(profile));
}
- if (gtranslator_profile_get_language_name (profile) != NULL)
+ if (gtr_profile_get_language_name (profile) != NULL)
{
gtk_entry_set_text (GTK_ENTRY
(GTR_PROFILE_DIALOG (dlg)->priv->
language_name_entry),
- gtranslator_profile_get_language_name (profile));
- gtranslator_profile_set_language_name (old_profile,
- gtranslator_profile_get_language_name
+ gtr_profile_get_language_name (profile));
+ gtr_profile_set_language_name (old_profile,
+ gtr_profile_get_language_name
(profile));
}
- if (gtranslator_profile_get_language_code (profile) != NULL)
+ if (gtr_profile_get_language_code (profile) != NULL)
{
gtk_entry_set_text (GTK_ENTRY
(GTR_PROFILE_DIALOG (dlg)->priv->
language_code_entry),
- gtranslator_profile_get_language_code (profile));
- gtranslator_profile_set_language_code (old_profile,
- gtranslator_profile_get_language_code
+ gtr_profile_get_language_code (profile));
+ gtr_profile_set_language_code (old_profile,
+ gtr_profile_get_language_code
(profile));
}
- if (gtranslator_profile_get_charset (profile) != NULL)
+ if (gtr_profile_get_charset (profile) != NULL)
{
gtk_entry_set_text (GTK_ENTRY
(GTR_PROFILE_DIALOG (dlg)->priv->charset_entry),
- gtranslator_profile_get_charset (profile));
- gtranslator_profile_set_charset (old_profile,
- gtranslator_profile_get_charset
+ gtr_profile_get_charset (profile));
+ gtr_profile_set_charset (old_profile,
+ gtr_profile_get_charset
(profile));
}
- if (gtranslator_profile_get_encoding (profile) != NULL)
+ if (gtr_profile_get_encoding (profile) != NULL)
{
gtk_entry_set_text (GTK_ENTRY
(GTR_PROFILE_DIALOG (dlg)->priv->encoding_entry),
- gtranslator_profile_get_encoding (profile));
- gtranslator_profile_set_encoding (old_profile,
- gtranslator_profile_get_encoding
+ gtr_profile_get_encoding (profile));
+ gtr_profile_set_encoding (old_profile,
+ gtr_profile_get_encoding
(profile));
}
- if (gtranslator_profile_get_group_email (profile) != NULL)
+ if (gtr_profile_get_group_email (profile) != NULL)
{
gtk_entry_set_text (GTK_ENTRY
(GTR_PROFILE_DIALOG (dlg)->priv->
language_email_entry),
- gtranslator_profile_get_group_email (profile));
- gtranslator_profile_set_group_email (old_profile,
- gtranslator_profile_get_group_email
+ gtr_profile_get_group_email (profile));
+ gtr_profile_set_group_email (old_profile,
+ gtr_profile_get_group_email
(profile));
}
- if (gtranslator_profile_get_plurals (profile) != NULL)
+ if (gtr_profile_get_plurals (profile) != NULL)
{
gtk_entry_set_text (GTK_ENTRY
(GTR_PROFILE_DIALOG (dlg)->priv->
plurals_forms_entry),
- gtranslator_profile_get_plurals (profile));
- gtranslator_profile_set_plurals (old_profile,
- gtranslator_profile_get_plurals
+ gtr_profile_get_plurals (profile));
+ gtr_profile_set_plurals (old_profile,
+ gtr_profile_get_plurals
(profile));
}
diff --git a/src/dialogs/gtr-profile-dialog.h b/src/dialogs/gtr-profile-dialog.h
index d6d559c..43b6bf1 100644
--- a/src/dialogs/gtr-profile-dialog.h
+++ b/src/dialogs/gtr-profile-dialog.h
@@ -39,7 +39,7 @@ enum
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_PROFILE_DIALOG (gtranslator_profile_dialog_get_type ())
+#define GTR_TYPE_PROFILE_DIALOG (gtr_profile_dialog_get_type ())
#define GTR_PROFILE_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_PROFILE_DIALOG, GtrProfileDialog))
#define GTR_PROFILE_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_PROFILE_DIALOG, GtrProfileDialogClass))
#define GTR_IS_PROFILE_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_PROFILE_DIALOG))
@@ -77,12 +77,12 @@ struct _GtrProfileDialogClass
* Public methods
*/
GType
-gtranslator_profile_dialog_get_type (void)
+gtr_profile_dialog_get_type (void)
G_GNUC_CONST;
- GType gtranslator_profile_dialog_register_type (GTypeModule * module);
+ GType gtr_profile_dialog_register_type (GTypeModule * module);
- void gtranslator_show_profile_dialog (GtrPreferencesDialog *
+ void gtr_show_profile_dialog (GtrPreferencesDialog *
dialog,
GtrProfile * profile,
gint action);
diff --git a/src/dialogs/gtr-search-dialog.c b/src/dialogs/gtr-search-dialog.c
index 4525542..47b23f9 100644
--- a/src/dialogs/gtr-search-dialog.c
+++ b/src/dialogs/gtr-search-dialog.c
@@ -1,6 +1,6 @@
/*
* gedit-search-dialog.c
- * This file is part of gedit
+ * This file is part of gtranslator based on gedit
*
* Copyright (C) 2005 Paolo Maggi
* 2007 Ignacio Casal
@@ -81,7 +81,7 @@ struct _GtrSearchDialogPrivate
gboolean glade_error;
};
-G_DEFINE_TYPE (GtrSearchDialog, gtranslator_search_dialog,
+G_DEFINE_TYPE (GtrSearchDialog, gtr_search_dialog,
GTK_TYPE_DIALOG)
enum
{
@@ -90,7 +90,7 @@ enum
};
static void
-gtranslator_search_dialog_set_property (GObject * object,
+gtr_search_dialog_set_property (GObject * object,
guint prop_id,
const GValue * value,
GParamSpec * pspec)
@@ -100,7 +100,7 @@ gtranslator_search_dialog_set_property (GObject * object,
switch (prop_id)
{
case PROP_SHOW_REPLACE:
- gtranslator_search_dialog_set_show_replace (dlg,
+ gtr_search_dialog_set_show_replace (dlg,
g_value_get_boolean
(value));
break;
@@ -111,7 +111,7 @@ gtranslator_search_dialog_set_property (GObject * object,
}
static void
-gtranslator_search_dialog_get_property (GObject * object,
+gtr_search_dialog_get_property (GObject * object,
guint prop_id,
GValue * value, GParamSpec * pspec)
{
@@ -131,19 +131,19 @@ gtranslator_search_dialog_get_property (GObject * object,
static gboolean
show_replace (GtrSearchDialog * dlg)
{
- gtranslator_search_dialog_set_show_replace (dlg, TRUE);
+ gtr_search_dialog_set_show_replace (dlg, TRUE);
return TRUE;
}
static void
-gtranslator_search_dialog_class_init (GtrSearchDialogClass * klass)
+gtr_search_dialog_class_init (GtrSearchDialogClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkBindingSet *binding_set;
- object_class->set_property = gtranslator_search_dialog_set_property;
- object_class->get_property = gtranslator_search_dialog_get_property;
+ object_class->set_property = gtr_search_dialog_set_property;
+ object_class->get_property = gtr_search_dialog_get_property;
klass->show_replace = show_replace;
@@ -189,7 +189,7 @@ insert_text_handler (GtkEditable * editable,
if (insert_text)
return;
- escaped_text = gtranslator_utils_escape_search_text (text);
+ escaped_text = gtr_utils_escape_search_text (text);
new_len = strlen (escaped_text);
@@ -286,8 +286,8 @@ response_handler (GtrSearchDialog * dialog,
{
gchar *text;
- text = gtranslator_utils_unescape_search_text (str);
- gtranslator_history_entry_prepend_text
+ text = gtr_utils_unescape_search_text (str);
+ gtr_history_entry_prepend_text
(GTR_HISTORY_ENTRY (dialog->priv->replace_entry), text);
g_free (text);
@@ -299,8 +299,8 @@ response_handler (GtrSearchDialog * dialog,
{
gchar *text;
- text = gtranslator_utils_unescape_search_text (str);
- gtranslator_history_entry_prepend_text
+ text = gtr_utils_unescape_search_text (str);
+ gtr_history_entry_prepend_text
(GTR_HISTORY_ENTRY (dialog->priv->search_entry), text);
g_free (text);
@@ -361,7 +361,7 @@ show_replace_widgets (GtrSearchDialog * dlg, gboolean show_replace)
}
static void
-gtranslator_search_dialog_init (GtrSearchDialog * dlg)
+gtr_search_dialog_init (GtrSearchDialog * dlg)
{
GtkWidget *content;
GtkWidget *error_widget;
@@ -388,8 +388,8 @@ gtranslator_search_dialog_init (GtrSearchDialog * dlg)
(GTK_DIALOG (dlg)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->action_area), 6);
- path = gtranslator_dirs_get_ui_file ("gtr-search-dialog.ui");
- ret = gtranslator_utils_get_ui_objects (path,
+ path = gtr_dirs_get_ui_file ("gtr-search-dialog.ui");
+ ret = gtr_utils_get_ui_objects (path,
root_objects,
&error_widget,
"search_dialog_content", &content,
@@ -432,14 +432,14 @@ gtranslator_search_dialog_init (GtrSearchDialog * dlg)
}
dlg->priv->search_entry =
- gtranslator_history_entry_new ("gtranslator_search_for_entry", TRUE);
+ gtr_history_entry_new ("gtr_search_for_entry", TRUE);
gtk_widget_set_size_request (dlg->priv->search_entry, 300, -1);
- gtranslator_history_entry_set_escape_func
+ gtr_history_entry_set_escape_func
(GTR_HISTORY_ENTRY (dlg->priv->search_entry),
(GtrHistoryEntryEscapeFunc)
- gtranslator_utils_escape_search_text);
+ gtr_utils_escape_search_text);
- dlg->priv->search_text_entry = gtranslator_history_entry_get_entry
+ dlg->priv->search_text_entry = gtr_history_entry_get_entry
(GTR_HISTORY_ENTRY (dlg->priv->search_entry));
gtk_entry_set_activates_default (GTK_ENTRY (dlg->priv->search_text_entry),
TRUE);
@@ -448,13 +448,13 @@ gtranslator_search_dialog_init (GtrSearchDialog * dlg)
dlg->priv->search_entry, 1, 2, 0, 1);
dlg->priv->replace_entry =
- gtranslator_history_entry_new ("gtranslator_replace_with_entry", TRUE);
- gtranslator_history_entry_set_escape_func (GTR_HISTORY_ENTRY
+ gtr_history_entry_new ("gtr_replace_with_entry", TRUE);
+ gtr_history_entry_set_escape_func (GTR_HISTORY_ENTRY
(dlg->priv->replace_entry),
(GtrHistoryEntryEscapeFunc)
- gtranslator_utils_escape_search_text);
+ gtr_utils_escape_search_text);
- dlg->priv->replace_text_entry = gtranslator_history_entry_get_entry
+ dlg->priv->replace_text_entry = gtr_history_entry_get_entry
(GTR_HISTORY_ENTRY (dlg->priv->replace_entry));
gtk_entry_set_activates_default (GTK_ENTRY (dlg->priv->replace_text_entry),
TRUE);
@@ -524,7 +524,7 @@ gtranslator_search_dialog_init (GtrSearchDialog * dlg)
}
GtkWidget *
-gtranslator_search_dialog_new (GtkWindow * parent, gboolean show_replace)
+gtr_search_dialog_new (GtkWindow * parent, gboolean show_replace)
{
GtrSearchDialog *dlg;
@@ -538,7 +538,7 @@ gtranslator_search_dialog_new (GtkWindow * parent, gboolean show_replace)
}
void
-gtranslator_search_dialog_present_with_time (GtrSearchDialog * dialog,
+gtr_search_dialog_present_with_time (GtrSearchDialog * dialog,
guint32 timestamp)
{
g_return_if_fail (GTR_IS_SEARCH_DIALOG (dialog));
@@ -549,7 +549,7 @@ gtranslator_search_dialog_present_with_time (GtrSearchDialog * dialog,
}
gboolean
-gtranslator_search_dialog_get_show_replace (GtrSearchDialog * dialog)
+gtr_search_dialog_get_show_replace (GtrSearchDialog * dialog)
{
g_return_val_if_fail (GTR_IS_SEARCH_DIALOG (dialog), FALSE);
@@ -557,7 +557,7 @@ gtranslator_search_dialog_get_show_replace (GtrSearchDialog * dialog)
}
void
-gtranslator_search_dialog_set_show_replace (GtrSearchDialog * dialog,
+gtr_search_dialog_set_show_replace (GtrSearchDialog * dialog,
gboolean show_replace)
{
g_return_if_fail (GTR_IS_SEARCH_DIALOG (dialog));
@@ -572,7 +572,7 @@ gtranslator_search_dialog_set_show_replace (GtrSearchDialog * dialog,
}
void
-gtranslator_search_dialog_set_search_text (GtrSearchDialog * dialog,
+gtr_search_dialog_set_search_text (GtrSearchDialog * dialog,
const gchar * text)
{
g_return_if_fail (GTR_IS_SEARCH_DIALOG (dialog));
@@ -593,7 +593,7 @@ gtranslator_search_dialog_set_search_text (GtrSearchDialog * dialog,
* The text must be unescaped before searching.
*/
const gchar *
-gtranslator_search_dialog_get_search_text (GtrSearchDialog * dialog)
+gtr_search_dialog_get_search_text (GtrSearchDialog * dialog)
{
g_return_val_if_fail (GTR_IS_SEARCH_DIALOG (dialog), NULL);
@@ -601,7 +601,7 @@ gtranslator_search_dialog_get_search_text (GtrSearchDialog * dialog)
}
void
-gtranslator_search_dialog_set_replace_text (GtrSearchDialog * dialog,
+gtr_search_dialog_set_replace_text (GtrSearchDialog * dialog,
const gchar * text)
{
g_return_if_fail (GTR_IS_SEARCH_DIALOG (dialog));
@@ -611,7 +611,7 @@ gtranslator_search_dialog_set_replace_text (GtrSearchDialog * dialog,
}
const gchar *
-gtranslator_search_dialog_get_replace_text (GtrSearchDialog * dialog)
+gtr_search_dialog_get_replace_text (GtrSearchDialog * dialog)
{
g_return_val_if_fail (GTR_IS_SEARCH_DIALOG (dialog), NULL);
@@ -619,7 +619,7 @@ gtranslator_search_dialog_get_replace_text (GtrSearchDialog * dialog)
}
void
-gtranslator_search_dialog_set_original_text (GtrSearchDialog * dialog,
+gtr_search_dialog_set_original_text (GtrSearchDialog * dialog,
gboolean match_case)
{
g_return_if_fail (GTR_IS_SEARCH_DIALOG (dialog));
@@ -630,7 +630,7 @@ gtranslator_search_dialog_set_original_text (GtrSearchDialog * dialog,
}
gboolean
-gtranslator_search_dialog_get_original_text (GtrSearchDialog * dialog)
+gtr_search_dialog_get_original_text (GtrSearchDialog * dialog)
{
g_return_val_if_fail (GTR_IS_SEARCH_DIALOG (dialog), FALSE);
@@ -640,7 +640,7 @@ gtranslator_search_dialog_get_original_text (GtrSearchDialog * dialog)
}
void
-gtranslator_search_dialog_set_translated_text (GtrSearchDialog *
+gtr_search_dialog_set_translated_text (GtrSearchDialog *
dialog, gboolean match_case)
{
g_return_if_fail (GTR_IS_SEARCH_DIALOG (dialog));
@@ -651,7 +651,7 @@ gtranslator_search_dialog_set_translated_text (GtrSearchDialog *
}
gboolean
-gtranslator_search_dialog_get_translated_text (GtrSearchDialog *
+gtr_search_dialog_get_translated_text (GtrSearchDialog *
dialog)
{
g_return_val_if_fail (GTR_IS_SEARCH_DIALOG (dialog), FALSE);
@@ -663,7 +663,7 @@ gtranslator_search_dialog_get_translated_text (GtrSearchDialog *
}
void
-gtranslator_search_dialog_set_fuzzy (GtrSearchDialog * dialog,
+gtr_search_dialog_set_fuzzy (GtrSearchDialog * dialog,
gboolean match_case)
{
g_return_if_fail (GTR_IS_SEARCH_DIALOG (dialog));
@@ -674,7 +674,7 @@ gtranslator_search_dialog_set_fuzzy (GtrSearchDialog * dialog,
}
gboolean
-gtranslator_search_dialog_get_fuzzy (GtrSearchDialog * dialog)
+gtr_search_dialog_get_fuzzy (GtrSearchDialog * dialog)
{
g_return_val_if_fail (GTR_IS_SEARCH_DIALOG (dialog), FALSE);
@@ -684,7 +684,7 @@ gtranslator_search_dialog_get_fuzzy (GtrSearchDialog * dialog)
}
void
-gtranslator_search_dialog_set_match_case (GtrSearchDialog * dialog,
+gtr_search_dialog_set_match_case (GtrSearchDialog * dialog,
gboolean match_case)
{
g_return_if_fail (GTR_IS_SEARCH_DIALOG (dialog));
@@ -695,7 +695,7 @@ gtranslator_search_dialog_set_match_case (GtrSearchDialog * dialog,
}
gboolean
-gtranslator_search_dialog_get_match_case (GtrSearchDialog * dialog)
+gtr_search_dialog_get_match_case (GtrSearchDialog * dialog)
{
g_return_val_if_fail (GTR_IS_SEARCH_DIALOG (dialog), FALSE);
@@ -705,7 +705,7 @@ gtranslator_search_dialog_get_match_case (GtrSearchDialog * dialog)
}
void
-gtranslator_search_dialog_set_entire_word (GtrSearchDialog * dialog,
+gtr_search_dialog_set_entire_word (GtrSearchDialog * dialog,
gboolean entire_word)
{
g_return_if_fail (GTR_IS_SEARCH_DIALOG (dialog));
@@ -716,7 +716,7 @@ gtranslator_search_dialog_set_entire_word (GtrSearchDialog * dialog,
}
gboolean
-gtranslator_search_dialog_get_entire_word (GtrSearchDialog * dialog)
+gtr_search_dialog_get_entire_word (GtrSearchDialog * dialog)
{
g_return_val_if_fail (GTR_IS_SEARCH_DIALOG (dialog), FALSE);
@@ -726,7 +726,7 @@ gtranslator_search_dialog_get_entire_word (GtrSearchDialog * dialog)
}
void
-gtranslator_search_dialog_set_backwards (GtrSearchDialog * dialog,
+gtr_search_dialog_set_backwards (GtrSearchDialog * dialog,
gboolean backwards)
{
g_return_if_fail (GTR_IS_SEARCH_DIALOG (dialog));
@@ -737,7 +737,7 @@ gtranslator_search_dialog_set_backwards (GtrSearchDialog * dialog,
}
gboolean
-gtranslator_search_dialog_get_backwards (GtrSearchDialog * dialog)
+gtr_search_dialog_get_backwards (GtrSearchDialog * dialog)
{
g_return_val_if_fail (GTR_IS_SEARCH_DIALOG (dialog), FALSE);
@@ -747,7 +747,7 @@ gtranslator_search_dialog_get_backwards (GtrSearchDialog * dialog)
}
void
-gtranslator_search_dialog_set_wrap_around (GtrSearchDialog * dialog,
+gtr_search_dialog_set_wrap_around (GtrSearchDialog * dialog,
gboolean wrap_around)
{
g_return_if_fail (GTR_IS_SEARCH_DIALOG (dialog));
@@ -758,7 +758,7 @@ gtranslator_search_dialog_set_wrap_around (GtrSearchDialog * dialog,
}
gboolean
-gtranslator_search_dialog_get_wrap_around (GtrSearchDialog * dialog)
+gtr_search_dialog_get_wrap_around (GtrSearchDialog * dialog)
{
g_return_val_if_fail (GTR_IS_SEARCH_DIALOG (dialog), FALSE);
diff --git a/src/dialogs/gtr-search-dialog.h b/src/dialogs/gtr-search-dialog.h
index 5f98e6c..324e909 100644
--- a/src/dialogs/gtr-search-dialog.h
+++ b/src/dialogs/gtr-search-dialog.h
@@ -1,6 +1,6 @@
/*
* search-dialog.h
- * This file is part of gtranslator
+ * This file is part of gtranslator based on gedit
*
* Copyright (C) 2005 Paolo Maggi
*
@@ -30,7 +30,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_SEARCH_DIALOG (gtranslator_search_dialog_get_type())
+#define GTR_TYPE_SEARCH_DIALOG (gtr_search_dialog_get_type())
#define GTR_SEARCH_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTR_TYPE_SEARCH_DIALOG, GtrSearchDialog))
#define GTR_SEARCH_DIALOG_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTR_TYPE_SEARCH_DIALOG, GtrSearchDialog const))
#define GTR_SEARCH_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTR_TYPE_SEARCH_DIALOG, GtrSearchDialogClass))
@@ -77,92 +77,92 @@ enum
* Public methods
*/
GType
-gtranslator_search_dialog_get_type (void)
+gtr_search_dialog_get_type (void)
G_GNUC_CONST;
- GtkWidget *gtranslator_search_dialog_new (GtkWindow * parent,
+ GtkWidget *gtr_search_dialog_new (GtkWindow * parent,
gboolean show_replace);
- void gtranslator_search_dialog_present_with_time (GtrSearchDialog
+ void gtr_search_dialog_present_with_time (GtrSearchDialog
* dialog,
guint32 timestamp);
gboolean
- gtranslator_search_dialog_get_show_replace (GtrSearchDialog *
+ gtr_search_dialog_get_show_replace (GtrSearchDialog *
dialog);
- void gtranslator_search_dialog_set_show_replace (GtrSearchDialog
+ void gtr_search_dialog_set_show_replace (GtrSearchDialog
* dialog,
gboolean show_replace);
- void gtranslator_search_dialog_set_search_text (GtrSearchDialog *
+ void gtr_search_dialog_set_search_text (GtrSearchDialog *
dialog,
const gchar * text);
const gchar
- *gtranslator_search_dialog_get_search_text (GtrSearchDialog *
+ *gtr_search_dialog_get_search_text (GtrSearchDialog *
dialog);
- void gtranslator_search_dialog_set_replace_text (GtrSearchDialog
+ void gtr_search_dialog_set_replace_text (GtrSearchDialog
* dialog,
const gchar * text);
const gchar
- *gtranslator_search_dialog_get_replace_text (GtrSearchDialog *
+ *gtr_search_dialog_get_replace_text (GtrSearchDialog *
dialog);
- void gtranslator_search_dialog_set_original_text (GtrSearchDialog
+ void gtr_search_dialog_set_original_text (GtrSearchDialog
* dialog,
gboolean match_case);
gboolean
- gtranslator_search_dialog_get_original_text (GtrSearchDialog *
+ gtr_search_dialog_get_original_text (GtrSearchDialog *
dialog);
void
- gtranslator_search_dialog_set_translated_text (GtrSearchDialog
+ gtr_search_dialog_set_translated_text (GtrSearchDialog
* dialog,
gboolean match_case);
gboolean
- gtranslator_search_dialog_get_translated_text (GtrSearchDialog
+ gtr_search_dialog_get_translated_text (GtrSearchDialog
* dialog);
- void gtranslator_search_dialog_set_fuzzy (GtrSearchDialog *
+ void gtr_search_dialog_set_fuzzy (GtrSearchDialog *
dialog, gboolean match_case);
- gboolean gtranslator_search_dialog_get_fuzzy (GtrSearchDialog *
+ gboolean gtr_search_dialog_get_fuzzy (GtrSearchDialog *
dialog);
- void gtranslator_search_dialog_set_match_case (GtrSearchDialog *
+ void gtr_search_dialog_set_match_case (GtrSearchDialog *
dialog,
gboolean match_case);
gboolean
- gtranslator_search_dialog_get_match_case (GtrSearchDialog *
+ gtr_search_dialog_get_match_case (GtrSearchDialog *
dialog);
- void gtranslator_search_dialog_set_entire_word (GtrSearchDialog *
+ void gtr_search_dialog_set_entire_word (GtrSearchDialog *
dialog,
gboolean entire_word);
gboolean
- gtranslator_search_dialog_get_entire_word (GtrSearchDialog *
+ gtr_search_dialog_get_entire_word (GtrSearchDialog *
dialog);
- void gtranslator_search_dialog_set_backwards (GtrSearchDialog *
+ void gtr_search_dialog_set_backwards (GtrSearchDialog *
dialog,
gboolean backwards);
- gboolean gtranslator_search_dialog_get_backwards (GtrSearchDialog
+ gboolean gtr_search_dialog_get_backwards (GtrSearchDialog
* dialog);
- void gtranslator_search_dialog_set_wrap_around (GtrSearchDialog *
+ void gtr_search_dialog_set_wrap_around (GtrSearchDialog *
dialog,
gboolean wrap_around);
gboolean
- gtranslator_search_dialog_get_wrap_around (GtrSearchDialog *
+ gtr_search_dialog_get_wrap_around (GtrSearchDialog *
dialog);
G_END_DECLS
diff --git a/src/gtr-actions-documents.c b/src/gtr-actions-documents.c
index 10b9c90..ccfe701 100644
--- a/src/gtr-actions-documents.c
+++ b/src/gtr-actions-documents.c
@@ -22,19 +22,19 @@
#include "gtr-actions.h"
void
-gtranslator_actions_documents_next_document (GtkAction * action,
- GtrWindow * window)
+gtr_actions_documents_next_document (GtkAction * action,
+ GtrWindow * window)
{
GtrNotebook *notebook;
- notebook = gtranslator_window_get_notebook (window);
+ notebook = gtr_window_get_notebook (window);
gtk_notebook_next_page (GTK_NOTEBOOK (notebook));
}
void
-gtranslator_actions_documents_previous_document (GtkAction * action,
- GtrWindow * window)
+gtr_actions_documents_previous_document (GtkAction * action,
+ GtrWindow * window)
{
GtrNotebook *notebook;
- notebook = gtranslator_window_get_notebook (window);
+ notebook = gtr_window_get_notebook (window);
gtk_notebook_prev_page (GTK_NOTEBOOK (notebook));
}
diff --git a/src/gtr-actions-edit.c b/src/gtr-actions-edit.c
index e1f7db0..d35d70f 100644
--- a/src/gtr-actions-edit.c
+++ b/src/gtr-actions-edit.c
@@ -33,12 +33,12 @@
#include "gtr-window.h"
void
-gtranslator_actions_edit_undo (GtkAction * action, GtrWindow * window)
+gtr_actions_edit_undo (GtkAction * action, GtrWindow * window)
{
GtrView *active_view;
GtkSourceBuffer *active_document;
- active_view = gtranslator_window_get_active_view (window);
+ active_view = gtr_window_get_active_view (window);
g_return_if_fail (active_view);
active_document =
@@ -53,12 +53,12 @@ gtranslator_actions_edit_undo (GtkAction * action, GtrWindow * window)
}
void
-gtranslator_actions_edit_redo (GtkAction * action, GtrWindow * window)
+gtr_actions_edit_redo (GtkAction * action, GtrWindow * window)
{
GtrView *active_view;
GtkSourceBuffer *active_document;
- active_view = gtranslator_window_get_active_view (window);
+ active_view = gtr_window_get_active_view (window);
g_return_if_fail (active_view);
active_document =
@@ -73,41 +73,41 @@ gtranslator_actions_edit_redo (GtkAction * action, GtrWindow * window)
}
void
-gtranslator_actions_edit_cut (GtkAction * action, GtrWindow * window)
+gtr_actions_edit_cut (GtkAction * action, GtrWindow * window)
{
GtrView *active_view;
- active_view = gtranslator_window_get_active_view (window);
+ active_view = gtr_window_get_active_view (window);
g_return_if_fail (active_view);
- gtranslator_view_cut_clipboard (active_view);
+ gtr_view_cut_clipboard (active_view);
gtk_widget_grab_focus (GTK_WIDGET (active_view));
}
void
-gtranslator_actions_edit_copy (GtkAction * action, GtrWindow * window)
+gtr_actions_edit_copy (GtkAction * action, GtrWindow * window)
{
GtrView *active_view;
- active_view = gtranslator_window_get_active_view (window);
+ active_view = gtr_window_get_active_view (window);
g_return_if_fail (active_view);
- gtranslator_view_copy_clipboard (active_view);
+ gtr_view_copy_clipboard (active_view);
gtk_widget_grab_focus (GTK_WIDGET (active_view));
}
void
-gtranslator_actions_edit_paste (GtkAction * action,
+gtr_actions_edit_paste (GtkAction * action,
GtrWindow * window)
{
GtrView *active_view;
- active_view = gtranslator_window_get_active_view (window);
+ active_view = gtr_window_get_active_view (window);
g_return_if_fail (active_view);
- gtranslator_view_paste_clipboard (active_view);
+ gtr_view_paste_clipboard (active_view);
gtk_widget_grab_focus (GTK_WIDGET (active_view));
}
@@ -117,35 +117,35 @@ gtranslator_actions_edit_paste (GtkAction * action,
* Use the untranslated message as the translation.
*/
void
-gtranslator_message_copy_to_translation (GtkAction * action,
+gtr_message_copy_to_translation (GtkAction * action,
GtrWindow * window)
{
GtrTab *current;
- current = gtranslator_window_get_active_tab (window);
+ current = gtr_window_get_active_tab (window);
- gtranslator_tab_copy_to_translation (current);
+ gtr_tab_copy_to_translation (current);
}
/*
* Toggle the sticky status
*/
void
-gtranslator_message_status_toggle_fuzzy (GtkAction * action,
+gtr_message_status_toggle_fuzzy (GtkAction * action,
GtrWindow * window)
{
GtrTab *current;
GtrPo *po;
GList *msg;
- current = gtranslator_window_get_active_tab (window);
- po = gtranslator_tab_get_po (current);
- msg = gtranslator_po_get_current_message (po);
+ current = gtr_window_get_active_tab (window);
+ po = gtr_tab_get_po (current);
+ msg = gtr_po_get_current_message (po);
- if (gtranslator_msg_is_fuzzy (msg->data))
- gtranslator_msg_set_fuzzy (msg->data, FALSE);
+ if (gtr_msg_is_fuzzy (msg->data))
+ gtr_msg_set_fuzzy (msg->data, FALSE);
else
- gtranslator_msg_set_fuzzy (msg->data, TRUE);
+ gtr_msg_set_fuzzy (msg->data, TRUE);
/*
* Emit that message was changed.
@@ -154,35 +154,35 @@ gtranslator_message_status_toggle_fuzzy (GtkAction * action,
}
void
-gtranslator_actions_edit_preferences (GtkAction * action,
+gtr_actions_edit_preferences (GtkAction * action,
GtrWindow * window)
{
- gtranslator_show_preferences_dialog (window);
+ gtr_show_preferences_dialog (window);
}
void
-gtranslator_actions_edit_header (GtkAction * action,
+gtr_actions_edit_header (GtkAction * action,
GtrWindow * window)
{
- gtranslator_show_header_dialog (window);
+ gtr_show_header_dialog (window);
}
void
-gtranslator_edit_message_comment (GtkAction * action,
+gtr_edit_message_comment (GtkAction * action,
GtrWindow * window)
{
- gtranslator_show_comment_dialog (window);
+ gtr_show_comment_dialog (window);
}
void
-gtranslator_actions_edit_clear (GtkAction * action,
+gtr_actions_edit_clear (GtkAction * action,
GtrWindow * window)
{
GtrTab *tab;
g_return_if_fail (GTR_IS_WINDOW (window));
- tab = gtranslator_window_get_active_tab (window);
+ tab = gtr_window_get_active_tab (window);
- gtranslator_tab_clear_msgstr_views (tab);
+ gtr_tab_clear_msgstr_views (tab);
}
diff --git a/src/gtr-actions-file.c b/src/gtr-actions-file.c
index e9a4d11..eea6209 100644
--- a/src/gtr-actions-file.c
+++ b/src/gtr-actions-file.c
@@ -43,8 +43,8 @@
#include "gtr-utils.h"
#include "gtr-window.h"
-#define GTR_TAB_SAVE_AS "gtranslator-tab-save-as"
-#define GTR_IS_CLOSING_ALL "gtranslator-is-closing-all"
+#define GTR_TAB_SAVE_AS "gtr-tab-save-as"
+#define GTR_IS_CLOSING_ALL "gtr-is-closing-all"
static void load_file_list (GtrWindow * window, const GSList * uris);
@@ -54,8 +54,8 @@ static void load_file_list (GtrWindow * window, const GSList * uris);
* and if not, opens it in a new tab.
*/
gboolean
-gtranslator_open (GFile * location,
- GtrWindow * window, GError ** error)
+gtr_open (GFile * location,
+ GtrWindow * window, GError ** error)
{
GtrHeader *header;
GtrPo *po;
@@ -68,54 +68,54 @@ gtranslator_open (GFile * location,
* If the filename can't be opened, pass the error back to the caller
* to handle.
*/
- po = gtranslator_po_new ();
- gtranslator_po_parse (po, location, error);
+ po = gtr_po_new ();
+ gtr_po_parse (po, location, error);
if ((*error != NULL)
&& (((GError *) * error)->code != GTR_PO_ERROR_RECOVERY))
return FALSE;
- header = gtranslator_po_get_header (po);
- project_id = gtranslator_header_get_prj_id_version (header);
+ header = gtr_po_get_header (po);
+ project_id = gtr_header_get_prj_id_version (header);
/*
* If not a crash/temporary file, add to the history.
*/
- gtranslator_recent_add (window, location, project_id);
+ gtr_recent_add (window, location, project_id);
/*
* Create a page to add to our list of open files
*/
- tab = gtranslator_window_create_tab (window, po);
- gtranslator_window_set_active_tab (window, GTK_WIDGET (tab));
+ tab = gtr_window_create_tab (window, po);
+ gtr_window_set_active_tab (window, GTK_WIDGET (tab));
/*
* Show the current message.
*/
- current = gtranslator_po_get_current_message (po);
- gtranslator_tab_message_go_to (tab, current, FALSE, GTR_TAB_MOVE_NONE);
+ current = gtr_po_get_current_message (po);
+ gtr_tab_message_go_to (tab, current, FALSE, GTR_TAB_MOVE_NONE);
/*
* Grab the focus
*/
- active_view = gtranslator_tab_get_active_view (tab);
+ active_view = gtr_tab_get_active_view (tab);
gtk_widget_grab_focus (GTK_WIDGET (active_view));
- gtranslator_statusbar_update_progress_bar (GTR_STATUSBAR
- (gtranslator_window_get_statusbar
+ gtr_statusbar_update_progress_bar (GTR_STATUSBAR
+ (gtr_window_get_statusbar
(window)),
(gdouble)
- gtranslator_po_get_translated_count
+ gtr_po_get_translated_count
(po),
(gdouble)
- gtranslator_po_get_messages_count
+ gtr_po_get_messages_count
(po));
return TRUE;
}
static void
-gtranslator_po_parse_files_from_dialog (GtkWidget * dialog,
+gtr_po_parse_files_from_dialog (GtkWidget * dialog,
GtrWindow * window)
{
GSList *po_files, *l;
@@ -144,7 +144,7 @@ gtranslator_po_parse_files_from_dialog (GtkWidget * dialog,
uri = g_file_get_uri (parent);
g_object_unref (parent);
- _gtranslator_application_set_last_dir (GTR_APP, uri);
+ _gtr_application_set_last_dir (GTR_APP, uri);
g_free (uri);
@@ -163,7 +163,7 @@ gtranslator_po_parse_files_from_dialog (GtkWidget * dialog,
static void
-gtranslator_file_chooser_analyse (gpointer dialog,
+gtr_file_chooser_analyse (gpointer dialog,
FileselMode mode,
GtrWindow * window)
{
@@ -175,7 +175,7 @@ gtranslator_file_chooser_analyse (gpointer dialog,
case GTK_RESPONSE_ACCEPT:
if (mode == FILESEL_OPEN)
{
- gtranslator_po_parse_files_from_dialog (GTK_WIDGET (dialog),
+ gtr_po_parse_files_from_dialog (GTK_WIDGET (dialog),
window);
}
break;
@@ -195,7 +195,7 @@ gtranslator_file_chooser_analyse (gpointer dialog,
* The "Open file" dialog.
*/
void
-gtranslator_open_file_dialog (GtkAction * action, GtrWindow * window)
+gtr_open_file_dialog (GtkAction * action, GtrWindow * window)
{
GtkWidget *dialog = NULL;
@@ -204,10 +204,10 @@ gtranslator_open_file_dialog (GtkAction * action, GtrWindow * window)
gtk_window_present (GTK_WINDOW (dialog));
return;
}
- dialog = gtranslator_file_chooser_new (GTK_WINDOW (window),
+ dialog = gtr_file_chooser_new (GTK_WINDOW (window),
FILESEL_OPEN,
_("Open file for translation"),
- _gtranslator_application_get_last_dir
+ _gtr_application_get_last_dir
(GTR_APP));
/*
@@ -218,7 +218,7 @@ gtranslator_open_file_dialog (GtkAction * action, GtrWindow * window)
*/
//gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(dialog), TRUE);
- gtranslator_file_chooser_analyse ((gpointer) dialog, FILESEL_OPEN, window);
+ gtr_file_chooser_analyse ((gpointer) dialog, FILESEL_OPEN, window);
}
static void
@@ -236,7 +236,7 @@ save_dialog_response_cb (GtkDialog * dialog,
g_return_if_fail (GTK_IS_FILE_CHOOSER (dialog));
- po = gtranslator_tab_get_po (tab);
+ po = gtr_tab_get_po (tab);
if (response_id != GTK_RESPONSE_ACCEPT)
{
@@ -254,11 +254,11 @@ save_dialog_response_cb (GtkDialog * dialog,
if (po != NULL)
{
- gtranslator_po_set_location (po, location);
+ gtr_po_set_location (po, location);
g_object_unref (location);
- gtranslator_po_save_file (po, &error);
+ gtr_po_save_file (po, &error);
if (error)
{
@@ -275,11 +275,11 @@ save_dialog_response_cb (GtkDialog * dialog,
}
/* We have to change the state of the tab */
- gtranslator_po_set_state (po, GTR_PO_STATE_SAVED);
+ gtr_po_set_state (po, GTR_PO_STATE_SAVED);
/* Flash a message */
- status = GTR_STATUSBAR (gtranslator_window_get_statusbar (window));
- gtranslator_statusbar_flash_message (status, 0, _("File saved."));
+ status = GTR_STATUSBAR (gtr_window_get_statusbar (window));
+ gtr_statusbar_flash_message (status, 0, _("File saved."));
}
g_object_unref (location);
}
@@ -308,7 +308,7 @@ confirm_overwrite_callback (GtkFileChooser * dialog, gpointer data)
* "Save as" dialog.
*/
void
-gtranslator_save_file_as_dialog (GtkAction * action,
+gtr_save_file_as_dialog (GtkAction * action,
GtrWindow * window)
{
GtkWidget *dialog = NULL;
@@ -324,13 +324,13 @@ gtranslator_save_file_as_dialog (GtkAction * action,
return;
}
- current_page = gtranslator_window_get_active_tab (window);
- po = gtranslator_tab_get_po (current_page);
+ current_page = gtr_window_get_active_tab (window);
+ po = gtr_tab_get_po (current_page);
- dialog = gtranslator_file_chooser_new (GTK_WINDOW (window),
+ dialog = gtr_file_chooser_new (GTK_WINDOW (window),
FILESEL_SAVE,
_("Save file as..."),
- _gtranslator_application_get_last_dir
+ _gtr_application_get_last_dir
(GTR_APP));
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog),
@@ -342,7 +342,7 @@ gtranslator_save_file_as_dialog (GtkAction * action,
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
/*Set the suggested file */
- location = gtranslator_po_get_location (po);
+ location = gtr_po_get_location (po);
uri = g_file_get_uri (location);
@@ -369,7 +369,7 @@ gtranslator_save_file_as_dialog (GtkAction * action,
* A callback for Save
*/
void
-gtranslator_save_current_file_dialog (GtkWidget * widget,
+gtr_save_current_file_dialog (GtkWidget * widget,
GtrWindow * window)
{
GError *error = NULL;
@@ -377,10 +377,10 @@ gtranslator_save_current_file_dialog (GtkWidget * widget,
GtrPo *po;
GtrStatusbar *status;
- current = gtranslator_window_get_active_tab (window);
- po = gtranslator_tab_get_po (current);
+ current = gtr_window_get_active_tab (window);
+ po = gtr_tab_get_po (current);
- gtranslator_po_save_file (po, &error);
+ gtr_po_save_file (po, &error);
if (error)
{
@@ -396,11 +396,11 @@ gtranslator_save_current_file_dialog (GtkWidget * widget,
}
/* We have to change the state of the tab */
- gtranslator_po_set_state (po, GTR_PO_STATE_SAVED);
+ gtr_po_set_state (po, GTR_PO_STATE_SAVED);
/* Flash a message */
- status = GTR_STATUSBAR (gtranslator_window_get_statusbar (window));
- gtranslator_statusbar_flash_message (status, 0, _("File saved."));
+ status = GTR_STATUSBAR (gtr_window_get_statusbar (window));
+ gtr_statusbar_flash_message (status, 0, _("File saved."));
}
static gboolean
@@ -435,14 +435,14 @@ load_file_list (GtrWindow * window, const GSList * locations)
if (!is_duplicated_location (locations_to_load, locations->data))
{
/*We need to now if is already loaded in any tab */
- tab = gtranslator_window_get_tab_from_location (window,
+ tab = gtr_window_get_tab_from_location (window,
(GFile *)
locations->data);
if (tab != NULL)
{
if (locations == l)
- gtranslator_window_set_active_tab (window, tab);
+ gtr_window_set_active_tab (window, tab);
}
else
locations_to_load = g_slist_prepend (locations_to_load,
@@ -463,7 +463,7 @@ load_file_list (GtrWindow * window, const GSList * locations)
{
g_return_if_fail (locations_to_load->data != NULL);
- if (!gtranslator_open (locations_to_load->data, window, &error))
+ if (!gtr_open (locations_to_load->data, window, &error))
break;
locations_to_load = g_slist_next (locations_to_load);
@@ -495,12 +495,12 @@ load_file_list (GtrWindow * window, const GSList * locations)
/**
- * gtranslator_actions_load_uris:
+ * gtr_actions_load_uris:
*
* Ignore non-existing URIs
*/
void
-gtranslator_actions_load_locations (GtrWindow * window,
+gtr_actions_load_locations (GtrWindow * window,
const GSList * locations)
{
g_return_if_fail (GTR_IS_WINDOW (window));
@@ -514,11 +514,11 @@ save_and_close_document (GtrPo * po, GtrWindow * window)
{
GtrTab *tab;
- gtranslator_save_current_file_dialog (NULL, window);
+ gtr_save_current_file_dialog (NULL, window);
- tab = gtranslator_tab_get_from_document (po);
+ tab = gtr_tab_get_from_document (po);
- _gtranslator_window_close_tab (window, tab);
+ _gtr_window_close_tab (window, tab);
}
static void
@@ -527,7 +527,7 @@ close_all_tabs (GtrWindow * window)
GtrNotebook *nb;
gint pages;
- nb = gtranslator_window_get_notebook (window);
+ nb = gtr_window_get_notebook (window);
pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (nb));
while (pages >= 0)
@@ -551,7 +551,7 @@ save_and_close_all_documents (GList * unsaved_documents,
for (l = unsaved_documents; l != NULL; l = g_list_next (l))
{
- gtranslator_po_save_file (l->data, &error);
+ gtr_po_save_file (l->data, &error);
if (error)
{
@@ -568,9 +568,9 @@ save_and_close_all_documents (GList * unsaved_documents,
return;
}
- tab = gtranslator_tab_get_from_document (l->data);
+ tab = gtr_tab_get_from_document (l->data);
- _gtranslator_window_close_tab (window, tab);
+ _gtr_window_close_tab (window, tab);
}
gtk_widget_destroy (GTK_WIDGET (window));
@@ -593,7 +593,7 @@ close_confirmation_dialog_response_handler (GtrCloseConfirmationDialog
{
case GTK_RESPONSE_YES: /* Save and Close */
selected_documents =
- gtranslator_close_confirmation_dialog_get_selected_documents (dlg);
+ gtr_close_confirmation_dialog_get_selected_documents (dlg);
if (selected_documents == NULL)
{
if (is_closing_all)
@@ -637,11 +637,11 @@ close_confirmation_dialog_response_handler (GtrCloseConfirmationDialog
const GList *unsaved_documents;
unsaved_documents =
- gtranslator_close_confirmation_dialog_get_unsaved_documents (dlg);
+ gtr_close_confirmation_dialog_get_unsaved_documents (dlg);
g_return_if_fail (unsaved_documents->next == NULL);
- _gtranslator_window_close_tab (window,
- gtranslator_tab_get_from_document
+ _gtr_window_close_tab (window,
+ gtr_tab_get_from_document
(unsaved_documents->data));
}
@@ -654,18 +654,18 @@ close_confirmation_dialog_response_handler (GtrCloseConfirmationDialog
}
void
-gtranslator_close_tab (GtrTab * tab, GtrWindow * window)
+gtr_close_tab (GtrTab * tab, GtrWindow * window)
{
g_object_set_data (G_OBJECT (window),
GTR_IS_CLOSING_ALL, GINT_TO_POINTER (0));
- if (!_gtranslator_tab_can_close (tab))
+ if (!_gtr_tab_can_close (tab))
{
GtkWidget *dlg;
dlg =
- gtranslator_close_confirmation_dialog_new_single (GTK_WINDOW (window),
- gtranslator_tab_get_po
+ gtr_close_confirmation_dialog_new_single (GTK_WINDOW (window),
+ gtr_tab_get_po
(tab), FALSE);
g_signal_connect (dlg,
@@ -676,17 +676,17 @@ gtranslator_close_tab (GtrTab * tab, GtrWindow * window)
gtk_widget_show (dlg);
}
else
- _gtranslator_window_close_tab (window, tab);
+ _gtr_window_close_tab (window, tab);
}
void
-gtranslator_file_close (GtkAction * widget, GtrWindow * window)
+gtr_file_close (GtkAction * widget, GtrWindow * window)
{
GtrTab *tab;
- tab = gtranslator_window_get_active_tab (window);
+ tab = gtr_window_get_active_tab (window);
- gtranslator_close_tab (tab, window);
+ gtr_close_tab (tab, window);
}
static GList *
@@ -698,7 +698,7 @@ get_modified_documents (GtrWindow * window)
gint pages;
GList *list = NULL;
- nb = gtranslator_window_get_notebook (window);
+ nb = gtr_window_get_notebook (window);
pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (nb));
while (pages > 0)
@@ -706,8 +706,8 @@ get_modified_documents (GtrWindow * window)
tab = GTR_TAB (gtk_notebook_get_nth_page (GTK_NOTEBOOK (nb),
pages - 1));
- po = gtranslator_tab_get_po (tab);
- if (gtranslator_po_get_state (po) == GTR_PO_STATE_MODIFIED)
+ po = gtr_tab_get_po (tab);
+ if (gtr_po_get_state (po) == GTR_PO_STATE_MODIFIED)
list = g_list_prepend (list, po);
pages--;
@@ -727,7 +727,7 @@ close_all_documents (GtrWindow * window, gboolean logout_mode)
{
GtkWidget *dlg;
- dlg = gtranslator_close_confirmation_dialog_new (GTK_WINDOW (window),
+ dlg = gtr_close_confirmation_dialog_new (GTK_WINDOW (window),
list, logout_mode);
g_signal_connect (dlg,
@@ -751,7 +751,7 @@ close_all_documents (GtrWindow * window, gboolean logout_mode)
}
void
-gtranslator_file_quit (GtkAction * action, GtrWindow * window)
+gtr_file_quit (GtkAction * action, GtrWindow * window)
{
GtrNotebook *nb;
GtrTab *tab;
@@ -764,7 +764,7 @@ gtranslator_file_quit (GtkAction * action, GtrWindow * window)
GFile *file, *file_temp;
gint r;
- config_folder = gtranslator_dirs_get_user_config_dir ();
+ config_folder = gtr_dirs_get_user_config_dir ();
filename = g_build_filename (config_folder, "profiles.xml", NULL);
g_free (config_folder);
filename_temp = g_build_filename (g_get_tmp_dir (), "profiles.xml", NULL);
@@ -772,18 +772,18 @@ gtranslator_file_quit (GtkAction * action, GtrWindow * window)
file = g_file_new_for_path (filename);
file_temp = g_file_new_for_path (filename_temp);
- profiles_list = gtranslator_application_get_profiles (GTR_APP);
+ profiles_list = gtr_application_get_profiles (GTR_APP);
if (profiles_list != NULL)
{
if (g_file_query_exists (file_temp, NULL))
{
- r = gtranslator_profile_save_profiles_in_xml (filename_temp);
+ r = gtr_profile_save_profiles_in_xml (filename_temp);
}
else
{
g_file_create (file_temp, G_FILE_CREATE_NONE, NULL, NULL);
- r = gtranslator_profile_save_profiles_in_xml (filename_temp);
+ r = gtr_profile_save_profiles_in_xml (filename_temp);
}
if (r != -1)
{
@@ -808,14 +808,14 @@ gtranslator_file_quit (GtkAction * action, GtrWindow * window)
}
void
-_gtranslator_actions_file_close_all (GtkAction * action,
+_gtr_actions_file_close_all (GtkAction * action,
GtrWindow * window)
{
close_all_documents (window, FALSE);
}
void
-_gtranslator_actions_file_save_all (GtkAction * action,
+_gtr_actions_file_save_all (GtkAction * action,
GtrWindow * window)
{
GList *list, *l;
@@ -827,7 +827,7 @@ _gtranslator_actions_file_save_all (GtkAction * action,
GError *error = NULL;
GtrStatusbar *status;
- gtranslator_po_save_file (GTR_PO (l->data), &error);
+ gtr_po_save_file (GTR_PO (l->data), &error);
if (error)
{
@@ -846,11 +846,11 @@ _gtranslator_actions_file_save_all (GtkAction * action,
}
/* We have to change the state of the tab */
- gtranslator_po_set_state (GTR_PO (l->data), GTR_PO_STATE_SAVED);
+ gtr_po_set_state (GTR_PO (l->data), GTR_PO_STATE_SAVED);
/* Flash a message */
- status = GTR_STATUSBAR (gtranslator_window_get_statusbar (window));
- gtranslator_statusbar_flash_message (status, 0, _("Files saved."));
+ status = GTR_STATUSBAR (gtr_window_get_statusbar (window));
+ gtr_statusbar_flash_message (status, 0, _("Files saved."));
}
g_list_free (list);
diff --git a/src/gtr-actions-go.c b/src/gtr-actions-go.c
index cd38675..262644b 100644
--- a/src/gtr-actions-go.c
+++ b/src/gtr-actions-go.c
@@ -32,113 +32,113 @@
void
-gtranslator_message_go_to_first (GtkAction * action,
+gtr_message_go_to_first (GtkAction * action,
GtrWindow * window)
{
GtrTab *current;
GtrPo *po;
- current = gtranslator_window_get_active_tab (window);
- po = gtranslator_tab_get_po (current);
- gtranslator_tab_go_to_first (current);
+ current = gtr_window_get_active_tab (window);
+ po = gtr_tab_get_po (current);
+ gtr_tab_go_to_first (current);
set_sensitive_according_to_message (window, po);
}
void
-gtranslator_message_go_to_previous (GtkAction * action,
+gtr_message_go_to_previous (GtkAction * action,
GtrWindow * window)
{
GtrTab *current;
GtrPo *po;
- current = gtranslator_window_get_active_tab (window);
- po = gtranslator_tab_get_po (current);
- gtranslator_tab_go_to_prev (current);
+ current = gtr_window_get_active_tab (window);
+ po = gtr_tab_get_po (current);
+ gtr_tab_go_to_prev (current);
set_sensitive_according_to_message (window, po);
}
void
-gtranslator_message_go_to_next (GtkAction * action,
+gtr_message_go_to_next (GtkAction * action,
GtrWindow * window)
{
GtrTab *current;
GtrPo *po;
- current = gtranslator_window_get_active_tab (window);
- po = gtranslator_tab_get_po (current);
- gtranslator_tab_go_to_next (current);
+ current = gtr_window_get_active_tab (window);
+ po = gtr_tab_get_po (current);
+ gtr_tab_go_to_next (current);
set_sensitive_according_to_message (window, po);
}
void
-gtranslator_message_go_to_last (GtkAction * action,
+gtr_message_go_to_last (GtkAction * action,
GtrWindow * window)
{
GtrTab *current;
GtrPo *po;
- current = gtranslator_window_get_active_tab (window);
- po = gtranslator_tab_get_po (current);
- gtranslator_tab_go_to_last (current);
+ current = gtr_window_get_active_tab (window);
+ po = gtr_tab_get_po (current);
+ gtr_tab_go_to_last (current);
set_sensitive_according_to_message (window, po);
}
void
-gtranslator_message_go_to_next_fuzzy (GtkAction * action,
+gtr_message_go_to_next_fuzzy (GtkAction * action,
GtrWindow * window)
{
GtrTab *current;
GtrPo *po;
- current = gtranslator_window_get_active_tab (window);
- po = gtranslator_tab_get_po (current);
- if (gtranslator_tab_go_to_next_fuzzy (current))
+ current = gtr_window_get_active_tab (window);
+ po = gtr_tab_get_po (current);
+ if (gtr_tab_go_to_next_fuzzy (current))
set_sensitive_according_to_message (window, po);
}
void
-gtranslator_message_go_to_prev_fuzzy (GtkAction * action,
+gtr_message_go_to_prev_fuzzy (GtkAction * action,
GtrWindow * window)
{
GtrTab *current;
GtrPo *po;
- current = gtranslator_window_get_active_tab (window);
- po = gtranslator_tab_get_po (current);
- if (gtranslator_tab_go_to_prev_fuzzy (current))
+ current = gtr_window_get_active_tab (window);
+ po = gtr_tab_get_po (current);
+ if (gtr_tab_go_to_prev_fuzzy (current))
set_sensitive_according_to_message (window, po);
}
void
-gtranslator_message_go_to_next_untranslated (GtkAction * action,
+gtr_message_go_to_next_untranslated (GtkAction * action,
GtrWindow * window)
{
GtrTab *current;
GtrPo *po;
GList *msg;
- current = gtranslator_window_get_active_tab (window);
- po = gtranslator_tab_get_po (current);
- if (gtranslator_tab_go_to_next_untrans (current))
+ current = gtr_window_get_active_tab (window);
+ po = gtr_tab_get_po (current);
+ if (gtr_tab_go_to_next_untrans (current))
set_sensitive_according_to_message (window, po);
}
void
-gtranslator_message_go_to_prev_untranslated (GtkAction * action,
+gtr_message_go_to_prev_untranslated (GtkAction * action,
GtrWindow * window)
{
GtrTab *current;
GtrPo *po;
GList *msg;
- current = gtranslator_window_get_active_tab (window);
- po = gtranslator_tab_get_po (current);
- if (gtranslator_tab_go_to_prev_untrans (current))
+ current = gtr_window_get_active_tab (window);
+ po = gtr_tab_get_po (current);
+ if (gtr_tab_go_to_prev_untrans (current))
set_sensitive_according_to_message (window, po);
}
void
-gtranslator_message_go_to_next_fuzzy_or_untranslated (GtkAction * action,
+gtr_message_go_to_next_fuzzy_or_untranslated (GtkAction * action,
GtrWindow *
window)
{
@@ -146,14 +146,14 @@ gtranslator_message_go_to_next_fuzzy_or_untranslated (GtkAction * action,
GtrPo *po;
GList *msg;
- current = gtranslator_window_get_active_tab (window);
- po = gtranslator_tab_get_po (current);
- if (gtranslator_tab_go_to_next_fuzzy_or_untrans (current))
+ current = gtr_window_get_active_tab (window);
+ po = gtr_tab_get_po (current);
+ if (gtr_tab_go_to_next_fuzzy_or_untrans (current))
set_sensitive_according_to_message (window, po);
}
void
-gtranslator_message_go_to_prev_fuzzy_or_untranslated (GtkAction * action,
+gtr_message_go_to_prev_fuzzy_or_untranslated (GtkAction * action,
GtrWindow *
window)
{
@@ -161,14 +161,14 @@ gtranslator_message_go_to_prev_fuzzy_or_untranslated (GtkAction * action,
GtrPo *po;
GList *msg;
- current = gtranslator_window_get_active_tab (window);
- po = gtranslator_tab_get_po (current);
- if (gtranslator_tab_go_to_prev_fuzzy_or_untrans (current))
+ current = gtr_window_get_active_tab (window);
+ po = gtr_tab_get_po (current);
+ if (gtr_tab_go_to_prev_fuzzy_or_untrans (current))
set_sensitive_according_to_message (window, po);
}
void
-gtranslator_message_jump (GtkAction * action, GtrWindow * window)
+gtr_message_jump (GtkAction * action, GtrWindow * window)
{
- gtranslator_show_jump_dialog (window);
+ gtr_show_jump_dialog (window);
}
diff --git a/src/gtr-actions-help.c b/src/gtr-actions-help.c
index 09860e8..7cbe43a 100644
--- a/src/gtr-actions-help.c
+++ b/src/gtr-actions-help.c
@@ -31,21 +31,17 @@
#include <gtk/gtk.h>
-/*
- * Show the user's guide for gtranslator
- */
+/* Show the user's guide for gtranslator */
void
-gtranslator_cmd_help_contents (GtkAction * action, GtrWindow * window)
+gtr_cmd_help_contents (GtkAction * action, GtrWindow * window)
{
- gtranslator_utils_help_display (GTK_WINDOW (window),
- "gtranslator", "gtranslator.xml");
+ gtr_utils_help_display (GTK_WINDOW (window),
+ "gtr", "gtr.xml");
}
-/*
- * Creates and shows the about box for gtranslator.
- */
+/* Creates and shows the about box for gtranslator */
void
-gtranslator_about_dialog (GtkAction * action, GtrWindow * window)
+gtr_about_dialog (GtkAction * action, GtrWindow * window)
{
gchar *license_trans;
@@ -105,7 +101,7 @@ gtranslator_about_dialog (GtkAction * action, GtrWindow * window)
gchar *pixmaps_dir;
gchar *logo_file;
- pixmaps_dir = gtranslator_dirs_get_pixmaps_dir ();
+ pixmaps_dir = gtr_dirs_get_pixmaps_dir ();
logo_file = g_build_filename (pixmaps_dir,
"gtranslator-logo.png",
NULL);
@@ -120,14 +116,12 @@ gtranslator_about_dialog (GtkAction * action, GtrWindow * window)
gtk_show_about_dialog (GTK_WINDOW (window),
"comments",
- _
- ("Translation file editing suite for localization of applications and libraries."),
+ _("Translation file editing suite for localization of applications and libraries."),
"authors", authors, "copyright",
- _
- ("Copyright © 1999-2008 Free Software Foundation, Inc."),
+ _("Copyright © 1999-2008 Free Software Foundation, Inc."),
"documenters", documenters, "license", license_trans,
"logo", logo,
- "title", _("About Gtr"),
+ "title", _("About Gtranslator"),
/*
* Note to translators: put here your name and email so it will show
* up in the "about" box
@@ -136,7 +130,7 @@ gtranslator_about_dialog (GtkAction * action, GtrWindow * window)
"version", PACKAGE_VERSION,
"website", PACKAGE_URL,
"wrap-license", TRUE,
- "website-label", _("Gtr Web Site"), NULL);
+ "website-label", _("Gtranslator Web Site"), NULL);
if (logo)
g_object_unref (logo);
diff --git a/src/gtr-actions-search.c b/src/gtr-actions-search.c
index b633112..66aa14a 100644
--- a/src/gtr-actions-search.c
+++ b/src/gtr-actions-search.c
@@ -41,8 +41,8 @@
#include "dialogs/gtr-search-dialog.h"
-#define GTR_SEARCH_DIALOG_KEY "gtranslator-search-dialog-key"
-#define GTR_LAST_SEARCH_DATA_KEY "gtranslator-last-search-data-key"
+#define GTR_SEARCH_DIALOG_KEY "gtr-search-dialog-key"
+#define GTR_LAST_SEARCH_DATA_KEY "gtr-last-search-data-key"
/* data stored in the document
* to persist the last searched
@@ -76,28 +76,28 @@ last_search_data_set (LastSearchData * data, GtrSearchDialog * dialog)
{
const gchar *str;
- str = gtranslator_search_dialog_get_search_text (dialog);
+ str = gtr_search_dialog_get_search_text (dialog);
if (str != NULL && *str != '\0')
{
g_free (data->find_text);
- data->find_text = gtranslator_utils_unescape_search_text (str);
+ data->find_text = gtr_utils_unescape_search_text (str);
}
- str = gtranslator_search_dialog_get_replace_text (dialog);
+ str = gtr_search_dialog_get_replace_text (dialog);
if (str != NULL && *str != '\0')
{
g_free (data->replace_text);
- data->replace_text = gtranslator_utils_unescape_search_text (str);
+ data->replace_text = gtr_utils_unescape_search_text (str);
}
- data->original_text = gtranslator_search_dialog_get_original_text (dialog);
+ data->original_text = gtr_search_dialog_get_original_text (dialog);
data->translated_text =
- gtranslator_search_dialog_get_translated_text (dialog);
- data->fuzzy_messages = gtranslator_search_dialog_get_fuzzy (dialog);
- data->match_case = gtranslator_search_dialog_get_match_case (dialog);
- data->entire_word = gtranslator_search_dialog_get_entire_word (dialog);
- data->backwards = gtranslator_search_dialog_get_backwards (dialog);
- data->wrap_around = gtranslator_search_dialog_get_wrap_around (dialog);
+ gtr_search_dialog_get_translated_text (dialog);
+ data->fuzzy_messages = gtr_search_dialog_get_fuzzy (dialog);
+ data->match_case = gtr_search_dialog_get_match_case (dialog);
+ data->entire_word = gtr_search_dialog_get_entire_word (dialog);
+ data->backwards = gtr_search_dialog_get_backwards (dialog);
+ data->wrap_around = gtr_search_dialog_get_wrap_around (dialog);
}
static void
@@ -105,7 +105,7 @@ search_dialog_set_last_find_text (GtrSearchDialog * dialog,
LastSearchData * data)
{
if (data->find_text)
- gtranslator_search_dialog_set_search_text (dialog, data->find_text);
+ gtr_search_dialog_set_search_text (dialog, data->find_text);
}
static void
@@ -113,21 +113,21 @@ search_dialog_set_last_replace_text (GtrSearchDialog * dialog,
LastSearchData * data)
{
if (data->replace_text)
- gtranslator_search_dialog_set_replace_text (dialog, data->replace_text);
+ gtr_search_dialog_set_replace_text (dialog, data->replace_text);
}
static void
search_dialog_set_last_options (GtrSearchDialog * dialog,
LastSearchData * data)
{
- gtranslator_search_dialog_set_original_text (dialog, data->original_text);
- gtranslator_search_dialog_set_translated_text (dialog,
+ gtr_search_dialog_set_original_text (dialog, data->original_text);
+ gtr_search_dialog_set_translated_text (dialog,
data->translated_text);
- gtranslator_search_dialog_set_fuzzy (dialog, data->fuzzy_messages);
- gtranslator_search_dialog_set_match_case (dialog, data->match_case);
- gtranslator_search_dialog_set_entire_word (dialog, data->entire_word);
- gtranslator_search_dialog_set_backwards (dialog, data->backwards);
- gtranslator_search_dialog_set_wrap_around (dialog, data->wrap_around);
+ gtr_search_dialog_set_fuzzy (dialog, data->fuzzy_messages);
+ gtr_search_dialog_set_match_case (dialog, data->match_case);
+ gtr_search_dialog_set_entire_word (dialog, data->entire_word);
+ gtr_search_dialog_set_backwards (dialog, data->backwards);
+ gtr_search_dialog_set_wrap_around (dialog, data->wrap_around);
}
/*
@@ -163,11 +163,11 @@ phrase_found (GtrWindow * window, gint occurrences)
{
GtrStatusbar *statusbar;
- statusbar = GTR_STATUSBAR (gtranslator_window_get_statusbar (window));
+ statusbar = GTR_STATUSBAR (gtr_window_get_statusbar (window));
if (occurrences > 1)
{
- gtranslator_statusbar_flash_message (statusbar,
+ gtr_statusbar_flash_message (statusbar,
0,
ngettext
("Found and replaced %d occurrence",
@@ -177,12 +177,12 @@ phrase_found (GtrWindow * window, gint occurrences)
else
{
if (occurrences == 1)
- gtranslator_statusbar_flash_message (statusbar,
+ gtr_statusbar_flash_message (statusbar,
0,
_
("Found and replaced one occurrence"));
else
- gtranslator_statusbar_flash_message (statusbar, 0, " ");
+ gtr_statusbar_flash_message (statusbar, 0, " ");
}
}
@@ -191,8 +191,8 @@ phrase_not_found (GtrWindow * window)
{
GtrStatusbar *status;
- status = GTR_STATUSBAR (gtranslator_window_get_statusbar (window));
- gtranslator_statusbar_flash_message (status, 0, _("Phrase not found"));
+ status = GTR_STATUSBAR (gtr_window_get_statusbar (window));
+ gtr_statusbar_flash_message (status, 0, _("Phrase not found"));
}
static gboolean
@@ -214,7 +214,7 @@ run_search (GtrView * view, gboolean follow)
gtk_text_buffer_get_selection_bounds (GTK_TEXT_BUFFER (doc),
NULL, &start_iter);
- found = gtranslator_view_search_forward (view,
+ found = gtr_view_search_forward (view,
&start_iter,
NULL, &match_start, &match_end);
@@ -239,9 +239,9 @@ find_in_list (GtrWindow * window,
GList * views,
gboolean fuzzy, gboolean wrap_around, gboolean search_backwards)
{
- GtrTab *tab = gtranslator_window_get_active_tab (window);
- GtrPo *po = gtranslator_tab_get_po (tab);
- GList *l = gtranslator_po_get_current_message (po);
+ GtrTab *tab = gtr_window_get_active_tab (window);
+ GtrPo *po = gtr_tab_get_po (tab);
+ GList *l = gtr_po_get_current_message (po);
GList *current;
static GList *viewsaux = NULL;
@@ -257,7 +257,7 @@ find_in_list (GtrWindow * window,
do
{
- if (gtranslator_msg_is_fuzzy (GTR_MSG (l->data)) && !fuzzy)
+ if (gtr_msg_is_fuzzy (GTR_MSG (l->data)) && !fuzzy)
{
if (!search_backwards)
{
@@ -281,7 +281,7 @@ find_in_list (GtrWindow * window,
else
l = l->prev;
}
- gtranslator_tab_message_go_to (tab, l, TRUE, GTR_TAB_MOVE_NONE);
+ gtr_tab_message_go_to (tab, l, TRUE, GTR_TAB_MOVE_NONE);
}
else
{
@@ -292,7 +292,7 @@ find_in_list (GtrWindow * window,
found = run_search (GTR_VIEW (viewsaux->data), found);
if (found)
{
- gtranslator_tab_message_go_to (tab, l, FALSE,
+ gtr_tab_message_go_to (tab, l, FALSE,
GTR_TAB_MOVE_NONE);
run_search (GTR_VIEW (viewsaux->data), aux);
return TRUE;
@@ -321,7 +321,7 @@ find_in_list (GtrWindow * window,
else
l = l->prev;
}
- gtranslator_tab_message_go_to (tab, l, TRUE, GTR_TAB_MOVE_NONE);
+ gtr_tab_message_go_to (tab, l, TRUE, GTR_TAB_MOVE_NONE);
viewsaux = views;
}
}
@@ -349,26 +349,26 @@ do_find (GtrSearchDialog * dialog, GtrWindow * window)
gboolean found;
/* Used to store search options */
- tab = gtranslator_window_get_active_tab (window);
+ tab = gtr_window_get_active_tab (window);
- entry_text = gtranslator_search_dialog_get_search_text (dialog);
+ entry_text = gtr_search_dialog_get_search_text (dialog);
/* Views where find */
- original_text = gtranslator_search_dialog_get_original_text (dialog);
- translated_text = gtranslator_search_dialog_get_translated_text (dialog);
- fuzzy = gtranslator_search_dialog_get_fuzzy (dialog);
+ original_text = gtr_search_dialog_get_original_text (dialog);
+ translated_text = gtr_search_dialog_get_translated_text (dialog);
+ fuzzy = gtr_search_dialog_get_fuzzy (dialog);
/* Flags */
- match_case = gtranslator_search_dialog_get_match_case (dialog);
- entire_word = gtranslator_search_dialog_get_entire_word (dialog);
- search_backwards = gtranslator_search_dialog_get_backwards (dialog);
- wrap_around = gtranslator_search_dialog_get_wrap_around (dialog);
+ match_case = gtr_search_dialog_get_match_case (dialog);
+ entire_word = gtr_search_dialog_get_entire_word (dialog);
+ search_backwards = gtr_search_dialog_get_backwards (dialog);
+ wrap_around = gtr_search_dialog_get_wrap_around (dialog);
if (!original_text && !translated_text && !fuzzy)
return;
/* Get textviews */
- views = gtranslator_window_get_all_views (window, original_text,
+ views = gtr_window_get_all_views (window, original_text,
translated_text);
g_return_if_fail (views != NULL);
@@ -381,12 +381,12 @@ do_find (GtrSearchDialog * dialog, GtrWindow * window)
while (list != NULL)
{
search_text =
- gtranslator_view_get_search_text (GTR_VIEW (list->data), &old_flags);
+ gtr_view_get_search_text (GTR_VIEW (list->data), &old_flags);
if ((search_text == NULL) ||
(strcmp (search_text, entry_text) != 0) || (flags != old_flags))
{
- gtranslator_view_set_search_text (GTR_VIEW (list->data), entry_text,
+ gtr_view_set_search_text (GTR_VIEW (list->data), entry_text,
flags);
}
@@ -436,25 +436,25 @@ do_replace (GtrSearchDialog * dialog, GtrWindow * window)
gboolean match_case;
gboolean search_backwards;
- view = gtranslator_window_get_active_view (window);
+ view = gtr_window_get_active_view (window);
if (view == NULL)
return;
- search_entry_text = gtranslator_search_dialog_get_search_text (dialog);
+ search_entry_text = gtr_search_dialog_get_search_text (dialog);
g_return_if_fail ((search_entry_text) != NULL);
g_return_if_fail ((*search_entry_text) != '\0');
/* replace text may be "", we just delete */
- replace_entry_text = gtranslator_search_dialog_get_replace_text (dialog);
+ replace_entry_text = gtr_search_dialog_get_replace_text (dialog);
g_return_if_fail ((replace_entry_text) != NULL);
unescaped_search_text =
- gtranslator_utils_unescape_search_text (search_entry_text);
+ gtr_utils_unescape_search_text (search_entry_text);
- gtranslator_view_get_selected_text (view, &selected_text, NULL);
+ gtr_view_get_selected_text (view, &selected_text, NULL);
- match_case = gtranslator_search_dialog_get_match_case (dialog);
- search_backwards = gtranslator_search_dialog_get_backwards (dialog);
+ match_case = gtr_search_dialog_get_match_case (dialog);
+ search_backwards = gtr_search_dialog_get_backwards (dialog);
if ((selected_text == NULL) ||
(match_case && (strcmp (selected_text, unescaped_search_text) != 0)) ||
@@ -472,7 +472,7 @@ do_replace (GtrSearchDialog * dialog, GtrWindow * window)
}
unescaped_replace_text =
- gtranslator_utils_unescape_search_text (replace_entry_text);
+ gtr_utils_unescape_search_text (replace_entry_text);
replace_selected_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)),
unescaped_replace_text);
@@ -496,13 +496,13 @@ do_replace_all (GtrSearchDialog * dialog, GtrWindow * window)
guint flags = 0;
gint count = 0;
- tab = gtranslator_window_get_active_tab (window);
+ tab = gtr_window_get_active_tab (window);
/* Get only translated textviews */
- views = gtranslator_window_get_all_views (window, FALSE, TRUE);
+ views = gtr_window_get_all_views (window, FALSE, TRUE);
current_msg =
- gtranslator_po_get_current_message (gtranslator_tab_get_po (tab));
+ gtr_po_get_current_message (gtr_tab_get_po (tab));
g_return_if_fail (views != NULL);
g_return_if_fail (current_msg != NULL);
@@ -510,16 +510,16 @@ do_replace_all (GtrSearchDialog * dialog, GtrWindow * window)
l = views;
aux = current_msg;
- search_entry_text = gtranslator_search_dialog_get_search_text (dialog);
+ search_entry_text = gtr_search_dialog_get_search_text (dialog);
g_return_if_fail ((search_entry_text) != NULL);
g_return_if_fail ((*search_entry_text) != '\0');
/* replace text may be "", we just delete all occurrencies */
- replace_entry_text = gtranslator_search_dialog_get_replace_text (dialog);
+ replace_entry_text = gtr_search_dialog_get_replace_text (dialog);
g_return_if_fail ((replace_entry_text) != NULL);
- match_case = gtranslator_search_dialog_get_match_case (dialog);
- entire_word = gtranslator_search_dialog_get_entire_word (dialog);
+ match_case = gtr_search_dialog_get_match_case (dialog);
+ entire_word = gtr_search_dialog_get_entire_word (dialog);
GTR_SEARCH_SET_CASE_SENSITIVE (flags, match_case);
GTR_SEARCH_SET_ENTIRE_WORD (flags, entire_word);
@@ -529,7 +529,7 @@ do_replace_all (GtrSearchDialog * dialog, GtrWindow * window)
{
while (l)
{
- count += gtranslator_view_replace_all (GTR_VIEW (l->data),
+ count += gtr_view_replace_all (GTR_VIEW (l->data),
search_entry_text,
replace_entry_text, flags);
l = l->next;
@@ -541,11 +541,11 @@ do_replace_all (GtrSearchDialog * dialog, GtrWindow * window)
aux = g_list_first (aux);
else
aux = aux->next;
- gtranslator_tab_message_go_to (tab, aux, TRUE, GTR_TAB_MOVE_NONE);
+ gtr_tab_message_go_to (tab, aux, TRUE, GTR_TAB_MOVE_NONE);
}
while (current_msg != aux);
- gtranslator_tab_message_go_to (tab, aux, FALSE, GTR_TAB_MOVE_NONE);
+ gtr_tab_message_go_to (tab, aux, FALSE, GTR_TAB_MOVE_NONE);
if (count > 0)
{
@@ -591,7 +591,7 @@ search_dialog_destroyed (GtrWindow * window,
}
void
-_gtranslator_actions_search_find (GtkAction * action,
+_gtr_actions_search_find (GtkAction * action,
GtrWindow * window)
{
gpointer data;
@@ -613,34 +613,34 @@ _gtranslator_actions_search_find (GtkAction * action,
* it is already open
*/
- gtranslator_search_dialog_present_with_time (GTR_SEARCH_DIALOG (data),
+ gtr_search_dialog_present_with_time (GTR_SEARCH_DIALOG (data),
GDK_CURRENT_TIME);
return;
}
- search_dialog = gtranslator_search_dialog_new (GTK_WINDOW (window), FALSE);
+ search_dialog = gtr_search_dialog_new (GTK_WINDOW (window), FALSE);
g_object_set_data (G_OBJECT (window), GTR_SEARCH_DIALOG_KEY, search_dialog);
g_object_weak_ref (G_OBJECT (search_dialog),
(GWeakNotify) search_dialog_destroyed, window);
- tab = gtranslator_window_get_active_tab (window);
- view = gtranslator_window_get_active_view (window);
+ tab = gtr_window_get_active_tab (window);
+ view = gtr_window_get_active_view (window);
g_return_if_fail (tab != NULL);
g_return_if_fail (view != NULL);
last_search_data = g_object_get_data (G_OBJECT (tab),
GTR_LAST_SEARCH_DATA_KEY);
- selection_exists = gtranslator_view_get_selected_text (view,
+ selection_exists = gtr_view_get_selected_text (view,
&find_text,
&sel_len);
if (selection_exists && find_text != NULL && sel_len < 80)
{
- gtranslator_search_dialog_set_search_text (GTR_SEARCH_DIALOG
+ gtr_search_dialog_set_search_text (GTR_SEARCH_DIALOG
(search_dialog), find_text);
g_free (find_text);
}
@@ -669,7 +669,7 @@ _gtranslator_actions_search_find (GtkAction * action,
}
void
-_gtranslator_actions_search_replace (GtkAction * action,
+_gtr_actions_search_replace (GtkAction * action,
GtrWindow * window)
{
gpointer data;
@@ -688,18 +688,18 @@ _gtranslator_actions_search_replace (GtkAction * action,
g_return_if_fail (GTR_IS_SEARCH_DIALOG (data));
/* turn the dialog into a replace dialog if needed */
- if (!gtranslator_search_dialog_get_show_replace
+ if (!gtr_search_dialog_get_show_replace
(GTR_SEARCH_DIALOG (data)))
- gtranslator_search_dialog_set_show_replace (GTR_SEARCH_DIALOG (data),
+ gtr_search_dialog_set_show_replace (GTR_SEARCH_DIALOG (data),
TRUE);
- gtranslator_search_dialog_present_with_time (GTR_SEARCH_DIALOG (data),
+ gtr_search_dialog_present_with_time (GTR_SEARCH_DIALOG (data),
GDK_CURRENT_TIME);
return;
}
- replace_dialog = gtranslator_search_dialog_new (GTK_WINDOW (window), TRUE);
+ replace_dialog = gtr_search_dialog_new (GTK_WINDOW (window), TRUE);
g_object_set_data (G_OBJECT (window),
GTR_SEARCH_DIALOG_KEY, replace_dialog);
@@ -707,21 +707,21 @@ _gtranslator_actions_search_replace (GtkAction * action,
g_object_weak_ref (G_OBJECT (replace_dialog),
(GWeakNotify) search_dialog_destroyed, window);
- tab = gtranslator_window_get_active_tab (window);
- view = gtranslator_window_get_active_view (window);
+ tab = gtr_window_get_active_tab (window);
+ view = gtr_window_get_active_view (window);
g_return_if_fail (tab != NULL);
last_search_data = g_object_get_data (G_OBJECT (tab),
GTR_LAST_SEARCH_DATA_KEY);
- selection_exists = gtranslator_view_get_selected_text (view,
+ selection_exists = gtr_view_get_selected_text (view,
&find_text,
&sel_len);
if (selection_exists && find_text != NULL && sel_len < 80)
{
- gtranslator_search_dialog_set_search_text (GTR_SEARCH_DIALOG
+ gtr_search_dialog_set_search_text (GTR_SEARCH_DIALOG
(replace_dialog), find_text);
g_free (find_text);
}
@@ -757,7 +757,7 @@ do_find_again (GtrWindow * window, gboolean backward)
gboolean wrap_around = TRUE;
LastSearchData *data;
- active_view = gtranslator_window_get_active_view (window);
+ active_view = gtr_window_get_active_view (window);
g_return_if_fail (active_view != NULL);
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (active_view));
@@ -771,14 +771,14 @@ do_find_again (GtrWindow * window, gboolean backward)
}
void
-_gtranslator_actions_search_find_next (GtkAction * action,
+_gtr_actions_search_find_next (GtkAction * action,
GtrWindow * window)
{
do_find_again (window, FALSE);
}
void
-_gtranslator_actions_search_find_prev (GtkAction * action,
+_gtr_actions_search_find_prev (GtkAction * action,
GtrWindow * window)
{
do_find_again (window, TRUE);
diff --git a/src/gtr-actions-view.c b/src/gtr-actions-view.c
index 785af0b..c5105a1 100644
--- a/src/gtr-actions-view.c
+++ b/src/gtr-actions-view.c
@@ -18,27 +18,27 @@
#include "gtr-actions.h"
void
-gtranslator_actions_view_context (GtkAction * action,
+gtr_actions_view_context (GtkAction * action,
GtrWindow * window)
{
GtrTab *tab;
GtkWidget *context;
- tab = gtranslator_window_get_active_tab (window);
- context = GTK_WIDGET (gtranslator_tab_get_context_panel (tab));
+ tab = gtr_window_get_active_tab (window);
+ context = GTK_WIDGET (gtr_tab_get_context_panel (tab));
- gtranslator_tab_show_lateral_panel_widget (tab, context);
+ gtr_tab_show_lateral_panel_widget (tab, context);
}
void
-gtranslator_actions_view_translation_memory (GtkAction * action,
+gtr_actions_view_translation_memory (GtkAction * action,
GtrWindow * window)
{
GtrTab *tab;
GtkWidget *tm_ui;
- tab = gtranslator_window_get_active_tab (window);
- tm_ui = GTK_WIDGET (gtranslator_tab_get_translation_memory_ui (tab));
+ tab = gtr_window_get_active_tab (window);
+ tm_ui = GTK_WIDGET (gtr_tab_get_translation_memory_ui (tab));
- gtranslator_tab_show_lateral_panel_widget (tab, tm_ui);
+ gtr_tab_show_lateral_panel_widget (tab, tm_ui);
}
diff --git a/src/gtr-actions.h b/src/gtr-actions.h
index 36410c2..3508a6b 100644
--- a/src/gtr-actions.h
+++ b/src/gtr-actions.h
@@ -26,129 +26,129 @@
G_BEGIN_DECLS
/*File*/
-void gtranslator_open_file_dialog (GtkAction * action,
+void gtr_open_file_dialog (GtkAction * action,
GtrWindow * window);
-void gtranslator_save_current_file_dialog (GtkWidget * widget,
+void gtr_save_current_file_dialog (GtkWidget * widget,
GtrWindow * window);
-void gtranslator_save_file_as_dialog (GtkAction * action,
+void gtr_save_file_as_dialog (GtkAction * action,
GtrWindow * window);
-gboolean gtranslator_open (GFile * location,
+gboolean gtr_open (GFile * location,
GtrWindow * window, GError ** error);
-void gtranslator_close_tab (GtrTab * tab, GtrWindow * window);
+void gtr_close_tab (GtrTab * tab, GtrWindow * window);
-void gtranslator_file_close (GtkAction * widget, GtrWindow * window);
+void gtr_file_close (GtkAction * widget, GtrWindow * window);
-void gtranslator_file_quit (GtkAction * action, GtrWindow * window);
+void gtr_file_quit (GtkAction * action, GtrWindow * window);
-void gtranslator_actions_load_locations (GtrWindow * window,
+void gtr_actions_load_locations (GtrWindow * window,
const GSList * locations);
-void _gtranslator_actions_file_close_all (GtkAction * action,
+void _gtr_actions_file_close_all (GtkAction * action,
GtrWindow * window);
-void _gtranslator_actions_file_save_all (GtkAction * action,
+void _gtr_actions_file_save_all (GtkAction * action,
GtrWindow * window);
/*Edit*/
-void gtranslator_actions_edit_undo (GtkAction * action,
+void gtr_actions_edit_undo (GtkAction * action,
GtrWindow * window);
-void gtranslator_actions_edit_redo (GtkAction * action,
+void gtr_actions_edit_redo (GtkAction * action,
GtrWindow * window);
-void gtranslator_actions_edit_cut (GtkAction * action,
+void gtr_actions_edit_cut (GtkAction * action,
GtrWindow * window);
-void gtranslator_actions_edit_copy (GtkAction * action,
+void gtr_actions_edit_copy (GtkAction * action,
GtrWindow * window);
-void gtranslator_actions_edit_paste (GtkAction * action,
+void gtr_actions_edit_paste (GtkAction * action,
GtrWindow * window);
-void gtranslator_actions_edit_header (GtkAction * action,
+void gtr_actions_edit_header (GtkAction * action,
GtrWindow * window);
-void gtranslator_edit_message_comment (GtkAction * action,
+void gtr_edit_message_comment (GtkAction * action,
GtrWindow * window);
-void gtranslator_message_copy_to_translation
+void gtr_message_copy_to_translation
(GtkAction * action, GtrWindow * window);
-void gtranslator_message_status_toggle_fuzzy
+void gtr_message_status_toggle_fuzzy
(GtkAction * action, GtrWindow * window);
-void gtranslator_actions_edit_preferences (GtkAction * action,
+void gtr_actions_edit_preferences (GtkAction * action,
GtrWindow * window);
-void gtranslator_actions_edit_clear (GtkAction * action,
+void gtr_actions_edit_clear (GtkAction * action,
GtrWindow * window);
/* View */
-void gtranslator_actions_view_context (GtkAction * action,
+void gtr_actions_view_context (GtkAction * action,
GtrWindow * window);
-void gtranslator_actions_view_translation_memory
+void gtr_actions_view_translation_memory
(GtkAction * action, GtrWindow * window);
/*Go*/
-void gtranslator_message_go_to_first (GtkAction * action,
+void gtr_message_go_to_first (GtkAction * action,
GtrWindow * window);
-void gtranslator_message_go_to_previous (GtkAction * action,
+void gtr_message_go_to_previous (GtkAction * action,
GtrWindow * window);
-void gtranslator_message_go_to_next (GtkAction * action,
+void gtr_message_go_to_next (GtkAction * action,
GtrWindow * window);
-void gtranslator_message_go_to_last (GtkAction * action,
+void gtr_message_go_to_last (GtkAction * action,
GtrWindow * window);
-void gtranslator_message_go_to_next_fuzzy (GtkAction * action,
+void gtr_message_go_to_next_fuzzy (GtkAction * action,
GtrWindow * window);
-void gtranslator_message_go_to_prev_fuzzy (GtkAction * action,
+void gtr_message_go_to_prev_fuzzy (GtkAction * action,
GtrWindow * window);
-void gtranslator_message_go_to_next_untranslated
+void gtr_message_go_to_next_untranslated
(GtkAction * action, GtrWindow * window);
-void gtranslator_message_go_to_prev_untranslated
+void gtr_message_go_to_prev_untranslated
(GtkAction * action, GtrWindow * window);
-void gtranslator_message_go_to_next_fuzzy_or_untranslated
+void gtr_message_go_to_next_fuzzy_or_untranslated
(GtkAction * action, GtrWindow * window);
-void gtranslator_message_go_to_prev_fuzzy_or_untranslated
+void gtr_message_go_to_prev_fuzzy_or_untranslated
(GtkAction * action, GtrWindow * window);
-void gtranslator_message_jump (GtkAction * action,
+void gtr_message_jump (GtkAction * action,
GtrWindow * window);
/*Search*/
-void _gtranslator_actions_search_find (GtkAction * action,
+void _gtr_actions_search_find (GtkAction * action,
GtrWindow * window);
-void _gtranslator_actions_search_replace (GtkAction * action,
+void _gtr_actions_search_replace (GtkAction * action,
GtrWindow * window);
/*Documents*/
-void gtranslator_actions_documents_next_document
+void gtr_actions_documents_next_document
(GtkAction * action, GtrWindow * window);
-void gtranslator_actions_documents_previous_document
+void gtr_actions_documents_previous_document
(GtkAction * action, GtrWindow * window);
/*Help*/
-void gtranslator_window_show_home_page (GtkAction * action, gpointer useless);
+void gtr_window_show_home_page (GtkAction * action, gpointer useless);
-void gtranslator_cmd_help_contents (GtkAction * action,
+void gtr_cmd_help_contents (GtkAction * action,
GtrWindow * window);
-void gtranslator_about_dialog (GtkAction * action,
+void gtr_about_dialog (GtkAction * action,
GtrWindow * window);
diff --git a/src/gtr-application.c b/src/gtr-application.c
index fbc04e3..c8a64b1 100644
--- a/src/gtr-application.c
+++ b/src/gtr-application.c
@@ -25,8 +25,11 @@
#endif
#include "dialogs/gtr-assistant.h"
+#include "gtr-actions.h"
#include "gtr-application.h"
#include "gtr-dirs.h"
+#include "gtr-prefs-manager.h"
+#include "gtr-prefs-manager-app.h"
#include "gtr-utils.h"
#include "gtr-window.h"
#include "egg-toolbars-model.h"
@@ -44,7 +47,7 @@
GTR_TYPE_APPLICATION, \
GtrApplicationPrivate))
-G_DEFINE_TYPE (GtrApplication, gtranslator_application, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GtrApplication, gtr_application, G_TYPE_OBJECT)
struct _GtrApplicationPrivate
{
@@ -71,11 +74,11 @@ get_accel_file (void)
{
gchar *config;
- config = gtranslator_dirs_get_user_config_dir ();
+ config = gtr_dirs_get_user_config_dir ();
if (config != NULL)
{
- return g_build_filename (config, "gtranslator-accels", NULL);
+ return g_build_filename (config, "gtr-accels", NULL);
g_free (config);
}
@@ -112,7 +115,7 @@ static gboolean
on_window_delete_event_cb (GtrWindow * window,
GdkEvent * event, GtrApplication * app)
{
- gtranslator_file_quit (NULL, window);
+ gtr_file_quit (NULL, window);
return TRUE;
}
@@ -126,9 +129,9 @@ on_window_destroy_cb (GtrWindow * window,
}
static void
-gtranslator_application_init (GtrApplication * application)
+gtr_application_init (GtrApplication * application)
{
- gchar *gtranslator_folder;
+ gchar *gtr_folder;
gchar *path_default_gtr_toolbar;
gchar *profiles_file;
gchar *dir;
@@ -146,16 +149,16 @@ gtranslator_application_init (GtrApplication * application)
/*
* Creating config folder
*/
- gtranslator_folder = gtranslator_dirs_get_user_config_dir ();
+ gtr_folder = gtr_dirs_get_user_config_dir ();
- if (!g_file_test (gtranslator_folder, G_FILE_TEST_IS_DIR))
+ if (!g_file_test (gtr_folder, G_FILE_TEST_IS_DIR))
{
GFile *file;
GError *error = NULL;
- file = g_file_new_for_path (gtranslator_folder);
+ file = g_file_new_for_path (gtr_folder);
- if (g_file_test (gtranslator_folder, G_FILE_TEST_IS_REGULAR))
+ if (g_file_test (gtr_folder, G_FILE_TEST_IS_REGULAR))
{
if (!g_file_delete (file, NULL, &error))
{
@@ -163,21 +166,20 @@ gtranslator_application_init (GtrApplication * application)
"old gtranslator file: %s", error->message);
g_error_free (error);
g_object_unref (file);
- g_free (gtranslator_folder);
- gtranslator_application_shutdown (application);
+ g_free (gtr_folder);
+ gtr_application_shutdown (application);
}
}
if (!g_file_make_directory (file, NULL, &error))
{
- g_warning
- ("There was an error making the gtranslator config directory: %s",
- error->message);
+ g_warning ("There was an error making the gtranslator config directory: %s",
+ error->message);
g_error_free (error);
g_object_unref (file);
- g_free (gtranslator_folder);
- gtranslator_application_shutdown (application);
+ g_free (gtr_folder);
+ gtr_application_shutdown (application);
}
priv->first_run = TRUE;
@@ -187,19 +189,19 @@ gtranslator_application_init (GtrApplication * application)
/*
* If the config folder exists but there is no profile
*/
- profiles_file = g_build_filename (gtranslator_folder, "profiles.xml", NULL);
+ profiles_file = g_build_filename (gtr_folder, "profiles.xml", NULL);
if (!g_file_test (profiles_file, G_FILE_TEST_EXISTS))
priv->first_run = TRUE;
g_free (profiles_file);
priv->toolbars_model = egg_toolbars_model_new ();
- priv->toolbars_file = g_build_filename (gtranslator_folder,
+ priv->toolbars_file = g_build_filename (gtr_folder,
"gtr-toolbar.xml", NULL);
- g_free (gtranslator_folder);
+ g_free (gtr_folder);
- dir = gtranslator_dirs_get_gtranslator_data_dir ();
+ dir = gtr_dirs_get_gtr_data_dir ();
path_default_gtr_toolbar = g_build_filename (dir,
"gtr-toolbar.xml",
NULL);
@@ -228,19 +230,19 @@ gtranslator_application_init (GtrApplication * application)
/* Creating translation memory */
application->priv->tm =
- GTR_TRANSLATION_MEMORY (gtranslator_berkeley_new ());
- gtranslator_translation_memory_set_max_omits (application->priv->tm,
- gtranslator_prefs_manager_get_max_missing_words
+ GTR_TRANSLATION_MEMORY (gtr_berkeley_new ());
+ gtr_translation_memory_set_max_omits (application->priv->tm,
+ gtr_prefs_manager_get_max_missing_words
());
- gtranslator_translation_memory_set_max_delta (application->priv->tm,
- gtranslator_prefs_manager_get_max_length_diff
+ gtr_translation_memory_set_max_delta (application->priv->tm,
+ gtr_prefs_manager_get_max_length_diff
());
- gtranslator_translation_memory_set_max_items (application->priv->tm, 10);
+ gtr_translation_memory_set_max_items (application->priv->tm, 10);
}
static void
-gtranslator_application_finalize (GObject * object)
+gtr_application_finalize (GObject * object)
{
GtrApplication *app = GTR_APPLICATION (object);
@@ -252,17 +254,17 @@ gtranslator_application_finalize (GObject * object)
if (app->priv->tm)
g_object_unref (app->priv->tm);
- G_OBJECT_CLASS (gtranslator_application_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_application_parent_class)->finalize (object);
}
static void
-gtranslator_application_class_init (GtrApplicationClass * klass)
+gtr_application_class_init (GtrApplicationClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrApplicationPrivate));
- object_class->finalize = gtranslator_application_finalize;
+ object_class->finalize = gtr_application_finalize;
}
static void
@@ -272,14 +274,14 @@ app_weak_notify (gpointer data, GObject * where_the_app_was)
}
/**
- * gtranslator_application_get_default:
+ * gtr_application_get_default:
*
* Returns the default instance of the application.
*
* Returns: the default instance of the application.
*/
GtrApplication *
-gtranslator_application_get_default (void)
+gtr_application_get_default (void)
{
static GtrApplication *instance = NULL;
@@ -293,7 +295,7 @@ gtranslator_application_get_default (void)
}
/**
- * gtranslator_application_open_window:
+ * gtr_application_open_window:
* @app: a #GtrApplication
*
* Creates a new #GtrWindow and shows it.
@@ -301,7 +303,7 @@ gtranslator_application_get_default (void)
* Returns: the #GtrWindow to be opened
*/
GtrWindow *
-gtranslator_application_open_window (GtrApplication * app)
+gtr_application_open_window (GtrApplication * app)
{
GtrWindow *window;
GdkWindowState state;
@@ -310,17 +312,17 @@ gtranslator_application_open_window (GtrApplication * app)
app->priv->active_window = window =
GTR_WINDOW (g_object_new (GTR_TYPE_WINDOW, NULL));
- state = gtranslator_prefs_manager_get_window_state ();
+ state = gtr_prefs_manager_get_window_state ();
if ((state & GDK_WINDOW_STATE_MAXIMIZED) != 0)
{
- gtranslator_prefs_manager_get_default_window_size (&w, &h);
+ gtr_prefs_manager_get_default_window_size (&w, &h);
gtk_window_set_default_size (GTK_WINDOW (window), w, h);
gtk_window_maximize (GTK_WINDOW (window));
}
else
{
- gtranslator_prefs_manager_get_window_size (&w, &h);
+ gtr_prefs_manager_get_window_size (&w, &h);
gtk_window_set_default_size (GTK_WINDOW (window), w, h);
gtk_window_unmaximize (GTK_WINDOW (window));
}
@@ -338,13 +340,13 @@ gtranslator_application_open_window (GtrApplication * app)
* run, then we show the First run Assistant
*/
if (app->priv->first_run)
- gtranslator_show_assistant (window);
+ gtr_show_assistant (window);
return window;
}
/**
- * _gtranslator_application_get_toolbars_model:
+ * _gtr_application_get_toolbars_model:
* @application: a #GtrApplication
*
* Returns the toolbar model.
@@ -352,20 +354,20 @@ gtranslator_application_open_window (GtrApplication * app)
* Retuns: the toolbar model.
*/
GObject *
-_gtranslator_application_get_toolbars_model (GtrApplication *
+_gtr_application_get_toolbars_model (GtrApplication *
application)
{
return G_OBJECT (application->priv->toolbars_model);
}
/**
- * _gtranslator_application_save_toolbars_model:
+ * _gtr_application_save_toolbars_model:
* @application: a #GtrApplication
*
* Saves the toolbar model.
*/
void
-_gtranslator_application_save_toolbars_model (GtrApplication *
+_gtr_application_save_toolbars_model (GtrApplication *
application)
{
egg_toolbars_model_save_toolbars (application->priv->toolbars_model,
@@ -373,13 +375,13 @@ _gtranslator_application_save_toolbars_model (GtrApplication *
}
/**
- * gtranslator_application_shutdown:
+ * gtr_application_shutdown:
* @app: a #GtrApplication
*
* Shutdowns the application.
*/
void
-gtranslator_application_shutdown (GtrApplication * app)
+gtr_application_shutdown (GtrApplication * app)
{
if (app->priv->toolbars_model)
{
@@ -393,7 +395,7 @@ gtranslator_application_shutdown (GtrApplication * app)
}
/**
- * gtranslator_application_get_views:
+ * gtr_application_get_views:
* @app: the #GtranslationApplication
* @original: TRUE if you want original TextViews.
* @translated: TRUE if you want translated TextViews.
@@ -403,7 +405,7 @@ gtranslator_application_shutdown (GtrApplication * app)
* Return value: a newly allocated list of #GtranslationApplication objects
*/
GList *
-gtranslator_application_get_views (GtrApplication * app,
+gtr_application_get_views (GtrApplication * app,
gboolean original, gboolean translated)
{
GList *res = NULL;
@@ -411,7 +413,7 @@ gtranslator_application_get_views (GtrApplication * app,
g_return_val_if_fail (GTR_IS_APPLICATION (app), NULL);
res = g_list_concat (res,
- gtranslator_window_get_all_views (GTR_WINDOW
+ gtr_window_get_all_views (GTR_WINDOW
(app->priv->
active_window),
original,
@@ -421,25 +423,25 @@ gtranslator_application_get_views (GtrApplication * app,
}
/**
- * gtranslator_application_get_active_window:
+ * gtr_application_get_active_window:
* @app: a #GtrApplication
*
* Return value: the active #GtrWindow
**/
GtrWindow *
-gtranslator_application_get_active_window (GtrApplication * app)
+gtr_application_get_active_window (GtrApplication * app)
{
return GTR_WINDOW (app->priv->active_window);
}
/**
- * gtranslator_application_get_windows:
+ * gtr_application_get_windows:
* @app: a #GtrApplication
*
* Return value: a list of all opened windows.
**/
const GList *
-gtranslator_application_get_windows (GtrApplication * app)
+gtr_application_get_windows (GtrApplication * app)
{
g_return_val_if_fail (GTR_IS_APPLICATION (app), NULL);
@@ -451,38 +453,38 @@ gtranslator_application_get_windows (GtrApplication * app)
}
/**
- * gtranslator_application_get_active_profile:
+ * gtr_application_get_active_profile:
* @app: a #GtrApplication
*
* Return value: the active #GtrProfile
**/
GtrProfile *
-gtranslator_application_get_active_profile (GtrApplication * app)
+gtr_application_get_active_profile (GtrApplication * app)
{
return app->priv->active_profile;
}
/**
- * gtranslator_application_set_profiles:
+ * gtr_application_set_profiles:
* @app: a #GtrApplication
* @profiles: a #GList
*
**/
void
-gtranslator_application_set_active_profile (GtrApplication * app,
+gtr_application_set_active_profile (GtrApplication * app,
GtrProfile * profile)
{
app->priv->active_profile = profile;
}
/**
- * gtranslator_application_get_profiles:
+ * gtr_application_get_profiles:
* @app: a #GtrApplication
*
* Return value: a list of all profiles.
**/
GList *
-gtranslator_application_get_profiles (GtrApplication * app)
+gtr_application_get_profiles (GtrApplication * app)
{
g_return_val_if_fail (GTR_IS_APPLICATION (app), NULL);
@@ -490,20 +492,20 @@ gtranslator_application_get_profiles (GtrApplication * app)
}
/**
- * gtranslator_application_set_profiles:
+ * gtr_application_set_profiles:
* @app: a #GtrApplication
* @profiles: a #GList
*
**/
void
-gtranslator_application_set_profiles (GtrApplication * app,
+gtr_application_set_profiles (GtrApplication * app,
GList * profiles)
{
app->priv->profiles = profiles;
}
/**
- * gtranslator_application_register_icon:
+ * gtr_application_register_icon:
* @app: a #GtrApplication
* @icon: the name of the icon
* @stock_id: the stock id for the new icon
@@ -511,7 +513,7 @@ gtranslator_application_set_profiles (GtrApplication * app,
* Registers a new @icon with the @stock_id.
*/
void
-gtranslator_application_register_icon (GtrApplication * app,
+gtr_application_register_icon (GtrApplication * app,
const gchar * icon,
const gchar * stock_id)
{
@@ -521,7 +523,7 @@ gtranslator_application_register_icon (GtrApplication * app,
gchar *path;
GdkPixbuf *pixbuf;
- pixmaps_dir = gtranslator_dirs_get_pixmaps_dir ();
+ pixmaps_dir = gtr_dirs_get_pixmaps_dir ();
path = g_build_filename (pixmaps_dir,
icon,
NULL);
@@ -540,13 +542,13 @@ gtranslator_application_register_icon (GtrApplication * app,
}
/**
- * gtranslator_application_get_last_dir:
+ * gtr_application_get_last_dir:
* @app: a #GtrApplication
*
* Return value: the last dir where a file was opened in the GtkFileChooser
*/
const gchar *
-_gtranslator_application_get_last_dir (GtrApplication * app)
+_gtr_application_get_last_dir (GtrApplication * app)
{
g_return_val_if_fail (GTR_IS_APPLICATION (app), NULL);
@@ -554,13 +556,13 @@ _gtranslator_application_get_last_dir (GtrApplication * app)
}
/**
- * gtranslator_application_set_last_dir:
+ * gtr_application_set_last_dir:
* @app: a #GtrApplication
* @last_dir: the path of the last directory where a file was opened in the
* GtkFileChooser.
*/
void
-_gtranslator_application_set_last_dir (GtrApplication * app,
+_gtr_application_set_last_dir (GtrApplication * app,
const gchar * last_dir)
{
g_return_if_fail (GTR_IS_APPLICATION (app));
@@ -569,7 +571,7 @@ _gtranslator_application_set_last_dir (GtrApplication * app,
}
GObject *
-gtranslator_application_get_translation_memory (GtrApplication * app)
+gtr_application_get_translation_memory (GtrApplication * app)
{
g_return_val_if_fail (GTR_IS_APPLICATION (app), NULL);
diff --git a/src/gtr-application.h b/src/gtr-application.h
index b0db09f..7e0ad78 100644
--- a/src/gtr-application.h
+++ b/src/gtr-application.h
@@ -34,13 +34,13 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_APPLICATION (gtranslator_application_get_type ())
+#define GTR_TYPE_APPLICATION (gtr_application_get_type ())
#define GTR_APPLICATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_APPLICATION, GtrApplication))
#define GTR_APPLICATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_APPLICATION, GtrApplicationClass))
#define GTR_IS_APPLICATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_APPLICATION))
#define GTR_IS_APPLICATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTR_TYPE_APPLICATION))
#define GTR_APPLICATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTR_TYPE_APPLIAPPLICATION, GtrApplicationClass))
-#define GTR_APP (gtranslator_application_get_default())
+#define GTR_APP (gtr_application_get_default())
/* Private structure type */
typedef struct _GtrApplicationPrivate GtrApplicationPrivate;
@@ -71,62 +71,62 @@ struct _GtrApplicationClass
* Public methods
*/
GType
-gtranslator_application_get_type (void)
+gtr_application_get_type (void)
G_GNUC_CONST;
- GtrApplication *gtranslator_application_get_default (void);
+ GtrApplication *gtr_application_get_default (void);
- void gtranslator_application_shutdown (GtrApplication * app);
+ void gtr_application_shutdown (GtrApplication * app);
- GList *gtranslator_application_get_views (GtrApplication * app,
+ GList *gtr_application_get_views (GtrApplication * app,
gboolean original,
gboolean translated);
GtrWindow
- *gtranslator_application_open_window (GtrApplication * app);
+ *gtr_application_open_window (GtrApplication * app);
GtrWindow
- *gtranslator_application_get_active_window (GtrApplication *
+ *gtr_application_get_active_window (GtrApplication *
app);
- const GList *gtranslator_application_get_windows (GtrApplication
+ const GList *gtr_application_get_windows (GtrApplication
* app);
GtrProfile
- *gtranslator_application_get_active_profile (GtrApplication *
+ *gtr_application_get_active_profile (GtrApplication *
app);
- void gtranslator_application_set_active_profile (GtrApplication *
+ void gtr_application_set_active_profile (GtrApplication *
app,
GtrProfile *
profile);
- GList *gtranslator_application_get_profiles (GtrApplication *
+ GList *gtr_application_get_profiles (GtrApplication *
app);
- void gtranslator_application_set_profiles (GtrApplication * app,
+ void gtr_application_set_profiles (GtrApplication * app,
GList * profiles);
- void gtranslator_application_register_icon (GtrApplication * app,
+ void gtr_application_register_icon (GtrApplication * app,
const gchar * icon,
const gchar * stock_id);
GObject
- *gtranslator_application_get_translation_memory (GtrApplication
+ *gtr_application_get_translation_memory (GtrApplication
* app);
/* Non exported funcs */
GObject
- *_gtranslator_application_get_toolbars_model (GtrApplication *
+ *_gtr_application_get_toolbars_model (GtrApplication *
application);
- void _gtranslator_application_save_toolbars_model (GtrApplication
+ void _gtr_application_save_toolbars_model (GtrApplication
* application);
const gchar
- *_gtranslator_application_get_last_dir (GtrApplication * app);
+ *_gtr_application_get_last_dir (GtrApplication * app);
- void _gtranslator_application_set_last_dir (GtrApplication * app,
+ void _gtr_application_set_last_dir (GtrApplication * app,
const gchar * last_dir);
G_END_DECLS
diff --git a/src/gtr-context.c b/src/gtr-context.c
index 228024b..9e3cbea 100644
--- a/src/gtr-context.c
+++ b/src/gtr-context.c
@@ -32,7 +32,7 @@
GTR_TYPE_CONTEXT_PANEL, \
GtrContextPanelPrivate))
-G_DEFINE_TYPE (GtrContextPanel, gtranslator_context_panel,
+G_DEFINE_TYPE (GtrContextPanel, gtr_context_panel,
GTK_TYPE_VBOX)
struct _GtrContextPanelPrivate
{
@@ -57,12 +57,12 @@ G_DEFINE_TYPE (GtrContextPanel, gtranslator_context_panel,
gtk_text_buffer_set_text (buffer, "", 0);
gtk_text_buffer_get_iter_at_offset (buffer, &iter, 0);
- format = g_strconcat (_("Format:"), gtranslator_msg_get_format (msg), NULL);
+ format = g_strconcat (_("Format:"), gtr_msg_get_format (msg), NULL);
context =
- g_strconcat (_("Context:"), gtranslator_msg_get_msgctxt (msg), NULL);
+ g_strconcat (_("Context:"), gtr_msg_get_msgctxt (msg), NULL);
extracted =
g_strconcat (_("Extracted comments:"),
- gtranslator_msg_get_extracted_comments (msg), NULL);
+ gtr_msg_get_extracted_comments (msg), NULL);
toset = g_strdup_printf ("%s\n%s\n%s", format, context, extracted);
@@ -76,7 +76,7 @@ G_DEFINE_TYPE (GtrContextPanel, gtranslator_context_panel,
}
static void
-gtranslator_context_panel_draw (GtrContextPanel * panel)
+gtr_context_panel_draw (GtrContextPanel * panel)
{
GtrContextPanelPrivate *priv = panel->priv;
GtkWidget *context_scrolled_window;
@@ -109,31 +109,31 @@ gtranslator_context_panel_draw (GtrContextPanel * panel)
static void
-gtranslator_context_panel_init (GtrContextPanel * panel)
+gtr_context_panel_init (GtrContextPanel * panel)
{
panel->priv = GTR_CONTEXT_PANEL_GET_PRIVATE (panel);
- gtranslator_context_panel_draw (panel);
+ gtr_context_panel_draw (panel);
}
static void
-gtranslator_context_panel_finalize (GObject * object)
+gtr_context_panel_finalize (GObject * object)
{
- G_OBJECT_CLASS (gtranslator_context_panel_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_context_panel_parent_class)->finalize (object);
}
static void
-gtranslator_context_panel_class_init (GtrContextPanelClass * klass)
+gtr_context_panel_class_init (GtrContextPanelClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrContextPanelPrivate));
- object_class->finalize = gtranslator_context_panel_finalize;
+ object_class->finalize = gtr_context_panel_finalize;
}
/**
- * gtranslator_context_panel_new:
+ * gtr_context_panel_new:
* @tab: a #GtrTab
*
* Creates a new #GtrContextPanel object.
@@ -141,7 +141,7 @@ gtranslator_context_panel_class_init (GtrContextPanelClass * klass)
* Returns: a new #GtrContextPanel object
*/
GtkWidget *
-gtranslator_context_panel_new (GtkWidget * tab)
+gtr_context_panel_new (GtkWidget * tab)
{
GtrContextPanel *context;
context = g_object_new (GTR_TYPE_CONTEXT_PANEL, NULL);
@@ -155,13 +155,13 @@ gtranslator_context_panel_new (GtkWidget * tab)
}
/**
- * gtranslator_context_panel_get_extracted_text_view:
+ * gtr_context_panel_get_extracted_text_view:
* @panel: a #GtrContextPanel
*
* Returns: the context #GtkTextView
*/
GtkTextView *
-gtranslator_context_panel_get_context_text_view (GtrContextPanel *
+gtr_context_panel_get_context_text_view (GtrContextPanel *
panel)
{
g_return_val_if_fail (GTR_IS_CONTEXT_PANEL (panel), NULL);
diff --git a/src/gtr-context.h b/src/gtr-context.h
index c1d6e3a..94a7331 100644
--- a/src/gtr-context.h
+++ b/src/gtr-context.h
@@ -26,7 +26,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_CONTEXT_PANEL (gtranslator_context_panel_get_type ())
+#define GTR_TYPE_CONTEXT_PANEL (gtr_context_panel_get_type ())
#define GTR_CONTEXT_PANEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_CONTEXT_PANEL, GtrContextPanel))
#define GTR_CONTEXT_PANEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_CONTEXT_PANEL, GtrContextPanelClass))
#define GTR_IS_CONTEXT_PANEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_CONTEXT_PANEL))
@@ -62,15 +62,15 @@ struct _GtrContextPanelClass
* Public methods
*/
GType
-gtranslator_context_panel_get_type (void)
+gtr_context_panel_get_type (void)
G_GNUC_CONST;
- GType gtranslator_context_panel_register_type (GTypeModule * module);
+ GType gtr_context_panel_register_type (GTypeModule * module);
- GtkWidget *gtranslator_context_panel_new (GtkWidget * tab);
+ GtkWidget *gtr_context_panel_new (GtkWidget * tab);
GtkTextView
- *gtranslator_context_panel_get_context_text_view
+ *gtr_context_panel_get_context_text_view
(GtrContextPanel * panel);
G_END_DECLS
diff --git a/src/gtr-dirs.c b/src/gtr-dirs.c
index 4b51b6b..4eab2e8 100644
--- a/src/gtr-dirs.c
+++ b/src/gtr-dirs.c
@@ -1,5 +1,5 @@
/*
- * gtranslator-dirs.c
+ * gtr-dirs.c
* This file is part of gtranslator
*
* Copyright (C) 2008 Ignacio Casal Quinteiro
@@ -27,7 +27,7 @@
#include "gtr-dirs.h"
gchar *
-gtranslator_dirs_get_user_config_dir (void)
+gtr_dirs_get_user_config_dir (void)
{
gchar *config_dir = NULL;
@@ -39,7 +39,7 @@ gtranslator_dirs_get_user_config_dir (void)
}
gchar *
-gtranslator_dirs_get_user_cache_dir (void)
+gtr_dirs_get_user_cache_dir (void)
{
const gchar *cache_dir;
@@ -51,12 +51,12 @@ gtranslator_dirs_get_user_cache_dir (void)
}
gchar *
-gtranslator_dirs_get_user_plugins_dir (void)
+gtr_dirs_get_user_plugins_dir (void)
{
gchar *config_dir;
gchar *plugin_dir;
- config_dir = gtranslator_dirs_get_user_config_dir ();
+ config_dir = gtr_dirs_get_user_config_dir ();
plugin_dir = g_build_filename (config_dir,
"plugins",
@@ -67,12 +67,12 @@ gtranslator_dirs_get_user_plugins_dir (void)
}
gchar *
-gtranslator_dirs_get_user_accels_file (void)
+gtr_dirs_get_user_accels_file (void)
{
gchar *accels = NULL;
gchar *config_dir = NULL;
- config_dir = gtranslator_dirs_get_user_config_dir ();
+ config_dir = gtr_dirs_get_user_config_dir ();
accels = g_build_filename (config_dir,
"accels",
"gtranslator",
@@ -84,7 +84,7 @@ gtranslator_dirs_get_user_accels_file (void)
}
gchar *
-gtranslator_dirs_get_gtranslator_data_dir (void)
+gtr_dirs_get_gtr_data_dir (void)
{
gchar *data_dir;
@@ -109,7 +109,7 @@ gtranslator_dirs_get_gtranslator_data_dir (void)
}
gchar *
-gtranslator_dirs_get_gtranslator_locale_dir (void)
+gtr_dirs_get_gtr_locale_dir (void)
{
gchar *locale_dir;
@@ -134,7 +134,7 @@ gtranslator_dirs_get_gtranslator_locale_dir (void)
}
gchar *
-gtranslator_dirs_get_gtranslator_lib_dir (void)
+gtr_dirs_get_gtr_lib_dir (void)
{
gchar *lib_dir;
@@ -159,12 +159,12 @@ gtranslator_dirs_get_gtranslator_lib_dir (void)
}
gchar *
-gtranslator_dirs_get_gtranslator_plugins_dir (void)
+gtr_dirs_get_gtr_plugins_dir (void)
{
gchar *lib_dir;
gchar *plugin_dir;
- lib_dir = gtranslator_dirs_get_gtranslator_lib_dir ();
+ lib_dir = gtr_dirs_get_gtr_lib_dir ();
plugin_dir = g_build_filename (lib_dir,
"plugins",
@@ -175,14 +175,14 @@ gtranslator_dirs_get_gtranslator_plugins_dir (void)
}
gchar *
-gtranslator_dirs_get_ui_file (const gchar *file)
+gtr_dirs_get_ui_file (const gchar *file)
{
gchar *datadir;
gchar *ui_file;
g_return_val_if_fail (file != NULL, NULL);
- datadir = gtranslator_dirs_get_gtranslator_data_dir ();
+ datadir = gtr_dirs_get_gtr_data_dir ();
ui_file = g_build_filename (datadir,
"ui",
file,
@@ -193,12 +193,12 @@ gtranslator_dirs_get_ui_file (const gchar *file)
}
gchar *
-gtranslator_dirs_get_pixmaps_dir (void)
+gtr_dirs_get_pixmaps_dir (void)
{
gchar *datadir;
gchar *pixmapsdir;
- datadir = gtranslator_dirs_get_gtranslator_data_dir ();
+ datadir = gtr_dirs_get_gtr_data_dir ();
pixmapsdir = g_build_filename (datadir,
"pixmaps",
NULL);
diff --git a/src/gtr-dirs.h b/src/gtr-dirs.h
index e926249..f6b696f 100644
--- a/src/gtr-dirs.h
+++ b/src/gtr-dirs.h
@@ -1,5 +1,5 @@
/*
- * gtranslator-dirs.h
+ * gtr-dirs.h
* This file is part of gtranslator
*
* Copyright (C) 2008 Ignacio Casal Quinteiro
@@ -28,28 +28,28 @@
G_BEGIN_DECLS
-gchar *gtranslator_dirs_get_user_config_dir (void);
+gchar *gtr_dirs_get_user_config_dir (void);
-gchar *gtranslator_dirs_get_user_cache_dir (void);
+gchar *gtr_dirs_get_user_cache_dir (void);
-gchar *gtranslator_dirs_get_user_plugins_dir (void);
+gchar *gtr_dirs_get_user_plugins_dir (void);
-gchar *gtranslator_dirs_get_user_accels_file (void);
+gchar *gtr_dirs_get_user_accels_file (void);
-gchar *gtranslator_dirs_get_gtranslator_data_dir (void);
+gchar *gtr_dirs_get_gtr_data_dir (void);
-gchar *gtranslator_dirs_get_gtranslator_locale_dir (void);
+gchar *gtr_dirs_get_gtr_locale_dir (void);
-gchar *gtranslator_dirs_get_gtranslator_lib_dir (void);
+gchar *gtr_dirs_get_gtr_lib_dir (void);
-gchar *gtranslator_dirs_get_gtranslator_plugins_dir (void);
+gchar *gtr_dirs_get_gtr_plugins_dir (void);
-gchar *gtranslator_dirs_get_gtranslator_plugin_loaders_dir
+gchar *gtr_dirs_get_gtr_plugin_loaders_dir
(void);
-gchar *gtranslator_dirs_get_ui_file (const gchar *file);
+gchar *gtr_dirs_get_ui_file (const gchar *file);
-gchar *gtranslator_dirs_get_pixmaps_dir (void);
+gchar *gtr_dirs_get_pixmaps_dir (void);
G_END_DECLS
diff --git a/src/gtr-header.c b/src/gtr-header.c
index d81caf2..85999b6 100644
--- a/src/gtr-header.c
+++ b/src/gtr-header.c
@@ -37,7 +37,7 @@
GTR_TYPE_HEADER, \
GtrHeaderPrivate))
-G_DEFINE_TYPE (GtrHeader, gtranslator_header, GTR_TYPE_MSG)
+G_DEFINE_TYPE (GtrHeader, gtr_header, GTR_TYPE_MSG)
struct _GtrHeaderPrivate
{
@@ -45,7 +45,7 @@ struct _GtrHeaderPrivate
};
static void
-gtranslator_header_set_field (GtrHeader *header,
+gtr_header_set_field (GtrHeader *header,
const gchar *field,
const gchar *data)
{
@@ -54,9 +54,9 @@ gtranslator_header_set_field (GtrHeader *header,
g_return_if_fail (GTR_IS_HEADER (header));
g_return_if_fail (data != NULL);
- msgstr = po_header_set_field (gtranslator_msg_get_msgstr (GTR_MSG (header)),
+ msgstr = po_header_set_field (gtr_msg_get_msgstr (GTR_MSG (header)),
field, data);
- gtranslator_msg_set_msgstr (GTR_MSG (header), msgstr);
+ gtr_msg_set_msgstr (GTR_MSG (header), msgstr);
g_free (msgstr);
}
@@ -67,18 +67,18 @@ parse_nplurals (GtrHeader * header)
{
gchar *pointer, *plural_forms;
- plural_forms = gtranslator_header_get_plural_forms (header);
+ plural_forms = gtr_header_get_plural_forms (header);
header->priv->nplurals = -1;
- if (gtranslator_prefs_manager_get_use_profile_values () || !plural_forms)
+ if (gtr_prefs_manager_get_use_profile_values () || !plural_forms)
{
const gchar *plural_form;
GtrProfile *profile;
- profile = gtranslator_application_get_active_profile (GTR_APP);
+ profile = gtr_application_get_active_profile (GTR_APP);
if (profile)
- plural_form = gtranslator_profile_get_plurals (profile);
+ plural_form = gtr_profile_get_plurals (profile);
else if (!plural_forms)
return;
@@ -119,7 +119,7 @@ parse_nplurals (GtrHeader * header)
}
static void
-gtranslator_header_init (GtrHeader * header)
+gtr_header_init (GtrHeader * header)
{
header->priv = GTR_HEADER_GET_PRIVATE (header);
@@ -127,25 +127,25 @@ gtranslator_header_init (GtrHeader * header)
}
static void
-gtranslator_header_finalize (GObject * object)
+gtr_header_finalize (GObject * object)
{
- G_OBJECT_CLASS (gtranslator_header_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_header_parent_class)->finalize (object);
}
static void
-gtranslator_header_class_init (GtrHeaderClass * klass)
+gtr_header_class_init (GtrHeaderClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrHeaderPrivate));
- object_class->finalize = gtranslator_header_finalize;
+ object_class->finalize = gtr_header_finalize;
}
/* Public methods */
GtrHeader *
-gtranslator_header_new (po_message_iterator_t iter,
+gtr_header_new (po_message_iterator_t iter,
po_message_t message)
{
GtrHeader *header;
@@ -160,7 +160,7 @@ gtranslator_header_new (po_message_iterator_t iter,
}
/**
- * gtranslator_header_get_comments:
+ * gtr_header_get_comments:
* @header: a #GtrHeader
*
* Gets the comments of the header.
@@ -168,113 +168,113 @@ gtranslator_header_new (po_message_iterator_t iter,
* Return value: the comments of the header.
*/
const gchar *
-gtranslator_header_get_comments (GtrHeader *header)
+gtr_header_get_comments (GtrHeader *header)
{
g_return_val_if_fail (GTR_IS_HEADER (header), NULL);
- return po_message_comments (gtranslator_msg_get_message (GTR_MSG (header)));
+ return po_message_comments (gtr_msg_get_message (GTR_MSG (header)));
}
void
-gtranslator_header_set_comments (GtrHeader *header,
+gtr_header_set_comments (GtrHeader *header,
const gchar *comments)
{
g_return_if_fail (GTR_IS_HEADER (header));
g_return_if_fail (comments != NULL);
- po_message_set_comments (gtranslator_msg_get_message (GTR_MSG (header)),
+ po_message_set_comments (gtr_msg_get_message (GTR_MSG (header)),
comments);
}
gchar *
-gtranslator_header_get_prj_id_version (GtrHeader *header)
+gtr_header_get_prj_id_version (GtrHeader *header)
{
g_return_val_if_fail (GTR_IS_HEADER (header), NULL);
- return po_header_field (gtranslator_msg_get_msgstr (GTR_MSG (header)),
+ return po_header_field (gtr_msg_get_msgstr (GTR_MSG (header)),
"Project-Id-Version");
}
void
-gtranslator_header_set_prj_id_version (GtrHeader *header,
+gtr_header_set_prj_id_version (GtrHeader *header,
const gchar *prj_id_version)
{
g_return_if_fail (GTR_IS_HEADER (header));
g_return_if_fail (prj_id_version != NULL);
- gtranslator_header_set_field (header, "Project-Id-Version",
+ gtr_header_set_field (header, "Project-Id-Version",
prj_id_version);
}
gchar *
-gtranslator_header_get_rmbt (GtrHeader *header)
+gtr_header_get_rmbt (GtrHeader *header)
{
g_return_val_if_fail (GTR_IS_HEADER (header), NULL);
- return po_header_field (gtranslator_msg_get_msgstr (GTR_MSG (header)),
+ return po_header_field (gtr_msg_get_msgstr (GTR_MSG (header)),
"Report-Msgid-Bugs-To");
}
void
-gtranslator_header_set_rmbt (GtrHeader *header,
+gtr_header_set_rmbt (GtrHeader *header,
const gchar *rmbt)
{
/* FIXME: rmbt is not a good name */
g_return_if_fail (GTR_IS_HEADER (header));
g_return_if_fail (rmbt != NULL);
- gtranslator_header_set_field (header, "Report-Msgid-Bugs-To",
+ gtr_header_set_field (header, "Report-Msgid-Bugs-To",
rmbt);
}
gchar *
-gtranslator_header_get_pot_date (GtrHeader *header)
+gtr_header_get_pot_date (GtrHeader *header)
{
g_return_val_if_fail (GTR_IS_HEADER (header), NULL);
- return po_header_field (gtranslator_msg_get_msgstr (GTR_MSG (header)),
+ return po_header_field (gtr_msg_get_msgstr (GTR_MSG (header)),
"POT-Creation-Date");
}
void
-gtranslator_header_set_pot_date (GtrHeader *header,
+gtr_header_set_pot_date (GtrHeader *header,
const gchar *pot_date)
{
g_return_if_fail (GTR_IS_HEADER (header));
g_return_if_fail (pot_date != NULL);
- gtranslator_header_set_field (header, "POT-Creation-Date",
+ gtr_header_set_field (header, "POT-Creation-Date",
pot_date);
}
gchar *
-gtranslator_header_get_po_date (GtrHeader *header)
+gtr_header_get_po_date (GtrHeader *header)
{
g_return_val_if_fail (GTR_IS_HEADER (header), NULL);
- return po_header_field (gtranslator_msg_get_msgstr (GTR_MSG (header)),
+ return po_header_field (gtr_msg_get_msgstr (GTR_MSG (header)),
"PO-Revision-Date");
}
void
-gtranslator_header_set_po_date (GtrHeader *header,
+gtr_header_set_po_date (GtrHeader *header,
const gchar *po_date)
{
g_return_if_fail (GTR_IS_HEADER (header));
g_return_if_fail (po_date != NULL);
- gtranslator_header_set_field (header, "PO-Revision-Date",
+ gtr_header_set_field (header, "PO-Revision-Date",
po_date);
}
gchar *
-gtranslator_header_get_translator (GtrHeader *header)
+gtr_header_get_translator (GtrHeader *header)
{
gchar *space, *translator_temp, *translator;
g_return_val_if_fail (GTR_IS_HEADER (header), NULL);
- translator_temp = po_header_field (gtranslator_msg_get_msgstr (GTR_MSG (header)),
+ translator_temp = po_header_field (gtr_msg_get_msgstr (GTR_MSG (header)),
"Last-Translator");
space = g_strrstr (translator_temp, " <");
@@ -289,13 +289,13 @@ gtranslator_header_get_translator (GtrHeader *header)
}
gchar *
-gtranslator_header_get_tr_email (GtrHeader *header)
+gtr_header_get_tr_email (GtrHeader *header)
{
gchar *space, *email_temp, *email;
g_return_val_if_fail (GTR_IS_HEADER (header), NULL);
- email_temp = po_header_field (gtranslator_msg_get_msgstr (GTR_MSG (header)),
+ email_temp = po_header_field (gtr_msg_get_msgstr (GTR_MSG (header)),
"Last-Translator");
space = g_strrstr (email_temp, " <");
@@ -310,7 +310,7 @@ gtranslator_header_get_tr_email (GtrHeader *header)
}
void
-gtranslator_header_set_translator (GtrHeader *header,
+gtr_header_set_translator (GtrHeader *header,
const gchar *name,
const gchar *email)
{
@@ -320,20 +320,20 @@ gtranslator_header_set_translator (GtrHeader *header,
translator = g_strconcat (name, " <", email, ">", NULL);
- gtranslator_header_set_field (header, "Last-Translator",
+ gtr_header_set_field (header, "Last-Translator",
translator);
g_free (translator);
}
gchar *
-gtranslator_header_get_language (GtrHeader *header)
+gtr_header_get_language (GtrHeader *header)
{
gchar *space, *lang_temp, *language;
g_return_val_if_fail (GTR_IS_HEADER (header), NULL);
- lang_temp = po_header_field (gtranslator_msg_get_msgstr (GTR_MSG (header)),
+ lang_temp = po_header_field (gtr_msg_get_msgstr (GTR_MSG (header)),
"Language-Team");
space = g_strrstr (lang_temp, " <");
@@ -348,13 +348,13 @@ gtranslator_header_get_language (GtrHeader *header)
}
gchar *
-gtranslator_header_get_lg_email (GtrHeader *header)
+gtr_header_get_lg_email (GtrHeader *header)
{
gchar *space, *email_temp, *email;
g_return_val_if_fail (GTR_IS_HEADER (header), NULL);
- email_temp = po_header_field (gtranslator_msg_get_msgstr (GTR_MSG (header)),
+ email_temp = po_header_field (gtr_msg_get_msgstr (GTR_MSG (header)),
"Language-Team");
space = g_strrstr (email_temp, " <");
@@ -369,7 +369,7 @@ gtranslator_header_get_lg_email (GtrHeader *header)
}
void
-gtranslator_header_set_language (GtrHeader *header,
+gtr_header_set_language (GtrHeader *header,
const gchar *language,
const gchar *email)
{
@@ -379,39 +379,39 @@ gtranslator_header_set_language (GtrHeader *header,
lang_temp = g_strconcat (language, " <", email, ">", NULL);
- gtranslator_header_set_field (header, "Language-Team",
+ gtr_header_set_field (header, "Language-Team",
lang_temp);
g_free (lang_temp);
}
gchar *
-gtranslator_header_get_mime_version (GtrHeader *header)
+gtr_header_get_mime_version (GtrHeader *header)
{
g_return_val_if_fail (GTR_IS_HEADER (header), NULL);
- return po_header_field (gtranslator_msg_get_msgstr (GTR_MSG (header)),
+ return po_header_field (gtr_msg_get_msgstr (GTR_MSG (header)),
"MIME-Version");
}
void
-gtranslator_header_set_mime_version (GtrHeader *header,
+gtr_header_set_mime_version (GtrHeader *header,
const gchar *mime_version)
{
g_return_if_fail (GTR_IS_HEADER (header));
- gtranslator_header_set_field (header, "MIME-Version",
+ gtr_header_set_field (header, "MIME-Version",
mime_version);
}
gchar *
-gtranslator_header_get_charset (GtrHeader *header)
+gtr_header_get_charset (GtrHeader *header)
{
gchar *space, *charset_temp, *charset;
g_return_val_if_fail (GTR_IS_HEADER (header), NULL);
- charset_temp = po_header_field (gtranslator_msg_get_msgstr (GTR_MSG (header)),
+ charset_temp = po_header_field (gtr_msg_get_msgstr (GTR_MSG (header)),
"Content-Type");
space = g_strrstr (charset_temp, "=");
@@ -427,7 +427,7 @@ gtranslator_header_get_charset (GtrHeader *header)
}
void
-gtranslator_header_set_charset (GtrHeader *header,
+gtr_header_set_charset (GtrHeader *header,
const gchar *charset)
{
gchar *set;
@@ -437,61 +437,61 @@ gtranslator_header_set_charset (GtrHeader *header,
set = g_strconcat("text/plain;", " charset=",
charset, NULL);
- gtranslator_header_set_field (header, "Content-Type",
+ gtr_header_set_field (header, "Content-Type",
set);
g_free (set);
}
gchar *
-gtranslator_header_get_encoding (GtrHeader *header)
+gtr_header_get_encoding (GtrHeader *header)
{
g_return_val_if_fail (GTR_IS_HEADER (header), NULL);
- return po_header_field (gtranslator_msg_get_msgstr (GTR_MSG (header)),
+ return po_header_field (gtr_msg_get_msgstr (GTR_MSG (header)),
"Content-Transfer-Encoding");
}
void
-gtranslator_header_set_encoding (GtrHeader *header,
+gtr_header_set_encoding (GtrHeader *header,
const gchar *encoding)
{
g_return_if_fail (GTR_IS_HEADER (header));
- gtranslator_header_set_field (header, "Content-Transfer-Encoding",
+ gtr_header_set_field (header, "Content-Transfer-Encoding",
encoding);
}
/**
- * gtranslator_header_get_plural_forms:
+ * gtr_header_get_plural_forms:
* @header: a #GtrHeader.
*
* Return value: a new allocated string with the plural form of the po file.
*/
gchar *
-gtranslator_header_get_plural_forms (GtrHeader *header)
+gtr_header_get_plural_forms (GtrHeader *header)
{
g_return_val_if_fail (GTR_IS_HEADER (header), NULL);
- return po_header_field (gtranslator_msg_get_msgstr (GTR_MSG (header)),
+ return po_header_field (gtr_msg_get_msgstr (GTR_MSG (header)),
"Plural-Forms");
}
/**
- * gtranslator_header_set_plural_forms:
+ * gtr_header_set_plural_forms:
* @header: a #GtrHeader
* @plural_forms: the plural forms string.
*
* Sets the plural form string in the @header and it sets the number of plurals.
*/
void
-gtranslator_header_set_plural_forms (GtrHeader * header,
+gtr_header_set_plural_forms (GtrHeader * header,
const gchar * plural_forms)
{
g_return_if_fail (GTR_IS_HEADER (header));
g_return_if_fail (plural_forms != NULL);
- gtranslator_header_set_field (header, "Plural-Forms",
+ gtr_header_set_field (header, "Plural-Forms",
plural_forms);
/*Now we parse the plural forms to know the number of plurals */
@@ -499,7 +499,7 @@ gtranslator_header_set_plural_forms (GtrHeader * header,
}
/**
- * gtranslator_header_get_plural:
+ * gtr_header_get_plural:
* @header: a #GtrHeader
*
* Return value: The number of plurals of the po file, if there is not a plural
@@ -507,7 +507,7 @@ gtranslator_header_set_plural_forms (GtrHeader * header,
* or 1 if there is not a plural form string stored.
*/
gint
-gtranslator_header_get_nplurals (GtrHeader * header)
+gtr_header_get_nplurals (GtrHeader * header)
{
const gchar *plural_form;
@@ -522,19 +522,19 @@ gtranslator_header_get_nplurals (GtrHeader * header)
static void
set_profile_values (GtrHeader *header)
{
- if (gtranslator_prefs_manager_get_use_profile_values ())
+ if (gtr_prefs_manager_get_use_profile_values ())
{
GtrProfile *active_profile;
- active_profile = gtranslator_application_get_active_profile (GTR_APP);
+ active_profile = gtr_application_get_active_profile (GTR_APP);
- gtranslator_header_set_translator (header, gtranslator_profile_get_author_name (active_profile),
- gtranslator_profile_get_author_email (active_profile));
- gtranslator_header_set_language (header, gtranslator_profile_get_language_name (active_profile),
- gtranslator_profile_get_group_email (active_profile));
- gtranslator_header_set_charset (header, gtranslator_profile_get_charset (active_profile));
- gtranslator_header_set_encoding (header, gtranslator_profile_get_encoding (active_profile));
- gtranslator_header_set_plural_forms (header, gtranslator_profile_get_plurals (active_profile));
+ gtr_header_set_translator (header, gtr_profile_get_author_name (active_profile),
+ gtr_profile_get_author_email (active_profile));
+ gtr_header_set_language (header, gtr_profile_get_language_name (active_profile),
+ gtr_profile_get_group_email (active_profile));
+ gtr_header_set_charset (header, gtr_profile_get_charset (active_profile));
+ gtr_header_set_encoding (header, gtr_profile_get_encoding (active_profile));
+ gtr_header_set_plural_forms (header, gtr_profile_get_plurals (active_profile));
}
}
@@ -545,15 +545,15 @@ update_po_date (GtrHeader *header)
gchar *current_time;
gchar *new_date;
- current_date = gtranslator_utils_get_current_date ();
- current_time = gtranslator_utils_get_current_time ();
+ current_date = gtr_utils_get_current_date ();
+ current_time = gtr_utils_get_current_time ();
new_date = g_strconcat (current_date, " ", current_time, NULL);
g_free (current_date);
g_free (current_time);
- gtranslator_header_set_po_date (header, new_date);
+ gtr_header_set_po_date (header, new_date);
g_free (new_date);
}
@@ -570,22 +570,22 @@ update_comments (GtrHeader *header,
gchar *current_year;
gint i;
- current_year = gtranslator_utils_get_current_year ();
+ current_year = gtr_utils_get_current_year ();
/* Save the previous translator to update the header's comment */
- if (gtranslator_prefs_manager_get_use_profile_values ())
+ if (gtr_prefs_manager_get_use_profile_values ())
{
GtrProfile *active_profile;
- active_profile = gtranslator_application_get_active_profile (GTR_APP);
+ active_profile = gtr_application_get_active_profile (GTR_APP);
- translator = g_strdup (gtranslator_profile_get_author_name (active_profile));
- email = g_strdup (gtranslator_profile_get_author_email (active_profile));
+ translator = g_strdup (gtr_profile_get_author_name (active_profile));
+ email = g_strdup (gtr_profile_get_author_email (active_profile));
}
else
{
- translator = gtranslator_header_get_translator (header);
- email = gtranslator_header_get_tr_email (header);
+ translator = gtr_header_get_translator (header);
+ email = gtr_header_get_tr_email (header);
}
comment_lines = g_strsplit (comments, "\n", -1);
@@ -647,7 +647,7 @@ update_comments (GtrHeader *header,
g_string_free (years, TRUE);
- gtranslator_header_set_comments (header, new_comments->str);
+ gtr_header_set_comments (header, new_comments->str);
g_string_free (new_comments, TRUE);
}
@@ -659,7 +659,7 @@ add_default_comments (GtrHeader *header)
}
void
-gtranslator_header_update_header (GtrHeader *header)
+gtr_header_update_header (GtrHeader *header)
{
const gchar *comments;
@@ -670,7 +670,7 @@ gtranslator_header_update_header (GtrHeader *header)
update_po_date (header);
/* Update the header's comment */
- comments = gtranslator_header_get_comments (header);
+ comments = gtr_header_get_comments (header);
if (comments != NULL)
update_comments (header, comments);
diff --git a/src/gtr-header.h b/src/gtr-header.h
index f6fd3af..d1c651e 100644
--- a/src/gtr-header.h
+++ b/src/gtr-header.h
@@ -33,7 +33,7 @@
* Utility Macros
*/
-#define GTR_TYPE_HEADER (gtranslator_header_get_type ())
+#define GTR_TYPE_HEADER (gtr_header_get_type ())
#define GTR_HEADER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_HEADER, GtrHeader))
#define GTR_HEADER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_HEADER, GtrHeaderClass))
#define GTR_IS_HEADER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_HEADER))
@@ -69,60 +69,60 @@ struct _GtrHeaderClass
/*
* Public methods
*/
-GType gtranslator_header_get_type (void)G_GNUC_CONST;
+GType gtr_header_get_type (void)G_GNUC_CONST;
-GType gtranslator_header_register_type (GTypeModule * module);
+GType gtr_header_register_type (GTypeModule * module);
-GtrHeader *gtranslator_header_new (po_message_iterator_t iter,
+GtrHeader *gtr_header_new (po_message_iterator_t iter,
po_message_t message);
-const gchar *gtranslator_header_get_comments (GtrHeader *header);
-void gtranslator_header_set_comments (GtrHeader *header,
+const gchar *gtr_header_get_comments (GtrHeader *header);
+void gtr_header_set_comments (GtrHeader *header,
const gchar *comments);
-gchar *gtranslator_header_get_prj_id_version (GtrHeader *header);
-void gtranslator_header_set_prj_id_version (GtrHeader *header,
+gchar *gtr_header_get_prj_id_version (GtrHeader *header);
+void gtr_header_set_prj_id_version (GtrHeader *header,
const gchar *prj_id_version);
-gchar *gtranslator_header_get_rmbt (GtrHeader *header);
-void gtranslator_header_set_rmbt (GtrHeader *header,
+gchar *gtr_header_get_rmbt (GtrHeader *header);
+void gtr_header_set_rmbt (GtrHeader *header,
const gchar *rmbt);
-gchar *gtranslator_header_get_pot_date (GtrHeader *header);
-void gtranslator_header_set_pot_date (GtrHeader *header,
+gchar *gtr_header_get_pot_date (GtrHeader *header);
+void gtr_header_set_pot_date (GtrHeader *header,
const gchar *pot_date);
-gchar *gtranslator_header_get_po_date (GtrHeader *header);
-void gtranslator_header_set_po_date (GtrHeader *header,
+gchar *gtr_header_get_po_date (GtrHeader *header);
+void gtr_header_set_po_date (GtrHeader *header,
const gchar *po_date);
-gchar *gtranslator_header_get_translator (GtrHeader *header);
-gchar *gtranslator_header_get_tr_email (GtrHeader *header);
-void gtranslator_header_set_translator (GtrHeader *header,
+gchar *gtr_header_get_translator (GtrHeader *header);
+gchar *gtr_header_get_tr_email (GtrHeader *header);
+void gtr_header_set_translator (GtrHeader *header,
const gchar *name,
const gchar *email);
-gchar *gtranslator_header_get_language (GtrHeader *header);
-gchar *gtranslator_header_get_lg_email (GtrHeader *header);
-void gtranslator_header_set_language (GtrHeader *header,
+gchar *gtr_header_get_language (GtrHeader *header);
+gchar *gtr_header_get_lg_email (GtrHeader *header);
+void gtr_header_set_language (GtrHeader *header,
const gchar *language,
const gchar *email);
-gchar *gtranslator_header_get_mime_version (GtrHeader *header);
-void gtranslator_header_set_mime_version (GtrHeader *header,
+gchar *gtr_header_get_mime_version (GtrHeader *header);
+void gtr_header_set_mime_version (GtrHeader *header,
const gchar *mime_version);
-gchar *gtranslator_header_get_charset (GtrHeader *header);
-void gtranslator_header_set_charset (GtrHeader *header,
+gchar *gtr_header_get_charset (GtrHeader *header);
+void gtr_header_set_charset (GtrHeader *header,
const gchar *charset);
-gchar *gtranslator_header_get_encoding (GtrHeader *header);
-void gtranslator_header_set_encoding (GtrHeader *header,
+gchar *gtr_header_get_encoding (GtrHeader *header);
+void gtr_header_set_encoding (GtrHeader *header,
const gchar *encoding);
-gchar *gtranslator_header_get_plural_forms (GtrHeader *header);
-void gtranslator_header_set_plural_forms (GtrHeader * header,
+gchar *gtr_header_get_plural_forms (GtrHeader *header);
+void gtr_header_set_plural_forms (GtrHeader * header,
const gchar * plural_forms);
-gint gtranslator_header_get_nplurals (GtrHeader * header);
+gint gtr_header_get_nplurals (GtrHeader * header);
#endif /* __HEADER_H__ */
diff --git a/src/gtr-history-entry.c b/src/gtr-history-entry.c
index 29fc2c7..ffa5236 100644
--- a/src/gtr-history-entry.c
+++ b/src/gtr-history-entry.c
@@ -21,8 +21,8 @@
*/
/*
- * Modified by the gtranslator Team, 2006. See the AUTHORS file for a
- * list of people on the gtranslator Team.
+ * Modified by the gedit Team, 2006. See the AUTHORS file for a
+ * list of people on the gtr Team.
* See the ChangeLog files for a list of changes.
*
* $Id$
@@ -63,10 +63,10 @@ struct _GtrHistoryEntryPrivate
GConfClient *gconf_client;
};
-G_DEFINE_TYPE(GtrHistoryEntry, gtranslator_history_entry, GTK_TYPE_COMBO_BOX_ENTRY)
+G_DEFINE_TYPE(GtrHistoryEntry, gtr_history_entry, GTK_TYPE_COMBO_BOX_ENTRY)
static void
-gtranslator_history_entry_set_property (GObject *object,
+gtr_history_entry_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *spec)
@@ -82,7 +82,7 @@ gtranslator_history_entry_set_property (GObject *object,
entry->priv->history_id = g_value_dup_string (value);
break;
case PROP_HISTORY_LENGTH:
- gtranslator_history_entry_set_history_length (entry,
+ gtr_history_entry_set_history_length (entry,
g_value_get_uint (value));
break;
default:
@@ -91,7 +91,7 @@ gtranslator_history_entry_set_property (GObject *object,
}
static void
-gtranslator_history_entry_get_property (GObject *object,
+gtr_history_entry_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *spec)
@@ -115,16 +115,16 @@ gtranslator_history_entry_get_property (GObject *object,
}
static void
-gtranslator_history_entry_destroy (GtkObject *object)
+gtr_history_entry_destroy (GtkObject *object)
{
- gtranslator_history_entry_set_enable_completion (GTR_HISTORY_ENTRY (object),
+ gtr_history_entry_set_enable_completion (GTR_HISTORY_ENTRY (object),
FALSE);
- GTK_OBJECT_CLASS (gtranslator_history_entry_parent_class)->destroy (object);
+ GTK_OBJECT_CLASS (gtr_history_entry_parent_class)->destroy (object);
}
static void
-gtranslator_history_entry_finalize (GObject *object)
+gtr_history_entry_finalize (GObject *object)
{
GtrHistoryEntryPrivate *priv;
@@ -138,19 +138,19 @@ gtranslator_history_entry_finalize (GObject *object)
priv->gconf_client = NULL;
}
- G_OBJECT_CLASS (gtranslator_history_entry_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_history_entry_parent_class)->finalize (object);
}
static void
-gtranslator_history_entry_class_init (GtrHistoryEntryClass *klass)
+gtr_history_entry_class_init (GtrHistoryEntryClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS (klass);
- object_class->set_property = gtranslator_history_entry_set_property;
- object_class->get_property = gtranslator_history_entry_get_property;
- object_class->finalize = gtranslator_history_entry_finalize;
- gtkobject_class->destroy = gtranslator_history_entry_destroy;
+ object_class->set_property = gtr_history_entry_set_property;
+ object_class->get_property = gtr_history_entry_get_property;
+ object_class->finalize = gtr_history_entry_finalize;
+ gtkobject_class->destroy = gtr_history_entry_destroy;
g_object_class_install_property (object_class,
PROP_HISTORY_ID,
@@ -244,7 +244,7 @@ get_history_list (GtrHistoryEntry *entry)
}
static void
-gtranslator_history_entry_save_history (GtrHistoryEntry *entry)
+gtr_history_entry_save_history (GtrHistoryEntry *entry)
{
GSList *gconf_items;
gchar *key;
@@ -356,11 +356,11 @@ insert_history_item (GtrHistoryEntry *entry,
text,
-1);
- gtranslator_history_entry_save_history (entry);
+ gtr_history_entry_save_history (entry);
}
void
-gtranslator_history_entry_prepend_text (GtrHistoryEntry *entry,
+gtr_history_entry_prepend_text (GtrHistoryEntry *entry,
const gchar *text)
{
g_return_if_fail (GTR_IS_HISTORY_ENTRY (entry));
@@ -370,7 +370,7 @@ gtranslator_history_entry_prepend_text (GtrHistoryEntry *entry,
}
void
-gtranslator_history_entry_append_text (GtrHistoryEntry *entry,
+gtr_history_entry_append_text (GtrHistoryEntry *entry,
const gchar *text)
{
g_return_if_fail (GTR_IS_HISTORY_ENTRY (entry));
@@ -380,7 +380,7 @@ gtranslator_history_entry_append_text (GtrHistoryEntry *entry,
}
static void
-gtranslator_history_entry_load_history (GtrHistoryEntry *entry)
+gtr_history_entry_load_history (GtrHistoryEntry *entry)
{
GSList *gconf_items, *l;
GtkListStore *store;
@@ -418,7 +418,7 @@ gtranslator_history_entry_load_history (GtrHistoryEntry *entry)
}
void
-gtranslator_history_entry_clear (GtrHistoryEntry *entry)
+gtr_history_entry_clear (GtrHistoryEntry *entry)
{
GtkListStore *store;
@@ -427,11 +427,11 @@ gtranslator_history_entry_clear (GtrHistoryEntry *entry)
store = get_history_store (entry);
gtk_list_store_clear (store);
- gtranslator_history_entry_save_history (entry);
+ gtr_history_entry_save_history (entry);
}
static void
-gtranslator_history_entry_init (GtrHistoryEntry *entry)
+gtr_history_entry_init (GtrHistoryEntry *entry)
{
GtrHistoryEntryPrivate *priv;
@@ -447,7 +447,7 @@ gtranslator_history_entry_init (GtrHistoryEntry *entry)
}
void
-gtranslator_history_entry_set_history_length (GtrHistoryEntry *entry,
+gtr_history_entry_set_history_length (GtrHistoryEntry *entry,
guint history_length)
{
g_return_if_fail (GTR_IS_HISTORY_ENTRY (entry));
@@ -459,7 +459,7 @@ gtranslator_history_entry_set_history_length (GtrHistoryEntry *entry,
}
guint
-gtranslator_history_entry_get_history_length (GtrHistoryEntry *entry)
+gtr_history_entry_get_history_length (GtrHistoryEntry *entry)
{
g_return_val_if_fail (GTR_IS_HISTORY_ENTRY (entry), 0);
@@ -467,7 +467,7 @@ gtranslator_history_entry_get_history_length (GtrHistoryEntry *entry)
}
gchar *
-gtranslator_history_entry_get_history_id (GtrHistoryEntry *entry)
+gtr_history_entry_get_history_id (GtrHistoryEntry *entry)
{
g_return_val_if_fail (GTR_IS_HISTORY_ENTRY (entry), NULL);
@@ -475,7 +475,7 @@ gtranslator_history_entry_get_history_id (GtrHistoryEntry *entry)
}
void
-gtranslator_history_entry_set_enable_completion (GtrHistoryEntry *entry,
+gtr_history_entry_set_enable_completion (GtrHistoryEntry *entry,
gboolean enable)
{
g_return_if_fail (GTR_IS_HISTORY_ENTRY (entry));
@@ -499,7 +499,7 @@ gtranslator_history_entry_set_enable_completion (GtrHistoryEntry *entry,
gtk_entry_completion_set_inline_completion (entry->priv->completion, TRUE);
/* Assign the completion to the entry */
- gtk_entry_set_completion (GTK_ENTRY (gtranslator_history_entry_get_entry(entry)),
+ gtk_entry_set_completion (GTK_ENTRY (gtr_history_entry_get_entry(entry)),
entry->priv->completion);
}
else
@@ -507,7 +507,7 @@ gtranslator_history_entry_set_enable_completion (GtrHistoryEntry *entry,
if (entry->priv->completion == NULL)
return;
- gtk_entry_set_completion (GTK_ENTRY (gtranslator_history_entry_get_entry (entry)),
+ gtk_entry_set_completion (GTK_ENTRY (gtr_history_entry_get_entry (entry)),
NULL);
g_object_unref (entry->priv->completion);
@@ -517,7 +517,7 @@ gtranslator_history_entry_set_enable_completion (GtrHistoryEntry *entry,
}
gboolean
-gtranslator_history_entry_get_enable_completion (GtrHistoryEntry *entry)
+gtr_history_entry_get_enable_completion (GtrHistoryEntry *entry)
{
g_return_val_if_fail (GTR_IS_HISTORY_ENTRY (entry), FALSE);
@@ -525,7 +525,7 @@ gtranslator_history_entry_get_enable_completion (GtrHistoryEntry *entry)
}
GtkWidget *
-gtranslator_history_entry_new (const gchar *history_id,
+gtr_history_entry_new (const gchar *history_id,
gboolean enable_completion)
{
GtkWidget *ret;
@@ -535,7 +535,7 @@ gtranslator_history_entry_new (const gchar *history_id,
/* Note that we are setting the model, so
* user must be careful to always manipulate
- * data in the history through gtranslator_history_entry_
+ * data in the history through gtr_history_entry_
* functions.
*/
@@ -560,9 +560,9 @@ gtranslator_history_entry_new (const gchar *history_id,
* This would also ensure that the model cannot be
* set explicitely at a later time.
*/
- gtranslator_history_entry_load_history (GTR_HISTORY_ENTRY (ret));
+ gtr_history_entry_load_history (GTR_HISTORY_ENTRY (ret));
- gtranslator_history_entry_set_enable_completion (GTR_HISTORY_ENTRY (ret),
+ gtr_history_entry_set_enable_completion (GTR_HISTORY_ENTRY (ret),
enable_completion);
return ret;
@@ -577,7 +577,7 @@ gtranslator_history_entry_new (const gchar *history_id,
* handle the conflict.
*/
GtkWidget *
-gtranslator_history_entry_get_entry (GtrHistoryEntry *entry)
+gtr_history_entry_get_entry (GtrHistoryEntry *entry)
{
g_return_val_if_fail (GTR_IS_HISTORY_ENTRY (entry), NULL);
@@ -603,7 +603,7 @@ escape_cell_data_func (GtkTreeViewColumn *col,
}
void
-gtranslator_history_entry_set_escape_func (GtrHistoryEntry *entry,
+gtr_history_entry_set_escape_func (GtrHistoryEntry *entry,
GtrHistoryEntryEscapeFunc escape_func)
{
GList *cells;
diff --git a/src/gtr-history-entry.h b/src/gtr-history-entry.h
index 8868ccd..c612984 100644
--- a/src/gtr-history-entry.h
+++ b/src/gtr-history-entry.h
@@ -21,8 +21,8 @@
*/
/*
- * Modified by the gtranslator Team, 2006. See the AUTHORS file for a
- * list of people on the gtranslator Team.
+ * Modified by the gedit Team, 2006. See the AUTHORS file for a
+ * list of people on the gtr Team.
* See the ChangeLog files for a list of changes.
*
* $Id$
@@ -34,7 +34,7 @@
G_BEGIN_DECLS
-#define GTR_TYPE_HISTORY_ENTRY (gtranslator_history_entry_get_type ())
+#define GTR_TYPE_HISTORY_ENTRY (gtr_history_entry_get_type ())
#define GTR_HISTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTR_TYPE_HISTORY_ENTRY, GtrHistoryEntry))
#define GTR_HISTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTR_TYPE_HISTORY_ENTRY, GtrHistoryEntryClass))
#define GTR_IS_HISTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTR_TYPE_HISTORY_ENTRY))
@@ -58,37 +58,37 @@ struct _GtrHistoryEntry
GtrHistoryEntryPrivate *priv;
};
-GType gtranslator_history_entry_get_type (void) G_GNUC_CONST;
+GType gtr_history_entry_get_type (void) G_GNUC_CONST;
-GtkWidget *gtranslator_history_entry_new (const gchar *history_id,
+GtkWidget *gtr_history_entry_new (const gchar *history_id,
gboolean enable_completion);
-void gtranslator_history_entry_prepend_text (GtrHistoryEntry *entry,
+void gtr_history_entry_prepend_text (GtrHistoryEntry *entry,
const gchar *text);
-void gtranslator_history_entry_append_text (GtrHistoryEntry *entry,
+void gtr_history_entry_append_text (GtrHistoryEntry *entry,
const gchar *text);
-void gtranslator_history_entry_clear (GtrHistoryEntry *entry);
+void gtr_history_entry_clear (GtrHistoryEntry *entry);
-void gtranslator_history_entry_set_history_length (GtrHistoryEntry *entry,
+void gtr_history_entry_set_history_length (GtrHistoryEntry *entry,
guint max_saved);
-guint gtranslator_history_entry_get_history_length (GtrHistoryEntry *gentry);
+guint gtr_history_entry_get_history_length (GtrHistoryEntry *gentry);
-gchar *gtranslator_history_entry_get_history_id (GtrHistoryEntry *entry);
+gchar *gtr_history_entry_get_history_id (GtrHistoryEntry *entry);
-void gtranslator_history_entry_set_enable_completion
+void gtr_history_entry_set_enable_completion
(GtrHistoryEntry *entry,
gboolean enable);
-gboolean gtranslator_history_entry_get_enable_completion
+gboolean gtr_history_entry_get_enable_completion
(GtrHistoryEntry *entry);
-GtkWidget *gtranslator_history_entry_get_entry (GtrHistoryEntry *entry);
+GtkWidget *gtr_history_entry_get_entry (GtrHistoryEntry *entry);
typedef gchar * (* GtrHistoryEntryEscapeFunc) (const gchar *str);
-void gtranslator_history_entry_set_escape_func (GtrHistoryEntry *entry,
+void gtr_history_entry_set_escape_func (GtrHistoryEntry *entry,
GtrHistoryEntryEscapeFunc escape_func);
G_END_DECLS
diff --git a/src/gtr-message-table-model.c b/src/gtr-message-table-model.c
index a91b248..6c7d32a 100644
--- a/src/gtr-message-table-model.c
+++ b/src/gtr-message-table-model.c
@@ -37,19 +37,19 @@
static GObjectClass *parent_class;
static guint
-gtranslator_message_table_model_get_flags (GtkTreeModel * self)
+gtr_message_table_model_get_flags (GtkTreeModel * self)
{
return 0;
}
static gint
-gtranslator_message_table_model_get_n_columns (GtkTreeModel * self)
+gtr_message_table_model_get_n_columns (GtkTreeModel * self)
{
return GTR_MESSAGE_TABLE_MODEL_N_COLUMNS;
}
static GType
-gtranslator_message_table_model_get_column_type (GtkTreeModel * self,
+gtr_message_table_model_get_column_type (GtkTreeModel * self,
gint column)
{
GType retval;
@@ -78,7 +78,7 @@ gtranslator_message_table_model_get_column_type (GtkTreeModel * self,
}
static gboolean
-gtranslator_message_table_model_get_iter (GtkTreeModel * self,
+gtr_message_table_model_get_iter (GtkTreeModel * self,
GtkTreeIter * iter,
GtkTreePath * path)
{
@@ -104,7 +104,7 @@ gtranslator_message_table_model_get_iter (GtkTreeModel * self,
}
static GtkTreePath *
-gtranslator_message_table_model_get_path (GtkTreeModel * tree_model,
+gtr_message_table_model_get_path (GtkTreeModel * tree_model,
GtkTreeIter * iter)
{
GList *list;
@@ -131,7 +131,7 @@ gtranslator_message_table_model_get_path (GtkTreeModel * tree_model,
}
static void
-gtranslator_message_table_model_get_value (GtkTreeModel * self,
+gtr_message_table_model_get_value (GtkTreeModel * self,
GtkTreeIter * iter,
gint column, GValue * value)
{
@@ -152,7 +152,7 @@ gtranslator_message_table_model_get_value (GtkTreeModel * self,
case GTR_MESSAGE_TABLE_MODEL_ICON_COLUMN:
g_value_init (value, G_TYPE_STRING);
- status = gtranslator_msg_get_status (msg);
+ status = gtr_msg_get_status (msg);
if (status == GTR_MSG_STATUS_UNTRANSLATED)
text = TABLE_UNTRANSLATED_ICON;
@@ -174,7 +174,7 @@ gtranslator_message_table_model_get_value (GtkTreeModel * self,
case GTR_MESSAGE_TABLE_MODEL_ORIGINAL_COLUMN:
g_value_init (value, G_TYPE_STRING);
- text = g_strdup (gtranslator_msg_get_msgid (msg));
+ text = g_strdup (gtr_msg_get_msgid (msg));
g_value_set_string (value, text);
g_free (text);
break;
@@ -182,7 +182,7 @@ gtranslator_message_table_model_get_value (GtkTreeModel * self,
case GTR_MESSAGE_TABLE_MODEL_TRANSLATION_COLUMN:
g_value_init (value, G_TYPE_STRING);
- text = g_strdup (gtranslator_msg_get_msgstr (msg));
+ text = g_strdup (gtr_msg_get_msgstr (msg));
g_value_set_string (value, text);
g_free (text);
break;
@@ -190,7 +190,7 @@ gtranslator_message_table_model_get_value (GtkTreeModel * self,
case GTR_MESSAGE_TABLE_MODEL_STATUS_COLUMN:
g_value_init (value, G_TYPE_INT);
- status = gtranslator_msg_get_status (msg);
+ status = gtr_msg_get_status (msg);
g_value_set_int (value, status);
break;
@@ -207,7 +207,7 @@ gtranslator_message_table_model_get_value (GtkTreeModel * self,
}
static gboolean
-gtranslator_message_table_model_iter_next (GtkTreeModel * tree_model,
+gtr_message_table_model_iter_next (GtkTreeModel * tree_model,
GtkTreeIter * iter)
{
g_return_val_if_fail (iter->stamp ==
@@ -219,14 +219,14 @@ gtranslator_message_table_model_iter_next (GtkTreeModel * tree_model,
}
static gboolean
-gtranslator_message_table_model_iter_has_child (GtkTreeModel * tree_model,
+gtr_message_table_model_iter_has_child (GtkTreeModel * tree_model,
GtkTreeIter * iter)
{
return FALSE;
}
static gint
-gtranslator_message_table_model_iter_n_children (GtkTreeModel * tree_model,
+gtr_message_table_model_iter_n_children (GtkTreeModel * tree_model,
GtkTreeIter * iter)
{
/* it should ask for the root node, because we're a list */
@@ -237,7 +237,7 @@ gtranslator_message_table_model_iter_n_children (GtkTreeModel * tree_model,
}
static gboolean
-gtranslator_message_table_model_iter_nth_child (GtkTreeModel * tree_model,
+gtr_message_table_model_iter_nth_child (GtkTreeModel * tree_model,
GtkTreeIter * iter,
GtkTreeIter * parent, gint n)
{
@@ -259,7 +259,7 @@ gtranslator_message_table_model_iter_nth_child (GtkTreeModel * tree_model,
}
static gboolean
-gtranslator_message_table_model_iter_children (GtkTreeModel * tree_model,
+gtr_message_table_model_iter_children (GtkTreeModel * tree_model,
GtkTreeIter * iter,
GtkTreeIter * parent)
{
@@ -280,41 +280,41 @@ gtranslator_message_table_model_iter_children (GtkTreeModel * tree_model,
}
static void
-gtranslator_message_table_model_tree_model_init (GtkTreeModelIface * iface)
+gtr_message_table_model_tree_model_init (GtkTreeModelIface * iface)
{
- iface->get_flags = gtranslator_message_table_model_get_flags;
- iface->get_n_columns = gtranslator_message_table_model_get_n_columns;
- iface->get_column_type = gtranslator_message_table_model_get_column_type;
- iface->get_iter = gtranslator_message_table_model_get_iter;
- iface->get_path = gtranslator_message_table_model_get_path;
- iface->get_value = gtranslator_message_table_model_get_value;
- iface->iter_next = gtranslator_message_table_model_iter_next;
- iface->iter_has_child = gtranslator_message_table_model_iter_has_child;
- iface->iter_n_children = gtranslator_message_table_model_iter_n_children;
- iface->iter_nth_child = gtranslator_message_table_model_iter_nth_child;
- iface->iter_children = gtranslator_message_table_model_iter_children;
+ iface->get_flags = gtr_message_table_model_get_flags;
+ iface->get_n_columns = gtr_message_table_model_get_n_columns;
+ iface->get_column_type = gtr_message_table_model_get_column_type;
+ iface->get_iter = gtr_message_table_model_get_iter;
+ iface->get_path = gtr_message_table_model_get_path;
+ iface->get_value = gtr_message_table_model_get_value;
+ iface->iter_next = gtr_message_table_model_iter_next;
+ iface->iter_has_child = gtr_message_table_model_iter_has_child;
+ iface->iter_n_children = gtr_message_table_model_iter_n_children;
+ iface->iter_nth_child = gtr_message_table_model_iter_nth_child;
+ iface->iter_children = gtr_message_table_model_iter_children;
}
static void
-gtranslator_message_table_model_init (GtrMessageTableModel * model)
+gtr_message_table_model_init (GtrMessageTableModel * model)
{
model->length = 0;
model->stamp = g_random_int ();
}
static void
-gtranslator_message_table_model_finalize (GObject * object)
+gtr_message_table_model_finalize (GObject * object)
{
parent_class->finalize (object);
}
static void
-gtranslator_message_table_model_class_init (GtrMessageTableModelClass
+gtr_message_table_model_class_init (GtrMessageTableModelClass
* klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = gtranslator_message_table_model_finalize;
+ object_class->finalize = gtr_message_table_model_finalize;
parent_class = g_type_class_peek_parent (klass);
}
@@ -322,12 +322,12 @@ gtranslator_message_table_model_class_init (GtrMessageTableModelClass
/***************************** Public funcs ***********************************/
/**
- * gtranslator_message_table_model_new:
+ * gtr_message_table_model_new:
*
* Return value: a new #GtrMessageTableModel object
**/
GtrMessageTableModel *
-gtranslator_message_table_model_new (void)
+gtr_message_table_model_new (void)
{
GtrMessageTableModel *model;
@@ -337,11 +337,10 @@ gtranslator_message_table_model_new (void)
}
void
-gtranslator_message_table_model_append (GtrMessageTableModel * model,
+gtr_message_table_model_append (GtrMessageTableModel * model,
GtrMsg * msg,
GtkTreeIter * iter)
{
- GList *list;
GtkTreePath *path;
//The sort stuff can be improved using a GPtrArray or gsecuence instead of a GList
@@ -359,19 +358,19 @@ gtranslator_message_table_model_append (GtrMessageTableModel * model,
}
void
-gtranslator_message_table_model_update_row (GtrMessageTableModel *
+gtr_message_table_model_update_row (GtrMessageTableModel *
model, GtkTreePath * path)
{
GtkTreeIter iter;
- gtranslator_message_table_model_get_iter (GTK_TREE_MODEL (model),
+ gtr_message_table_model_get_iter (GTK_TREE_MODEL (model),
&iter, path);
gtk_tree_model_row_changed (GTK_TREE_MODEL (model), path, &iter);
}
GType
-gtranslator_message_table_model_get_type (void)
+gtr_message_table_model_get_type (void)
{
static GType object_type = 0;
@@ -381,17 +380,17 @@ gtranslator_message_table_model_get_type (void)
sizeof (GtrMessageTableModelClass),
NULL, /* base_init */
NULL, /* base_finalize */
- (GClassInitFunc) gtranslator_message_table_model_class_init,
+ (GClassInitFunc) gtr_message_table_model_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GtrMessageTableModel),
0, /* n_preallocs */
- (GInstanceInitFunc) gtranslator_message_table_model_init,
+ (GInstanceInitFunc) gtr_message_table_model_init,
NULL
};
static const GInterfaceInfo tree_model_info = {
- (GInterfaceInitFunc) gtranslator_message_table_model_tree_model_init,
+ (GInterfaceInitFunc) gtr_message_table_model_tree_model_init,
NULL,
NULL
};
diff --git a/src/gtr-message-table-model.h b/src/gtr-message-table-model.h
index 9a6258d..c58b62a 100644
--- a/src/gtr-message-table-model.h
+++ b/src/gtr-message-table-model.h
@@ -30,7 +30,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_MESSAGE_TABLE_MODEL (gtranslator_message_table_model_get_type ())
+#define GTR_TYPE_MESSAGE_TABLE_MODEL (gtr_message_table_model_get_type ())
#define GTR_MESSAGE_TABLE_MODEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_MESSAGE_TABLE_MODEL, GtrMessageTableModel))
#define GTR_MESSAGE_TABLE_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_MESSAGE_TABLE_MODEL, GtrMessageTableModelClass))
#define GTR_IS_MESSAGE_TABLE_MODEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_MESSAGE_TABLE_MODEL))
@@ -83,21 +83,21 @@ enum _GtrMessageTableModelColumn
* Public methods
*/
GType
-gtranslator_message_table_model_get_type (void)
+gtr_message_table_model_get_type (void)
G_GNUC_CONST;
- GType gtranslator_message_table_model_register_type (GTypeModule *
+ GType gtr_message_table_model_register_type (GTypeModule *
module);
- GtrMessageTableModel *gtranslator_message_table_model_new (void);
+ GtrMessageTableModel *gtr_message_table_model_new (void);
- void gtranslator_message_table_model_append (GtrMessageTableModel
+ void gtr_message_table_model_append (GtrMessageTableModel
* model,
GtrMsg * msg,
GtkTreeIter * iter);
void
- gtranslator_message_table_model_update_row
+ gtr_message_table_model_update_row
(GtrMessageTableModel * model, GtkTreePath * path);
G_END_DECLS
diff --git a/src/gtr-message-table.c b/src/gtr-message-table.c
index a9c5eb4..39f62c4 100644
--- a/src/gtr-message-table.c
+++ b/src/gtr-message-table.c
@@ -41,7 +41,7 @@
GTR_TYPE_MESSAGE_TABLE, \
GtrMessageTablePrivate))
-G_DEFINE_TYPE (GtrMessageTable, gtranslator_message_table,
+G_DEFINE_TYPE (GtrMessageTable, gtr_message_table,
GTK_TYPE_VBOX)
struct _GtrMessageTablePrivate
{
@@ -53,7 +53,7 @@ G_DEFINE_TYPE (GtrMessageTable, gtranslator_message_table,
};
static void
- gtranslator_message_table_selection_changed (GtkTreeSelection *
+ gtr_message_table_selection_changed (GtkTreeSelection *
selection,
GtrMessageTable *
table)
@@ -66,8 +66,8 @@ G_DEFINE_TYPE (GtrMessageTable, gtranslator_message_table,
g_return_if_fail (selection != NULL);
- po = gtranslator_tab_get_po (table->priv->tab);
- current_msg = gtranslator_po_get_current_message (po);
+ po = gtr_tab_get_po (table->priv->tab);
+ current_msg = gtr_po_get_current_message (po);
if (gtk_tree_selection_get_selected (selection, &model, &iter) == TRUE)
{
@@ -75,10 +75,10 @@ G_DEFINE_TYPE (GtrMessageTable, gtranslator_message_table,
GTR_MESSAGE_TABLE_MODEL_POINTER_COLUMN, &msg, -1);
if (msg != NULL
- && g_utf8_collate (gtranslator_msg_get_msgid (msg->data),
- gtranslator_msg_get_msgid (current_msg->data)))
+ && g_utf8_collate (gtr_msg_get_msgid (msg->data),
+ gtr_msg_get_msgid (current_msg->data)))
{
- gtranslator_tab_message_go_to (table->priv->tab, msg,
+ gtr_tab_message_go_to (table->priv->tab, msg,
FALSE, GTR_TAB_MOVE_NONE);
}
}
@@ -97,7 +97,7 @@ showed_message_cb (GtrTab * tab,
gtk_tree_view_get_selection (GTK_TREE_VIEW (table->priv->treeview));
path =
- gtk_tree_row_reference_get_path (gtranslator_msg_get_row_reference (msg));
+ gtk_tree_row_reference_get_path (gtr_msg_get_row_reference (msg));
gtk_tree_model_get_iter (table->priv->sort_model, &iter, path);
@@ -117,7 +117,7 @@ message_changed_cb (GtrTab * tab,
GtkTreePath *sort_path, *path;
GtkTreeRowReference *row;
- row = gtranslator_msg_get_row_reference (msg);
+ row = gtr_msg_get_row_reference (msg);
sort_path = gtk_tree_row_reference_get_path (row);
path =
@@ -125,7 +125,7 @@ message_changed_cb (GtrTab * tab,
(table->priv->sort_model),
sort_path);
- gtranslator_message_table_model_update_row (table->priv->store, path);
+ gtr_message_table_model_update_row (table->priv->store, path);
}
gint
@@ -160,11 +160,11 @@ list_compare_by_status (gconstpointer a, gconstpointer b)
{
gint a_status, b_status, a_pos, b_pos;
- a_status = gtranslator_msg_get_status (GTR_MSG (a));
- b_status = gtranslator_msg_get_status (GTR_MSG (b));
+ a_status = gtr_msg_get_status (GTR_MSG (a));
+ b_status = gtr_msg_get_status (GTR_MSG (b));
- a_pos = gtranslator_msg_get_po_position (GTR_MSG (a));
- b_pos = gtranslator_msg_get_po_position (GTR_MSG (b));
+ a_pos = gtr_msg_get_po_position (GTR_MSG (a));
+ b_pos = gtr_msg_get_po_position (GTR_MSG (b));
return compare_by_status (a_status, b_status, a_pos, b_pos);
}
@@ -173,8 +173,8 @@ gint
list_compare_by_position (gconstpointer a, gconstpointer b)
{
gint a_pos, b_pos;
- a_pos = gtranslator_msg_get_po_position (GTR_MSG (a));
- b_pos = gtranslator_msg_get_po_position (GTR_MSG (b));
+ a_pos = gtr_msg_get_po_position (GTR_MSG (a));
+ b_pos = gtr_msg_get_po_position (GTR_MSG (b));
return a_pos - b_pos;
}
@@ -184,8 +184,8 @@ list_compare_by_original (gconstpointer a, gconstpointer b)
{
const gchar *a_original, *b_original;
- a_original = gtranslator_msg_get_msgid (GTR_MSG (a));
- b_original = gtranslator_msg_get_msgid (GTR_MSG (b));
+ a_original = gtr_msg_get_msgid (GTR_MSG (a));
+ b_original = gtr_msg_get_msgid (GTR_MSG (b));
return g_utf8_collate (a_original, b_original);
}
@@ -195,8 +195,8 @@ list_compare_by_translation (gconstpointer a, gconstpointer b)
{
const gchar *a_translated, *b_translated;
- a_translated = gtranslator_msg_get_msgstr (GTR_MSG (a));
- b_translated = gtranslator_msg_get_msgstr (GTR_MSG (b));
+ a_translated = gtr_msg_get_msgstr (GTR_MSG (a));
+ b_translated = gtr_msg_get_msgstr (GTR_MSG (b));
return g_utf8_collate (a_translated, b_translated);
}
@@ -209,8 +209,8 @@ sort_message_list (GtkTreeViewColumn * column,
GList *messages;
gint sort_column;
- po = gtranslator_tab_get_po (table->priv->tab);
- messages = gtranslator_po_get_messages (po);
+ po = gtr_tab_get_po (table->priv->tab);
+ messages = gtr_po_get_messages (po);
sort_column = gtk_tree_view_column_get_sort_column_id (column);
switch (sort_column)
@@ -232,15 +232,15 @@ sort_message_list (GtkTreeViewColumn * column,
if (gtk_tree_view_column_get_sort_order (column) == GTK_SORT_DESCENDING)
messages = g_list_reverse (messages);
- gtranslator_po_set_messages (po, messages);
+ gtr_po_set_messages (po, messages);
- gtranslator_tab_message_go_to (table->priv->tab,
+ gtr_tab_message_go_to (table->priv->tab,
g_list_first (messages),
FALSE, GTR_TAB_MOVE_NONE);
}
static void
-gtranslator_message_table_draw (GtrMessageTable * table)
+gtr_message_table_draw (GtrMessageTable * table)
{
GtrMessageTablePrivate *priv = table->priv;
@@ -248,7 +248,7 @@ gtranslator_message_table_draw (GtrMessageTable * table)
GtkCellRenderer *renderer;
GtkTreeSelection *selection;
- priv->store = gtranslator_message_table_model_new ();
+ priv->store = gtr_message_table_model_new ();
priv->sort_model =
gtk_tree_model_sort_new_with_model (GTK_TREE_MODEL (priv->store));
@@ -344,19 +344,19 @@ gtranslator_message_table_draw (GtrMessageTable * table)
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
g_signal_connect (G_OBJECT (selection), "changed",
- G_CALLBACK (gtranslator_message_table_selection_changed),
+ G_CALLBACK (gtr_message_table_selection_changed),
table);
}
static void
-gtranslator_message_table_init (GtrMessageTable * table)
+gtr_message_table_init (GtrMessageTable * table)
{
GtkWidget *scrolledwindow;
table->priv = GTR_MESSAGE_TABLE_GET_PRIVATE (table);
- gtranslator_message_table_draw (table);
+ gtr_message_table_draw (table);
scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow),
@@ -369,23 +369,23 @@ gtranslator_message_table_init (GtrMessageTable * table)
}
static void
-gtranslator_message_table_finalize (GObject * object)
+gtr_message_table_finalize (GObject * object)
{
- G_OBJECT_CLASS (gtranslator_message_table_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_message_table_parent_class)->finalize (object);
}
static void
-gtranslator_message_table_class_init (GtrMessageTableClass * klass)
+gtr_message_table_class_init (GtrMessageTableClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrMessageTablePrivate));
- object_class->finalize = gtranslator_message_table_finalize;
+ object_class->finalize = gtr_message_table_finalize;
}
/**
- * gtranslator_message_table_new:
+ * gtr_message_table_new:
* @tab: a #GtrTab
*
* Creates a new #GtrMessageTable object.
@@ -393,7 +393,7 @@ gtranslator_message_table_class_init (GtrMessageTableClass * klass)
* Returns: the newly created #GtrMessageTable
*/
GtkWidget *
-gtranslator_message_table_new (GtkWidget * tab)
+gtr_message_table_new (GtkWidget * tab)
{
GtrMessageTable *obj =
GTR_MESSAGE_TABLE (g_object_new (GTR_TYPE_MESSAGE_TABLE, NULL));
@@ -407,7 +407,7 @@ gtranslator_message_table_new (GtkWidget * tab)
}
/**
- * gtranslator_message_table_populate:
+ * gtr_message_table_populate:
* @table: a #GtrMessageTable
* @messages: a list of #GtrMsg
*
@@ -415,7 +415,7 @@ gtranslator_message_table_new (GtkWidget * tab)
* sort them.
*/
void
-gtranslator_message_table_populate (GtrMessageTable * table,
+gtr_message_table_populate (GtrMessageTable * table,
GList * messages)
{
GtkTreeIter iter, sort_iter;
@@ -427,7 +427,7 @@ gtranslator_message_table_populate (GtrMessageTable * table,
while (messages)
{
- gtranslator_message_table_model_append (table->priv->store,
+ gtr_message_table_model_append (table->priv->store,
messages->data, &iter);
gtk_tree_model_sort_convert_child_iter_to_iter (GTK_TREE_MODEL_SORT
@@ -438,7 +438,7 @@ gtranslator_message_table_populate (GtrMessageTable * table,
row = gtk_tree_row_reference_new (table->priv->sort_model, path);
gtk_tree_path_free (path);
- gtranslator_msg_set_row_reference (GTR_MSG (messages->data), row);
+ gtr_msg_set_row_reference (GTR_MSG (messages->data), row);
messages = g_list_next (messages);
}
diff --git a/src/gtr-message-table.h b/src/gtr-message-table.h
index 01d35b4..a837c3e 100644
--- a/src/gtr-message-table.h
+++ b/src/gtr-message-table.h
@@ -28,7 +28,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_MESSAGE_TABLE (gtranslator_message_table_get_type ())
+#define GTR_TYPE_MESSAGE_TABLE (gtr_message_table_get_type ())
#define GTR_MESSAGE_TABLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_MESSAGE_TABLE, GtrMessageTable))
#define GTR_MESSAGE_TABLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_MESSAGE_TABLE, GtrMessageTableClass))
#define GTR_IS_MESSAGE_TABLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_MESSAGE_TABLE))
@@ -64,18 +64,18 @@ struct _GtrMessageTableClass
* Public methods
*/
GType
-gtranslator_message_table_get_type (void)
+gtr_message_table_get_type (void)
G_GNUC_CONST;
- GType gtranslator_message_table_register_type (GTypeModule * module);
+ GType gtr_message_table_register_type (GTypeModule * module);
- GtkWidget *gtranslator_message_table_new (GtkWidget * tab);
+ GtkWidget *gtr_message_table_new (GtkWidget * tab);
- void gtranslator_message_table_populate (GtrMessageTable * table,
+ void gtr_message_table_populate (GtrMessageTable * table,
GList * messages);
void
- gtranslator_message_table_update_translation (GtrMessageTable *
+ gtr_message_table_update_translation (GtrMessageTable *
table,
GtrMsg * msg,
gchar * translation);
diff --git a/src/gtr-msg.c b/src/gtr-msg.c
index 7f6f4cc..ca37388 100644
--- a/src/gtr-msg.c
+++ b/src/gtr-msg.c
@@ -38,7 +38,7 @@
GtrMsgPrivate))
-G_DEFINE_TYPE (GtrMsg, gtranslator_msg, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GtrMsg, gtr_msg, G_TYPE_OBJECT)
struct _GtrMsgPrivate
{
@@ -63,7 +63,7 @@ enum
static gchar *message_error = NULL;
static void
-gtranslator_msg_set_property (GObject * object,
+gtr_msg_set_property (GObject * object,
guint prop_id,
const GValue * value, GParamSpec * pspec)
{
@@ -72,10 +72,10 @@ gtranslator_msg_set_property (GObject * object,
switch (prop_id)
{
case PROP_GETTEXT_ITER:
- gtranslator_msg_set_iterator (msg, g_value_get_pointer (value));
+ gtr_msg_set_iterator (msg, g_value_get_pointer (value));
break;
case PROP_GETTEXT_MSG:
- gtranslator_msg_set_message (msg, g_value_get_pointer (value));
+ gtr_msg_set_message (msg, g_value_get_pointer (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -84,7 +84,7 @@ gtranslator_msg_set_property (GObject * object,
}
static void
-gtranslator_msg_get_property (GObject * object,
+gtr_msg_get_property (GObject * object,
guint prop_id,
GValue * value, GParamSpec * pspec)
{
@@ -93,10 +93,10 @@ gtranslator_msg_get_property (GObject * object,
switch (prop_id)
{
case PROP_GETTEXT_ITER:
- g_value_set_pointer (value, gtranslator_msg_get_iterator (msg));
+ g_value_set_pointer (value, gtr_msg_get_iterator (msg));
break;
case PROP_GETTEXT_MSG:
- g_value_set_pointer (value, gtranslator_msg_get_message (msg));
+ g_value_set_pointer (value, gtr_msg_get_message (msg));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -105,27 +105,27 @@ gtranslator_msg_get_property (GObject * object,
}
static void
-gtranslator_msg_init (GtrMsg * msg)
+gtr_msg_init (GtrMsg * msg)
{
msg->priv = GTR_MSG_GET_PRIVATE (msg);
}
static void
-gtranslator_msg_finalize (GObject * object)
+gtr_msg_finalize (GObject * object)
{
- G_OBJECT_CLASS (gtranslator_msg_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_msg_parent_class)->finalize (object);
}
static void
-gtranslator_msg_class_init (GtrMsgClass * klass)
+gtr_msg_class_init (GtrMsgClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrMsgPrivate));
- object_class->finalize = gtranslator_msg_finalize;
- object_class->set_property = gtranslator_msg_set_property;
- object_class->get_property = gtranslator_msg_get_property;
+ object_class->finalize = gtr_msg_finalize;
+ object_class->set_property = gtr_msg_set_property;
+ object_class->get_property = gtr_msg_get_property;
g_object_class_install_property (object_class,
PROP_GETTEXT_MSG,
@@ -145,14 +145,14 @@ gtranslator_msg_class_init (GtrMsgClass * klass)
/***************************** Public funcs ***********************************/
/**
- * gtranslator_msg_new:
+ * gtr_msg_new:
*
* Creates a new #GtrMsg.
*
* Return value: a new #GtrMsg object
**/
GtrMsg *
-gtranslator_msg_new (po_message_iterator_t iter, po_message_t message)
+gtr_msg_new (po_message_iterator_t iter, po_message_t message)
{
GtrMsg *msg;
@@ -160,28 +160,28 @@ gtranslator_msg_new (po_message_iterator_t iter, po_message_t message)
msg = g_object_new (GTR_TYPE_MSG, NULL);
- gtranslator_msg_set_iterator (msg, iter);
- gtranslator_msg_set_message (msg, message);
+ gtr_msg_set_iterator (msg, iter);
+ gtr_msg_set_message (msg, message);
/* Set the status */
- if (gtranslator_msg_is_fuzzy (msg))
- gtranslator_msg_set_status (msg, GTR_MSG_STATUS_FUZZY);
- else if (gtranslator_msg_is_translated (msg))
- gtranslator_msg_set_status (msg, GTR_MSG_STATUS_TRANSLATED);
+ if (gtr_msg_is_fuzzy (msg))
+ gtr_msg_set_status (msg, GTR_MSG_STATUS_FUZZY);
+ else if (gtr_msg_is_translated (msg))
+ gtr_msg_set_status (msg, GTR_MSG_STATUS_TRANSLATED);
else
- gtranslator_msg_set_status (msg, GTR_MSG_STATUS_UNTRANSLATED);
+ gtr_msg_set_status (msg, GTR_MSG_STATUS_UNTRANSLATED);
return msg;
}
/**
- * gtranslator_msg_get_iterator:
+ * gtr_msg_get_iterator:
* @msg: a #GtrMsg
*
* Return value: the message iterator in gettext format
**/
po_message_iterator_t
-gtranslator_msg_get_iterator (GtrMsg * msg)
+gtr_msg_get_iterator (GtrMsg * msg)
{
g_return_val_if_fail (GTR_IS_MSG (msg), NULL);
@@ -189,14 +189,14 @@ gtranslator_msg_get_iterator (GtrMsg * msg)
}
/**
- * gtranslator_msg_set_iterator:
+ * gtr_msg_set_iterator:
* @msg: a #GtrMsg
* @message: the po_message_iterator_t to set into the @msg
*
* Sets the iterator into the #GtrMsg class.
**/
void
-gtranslator_msg_set_iterator (GtrMsg * msg,
+gtr_msg_set_iterator (GtrMsg * msg,
po_message_iterator_t iter)
{
g_return_if_fail (GTR_IS_MSG (msg));
@@ -207,13 +207,13 @@ gtranslator_msg_set_iterator (GtrMsg * msg,
}
/**
- * gtranslator_msg_get_message:
+ * gtr_msg_get_message:
* @msg: a #GtrMsg
*
* Return value: the message in gettext format
**/
po_message_t
-gtranslator_msg_get_message (GtrMsg * msg)
+gtr_msg_get_message (GtrMsg * msg)
{
g_return_val_if_fail (GTR_IS_MSG (msg), NULL);
@@ -221,14 +221,14 @@ gtranslator_msg_get_message (GtrMsg * msg)
}
/**
- * gtranslator_msg_set_message:
+ * gtr_msg_set_message:
* @msg: a #GtrMsg
* @message: the po_message_t to set into the @msg
*
* Sets the message into the #GtrMsg class.
**/
void
-gtranslator_msg_set_message (GtrMsg * msg, po_message_t message)
+gtr_msg_set_message (GtrMsg * msg, po_message_t message)
{
g_return_if_fail (GTR_IS_MSG (msg));
g_return_if_fail (message != NULL);
@@ -239,14 +239,14 @@ gtranslator_msg_set_message (GtrMsg * msg, po_message_t message)
}
/**
- * gtranslator_msg_get_row_reference:
+ * gtr_msg_get_row_reference:
* @msg: a #GtrMsg
*
* Returns: the #GtkTreeRowReference corresponding to the message's place
* in the message table
*/
GtkTreeRowReference *
-gtranslator_msg_get_row_reference (GtrMsg * msg)
+gtr_msg_get_row_reference (GtrMsg * msg)
{
g_return_val_if_fail (GTR_IS_MSG (msg), NULL);
@@ -254,14 +254,14 @@ gtranslator_msg_get_row_reference (GtrMsg * msg)
}
/**
- * gtranslator_msg_set_row_reference:
+ * gtr_msg_set_row_reference:
* @msg: a #GtrMsg
* @tree_iter: the GtkTreeRowReference corresponding to position in the message table
*
* Sets the GtkTreeRowReference from the messages table for the given message
**/
void
-gtranslator_msg_set_row_reference (GtrMsg * msg,
+gtr_msg_set_row_reference (GtrMsg * msg,
GtkTreeRowReference * row_reference)
{
g_return_if_fail (GTR_IS_MSG (msg));
@@ -276,7 +276,7 @@ gtranslator_msg_set_row_reference (GtrMsg * msg,
* Return value: TRUE if the message is translated
**/
gboolean
-gtranslator_msg_is_translated (GtrMsg * msg)
+gtr_msg_is_translated (GtrMsg * msg)
{
g_return_val_if_fail (GTR_IS_MSG (msg), FALSE);
@@ -301,13 +301,13 @@ gtranslator_msg_is_translated (GtrMsg * msg)
}
/**
- * gtranslator_msg_is_fuzzy:
+ * gtr_msg_is_fuzzy:
* @msg: a #GtrMsg
*
* Return value: TRUE if the message is fuzzy
**/
gboolean
-gtranslator_msg_is_fuzzy (GtrMsg * msg)
+gtr_msg_is_fuzzy (GtrMsg * msg)
{
g_return_val_if_fail (GTR_IS_MSG (msg), FALSE);
@@ -316,14 +316,14 @@ gtranslator_msg_is_fuzzy (GtrMsg * msg)
/**
- * gtranslator_msg_set_fuzzy:
+ * gtr_msg_set_fuzzy:
* @msg: a #GtrMsg
* @fuzzy: the fuzzy value to set to the message
*
* Change the fuzzy mark of a message.
**/
void
-gtranslator_msg_set_fuzzy (GtrMsg * msg, gboolean fuzzy)
+gtr_msg_set_fuzzy (GtrMsg * msg, gboolean fuzzy)
{
g_return_if_fail (GTR_IS_MSG (msg));
@@ -331,14 +331,14 @@ gtranslator_msg_set_fuzzy (GtrMsg * msg, gboolean fuzzy)
}
/**
- * gtranslator_msg_set_status:
+ * gtr_msg_set_status:
* @msg: a #GtrMsg
* @status: a #GtrMsgStatus
*
* Sets the status for a message.
*/
void
-gtranslator_msg_set_status (GtrMsg * msg, GtrMsgStatus status)
+gtr_msg_set_status (GtrMsg * msg, GtrMsgStatus status)
{
g_return_if_fail (GTR_IS_MSG (msg));
@@ -346,13 +346,13 @@ gtranslator_msg_set_status (GtrMsg * msg, GtrMsgStatus status)
}
/**
- * gtranslator_msg_get_status:
+ * gtr_msg_get_status:
* @msg: a #GtrMsg
*
* Return value: the message's status.
*/
GtrMsgStatus
-gtranslator_msg_get_status (GtrMsg * msg)
+gtr_msg_get_status (GtrMsg * msg)
{
g_return_val_if_fail (GTR_IS_MSG (msg), 0);
@@ -360,13 +360,13 @@ gtranslator_msg_get_status (GtrMsg * msg)
}
/**
- * gtranslator_msg_get_msgid:
+ * gtr_msg_get_msgid:
* @msg: a #GtrMsg
*
* Return value: the msgid (untranslated English string) of a message.
**/
const gchar *
-gtranslator_msg_get_msgid (GtrMsg * msg)
+gtr_msg_get_msgid (GtrMsg * msg)
{
g_return_val_if_fail (GTR_IS_MSG (msg), NULL);
@@ -375,28 +375,28 @@ gtranslator_msg_get_msgid (GtrMsg * msg)
/**
- * gtranslator_msg_get_msgid_plural:
+ * gtr_msg_get_msgid_plural:
* @msg: a #GtrMsg
*
* Return value: the msgid_plural (untranslated English plural string) of a
* message, or NULL for a message without plural.
**/
const gchar *
-gtranslator_msg_get_msgid_plural (GtrMsg * msg)
+gtr_msg_get_msgid_plural (GtrMsg * msg)
{
return po_message_msgid_plural (msg->priv->message);
}
/**
- * gtranslator_msg_get_msgstr:
+ * gtr_msg_get_msgstr:
* @msg: a #GtrMsg
*
* Return value: the msgstr (translation) of a message.
* Return the empty string for an untranslated message.
**/
const gchar *
-gtranslator_msg_get_msgstr (GtrMsg * msg)
+gtr_msg_get_msgstr (GtrMsg * msg)
{
g_return_val_if_fail (GTR_IS_MSG (msg), NULL);
@@ -405,7 +405,7 @@ gtranslator_msg_get_msgstr (GtrMsg * msg)
/**
- * gtranslator_msg_set_msgstr:
+ * gtr_msg_set_msgstr:
* @msg: a #GtrMsg
* @msgstr: the string to set in the @msg
*
@@ -413,7 +413,7 @@ gtranslator_msg_get_msgstr (GtrMsg * msg)
* Use an empty string to denote an untranslated message.
**/
void
-gtranslator_msg_set_msgstr (GtrMsg * msg, const gchar * msgstr)
+gtr_msg_set_msgstr (GtrMsg * msg, const gchar * msgstr)
{
g_return_if_fail (GTR_IS_MSG (msg));
g_return_if_fail (msgstr != NULL);
@@ -423,7 +423,7 @@ gtranslator_msg_set_msgstr (GtrMsg * msg, const gchar * msgstr)
/**
- * gtranslator_msg_get_msgstr_plural:
+ * gtr_msg_get_msgstr_plural:
* @msg: a #GtrMsg
* @index: the index of the plural array
*
@@ -431,7 +431,7 @@ gtranslator_msg_set_msgstr (GtrMsg * msg, const gchar * msgstr)
* NULL when the index is out of range or for a message without plural.
**/
const gchar *
-gtranslator_msg_get_msgstr_plural (GtrMsg * msg, gint index)
+gtr_msg_get_msgstr_plural (GtrMsg * msg, gint index)
{
g_return_val_if_fail (GTR_IS_MSG (msg), NULL);
@@ -439,7 +439,7 @@ gtranslator_msg_get_msgstr_plural (GtrMsg * msg, gint index)
}
/**
- * gtranslator_msg_set_msgstr_plural:
+ * gtr_msg_set_msgstr_plural:
* @msg: a #GtrMsg
* @index: the index where to set the msgstr
* @msgstr: the message to set in the msg
@@ -448,7 +448,7 @@ gtranslator_msg_get_msgstr_plural (GtrMsg * msg, gint index)
* Use a NULL value at the end to reduce the number of plural forms.
**/
void
-gtranslator_msg_set_msgstr_plural (GtrMsg * msg,
+gtr_msg_set_msgstr_plural (GtrMsg * msg,
gint index, const gchar * msgstr)
{
g_return_if_fail (GTR_IS_MSG (msg));
@@ -459,13 +459,13 @@ gtranslator_msg_set_msgstr_plural (GtrMsg * msg,
/**
- * gtranslator_msg_get_comment:
+ * gtr_msg_get_comment:
* @msg: a #GtrMsg
*
* Return value: the comments for a message.
**/
const gchar *
-gtranslator_msg_get_comment (GtrMsg * msg)
+gtr_msg_get_comment (GtrMsg * msg)
{
g_return_val_if_fail (GTR_IS_MSG (msg), NULL);
@@ -473,7 +473,7 @@ gtranslator_msg_get_comment (GtrMsg * msg)
}
/**
- * gtranslator_msg_set_comment:
+ * gtr_msg_set_comment:
* @msg: a #GtrMsg
* @comment: the comment to set for a message
*
@@ -482,7 +482,7 @@ gtranslator_msg_get_comment (GtrMsg * msg)
* ending in a newline, or empty.
**/
void
-gtranslator_msg_set_comment (GtrMsg * msg, const gchar * comment)
+gtr_msg_set_comment (GtrMsg * msg, const gchar * comment)
{
g_return_if_fail (GTR_IS_MSG (msg));
g_return_if_fail (comment != NULL);
@@ -491,7 +491,7 @@ gtranslator_msg_set_comment (GtrMsg * msg, const gchar * comment)
}
/**
- * gtranslator_msg_get_po_position:
+ * gtr_msg_get_po_position:
* @msg: a #GtrMsg
*
* Return value: the position of the message.
@@ -500,7 +500,7 @@ gtranslator_msg_set_comment (GtrMsg * msg, const gchar * comment)
* messages.
**/
gint
-gtranslator_msg_get_po_position (GtrMsg * msg)
+gtr_msg_get_po_position (GtrMsg * msg)
{
g_return_val_if_fail (GTR_IS_MSG (msg), 0);
@@ -508,14 +508,14 @@ gtranslator_msg_get_po_position (GtrMsg * msg)
}
/**
- * gtranslator_msg_set_po_position:
+ * gtr_msg_set_po_position:
* @msg: a #GtrMsg
* @po_position: the numerical position of the message.
*
* Sets the numerical position of this message in relation to other messages.
**/
void
-gtranslator_msg_set_po_position (GtrMsg * msg, gint po_position)
+gtr_msg_set_po_position (GtrMsg * msg, gint po_position)
{
g_return_if_fail (GTR_IS_MSG (msg));
@@ -523,13 +523,13 @@ gtranslator_msg_set_po_position (GtrMsg * msg, gint po_position)
}
/**
- * gtranslator_msg_get_extracted_comments:
+ * gtr_msg_get_extracted_comments:
* @msg: a #GtrMsg
*
* Return value: the extracted comments for a message.
**/
const gchar *
-gtranslator_msg_get_extracted_comments (GtrMsg * msg)
+gtr_msg_get_extracted_comments (GtrMsg * msg)
{
g_return_val_if_fail (GTR_IS_MSG (msg), NULL);
@@ -537,7 +537,7 @@ gtranslator_msg_get_extracted_comments (GtrMsg * msg)
}
/**
- * gtranslator_msg_get_filename:
+ * gtr_msg_get_filename:
* @msg: a #GtrMsg
* @i: the i-th file for a message.
*
@@ -545,7 +545,7 @@ gtranslator_msg_get_extracted_comments (GtrMsg * msg)
* of range.
*/
const gchar *
-gtranslator_msg_get_filename (GtrMsg * msg, gint i)
+gtr_msg_get_filename (GtrMsg * msg, gint i)
{
g_return_val_if_fail (GTR_IS_MSG (msg), NULL);
@@ -560,7 +560,7 @@ gtranslator_msg_get_filename (GtrMsg * msg, gint i)
}
/**
- * gtranslator_msg_get_file_line:
+ * gtr_msg_get_file_line:
* @msg: a #GtrMsg
* @i: the i-th file for a message.
*
@@ -568,7 +568,7 @@ gtranslator_msg_get_filename (GtrMsg * msg, gint i)
* of range.
*/
gint *
-gtranslator_msg_get_file_line (GtrMsg * msg, gint i)
+gtr_msg_get_file_line (GtrMsg * msg, gint i)
{
g_return_val_if_fail (GTR_IS_MSG (msg), (gint *)0);
@@ -583,14 +583,14 @@ gtranslator_msg_get_file_line (GtrMsg * msg, gint i)
}
/**
- * gtranslator_msg_get_msgctxt:
+ * gtr_msg_get_msgctxt:
* @msg: a #GtrMsg
*
* Return value: the context of a message, or NULL for a
* message not restricted to a context.
*/
const gchar *
-gtranslator_msg_get_msgctxt (GtrMsg * msg)
+gtr_msg_get_msgctxt (GtrMsg * msg)
{
g_return_val_if_fail (GTR_IS_MSG (msg), NULL);
@@ -598,7 +598,7 @@ gtranslator_msg_get_msgctxt (GtrMsg * msg)
}
/**
- * gtranslator_msg_get_format:
+ * gtr_msg_get_format:
* @msg: a #GtrMsg
*
* Return the pretty name associated with a format type.
@@ -609,7 +609,7 @@ gtranslator_msg_get_msgctxt (GtrMsg * msg)
* if the message hasn't any format type.
*/
const gchar *
-gtranslator_msg_get_format (GtrMsg * msg)
+gtr_msg_get_format (GtrMsg * msg)
{
const gchar *const *format_list;
gint i;
@@ -657,7 +657,7 @@ on_gettext_po_xerror2 (gint severity,
/**
- * gtranslator_msg_check:
+ * gtr_msg_check:
* @msg: a #GtrMsg
*
* Return value: the message error or NULL if there is not any error. Must be
@@ -667,7 +667,7 @@ on_gettext_po_xerror2 (gint severity,
* is marked as being a format string.
**/
gchar *
-gtranslator_msg_check (GtrMsg * msg)
+gtr_msg_check (GtrMsg * msg)
{
struct po_xerror_handler handler;
@@ -683,7 +683,7 @@ gtranslator_msg_check (GtrMsg * msg)
po_message_check_all (msg->priv->message, msg->priv->iterator, &handler);
- if (gtranslator_msg_is_fuzzy (msg) || !gtranslator_msg_is_translated (msg))
+ if (gtr_msg_is_fuzzy (msg) || !gtr_msg_is_translated (msg))
{
if (message_error)
g_free (message_error);
diff --git a/src/gtr-msg.h b/src/gtr-msg.h
index 826ae58..6865990 100644
--- a/src/gtr-msg.h
+++ b/src/gtr-msg.h
@@ -32,7 +32,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_MSG (gtranslator_msg_get_type ())
+#define GTR_TYPE_MSG (gtr_msg_get_type ())
#define GTR_MSG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_MSG, GtrMsg))
#define GTR_MSG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_MSG, GtrMsgClass))
#define GTR_IS_MSG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_MSG))
@@ -75,81 +75,81 @@ typedef enum
* Public methods
*/
GType
-gtranslator_msg_get_type (void)
+gtr_msg_get_type (void)
G_GNUC_CONST;
- GType gtranslator_msg_register_type (GTypeModule * module);
+ GType gtr_msg_register_type (GTypeModule * module);
- GtrMsg *gtranslator_msg_new (po_message_iterator_t iter,
+ GtrMsg *gtr_msg_new (po_message_iterator_t iter,
po_message_t message);
po_message_iterator_t
-gtranslator_msg_get_iterator (GtrMsg * msg);
+gtr_msg_get_iterator (GtrMsg * msg);
- void gtranslator_msg_set_iterator (GtrMsg * msg,
+ void gtr_msg_set_iterator (GtrMsg * msg,
po_message_iterator_t iter);
- po_message_t gtranslator_msg_get_message (GtrMsg * msg);
+ po_message_t gtr_msg_get_message (GtrMsg * msg);
- void gtranslator_msg_set_message (GtrMsg * msg,
+ void gtr_msg_set_message (GtrMsg * msg,
po_message_t message);
- GtkTreeRowReference *gtranslator_msg_get_row_reference (GtrMsg *
+ GtkTreeRowReference *gtr_msg_get_row_reference (GtrMsg *
msg);
- void gtranslator_msg_set_row_reference (GtrMsg * msg,
+ void gtr_msg_set_row_reference (GtrMsg * msg,
GtkTreeRowReference *
row_reference);
- gboolean gtranslator_msg_is_translated (GtrMsg * msg);
+ gboolean gtr_msg_is_translated (GtrMsg * msg);
- gboolean gtranslator_msg_is_fuzzy (GtrMsg * msg);
+ gboolean gtr_msg_is_fuzzy (GtrMsg * msg);
- void gtranslator_msg_set_fuzzy (GtrMsg * msg, gboolean fuzzy);
+ void gtr_msg_set_fuzzy (GtrMsg * msg, gboolean fuzzy);
- void gtranslator_msg_set_status (GtrMsg * msg,
+ void gtr_msg_set_status (GtrMsg * msg,
GtrMsgStatus status);
- GtrMsgStatus gtranslator_msg_get_status (GtrMsg * msg);
+ GtrMsgStatus gtr_msg_get_status (GtrMsg * msg);
- const gchar *gtranslator_msg_get_msgid (GtrMsg * msg);
+ const gchar *gtr_msg_get_msgid (GtrMsg * msg);
- const gchar *gtranslator_msg_get_msgid_plural (GtrMsg * msg);
+ const gchar *gtr_msg_get_msgid_plural (GtrMsg * msg);
- const gchar *gtranslator_msg_get_msgstr (GtrMsg * msg);
+ const gchar *gtr_msg_get_msgstr (GtrMsg * msg);
- void gtranslator_msg_set_msgstr (GtrMsg * msg,
+ void gtr_msg_set_msgstr (GtrMsg * msg,
const gchar * msgstr);
- const gchar *gtranslator_msg_get_msgstr_plural (GtrMsg * msg,
+ const gchar *gtr_msg_get_msgstr_plural (GtrMsg * msg,
gint index);
- void gtranslator_msg_set_msgstr_plural (GtrMsg * msg,
+ void gtr_msg_set_msgstr_plural (GtrMsg * msg,
gint index,
const gchar * msgstr);
- const gchar *gtranslator_msg_get_comment (GtrMsg * msg);
+ const gchar *gtr_msg_get_comment (GtrMsg * msg);
- void gtranslator_msg_set_comment (GtrMsg * msg,
+ void gtr_msg_set_comment (GtrMsg * msg,
const gchar * comment);
- gint gtranslator_msg_get_po_position (GtrMsg * msg);
+ gint gtr_msg_get_po_position (GtrMsg * msg);
- void gtranslator_msg_set_po_position (GtrMsg * msg,
+ void gtr_msg_set_po_position (GtrMsg * msg,
gint po_position);
- const gchar *gtranslator_msg_get_extracted_comments
+ const gchar *gtr_msg_get_extracted_comments
(GtrMsg * msg);
- const gchar *gtranslator_msg_get_filename (GtrMsg * msg, gint i);
+ const gchar *gtr_msg_get_filename (GtrMsg * msg, gint i);
- gint *gtranslator_msg_get_file_line (GtrMsg * msg, gint i);
+ gint *gtr_msg_get_file_line (GtrMsg * msg, gint i);
- const gchar *gtranslator_msg_get_msgctxt (GtrMsg * msg);
+ const gchar *gtr_msg_get_msgctxt (GtrMsg * msg);
- const gchar *gtranslator_msg_get_format (GtrMsg * msg);
+ const gchar *gtr_msg_get_format (GtrMsg * msg);
- gchar *gtranslator_msg_check (GtrMsg * msg);
+ gchar *gtr_msg_check (GtrMsg * msg);
G_END_DECLS
#endif /* __MSG_H__ */
diff --git a/src/gtr-notebook.c b/src/gtr-notebook.c
index 17661ff..4df3abd 100644
--- a/src/gtr-notebook.c
+++ b/src/gtr-notebook.c
@@ -33,7 +33,7 @@
GTR_TYPE_NOTEBOOK, \
GtrNotebookPrivate))
-G_DEFINE_TYPE (GtrNotebook, gtranslator_notebook, GTK_TYPE_NOTEBOOK)
+G_DEFINE_TYPE (GtrNotebook, gtr_notebook, GTK_TYPE_NOTEBOOK)
struct _GtrNotebookPrivate
{
GList *pages;
@@ -76,14 +76,14 @@ sync_name (GtrPo * po, GParamSpec * pspec, GtkWidget * hbox)
label = GTK_WIDGET (g_object_get_data (G_OBJECT (hbox), "label"));
ebox = GTK_WIDGET (g_object_get_data (G_OBJECT (hbox), "label-ebox"));
- tab = gtranslator_tab_get_from_document (po);
+ tab = gtr_tab_get_from_document (po);
- str = gtranslator_tab_get_name (tab);
+ str = gtr_tab_get_name (tab);
g_return_if_fail (str != NULL);
gtk_label_set_text (GTK_LABEL (label), str);
- location = gtranslator_po_get_location (po);
+ location = gtr_po_get_location (po);
path = g_file_get_path (location);
g_object_unref (location);
@@ -180,7 +180,7 @@ build_tab_label (GtrNotebook * nb, GtrTab * tab)
}
static void
-gtranslator_notebook_init (GtrNotebook * notebook)
+gtr_notebook_init (GtrNotebook * notebook)
{
notebook->priv = GTR_NOTEBOOK_GET_PRIVATE (notebook);
GtrNotebookPrivate *priv = notebook->priv;
@@ -189,24 +189,24 @@ gtranslator_notebook_init (GtrNotebook * notebook)
}
static void
-gtranslator_notebook_finalize (GObject * object)
+gtr_notebook_finalize (GObject * object)
{
GtrNotebook *notebook = GTR_NOTEBOOK (object);
if (notebook->priv->pages)
g_list_free (notebook->priv->pages);
- G_OBJECT_CLASS (gtranslator_notebook_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_notebook_parent_class)->finalize (object);
}
static void
-gtranslator_notebook_class_init (GtrNotebookClass * klass)
+gtr_notebook_class_init (GtrNotebookClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrNotebookPrivate));
- object_class->finalize = gtranslator_notebook_finalize;
+ object_class->finalize = gtr_notebook_finalize;
signals[TAB_CLOSE_REQUEST] =
g_signal_new ("tab-close-request",
@@ -221,27 +221,27 @@ gtranslator_notebook_class_init (GtrNotebookClass * klass)
/***************************** Public funcs ***********************************/
/**
- * gtranslator_notebook_new:
+ * gtr_notebook_new:
*
* Creates a new #GtrNotebook.
*
* Returns: a new #GtrNotebook object
*/
GtkWidget *
-gtranslator_notebook_new ()
+gtr_notebook_new ()
{
return GTK_WIDGET (g_object_new (GTR_TYPE_NOTEBOOK, NULL));
}
/**
- * gtranslator_notebook_add_page:
+ * gtr_notebook_add_page:
* @notebook: a #GtrNotebook
* @tab: a #GtrTab
*
* Adds a new #GtrTab to @notebook.
*/
void
-gtranslator_notebook_add_page (GtrNotebook * notebook,
+gtr_notebook_add_page (GtrNotebook * notebook,
GtrTab * tab)
{
GtrNotebookPrivate *priv = notebook->priv;
@@ -251,7 +251,7 @@ gtranslator_notebook_add_page (GtrNotebook * notebook,
g_return_if_fail (GTR_IS_NOTEBOOK (notebook));
g_return_if_fail (GTR_IS_TAB (tab));
- po = gtranslator_tab_get_po (tab);
+ po = gtr_tab_get_po (tab);
label = build_tab_label (notebook, tab);
@@ -270,14 +270,14 @@ gtranslator_notebook_add_page (GtrNotebook * notebook,
}
/**
- * gtranslator_notebook_remove_page:
+ * gtr_notebook_remove_page:
* @notebook: a #GtrNotebook
* @page_num: the index of a notebook page, starting from 0.
*
* Removes a page from the notebook given its index in the notebook.
*/
void
-gtranslator_notebook_remove_page (GtrNotebook * notebook,
+gtr_notebook_remove_page (GtrNotebook * notebook,
gint page_num)
{
GtkWidget *tab;
@@ -296,7 +296,7 @@ gtranslator_notebook_remove_page (GtrNotebook * notebook,
}
/**
- * gtranslator_notebook_get_page:
+ * gtr_notebook_get_page:
* @notebook: a #GtrNotebook
*
* Gets the selected page in the #GtrNotebook.
@@ -304,7 +304,7 @@ gtranslator_notebook_remove_page (GtrNotebook * notebook,
* Returns: the selected page in the @notebook
*/
GtrTab *
-gtranslator_notebook_get_page (GtrNotebook * notebook)
+gtr_notebook_get_page (GtrNotebook * notebook)
{
gint num;
diff --git a/src/gtr-notebook.h b/src/gtr-notebook.h
index 182dc30..2a09606 100644
--- a/src/gtr-notebook.h
+++ b/src/gtr-notebook.h
@@ -29,7 +29,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_NOTEBOOK (gtranslator_notebook_get_type ())
+#define GTR_TYPE_NOTEBOOK (gtr_notebook_get_type ())
#define GTR_NOTEBOOK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_NOTEBOOK, GtrNotebook))
#define GTR_NOTEBOOK_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_NOTEBOOK, GtrNotebookClass))
#define GTR_IS_NOTEBOOK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_NOTEBOOK))
@@ -68,20 +68,20 @@ struct _GtrNotebookClass
* Public methods
*/
GType
-gtranslator_notebook_get_type (void)
+gtr_notebook_get_type (void)
G_GNUC_CONST;
- GType gtranslator_notebook_register_type (GTypeModule * module);
+ GType gtr_notebook_register_type (GTypeModule * module);
- GtkWidget *gtranslator_notebook_new (void);
+ GtkWidget *gtr_notebook_new (void);
- void gtranslator_notebook_add_page (GtrNotebook * notebook,
+ void gtr_notebook_add_page (GtrNotebook * notebook,
GtrTab * pax);
- void gtranslator_notebook_remove_page (GtrNotebook * notebook,
+ void gtr_notebook_remove_page (GtrNotebook * notebook,
gint i);
- GtrTab *gtranslator_notebook_get_page (GtrNotebook *
+ GtrTab *gtr_notebook_get_page (GtrNotebook *
notebook);
G_END_DECLS
diff --git a/src/gtr-po.c b/src/gtr-po.c
index 173f9a0..651f88b 100644
--- a/src/gtr-po.c
+++ b/src/gtr-po.c
@@ -57,7 +57,7 @@
GtrPoPrivate))
-G_DEFINE_TYPE (GtrPo, gtranslator_po, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GtrPo, gtr_po, G_TYPE_OBJECT)
struct _GtrPoPrivate
{
@@ -111,7 +111,7 @@ enum
static gchar *message_error = NULL;
static void
-gtranslator_po_get_property (GObject * object,
+gtr_po_get_property (GObject * object,
guint prop_id,
GValue * value,
GParamSpec * pspec)
@@ -121,7 +121,7 @@ gtranslator_po_get_property (GObject * object,
switch (prop_id)
{
case PROP_STATE:
- g_value_set_enum (value, gtranslator_po_get_state (po));
+ g_value_set_enum (value, gtr_po_get_state (po));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -136,9 +136,9 @@ gtranslator_po_get_property (GObject * object,
static void
determine_translation_status (GtrMsg * msg, GtrPo * po)
{
- if (gtranslator_msg_is_fuzzy (msg))
+ if (gtr_msg_is_fuzzy (msg))
po->priv->fuzzy++;
- else if (gtranslator_msg_is_translated (msg))
+ else if (gtr_msg_is_translated (msg))
po->priv->translated++;
}
@@ -146,7 +146,7 @@ determine_translation_status (GtrMsg * msg, GtrPo * po)
* Update the count of the completed translated entries.
*/
static void
-gtranslator_po_update_translated_count (GtrPo * po)
+gtr_po_update_translated_count (GtrPo * po)
{
po->priv->translated = 0;
po->priv->fuzzy = 0;
@@ -155,7 +155,7 @@ gtranslator_po_update_translated_count (GtrPo * po)
}
static void
-gtranslator_po_init (GtrPo * po)
+gtr_po_init (GtrPo * po)
{
po->priv = GTR_PO_GET_PRIVATE (po);
@@ -164,7 +164,7 @@ gtranslator_po_init (GtrPo * po)
}
static void
-gtranslator_po_finalize (GObject * object)
+gtr_po_finalize (GObject * object)
{
GtrPo *po = GTR_PO (object);
@@ -184,11 +184,11 @@ gtranslator_po_finalize (GObject * object)
if (po->priv->gettext_po_file)
po_file_free (po->priv->gettext_po_file);
- G_OBJECT_CLASS (gtranslator_po_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_po_parent_class)->finalize (object);
}
static void
-gtranslator_po_dispose (GObject * object)
+gtr_po_dispose (GObject * object)
{
GtrPo *po = GTR_PO (object);
@@ -198,19 +198,19 @@ gtranslator_po_dispose (GObject * object)
po->priv->location = NULL;
}
- G_OBJECT_CLASS (gtranslator_po_parent_class)->dispose (object);
+ G_OBJECT_CLASS (gtr_po_parent_class)->dispose (object);
}
static void
-gtranslator_po_class_init (GtrPoClass * klass)
+gtr_po_class_init (GtrPoClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrPoPrivate));
- object_class->finalize = gtranslator_po_finalize;
- object_class->dispose = gtranslator_po_dispose;
- object_class->get_property = gtranslator_po_get_property;
+ object_class->finalize = gtr_po_finalize;
+ object_class->dispose = gtr_po_dispose;
+ object_class->get_property = gtr_po_get_property;
g_object_class_install_property (object_class,
PROP_STATE,
@@ -226,11 +226,11 @@ gtranslator_po_class_init (GtrPoClass * klass)
* Functions for errors handling.
*/
GQuark
-gtranslator_po_error_quark (void)
+gtr_po_error_quark (void)
{
static GQuark quark = 0;
if (!quark)
- quark = g_quark_from_static_string ("gtranslator_po_parser_error");
+ quark = g_quark_from_static_string ("gtr_po_parser_error");
return quark;
}
@@ -321,14 +321,14 @@ is_read_only (const gchar *filename)
/***************************** Public funcs ***********************************/
/**
- * gtranslator_po_new:
+ * gtr_po_new:
*
* Creates a new #GtrPo.
*
* Returns: a new #GtrPo object
**/
GtrPo *
-gtranslator_po_new (void)
+gtr_po_new (void)
{
GtrPo *po;
@@ -338,7 +338,7 @@ gtranslator_po_new (void)
}
/**
- * gtranslator_po_parse:
+ * gtr_po_parse:
* @po: a #GtrPo
* @location: the file to open
* @error: a variable to store the errors
@@ -347,7 +347,7 @@ gtranslator_po_new (void)
* variables.
**/
void
-gtranslator_po_parse (GtrPo * po, GFile * location, GError ** error)
+gtr_po_parse (GtrPo * po, GFile * location, GError ** error)
{
GtrPoPrivate *priv = po->priv;
gchar *filename;
@@ -450,7 +450,7 @@ gtranslator_po_parse (GtrPo * po, GFile * location, GError ** error)
message = po_next_message (iter);
msgstr = po_message_msgstr (message);
if (!strncmp (msgstr, "Project-Id-Version: ", 20))
- priv->header = gtranslator_header_new (iter, message);
+ priv->header = gtr_header_new (iter, message);
else
/* FIXME: add a header with default values */
iter = po_message_iterator (priv->gettext_po_file, NULL);
@@ -459,16 +459,16 @@ gtranslator_po_parse (GtrPo * po, GFile * location, GError ** error)
while ((message = po_next_message (iter)))
{
/*FIXME: We have to change this:
- * we have to add a gtranslator_msg_is_obsolete fund msg.c
+ * we have to add a gtr_msg_is_obsolete fund msg.c
* and detect if we want obsoletes messages in show message
*/
if (!po_message_is_obsolete (message))
{
/* Unpack into a GtrMsg */
- msg = gtranslator_msg_new (iter, message);
+ msg = gtr_msg_new (iter, message);
/* Set position in PO file */
- gtranslator_msg_set_po_position (msg, pos++);
+ gtr_msg_set_po_position (msg, pos++);
/* Build up messages */
priv->messages = g_list_prepend (priv->messages, msg);
@@ -494,14 +494,14 @@ gtranslator_po_parse (GtrPo * po, GFile * location, GError ** error)
*/
priv->current = g_list_first (priv->messages);
- gtranslator_po_update_translated_count (po);
+ gtr_po_update_translated_count (po);
/* Initialize Tab state */
po->priv->state = GTR_PO_STATE_SAVED;
}
/**
- * gtranslator_po_save_file:
+ * gtr_po_save_file:
* @po: a #GtrPo
* @error: a GError to manage the exceptions
*
@@ -509,7 +509,7 @@ gtranslator_po_parse (GtrPo * po, GFile * location, GError ** error)
* in @error.
**/
void
-gtranslator_po_save_file (GtrPo * po, GError ** error)
+gtr_po_save_file (GtrPo * po, GError ** error)
{
struct po_xerror_handler handler;
gchar *msg_error;
@@ -554,7 +554,7 @@ gtranslator_po_save_file (GtrPo * po, GError ** error)
/*
* Check if the file is right
*/
- /*msg_error = gtranslator_po_check_po_file (po);
+ /*msg_error = gtr_po_check_po_file (po);
if (msg_error != NULL)
{
g_set_error (error,
@@ -567,10 +567,10 @@ gtranslator_po_save_file (GtrPo * po, GError ** error)
/* Save header fields into msg */
- header = gtranslator_po_get_header (po);
- gtranslator_header_update_header (header);
+ header = gtr_po_get_header (po);
+ gtr_header_update_header (header);
- if (!po_file_write (gtranslator_po_get_po_file (po), filename, &handler))
+ if (!po_file_write (gtr_po_get_po_file (po), filename, &handler))
{
g_set_error (error,
GTR_PO_ERROR,
@@ -584,12 +584,12 @@ gtranslator_po_save_file (GtrPo * po, GError ** error)
g_free (filename);
/* If we are here everything is ok and we can set the state as saved */
- gtranslator_po_set_state (po, GTR_PO_STATE_SAVED);
+ gtr_po_set_state (po, GTR_PO_STATE_SAVED);
/*
* If the warn if fuzzy option is enabled we have to show an error
*/
- /*if (gtranslator_prefs_manager_get_warn_if_fuzzy () && po->priv->fuzzy)
+ /*if (gtr_prefs_manager_get_warn_if_fuzzy () && po->priv->fuzzy)
{
g_set_error (error,
GTR_PO_ERROR,
@@ -602,7 +602,7 @@ gtranslator_po_save_file (GtrPo * po, GError ** error)
}
/**
- * gtranslator_po_get_filename:
+ * gtr_po_get_filename:
* @po: a #GtrPo
*
* Gets the GFile of the po file.
@@ -611,7 +611,7 @@ gtranslator_po_save_file (GtrPo * po, GError ** error)
* with g_object_unref.
**/
GFile *
-gtranslator_po_get_location (GtrPo * po)
+gtr_po_get_location (GtrPo * po)
{
g_return_val_if_fail (GTR_IS_PO (po), NULL);
@@ -619,14 +619,14 @@ gtranslator_po_get_location (GtrPo * po)
}
/**
- * gtranslator_po_set_location:
+ * gtr_po_set_location:
* @po: a #GtrPo
* @location: The GFile to set to the #GtrPo
*
* Sets the GFile location within the #GtrPo object.
**/
void
-gtranslator_po_set_location (GtrPo * po, GFile * location)
+gtr_po_set_location (GtrPo * po, GFile * location)
{
g_return_if_fail (GTR_IS_PO (po));
@@ -637,26 +637,26 @@ gtranslator_po_set_location (GtrPo * po, GFile * location)
}
/**
- * gtranslator_po_get_state:
+ * gtr_po_get_state:
* @po: a #GtrPo
*
* Return value: the #GtrPoState value of the @po.
*/
GtrPoState
-gtranslator_po_get_state (GtrPo * po)
+gtr_po_get_state (GtrPo * po)
{
return po->priv->state;
}
/**
- * gtranslator_po_set_state:
+ * gtr_po_set_state:
* @po: a #GtrPo
* @state: a #GtrPoState
*
* Sets the state for a #GtrPo
*/
void
-gtranslator_po_set_state (GtrPo * po, GtrPoState state)
+gtr_po_set_state (GtrPo * po, GtrPoState state)
{
po->priv->state = state;
@@ -667,51 +667,51 @@ gtranslator_po_set_state (GtrPo * po, GtrPoState state)
* FIXME: We are not using this func.
*/
gboolean
-gtranslator_po_get_write_perms (GtrPo * po)
+gtr_po_get_write_perms (GtrPo * po)
{
return po->priv->no_write_perms;
}
/**
- * gtranslator_po_get_messages:
+ * gtr_po_get_messages:
* @po: a #GtrPo
*
* Return value: a pointer to the messages list
**/
GList *
-gtranslator_po_get_messages (GtrPo * po)
+gtr_po_get_messages (GtrPo * po)
{
return po->priv->messages;
}
/**
- * gtranslator_po_set_messages:
+ * gtr_po_set_messages:
* @po: a #GtrPo
* @messages: a pointer to a new messages list.
*
* Sets an updated list of messages.
**/
void
-gtranslator_po_set_messages (GtrPo * po, GList * messages)
+gtr_po_set_messages (GtrPo * po, GList * messages)
{
po->priv->messages = messages;
}
/**
- * gtranslator_po_get_current_message:
+ * gtr_po_get_current_message:
* @po: a #GtrPo
*
* Return value: a pointer to the current message
**/
GList *
-gtranslator_po_get_current_message (GtrPo * po)
+gtr_po_get_current_message (GtrPo * po)
{
return po->priv->current;
}
/**
- * gtranslator_po_update_current_message:
+ * gtr_po_update_current_message:
* @po: a #GtrPo
* @msg: the message where should point the current message.
*
@@ -719,7 +719,7 @@ gtranslator_po_get_current_message (GtrPo * po)
* the argument.
**/
void
-gtranslator_po_update_current_message (GtrPo * po,
+gtr_po_update_current_message (GtrPo * po,
GtrMsg * msg)
{
gint i;
@@ -728,44 +728,44 @@ gtranslator_po_update_current_message (GtrPo * po,
}
/**
- * gtranslator_po_get_domains:
+ * gtr_po_get_domains:
* @po: a #GtrPo
*
* Return value: a pointer to the domains list
**/
GList *
-gtranslator_po_get_domains (GtrPo * po)
+gtr_po_get_domains (GtrPo * po)
{
return po->priv->domains;
}
/**
- * gtranslator_po_get_po_file:
+ * gtr_po_get_po_file:
* @po: a #GtrPo
*
* Return value: the gettext file
**/
po_file_t
-gtranslator_po_get_po_file (GtrPo * po)
+gtr_po_get_po_file (GtrPo * po)
{
return po->priv->gettext_po_file;
}
/**
- * gtranslator_po_get_next_fuzzy:
+ * gtr_po_get_next_fuzzy:
* @po: a #GtrPo
*
* Return value: a pointer to the next fuzzy message
**/
GList *
-gtranslator_po_get_next_fuzzy (GtrPo * po)
+gtr_po_get_next_fuzzy (GtrPo * po)
{
GList *msg;
msg = po->priv->current;
while (msg = g_list_next (msg))
{
- if (gtranslator_msg_is_fuzzy (msg->data))
+ if (gtr_msg_is_fuzzy (msg->data))
return msg;
}
@@ -774,20 +774,20 @@ gtranslator_po_get_next_fuzzy (GtrPo * po)
/**
- * gtranslator_po_get_prev_fuzzy:
+ * gtr_po_get_prev_fuzzy:
* @po: a #GtrPo
*
* Return value: a pointer to the previously fuzzy message
**/
GList *
-gtranslator_po_get_prev_fuzzy (GtrPo * po)
+gtr_po_get_prev_fuzzy (GtrPo * po)
{
GList *msg;
msg = po->priv->current;
while (msg = g_list_previous (msg))
{
- if (gtranslator_msg_is_fuzzy (msg->data))
+ if (gtr_msg_is_fuzzy (msg->data))
return msg;
}
@@ -796,20 +796,20 @@ gtranslator_po_get_prev_fuzzy (GtrPo * po)
/**
- * gtranslator_po_get_next_untrans:
+ * gtr_po_get_next_untrans:
* @po: a #GtrPo
*
* Return value: a pointer to the next untranslated message
**/
GList *
-gtranslator_po_get_next_untrans (GtrPo * po)
+gtr_po_get_next_untrans (GtrPo * po)
{
GList *msg;
msg = po->priv->current;
while (msg = g_list_next (msg))
{
- if (!gtranslator_msg_is_translated (msg->data))
+ if (!gtr_msg_is_translated (msg->data))
return msg;
}
@@ -818,21 +818,21 @@ gtranslator_po_get_next_untrans (GtrPo * po)
/**
- * gtranslator_po_get_prev_untrans:
+ * gtr_po_get_prev_untrans:
* @po: a #GtrPo
*
* Return value: a pointer to the previously untranslated message
* or NULL if there are not previously untranslated message.
**/
GList *
-gtranslator_po_get_prev_untrans (GtrPo * po)
+gtr_po_get_prev_untrans (GtrPo * po)
{
GList *msg;
msg = po->priv->current;
while (msg = g_list_previous (msg))
{
- if (!gtranslator_msg_is_translated (msg->data))
+ if (!gtr_msg_is_translated (msg->data))
return msg;
}
@@ -840,22 +840,22 @@ gtranslator_po_get_prev_untrans (GtrPo * po)
}
/**
- * gtranslator_po_get_next_fuzzy_or_untrans:
+ * gtr_po_get_next_fuzzy_or_untrans:
* @po: a #GtrPo
*
* Return value: a pointer to the next fuzzy or untranslated message
* or NULL if there is not next fuzzy or untranslated message.
**/
GList *
-gtranslator_po_get_next_fuzzy_or_untrans (GtrPo * po)
+gtr_po_get_next_fuzzy_or_untrans (GtrPo * po)
{
GList *msg;
msg = po->priv->current;
while (msg = g_list_next (msg))
{
- if (gtranslator_msg_is_fuzzy (msg->data) ||
- !gtranslator_msg_is_translated (msg->data))
+ if (gtr_msg_is_fuzzy (msg->data) ||
+ !gtr_msg_is_translated (msg->data))
return msg;
}
@@ -863,22 +863,22 @@ gtranslator_po_get_next_fuzzy_or_untrans (GtrPo * po)
}
/**
- * gtranslator_po_get_prev_fuzzy_or_untrans:
+ * gtr_po_get_prev_fuzzy_or_untrans:
* @po: a #GtrPo
*
* Return value: a pointer to the previously fuzzy or untranslated message
* or NULL if there is not previously fuzzy or untranslated message.
**/
GList *
-gtranslator_po_get_prev_fuzzy_or_untrans (GtrPo * po)
+gtr_po_get_prev_fuzzy_or_untrans (GtrPo * po)
{
GList *msg;
msg = po->priv->current;
while (msg = g_list_previous (msg))
{
- if (gtranslator_msg_is_fuzzy (msg->data) ||
- !gtranslator_msg_is_translated (msg->data))
+ if (gtr_msg_is_fuzzy (msg->data) ||
+ !gtr_msg_is_translated (msg->data))
return msg;
}
@@ -886,14 +886,14 @@ gtranslator_po_get_prev_fuzzy_or_untrans (GtrPo * po)
}
/**
- * gtranslator_po_get_msg_from_number:
+ * gtr_po_get_msg_from_number:
* @po: a #GtrPo
* @number: the message to jump
*
* Gets the message at the given position.
*/
GList *
-gtranslator_po_get_msg_from_number (GtrPo * po, gint number)
+gtr_po_get_msg_from_number (GtrPo * po, gint number)
{
g_return_val_if_fail (GTR_IS_PO (po), NULL);
@@ -901,13 +901,13 @@ gtranslator_po_get_msg_from_number (GtrPo * po, gint number)
}
/**
- * gtranslator_po_get_header:
+ * gtr_po_get_header:
* @po: a #GtrPo
*
* Return value: The #GtrHeader of the @po.
**/
GtrHeader *
-gtranslator_po_get_header (GtrPo * po)
+gtr_po_get_header (GtrPo * po)
{
g_return_val_if_fail (GTR_IS_PO (po), NULL);
@@ -915,19 +915,19 @@ gtranslator_po_get_header (GtrPo * po)
}
void
-gtranslator_po_set_header (GtrPo * po, GtrHeader * header)
+gtr_po_set_header (GtrPo * po, GtrHeader * header)
{
po->priv->header = header;
}
/**
- * gtranslator_po_get_translated_count:
+ * gtr_po_get_translated_count:
* @po: a #GtrPo
*
* Return value: the count of the translated messages.
**/
gint
-gtranslator_po_get_translated_count (GtrPo * po)
+gtr_po_get_translated_count (GtrPo * po)
{
g_return_val_if_fail (GTR_IS_PO (po), -1);
@@ -940,7 +940,7 @@ gtranslator_po_get_translated_count (GtrPo * po)
* This funcs must not be exported.
*/
void
-_gtranslator_po_increase_decrease_translated (GtrPo * po,
+_gtr_po_increase_decrease_translated (GtrPo * po,
gboolean increase)
{
g_return_if_fail (GTR_IS_PO (po));
@@ -952,13 +952,13 @@ _gtranslator_po_increase_decrease_translated (GtrPo * po,
}
/**
- * gtranslator_po_get_fuzzy_count:
+ * gtr_po_get_fuzzy_count:
* @po: a #GtrPo
*
* Return value: the count of the fuzzy messages.
**/
gint
-gtranslator_po_get_fuzzy_count (GtrPo * po)
+gtr_po_get_fuzzy_count (GtrPo * po)
{
g_return_val_if_fail (GTR_IS_PO (po), -1);
@@ -971,7 +971,7 @@ gtranslator_po_get_fuzzy_count (GtrPo * po)
* This funcs must not be exported.
*/
void
-_gtranslator_po_increase_decrease_fuzzy (GtrPo * po,
+_gtr_po_increase_decrease_fuzzy (GtrPo * po,
gboolean increase)
{
g_return_if_fail (GTR_IS_PO (po));
@@ -983,13 +983,13 @@ _gtranslator_po_increase_decrease_fuzzy (GtrPo * po,
}
/**
- * gtranslator_po_get_untranslated_count:
+ * gtr_po_get_untranslated_count:
* @po: a #GtrPo
*
* Return value: the count of the untranslated messages.
**/
gint
-gtranslator_po_get_untranslated_count (GtrPo * po)
+gtr_po_get_untranslated_count (GtrPo * po)
{
g_return_val_if_fail (GTR_IS_PO (po), -1);
@@ -1001,13 +1001,13 @@ gtranslator_po_get_untranslated_count (GtrPo * po)
}
/**
- * gtranslator_po_get_messages_count:
+ * gtr_po_get_messages_count:
* @po: a #GtrPo
*
* Return value: the number of messages messages.
**/
gint
-gtranslator_po_get_messages_count (GtrPo * po)
+gtr_po_get_messages_count (GtrPo * po)
{
g_return_val_if_fail (GTR_IS_PO (po), -1);
@@ -1015,21 +1015,21 @@ gtranslator_po_get_messages_count (GtrPo * po)
}
/**
- * gtranslator_po_get_message_position:
+ * gtr_po_get_message_position:
* @po: a #GtrPo
*
* Return value: the number of the current message.
**/
gint
-gtranslator_po_get_message_position (GtrPo * po)
+gtr_po_get_message_position (GtrPo * po)
{
g_return_val_if_fail (GTR_IS_PO (po), -1);
- return gtranslator_msg_get_po_position (GTR_MSG (po->priv->current->data));
+ return gtr_msg_get_po_position (GTR_MSG (po->priv->current->data));
}
/**
- * gtranslator_po_check_po_file:
+ * gtr_po_check_po_file:
* @po: a #GtrPo
*
* Test whether an entire PO file is valid, like msgfmt does it.
@@ -1037,7 +1037,7 @@ gtranslator_po_get_message_position (GtrPo * po)
* with g_free.
**/
gchar *
-gtranslator_po_check_po_file (GtrPo * po)
+gtr_po_check_po_file (GtrPo * po)
{
struct po_xerror_handler handler;
diff --git a/src/gtr-po.h b/src/gtr-po.h
index a7b6563..09d81c7 100644
--- a/src/gtr-po.h
+++ b/src/gtr-po.h
@@ -36,7 +36,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_PO (gtranslator_po_get_type ())
+#define GTR_TYPE_PO (gtr_po_get_type ())
#define GTR_PO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_PO, GtrPo))
#define GTR_PO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_PO, GtrPoClass))
#define GTR_IS_PO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_PO))
@@ -68,7 +68,7 @@ struct _GtrPoClass
GObjectClass parent_class;
};
-#define GTR_PO_ERROR gtranslator_po_error_quark()
+#define GTR_PO_ERROR gtr_po_error_quark()
enum
{
@@ -89,95 +89,95 @@ typedef enum
/*
* Public methods
*/
-GQuark gtranslator_po_error_quark (void);
+GQuark gtr_po_error_quark (void);
GType
-gtranslator_po_get_type (void)
+gtr_po_get_type (void)
G_GNUC_CONST;
- GType gtranslator_po_register_type (GTypeModule * module);
+ GType gtr_po_register_type (GTypeModule * module);
- GtrPo *gtranslator_po_new (void);
+ GtrPo *gtr_po_new (void);
- void gtranslator_po_parse (GtrPo * po,
+ void gtr_po_parse (GtrPo * po,
GFile * filename, GError ** error);
- void gtranslator_po_save_header_in_msg (GtrPo * po,
+ void gtr_po_save_header_in_msg (GtrPo * po,
GtrHeader * header);
- void gtranslator_po_save_file (GtrPo * po, GError ** error);
+ void gtr_po_save_file (GtrPo * po, GError ** error);
- GtrPoState gtranslator_po_get_state (GtrPo * po);
+ GtrPoState gtr_po_get_state (GtrPo * po);
- void gtranslator_po_set_state (GtrPo * po,
+ void gtr_po_set_state (GtrPo * po,
GtrPoState state);
- GFile *gtranslator_po_get_location (GtrPo * po);
+ GFile *gtr_po_get_location (GtrPo * po);
- void gtranslator_po_set_location (GtrPo * po, GFile * location);
+ void gtr_po_set_location (GtrPo * po, GFile * location);
- gboolean gtranslator_po_get_write_perms (GtrPo * po);
+ gboolean gtr_po_get_write_perms (GtrPo * po);
- GList *gtranslator_po_get_messages (GtrPo * po);
+ GList *gtr_po_get_messages (GtrPo * po);
- void gtranslator_po_set_messages (GtrPo * po, GList * messages);
+ void gtr_po_set_messages (GtrPo * po, GList * messages);
- GList *gtranslator_po_get_current_message (GtrPo * po);
+ GList *gtr_po_get_current_message (GtrPo * po);
- GList *gtranslator_po_get_domains (GtrPo * po);
+ GList *gtr_po_get_domains (GtrPo * po);
- po_file_t gtranslator_po_get_po_file (GtrPo * po);
+ po_file_t gtr_po_get_po_file (GtrPo * po);
- GList *gtranslator_po_get_next_fuzzy (GtrPo * po);
+ GList *gtr_po_get_next_fuzzy (GtrPo * po);
- GList *gtranslator_po_get_prev_fuzzy (GtrPo * po);
+ GList *gtr_po_get_prev_fuzzy (GtrPo * po);
- GList *gtranslator_po_get_next_untrans (GtrPo * po);
+ GList *gtr_po_get_next_untrans (GtrPo * po);
- GList *gtranslator_po_get_prev_untrans (GtrPo * po);
+ GList *gtr_po_get_prev_untrans (GtrPo * po);
- GList *gtranslator_po_get_next_fuzzy_or_untrans (GtrPo * po);
+ GList *gtr_po_get_next_fuzzy_or_untrans (GtrPo * po);
- GList *gtranslator_po_get_prev_fuzzy_or_untrans (GtrPo * po);
+ GList *gtr_po_get_prev_fuzzy_or_untrans (GtrPo * po);
- GList *gtranslator_po_get_msg_from_number (GtrPo * po,
+ GList *gtr_po_get_msg_from_number (GtrPo * po,
gint number);
-GtrHeader * gtranslator_po_get_header (GtrPo * po);
+GtrHeader * gtr_po_get_header (GtrPo * po);
void
- gtranslator_po_set_header (GtrPo * po,
+ gtr_po_set_header (GtrPo * po,
GtrHeader * header);
gint
- gtranslator_po_get_translated_count (GtrPo * po);
+ gtr_po_get_translated_count (GtrPo * po);
gint
- gtranslator_po_get_fuzzy_count (GtrPo * po);
+ gtr_po_get_fuzzy_count (GtrPo * po);
gint
- gtranslator_po_get_untranslated_count (GtrPo * po);
+ gtr_po_get_untranslated_count (GtrPo * po);
gint
- gtranslator_po_get_messages_count (GtrPo * po);
+ gtr_po_get_messages_count (GtrPo * po);
gint
- gtranslator_po_get_message_position (GtrPo * po);
+ gtr_po_get_message_position (GtrPo * po);
gchar *
- gtranslator_po_check_po_file (GtrPo * po);
+ gtr_po_check_po_file (GtrPo * po);
extern char *
- gtranslator_po_header_set_field (const char *header, const char *field, const char *value);
+ gtr_po_header_set_field (const char *header, const char *field, const char *value);
/* Unexported funcs */
void
- _gtranslator_po_increase_decrease_translated
+ _gtr_po_increase_decrease_translated
(GtrPo * po, gboolean increase);
void
- _gtranslator_po_increase_decrease_fuzzy (GtrPo * po,
+ _gtr_po_increase_decrease_fuzzy (GtrPo * po,
gboolean increase);
G_END_DECLS
diff --git a/src/gtr-prefs-manager-app.c b/src/gtr-prefs-manager-app.c
index 2729a52..74bf380 100644
--- a/src/gtr-prefs-manager-app.c
+++ b/src/gtr-prefs-manager-app.c
@@ -43,25 +43,25 @@
#include "gtr-view.h"
#include "gtr-window.h"
-static void gtranslator_prefs_manager_editor_font_changed (GConfClient *
+static void gtr_prefs_manager_editor_font_changed (GConfClient *
client,
guint cnxn_id,
GConfEntry * entry,
gpointer
user_data);
-static void gtranslator_prefs_manager_spellcheck_changed (GConfClient *
+static void gtr_prefs_manager_spellcheck_changed (GConfClient *
client,
guint cnxn_id,
GConfEntry * entry,
gpointer user_data);
-static void gtranslator_prefs_manager_highlight_changed (GConfClient * client,
+static void gtr_prefs_manager_highlight_changed (GConfClient * client,
guint cnxn_id,
GConfEntry * entry,
gpointer user_data);
-static void gtranslator_prefs_manager_visible_whitespace_changed (GConfClient
+static void gtr_prefs_manager_visible_whitespace_changed (GConfClient
* client,
guint
cnxn_id,
@@ -70,17 +70,17 @@ static void gtranslator_prefs_manager_visible_whitespace_changed (GConfClient
gpointer
user_data);
-static void gtranslator_prefs_manager_gdl_style_changed (GConfClient * client,
+static void gtr_prefs_manager_gdl_style_changed (GConfClient * client,
guint cnxn_id,
GConfEntry * entry,
gpointer user_data);
-static void gtranslator_prefs_manager_autosave_changed (GConfClient * client,
+static void gtr_prefs_manager_autosave_changed (GConfClient * client,
guint cnxn_id,
GConfEntry * entry,
gpointer user_data);
-static void gtranslator_prefs_manager_scheme_color_changed (GConfClient *
+static void gtr_prefs_manager_scheme_color_changed (GConfClient *
client,
guint cnxn_id,
GConfEntry *
@@ -112,7 +112,7 @@ static gint content_pane_pos = -1;
static gint comment_pane_pos = -1;
static GKeyFile *
-get_gtranslator_state_file ()
+get_gtr_state_file ()
{
static GKeyFile *state_file = NULL;
@@ -124,7 +124,7 @@ get_gtranslator_state_file ()
state_file = g_key_file_new ();
- config_folder = gtranslator_dirs_get_user_config_dir ();
+ config_folder = gtr_dirs_get_user_config_dir ();
path = g_build_filename (config_folder, GTR_STATE_FILE_NAME, NULL);
g_free (config_folder);
@@ -146,14 +146,14 @@ get_gtranslator_state_file ()
}
static void
-gtranslator_state_get_int (const gchar * group,
+gtr_state_get_int (const gchar * group,
const gchar * key, gint defval, gint * result)
{
GKeyFile *state_file;
gint res;
GError *err = NULL;
- state_file = get_gtranslator_state_file ();
+ state_file = get_gtr_state_file ();
res = g_key_file_get_integer (state_file, group, key, &err);
if (err != NULL)
@@ -178,16 +178,16 @@ gtranslator_state_get_int (const gchar * group,
}
static void
-gtranslator_state_set_int (const gchar * group, const gchar * key, gint value)
+gtr_state_set_int (const gchar * group, const gchar * key, gint value)
{
GKeyFile *state_file;
- state_file = get_gtranslator_state_file ();
+ state_file = get_gtr_state_file ();
g_key_file_set_integer (state_file, group, key, value);
}
static gboolean
-gtranslator_state_file_sync ()
+gtr_state_file_sync ()
{
GKeyFile *state_file;
gchar *config_folder;
@@ -197,10 +197,10 @@ gtranslator_state_file_sync ()
GError *err = NULL;
gboolean ret = FALSE;
- state_file = get_gtranslator_state_file ();
+ state_file = get_gtr_state_file ();
g_return_val_if_fail (state_file != NULL, FALSE);
- config_folder = gtranslator_dirs_get_user_config_dir ();
+ config_folder = gtr_dirs_get_user_config_dir ();
path = g_build_filename (config_folder, GTR_STATE_FILE_NAME, NULL);
g_free (config_folder);
@@ -215,7 +215,7 @@ gtranslator_state_file_sync ()
if ((content != NULL) &&
(!g_file_set_contents (path, content, length, &err)))
{
- g_warning ("Could not write gtranslator state file: %s\n",
+ g_warning ("Could not write gtr state file: %s\n",
err->message);
goto out;
}
@@ -234,11 +234,11 @@ out:
/* Window state */
gint
-gtranslator_prefs_manager_get_window_state (void)
+gtr_prefs_manager_get_window_state (void)
{
if (window_state == -1)
{
- gtranslator_state_get_int (GTR_STATE_WINDOW_GROUP,
+ gtr_state_get_int (GTR_STATE_WINDOW_GROUP,
GTR_STATE_WINDOW_STATE,
GTR_STATE_DEFAULT_WINDOW_STATE,
&window_state);
@@ -248,31 +248,31 @@ gtranslator_prefs_manager_get_window_state (void)
}
void
-gtranslator_prefs_manager_set_window_state (gint ws)
+gtr_prefs_manager_set_window_state (gint ws)
{
g_return_if_fail (ws > -1);
window_state = ws;
- gtranslator_state_set_int (GTR_STATE_WINDOW_GROUP,
+ gtr_state_set_int (GTR_STATE_WINDOW_GROUP,
GTR_STATE_WINDOW_STATE, ws);
}
gboolean
-gtranslator_prefs_manager_window_state_can_set (void)
+gtr_prefs_manager_window_state_can_set (void)
{
return TRUE;
}
/* Window size */
void
-gtranslator_prefs_manager_get_window_size (gint * width, gint * height)
+gtr_prefs_manager_get_window_size (gint * width, gint * height)
{
g_return_if_fail (width != NULL && height != NULL);
if (window_width == -1)
{
- gtranslator_state_get_int (GTR_STATE_WINDOW_GROUP,
+ gtr_state_get_int (GTR_STATE_WINDOW_GROUP,
GTR_STATE_WINDOW_WIDTH,
GTR_STATE_DEFAULT_WINDOW_WIDTH,
&window_width);
@@ -280,7 +280,7 @@ gtranslator_prefs_manager_get_window_size (gint * width, gint * height)
if (window_height == -1)
{
- gtranslator_state_get_int (GTR_STATE_WINDOW_GROUP,
+ gtr_state_get_int (GTR_STATE_WINDOW_GROUP,
GTR_STATE_WINDOW_HEIGHT,
GTR_STATE_DEFAULT_WINDOW_HEIGHT,
&window_height);
@@ -291,7 +291,7 @@ gtranslator_prefs_manager_get_window_size (gint * width, gint * height)
}
void
-gtranslator_prefs_manager_get_default_window_size (gint * width,
+gtr_prefs_manager_get_default_window_size (gint * width,
gint * height)
{
g_return_if_fail (width != NULL && height != NULL);
@@ -301,32 +301,32 @@ gtranslator_prefs_manager_get_default_window_size (gint * width,
}
void
-gtranslator_prefs_manager_set_window_size (gint width, gint height)
+gtr_prefs_manager_set_window_size (gint width, gint height)
{
g_return_if_fail (width > -1 && height > -1);
window_width = width;
window_height = height;
- gtranslator_state_set_int (GTR_STATE_WINDOW_GROUP,
+ gtr_state_set_int (GTR_STATE_WINDOW_GROUP,
GTR_STATE_WINDOW_WIDTH, width);
- gtranslator_state_set_int (GTR_STATE_WINDOW_GROUP,
+ gtr_state_set_int (GTR_STATE_WINDOW_GROUP,
GTR_STATE_WINDOW_HEIGHT, height);
}
gboolean
-gtranslator_prefs_manager_window_size_can_set (void)
+gtr_prefs_manager_window_size_can_set (void)
{
return TRUE;
}
/* Content pane */
gint
-gtranslator_prefs_manager_get_content_pane_pos (void)
+gtr_prefs_manager_get_content_pane_pos (void)
{
if (content_pane_pos == -1)
{
- gtranslator_state_get_int (GTR_STATE_WINDOW_GROUP,
+ gtr_state_get_int (GTR_STATE_WINDOW_GROUP,
GTR_STATE_CONTENT_PANE_POS,
GTR_STATE_DEFAULT_CONTENT_PANE_POS,
&content_pane_pos);
@@ -336,13 +336,13 @@ gtranslator_prefs_manager_get_content_pane_pos (void)
}
gint
-gtranslator_prefs_manager_get_default_content_pane_pos (void)
+gtr_prefs_manager_get_default_content_pane_pos (void)
{
return GTR_STATE_DEFAULT_CONTENT_PANE_POS;
}
void
-gtranslator_prefs_manager_set_content_pane_pos (gint new_pane_pos)
+gtr_prefs_manager_set_content_pane_pos (gint new_pane_pos)
{
g_return_if_fail (new_pane_pos > -1);
@@ -350,17 +350,17 @@ gtranslator_prefs_manager_set_content_pane_pos (gint new_pane_pos)
return;
content_pane_pos = new_pane_pos;
- gtranslator_state_set_int (GTR_STATE_WINDOW_GROUP,
+ gtr_state_set_int (GTR_STATE_WINDOW_GROUP,
GTR_STATE_CONTENT_PANE_POS, new_pane_pos);
}
/* Comment pane */
gint
-gtranslator_prefs_manager_get_comment_pane_pos (void)
+gtr_prefs_manager_get_comment_pane_pos (void)
{
if (comment_pane_pos == -1)
{
- gtranslator_state_get_int (GTR_STATE_WINDOW_GROUP,
+ gtr_state_get_int (GTR_STATE_WINDOW_GROUP,
GTR_STATE_COMMENT_PANE_POS,
GTR_STATE_DEFAULT_COMMENT_PANE_POS,
&comment_pane_pos);
@@ -370,13 +370,13 @@ gtranslator_prefs_manager_get_comment_pane_pos (void)
}
gint
-gtranslator_prefs_manager_get_default_comment_pane_pos (void)
+gtr_prefs_manager_get_default_comment_pane_pos (void)
{
return GTR_STATE_DEFAULT_COMMENT_PANE_POS;
}
void
-gtranslator_prefs_manager_set_comment_pane_pos (gint new_pane_pos)
+gtr_prefs_manager_set_comment_pane_pos (gint new_pane_pos)
{
g_return_if_fail (new_pane_pos > -1);
@@ -384,78 +384,78 @@ gtranslator_prefs_manager_set_comment_pane_pos (gint new_pane_pos)
return;
comment_pane_pos = new_pane_pos;
- gtranslator_state_set_int (GTR_STATE_WINDOW_GROUP,
+ gtr_state_set_int (GTR_STATE_WINDOW_GROUP,
GTR_STATE_COMMENT_PANE_POS, new_pane_pos);
}
/* Normal prefs are stored in GConf */
gboolean
-gtranslator_prefs_manager_app_init (void)
+gtr_prefs_manager_app_init (void)
{
- g_return_val_if_fail (gtranslator_prefs_manager == NULL, FALSE);
+ g_return_val_if_fail (gtr_prefs_manager == NULL, FALSE);
- gtranslator_prefs_manager_init ();
+ gtr_prefs_manager_init ();
- if (gtranslator_prefs_manager != NULL)
+ if (gtr_prefs_manager != NULL)
{
/* TODO: notify, add dirs */
- gconf_client_add_dir (gtranslator_prefs_manager->gconf_client,
+ gconf_client_add_dir (gtr_prefs_manager->gconf_client,
GPM_PREFS_DIR,
GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
- gconf_client_notify_add (gtranslator_prefs_manager->gconf_client,
+ gconf_client_notify_add (gtr_prefs_manager->gconf_client,
GPM_EDITOR_FONT,
- gtranslator_prefs_manager_editor_font_changed,
+ gtr_prefs_manager_editor_font_changed,
NULL, NULL, NULL);
- gconf_client_notify_add (gtranslator_prefs_manager->gconf_client,
+ gconf_client_notify_add (gtr_prefs_manager->gconf_client,
GPM_SPELLCHECK,
- gtranslator_prefs_manager_spellcheck_changed,
+ gtr_prefs_manager_spellcheck_changed,
NULL, NULL, NULL);
- gconf_client_notify_add (gtranslator_prefs_manager->gconf_client,
+ gconf_client_notify_add (gtr_prefs_manager->gconf_client,
GPM_HIGHLIGHT_SYNTAX,
- gtranslator_prefs_manager_highlight_changed,
+ gtr_prefs_manager_highlight_changed,
NULL, NULL, NULL);
- gconf_client_notify_add (gtranslator_prefs_manager->gconf_client,
+ gconf_client_notify_add (gtr_prefs_manager->gconf_client,
GPM_VISIBLE_WHITESPACE,
- gtranslator_prefs_manager_visible_whitespace_changed,
+ gtr_prefs_manager_visible_whitespace_changed,
NULL, NULL, NULL);
- gconf_client_notify_add (gtranslator_prefs_manager->gconf_client,
+ gconf_client_notify_add (gtr_prefs_manager->gconf_client,
GPM_PANE_SWITCHER_STYLE,
- gtranslator_prefs_manager_gdl_style_changed,
+ gtr_prefs_manager_gdl_style_changed,
NULL, NULL, NULL);
- gconf_client_notify_add (gtranslator_prefs_manager->gconf_client,
+ gconf_client_notify_add (gtr_prefs_manager->gconf_client,
GPM_AUTOSAVE,
- gtranslator_prefs_manager_autosave_changed,
+ gtr_prefs_manager_autosave_changed,
NULL, NULL, NULL);
- gconf_client_notify_add (gtranslator_prefs_manager->gconf_client,
+ gconf_client_notify_add (gtr_prefs_manager->gconf_client,
GPM_COLOR_SCHEME,
- gtranslator_prefs_manager_scheme_color_changed,
+ gtr_prefs_manager_scheme_color_changed,
NULL, NULL, NULL);
}
- return gtranslator_prefs_manager != NULL;
+ return gtr_prefs_manager != NULL;
}
-/* This function must be called before exiting gtranslator */
+/* This function must be called before exiting gtr */
void
-gtranslator_prefs_manager_app_shutdown ()
+gtr_prefs_manager_app_shutdown ()
{
- gtranslator_prefs_manager_shutdown ();
+ gtr_prefs_manager_shutdown ();
- gtranslator_state_file_sync ();
+ gtr_state_file_sync ();
}
static void
-gtranslator_prefs_manager_editor_font_changed (GConfClient * client,
+gtr_prefs_manager_editor_font_changed (GConfClient * client,
guint cnxn_id,
GConfEntry * entry,
gpointer user_data)
@@ -475,26 +475,26 @@ gtranslator_prefs_manager_editor_font_changed (GConfClient * client,
if (!def)
font = g_strdup ("Sans 10"); // Fix to use system font
else
- font = g_strdup (gtranslator_prefs_manager_get_editor_font ());
+ font = g_strdup (gtr_prefs_manager_get_editor_font ());
}
else if (strcmp (entry->key, GPM_EDITOR_FONT) == 0)
{
font = g_strdup (gconf_value_get_string (entry->value));
- def = gtranslator_prefs_manager_get_use_custom_font ();
+ def = gtr_prefs_manager_get_use_custom_font ();
}
else
return;
g_return_if_fail (font != NULL);
- views = gtranslator_application_get_views (GTR_APP, TRUE, TRUE);
+ views = gtr_application_get_views (GTR_APP, TRUE, TRUE);
l = views;
while (l != NULL)
{
/* Note: we use def=FALSE to avoid GtrView to query gconf */
- gtranslator_view_set_font (GTR_VIEW (l->data), FALSE, font);
+ gtr_view_set_font (GTR_VIEW (l->data), FALSE, font);
l = l->next;
}
@@ -504,7 +504,7 @@ gtranslator_prefs_manager_editor_font_changed (GConfClient * client,
static void
-gtranslator_prefs_manager_spellcheck_changed (GConfClient * client,
+gtr_prefs_manager_spellcheck_changed (GConfClient * client,
guint cnxn_id,
GConfEntry * entry,
gpointer user_data)
@@ -515,12 +515,12 @@ gtranslator_prefs_manager_spellcheck_changed (GConfClient * client,
g_return_if_fail (entry->key != NULL);
g_return_if_fail (entry->value != NULL);
- l = views = gtranslator_application_get_views (GTR_APP, FALSE, TRUE);
+ l = views = gtr_application_get_views (GTR_APP, FALSE, TRUE);
while (l != NULL)
{
- gtranslator_view_enable_spellcheck (GTR_VIEW (l->data),
- gtranslator_prefs_manager_get_spellcheck
+ gtr_view_enable_spellcheck (GTR_VIEW (l->data),
+ gtr_prefs_manager_get_spellcheck
());
l = l->next;
}
@@ -529,7 +529,7 @@ gtranslator_prefs_manager_spellcheck_changed (GConfClient * client,
static void
-gtranslator_prefs_manager_highlight_changed (GConfClient * client,
+gtr_prefs_manager_highlight_changed (GConfClient * client,
guint cnxn_id,
GConfEntry * entry,
gpointer user_data)
@@ -546,7 +546,7 @@ gtranslator_prefs_manager_highlight_changed (GConfClient * client,
enable = gconf_value_get_bool (entry->value);
- views = gtranslator_application_get_views (GTR_APP, TRUE, TRUE);
+ views = gtr_application_get_views (GTR_APP, TRUE, TRUE);
l = views;
while (l != NULL)
@@ -566,7 +566,7 @@ gtranslator_prefs_manager_highlight_changed (GConfClient * client,
}
static void
-gtranslator_prefs_manager_visible_whitespace_changed (GConfClient * client,
+gtr_prefs_manager_visible_whitespace_changed (GConfClient * client,
guint cnxn_id,
GConfEntry * entry,
gpointer user_data)
@@ -582,12 +582,12 @@ gtranslator_prefs_manager_visible_whitespace_changed (GConfClient * client,
enable = gconf_value_get_bool (entry->value);
- views = gtranslator_application_get_views (GTR_APP, TRUE, TRUE);
+ views = gtr_application_get_views (GTR_APP, TRUE, TRUE);
l = views;
while (l != NULL)
{
- gtranslator_view_enable_visible_whitespace (GTR_VIEW (l->data),
+ gtr_view_enable_visible_whitespace (GTR_VIEW (l->data),
enable);
l = l->next;
@@ -598,7 +598,7 @@ gtranslator_prefs_manager_visible_whitespace_changed (GConfClient * client,
}
static void
-gtranslator_prefs_manager_gdl_style_changed (GConfClient * client,
+gtr_prefs_manager_gdl_style_changed (GConfClient * client,
guint cnxn_id,
GConfEntry * entry,
gpointer user_data)
@@ -607,19 +607,19 @@ gtranslator_prefs_manager_gdl_style_changed (GConfClient * client,
GdlSwitcherStyle style;
GdlDockLayout *layout_manager;
- window = gtranslator_application_get_active_window (GTR_APP);
+ window = gtr_application_get_active_window (GTR_APP);
- style = gtranslator_prefs_manager_get_pane_switcher_style ();
+ style = gtr_prefs_manager_get_pane_switcher_style ();
layout_manager =
- GDL_DOCK_LAYOUT (_gtranslator_window_get_layout_manager (window));
+ GDL_DOCK_LAYOUT (_gtr_window_get_layout_manager (window));
g_object_set (G_OBJECT (layout_manager->master),
"switcher-style", style, NULL);
}
static void
-gtranslator_prefs_manager_autosave_changed (GConfClient * client,
+gtr_prefs_manager_autosave_changed (GConfClient * client,
guint cnxn_id,
GConfEntry * entry,
gpointer user_data)
@@ -631,7 +631,7 @@ gtranslator_prefs_manager_autosave_changed (GConfClient * client,
g_return_if_fail (entry->key != NULL);
g_return_if_fail (entry->value != NULL);
- window = gtranslator_application_get_active_window (GTR_APP);
+ window = gtr_application_get_active_window (GTR_APP);
if (strcmp (entry->key, GPM_AUTOSAVE) == 0)
{
@@ -639,13 +639,13 @@ gtranslator_prefs_manager_autosave_changed (GConfClient * client,
autosave = gconf_value_get_bool (entry->value);
- tabs = gtranslator_window_get_all_tabs (window);
+ tabs = gtr_window_get_all_tabs (window);
for (l = tabs; l != NULL; l = g_list_next (l))
{
GtrTab *tab = GTR_TAB (l->data);
- gtranslator_tab_set_autosave_enabled (tab, autosave);
+ gtr_tab_set_autosave_enabled (tab, autosave);
}
g_list_free (tabs);
@@ -659,13 +659,13 @@ gtranslator_prefs_manager_autosave_changed (GConfClient * client,
if (autosave_interval <= 0)
autosave_interval = 1;
- tabs = gtranslator_window_get_all_tabs (window);
+ tabs = gtr_window_get_all_tabs (window);
for (l = tabs; l != NULL; l = g_list_next (l))
{
GtrTab *tab = GTR_TAB (l->data);
- gtranslator_tab_set_autosave_interval (tab, autosave_interval);
+ gtr_tab_set_autosave_interval (tab, autosave_interval);
}
g_list_free (tabs);
@@ -673,17 +673,17 @@ gtranslator_prefs_manager_autosave_changed (GConfClient * client,
}
static void
-gtranslator_prefs_manager_scheme_color_changed (GConfClient * client,
+gtr_prefs_manager_scheme_color_changed (GConfClient * client,
guint cnxn_id,
GConfEntry * entry,
gpointer user_data)
{
GList *views, *l;
- views = gtranslator_application_get_views (GTR_APP, TRUE, TRUE);
+ views = gtr_application_get_views (GTR_APP, TRUE, TRUE);
for (l = views; l != NULL; l = g_list_next (l))
{
- gtranslator_view_reload_scheme_color (GTR_VIEW (l->data));
+ gtr_view_reload_scheme_color (GTR_VIEW (l->data));
}
}
diff --git a/src/gtr-prefs-manager-app.h b/src/gtr-prefs-manager-app.h
index 1e9c598..15ff9d8 100644
--- a/src/gtr-prefs-manager-app.h
+++ b/src/gtr-prefs-manager-app.h
@@ -30,37 +30,37 @@
/** LIFE CYCLE MANAGEMENT FUNCTIONS **/
-gboolean gtranslator_prefs_manager_app_init (void);
+gboolean gtr_prefs_manager_app_init (void);
-/* This function must be called before exiting gtranslator */
-void gtranslator_prefs_manager_app_shutdown (void);
+/* This function must be called before exiting gtr */
+void gtr_prefs_manager_app_shutdown (void);
/* Window state */
-gint gtranslator_prefs_manager_get_window_state (void);
-void gtranslator_prefs_manager_set_window_state (gint ws);
-gboolean gtranslator_prefs_manager_window_state_can_set (void);
+gint gtr_prefs_manager_get_window_state (void);
+void gtr_prefs_manager_set_window_state (gint ws);
+gboolean gtr_prefs_manager_window_state_can_set (void);
/* Window size */
-void gtranslator_prefs_manager_get_window_size (gint * width, gint * height);
-void gtranslator_prefs_manager_get_default_window_size (gint * width,
+void gtr_prefs_manager_get_window_size (gint * width, gint * height);
+void gtr_prefs_manager_get_default_window_size (gint * width,
gint * height);
-void gtranslator_prefs_manager_set_window_size (gint width, gint height);
-gboolean gtranslator_prefs_manager_window_size_can_set (void);
+void gtr_prefs_manager_set_window_size (gint width, gint height);
+gboolean gtr_prefs_manager_window_size_can_set (void);
/* Side panel */
-gint gtranslator_prefs_manager_get_side_panel_size (void);
-gint gtranslator_prefs_manager_get_default_side_panel_size (void);
-void gtranslator_prefs_manager_set_side_panel_size (gint ps);
-gboolean gtranslator_prefs_manager_side_panel_size_can_set (void);
-gint gtranslator_prefs_manager_get_side_panel_active_page (void);
-void gtranslator_prefs_manager_set_side_panel_active_page (gint id);
-gboolean gtranslator_prefs_manager_side_panel_active_page_can_set (void);
+gint gtr_prefs_manager_get_side_panel_size (void);
+gint gtr_prefs_manager_get_default_side_panel_size (void);
+void gtr_prefs_manager_set_side_panel_size (gint ps);
+gboolean gtr_prefs_manager_side_panel_size_can_set (void);
+gint gtr_prefs_manager_get_side_panel_active_page (void);
+void gtr_prefs_manager_set_side_panel_active_page (gint id);
+gboolean gtr_prefs_manager_side_panel_active_page_can_set (void);
/* Comment pane */
-gint gtranslator_prefs_manager_get_comment_pane_pos (void);
-gint gtranslator_prefs_manager_get_default_comment_pane_pos (void);
-void gtranslator_prefs_manager_set_comment_pane_pos (gint new_pane_pos);
+gint gtr_prefs_manager_get_comment_pane_pos (void);
+gint gtr_prefs_manager_get_default_comment_pane_pos (void);
+void gtr_prefs_manager_set_comment_pane_pos (gint new_pane_pos);
#endif /* __GTR_PREFS_MANAGER_APP_H__ */
diff --git a/src/gtr-prefs-manager-private.h b/src/gtr-prefs-manager-private.h
index 5a5fcc4..e655db9 100644
--- a/src/gtr-prefs-manager-private.h
+++ b/src/gtr-prefs-manager-private.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * gtranslator-prefs-manager-private.h
+ * gtr-prefs-manager-private.h
* This file is part of gtranslator based in gedit
*
* Copyright (C) 2002 Paolo Maggi
@@ -35,6 +35,6 @@ struct _GtrPrefsManager
GConfClient *gconf_client;
};
-extern GtrPrefsManager *gtranslator_prefs_manager;
+extern GtrPrefsManager *gtr_prefs_manager;
#endif /* __GTR_PREFS_MANAGER_PRIVATE_H__ */
diff --git a/src/gtr-prefs-manager.c b/src/gtr-prefs-manager.c
index 7ac5071..d8ce490 100644
--- a/src/gtr-prefs-manager.c
+++ b/src/gtr-prefs-manager.c
@@ -44,67 +44,67 @@
#include "gtr-prefs-manager-private.h"
#define DEFINE_BOOL_PREF(name, key) gboolean \
-gtranslator_prefs_manager_get_ ## name (void) \
+gtr_prefs_manager_get_ ## name (void) \
{ \
\
- return gtranslator_prefs_manager_get_bool (key); \
+ return gtr_prefs_manager_get_bool (key); \
} \
\
void \
-gtranslator_prefs_manager_set_ ## name (gboolean v) \
+gtr_prefs_manager_set_ ## name (gboolean v) \
{ \
\
- gtranslator_prefs_manager_set_bool (key, \
+ gtr_prefs_manager_set_bool (key, \
v); \
}
#define DEFINE_INT_PREF(name, key) gint \
-gtranslator_prefs_manager_get_ ## name (void) \
+gtr_prefs_manager_get_ ## name (void) \
{ \
\
- return gtranslator_prefs_manager_get_int (key); \
+ return gtr_prefs_manager_get_int (key); \
} \
\
void \
-gtranslator_prefs_manager_set_ ## name (gint v) \
+gtr_prefs_manager_set_ ## name (gint v) \
{ \
\
- gtranslator_prefs_manager_set_int (key, \
+ gtr_prefs_manager_set_int (key, \
v); \
}
#define DEFINE_STRING_PREF(name, key) const gchar* \
-gtranslator_prefs_manager_get_ ## name (void) \
+gtr_prefs_manager_get_ ## name (void) \
{ \
\
- return gtranslator_prefs_manager_get_string (key); \
+ return gtr_prefs_manager_get_string (key); \
} \
\
void \
-gtranslator_prefs_manager_set_ ## name (const gchar* v) \
+gtr_prefs_manager_set_ ## name (const gchar* v) \
{ \
\
- gtranslator_prefs_manager_set_string (key, \
+ gtr_prefs_manager_set_string (key, \
v); \
}
-GtrPrefsManager *gtranslator_prefs_manager = NULL;
+GtrPrefsManager *gtr_prefs_manager = NULL;
-static gboolean gtranslator_prefs_manager_get_bool (const gchar * key);
+static gboolean gtr_prefs_manager_get_bool (const gchar * key);
-static gint gtranslator_prefs_manager_get_int (const gchar * key);
+static gint gtr_prefs_manager_get_int (const gchar * key);
-static gchar *gtranslator_prefs_manager_get_string (const gchar * key);
+static gchar *gtr_prefs_manager_get_string (const gchar * key);
void
-gtranslator_prefs_manager_init (void)
+gtr_prefs_manager_init (void)
{
- //gtranslator_debug (DEBUG_PREFS);
+ //gtr_debug (DEBUG_PREFS);
- if (gtranslator_prefs_manager == NULL)
+ if (gtr_prefs_manager == NULL)
{
GConfClient *gconf_client;
@@ -112,92 +112,92 @@ gtranslator_prefs_manager_init (void)
if (gconf_client == NULL)
g_error ("Failed to initialize preferences manager");
- gtranslator_prefs_manager = g_new0 (GtrPrefsManager, 1);
+ gtr_prefs_manager = g_new0 (GtrPrefsManager, 1);
- gtranslator_prefs_manager->gconf_client = gconf_client;
+ gtr_prefs_manager->gconf_client = gconf_client;
}
}
void
-gtranslator_prefs_manager_shutdown ()
+gtr_prefs_manager_shutdown ()
{
- //gtranslator_debug (DEBUG_PREFS);
+ //gtr_debug (DEBUG_PREFS);
- g_object_unref (gtranslator_prefs_manager->gconf_client);
- gtranslator_prefs_manager->gconf_client = NULL;
+ g_object_unref (gtr_prefs_manager->gconf_client);
+ gtr_prefs_manager->gconf_client = NULL;
}
static gboolean
-gtranslator_prefs_manager_get_bool (const gchar * key)
+gtr_prefs_manager_get_bool (const gchar * key)
{
- //gtranslator_debug (DEBUG_PREFS);
+ //gtr_debug (DEBUG_PREFS);
- return gconf_client_get_bool (gtranslator_prefs_manager->gconf_client,
+ return gconf_client_get_bool (gtr_prefs_manager->gconf_client,
key, NULL);
}
static gint
-gtranslator_prefs_manager_get_int (const gchar * key)
+gtr_prefs_manager_get_int (const gchar * key)
{
- //gtranslator_debug (DEBUG_PREFS);
+ //gtr_debug (DEBUG_PREFS);
- return gconf_client_get_int (gtranslator_prefs_manager->gconf_client,
+ return gconf_client_get_int (gtr_prefs_manager->gconf_client,
key, NULL);
}
static gchar *
-gtranslator_prefs_manager_get_string (const gchar * key)
+gtr_prefs_manager_get_string (const gchar * key)
{
- //gtranslator_debug (DEBUG_PREFS);
+ //gtr_debug (DEBUG_PREFS);
- return gconf_client_get_string (gtranslator_prefs_manager->gconf_client,
+ return gconf_client_get_string (gtr_prefs_manager->gconf_client,
key, NULL);
}
static void
-gtranslator_prefs_manager_set_bool (const gchar * key, gboolean value)
+gtr_prefs_manager_set_bool (const gchar * key, gboolean value)
{
- //gtranslator_debug (DEBUG_PREFS);
+ //gtr_debug (DEBUG_PREFS);
g_return_if_fail (gconf_client_key_is_writable
- (gtranslator_prefs_manager->gconf_client, key, NULL));
+ (gtr_prefs_manager->gconf_client, key, NULL));
- gconf_client_set_bool (gtranslator_prefs_manager->gconf_client, key, value,
+ gconf_client_set_bool (gtr_prefs_manager->gconf_client, key, value,
NULL);
}
static void
-gtranslator_prefs_manager_set_int (const gchar * key, gint value)
+gtr_prefs_manager_set_int (const gchar * key, gint value)
{
- //gtranslator_debug (DEBUG_PREFS);
+ //gtr_debug (DEBUG_PREFS);
g_return_if_fail (gconf_client_key_is_writable
- (gtranslator_prefs_manager->gconf_client, key, NULL));
+ (gtr_prefs_manager->gconf_client, key, NULL));
- gconf_client_set_int (gtranslator_prefs_manager->gconf_client, key, value,
+ gconf_client_set_int (gtr_prefs_manager->gconf_client, key, value,
NULL);
}
static void
-gtranslator_prefs_manager_set_string (const gchar * key, const gchar * value)
+gtr_prefs_manager_set_string (const gchar * key, const gchar * value)
{
- //gtranslator_debug (DEBUG_PREFS);
+ //gtr_debug (DEBUG_PREFS);
g_return_if_fail (value != NULL);
g_return_if_fail (gconf_client_key_is_writable
- (gtranslator_prefs_manager->gconf_client, key, NULL));
+ (gtr_prefs_manager->gconf_client, key, NULL));
- gconf_client_set_string (gtranslator_prefs_manager->gconf_client, key,
+ gconf_client_set_string (gtr_prefs_manager->gconf_client, key,
value, NULL);
}
static gboolean
-gtranslator_prefs_manager_key_is_writable (const gchar * key)
+gtr_prefs_manager_key_is_writable (const gchar * key)
{
- //gtranslator_debug (DEBUG_PREFS);
+ //gtr_debug (DEBUG_PREFS);
- return gconf_client_key_is_writable (gtranslator_prefs_manager->
+ return gconf_client_key_is_writable (gtr_prefs_manager->
gconf_client, key, NULL);
}
@@ -239,12 +239,12 @@ DEFINE_INT_PREF (max_length_diff, GPM_MAX_LENGTH_DIFF)
/* pane_switcher_style requires custom functions to deal with conversion from a
string to an enum */
GdlSwitcherStyle
-gtranslator_prefs_manager_get_pane_switcher_style (void)
+gtr_prefs_manager_get_pane_switcher_style (void)
{
GdlSwitcherStyle pane_switcher_style;
const gchar *v;
- v = gtranslator_prefs_manager_get_string (GPM_PANE_SWITCHER_STYLE);
+ v = gtr_prefs_manager_get_string (GPM_PANE_SWITCHER_STYLE);
if (!g_strcmp0 (v, "icons"))
pane_switcher_style = GDL_SWITCHER_STYLE_ICON;
else if (!g_strcmp0 (v, "text"))
@@ -262,7 +262,7 @@ gtranslator_prefs_manager_get_pane_switcher_style (void)
}
void
-gtranslator_prefs_manager_set_pane_switcher_style (GdlSwitcherStyle
+gtr_prefs_manager_set_pane_switcher_style (GdlSwitcherStyle
pane_switcher_style)
{
const gchar *v;
@@ -289,19 +289,19 @@ gtranslator_prefs_manager_set_pane_switcher_style (GdlSwitcherStyle
default:
v = "icons_and_text";
}
- gtranslator_prefs_manager_set_string (GPM_PANE_SWITCHER_STYLE, v);
+ gtr_prefs_manager_set_string (GPM_PANE_SWITCHER_STYLE, v);
}
DEFINE_STRING_PREF (color_scheme, GPM_COLOR_SCHEME)
/* sort_order requires custom functions to deal with conversion from a string to
an enum */
GtrSortOrder
-gtranslator_prefs_manager_get_sort_order (void)
+gtr_prefs_manager_get_sort_order (void)
{
GtrSortOrder sort_order;
const gchar *v;
- v = gtranslator_prefs_manager_get_string (GPM_SORT_ORDER);
+ v = gtr_prefs_manager_get_string (GPM_SORT_ORDER);
if (!g_strcmp0 (v, "status"))
sort_order = GTR_SORT_ORDER_STATUS;
else if (!g_strcmp0 (v, "id"))
@@ -317,7 +317,7 @@ gtranslator_prefs_manager_get_sort_order (void)
}
void
-gtranslator_prefs_manager_set_sort_order (GtrSortOrder sort_order)
+gtr_prefs_manager_set_sort_order (GtrSortOrder sort_order)
{
const gchar *v;
@@ -339,5 +339,5 @@ gtranslator_prefs_manager_set_sort_order (GtrSortOrder sort_order)
default:
v = "id";
}
- gtranslator_prefs_manager_set_string (GPM_SORT_ORDER, v);
+ gtr_prefs_manager_set_string (GPM_SORT_ORDER, v);
}
diff --git a/src/gtr-prefs-manager.h b/src/gtr-prefs-manager.h
index 31c8427..7ad1941 100644
--- a/src/gtr-prefs-manager.h
+++ b/src/gtr-prefs-manager.h
@@ -48,7 +48,7 @@ typedef enum
GTR_SORT_ORDER_TRANSLATED_TEXT
} GtrSortOrder;
-#define GTR_BASE_KEY "/apps/gtranslator"
+#define GTR_BASE_KEY "/apps/gtr"
#define GPM_PREFS_DIR GTR_BASE_KEY "/preferences"
/* Files */
@@ -89,85 +89,85 @@ typedef enum
/** LIFE CYCLE MANAGEMENT FUNCTIONS **/
-void gtranslator_prefs_manager_init (void);
+void gtr_prefs_manager_init (void);
/* This function must be called before exiting gtranslator */
-void gtranslator_prefs_manager_shutdown (void);
+void gtr_prefs_manager_shutdown (void);
/** PREFS MANAGEMENT FUNCTIONS **/
/* Files */
-void gtranslator_prefs_manager_set_warn_if_contains_fuzzy (gboolean
+void gtr_prefs_manager_set_warn_if_contains_fuzzy (gboolean
warn_if_contains_fuzzy);
-gboolean gtranslator_prefs_manager_get_warn_if_contains_fuzzy (void);
+gboolean gtr_prefs_manager_get_warn_if_contains_fuzzy (void);
-void gtranslator_prefs_manager_set_delete_compiled (gboolean delete_compiled);
-gboolean gtranslator_prefs_manager_get_delete_compiled (void);
+void gtr_prefs_manager_set_delete_compiled (gboolean delete_compiled);
+gboolean gtr_prefs_manager_get_delete_compiled (void);
-void gtranslator_prefs_manager_set_autosave (gboolean autosave);
-gboolean gtranslator_prefs_manager_get_autosave (void);
+void gtr_prefs_manager_set_autosave (gboolean autosave);
+gboolean gtr_prefs_manager_get_autosave (void);
-void gtranslator_prefs_manager_set_autosave_interval (gint autosave_interval);
-gint gtranslator_prefs_manager_get_autosave_interval (void);
+void gtr_prefs_manager_set_autosave_interval (gint autosave_interval);
+gint gtr_prefs_manager_get_autosave_interval (void);
-void gtranslator_prefs_manager_set_create_backup (gboolean create_backup);
-gboolean gtranslator_prefs_manager_get_create_backup (void);
+void gtr_prefs_manager_set_create_backup (gboolean create_backup);
+gboolean gtr_prefs_manager_get_create_backup (void);
-void gtranslator_prefs_manager_set_use_profile_values (gboolean
+void gtr_prefs_manager_set_use_profile_values (gboolean
use_profile_values);
-gboolean gtranslator_prefs_manager_get_use_profile_values (void);
+gboolean gtr_prefs_manager_get_use_profile_values (void);
/* Editor */
-void gtranslator_prefs_manager_set_highlight_syntax (gboolean
+void gtr_prefs_manager_set_highlight_syntax (gboolean
highlight_syntax);
-gboolean gtranslator_prefs_manager_get_highlight_syntax (void);
+gboolean gtr_prefs_manager_get_highlight_syntax (void);
-void gtranslator_prefs_manager_set_visible_whitespace (gboolean
+void gtr_prefs_manager_set_visible_whitespace (gboolean
visible_whitespace);
-gboolean gtranslator_prefs_manager_get_visible_whitespace (void);
+gboolean gtr_prefs_manager_get_visible_whitespace (void);
-void gtranslator_prefs_manager_set_use_custom_font (gboolean use_custom_font);
-gboolean gtranslator_prefs_manager_get_use_custom_font (void);
+void gtr_prefs_manager_set_use_custom_font (gboolean use_custom_font);
+gboolean gtr_prefs_manager_get_use_custom_font (void);
-void gtranslator_prefs_manager_set_editor_font (const gchar * editor_font);
-const gchar *gtranslator_prefs_manager_get_editor_font (void);
+void gtr_prefs_manager_set_editor_font (const gchar * editor_font);
+const gchar *gtr_prefs_manager_get_editor_font (void);
-void gtranslator_prefs_manager_set_unmark_fuzzy_when_changed (gboolean
+void gtr_prefs_manager_set_unmark_fuzzy_when_changed (gboolean
unmark_fuzzy_when_changed);
-gboolean gtranslator_prefs_manager_get_unmark_fuzzy_when_changed (void);
+gboolean gtr_prefs_manager_get_unmark_fuzzy_when_changed (void);
-void gtranslator_prefs_manager_set_spellcheck (gboolean spellcheck);
-gboolean gtranslator_prefs_manager_get_spellcheck (void);
+void gtr_prefs_manager_set_spellcheck (gboolean spellcheck);
+gboolean gtr_prefs_manager_get_spellcheck (void);
/* Translation memory */
-void gtranslator_prefs_manager_set_po_directory (const gchar * po_directory);
-const gchar *gtranslator_prefs_manager_get_po_directory (void);
+void gtr_prefs_manager_set_po_directory (const gchar * po_directory);
+const gchar *gtr_prefs_manager_get_po_directory (void);
-void gtranslator_prefs_manager_set_restrict_to_filename (gboolean
+void gtr_prefs_manager_set_restrict_to_filename (gboolean
restrict_to_filename);
-gboolean gtranslator_prefs_manager_get_restrict_to_filename (void);
+gboolean gtr_prefs_manager_get_restrict_to_filename (void);
-void gtranslator_prefs_manager_set_filename_restriction (const gchar *
+void gtr_prefs_manager_set_filename_restriction (const gchar *
filename_restriction);
-const gchar *gtranslator_prefs_manager_get_filename_restriction (void);
+const gchar *gtr_prefs_manager_get_filename_restriction (void);
-void gtranslator_prefs_manager_set_max_missing_words (gint max_missing_words);
-gint gtranslator_prefs_manager_get_max_missing_words (void);
+void gtr_prefs_manager_set_max_missing_words (gint max_missing_words);
+gint gtr_prefs_manager_get_max_missing_words (void);
-void gtranslator_prefs_manager_set_max_length_diff (gint max_length_diff);
-gint gtranslator_prefs_manager_get_max_length_diff (void);
+void gtr_prefs_manager_set_max_length_diff (gint max_length_diff);
+gint gtr_prefs_manager_get_max_length_diff (void);
/* UI */
-void gtranslator_prefs_manager_set_pane_switcher_style (GdlSwitcherStyle
+void gtr_prefs_manager_set_pane_switcher_style (GdlSwitcherStyle
pane_switcher_style);
-GdlSwitcherStyle gtranslator_prefs_manager_get_pane_switcher_style (void);
+GdlSwitcherStyle gtr_prefs_manager_get_pane_switcher_style (void);
-void gtranslator_prefs_manager_set_color_scheme (const gchar * color_scheme);
-const gchar *gtranslator_prefs_manager_get_color_scheme (void);
+void gtr_prefs_manager_set_color_scheme (const gchar * color_scheme);
+const gchar *gtr_prefs_manager_get_color_scheme (void);
-void gtranslator_prefs_manager_set_sort_order (GtrSortOrder
+void gtr_prefs_manager_set_sort_order (GtrSortOrder
sort_order);
-GtrSortOrder gtranslator_prefs_manager_get_sort_order (void);
+GtrSortOrder gtr_prefs_manager_get_sort_order (void);
#endif /* __GTR_PREFS_MANAGER_H__ */
diff --git a/src/gtr-profile.c b/src/gtr-profile.c
index 30b56ef..e1f7afb 100644
--- a/src/gtr-profile.c
+++ b/src/gtr-profile.c
@@ -46,7 +46,7 @@
GTR_TYPE_PROFILE, \
GtrProfilePrivate))
-G_DEFINE_TYPE (GtrProfile, gtranslator_profile, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GtrProfile, gtr_profile, G_TYPE_OBJECT)
struct _GtrProfilePrivate
{
/*
@@ -91,13 +91,13 @@ G_DEFINE_TYPE (GtrProfile, gtranslator_profile, G_TYPE_OBJECT)
gchar *plurals;
};
- static void gtranslator_profile_init (GtrProfile * profile)
+ static void gtr_profile_init (GtrProfile * profile)
{
profile->priv = GTR_PROFILE_GET_PRIVATE (profile);
}
static void
-gtranslator_profile_finalize (GObject * object)
+gtr_profile_finalize (GObject * object)
{
GtrProfile *profile = GTR_PROFILE (object);
@@ -111,17 +111,17 @@ gtranslator_profile_finalize (GObject * object)
g_free (profile->priv->group_email);
g_free (profile->priv->plurals);
- G_OBJECT_CLASS (gtranslator_profile_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_profile_parent_class)->finalize (object);
}
static void
-gtranslator_profile_class_init (GtrProfileClass * klass)
+gtr_profile_class_init (GtrProfileClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrProfilePrivate));
- object_class->finalize = gtranslator_profile_finalize;
+ object_class->finalize = gtr_profile_finalize;
}
/*
@@ -129,7 +129,7 @@ gtranslator_profile_class_init (GtrProfileClass * klass)
*/
GtrProfile *
-gtranslator_profile_new (void)
+gtr_profile_new (void)
{
GtrProfile *profile;
@@ -139,13 +139,13 @@ gtranslator_profile_new (void)
}
const gchar *
-gtranslator_profile_get_name (GtrProfile * profile)
+gtr_profile_get_name (GtrProfile * profile)
{
return profile->priv->name;
}
void
-gtranslator_profile_set_name (GtrProfile * profile,
+gtr_profile_set_name (GtrProfile * profile,
const gchar * data)
{
if (profile->priv->name)
@@ -154,13 +154,13 @@ gtranslator_profile_set_name (GtrProfile * profile,
}
const gchar *
-gtranslator_profile_get_author_name (GtrProfile * profile)
+gtr_profile_get_author_name (GtrProfile * profile)
{
return profile->priv->author_name;
}
void
-gtranslator_profile_set_author_name (GtrProfile * profile,
+gtr_profile_set_author_name (GtrProfile * profile,
const gchar * data)
{
if (profile->priv->author_name)
@@ -169,13 +169,13 @@ gtranslator_profile_set_author_name (GtrProfile * profile,
}
const gchar *
-gtranslator_profile_get_author_email (GtrProfile * profile)
+gtr_profile_get_author_email (GtrProfile * profile)
{
return profile->priv->author_email;
}
void
-gtranslator_profile_set_author_email (GtrProfile * profile,
+gtr_profile_set_author_email (GtrProfile * profile,
const gchar * data)
{
if (profile->priv->author_email)
@@ -184,13 +184,13 @@ gtranslator_profile_set_author_email (GtrProfile * profile,
}
const gchar *
-gtranslator_profile_get_language_name (GtrProfile * profile)
+gtr_profile_get_language_name (GtrProfile * profile)
{
return profile->priv->language_name;
}
void
-gtranslator_profile_set_language_name (GtrProfile * profile,
+gtr_profile_set_language_name (GtrProfile * profile,
const gchar * data)
{
if (profile->priv->language_name)
@@ -199,13 +199,13 @@ gtranslator_profile_set_language_name (GtrProfile * profile,
}
const gchar *
-gtranslator_profile_get_language_code (GtrProfile * profile)
+gtr_profile_get_language_code (GtrProfile * profile)
{
return profile->priv->language_code;
}
void
-gtranslator_profile_set_language_code (GtrProfile * profile,
+gtr_profile_set_language_code (GtrProfile * profile,
const gchar * data)
{
if (profile->priv->language_code)
@@ -214,13 +214,13 @@ gtranslator_profile_set_language_code (GtrProfile * profile,
}
const gchar *
-gtranslator_profile_get_charset (GtrProfile * profile)
+gtr_profile_get_charset (GtrProfile * profile)
{
return profile->priv->charset;
}
void
-gtranslator_profile_set_charset (GtrProfile * profile,
+gtr_profile_set_charset (GtrProfile * profile,
const gchar * data)
{
if (profile->priv->charset)
@@ -229,13 +229,13 @@ gtranslator_profile_set_charset (GtrProfile * profile,
}
const gchar *
-gtranslator_profile_get_encoding (GtrProfile * profile)
+gtr_profile_get_encoding (GtrProfile * profile)
{
return profile->priv->encoding;
}
void
-gtranslator_profile_set_encoding (GtrProfile * profile,
+gtr_profile_set_encoding (GtrProfile * profile,
const gchar * data)
{
if (profile->priv->encoding)
@@ -244,13 +244,13 @@ gtranslator_profile_set_encoding (GtrProfile * profile,
}
const gchar *
-gtranslator_profile_get_group_email (GtrProfile * profile)
+gtr_profile_get_group_email (GtrProfile * profile)
{
return profile->priv->group_email;
}
void
-gtranslator_profile_set_group_email (GtrProfile * profile,
+gtr_profile_set_group_email (GtrProfile * profile,
const gchar * data)
{
if (profile->priv->group_email)
@@ -259,13 +259,13 @@ gtranslator_profile_set_group_email (GtrProfile * profile,
}
const gchar *
-gtranslator_profile_get_plurals (GtrProfile * profile)
+gtr_profile_get_plurals (GtrProfile * profile)
{
return profile->priv->plurals;
}
void
-gtranslator_profile_set_plurals (GtrProfile * profile,
+gtr_profile_set_plurals (GtrProfile * profile,
const gchar * data)
{
if (profile->priv->plurals)
@@ -274,7 +274,7 @@ gtranslator_profile_set_plurals (GtrProfile * profile,
}
/**
- * gtranslator_profile_xml_new_entry:
+ * gtr_profile_xml_new_entry:
* @doc: a #xmlDocPtr.
* @profile: a #GtrProfile object.
*
@@ -282,7 +282,7 @@ gtranslator_profile_set_plurals (GtrProfile * profile,
*
*/
void
-gtranslator_profile_xml_new_entry (xmlDocPtr doc,
+gtr_profile_xml_new_entry (xmlDocPtr doc,
GtrProfile * profile)
{
xmlNodePtr root;
@@ -307,7 +307,7 @@ gtranslator_profile_xml_new_entry (xmlDocPtr doc,
}
/**
- * gtranslator_profile_xml_get_entry:
+ * gtr_profile_xml_get_entry:
* @child: a #xmlNodePtr.
*
* This function get the values of the #xmlNodePtr and save them into
@@ -316,12 +316,12 @@ gtranslator_profile_xml_new_entry (xmlDocPtr doc,
* Returns: a #GtrProfile object.
*/
GtrProfile *
-gtranslator_profile_xml_get_entry (xmlNodePtr child)
+gtr_profile_xml_get_entry (xmlNodePtr child)
{
xmlNodePtr node;
GtrProfile *profile;
- profile = gtranslator_profile_new ();
+ profile = gtr_profile_new ();
node = child->xmlChildrenNode;
@@ -347,7 +347,7 @@ gtranslator_profile_xml_get_entry (xmlNodePtr child)
}
/**
- * gtranslator_profile_get_profiles_from_xml_file:
+ * gtr_profile_get_profiles_from_xml_file:
* @filename: a filename path.
*
* This function get the profiles saved in a xml file
@@ -356,7 +356,7 @@ gtranslator_profile_xml_get_entry (xmlNodePtr child)
* returns: a #GList
*/
GList *
-gtranslator_profile_get_profiles_from_xml_file (gchar * filename)
+gtr_profile_get_profiles_from_xml_file (gchar * filename)
{
GList *profiles_list = NULL;
GtrProfile *profile;
@@ -365,7 +365,7 @@ gtranslator_profile_get_profiles_from_xml_file (gchar * filename)
gchar *active_profile;
GList *l;
- doc = gtranslator_xml_open_file (filename);
+ doc = gtr_xml_open_file (filename);
root = xmlDocGetRootElement (doc);
child = root->xmlChildrenNode;
@@ -376,7 +376,7 @@ gtranslator_profile_get_profiles_from_xml_file (gchar * filename)
while (child != NULL)
{
- profile = gtranslator_profile_xml_get_entry (child);
+ profile = gtr_profile_xml_get_entry (child);
profiles_list = g_list_append (profiles_list, profile);
child = child->next;
}
@@ -385,15 +385,15 @@ gtranslator_profile_get_profiles_from_xml_file (gchar * filename)
{
GtrProfile *profile;
profile = (GtrProfile *) l->data;
- if (!strcmp (gtranslator_profile_get_name (profile), active_profile))
- gtranslator_application_set_active_profile (GTR_APP, profile);
+ if (!strcmp (gtr_profile_get_name (profile), active_profile))
+ gtr_application_set_active_profile (GTR_APP, profile);
}
return profiles_list;
}
gint
-gtranslator_profile_save_profiles_in_xml (gchar * filename)
+gtr_profile_save_profiles_in_xml (gchar * filename)
{
xmlNodePtr root;
@@ -401,21 +401,21 @@ gtranslator_profile_save_profiles_in_xml (gchar * filename)
GList *profiles_list, *l;
GtrProfile *active_profile;
- doc = gtranslator_xml_new_doc ("list_of_profiles");
+ doc = gtr_xml_new_doc ("list_of_profiles");
- profiles_list = gtranslator_application_get_profiles (GTR_APP);
- active_profile = gtranslator_application_get_active_profile (GTR_APP);
+ profiles_list = gtr_application_get_profiles (GTR_APP);
+ active_profile = gtr_application_get_active_profile (GTR_APP);
root = xmlDocGetRootElement (doc);
xmlNewChild (root, NULL, "active",
- gtranslator_profile_get_name (active_profile));
+ gtr_profile_get_name (active_profile));
for (l = profiles_list; l; l = l->next)
{
GtrProfile *profile;
profile = (GtrProfile *) l->data;
- gtranslator_profile_xml_new_entry (doc, profile);
+ gtr_profile_xml_new_entry (doc, profile);
}
return xmlSaveFile (filename, doc);
diff --git a/src/gtr-profile.h b/src/gtr-profile.h
index 1b71dab..ca51dc0 100644
--- a/src/gtr-profile.h
+++ b/src/gtr-profile.h
@@ -1,12 +1,12 @@
/*
* (C) 2008 Pablo Sanxiao <psanxiao gmail com>
* Igalia
- *
+ *
* gtranslator is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* gtranslator is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -31,7 +31,7 @@
* Utility Macros
*/
-#define GTR_TYPE_PROFILE (gtranslator_profile_get_type ())
+#define GTR_TYPE_PROFILE (gtr_profile_get_type ())
#define GTR_PROFILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_PROFILE, GtrProfile))
#define GTR_PROFILE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_PROFILE, GtrProfileClass))
#define GTR_IS_PROFILE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_PROFILE))
@@ -67,76 +67,76 @@ struct _GtrProfileClass
* Public methods
*/
GType
-gtranslator_profile_get_type (void)
+gtr_profile_get_type (void)
G_GNUC_CONST;
- GType gtranslator_profile_register_type (GTypeModule * module);
+ GType gtr_profile_register_type (GTypeModule * module);
-GtrProfile * gtranslator_profile_new (void);
+GtrProfile * gtr_profile_new (void);
const gchar *
- gtranslator_profile_get_name (GtrProfile * profile);
+ gtr_profile_get_name (GtrProfile * profile);
void
- gtranslator_profile_set_name (GtrProfile * profile,
+ gtr_profile_set_name (GtrProfile * profile,
const gchar * data);
const gchar *
- gtranslator_profile_get_author_name (GtrProfile * profile);
+ gtr_profile_get_author_name (GtrProfile * profile);
void
- gtranslator_profile_set_author_name (GtrProfile * profile,
+ gtr_profile_set_author_name (GtrProfile * profile,
const gchar * data);
const gchar *
- gtranslator_profile_get_author_email (GtrProfile * profile);
+ gtr_profile_get_author_email (GtrProfile * profile);
void
- gtranslator_profile_set_author_email (GtrProfile * profile,
+ gtr_profile_set_author_email (GtrProfile * profile,
const gchar * data);
const gchar *
- gtranslator_profile_get_language_name (GtrProfile * profile);
+ gtr_profile_get_language_name (GtrProfile * profile);
void
- gtranslator_profile_set_language_name (GtrProfile * profile,
+ gtr_profile_set_language_name (GtrProfile * profile,
const gchar * data);
const gchar *
- gtranslator_profile_get_language_code (GtrProfile * profile);
+ gtr_profile_get_language_code (GtrProfile * profile);
void
- gtranslator_profile_set_language_code (GtrProfile * profile,
+ gtr_profile_set_language_code (GtrProfile * profile,
const gchar * data);
const gchar *
- gtranslator_profile_get_charset (GtrProfile * profile);
+ gtr_profile_get_charset (GtrProfile * profile);
void
- gtranslator_profile_set_charset (GtrProfile * profile,
+ gtr_profile_set_charset (GtrProfile * profile,
const gchar * data);
const gchar *
- gtranslator_profile_get_encoding (GtrProfile * profile);
+ gtr_profile_get_encoding (GtrProfile * profile);
void
- gtranslator_profile_set_encoding (GtrProfile * profile,
+ gtr_profile_set_encoding (GtrProfile * profile,
const gchar * data);
const gchar *
- gtranslator_profile_get_group_email (GtrProfile * profile);
+ gtr_profile_get_group_email (GtrProfile * profile);
void
- gtranslator_profile_set_group_email (GtrProfile * profile,
+ gtr_profile_set_group_email (GtrProfile * profile,
const gchar * data);
const gchar *
- gtranslator_profile_get_plurals (GtrProfile * profile);
+ gtr_profile_get_plurals (GtrProfile * profile);
void
- gtranslator_profile_set_plurals (GtrProfile * profile,
+ gtr_profile_set_plurals (GtrProfile * profile,
const gchar * data);
void
- gtranslator_profile_xml_new_entry (xmlDocPtr doc,
+ gtr_profile_xml_new_entry (xmlDocPtr doc,
GtrProfile * profile);
-GtrProfile * gtranslator_profile_xml_get_entry (xmlNodePtr child);
+GtrProfile * gtr_profile_xml_get_entry (xmlNodePtr child);
GList *
- gtranslator_profile_get_profiles_from_xml_file (gchar * filename);
+ gtr_profile_get_profiles_from_xml_file (gchar * filename);
gint
- gtranslator_profile_save_profiles_in_xml (gchar * filename);
+ gtr_profile_save_profiles_in_xml (gchar * filename);
#endif /* __PROFILE_H__ */
diff --git a/src/gtr-statusbar.c b/src/gtr-statusbar.c
index a003817..cfd9933 100644
--- a/src/gtr-statusbar.c
+++ b/src/gtr-statusbar.c
@@ -48,30 +48,30 @@ struct _GtrStatusbarPrivate
guint flash_message_id;
};
-G_DEFINE_TYPE (GtrStatusbar, gtranslator_statusbar, GTK_TYPE_HBOX)
- static void gtranslator_statusbar_finalize (GObject * object)
+G_DEFINE_TYPE (GtrStatusbar, gtr_statusbar, GTK_TYPE_HBOX)
+ static void gtr_statusbar_finalize (GObject * object)
{
GtrStatusbar *statusbar = GTR_STATUSBAR (object);
if (statusbar->priv->flash_timeout > 0)
g_source_remove (statusbar->priv->flash_timeout);
- G_OBJECT_CLASS (gtranslator_statusbar_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_statusbar_parent_class)->finalize (object);
}
static void
-gtranslator_statusbar_class_init (GtrStatusbarClass * klass)
+gtr_statusbar_class_init (GtrStatusbarClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = gtranslator_statusbar_finalize;
+ object_class->finalize = gtr_statusbar_finalize;
g_type_class_add_private (object_class,
sizeof (GtrStatusbarPrivate));
}
static void
-gtranslator_statusbar_init (GtrStatusbar * statusbar)
+gtr_statusbar_init (GtrStatusbar * statusbar)
{
GtkWidget *frame;
GtkShadowType shadow_type;
@@ -128,27 +128,27 @@ gtranslator_statusbar_init (GtrStatusbar * statusbar)
}
/**
- * gtranslator_statusbar_new:
+ * gtr_statusbar_new:
*
* Creates a new #GtrStatusbar.
*
* Return value: the new #GtrStatusbar object
**/
GtkWidget *
-gtranslator_statusbar_new (void)
+gtr_statusbar_new (void)
{
return GTK_WIDGET (g_object_new (GTR_TYPE_STATUSBAR, NULL));
}
/**
- * gtranslator_statusbar_push_default:
+ * gtr_statusbar_push_default:
* @statusbar: a #GtrStatusbar
* @text: the text to push in the statusbar
*
* Pushes a text onto the statusbar in the default context id.
*/
void
-gtranslator_statusbar_push_default (GtrStatusbar * statusbar,
+gtr_statusbar_push_default (GtrStatusbar * statusbar,
const gchar * text)
{
g_return_if_fail (GTR_IS_STATUSBAR (statusbar));
@@ -158,13 +158,13 @@ gtranslator_statusbar_push_default (GtrStatusbar * statusbar,
}
/**
- * gtranslator_statusbar_pop_default:
+ * gtr_statusbar_pop_default:
* @statusbar: a #GtrStatusbar
*
* Pops the text in the statusbar of the default context id.
*/
void
-gtranslator_statusbar_pop_default (GtrStatusbar * statusbar)
+gtr_statusbar_pop_default (GtrStatusbar * statusbar)
{
g_return_if_fail (GTR_IS_STATUSBAR (statusbar));
@@ -173,7 +173,7 @@ gtranslator_statusbar_pop_default (GtrStatusbar * statusbar)
}
/**
- * gtranslator_statusbar_push:
+ * gtr_statusbar_push:
* @statusbar: a #GtrStatusbar
* @context_id: the message's context id, as returned by gtk_statusbar_get_context_id()
* @text: the text to push in the statusbar
@@ -183,7 +183,7 @@ gtranslator_statusbar_pop_default (GtrStatusbar * statusbar)
* Returns: a message id that can be used with gtk_statusbar_remove()
*/
guint
-gtranslator_statusbar_push (GtrStatusbar * statusbar,
+gtr_statusbar_push (GtrStatusbar * statusbar,
guint context_id, const gchar * text)
{
g_return_val_if_fail (GTR_IS_STATUSBAR (statusbar), 0);
@@ -193,14 +193,14 @@ gtranslator_statusbar_push (GtrStatusbar * statusbar,
}
/**
- * gtranslator_statusbar_pop:
+ * gtr_statusbar_pop:
* @statusbar: a #GtrStatusbar
* @context_id: a context identifier
*
* Removes the first message in the GtkStatusBar's stack with the given context id.
*/
void
-gtranslator_statusbar_pop (GtrStatusbar * statusbar, guint context_id)
+gtr_statusbar_pop (GtrStatusbar * statusbar, guint context_id)
{
g_return_if_fail (GTR_IS_STATUSBAR (statusbar));
@@ -208,7 +208,7 @@ gtranslator_statusbar_pop (GtrStatusbar * statusbar, guint context_id)
}
/**
- * gtranslator_statusbar_get_context_id:
+ * gtr_statusbar_get_context_id:
* @statusbar: a #GtrStatusbar
* @context_description: textual description of what context the new message is being used in
*
@@ -218,7 +218,7 @@ gtranslator_statusbar_pop (GtrStatusbar * statusbar, guint context_id)
* Returns: an integer id
*/
guint
-gtranslator_statusbar_get_context_id (GtrStatusbar * statusbar,
+gtr_statusbar_get_context_id (GtrStatusbar * statusbar,
const gchar * context_description)
{
return
@@ -227,14 +227,14 @@ gtranslator_statusbar_get_context_id (GtrStatusbar * statusbar,
}
/**
- * gtranslator_statusbar_set_overwrite:
+ * gtr_statusbar_set_overwrite:
* @statusbar: a #GtrStatusbar
* @overwrite: if the overwrite mode is set
*
* Sets the overwrite mode on the statusbar.
**/
void
-gtranslator_statusbar_set_overwrite (GtrStatusbar * statusbar,
+gtr_statusbar_set_overwrite (GtrStatusbar * statusbar,
gboolean overwrite)
{
g_return_if_fail (GTR_IS_STATUSBAR (statusbar));
@@ -250,13 +250,13 @@ gtranslator_statusbar_set_overwrite (GtrStatusbar * statusbar,
}
/**
- * gtranslator_statusbar_clear_overwrite:
+ * gtr_statusbar_clear_overwrite:
* @statusbar: a #GtrStatusbar
*
* Clears the statusbar overwrite label.
*/
void
-gtranslator_statusbar_clear_overwrite (GtrStatusbar * statusbar)
+gtr_statusbar_clear_overwrite (GtrStatusbar * statusbar)
{
g_return_if_fail (GTR_IS_STATUSBAR (statusbar));
@@ -276,7 +276,7 @@ remove_message_timeout (GtrStatusbar * statusbar)
}
/**
- * gtranslator_statusbar_flash_message:
+ * gtr_statusbar_flash_message:
* @statusbar: a #GtrStatusbar
* @context_id: message context_id
* @format: message to flash on the statusbar
@@ -284,7 +284,7 @@ remove_message_timeout (GtrStatusbar * statusbar)
* Flash a temporary message on the statusbar.
*/
void
-gtranslator_statusbar_flash_message (GtrStatusbar * statusbar,
+gtr_statusbar_flash_message (GtrStatusbar * statusbar,
guint context_id,
const gchar * format, ...)
{
@@ -324,7 +324,7 @@ gtranslator_statusbar_flash_message (GtrStatusbar * statusbar,
}
/**
- * gtranslator_statusbar_update_progress_bar:
+ * gtr_statusbar_update_progress_bar:
* @statusbar: a #GtrStatusbar
* @translated_count: the number of translated messages
* @messages_count: the number of messages
@@ -332,7 +332,7 @@ gtranslator_statusbar_flash_message (GtrStatusbar * statusbar,
* Updates the state of the progress bar with the given values.
*/
void
-gtranslator_statusbar_update_progress_bar (GtrStatusbar * statusbar,
+gtr_statusbar_update_progress_bar (GtrStatusbar * statusbar,
gdouble translated_count,
gdouble messages_count)
{
@@ -365,13 +365,13 @@ gtranslator_statusbar_update_progress_bar (GtrStatusbar * statusbar,
}
/**
- * gtranslator_statusbar_clear_progress_bar:
+ * gtr_statusbar_clear_progress_bar:
* @statusbar: a #GtrStatusbar
*
* Clear the progress bar
*/
void
-gtranslator_statusbar_clear_progress_bar (GtrStatusbar * statusbar)
+gtr_statusbar_clear_progress_bar (GtrStatusbar * statusbar)
{
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR
(statusbar->priv->progress_bar), 0.0);
diff --git a/src/gtr-statusbar.h b/src/gtr-statusbar.h
index 24d7d8d..8220e61 100644
--- a/src/gtr-statusbar.h
+++ b/src/gtr-statusbar.h
@@ -24,7 +24,7 @@
#include <gtk/gtk.h>
G_BEGIN_DECLS
-#define GTR_TYPE_STATUSBAR (gtranslator_statusbar_get_type ())
+#define GTR_TYPE_STATUSBAR (gtr_statusbar_get_type ())
#define GTR_STATUSBAR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_STATUSBAR, GtrStatusbar))
#define GTR_STATUSBAR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_STATUSBAR, GtrStatusbarClass))
#define GTR_IS_STATUSBAR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_STATUSBAR))
@@ -48,45 +48,45 @@ struct _GtrStatusbarClass
};
GType
-gtranslator_statusbar_get_type (void)
+gtr_statusbar_get_type (void)
G_GNUC_CONST;
- GtkWidget *gtranslator_statusbar_new (void);
+ GtkWidget *gtr_statusbar_new (void);
- void gtranslator_statusbar_push_default (GtrStatusbar *
+ void gtr_statusbar_push_default (GtrStatusbar *
statusbar, const gchar * text);
- void gtranslator_statusbar_pop_default (GtrStatusbar *
+ void gtr_statusbar_pop_default (GtrStatusbar *
statusbar);
- guint gtranslator_statusbar_push (GtrStatusbar * statusbar,
+ guint gtr_statusbar_push (GtrStatusbar * statusbar,
guint context_id, const gchar * text);
- void gtranslator_statusbar_pop (GtrStatusbar * statusbar,
+ void gtr_statusbar_pop (GtrStatusbar * statusbar,
guint context_id);
- guint gtranslator_statusbar_get_context_id (GtrStatusbar *
+ guint gtr_statusbar_get_context_id (GtrStatusbar *
statusbar,
const gchar *
context_description);
- void gtranslator_statusbar_set_overwrite (GtrStatusbar *
+ void gtr_statusbar_set_overwrite (GtrStatusbar *
statusbar, gboolean overwrite);
- void gtranslator_statusbar_clear_overwrite (GtrStatusbar *
+ void gtr_statusbar_clear_overwrite (GtrStatusbar *
statusbar);
- void gtranslator_statusbar_flash_message (GtrStatusbar *
+ void gtr_statusbar_flash_message (GtrStatusbar *
statusbar, guint context_id,
const gchar * format,
...) G_GNUC_PRINTF (3, 4);
- void gtranslator_statusbar_update_progress_bar (GtrStatusbar *
+ void gtr_statusbar_update_progress_bar (GtrStatusbar *
statusbar,
gdouble translated_count,
gdouble messages_count);
- void gtranslator_statusbar_clear_progress_bar (GtrStatusbar *
+ void gtr_statusbar_clear_progress_bar (GtrStatusbar *
statusbar);
G_END_DECLS
diff --git a/src/gtr-tab.c b/src/gtr-tab.c
index 6c85bde..c7e7cbd 100644
--- a/src/gtr-tab.c
+++ b/src/gtr-tab.c
@@ -59,7 +59,7 @@
#define GTR_TAB_KEY "GtrTabFromDocument"
-G_DEFINE_TYPE (GtrTab, gtranslator_tab, GTK_TYPE_VBOX)
+G_DEFINE_TYPE (GtrTab, gtr_tab, GTK_TYPE_VBOX)
struct _GtrTabPrivate
{
@@ -126,7 +126,7 @@ enum
static guint signals[LAST_SIGNAL];
-static gboolean gtranslator_tab_autosave (GtrTab * tab);
+static gboolean gtr_tab_autosave (GtrTab * tab);
static void
install_autosave_timeout (GtrTab * tab)
@@ -139,7 +139,7 @@ install_autosave_timeout (GtrTab * tab)
/* Add a new timeout */
timeout = g_timeout_add (tab->priv->autosave_interval * 1000 * 60,
- (GSourceFunc) gtranslator_tab_autosave, tab);
+ (GSourceFunc) gtr_tab_autosave, tab);
tab->priv->autosave_timeout = timeout;
}
@@ -160,14 +160,14 @@ install_autosave_timeout_if_needed (GtrTab * tab)
}
static gboolean
-gtranslator_tab_autosave (GtrTab * tab)
+gtr_tab_autosave (GtrTab * tab)
{
GError *error = NULL;
- if (!gtranslator_po_get_state (tab->priv->po) == GTR_PO_STATE_MODIFIED)
+ if (!gtr_po_get_state (tab->priv->po) == GTR_PO_STATE_MODIFIED)
return TRUE;
- gtranslator_po_save_file (tab->priv->po, &error);
+ gtr_po_save_file (tab->priv->po, &error);
if (error)
{
g_warning ("%s", error->message);
@@ -187,48 +187,48 @@ remove_autosave_timeout (GtrTab * tab)
}
static void
-gtranslator_tab_showed_message (GtrTab * tab, GtrMsg * msg)
+gtr_tab_showed_message (GtrTab * tab, GtrMsg * msg)
{
- if (strcmp (gtranslator_msg_get_comment (msg), "") != 0)
+ if (strcmp (gtr_msg_get_comment (msg), "") != 0)
gtk_widget_show (tab->priv->comment_button);
else
gtk_widget_hide (tab->priv->comment_button);
}
static void
-gtranslator_tab_edition_finished (GtrTab * tab, GtrMsg * msg)
+gtr_tab_edition_finished (GtrTab * tab, GtrMsg * msg)
{
GtrTranslationMemory *tm;
gchar *message_error;
GtkWidget *infobar;
tm =
- GTR_TRANSLATION_MEMORY (gtranslator_application_get_translation_memory
+ GTR_TRANSLATION_MEMORY (gtr_application_get_translation_memory
(GTR_APP));
- if (gtranslator_msg_is_translated (msg) && !gtranslator_msg_is_fuzzy (msg))
- gtranslator_translation_memory_store (tm,
- gtranslator_msg_get_msgid (msg),
- gtranslator_msg_get_msgstr (msg));
+ if (gtr_msg_is_translated (msg) && !gtr_msg_is_fuzzy (msg))
+ gtr_translation_memory_store (tm,
+ gtr_msg_get_msgid (msg),
+ gtr_msg_get_msgstr (msg));
/*
* Checking message
*/
- message_error = gtranslator_msg_check (msg);
+ message_error = gtr_msg_check (msg);
if (message_error != NULL)
{
- gtranslator_tab_block_movement (tab);
+ gtr_tab_block_movement (tab);
infobar = create_error_info_bar (_("There is an error in the message:"),
message_error);
- gtranslator_tab_set_info_bar (tab, infobar);
+ gtr_tab_set_info_bar (tab, infobar);
g_free (message_error);
}
else
{
- gtranslator_tab_unblock_movement (tab);
- gtranslator_tab_set_info_bar (tab, NULL);
+ gtr_tab_unblock_movement (tab);
+ gtr_tab_set_info_bar (tab, NULL);
}
}
@@ -237,7 +237,7 @@ gtranslator_tab_edition_finished (GtrTab * tab, GtrMsg * msg)
* mark the page dirty
*/
static void
-gtranslator_message_translation_update (GtkTextBuffer * textbuffer,
+gtr_message_translation_update (GtkTextBuffer * textbuffer,
GtrTab * tab)
{
GtrHeader *header;
@@ -251,15 +251,15 @@ gtranslator_message_translation_update (GtkTextBuffer * textbuffer,
/* Work out which message this is associated with */
- header = gtranslator_po_get_header (tab->priv->po);
+ header = gtr_po_get_header (tab->priv->po);
- msg_aux = gtranslator_po_get_current_message (tab->priv->po);
+ msg_aux = gtr_po_get_current_message (tab->priv->po);
msg = msg_aux->data;
buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (tab->priv->trans_msgstr[0]));
- if (gtranslator_msg_is_fuzzy (msg)
- && gtranslator_prefs_manager_get_unmark_fuzzy_when_changed ())
- gtranslator_msg_set_fuzzy (msg, FALSE);
+ if (gtr_msg_is_fuzzy (msg)
+ && gtr_prefs_manager_get_unmark_fuzzy_when_changed ())
+ gtr_msg_set_fuzzy (msg, FALSE);
if (textbuffer == buf)
{
@@ -270,20 +270,20 @@ gtranslator_message_translation_update (GtkTextBuffer * textbuffer,
/* TODO: convert to file's own encoding if not UTF-8 */
/* Write back to PO file in memory */
- if (!(check = gtranslator_msg_get_msgid_plural (msg)))
+ if (!(check = gtr_msg_get_msgid_plural (msg)))
{
- gtranslator_msg_set_msgstr (msg, translation);
+ gtr_msg_set_msgstr (msg, translation);
}
else
{
- gtranslator_msg_set_msgstr_plural (msg, 0, translation);
+ gtr_msg_set_msgstr_plural (msg, 0, translation);
//free(check);
}
g_free (translation);
return;
}
i = 1;
- while (i < gtranslator_header_get_nplurals (header))
+ while (i < gtr_header_get_nplurals (header))
{
/* Know when to break out of the loop */
if (!tab->priv->trans_msgstr[i])
@@ -307,7 +307,7 @@ gtranslator_message_translation_update (GtkTextBuffer * textbuffer,
/* TODO: convert to file's own encoding if not UTF-8 */
/* Write back to PO file in memory */
- gtranslator_msg_set_msgstr_plural (msg, i, translation);
+ gtr_msg_set_msgstr_plural (msg, i, translation);
return;
}
@@ -319,7 +319,7 @@ gtranslator_message_translation_update (GtkTextBuffer * textbuffer,
static GtkWidget *
-gtranslator_tab_append_msgstr_page (const gchar * tab_label,
+gtr_tab_append_msgstr_page (const gchar * tab_label,
GtkWidget * box, gboolean spellcheck)
{
GtkWidget *scroll;
@@ -331,11 +331,11 @@ gtranslator_tab_append_msgstr_page (const gchar * tab_label,
scroll = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_show (scroll);
- widget = gtranslator_view_new ();
+ widget = gtr_view_new ();
gtk_widget_show (widget);
- if (spellcheck && gtranslator_prefs_manager_get_spellcheck ())
- gtranslator_view_enable_spellcheck (GTR_VIEW (widget), spellcheck);
+ if (spellcheck && gtr_prefs_manager_get_spellcheck ())
+ gtr_view_enable_spellcheck (GTR_VIEW (widget), spellcheck);
gtk_container_add (GTK_CONTAINER (scroll), widget);
@@ -351,7 +351,7 @@ gtranslator_tab_append_msgstr_page (const gchar * tab_label,
}
static void
-gtranslator_message_plural_forms (GtrTab * tab, GtrMsg * msg)
+gtr_message_plural_forms (GtrTab * tab, GtrMsg * msg)
{
GtrHeader *header;
GtkTextBuffer *buf;
@@ -361,11 +361,11 @@ gtranslator_message_plural_forms (GtrTab * tab, GtrMsg * msg)
g_return_if_fail (tab != NULL);
g_return_if_fail (msg != NULL);
- header = gtranslator_po_get_header (tab->priv->po);
+ header = gtr_po_get_header (tab->priv->po);
- for (i = 0; i < gtranslator_header_get_nplurals (header); i++)
+ for (i = 0; i < gtr_header_get_nplurals (header); i++)
{
- msgstr_plural = gtranslator_msg_get_msgstr_plural (msg, i);
+ msgstr_plural = gtr_msg_get_msgstr_plural (msg, i);
if (msgstr_plural)
{
buf =
@@ -380,7 +380,7 @@ gtranslator_message_plural_forms (GtrTab * tab, GtrMsg * msg)
}
static GtkWidget *
-gtranslator_tab_create_comment_button ()
+gtr_tab_create_comment_button ()
{
GtkWidget *button;
GtkWidget *image;
@@ -404,13 +404,13 @@ static void
on_comment_button_clicked (GtkButton * button, gpointer useless)
{
GtrWindow *window =
- gtranslator_application_get_active_window (GTR_APP);
+ gtr_application_get_active_window (GTR_APP);
- gtranslator_show_comment_dialog (window);
+ gtr_show_comment_dialog (window);
}
/*
- * gtranslator_tab_show_message:
+ * gtr_tab_show_message:
* @tab: a #GtranslationTab
* @msg: a #GtrMsg
*
@@ -418,7 +418,7 @@ on_comment_button_clicked (GtkButton * button, gpointer useless)
*
*/
static void
-gtranslator_tab_show_message (GtrTab * tab, GtrMsg * msg)
+gtr_tab_show_message (GtrTab * tab, GtrMsg * msg)
{
GtrTabPrivate *priv = tab->priv;
GtrPo *po;
@@ -429,8 +429,8 @@ gtranslator_tab_show_message (GtrTab * tab, GtrMsg * msg)
g_return_if_fail (GTR_IS_TAB (tab));
po = priv->po;
- gtranslator_po_update_current_message (po, msg);
- msgid = gtranslator_msg_get_msgid (msg);
+ gtr_po_update_current_message (po, msg);
+ msgid = gtr_msg_get_msgid (msg);
if (msgid)
{
buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->text_msgid));
@@ -438,10 +438,10 @@ gtranslator_tab_show_message (GtrTab * tab, GtrMsg * msg)
gtk_text_buffer_set_text (buf, (gchar *) msgid, -1);
gtk_source_buffer_end_not_undoable_action (GTK_SOURCE_BUFFER (buf));
}
- msgid_plural = gtranslator_msg_get_msgid_plural (msg);
+ msgid_plural = gtr_msg_get_msgid_plural (msg);
if (!msgid_plural)
{
- msgstr = gtranslator_msg_get_msgstr (msg);
+ msgstr = gtr_msg_get_msgstr (msg);
/*
* Disable notebook tabs and hide widgets
*/
@@ -469,7 +469,7 @@ gtranslator_tab_show_message (GtrTab * tab, GtrMsg * msg)
gtk_text_view_get_buffer (GTK_TEXT_VIEW
(tab->priv->text_msgid_plural));
gtk_text_buffer_set_text (buf, (gchar *) msgid_plural, -1);
- gtranslator_message_plural_forms (tab, msg);
+ gtr_message_plural_forms (tab, msg);
}
}
@@ -478,7 +478,7 @@ emit_message_changed_signal (GtkTextBuffer * buf, GtrTab * tab)
{
GList *msg;
- msg = gtranslator_po_get_current_message (tab->priv->po);
+ msg = gtr_po_get_current_message (tab->priv->po);
g_signal_emit (G_OBJECT (tab), signals[MESSAGE_CHANGED], 0, msg->data);
}
@@ -490,19 +490,19 @@ update_status (GtrTab * tab, GtrMsg * msg, gpointer useless)
GtrPoState po_state;
gboolean fuzzy, translated;
- status = gtranslator_msg_get_status (msg);
- po_state = gtranslator_po_get_state (tab->priv->po);
+ status = gtr_msg_get_status (msg);
+ po_state = gtr_po_get_state (tab->priv->po);
- fuzzy = gtranslator_msg_is_fuzzy (msg);
- translated = gtranslator_msg_is_translated (msg);
+ fuzzy = gtr_msg_is_fuzzy (msg);
+ translated = gtr_msg_is_translated (msg);
if ((status == GTR_MSG_STATUS_FUZZY) && !fuzzy)
{
- _gtranslator_po_increase_decrease_fuzzy (tab->priv->po, FALSE);
+ _gtr_po_increase_decrease_fuzzy (tab->priv->po, FALSE);
if (translated)
{
status = GTR_MSG_STATUS_TRANSLATED;
- _gtranslator_po_increase_decrease_translated (tab->priv->po, TRUE);
+ _gtr_po_increase_decrease_translated (tab->priv->po, TRUE);
}
else
{
@@ -512,40 +512,40 @@ update_status (GtrTab * tab, GtrMsg * msg, gpointer useless)
else if ((status == GTR_MSG_STATUS_TRANSLATED) && !translated)
{
status = GTR_MSG_STATUS_UNTRANSLATED;
- _gtranslator_po_increase_decrease_translated (tab->priv->po, FALSE);
+ _gtr_po_increase_decrease_translated (tab->priv->po, FALSE);
}
else if ((status == GTR_MSG_STATUS_TRANSLATED) && fuzzy)
{
status = GTR_MSG_STATUS_FUZZY;
- _gtranslator_po_increase_decrease_translated (tab->priv->po, FALSE);
- _gtranslator_po_increase_decrease_fuzzy (tab->priv->po, TRUE);
+ _gtr_po_increase_decrease_translated (tab->priv->po, FALSE);
+ _gtr_po_increase_decrease_fuzzy (tab->priv->po, TRUE);
}
else if ((status == GTR_MSG_STATUS_UNTRANSLATED) && translated)
{
if (fuzzy)
{
status = GTR_MSG_STATUS_FUZZY;
- _gtranslator_po_increase_decrease_fuzzy (tab->priv->po, TRUE);
+ _gtr_po_increase_decrease_fuzzy (tab->priv->po, TRUE);
}
else
{
status = GTR_MSG_STATUS_TRANSLATED;
- _gtranslator_po_increase_decrease_translated (tab->priv->po, TRUE);
+ _gtr_po_increase_decrease_translated (tab->priv->po, TRUE);
}
}
- gtranslator_msg_set_status (msg, status);
+ gtr_msg_set_status (msg, status);
/* We need to update the tab state too if is neccessary */
if (po_state != GTR_PO_STATE_MODIFIED)
- gtranslator_po_set_state (tab->priv->po, GTR_PO_STATE_MODIFIED);
+ gtr_po_set_state (tab->priv->po, GTR_PO_STATE_MODIFIED);
}
static void
comment_pane_position_changed (GObject * tab_gobject,
GParamSpec * arg1, GtrTab * tab)
{
- gtranslator_prefs_manager_set_comment_pane_pos (gtk_paned_get_position
+ gtr_prefs_manager_set_comment_pane_pos (gtk_paned_get_position
(GTK_PANED (tab_gobject)));
}
@@ -553,12 +553,12 @@ static void
content_pane_position_changed (GObject * tab_gobject,
GParamSpec * arg1, GtrTab * tab)
{
- gtranslator_prefs_manager_set_content_pane_pos (gtk_paned_get_position
+ gtr_prefs_manager_set_content_pane_pos (gtk_paned_get_position
(GTK_PANED (tab_gobject)));
}
static void
-gtranslator_tab_add_msgstr_tabs (GtrTab * tab)
+gtr_tab_add_msgstr_tabs (GtrTab * tab)
{
GtrHeader *header;
GtrTabPrivate *priv = tab->priv;
@@ -569,18 +569,18 @@ gtranslator_tab_add_msgstr_tabs (GtrTab * tab)
/*
* We get the header of the po file
*/
- header = gtranslator_po_get_header (tab->priv->po);
+ header = gtr_po_get_header (tab->priv->po);
do
{
label = g_strdup_printf (_("Plural %d"), i + 1);
- priv->trans_msgstr[i] = gtranslator_tab_append_msgstr_page (label,
+ priv->trans_msgstr[i] = gtr_tab_append_msgstr_page (label,
priv->
trans_notebook,
TRUE);
buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->trans_msgstr[i]));
g_signal_connect (buf, "end-user-action",
- G_CALLBACK (gtranslator_message_translation_update),
+ G_CALLBACK (gtr_message_translation_update),
tab);
g_signal_connect_after (buf, "end_user_action",
@@ -588,11 +588,11 @@ gtranslator_tab_add_msgstr_tabs (GtrTab * tab)
i++;
g_free (label);
}
- while (i < gtranslator_header_get_nplurals (header));
+ while (i < gtr_header_get_nplurals (header));
}
static void
-gtranslator_tab_draw (GtrTab * tab)
+gtr_tab_draw (GtrTab * tab)
{
gint current_page_num;
GtkWidget *image;
@@ -615,7 +615,7 @@ gtranslator_tab_draw (GtrTab * tab)
/*
* Message table
*/
- priv->message_table = gtranslator_message_table_new (GTK_WIDGET (tab));
+ priv->message_table = gtr_message_table_new (GTK_WIDGET (tab));
gtk_widget_show (priv->message_table);
label_widget = gtk_label_new (_("Message Table"));
@@ -630,7 +630,7 @@ gtranslator_tab_draw (GtrTab * tab)
*/
priv->comment_pane = gtk_hpaned_new ();
gtk_paned_set_position (GTK_PANED (priv->comment_pane),
- gtranslator_prefs_manager_get_comment_pane_pos ());
+ gtr_prefs_manager_get_comment_pane_pos ());
g_signal_connect (priv->comment_pane, "notify::position",
G_CALLBACK (comment_pane_position_changed), tab);
gtk_widget_show (priv->comment_pane);
@@ -647,18 +647,18 @@ gtranslator_tab_draw (GtrTab * tab)
/*
* Context
*/
- priv->context = gtranslator_context_panel_new (GTK_WIDGET (tab));
+ priv->context = gtr_context_panel_new (GTK_WIDGET (tab));
gtk_widget_show (priv->context);
- gtranslator_tab_add_widget_to_lateral_panel (tab, priv->context,
+ gtr_tab_add_widget_to_lateral_panel (tab, priv->context,
_("Context"));
/*
* TM
*/
priv->translation_memory =
- gtranslator_translation_memory_ui_new (GTK_WIDGET (tab));
+ gtr_translation_memory_ui_new (GTK_WIDGET (tab));
gtk_widget_show (priv->translation_memory);
- gtranslator_tab_add_widget_to_lateral_panel (tab, priv->translation_memory,
+ gtr_tab_add_widget_to_lateral_panel (tab, priv->translation_memory,
_("Translation Memory"));
/*
@@ -666,7 +666,7 @@ gtranslator_tab_draw (GtrTab * tab)
*/
priv->content_pane = gtk_vpaned_new ();
gtk_paned_set_position (GTK_PANED (priv->content_pane),
- gtranslator_prefs_manager_get_content_pane_pos ());
+ gtr_prefs_manager_get_content_pane_pos ());
g_signal_connect (priv->content_pane,
"notify::position",
G_CALLBACK (content_pane_position_changed), tab);
@@ -703,7 +703,7 @@ gtranslator_tab_draw (GtrTab * tab)
scroll = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_show (scroll);
- priv->text_msgid = gtranslator_view_new ();
+ priv->text_msgid = gtr_view_new ();
gtk_text_view_set_editable (GTK_TEXT_VIEW (priv->text_msgid), FALSE);
gtk_widget_show (priv->text_msgid);
@@ -720,7 +720,7 @@ gtranslator_tab_draw (GtrTab * tab)
priv->text_plural_scroll = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_show (priv->text_plural_scroll);
- priv->text_msgid_plural = gtranslator_view_new ();
+ priv->text_msgid_plural = gtr_view_new ();
gtk_text_view_set_editable (GTK_TEXT_VIEW (priv->text_msgid_plural), FALSE);
gtk_widget_show (priv->text_msgid_plural);
@@ -758,7 +758,7 @@ gtranslator_tab_draw (GtrTab * tab)
gtk_box_pack_start (GTK_BOX (priv->msgstr_hbox), priv->msgstr_label, TRUE,
TRUE, 0);
- priv->comment_button = gtranslator_tab_create_comment_button ();
+ priv->comment_button = gtr_tab_create_comment_button ();
gtk_box_pack_start (GTK_BOX (priv->msgstr_hbox), priv->comment_button,
FALSE, FALSE, 0);
g_signal_connect (priv->comment_button, "clicked",
@@ -780,26 +780,26 @@ gtranslator_tab_draw (GtrTab * tab)
}
static void
-gtranslator_tab_init (GtrTab * tab)
+gtr_tab_init (GtrTab * tab)
{
tab->priv = GTR_TAB_GET_PRIVATE (tab);
g_signal_connect (tab, "message-changed", G_CALLBACK (update_status), NULL);
- gtranslator_tab_draw (tab);
+ gtr_tab_draw (tab);
/* Manage auto save data */
- tab->priv->autosave = gtranslator_prefs_manager_get_autosave ();
+ tab->priv->autosave = gtr_prefs_manager_get_autosave ();
tab->priv->autosave = (tab->priv->autosave != FALSE);
tab->priv->autosave_interval =
- gtranslator_prefs_manager_get_autosave_interval ();
+ gtr_prefs_manager_get_autosave_interval ();
if (tab->priv->autosave_interval <= 0)
tab->priv->autosave_interval = 1;
}
static void
-gtranslator_tab_finalize (GObject * object)
+gtr_tab_finalize (GObject * object)
{
GtrTab *tab = GTR_TAB (object);
@@ -812,11 +812,11 @@ gtranslator_tab_finalize (GObject * object)
if (tab->priv->autosave_timeout > 0)
remove_autosave_timeout (tab);
- G_OBJECT_CLASS (gtranslator_tab_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_tab_parent_class)->finalize (object);
}
static void
-gtranslator_tab_get_property (GObject * object,
+gtr_tab_get_property (GObject * object,
guint prop_id,
GValue * value, GParamSpec * pspec)
{
@@ -825,10 +825,10 @@ gtranslator_tab_get_property (GObject * object,
switch (prop_id)
{
case PROP_AUTOSAVE:
- g_value_set_boolean (value, gtranslator_tab_get_autosave_enabled (tab));
+ g_value_set_boolean (value, gtr_tab_get_autosave_enabled (tab));
break;
case PROP_AUTOSAVE_INTERVAL:
- g_value_set_int (value, gtranslator_tab_get_autosave_interval (tab));
+ g_value_set_int (value, gtr_tab_get_autosave_interval (tab));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -837,7 +837,7 @@ gtranslator_tab_get_property (GObject * object,
}
static void
-gtranslator_tab_set_property (GObject * object,
+gtr_tab_set_property (GObject * object,
guint prop_id,
const GValue * value, GParamSpec * pspec)
{
@@ -846,10 +846,10 @@ gtranslator_tab_set_property (GObject * object,
switch (prop_id)
{
case PROP_AUTOSAVE:
- gtranslator_tab_set_autosave_enabled (tab, g_value_get_boolean (value));
+ gtr_tab_set_autosave_enabled (tab, g_value_get_boolean (value));
break;
case PROP_AUTOSAVE_INTERVAL:
- gtranslator_tab_set_autosave_interval (tab, g_value_get_int (value));
+ gtr_tab_set_autosave_interval (tab, g_value_get_int (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -858,17 +858,17 @@ gtranslator_tab_set_property (GObject * object,
}
static void
-gtranslator_tab_class_init (GtrTabClass * klass)
+gtr_tab_class_init (GtrTabClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrTabPrivate));
- object_class->finalize = gtranslator_tab_finalize;
- object_class->set_property = gtranslator_tab_set_property;
- object_class->get_property = gtranslator_tab_get_property;
- klass->showed_message = gtranslator_tab_showed_message;
- klass->message_edition_finished = gtranslator_tab_edition_finished;
+ object_class->finalize = gtr_tab_finalize;
+ object_class->set_property = gtr_tab_set_property;
+ object_class->get_property = gtr_tab_get_property;
+ klass->showed_message = gtr_tab_showed_message;
+ klass->message_edition_finished = gtr_tab_edition_finished;
/* Signals */
signals[SHOWED_MESSAGE] =
@@ -923,7 +923,7 @@ gtranslator_tab_class_init (GtrTabClass * klass)
/***************************** Public funcs ***********************************/
/**
- * gtranslator_tab_new:
+ * gtr_tab_new:
* @po: a #GtrPo
*
* Creates a new #GtrTab.
@@ -931,7 +931,7 @@ gtranslator_tab_class_init (GtrTabClass * klass)
* Return value: a new #GtrTab object
**/
GtrTab *
-gtranslator_tab_new (GtrPo * po)
+gtr_tab_new (GtrPo * po)
{
GtrTab *tab;
@@ -946,11 +946,11 @@ gtranslator_tab_new (GtrPo * po)
/*
* Now we have to initialize the number of msgstr tabs
*/
- gtranslator_tab_add_msgstr_tabs (tab);
+ gtr_tab_add_msgstr_tabs (tab);
- gtranslator_message_table_populate (GTR_MESSAGE_TABLE
+ gtr_message_table_populate (GTR_MESSAGE_TABLE
(tab->priv->message_table),
- gtranslator_po_get_messages (tab->priv->
+ gtr_po_get_messages (tab->priv->
po));
gtk_widget_show (GTK_WIDGET (tab));
@@ -958,25 +958,25 @@ gtranslator_tab_new (GtrPo * po)
}
/**
- * gtranslator_tab_get_po:
+ * gtr_tab_get_po:
* @tab: a #GtrTab
*
* Return value: the #GtrPo stored in the #GtrTab
**/
GtrPo *
-gtranslator_tab_get_po (GtrTab * tab)
+gtr_tab_get_po (GtrTab * tab)
{
return tab->priv->po;
}
/**
- * gtranslator_tab_get_panel:
+ * gtr_tab_get_panel:
* @tab: a #GtranslationTab
*
* Return value: the horizontal notebook of the #GtranslationTab
**/
GtkWidget *
-gtranslator_tab_get_panel (GtrTab * tab)
+gtr_tab_get_panel (GtrTab * tab)
{
g_return_val_if_fail (tab != NULL, NULL);
@@ -984,38 +984,38 @@ gtranslator_tab_get_panel (GtrTab * tab)
}
/**
- * gtranslator_tab_get_active_trans_tab:
+ * gtr_tab_get_active_trans_tab:
* @tab: a #GtranslationTab
*
* Return value: the number of the active translation notebook.
**/
gint
-gtranslator_tab_get_active_trans_tab (GtrTab * tab)
+gtr_tab_get_active_trans_tab (GtrTab * tab)
{
return
gtk_notebook_get_current_page (GTK_NOTEBOOK (tab->priv->trans_notebook));
}
/**
- * gtranslator_tab_get_context_panel:
+ * gtr_tab_get_context_panel:
* @tab: a #GtrTab
*
* Return value: the #GtranslaorContextPanel
*/
GtrContextPanel *
-gtranslator_tab_get_context_panel (GtrTab * tab)
+gtr_tab_get_context_panel (GtrTab * tab)
{
return GTR_CONTEXT_PANEL (tab->priv->context);
}
/**
- * gtranslator_tab_get_translation_memory_ui:
+ * gtr_tab_get_translation_memory_ui:
* @tab: a #GtrTab
*
* Returns: the #GtrTranslationMemoryUi panel.
*/
GtkWidget *
-gtranslator_tab_get_translation_memory_ui (GtrTab * tab)
+gtr_tab_get_translation_memory_ui (GtrTab * tab)
{
g_return_val_if_fail (GTR_IS_TAB (tab), NULL);
@@ -1023,13 +1023,13 @@ gtranslator_tab_get_translation_memory_ui (GtrTab * tab)
}
/**
- * gtranslator_tab_get_active_view:
+ * gtr_tab_get_active_view:
* @tab: a #GtranslationTab
*
* Return value: the active page of the translation notebook.
**/
GtrView *
-gtranslator_tab_get_active_view (GtrTab * tab)
+gtr_tab_get_active_view (GtrTab * tab)
{
gint num;
@@ -1039,7 +1039,7 @@ gtranslator_tab_get_active_view (GtrTab * tab)
}
/**
- * gtranslator_tab_get_all_views:
+ * gtr_tab_get_all_views:
* @tab: the #GtranslationTab
* @original: TRUE if you want original TextViews.
* @translated: TRUE if you want tranlated TextViews.
@@ -1049,7 +1049,7 @@ gtranslator_tab_get_active_view (GtrTab * tab)
* Return value: a newly allocated list of #GtranslationTab objects
*/
GList *
-gtranslator_tab_get_all_views (GtrTab * tab,
+gtr_tab_get_all_views (GtrTab * tab,
gboolean original, gboolean translated)
{
GList *ret = NULL;
@@ -1079,23 +1079,23 @@ gtranslator_tab_get_all_views (GtrTab * tab,
}
/**
- * gtranslator_tab_get_name:
+ * gtr_tab_get_name:
* @tab: a #GtrTab
*
* Return value: a new allocated string with the name of the @tab.
*/
gchar *
-gtranslator_tab_get_name (GtrTab * tab)
+gtr_tab_get_name (GtrTab * tab)
{
GtrHeader *header;
GtrPoState state;
const gchar *str;
gchar *tab_name;
- header = gtranslator_po_get_header (tab->priv->po);
- state = gtranslator_po_get_state (tab->priv->po);
+ header = gtr_po_get_header (tab->priv->po);
+ state = gtr_po_get_state (tab->priv->po);
- str = gtranslator_header_get_prj_id_version (header);
+ str = gtr_header_get_prj_id_version (header);
if (state == GTR_PO_STATE_MODIFIED)
{
@@ -1107,7 +1107,7 @@ gtranslator_tab_get_name (GtrTab * tab)
}
/**
- * gtranslator_tab_message_go_to:
+ * gtr_tab_message_go_to:
* @tab: a #GtrTab
* @to_go: the #GtrMsg you want to jump
* @searching: TRUE if we are searching in the message list
@@ -1116,7 +1116,7 @@ gtranslator_tab_get_name (GtrTab * tab)
* in the #GtrView.
**/
void
-gtranslator_tab_message_go_to (GtrTab * tab,
+gtr_tab_message_go_to (GtrTab * tab,
GList * to_go,
gboolean searching, GtrTabMove move)
{
@@ -1130,7 +1130,7 @@ gtranslator_tab_message_go_to (GtrTab * tab,
po = tab->priv->po;
- current_msg = gtranslator_po_get_current_message (po);
+ current_msg = gtr_po_get_current_message (po);
/*
* Emitting message-edition-finished signal
@@ -1168,14 +1168,14 @@ gtranslator_tab_message_go_to (GtrTab * tab,
{
gtk_notebook_set_current_page (GTK_NOTEBOOK
(tab->priv->trans_notebook), 0);
- gtranslator_tab_show_message (tab, to_go->data);
+ gtr_tab_show_message (tab, to_go->data);
}
else if (current_page == 0 && move == GTR_TAB_MOVE_PREV)
{
gtk_notebook_set_current_page (GTK_NOTEBOOK
(tab->priv->trans_notebook),
n_pages - 1);
- gtranslator_tab_show_message (tab, to_go->data);
+ gtr_tab_show_message (tab, to_go->data);
}
else
{
@@ -1191,7 +1191,7 @@ gtranslator_tab_message_go_to (GtrTab * tab,
}
}
else
- gtranslator_tab_show_message (tab, to_go->data);
+ gtr_tab_show_message (tab, to_go->data);
first_msg = FALSE;
}
else
@@ -1206,7 +1206,7 @@ gtranslator_tab_message_go_to (GtrTab * tab,
}
/**
- * _gtranslator_tab_can_close:
+ * _gtr_tab_can_close:
* @tab: a #GtrTab
*
* Whether a #GtrTab can be closed.
@@ -1214,13 +1214,13 @@ gtranslator_tab_message_go_to (GtrTab * tab,
* Returns: TRUE if the #GtrPo of the @tab is already saved
*/
gboolean
-_gtranslator_tab_can_close (GtrTab * tab)
+_gtr_tab_can_close (GtrTab * tab)
{
- return gtranslator_po_get_state (tab->priv->po) == GTR_PO_STATE_SAVED;
+ return gtr_po_get_state (tab->priv->po) == GTR_PO_STATE_SAVED;
}
/**
- * gtranslator_tab_get_from_document:
+ * gtr_tab_get_from_document:
* @po: a #GtrPo
*
* Returns the #GtrTab for a specific #GtrPo.
@@ -1228,7 +1228,7 @@ _gtranslator_tab_can_close (GtrTab * tab)
* Returns: the #GtrTab for a specific #GtrPo
*/
GtrTab *
-gtranslator_tab_get_from_document (GtrPo * po)
+gtr_tab_get_from_document (GtrPo * po)
{
gpointer res;
@@ -1240,7 +1240,7 @@ gtranslator_tab_get_from_document (GtrPo * po)
}
/**
- * gtranslator_tab_get_autosave_enabled:
+ * gtr_tab_get_autosave_enabled:
* @tab: a #GtrTab
*
* Gets the current state for the autosave feature
@@ -1248,7 +1248,7 @@ gtranslator_tab_get_from_document (GtrPo * po)
* Return value: TRUE if the autosave is enabled, else FALSE
**/
gboolean
-gtranslator_tab_get_autosave_enabled (GtrTab * tab)
+gtr_tab_get_autosave_enabled (GtrTab * tab)
{
g_return_val_if_fail (GTR_IS_TAB (tab), FALSE);
@@ -1256,7 +1256,7 @@ gtranslator_tab_get_autosave_enabled (GtrTab * tab)
}
/**
- * gtranslator_tab_set_autosave_enabled:
+ * gtr_tab_set_autosave_enabled:
* @tab: a #GtrTab
* @enable: enable (TRUE) or disable (FALSE) auto save
*
@@ -1264,7 +1264,7 @@ gtranslator_tab_get_autosave_enabled (GtrTab * tab)
* autosave timeout if the document is new or is read-only
**/
void
-gtranslator_tab_set_autosave_enabled (GtrTab * tab, gboolean enable)
+gtr_tab_set_autosave_enabled (GtrTab * tab, gboolean enable)
{
g_return_if_fail (GTR_IS_TAB (tab));
@@ -1291,7 +1291,7 @@ gtranslator_tab_set_autosave_enabled (GtrTab * tab, gboolean enable)
}
/**
- * gtranslator_tab_get_autosave_interval:
+ * gtr_tab_get_autosave_interval:
* @tab: a #GtrTab
*
* Gets the current interval for the autosaves
@@ -1299,7 +1299,7 @@ gtranslator_tab_set_autosave_enabled (GtrTab * tab, gboolean enable)
* Return value: the value of the autosave
**/
gint
-gtranslator_tab_get_autosave_interval (GtrTab * tab)
+gtr_tab_get_autosave_interval (GtrTab * tab)
{
g_return_val_if_fail (GTR_IS_TAB (tab), 0);
@@ -1307,7 +1307,7 @@ gtranslator_tab_get_autosave_interval (GtrTab * tab)
}
/**
- * gtranslator_tab_set_autosave_interval:
+ * gtr_tab_set_autosave_interval:
* @tab: a #GtrTab
* @interval: the new interval
*
@@ -1317,7 +1317,7 @@ gtranslator_tab_get_autosave_interval (GtrTab * tab)
* argument.
**/
void
-gtranslator_tab_set_autosave_interval (GtrTab * tab, gint interval)
+gtr_tab_set_autosave_interval (GtrTab * tab, gint interval)
{
g_return_if_fail (GTR_IS_TAB (tab));
g_return_if_fail (interval > 0);
@@ -1339,7 +1339,7 @@ gtranslator_tab_set_autosave_interval (GtrTab * tab, gint interval)
}
/**
- * gtranslator_tab_add_widget_to_lateral_panel:
+ * gtr_tab_add_widget_to_lateral_panel:
* @tab: a #GtrTab
* @widget: a #GtkWidget
* @tab_name: the tab name in the notebook
@@ -1347,7 +1347,7 @@ gtranslator_tab_set_autosave_interval (GtrTab * tab, gint interval)
* Adds a new widget to the laberal panel notebook.
*/
void
-gtranslator_tab_add_widget_to_lateral_panel (GtrTab * tab,
+gtr_tab_add_widget_to_lateral_panel (GtrTab * tab,
GtkWidget * widget,
const gchar * tab_name)
{
@@ -1363,14 +1363,14 @@ gtranslator_tab_add_widget_to_lateral_panel (GtrTab * tab,
}
/**
- * gtranslator_tab_remove_widget_from_lateral_panel:
+ * gtr_tab_remove_widget_from_lateral_panel:
* @tab: a #GtrTab
* @widget: a #GtkWidget
*
* Removes the @widget from the lateral panel notebook of @tab.
*/
void
-gtranslator_tab_remove_widget_from_lateral_panel (GtrTab * tab,
+gtr_tab_remove_widget_from_lateral_panel (GtrTab * tab,
GtkWidget * widget)
{
gint page;
@@ -1385,14 +1385,14 @@ gtranslator_tab_remove_widget_from_lateral_panel (GtrTab * tab,
}
/**
- * gtranslator_tab_show_lateral_panel_widget:
+ * gtr_tab_show_lateral_panel_widget:
* @tab: a #GtrTab
* @widget: the widget to be shown.
*
* Shows the notebook page of the @widget.
*/
void
-gtranslator_tab_show_lateral_panel_widget (GtrTab * tab,
+gtr_tab_show_lateral_panel_widget (GtrTab * tab,
GtkWidget * widget)
{
gint page;
@@ -1404,13 +1404,13 @@ gtranslator_tab_show_lateral_panel_widget (GtrTab * tab,
}
/**
- * gtranslator_tab_clear_msgstr_views:
+ * gtr_tab_clear_msgstr_views:
* @tab: a #GtrTab
*
* Clears all text from msgstr text views.
*/
void
-gtranslator_tab_clear_msgstr_views (GtrTab * tab)
+gtr_tab_clear_msgstr_views (GtrTab * tab)
{
gint i = 0;
GtrHeader *header;
@@ -1418,7 +1418,7 @@ gtranslator_tab_clear_msgstr_views (GtrTab * tab)
g_return_if_fail (GTR_IS_TAB (tab));
- header = gtranslator_po_get_header (tab->priv->po);
+ header = gtr_po_get_header (tab->priv->po);
do
{
@@ -1429,17 +1429,17 @@ gtranslator_tab_clear_msgstr_views (GtrTab * tab)
gtk_text_buffer_end_user_action (buf);
i++;
}
- while (i < gtranslator_header_get_nplurals (header));
+ while (i < gtr_header_get_nplurals (header));
}
/**
- * gtranslator_tab_copy_to_translation:
+ * gtr_tab_copy_to_translation:
* @tab: a #GtrTab
*
* Copies the text from the original text box to the translation text box.
*/
void
-gtranslator_tab_copy_to_translation (GtrTab * tab)
+gtr_tab_copy_to_translation (GtrTab * tab)
{
GtkTextBuffer *msgstr, *msgid;
gint page_index;
@@ -1448,7 +1448,7 @@ gtranslator_tab_copy_to_translation (GtrTab * tab)
g_return_if_fail (GTR_IS_TAB (tab));
- page_index = gtranslator_tab_get_active_trans_tab (tab);
+ page_index = gtr_tab_get_active_trans_tab (tab);
msgstr =
gtk_text_view_get_buffer (GTK_TEXT_VIEW
@@ -1463,13 +1463,13 @@ gtranslator_tab_copy_to_translation (GtrTab * tab)
}
/**
- * gtranslator_tab_block_movement:
+ * gtr_tab_block_movement:
* @tab: a #GtrTab
*
* Blocks the movement to the next/prev message.
*/
void
-gtranslator_tab_block_movement (GtrTab * tab)
+gtr_tab_block_movement (GtrTab * tab)
{
g_return_if_fail (GTR_IS_TAB (tab));
@@ -1477,13 +1477,13 @@ gtranslator_tab_block_movement (GtrTab * tab)
}
/**
- * gtranslator_tab_unblock_movement:
+ * gtr_tab_unblock_movement:
* @tab: a #GtrTab
*
* Unblocks the movement to the next/prev message.
*/
void
-gtranslator_tab_unblock_movement (GtrTab * tab)
+gtr_tab_unblock_movement (GtrTab * tab)
{
g_return_if_fail (GTR_IS_TAB (tab));
@@ -1491,83 +1491,83 @@ gtranslator_tab_unblock_movement (GtrTab * tab)
}
/**
- * gtranslator_tab_go_to_next:
+ * gtr_tab_go_to_next:
* @tab: a #GtrTab
*
* Moves to the next message or plural tab in case the message has plurals.
*/
void
-gtranslator_tab_go_to_next (GtrTab * tab)
+gtr_tab_go_to_next (GtrTab * tab)
{
GtrPo *po;
- po = gtranslator_tab_get_po (tab);
+ po = gtr_tab_get_po (tab);
- gtranslator_tab_message_go_to (tab,
+ gtr_tab_message_go_to (tab,
g_list_next
- (gtranslator_po_get_current_message (po)),
+ (gtr_po_get_current_message (po)),
FALSE, GTR_TAB_MOVE_NEXT);
}
/**
- * gtranslator_tab_go_to_prev:
+ * gtr_tab_go_to_prev:
* @tab: a #GtrTab
*
* Moves to the previous message or plural tab in case the message has plurals.
*/
void
-gtranslator_tab_go_to_prev (GtrTab * tab)
+gtr_tab_go_to_prev (GtrTab * tab)
{
GtrPo *po;
- po = gtranslator_tab_get_po (tab);
+ po = gtr_tab_get_po (tab);
- gtranslator_tab_message_go_to (tab,
+ gtr_tab_message_go_to (tab,
g_list_previous
- (gtranslator_po_get_current_message (po)),
+ (gtr_po_get_current_message (po)),
FALSE, GTR_TAB_MOVE_PREV);
}
/**
- * gtranslator_tab_go_to_first:
+ * gtr_tab_go_to_first:
* @tab: a #GtrTab
*
* Jumps to the first message.
*/
void
-gtranslator_tab_go_to_first (GtrTab * tab)
+gtr_tab_go_to_first (GtrTab * tab)
{
GtrPo *po;
- po = gtranslator_tab_get_po (tab);
+ po = gtr_tab_get_po (tab);
- gtranslator_tab_message_go_to (tab,
+ gtr_tab_message_go_to (tab,
g_list_first
- (gtranslator_po_get_current_message (po)),
+ (gtr_po_get_current_message (po)),
FALSE, GTR_TAB_MOVE_NONE);
}
/**
- * gtranslator_tab_go_to_last:
+ * gtr_tab_go_to_last:
* @tab: a #GtrTab
*
* Jumps to the last message.
*/
void
-gtranslator_tab_go_to_last (GtrTab * tab)
+gtr_tab_go_to_last (GtrTab * tab)
{
GtrPo *po;
- po = gtranslator_tab_get_po (tab);
+ po = gtr_tab_get_po (tab);
- gtranslator_tab_message_go_to (tab,
+ gtr_tab_message_go_to (tab,
g_list_last
- (gtranslator_po_get_current_message (po)),
+ (gtr_po_get_current_message (po)),
FALSE, GTR_TAB_MOVE_NONE);
}
/**
- * gtranslator_tab_go_to_next_fuzzy:
+ * gtr_tab_go_to_next_fuzzy:
* @tab: a #GtrTab
*
* If there is a next fuzzy message it jumps to it.
@@ -1575,17 +1575,17 @@ gtranslator_tab_go_to_last (GtrTab * tab)
* Returns: TRUE if there is a next fuzzy message.
*/
gboolean
-gtranslator_tab_go_to_next_fuzzy (GtrTab * tab)
+gtr_tab_go_to_next_fuzzy (GtrTab * tab)
{
GtrPo *po;
GList *msg;
- po = gtranslator_tab_get_po (tab);
+ po = gtr_tab_get_po (tab);
- msg = gtranslator_po_get_next_fuzzy (po);
+ msg = gtr_po_get_next_fuzzy (po);
if (msg != NULL)
{
- gtranslator_tab_message_go_to (tab, msg, FALSE, GTR_TAB_MOVE_NONE);
+ gtr_tab_message_go_to (tab, msg, FALSE, GTR_TAB_MOVE_NONE);
return TRUE;
}
@@ -1593,7 +1593,7 @@ gtranslator_tab_go_to_next_fuzzy (GtrTab * tab)
}
/**
- * gtranslator_tab_go_to_prev_fuzzy:
+ * gtr_tab_go_to_prev_fuzzy:
* @tab: a #GtrTab
*
* If there is a prev fuzzy message it jumps to it.
@@ -1601,17 +1601,17 @@ gtranslator_tab_go_to_next_fuzzy (GtrTab * tab)
* Returns: TRUE if there is a prev fuzzy message.
*/
gboolean
-gtranslator_tab_go_to_prev_fuzzy (GtrTab * tab)
+gtr_tab_go_to_prev_fuzzy (GtrTab * tab)
{
GtrPo *po;
GList *msg;
- po = gtranslator_tab_get_po (tab);
+ po = gtr_tab_get_po (tab);
- msg = gtranslator_po_get_prev_fuzzy (po);
+ msg = gtr_po_get_prev_fuzzy (po);
if (msg != NULL)
{
- gtranslator_tab_message_go_to (tab, msg, FALSE, GTR_TAB_MOVE_NONE);
+ gtr_tab_message_go_to (tab, msg, FALSE, GTR_TAB_MOVE_NONE);
return TRUE;
}
@@ -1619,7 +1619,7 @@ gtranslator_tab_go_to_prev_fuzzy (GtrTab * tab)
}
/**
- * gtranslator_tab_go_to_next_untrans:
+ * gtr_tab_go_to_next_untrans:
* @tab: a #GtrTab
*
* If there is a next untranslated message it jumps to it.
@@ -1627,17 +1627,17 @@ gtranslator_tab_go_to_prev_fuzzy (GtrTab * tab)
* Returns: TRUE if there is a next untranslated message.
*/
gboolean
-gtranslator_tab_go_to_next_untrans (GtrTab * tab)
+gtr_tab_go_to_next_untrans (GtrTab * tab)
{
GtrPo *po;
GList *msg;
- po = gtranslator_tab_get_po (tab);
+ po = gtr_tab_get_po (tab);
- msg = gtranslator_po_get_next_untrans (po);
+ msg = gtr_po_get_next_untrans (po);
if (msg != NULL)
{
- gtranslator_tab_message_go_to (tab, msg, FALSE, GTR_TAB_MOVE_NONE);
+ gtr_tab_message_go_to (tab, msg, FALSE, GTR_TAB_MOVE_NONE);
return TRUE;
}
@@ -1645,7 +1645,7 @@ gtranslator_tab_go_to_next_untrans (GtrTab * tab)
}
/**
- * gtranslator_tab_go_to_prev_untrans:
+ * gtr_tab_go_to_prev_untrans:
* @tab: a #GtrTab
*
* If there is a prev untranslated message it jumps to it.
@@ -1653,17 +1653,17 @@ gtranslator_tab_go_to_next_untrans (GtrTab * tab)
* Returns: TRUE if there is a prev untranslated message.
*/
gboolean
-gtranslator_tab_go_to_prev_untrans (GtrTab * tab)
+gtr_tab_go_to_prev_untrans (GtrTab * tab)
{
GtrPo *po;
GList *msg;
- po = gtranslator_tab_get_po (tab);
+ po = gtr_tab_get_po (tab);
- msg = gtranslator_po_get_prev_untrans (po);
+ msg = gtr_po_get_prev_untrans (po);
if (msg != NULL)
{
- gtranslator_tab_message_go_to (tab, msg, FALSE, GTR_TAB_MOVE_NONE);
+ gtr_tab_message_go_to (tab, msg, FALSE, GTR_TAB_MOVE_NONE);
return TRUE;
}
@@ -1671,7 +1671,7 @@ gtranslator_tab_go_to_prev_untrans (GtrTab * tab)
}
/**
- * gtranslator_tab_go_to_next_fuzzy_or_untrans:
+ * gtr_tab_go_to_next_fuzzy_or_untrans:
* @tab: a #GtrTab
*
* If there is a next fuzzy or untranslated message it jumps to it.
@@ -1679,17 +1679,17 @@ gtranslator_tab_go_to_prev_untrans (GtrTab * tab)
* Returns: TRUE if there is a next fuzzy or untranslated message.
*/
gboolean
-gtranslator_tab_go_to_next_fuzzy_or_untrans (GtrTab * tab)
+gtr_tab_go_to_next_fuzzy_or_untrans (GtrTab * tab)
{
GtrPo *po;
GList *msg;
- po = gtranslator_tab_get_po (tab);
+ po = gtr_tab_get_po (tab);
- msg = gtranslator_po_get_next_fuzzy_or_untrans (po);
+ msg = gtr_po_get_next_fuzzy_or_untrans (po);
if (msg != NULL)
{
- gtranslator_tab_message_go_to (tab, msg, FALSE, GTR_TAB_MOVE_NONE);
+ gtr_tab_message_go_to (tab, msg, FALSE, GTR_TAB_MOVE_NONE);
return TRUE;
}
@@ -1697,7 +1697,7 @@ gtranslator_tab_go_to_next_fuzzy_or_untrans (GtrTab * tab)
}
/**
- * gtranslator_tab_go_to_prev_fuzzy_or_untrans:
+ * gtr_tab_go_to_prev_fuzzy_or_untrans:
* @tab: a #GtrTab
*
* If there is a prev fuzzy or untranslated message it jumps to it.
@@ -1705,17 +1705,17 @@ gtranslator_tab_go_to_next_fuzzy_or_untrans (GtrTab * tab)
* Returns: TRUE if there is a prev fuzzy or untranslated message.
*/
gboolean
-gtranslator_tab_go_to_prev_fuzzy_or_untrans (GtrTab * tab)
+gtr_tab_go_to_prev_fuzzy_or_untrans (GtrTab * tab)
{
GtrPo *po;
GList *msg;
- po = gtranslator_tab_get_po (tab);
+ po = gtr_tab_get_po (tab);
- msg = gtranslator_po_get_prev_fuzzy_or_untrans (po);
+ msg = gtr_po_get_prev_fuzzy_or_untrans (po);
if (msg != NULL)
{
- gtranslator_tab_message_go_to (tab, msg, FALSE, GTR_TAB_MOVE_NONE);
+ gtr_tab_message_go_to (tab, msg, FALSE, GTR_TAB_MOVE_NONE);
return TRUE;
}
@@ -1723,7 +1723,7 @@ gtranslator_tab_go_to_prev_fuzzy_or_untrans (GtrTab * tab)
}
/**
- * gtranslator_tab_go_to_number:
+ * gtr_tab_go_to_number:
* @tab: a #GtrTab
* @number: the message number you want to jump
*
@@ -1731,29 +1731,29 @@ gtranslator_tab_go_to_prev_fuzzy_or_untrans (GtrTab * tab)
* exists it does not jump.
*/
void
-gtranslator_tab_go_to_number (GtrTab * tab, gint number)
+gtr_tab_go_to_number (GtrTab * tab, gint number)
{
GtrPo *po;
GList *msg;
- po = gtranslator_tab_get_po (tab);
+ po = gtr_tab_get_po (tab);
- msg = gtranslator_po_get_msg_from_number (po, number);
+ msg = gtr_po_get_msg_from_number (po, number);
if (msg != NULL)
{
- gtranslator_tab_message_go_to (tab, msg, FALSE, GTR_TAB_MOVE_NONE);
+ gtr_tab_message_go_to (tab, msg, FALSE, GTR_TAB_MOVE_NONE);
}
}
/**
- * gtranslator_tab_set_info_bar:
+ * gtr_tab_set_info_bar:
* @tab: a #GtrTab
* @infobar: a #GtrMessageArea
*
* Sets the @infobar to be shown in the @tab.
*/
void
-gtranslator_tab_set_info_bar (GtrTab *tab,
+gtr_tab_set_info_bar (GtrTab *tab,
GtkWidget *infobar)
{
g_return_if_fail (GTR_IS_TAB (tab));
diff --git a/src/gtr-tab.h b/src/gtr-tab.h
index 126f622..e7e954f 100644
--- a/src/gtr-tab.h
+++ b/src/gtr-tab.h
@@ -36,7 +36,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_TAB (gtranslator_tab_get_type ())
+#define GTR_TYPE_TAB (gtr_tab_get_type ())
#define GTR_TAB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_TAB, GtrTab))
#define GTR_TAB_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_TAB, GtrTabClass))
#define GTR_IS_TAB(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_TAB))
@@ -84,97 +84,97 @@ typedef enum
* Public methods
*/
GType
-gtranslator_tab_get_type (void)
+gtr_tab_get_type (void)
G_GNUC_CONST;
- GType gtranslator_tab_register_type (GTypeModule * module);
+ GType gtr_tab_register_type (GTypeModule * module);
- GtrTab *gtranslator_tab_new (GtrPo * po);
+ GtrTab *gtr_tab_new (GtrPo * po);
- GtrPo *gtranslator_tab_get_po (GtrTab * tab);
+ GtrPo *gtr_tab_get_po (GtrTab * tab);
- GtkWidget *gtranslator_tab_get_panel (GtrTab * tab);
+ GtkWidget *gtr_tab_get_panel (GtrTab * tab);
- gint gtranslator_tab_get_active_trans_tab (GtrTab * tab);
+ gint gtr_tab_get_active_trans_tab (GtrTab * tab);
GtrContextPanel
- *gtranslator_tab_get_context_panel (GtrTab * tab);
+ *gtr_tab_get_context_panel (GtrTab * tab);
- GtkWidget *gtranslator_tab_get_translation_memory_ui (GtrTab *
+ GtkWidget *gtr_tab_get_translation_memory_ui (GtrTab *
tab);
- GtrView *gtranslator_tab_get_active_view (GtrTab * tab);
+ GtrView *gtr_tab_get_active_view (GtrTab * tab);
- GList *gtranslator_tab_get_all_views (GtrTab * tab,
+ GList *gtr_tab_get_all_views (GtrTab * tab,
gboolean original,
gboolean translated);
- gchar *gtranslator_tab_get_name (GtrTab * tab);
+ gchar *gtr_tab_get_name (GtrTab * tab);
- void gtranslator_tab_message_go_to (GtrTab * tab,
+ void gtr_tab_message_go_to (GtrTab * tab,
GList * to_go,
gboolean searching,
GtrTabMove move);
- GtrTab *gtranslator_tab_get_from_document (GtrPo * po);
+ GtrTab *gtr_tab_get_from_document (GtrPo * po);
- gboolean gtranslator_tab_get_autosave_enabled (GtrTab * tab);
+ gboolean gtr_tab_get_autosave_enabled (GtrTab * tab);
- void gtranslator_tab_set_autosave_enabled (GtrTab * tab,
+ void gtr_tab_set_autosave_enabled (GtrTab * tab,
gboolean enable);
- gint gtranslator_tab_get_autosave_interval (GtrTab * tab);
+ gint gtr_tab_get_autosave_interval (GtrTab * tab);
- void gtranslator_tab_set_autosave_interval (GtrTab * tab,
+ void gtr_tab_set_autosave_interval (GtrTab * tab,
gint interval);
- void gtranslator_tab_add_widget_to_lateral_panel (GtrTab * tab,
+ void gtr_tab_add_widget_to_lateral_panel (GtrTab * tab,
GtkWidget * widget,
const gchar *
tab_name);
- void gtranslator_tab_remove_widget_from_lateral_panel (GtrTab *
+ void gtr_tab_remove_widget_from_lateral_panel (GtrTab *
tab,
GtkWidget *
widget);
- void gtranslator_tab_show_lateral_panel_widget (GtrTab * tab,
+ void gtr_tab_show_lateral_panel_widget (GtrTab * tab,
GtkWidget * widget);
- void gtranslator_tab_clear_msgstr_views (GtrTab * tab);
+ void gtr_tab_clear_msgstr_views (GtrTab * tab);
- void gtranslator_tab_block_movement (GtrTab * tab);
+ void gtr_tab_block_movement (GtrTab * tab);
- void gtranslator_tab_unblock_movement (GtrTab * tab);
+ void gtr_tab_unblock_movement (GtrTab * tab);
- void gtranslator_tab_go_to_next (GtrTab * tab);
+ void gtr_tab_go_to_next (GtrTab * tab);
- void gtranslator_tab_go_to_prev (GtrTab * tab);
+ void gtr_tab_go_to_prev (GtrTab * tab);
- void gtranslator_tab_go_to_first (GtrTab * tab);
+ void gtr_tab_go_to_first (GtrTab * tab);
- void gtranslator_tab_go_to_last (GtrTab * tab);
+ void gtr_tab_go_to_last (GtrTab * tab);
- gboolean gtranslator_tab_go_to_next_fuzzy (GtrTab * tab);
+ gboolean gtr_tab_go_to_next_fuzzy (GtrTab * tab);
- gboolean gtranslator_tab_go_to_prev_fuzzy (GtrTab * tab);
+ gboolean gtr_tab_go_to_prev_fuzzy (GtrTab * tab);
- gboolean gtranslator_tab_go_to_next_untrans (GtrTab * tab);
+ gboolean gtr_tab_go_to_next_untrans (GtrTab * tab);
- gboolean gtranslator_tab_go_to_prev_untrans (GtrTab * tab);
+ gboolean gtr_tab_go_to_prev_untrans (GtrTab * tab);
- gboolean gtranslator_tab_go_to_next_fuzzy_or_untrans (GtrTab *
+ gboolean gtr_tab_go_to_next_fuzzy_or_untrans (GtrTab *
tab);
- gboolean gtranslator_tab_go_to_prev_fuzzy_or_untrans (GtrTab *
+ gboolean gtr_tab_go_to_prev_fuzzy_or_untrans (GtrTab *
tab);
- void gtranslator_tab_go_to_number (GtrTab * tab, gint number);
+ void gtr_tab_go_to_number (GtrTab * tab, gint number);
- void gtranslator_tab_set_info_bar (GtrTab *tab,
+ void gtr_tab_set_info_bar (GtrTab *tab,
GtkWidget *infobar);
- gboolean _gtranslator_tab_can_close (GtrTab * tab);
+ gboolean _gtr_tab_can_close (GtrTab * tab);
G_END_DECLS
#endif /* __TAB_H__ */
diff --git a/src/gtr-utils.c b/src/gtr-utils.c
index e9c470d..d371f61 100644
--- a/src/gtr-utils.c
+++ b/src/gtr-utils.c
@@ -85,7 +85,7 @@ check_good_word (const gchar * word, gchar ** badwords)
}
/**
- * gtranslator_utils_split_string_in_words:
+ * gtr_utils_split_string_in_words:
* @string: the text to process
*
* Process a text and split it in words using pango.
@@ -93,7 +93,7 @@ check_good_word (const gchar * word, gchar ** badwords)
* Returns: an array of words of the processed text
*/
gchar **
-gtranslator_utils_split_string_in_words (const gchar * string)
+gtr_utils_split_string_in_words (const gchar * string)
{
PangoLanguage *lang = pango_language_from_string ("en");
PangoLogAttr *attrs;
@@ -155,7 +155,7 @@ gtranslator_utils_split_string_in_words (const gchar * string)
}
xmlDocPtr
-gtranslator_xml_new_doc (const gchar * name)
+gtr_xml_new_doc (const gchar * name)
{
xmlNodePtr root;
xmlDocPtr doc;
@@ -166,7 +166,7 @@ gtranslator_xml_new_doc (const gchar * name)
}
xmlDocPtr
-gtranslator_xml_open_file (const gchar * filename)
+gtr_xml_open_file (const gchar * filename)
{
xmlDocPtr doc;
g_return_val_if_fail (filename != NULL, NULL);
@@ -175,7 +175,7 @@ gtranslator_xml_open_file (const gchar * filename)
}
/**
- * gtranslator_gtk_button_new_with_stock_icon:
+ * gtr_gtk_button_new_with_stock_icon:
* @label: the label of the button
* @stock_id: the id of the stock image
*
@@ -184,7 +184,7 @@ gtranslator_xml_open_file (const gchar * filename)
* Returns: a new #GtkButton
*/
GtkWidget *
-gtranslator_gtk_button_new_with_stock_icon (const gchar * label,
+gtr_gtk_button_new_with_stock_icon (const gchar * label,
const gchar * stock_id)
{
GtkWidget *button;
@@ -198,7 +198,7 @@ gtranslator_gtk_button_new_with_stock_icon (const gchar * label,
}
/**
- * gtranslator_utils_menu_position_under_widget:
+ * gtr_utils_menu_position_under_widget:
* @menu: a #GtkMenu
* @x: the x position of the widget
* @y: the y position of the widget
@@ -208,7 +208,7 @@ gtranslator_gtk_button_new_with_stock_icon (const gchar * label,
* It returns the position to popup a menu in a specific widget.
*/
void
-gtranslator_utils_menu_position_under_widget (GtkMenu * menu,
+gtr_utils_menu_position_under_widget (GtkMenu * menu,
gint * x,
gint * y,
gboolean * push_in,
@@ -235,7 +235,7 @@ gtranslator_utils_menu_position_under_widget (GtkMenu * menu,
}
/**
- * gtranslator_utils_menu_position_under_widget:
+ * gtr_utils_menu_position_under_widget:
* @menu: a #GtkMenu
* @x: the x position of the widget
* @y: the y position of the widget
@@ -245,7 +245,7 @@ gtranslator_utils_menu_position_under_widget (GtkMenu * menu,
* It returns the position to popup a menu in a TreeView.
*/
void
-gtranslator_utils_menu_position_under_tree_view (GtkMenu * menu,
+gtr_utils_menu_position_under_tree_view (GtkMenu * menu,
gint * x,
gint * y,
gboolean * push_in,
@@ -287,7 +287,7 @@ gtranslator_utils_menu_position_under_tree_view (GtkMenu * menu,
else
{
/* no selection -> regular "under widget" positioning */
- gtranslator_utils_menu_position_under_widget (menu,
+ gtr_utils_menu_position_under_widget (menu,
x, y, push_in, tree);
}
}
@@ -320,7 +320,7 @@ handle_builder_error (const gchar * message, ...)
}
/**
- * gtranslator_utils_get_ui_objects:
+ * gtr_utils_get_ui_objects:
* @filename: the path to the gtk builder file
* @root_objects: a NULL terminated list of root objects to load or NULL to
* load all objects
@@ -336,7 +336,7 @@ handle_builder_error (const gchar * message, ...)
* Returns FALSE if an error occurs, TRUE on success.
*/
gboolean
-gtranslator_utils_get_ui_objects (const gchar * filename,
+gtr_utils_get_ui_objects (const gchar * filename,
gchar ** root_objects,
GtkWidget ** error_widget,
const gchar * object_name, ...)
@@ -442,7 +442,7 @@ has_valid_scheme (const gchar * uri)
}
gboolean
-gtranslator_utils_is_valid_uri (const gchar * uri)
+gtr_utils_is_valid_uri (const gchar * uri)
{
const guchar *p;
@@ -476,7 +476,7 @@ gtranslator_utils_is_valid_uri (const gchar * uri)
}
/**
- * gtranslator_utils_drop_get_uris:
+ * gtr_utils_drop_get_uris:
* @selection_data: the #GtkSelectionData from drag_data_received
*
* Create a list of valid uri's from a uri-list drop.
@@ -486,7 +486,7 @@ gtranslator_utils_is_valid_uri (const gchar * uri)
* string array is no longer used
*/
GSList *
-gtranslator_utils_drop_get_locations (GtkSelectionData * selection_data)
+gtr_utils_drop_get_locations (GtkSelectionData * selection_data)
{
gchar **uris;
gint i;
@@ -498,7 +498,7 @@ gtranslator_utils_drop_get_locations (GtkSelectionData * selection_data)
{
GFile *file;
/* Silently ignore malformed URI/filename */
- if (gtranslator_utils_is_valid_uri (uris[i]))
+ if (gtr_utils_is_valid_uri (uris[i]))
{
file = g_file_new_for_uri (uris[i]);
locations = g_slist_prepend (locations, file);
@@ -509,7 +509,7 @@ gtranslator_utils_drop_get_locations (GtkSelectionData * selection_data)
}
gchar *
-gtranslator_utils_escape_search_text (const gchar * text)
+gtr_utils_escape_search_text (const gchar * text)
{
GString *str;
gint length;
@@ -563,7 +563,7 @@ gtranslator_utils_escape_search_text (const gchar * text)
}
gchar *
-gtranslator_utils_unescape_search_text (const gchar * text)
+gtr_utils_unescape_search_text (const gchar * text)
{
GString *str;
gint length;
@@ -679,7 +679,7 @@ finally_2:
}
/**
- * gtranslator_utils_activate_url:
+ * gtr_utils_activate_url:
* @dialog: a #GtkAboutDialog
* @url: the url to show
* @data: useless data variable
@@ -687,7 +687,7 @@ finally_2:
* Shows the corresponding @url in the default browser.
*/
void
-gtranslator_utils_activate_url (GtkAboutDialog * dialog,
+gtr_utils_activate_url (GtkAboutDialog * dialog,
const gchar * url, gpointer data)
{
//FIXME: gtk_url_show deprecates this func.
@@ -710,7 +710,7 @@ gtranslator_utils_activate_url (GtkAboutDialog * dialog,
}
/**
- * gtranslator_utils_activate_email:
+ * gtr_utils_activate_email:
* @dialog: a #GtkAboutDialog
* @email: the email to show
* @data: useless data variable
@@ -718,7 +718,7 @@ gtranslator_utils_activate_url (GtkAboutDialog * dialog,
* Shows the corresponding @email in the default mailer.
*/
void
-gtranslator_utils_activate_email (GtkAboutDialog * dialog,
+gtr_utils_activate_email (GtkAboutDialog * dialog,
const gchar * email, gpointer data)
{
//FIXME: gtk_url_show deprecates this func.
@@ -741,7 +741,7 @@ gtranslator_utils_activate_email (GtkAboutDialog * dialog,
}
/**
- * gtranslator_utils_help_display:
+ * gtr_utils_help_display:
* @parent: a #GtkWindow
* @doc_id: the name of the type of doc
* @file_name: the name of the doc
@@ -749,7 +749,7 @@ gtranslator_utils_activate_email (GtkAboutDialog * dialog,
* Shows the help for an specific document in the default help browser.
*/
void
-gtranslator_utils_help_display (GtkWindow * parent,
+gtr_utils_help_display (GtkWindow * parent,
const gchar * doc_id, const gchar * file_name)
{
@@ -789,7 +789,7 @@ gtranslator_utils_help_display (GtkWindow * parent,
if (strchr (lang, '.'))
continue;
- path = gtranslator_dirs_get_gtranslator_data_dir ();
+ path = gtr_dirs_get_gtr_data_dir ();
uri = g_build_filename (path, "gnome", "help", doc_id,
lang, file_name, NULL);
g_free (path);
@@ -837,7 +837,7 @@ gtranslator_utils_help_display (GtkWindow * parent,
}
gchar *
-gtranslator_utils_get_current_date (void)
+gtr_utils_get_current_date (void)
{
time_t now;
struct tm *now_here;
@@ -851,7 +851,7 @@ gtranslator_utils_get_current_date (void)
}
gchar *
-gtranslator_utils_get_current_time (void)
+gtr_utils_get_current_time (void)
{
time_t now;
struct tm *now_here;
@@ -865,7 +865,7 @@ gtranslator_utils_get_current_time (void)
}
gchar *
-gtranslator_utils_get_current_year (void)
+gtr_utils_get_current_year (void)
{
time_t now;
struct tm *now_here;
@@ -879,7 +879,7 @@ gtranslator_utils_get_current_year (void)
}
/**
- * gtranslator_utils_scan_dir:
+ * gtr_utils_scan_dir:
* @dir: the dir to parse
* @list: the list where to store the GFiles
* @po_name: the name of the specific po file to search or NULL.
@@ -889,7 +889,7 @@ gtranslator_utils_get_current_year (void)
* g_slist_foreach (list, (GFunc)g_object_unref, NULL).
*/
void
-gtranslator_utils_scan_dir (GFile * dir,
+gtr_utils_scan_dir (GFile * dir,
GSList ** list, const gchar * po_name)
{
GFileInfo *info;
@@ -929,7 +929,7 @@ gtranslator_utils_scan_dir (GFile * dir,
*list = g_slist_prepend (*list, file);
g_free (filename);
- gtranslator_utils_scan_dir (file, list, po_name);
+ gtr_utils_scan_dir (file, list, po_name);
g_object_unref (info);
}
g_file_enumerator_close (enumerator, NULL, NULL);
@@ -943,7 +943,7 @@ gtranslator_utils_scan_dir (GFile * dir,
}
gchar *
-gtranslator_utils_reduce_path (const gchar * path)
+gtr_utils_reduce_path (const gchar * path)
{
gchar *new_str;
gchar **array;
@@ -968,7 +968,7 @@ gtranslator_utils_reduce_path (const gchar * path)
* Got from gedit
*/
gchar *
-gtranslator_utils_escape_underscores (const gchar * text, gssize length)
+gtr_utils_escape_underscores (const gchar * text, gssize length)
{
GString *str;
const gchar *p;
diff --git a/src/gtr-utils.h b/src/gtr-utils.h
index 92fc35f..0c21392 100644
--- a/src/gtr-utils.h
+++ b/src/gtr-utils.h
@@ -6,7 +6,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* gtranslator is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -28,79 +28,79 @@
#include <libxml/tree.h>
#include <gio/gio.h>
-gchar **gtranslator_utils_split_string_in_words (const gchar * string);
+gchar **gtr_utils_split_string_in_words (const gchar * string);
-xmlDocPtr gtranslator_xml_new_doc (const gchar * name);
+xmlDocPtr gtr_xml_new_doc (const gchar * name);
-xmlDocPtr gtranslator_xml_open_file (const gchar * filename);
+xmlDocPtr gtr_xml_open_file (const gchar * filename);
-GtkWidget *gtranslator_gtk_button_new_with_stock_icon (const gchar * label,
+GtkWidget *gtr_gtk_button_new_with_stock_icon (const gchar * label,
const gchar *
stock_id);
-void gtranslator_utils_menu_position_under_widget (GtkMenu * menu,
+void gtr_utils_menu_position_under_widget (GtkMenu * menu,
gint * x,
gint * y,
gboolean * push_in,
gpointer user_data);
-void gtranslator_utils_menu_position_under_tree_view (GtkMenu * menu,
+void gtr_utils_menu_position_under_tree_view (GtkMenu * menu,
gint * x,
gint * y,
gboolean * push_in,
gpointer user_data);
gboolean
-gtranslator_utils_get_ui_objects (const gchar * filename,
+gtr_utils_get_ui_objects (const gchar * filename,
gchar ** root_objects,
GtkWidget ** error_widget,
const gchar * object_name, ...)
G_GNUC_NULL_TERMINATED;
- GSList *gtranslator_utils_drop_get_locations (GtkSelectionData *
+ GSList *gtr_utils_drop_get_locations (GtkSelectionData *
selection_data);
- gchar *gtranslator_utils_escape_search_text (const gchar * text);
+ gchar *gtr_utils_escape_search_text (const gchar * text);
- gchar *gtranslator_utils_unescape_search_text (const gchar * text);
+ gchar *gtr_utils_unescape_search_text (const gchar * text);
gboolean g_utf8_caselessnmatch (const gchar * s1,
const gchar * s2, gssize n1, gssize n2);
- void gtranslator_utils_activate_url (GtkAboutDialog * dialog,
+ void gtr_utils_activate_url (GtkAboutDialog * dialog,
const gchar * url, gpointer data);
- void gtranslator_utils_activate_email (GtkAboutDialog * dialog,
+ void gtr_utils_activate_email (GtkAboutDialog * dialog,
const gchar * email,
gpointer data);
- void gtranslator_utils_help_display (GtkWindow * parent,
+ void gtr_utils_help_display (GtkWindow * parent,
const gchar * doc_id,
const gchar * file_name);
- gchar *gtranslator_utils_get_user_config_dir (void);
+ gchar *gtr_utils_get_user_config_dir (void);
- gchar *gtranslator_utils_get_current_date (void);
+ gchar *gtr_utils_get_current_date (void);
- gchar *gtranslator_utils_get_current_time (void);
+ gchar *gtr_utils_get_current_time (void);
- gchar *gtranslator_utils_get_current_year (void);
+ gchar *gtr_utils_get_current_year (void);
- void gtranslator_utils_scan_dir (GFile * dir,
+ void gtr_utils_scan_dir (GFile * dir,
GSList ** list, const gchar * po_name);
- gchar *gtranslator_utils_reduce_path (const gchar * path);
+ gchar *gtr_utils_reduce_path (const gchar * path);
- gchar *gtranslator_utils_escape_underscores (const gchar * text,
+ gchar *gtr_utils_escape_underscores (const gchar * text,
gssize length);
- gchar *gtranslator_utils_get_file_from_pixmapsdir (const gchar *
+ gchar *gtr_utils_get_file_from_pixmapsdir (const gchar *
filename);
- gchar *gtranslator_utils_get_file_from_pkgdatadir (const gchar *
+ gchar *gtr_utils_get_file_from_pkgdatadir (const gchar *
filename);
- gchar *gtranslator_utils_get_datadir (void);
+ gchar *gtr_utils_get_datadir (void);
- gchar *gtranslator_utils_get_win32_plugindir (void);
+ gchar *gtr_utils_get_win32_plugindir (void);
#endif
diff --git a/src/gtr-view.c b/src/gtr-view.c
index 3f39a0b..fa10b26 100644
--- a/src/gtr-view.c
+++ b/src/gtr-view.c
@@ -51,7 +51,7 @@
GTR_TYPE_VIEW, \
GtrViewPrivate))
-G_DEFINE_TYPE (GtrView, gtranslator_view, GTK_TYPE_SOURCE_VIEW)
+G_DEFINE_TYPE (GtrView, gtr_view, GTK_TYPE_SOURCE_VIEW)
struct _GtrViewPrivate
{
@@ -66,7 +66,7 @@ struct _GtrViewPrivate
};
#ifdef HAVE_GTKSPELL
- static void gtranslator_attach_gtkspell (GtrView * view)
+ static void gtr_attach_gtkspell (GtrView * view)
{
gint i;
GError *error = NULL;
@@ -90,7 +90,7 @@ struct _GtrViewPrivate
#endif
static void
-gtranslator_view_init (GtrView * view)
+gtr_view_init (GtrView * view)
{
GtkSourceLanguageManager *lm;
GtkSourceLanguage *lang;
@@ -111,14 +111,14 @@ gtranslator_view_init (GtrView * view)
temp != NULL && *temp != NULL; ++temp)
g_ptr_array_add (dirs, g_strdup (*temp));
- datadir = gtranslator_dirs_get_gtranslator_data_dir ();
+ datadir = gtr_dirs_get_gtr_data_dir ();
/* FIXME: Where pkgdatadir must be free */
g_ptr_array_add (dirs, datadir);
g_ptr_array_add (dirs, NULL);
langs = (gchar **) g_ptr_array_free (dirs, FALSE);
gtk_source_language_manager_set_search_path (lm, langs);
- lang = gtk_source_language_manager_get_language (lm, "gtranslator");
+ lang = gtk_source_language_manager_get_language (lm, "gtr");
g_strfreev (langs);
priv->buffer = gtk_source_buffer_new_with_language (lang);
@@ -129,63 +129,63 @@ gtranslator_view_init (GtrView * view)
//Set syntax highlight according to preferences
gtk_source_buffer_set_highlight_syntax (priv->buffer,
- gtranslator_prefs_manager_get_highlight_syntax
+ gtr_prefs_manager_get_highlight_syntax
());
//Set dot char according to preferences
- if (gtranslator_prefs_manager_get_visible_whitespace ())
- gtranslator_view_enable_visible_whitespace (view, TRUE);
+ if (gtr_prefs_manager_get_visible_whitespace ())
+ gtr_view_enable_visible_whitespace (view, TRUE);
/*
* Set fonts according to preferences
*/
- if (gtranslator_prefs_manager_get_use_custom_font ())
+ if (gtr_prefs_manager_get_use_custom_font ())
{
gchar *editor_font;
- editor_font = g_strdup (gtranslator_prefs_manager_get_editor_font ());
+ editor_font = g_strdup (gtr_prefs_manager_get_editor_font ());
- gtranslator_view_set_font (view, FALSE, editor_font);
+ gtr_view_set_font (view, FALSE, editor_font);
g_free (editor_font);
}
else
{
- gtranslator_view_set_font (view, TRUE, NULL);
+ gtr_view_set_font (view, TRUE, NULL);
}
/*
* Set scheme color according to preferences
*/
- gtranslator_view_reload_scheme_color (view);
+ gtr_view_reload_scheme_color (view);
}
static void
-gtranslator_view_finalize (GObject * object)
+gtr_view_finalize (GObject * object)
{
- G_OBJECT_CLASS (gtranslator_view_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_view_parent_class)->finalize (object);
}
static void
-gtranslator_view_class_init (GtrViewClass * klass)
+gtr_view_class_init (GtrViewClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrViewPrivate));
- object_class->finalize = gtranslator_view_finalize;
+ object_class->finalize = gtr_view_finalize;
}
/**
- * gtranslator_view_new:
+ * gtr_view_new:
*
* Creates a new #GtrView. An empty default buffer will be created for you.
*
* Returns: a new #GtrView
*/
GtkWidget *
-gtranslator_view_new (void)
+gtr_view_new (void)
{
GtkWidget *view;
@@ -194,7 +194,7 @@ gtranslator_view_new (void)
}
/**
- * gtranslator_view_get_selected_text:
+ * gtr_view_get_selected_text:
* @view: a #GtrView
* @selected_text: it stores the text selected in the #GtrView
* @len: it stores the length of the @selected_text
@@ -204,7 +204,7 @@ gtranslator_view_new (void)
* Returns: TRUE if the @selected_text was got correctly.
*/
gboolean
-gtranslator_view_get_selected_text (GtrView * view,
+gtr_view_get_selected_text (GtrView * view,
gchar ** selected_text, gint * len)
{
GtkTextIter start, end;
@@ -233,19 +233,19 @@ gtranslator_view_get_selected_text (GtrView * view,
}
/**
- * gtranslator_view_enable_spellcheck:
+ * gtr_view_enable_spellcheck:
* @view: a #GtrView
* @enable: TRUE if you want enable the spellcheck
*
* Enables the spellcheck
**/
void
-gtranslator_view_enable_spellcheck (GtrView * view, gboolean enable)
+gtr_view_enable_spellcheck (GtrView * view, gboolean enable)
{
if (enable)
{
#ifdef HAVE_GTKSPELL
- gtranslator_attach_gtkspell (view);
+ gtr_attach_gtkspell (view);
#endif
}
else
@@ -259,14 +259,14 @@ gtranslator_view_enable_spellcheck (GtrView * view, gboolean enable)
}
/**
- * gtranslator_view_enable_visible_whitespace:
+ * gtr_view_enable_visible_whitespace:
* @view: a #GtrView
* @enable: TRUE if you want to enable special chars for white spaces
*
* Enables special chars for white spaces including \n and \t
**/
void
-gtranslator_view_enable_visible_whitespace (GtrView * view,
+gtr_view_enable_visible_whitespace (GtrView * view,
gboolean enable)
{
g_return_if_fail (GTR_IS_VIEW (view));
@@ -279,14 +279,14 @@ gtranslator_view_enable_visible_whitespace (GtrView * view,
}
/**
- * gtranslator_view_cut_clipboard:
+ * gtr_view_cut_clipboard:
* @view: a #GtrView
*
* Copies the currently-selected text to a clipboard,
* then deletes said text if it's editable.
*/
void
-gtranslator_view_cut_clipboard (GtrView * view)
+gtr_view_cut_clipboard (GtrView * view)
{
GtkTextBuffer *buffer;
GtkClipboard *clipboard;
@@ -311,13 +311,13 @@ gtranslator_view_cut_clipboard (GtrView * view)
}
/**
- * gtranslator_view_copy_clipboard:
+ * gtr_view_copy_clipboard:
* @view: a #GtrView
*
* Copies the currently-selected text to a clipboard.
*/
void
-gtranslator_view_copy_clipboard (GtrView * view)
+gtr_view_copy_clipboard (GtrView * view)
{
GtkTextBuffer *buffer;
GtkClipboard *clipboard;
@@ -336,14 +336,14 @@ gtranslator_view_copy_clipboard (GtrView * view)
}
/**
- * gtranslator_view_cut_clipboard:
+ * gtr_view_cut_clipboard:
* @view: a #GtrView
*
* Pastes the contents of a clipboard at the insertion point,
* or at override_location.
*/
void
-gtranslator_view_paste_clipboard (GtrView * view)
+gtr_view_paste_clipboard (GtrView * view)
{
GtkTextBuffer *buffer;
GtkClipboard *clipboard;
@@ -369,7 +369,7 @@ gtranslator_view_paste_clipboard (GtrView * view)
}
/**
- * gtranslator_view_set_font:
+ * gtr_view_set_font:
* @view: a #GtrView
* @def: TRUE if you want to use the default font
* @font_name: The name of the font you want to use in the #GtrView
@@ -377,7 +377,7 @@ gtranslator_view_paste_clipboard (GtrView * view)
* Sets the #GtrView font.
**/
void
-gtranslator_view_set_font (GtrView * view,
+gtr_view_set_font (GtrView * view,
gboolean def, const gchar * font_name)
{
PangoFontDescription *font_desc = NULL;
@@ -399,7 +399,7 @@ gtranslator_view_set_font (GtrView * view,
/**
- * gtranslator_view_set_search_text:
+ * gtr_view_set_search_text:
* @view: a #GtrView
* @text: the text to set for searching
* @flags: a #GtrSearchFlags
@@ -407,7 +407,7 @@ gtranslator_view_set_font (GtrView * view,
* Stores the text to search for in the @view with some specific @flags.
*/
void
-gtranslator_view_set_search_text (GtrView * view,
+gtr_view_set_search_text (GtrView * view,
const gchar * text, guint flags)
{
GtkSourceBuffer *doc;
@@ -426,13 +426,13 @@ gtranslator_view_set_search_text (GtrView * view,
{
if (*text != '\0')
{
- converted_text = gtranslator_utils_unescape_search_text (text);
- notify = !gtranslator_view_get_can_search_again (view);
+ converted_text = gtr_utils_unescape_search_text (text);
+ notify = !gtr_view_get_can_search_again (view);
}
else
{
converted_text = g_strdup ("");
- notify = gtranslator_view_get_can_search_again (view);
+ notify = gtr_view_get_can_search_again (view);
}
g_free (view->priv->search_text);
@@ -467,7 +467,7 @@ gtranslator_view_set_search_text (GtrView * view,
}
/**
- * gtranslator_view_get_search_text:
+ * gtr_view_get_search_text:
* @view: a #GtrView
* @flags: the #GtrSearchFlags of the stored text.
*
@@ -477,24 +477,24 @@ gtranslator_view_set_search_text (GtrView * view,
* Returns: the text to search for it.
*/
gchar *
-gtranslator_view_get_search_text (GtrView * view, guint * flags)
+gtr_view_get_search_text (GtrView * view, guint * flags)
{
g_return_val_if_fail (GTR_IS_VIEW (view), NULL);
if (flags != NULL)
*flags = view->priv->search_flags;
- return gtranslator_utils_escape_search_text (view->priv->search_text);
+ return gtr_utils_escape_search_text (view->priv->search_text);
}
/**
- * gtranslator_view_get_can_search_again:
+ * gtr_view_get_can_search_again:
* @view: a #GtrView
*
* Returns: TRUE if it can search again
*/
gboolean
-gtranslator_view_get_can_search_again (GtrView * view)
+gtr_view_get_can_search_again (GtrView * view)
{
g_return_val_if_fail (GTR_IS_VIEW (view), FALSE);
@@ -503,7 +503,7 @@ gtranslator_view_get_can_search_again (GtrView * view)
}
/**
- * gtranslator_view_search_forward:
+ * gtr_view_search_forward:
* @view: a #GtrView
* @start: start of search
* @end: bound for the search, or %NULL for the end of the buffer
@@ -519,7 +519,7 @@ gtranslator_view_get_can_search_again (GtrView * view)
* Returns: whether a match was found
*/
gboolean
-gtranslator_view_search_forward (GtrView * view,
+gtr_view_search_forward (GtrView * view,
const GtkTextIter * start,
const GtkTextIter * end,
GtkTextIter * match_start,
@@ -592,7 +592,7 @@ gtranslator_view_search_forward (GtrView * view,
}
/**
- * gtranslator_view_search_backward:
+ * gtr_view_search_backward:
* @view: a #GtrView
* @start: start of search
* @end: bound for the search, or %NULL for the end of the buffer
@@ -608,7 +608,7 @@ gtranslator_view_search_forward (GtrView * view,
* Returns: whether a match was found
*/
gboolean
-gtranslator_view_search_backward (GtrView * view,
+gtr_view_search_backward (GtrView * view,
const GtkTextIter * start,
const GtkTextIter * end,
GtkTextIter * match_start,
@@ -681,7 +681,7 @@ gtranslator_view_search_backward (GtrView * view,
}
/**
- * gtranslator_view_replace_all:
+ * gtr_view_replace_all:
* @view: a #GtrView
* @find: the text to find
* @replace: the text to replace @find
@@ -693,7 +693,7 @@ gtranslator_view_search_backward (GtrView * view,
* Returns: the number of replacements made it.
*/
gint
-gtranslator_view_replace_all (GtrView * view,
+gtr_view_replace_all (GtrView * view,
const gchar * find,
const gchar * replace, guint flags)
{
@@ -719,9 +719,9 @@ gtranslator_view_replace_all (GtrView * view,
if (find == NULL)
search_text = g_strdup (view->priv->search_text);
else
- search_text = gtranslator_utils_unescape_search_text (find);
+ search_text = gtr_utils_unescape_search_text (find);
- replace_text = gtranslator_utils_unescape_search_text (replace);
+ replace_text = gtr_utils_unescape_search_text (replace);
gtk_text_buffer_get_start_iter (buffer, &iter);
@@ -792,14 +792,14 @@ gtranslator_view_replace_all (GtrView * view,
}
/**
- * gtranslator_view_reload_scheme_color:
+ * gtr_view_reload_scheme_color:
* @view: a #GtrView
*
* Reloads the gtksourceview scheme color. Neccessary when the scheme color
* changes.
*/
void
-gtranslator_view_reload_scheme_color (GtrView * view)
+gtr_view_reload_scheme_color (GtrView * view)
{
GtkSourceBuffer *buf;
GtkSourceStyleScheme *scheme;
@@ -809,7 +809,7 @@ gtranslator_view_reload_scheme_color (GtrView * view)
buf = GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
manager = gtk_source_style_scheme_manager_get_default ();
- scheme_id = gtranslator_prefs_manager_get_color_scheme ();
+ scheme_id = gtr_prefs_manager_get_color_scheme ();
scheme = gtk_source_style_scheme_manager_get_scheme (manager, scheme_id);
gtk_source_buffer_set_style_scheme (buf, scheme);
diff --git a/src/gtr-view.h b/src/gtr-view.h
index 4ed8106..30ced3c 100644
--- a/src/gtr-view.h
+++ b/src/gtr-view.h
@@ -28,7 +28,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_VIEW (gtranslator_view_get_type ())
+#define GTR_TYPE_VIEW (gtr_view_get_type ())
#define GTR_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_VIEW, GtrView))
#define GTR_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_VIEW, GtrViewClass))
#define GTR_IS_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_VIEW))
@@ -72,39 +72,39 @@ struct _GtrViewClass
* Public methods
*/
GType
-gtranslator_view_get_type (void)
+gtr_view_get_type (void)
G_GNUC_CONST;
- GType gtranslator_view_register_type (GTypeModule * module);
+ GType gtr_view_register_type (GTypeModule * module);
- GtkWidget *gtranslator_view_new (void);
+ GtkWidget *gtr_view_new (void);
- gboolean gtranslator_view_get_selected_text (GtrView * view,
+ gboolean gtr_view_get_selected_text (GtrView * view,
gchar ** selected_text,
gint * len);
- void gtranslator_view_enable_spellcheck (GtrView * view,
+ void gtr_view_enable_spellcheck (GtrView * view,
gboolean enable);
- void gtranslator_view_enable_visible_whitespace
+ void gtr_view_enable_visible_whitespace
(GtrView * view, gboolean enable);
- void gtranslator_view_cut_clipboard (GtrView * view);
+ void gtr_view_cut_clipboard (GtrView * view);
- void gtranslator_view_copy_clipboard (GtrView * view);
+ void gtr_view_copy_clipboard (GtrView * view);
- void gtranslator_view_paste_clipboard (GtrView * view);
+ void gtr_view_paste_clipboard (GtrView * view);
- void gtranslator_view_set_font (GtrView * view,
+ void gtr_view_set_font (GtrView * view,
gboolean def, const gchar * font_name);
- void gtranslator_view_set_search_text (GtrView * view,
+ void gtr_view_set_search_text (GtrView * view,
const gchar * text, guint flags);
- gchar *gtranslator_view_get_search_text (GtrView * view,
+ gchar *gtr_view_get_search_text (GtrView * view,
guint * flags);
- void gtranslator_view_reload_scheme_color (GtrView * view);
+ void gtr_view_reload_scheme_color (GtrView * view);
/* Search macros */
diff --git a/src/gtr-window.c b/src/gtr-window.c
index 35ab16a..096aed6 100644
--- a/src/gtr-window.c
+++ b/src/gtr-window.c
@@ -65,11 +65,11 @@
GTR_TYPE_WINDOW, \
GtrWindowPrivate))
-static void gtranslator_window_cmd_edit_toolbar (GtkAction * action,
+static void gtr_window_cmd_edit_toolbar (GtkAction * action,
GtrWindow * window);
-G_DEFINE_TYPE (GtrWindow, gtranslator_window, GTK_TYPE_WINDOW)
+G_DEFINE_TYPE (GtrWindow, gtr_window, GTK_TYPE_WINDOW)
struct _GtrWindowPrivate
{
@@ -123,27 +123,27 @@ static const GtkActionEntry always_sensitive_entries[] = {
/* File menu */
{"FileOpen", GTK_STOCK_OPEN, NULL, "<control>O",
N_("Open a PO file"),
- G_CALLBACK (gtranslator_open_file_dialog)},
+ G_CALLBACK (gtr_open_file_dialog)},
{"FileRecentFiles", NULL, N_("_Recent Files"), NULL,
NULL, NULL},
{"FileQuitWindow", GTK_STOCK_QUIT, NULL, "<control>Q",
N_("Quit the program"),
- G_CALLBACK (gtranslator_file_quit)},
+ G_CALLBACK (gtr_file_quit)},
/* Edit menu */
{"EditToolbar", NULL, N_("T_oolbar"), NULL, NULL,
- G_CALLBACK (gtranslator_window_cmd_edit_toolbar)},
+ G_CALLBACK (gtr_window_cmd_edit_toolbar)},
{"EditPreferences", GTK_STOCK_PREFERENCES, NULL, NULL,
- N_("Edit gtranslator preferences"),
- G_CALLBACK (gtranslator_actions_edit_preferences)},
+ N_("Edit gtr preferences"),
+ G_CALLBACK (gtr_actions_edit_preferences)},
{"EditHeader", GTK_STOCK_PROPERTIES, N_("_Header..."), NULL, NULL,
- G_CALLBACK (gtranslator_actions_edit_header)},
+ G_CALLBACK (gtr_actions_edit_header)},
/* Help menu */
{"HelpContents", GTK_STOCK_HELP, N_("_Contents"), "F1", NULL,
- G_CALLBACK (gtranslator_cmd_help_contents)},
+ G_CALLBACK (gtr_cmd_help_contents)},
{"HelpAbout", GTK_STOCK_ABOUT, NULL, NULL, NULL,
- G_CALLBACK (gtranslator_about_dialog)},
+ G_CALLBACK (gtr_about_dialog)},
};
/* Normal items */
@@ -152,48 +152,48 @@ static const GtkActionEntry entries[] = {
/* File menu */
{"FileSave", GTK_STOCK_SAVE, NULL, "<control>S",
N_("Save the current file"),
- G_CALLBACK (gtranslator_save_current_file_dialog)},
+ G_CALLBACK (gtr_save_current_file_dialog)},
{"FileSaveAs", GTK_STOCK_SAVE_AS, NULL, "<shift><control>S",
N_("Save the current file with another name"),
- G_CALLBACK (gtranslator_save_file_as_dialog)},
+ G_CALLBACK (gtr_save_file_as_dialog)},
/*{ "FileRevert", GTK_STOCK_REVERT_TO_SAVED, N_("_Revert"), NULL,
N_(),
- G_CALLBACK (gtranslator_save_file_as_dialog) }, */
+ G_CALLBACK (gtr_save_file_as_dialog) }, */
{"FileCloseWindow", GTK_STOCK_CLOSE, NULL, "<control>W",
N_("Close the current file"),
- G_CALLBACK (gtranslator_file_close)},
+ G_CALLBACK (gtr_file_close)},
/* Edit menu */
{"EditUndo", GTK_STOCK_UNDO, NULL, "<control>Z",
N_("Undo last operation"),
- G_CALLBACK (gtranslator_actions_edit_undo)},
+ G_CALLBACK (gtr_actions_edit_undo)},
{"EditRedo", GTK_STOCK_REDO, NULL, "<shift><control>Z",
N_("Redo last undone operation"),
- G_CALLBACK (gtranslator_actions_edit_redo)},
+ G_CALLBACK (gtr_actions_edit_redo)},
{"EditCut", GTK_STOCK_CUT, NULL, "<control>X",
N_("Cut the selected text"),
- G_CALLBACK (gtranslator_actions_edit_cut)},
+ G_CALLBACK (gtr_actions_edit_cut)},
{"EditCopy", GTK_STOCK_COPY, NULL, "<control>C",
N_("Copy the selected text"),
- G_CALLBACK (gtranslator_actions_edit_copy)},
+ G_CALLBACK (gtr_actions_edit_copy)},
{"EditPaste", GTK_STOCK_PASTE, NULL, "<control>V",
N_("Paste the contents of the clipboard"),
- G_CALLBACK (gtranslator_actions_edit_paste)},
+ G_CALLBACK (gtr_actions_edit_paste)},
{"EditClear", GTK_STOCK_CLEAR, NULL, NULL,
N_("Clear the selected translation"),
- G_CALLBACK (gtranslator_actions_edit_clear)},
+ G_CALLBACK (gtr_actions_edit_clear)},
{"EditHeader", GTK_STOCK_PROPERTIES, N_("_Header..."), NULL, NULL,
- G_CALLBACK (gtranslator_actions_edit_header)},
+ G_CALLBACK (gtr_actions_edit_header)},
{"EditComment", GTK_STOCK_INDEX, N_("C_omment..."), NULL,
N_("Edit message comment"),
- G_CALLBACK (gtranslator_edit_message_comment)},
+ G_CALLBACK (gtr_edit_message_comment)},
{"EditMessage2Trans", NULL, N_("Copy _Message to Translation"),
"<control>space",
N_("Copy original message contents to the translation field"),
- G_CALLBACK (gtranslator_message_copy_to_translation)},
+ G_CALLBACK (gtr_message_copy_to_translation)},
{"EditFuzzy", NULL, N_("Toggle _Fuzzy Status"), "<control>U",
N_("Toggle fuzzy status of a message"),
- G_CALLBACK (gtranslator_message_status_toggle_fuzzy)},
+ G_CALLBACK (gtr_message_status_toggle_fuzzy)},
{"EditTranslationMemory", NULL, N_("_Translation Memory"), NULL, NULL,
NULL},
@@ -201,74 +201,74 @@ static const GtkActionEntry entries[] = {
/* View menu */
{"ViewContext", NULL, N_("_Context"), "<control>J",
N_("Show the Context panel"),
- G_CALLBACK (gtranslator_actions_view_context)},
+ G_CALLBACK (gtr_actions_view_context)},
{"ViewTranslationMemory", NULL, N_("_Translation Memory"), "<control>K",
N_("Show the Translation Memory panel"),
- G_CALLBACK (gtranslator_actions_view_translation_memory)},
+ G_CALLBACK (gtr_actions_view_translation_memory)},
/* Go menu */
{"GoPrevious", GTK_STOCK_GO_BACK, N_("_Previous Message"),
"<alt>Left", N_("Move back one message"),
- G_CALLBACK (gtranslator_message_go_to_previous)},
+ G_CALLBACK (gtr_message_go_to_previous)},
{"GoForward", GTK_STOCK_GO_FORWARD, N_("_Next Message"),
"<alt>Right", N_("Move forward one message"),
- G_CALLBACK (gtranslator_message_go_to_next)},
+ G_CALLBACK (gtr_message_go_to_next)},
{"GoJump", GTK_STOCK_JUMP_TO, N_("_Go to Message..."),
"<control>G", N_("Jumps to a specific message"),
- G_CALLBACK (gtranslator_message_jump)},
+ G_CALLBACK (gtr_message_jump)},
{"GoFirst", GTK_STOCK_GOTO_FIRST, N_("_First Message"),
"<alt>Home", N_("Go to the first message"),
- G_CALLBACK (gtranslator_message_go_to_first)},
+ G_CALLBACK (gtr_message_go_to_first)},
{"GoLast", GTK_STOCK_GOTO_LAST, N_("_Last Message"),
"<alt>End", N_("Go to the last message"),
- G_CALLBACK (gtranslator_message_go_to_last)},
+ G_CALLBACK (gtr_message_go_to_last)},
{"GoNextFuzzy", GTR_STOCK_FUZZY_NEXT, N_("Next Fuz_zy"),
"<alt><control>Page_Down", N_("Go to the next fuzzy message"),
- G_CALLBACK (gtranslator_message_go_to_next_fuzzy)},
+ G_CALLBACK (gtr_message_go_to_next_fuzzy)},
{"GoPreviousFuzzy", GTR_STOCK_FUZZY_PREV, N_("Previous Fuzz_y"),
"<alt><control>Page_Up", N_("Go to the previous fuzzy message"),
- G_CALLBACK (gtranslator_message_go_to_prev_fuzzy)},
+ G_CALLBACK (gtr_message_go_to_prev_fuzzy)},
{"GoNextUntranslated", GTR_STOCK_UNTRANS_NEXT, N_("Next _Untranslated"),
"<alt>Page_Down", N_("Go to the next untranslated message"),
- G_CALLBACK (gtranslator_message_go_to_next_untranslated)},
+ G_CALLBACK (gtr_message_go_to_next_untranslated)},
{"GoPreviousUntranslated", GTR_STOCK_UNTRANS_PREV,
N_("Previ_ous Untranslated"),
"<alt>Page_Up", N_("Go to the previous untranslated message"),
- G_CALLBACK (gtranslator_message_go_to_prev_untranslated)},
+ G_CALLBACK (gtr_message_go_to_prev_untranslated)},
{"GoNextFuzzyUntranslated", GTR_STOCK_FUZZY_UNTRANS_NEXT,
N_("Next Fu_zzy or Untranslated"),
"<control><shift>Page_Down",
N_("Go to the next fuzzy or untranslated message"),
- G_CALLBACK (gtranslator_message_go_to_next_fuzzy_or_untranslated)},
+ G_CALLBACK (gtr_message_go_to_next_fuzzy_or_untranslated)},
{"GoPreviousFuzzyUntranslated", GTR_STOCK_FUZZY_UNTRANS_PREV,
N_("Pre_vious Fuzzy or Untranslated"),
"<control><shift>Page_Up",
N_("Go to the previous fuzzy or untranslated message"),
- G_CALLBACK (gtranslator_message_go_to_prev_fuzzy_or_untranslated)},
+ G_CALLBACK (gtr_message_go_to_prev_fuzzy_or_untranslated)},
/* Search menu */
{"SearchFind", GTK_STOCK_FIND, NULL, "<control>F",
N_("Search for text"),
- G_CALLBACK (_gtranslator_actions_search_find)},
+ G_CALLBACK (_gtr_actions_search_find)},
{"SearchReplace", GTK_STOCK_FIND_AND_REPLACE, NULL, "<control>H",
N_("Search for and replace text"),
- G_CALLBACK (_gtranslator_actions_search_replace)},
+ G_CALLBACK (_gtr_actions_search_replace)},
/* Documents menu */
{"FileSaveAll", GTK_STOCK_SAVE, N_("_Save All"), "<shift><control>L",
N_("Save all open files"),
- G_CALLBACK (_gtranslator_actions_file_save_all)},
+ G_CALLBACK (_gtr_actions_file_save_all)},
{"FileCloseAll", GTK_STOCK_CLOSE, N_("_Close All"), "<shift><control>W",
N_("Close all open files"),
- G_CALLBACK (_gtranslator_actions_file_close_all)},
+ G_CALLBACK (_gtr_actions_file_close_all)},
{"DocumentsPreviousDocument", NULL, N_("_Previous Document"),
"<alt><control>Page_Up",
N_("Activate previous document"),
- G_CALLBACK (gtranslator_actions_documents_previous_document)},
+ G_CALLBACK (gtr_actions_documents_previous_document)},
{"DocumentsNextDocument", NULL, N_("_Next Document"),
"<alt><control>Page_Down",
N_("Activate next document"),
- G_CALLBACK (gtranslator_actions_documents_next_document)}
+ G_CALLBACK (gtr_actions_documents_next_document)}
};
/*
@@ -326,7 +326,7 @@ on_layout_dirty_notify (GObject * object,
}
static void
-gtranslator_window_layout_save (GtrWindow * window,
+gtr_window_layout_save (GtrWindow * window,
const gchar * filename, const gchar * name)
{
g_return_if_fail (GTR_IS_WINDOW (window));
@@ -338,7 +338,7 @@ gtranslator_window_layout_save (GtrWindow * window,
}
static void
-gtranslator_window_layout_load (GtrWindow * window,
+gtr_window_layout_load (GtrWindow * window,
const gchar * layout_filename,
const gchar * name)
{
@@ -351,7 +351,7 @@ gtranslator_window_layout_load (GtrWindow * window,
gchar *path;
gchar *datadir;
- datadir = gtranslator_dirs_get_gtranslator_data_dir ();
+ datadir = gtr_dirs_get_gtr_data_dir ();
path = g_build_filename (datadir, "layout.xml", NULL);
g_free (datadir);
@@ -535,7 +535,7 @@ remove_widget (GtrWindow * window,
}
static void
-gtranslator_app_present_widget (GtrWindow * window,
+gtr_app_present_widget (GtrWindow * window,
GtkWidget * widget, GError ** error)
{
GdlDockItem *dock_item;
@@ -576,7 +576,7 @@ set_sensitive_according_to_message (GtrWindow * window,
GList *current;
GtkAction *action;
- current = gtranslator_po_get_current_message (po);
+ current = gtr_po_get_current_message (po);
action = gtk_action_group_get_action (window->priv->action_group,
"GoForward");
@@ -596,33 +596,33 @@ set_sensitive_according_to_message (GtrWindow * window,
action = gtk_action_group_get_action (window->priv->action_group,
"GoNextFuzzy");
gtk_action_set_sensitive (action,
- gtranslator_po_get_next_fuzzy (po) != NULL);
+ gtr_po_get_next_fuzzy (po) != NULL);
action = gtk_action_group_get_action (window->priv->action_group,
"GoPreviousFuzzy");
gtk_action_set_sensitive (action,
- gtranslator_po_get_prev_fuzzy (po) != NULL);
+ gtr_po_get_prev_fuzzy (po) != NULL);
action = gtk_action_group_get_action (window->priv->action_group,
"GoNextUntranslated");
gtk_action_set_sensitive (action,
- gtranslator_po_get_next_untrans (po) != NULL);
+ gtr_po_get_next_untrans (po) != NULL);
action = gtk_action_group_get_action (window->priv->action_group,
"GoPreviousUntranslated");
gtk_action_set_sensitive (action,
- gtranslator_po_get_prev_untrans (po) != NULL);
+ gtr_po_get_prev_untrans (po) != NULL);
action = gtk_action_group_get_action (window->priv->action_group,
"GoNextFuzzyUntranslated");
gtk_action_set_sensitive (action,
- gtranslator_po_get_next_fuzzy_or_untrans (po) !=
+ gtr_po_get_next_fuzzy_or_untrans (po) !=
NULL);
action = gtk_action_group_get_action (window->priv->action_group,
"GoPreviousFuzzyUntranslated");
gtk_action_set_sensitive (action,
- gtranslator_po_get_prev_fuzzy_or_untrans (po) !=
+ gtr_po_get_prev_fuzzy_or_untrans (po) !=
NULL);
}
@@ -640,18 +640,18 @@ set_sensitive_according_to_tab (GtrWindow * window,
gint pages;
gint current_page;
- notebook = gtranslator_window_get_notebook (window);
+ notebook = gtr_window_get_notebook (window);
pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (window->priv->notebook));
- view = gtranslator_tab_get_active_view (tab);
- po = gtranslator_tab_get_po (tab);
- current = gtranslator_po_get_current_message (po);
+ view = gtr_tab_get_active_view (tab);
+ po = gtr_tab_get_po (tab);
+ current = gtr_po_get_current_message (po);
buf = GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
if (gtk_action_group_get_sensitive (window->priv->action_group) == FALSE)
gtk_action_group_set_sensitive (window->priv->action_group, TRUE);
/*File */
- state = gtranslator_po_get_state (po);
+ state = gtr_po_get_state (po);
action = gtk_action_group_get_action (window->priv->action_group,
"FileSave");
gtk_action_set_sensitive (action, state == GTR_PO_STATE_MODIFIED);
@@ -704,13 +704,13 @@ set_sensitive_according_to_window (GtrWindow * window)
}
/*
- * gtranslator_window_update_statusbar_message_count:
+ * gtr_window_update_statusbar_message_count:
*
* This func is used to show the global status of the message list
* in the statusbar widget.
*/
static void
-gtranslator_window_update_statusbar_message_count (GtrTab * tab,
+gtr_window_update_statusbar_message_count (GtrTab * tab,
GtrMsg * message,
GtrWindow * window)
{
@@ -727,15 +727,15 @@ gtranslator_window_update_statusbar_message_count (GtrTab * tab,
g_return_if_fail (GTR_IS_MSG (message));
- po = gtranslator_tab_get_po (tab);
+ po = gtr_tab_get_po (tab);
- message_count = gtranslator_po_get_messages_count (po);
- pos = gtranslator_po_get_message_position (po);
- translated = gtranslator_po_get_translated_count (po);
- fuzzy = gtranslator_po_get_fuzzy_count (po);
- untranslated = gtranslator_po_get_untranslated_count (po);
+ message_count = gtr_po_get_messages_count (po);
+ pos = gtr_po_get_message_position (po);
+ translated = gtr_po_get_translated_count (po);
+ fuzzy = gtr_po_get_fuzzy_count (po);
+ untranslated = gtr_po_get_untranslated_count (po);
- switch (gtranslator_msg_get_status (message))
+ switch (gtr_msg_get_status (message))
{
case GTR_MSG_STATUS_UNTRANSLATED:
status = _("Untranslated");
@@ -770,9 +770,9 @@ gtranslator_window_update_statusbar_message_count (GtrTab * tab,
" (", translated_msg, ", ", fuzzy_msg, ", ",
untranslated_msg, ")", NULL);
- gtranslator_statusbar_pop (GTR_STATUSBAR (window->priv->statusbar), 0);
+ gtr_statusbar_pop (GTR_STATUSBAR (window->priv->statusbar), 0);
- gtranslator_statusbar_push (GTR_STATUSBAR (window->priv->statusbar),
+ gtr_statusbar_push (GTR_STATUSBAR (window->priv->statusbar),
0, msg);
g_free (msg);
@@ -784,7 +784,7 @@ gtranslator_window_update_statusbar_message_count (GtrTab * tab,
g_free (untranslated_msg);
/* We have to update the progress bar too */
- gtranslator_statusbar_update_progress_bar (GTR_STATUSBAR
+ gtr_statusbar_update_progress_bar (GTR_STATUSBAR
(window->priv->statusbar),
(gdouble) translated,
(gdouble) message_count);
@@ -812,8 +812,8 @@ get_menu_tip_for_tab (GtrTab * tab)
gchar *tip;
GFile *file;
- doc = gtranslator_tab_get_po (tab);
- file = gtranslator_po_get_location (doc);
+ doc = gtr_tab_get_po (tab);
+ file = gtr_po_get_location (doc);
uri = g_file_get_path (file);
g_object_unref (file);
@@ -875,8 +875,8 @@ update_documents_list_menu (GtrWindow * window)
* get the same accel.
*/
action_name = g_strdup_printf ("Tab_%d", i);
- tab_name = gtranslator_tab_get_name (GTR_TAB (tab));
- name = gtranslator_utils_escape_underscores (tab_name, -1);
+ tab_name = gtr_tab_get_name (GTR_TAB (tab));
+ name = gtr_utils_escape_underscores (tab_name, -1);
tip = get_menu_tip_for_tab (GTR_TAB (tab));
/* alt + 1, 2, 3... 0 to switch to the first ten tabs */
@@ -948,8 +948,8 @@ drag_data_received_cb (GtkWidget * widget,
if (info == TARGET_URI_LIST)
{
- locations = gtranslator_utils_drop_get_locations (selection_data);
- gtranslator_actions_load_locations (window, locations);
+ locations = gtr_utils_drop_get_locations (selection_data);
+ gtr_actions_load_locations (window, locations);
g_slist_foreach (locations, (GFunc) g_object_unref, NULL);
g_slist_free (locations);
@@ -960,14 +960,14 @@ static void
update_overwrite_mode_statusbar (GtkTextView * view,
GtrWindow * window)
{
- if (view != GTK_TEXT_VIEW (gtranslator_window_get_active_view (window)))
+ if (view != GTK_TEXT_VIEW (gtr_window_get_active_view (window)))
return;
/* Note that we have to use !gtk_text_view_get_overwrite since we
are in the in the signal handler of "toggle overwrite" that is
G_SIGNAL_RUN_LAST
*/
- gtranslator_statusbar_set_overwrite (GTR_STATUSBAR
+ gtr_statusbar_set_overwrite (GTR_STATUSBAR
(window->priv->statusbar),
!gtk_text_view_get_overwrite (view));
}
@@ -984,24 +984,24 @@ set_window_title (GtrWindow * window, gboolean with_path)
if (with_path)
{
po =
- gtranslator_tab_get_po (GTR_TAB
- (gtranslator_window_get_active_tab (window)));
- active_tab = gtranslator_window_get_active_tab (window);
- state = gtranslator_po_get_state (gtranslator_tab_get_po (active_tab));
- po = gtranslator_tab_get_po (active_tab);
- file = gtranslator_po_get_location (po);
+ gtr_tab_get_po (GTR_TAB
+ (gtr_window_get_active_tab (window)));
+ active_tab = gtr_window_get_active_tab (window);
+ state = gtr_po_get_state (gtr_tab_get_po (active_tab));
+ po = gtr_tab_get_po (active_tab);
+ file = gtr_po_get_location (po);
if (state == GTR_PO_STATE_MODIFIED)
title =
- g_strdup_printf (_("gtranslator - *%s"), g_file_get_path (file));
+ g_strdup_printf (_("gtr - *%s"), g_file_get_path (file));
else
title =
- g_strdup_printf (_("gtranslator - %s"), g_file_get_path (file));
+ g_strdup_printf (_("gtr - %s"), g_file_get_path (file));
g_object_unref (file);
}
else
- title = g_strdup (_("gtranslator"));
+ title = g_strdup (_("gtr"));
gtk_window_set_title (GTK_WINDOW (window), title);
g_free (title);
@@ -1034,20 +1034,20 @@ notebook_switch_page (GtkNotebook * nb,
set_window_title (window, FALSE);
window->priv->active_tab = tab;
- view = gtranslator_tab_get_active_view (tab);
+ view = gtr_tab_get_active_view (tab);
set_sensitive_according_to_tab (window, tab);
/* sync the statusbar */
- gtranslator_statusbar_set_overwrite (GTR_STATUSBAR
+ gtr_statusbar_set_overwrite (GTR_STATUSBAR
(window->priv->statusbar),
gtk_text_view_get_overwrite
(GTK_TEXT_VIEW (view)));
- po = gtranslator_tab_get_po (tab);
- msg = gtranslator_po_get_current_message (po);
- gtranslator_window_update_statusbar_message_count (tab, msg->data, window);
+ po = gtr_tab_get_po (tab);
+ msg = gtr_po_get_current_message (po);
+ gtr_window_update_statusbar_message_count (tab, msg->data, window);
/* activate the right item in the documents menu */
action_name = g_strdup_printf ("Tab_%d", page_num);
@@ -1063,8 +1063,8 @@ notebook_switch_page (GtkNotebook * nb,
if (action != NULL)
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE);
- gtranslator_plugins_engine_update_plugins_ui
- (gtranslator_plugins_engine_get_default (), window, FALSE);
+ gtr_plugins_engine_update_plugins_ui
+ (gtr_plugins_engine_get_default (), window, FALSE);
}
static void
@@ -1092,10 +1092,10 @@ notebook_tab_close_request (GtrNotebook * notebook,
{
/* Note: we are destroying the tab before the default handler
* seems to be ok, but we need to keep an eye on this. */
- gtranslator_close_tab (tab, window);
+ gtr_close_tab (tab, window);
- gtranslator_plugins_engine_update_plugins_ui
- (gtranslator_plugins_engine_get_default (), window, FALSE);
+ gtr_plugins_engine_update_plugins_ui
+ (gtr_plugins_engine_get_default (), window, FALSE);
}
static void
@@ -1107,7 +1107,7 @@ can_undo (GtkSourceBuffer * doc,
GtrView *view;
GtkSourceBuffer *buf;
- view = gtranslator_window_get_active_view (window);
+ view = gtr_window_get_active_view (window);
buf = GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
sensitive = gtk_source_buffer_can_undo (buf);
@@ -1129,7 +1129,7 @@ can_redo (GtkSourceBuffer * doc,
GtrView *view;
GtkSourceBuffer *buf;
- view = gtranslator_window_get_active_view (window);
+ view = gtr_window_get_active_view (window);
buf = GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
sensitive = gtk_source_buffer_can_redo (buf);
@@ -1149,7 +1149,7 @@ sync_state (GtrPo * po,
int n_pages = 0;
set_sensitive_according_to_tab (window,
- gtranslator_tab_get_from_document (po));
+ gtr_tab_get_from_document (po));
n_pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (window->priv->notebook));
if (n_pages == 1)
@@ -1162,9 +1162,9 @@ showed_message_cb (GtrTab * tab,
{
g_return_if_fail (GTR_IS_TAB (tab));
- gtranslator_window_update_statusbar_message_count (tab, msg, window);
+ gtr_window_update_statusbar_message_count (tab, msg, window);
- set_sensitive_according_to_message (window, gtranslator_tab_get_po (tab));
+ set_sensitive_according_to_message (window, gtr_tab_get_po (tab));
}
static void
@@ -1188,7 +1188,7 @@ notebook_tab_added (GtkNotebook * notebook,
else
set_window_title (window, FALSE);
- views = gtranslator_tab_get_all_views (tab, FALSE, TRUE);
+ views = gtr_tab_get_all_views (tab, FALSE, TRUE);
while (views)
{
@@ -1211,22 +1211,22 @@ notebook_tab_added (GtkNotebook * notebook,
g_signal_connect_after (child,
"message_changed",
G_CALLBACK
- (gtranslator_window_update_statusbar_message_count),
+ (gtr_window_update_statusbar_message_count),
window);
g_signal_connect_after (child, "showed_message",
G_CALLBACK (showed_message_cb), window);
- g_signal_connect (gtranslator_tab_get_po (tab),
+ g_signal_connect (gtr_tab_get_po (tab),
"notify::state", G_CALLBACK (sync_state), window);
update_documents_list_menu (window);
- gtranslator_plugins_engine_update_plugins_ui
- (gtranslator_plugins_engine_get_default (), window, FALSE);
+ gtr_plugins_engine_update_plugins_ui
+ (gtr_plugins_engine_get_default (), window, FALSE);
}
void
-gtranslator_recent_add (GtrWindow * window,
+gtr_recent_add (GtrWindow * window,
GFile * location, gchar * project_id)
{
GtkRecentData *recent_data;
@@ -1237,7 +1237,7 @@ gtranslator_recent_add (GtrWindow * window,
uri = g_file_get_uri (location);
path = g_file_get_path (location);
- display_name = gtranslator_utils_reduce_path ((const gchar *) path);
+ display_name = gtr_utils_reduce_path ((const gchar *) path);
recent_data = g_slice_new (GtkRecentData);
@@ -1264,7 +1264,7 @@ gtranslator_recent_add (GtrWindow * window,
}
void
-gtranslator_recent_remove (GtrWindow * window, const gchar * path)
+gtr_recent_remove (GtrWindow * window, const gchar * path)
{
gchar *uri;
GError *error = NULL;
@@ -1290,7 +1290,7 @@ gtranslator_recent_remove (GtrWindow * window, const gchar * path)
}
static void
-gtranslator_recent_chooser_item_activated_cb (GtkRecentChooser * chooser,
+gtr_recent_chooser_item_activated_cb (GtkRecentChooser * chooser,
GtrWindow * window)
{
gchar *uri;
@@ -1305,7 +1305,7 @@ gtranslator_recent_chooser_item_activated_cb (GtkRecentChooser * chooser,
list = g_slist_prepend (list, location);
- gtranslator_actions_load_locations (window, list);
+ gtr_actions_load_locations (window, list);
g_slist_foreach (list, (GFunc) g_object_unref, NULL);
g_slist_free (list);
}
@@ -1335,7 +1335,7 @@ create_recent_chooser_menu (GtrWindow * window,
}
static void
-gtranslator_window_set_action_sensitive (GtrWindow * window,
+gtr_window_set_action_sensitive (GtrWindow * window,
const gchar * name,
gboolean sensitive)
{
@@ -1345,18 +1345,18 @@ gtranslator_window_set_action_sensitive (GtrWindow * window,
}
static void
-gtranslator_window_cmd_edit_toolbar_cb (GtkDialog * dialog,
+gtr_window_cmd_edit_toolbar_cb (GtkDialog * dialog,
gint response, gpointer data)
{
GtrWindow *window = GTR_WINDOW (data);
egg_editable_toolbar_set_edit_mode
(EGG_EDITABLE_TOOLBAR (window->priv->toolbar), FALSE);
- _gtranslator_application_save_toolbars_model (GTR_APP);
+ _gtr_application_save_toolbars_model (GTR_APP);
gtk_widget_destroy (GTK_WIDGET (dialog));
}
static void
-gtranslator_window_cmd_edit_toolbar (GtkAction * action,
+gtr_window_cmd_edit_toolbar (GtkAction * action,
GtrWindow * window)
{
GtkWidget *dialog;
@@ -1375,7 +1375,7 @@ gtranslator_window_cmd_edit_toolbar (GtkAction * action,
editor = egg_toolbar_editor_new (window->priv->ui_manager,
EGG_TOOLBARS_MODEL
- (_gtranslator_application_get_toolbars_model
+ (_gtr_application_get_toolbars_model
(GTR_APP)));
gtk_container_set_border_width (GTK_CONTAINER (editor), 5);
gtk_box_set_spacing (GTK_BOX (EGG_TOOLBAR_EDITOR (editor)), 5);
@@ -1386,7 +1386,7 @@ gtranslator_window_cmd_edit_toolbar (GtkAction * action,
(EGG_EDITABLE_TOOLBAR (window->priv->toolbar), TRUE);
g_signal_connect (dialog, "response",
- G_CALLBACK (gtranslator_window_cmd_edit_toolbar_cb),
+ G_CALLBACK (gtr_window_cmd_edit_toolbar_cb),
window);
gtk_widget_show_all (dialog);
}
@@ -1403,7 +1403,7 @@ menu_item_select_cb (GtkMenuItem * proxy, GtrWindow * window)
g_object_get (G_OBJECT (action), "tooltip", &message, NULL);
if (message)
{
- gtranslator_statusbar_push_default (GTR_STATUSBAR
+ gtr_statusbar_push_default (GTR_STATUSBAR
(window->priv->statusbar), message);
g_free (message);
}
@@ -1412,7 +1412,7 @@ menu_item_select_cb (GtkMenuItem * proxy, GtrWindow * window)
static void
menu_item_deselect_cb (GtkMenuItem * proxy, GtrWindow * window)
{
- gtranslator_statusbar_pop_default (GTR_STATUSBAR (window->priv->statusbar));
+ gtr_statusbar_pop_default (GTR_STATUSBAR (window->priv->statusbar));
}
static void
@@ -1444,7 +1444,7 @@ disconnect_proxy_cb (GtkUIManager * manager,
}
static void
-gtranslator_window_draw (GtrWindow * window)
+gtr_window_draw (GtrWindow * window)
{
GtkWidget *hbox; //Statusbar and progressbar
GtkWidget *widget;
@@ -1498,7 +1498,7 @@ gtranslator_window_draw (GtrWindow * window)
gtk_ui_manager_insert_action_group (priv->ui_manager, action_group, 0);
g_object_unref (action_group);
- datadir = gtranslator_dirs_get_gtranslator_data_dir ();
+ datadir = gtr_dirs_get_gtr_data_dir ();
path = g_build_filename (datadir, "gtranslator-ui.xml", NULL);
g_free (datadir);
@@ -1528,7 +1528,7 @@ gtranslator_window_draw (GtrWindow * window)
g_signal_connect (priv->recent_menu,
"item-activated",
- G_CALLBACK (gtranslator_recent_chooser_item_activated_cb),
+ G_CALLBACK (gtr_recent_chooser_item_activated_cb),
window);
widget = gtk_ui_manager_get_widget (priv->ui_manager,
@@ -1544,7 +1544,7 @@ gtranslator_window_draw (GtrWindow * window)
(g_object_new (EGG_TYPE_EDITABLE_TOOLBAR,
"ui-manager", priv->ui_manager,
"model",
- _gtranslator_application_get_toolbars_model (GTR_APP),
+ _gtr_application_get_toolbars_model (GTR_APP),
NULL));
egg_editable_toolbar_show (EGG_EDITABLE_TOOLBAR (priv->toolbar),
@@ -1568,13 +1568,13 @@ gtranslator_window_draw (GtrWindow * window)
priv->layout_manager = gdl_dock_layout_new (GDL_DOCK (priv->dock));
g_object_set (priv->layout_manager->master,
"switcher-style",
- gtranslator_prefs_manager_get_pane_switcher_style (), NULL);
+ gtr_prefs_manager_get_pane_switcher_style (), NULL);
g_signal_connect (priv->layout_manager,
"notify::dirty",
G_CALLBACK (on_layout_dirty_notify), window);
/* notebook */
- priv->notebook = GTK_WIDGET (gtranslator_notebook_new ());
+ priv->notebook = GTK_WIDGET (gtr_notebook_new ());
g_signal_connect (priv->notebook, "switch-page",
G_CALLBACK (notebook_switch_page), window);
g_signal_connect (priv->notebook, "page-added",
@@ -1591,7 +1591,7 @@ gtranslator_window_draw (GtrWindow * window)
gtk_widget_show (hbox);
/* statusbar & progress bar */
- window->priv->statusbar = gtranslator_statusbar_new ();
+ window->priv->statusbar = gtr_statusbar_new ();
gtk_box_pack_end (GTK_BOX (hbox), window->priv->statusbar, TRUE, TRUE, 0);
@@ -1599,7 +1599,7 @@ gtranslator_window_draw (GtrWindow * window)
}
static void
-gtranslator_window_init (GtrWindow * window)
+gtr_window_init (GtrWindow * window)
{
GtkTargetList *tl;
gint active_page;
@@ -1611,7 +1611,7 @@ gtranslator_window_init (GtrWindow * window)
window->priv->destroy_has_run = FALSE;
- gtranslator_window_draw (window);
+ gtr_window_draw (window);
set_sensitive_according_to_window (window);
@@ -1647,8 +1647,8 @@ gtranslator_window_init (GtrWindow * window)
gtk_menu_item_get_submenu (GTK_MENU_ITEM (view_menu));
/* Plugins */
- gtranslator_plugins_engine_update_plugins_ui
- (gtranslator_plugins_engine_get_default (), window, TRUE);
+ gtr_plugins_engine_update_plugins_ui
+ (gtr_plugins_engine_get_default (), window, TRUE);
/* Adding notebook to dock */
add_widget_full (window,
@@ -1658,16 +1658,16 @@ gtranslator_window_init (GtrWindow * window)
NULL, GTR_WINDOW_PLACEMENT_CENTER, TRUE, NULL);
/* Loading dock layout */
- config_folder = gtranslator_dirs_get_user_config_dir ();
- filename = g_build_filename (config_folder, "gtranslator-layout.xml", NULL);
+ config_folder = gtr_dirs_get_user_config_dir ();
+ filename = g_build_filename (config_folder, "gtr-layout.xml", NULL);
g_free (config_folder);
- gtranslator_window_layout_load (window, filename, NULL);
+ gtr_window_layout_load (window, filename, NULL);
g_free (filename);
}
static void
-gtranslator_window_dispose (GObject * object)
+gtr_window_dispose (GObject * object)
{
GtrWindow *window = GTR_WINDOW (object);
GtrWindowPrivate *priv = window->priv;
@@ -1683,13 +1683,13 @@ gtranslator_window_dispose (GObject * object)
priv->action_group = NULL;
}
- G_OBJECT_CLASS (gtranslator_window_parent_class)->dispose (object);
+ G_OBJECT_CLASS (gtr_window_parent_class)->dispose (object);
}
static void
-gtranslator_window_finalize (GObject * object)
+gtr_window_finalize (GObject * object)
{
- G_OBJECT_CLASS (gtranslator_window_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_window_parent_class)->finalize (object);
}
static void
@@ -1698,23 +1698,23 @@ save_panes_state (GtrWindow * window)
gchar *filename;
gchar *config_folder;
- if (gtranslator_prefs_manager_window_size_can_set ())
- gtranslator_prefs_manager_set_window_size (window->priv->width,
+ if (gtr_prefs_manager_window_size_can_set ())
+ gtr_prefs_manager_set_window_size (window->priv->width,
window->priv->height);
- if (gtranslator_prefs_manager_window_state_can_set ())
- gtranslator_prefs_manager_set_window_state (window->priv->window_state);
+ if (gtr_prefs_manager_window_state_can_set ())
+ gtr_prefs_manager_set_window_state (window->priv->window_state);
- config_folder = gtranslator_dirs_get_user_config_dir ();
- filename = g_build_filename (config_folder, "gtranslator-layout.xml", NULL);
+ config_folder = gtr_dirs_get_user_config_dir ();
+ filename = g_build_filename (config_folder, "gtr-layout.xml", NULL);
g_free (config_folder);
- gtranslator_window_layout_save (window, filename, NULL);
+ gtr_window_layout_save (window, filename, NULL);
g_free (filename);
}
static void
-gtranslator_window_destroy (GtkObject * object)
+gtr_window_destroy (GtkObject * object)
{
GtrWindow *window;
@@ -1726,12 +1726,12 @@ gtranslator_window_destroy (GtkObject * object)
window->priv->destroy_has_run = TRUE;
}
- GTK_OBJECT_CLASS (gtranslator_window_parent_class)->destroy (object);
+ GTK_OBJECT_CLASS (gtr_window_parent_class)->destroy (object);
}
static gboolean
-gtranslator_window_configure_event (GtkWidget * widget,
+gtr_window_configure_event (GtkWidget * widget,
GdkEventConfigure * event)
{
GtrWindow *window = GTR_WINDOW (widget);
@@ -1739,12 +1739,12 @@ gtranslator_window_configure_event (GtkWidget * widget,
window->priv->width = event->width;
window->priv->height = event->height;
- return GTK_WIDGET_CLASS (gtranslator_window_parent_class)->
+ return GTK_WIDGET_CLASS (gtr_window_parent_class)->
configure_event (widget, event);
}
static void
-gtranslator_window_class_init (GtrWindowClass * klass)
+gtr_window_class_init (GtrWindowClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkObjectClass *gobject_class = GTK_OBJECT_CLASS (klass);
@@ -1752,18 +1752,18 @@ gtranslator_window_class_init (GtrWindowClass * klass)
g_type_class_add_private (klass, sizeof (GtrWindowPrivate));
- object_class->finalize = gtranslator_window_finalize;
- object_class->dispose = gtranslator_window_dispose;
+ object_class->finalize = gtr_window_finalize;
+ object_class->dispose = gtr_window_dispose;
- gobject_class->destroy = gtranslator_window_destroy;
+ gobject_class->destroy = gtr_window_destroy;
- widget_class->configure_event = gtranslator_window_configure_event;
+ widget_class->configure_event = gtr_window_configure_event;
}
/***************************** Public funcs ***********************************/
/**
- * gtranslator_window_create_tab:
+ * gtr_window_create_tab:
* @window: a #GtrWindow
* @po: a #GtrPo
*
@@ -1773,20 +1773,20 @@ gtranslator_window_class_init (GtrWindowClass * klass)
* Returns: a new #GtrTab object
*/
GtrTab *
-gtranslator_window_create_tab (GtrWindow * window, GtrPo * po)
+gtr_window_create_tab (GtrWindow * window, GtrPo * po)
{
GtrTab *tab;
- tab = gtranslator_tab_new (po);
+ tab = gtr_tab_new (po);
gtk_widget_show (GTK_WIDGET (tab));
- gtranslator_notebook_add_page (GTR_NOTEBOOK (window->priv->notebook), tab);
+ gtr_notebook_add_page (GTR_NOTEBOOK (window->priv->notebook), tab);
return tab;
}
/**
- * gtranslator_window_get_active_tab:
+ * gtr_window_get_active_tab:
* @window: a #GtrWindow
*
* Gets the active #GtrTab of the @window.
@@ -1794,14 +1794,14 @@ gtranslator_window_create_tab (GtrWindow * window, GtrPo * po)
* Returns: the active #GtrTab of the @window.
*/
GtrTab *
-gtranslator_window_get_active_tab (GtrWindow * window)
+gtr_window_get_active_tab (GtrWindow * window)
{
return
- gtranslator_notebook_get_page (GTR_NOTEBOOK (window->priv->notebook));
+ gtr_notebook_get_page (GTR_NOTEBOOK (window->priv->notebook));
}
/**
- * gtranslator_window_get_all_tabs:
+ * gtr_window_get_all_tabs:
* @window: a #GtrWindow
*
* Gets a list of all tabs in the @window or NULL if there is no tab opened.
@@ -1809,7 +1809,7 @@ gtranslator_window_get_active_tab (GtrWindow * window)
* Returns: a list of all tabs in the @window or NULL if there is no tab opened.
*/
GList *
-gtranslator_window_get_all_tabs (GtrWindow * window)
+gtr_window_get_all_tabs (GtrWindow * window)
{
gint num_pages;
gint i = 0;
@@ -1831,7 +1831,7 @@ gtranslator_window_get_all_tabs (GtrWindow * window)
}
/**
- * gtranslator_window_get_header_from_active_tab:
+ * gtr_window_get_header_from_active_tab:
* @window: a #GtrWindow
*
* Gets the #GtrHeader of the #GtrPo of in the active
@@ -1841,7 +1841,7 @@ gtranslator_window_get_all_tabs (GtrWindow * window)
* #GtrTab
*/
GtrHeader *
-gtranslator_window_get_header_from_active_tab (GtrWindow * window)
+gtr_window_get_header_from_active_tab (GtrWindow * window)
{
GtrTab *current_page;
GtrPo *po;
@@ -1849,18 +1849,18 @@ gtranslator_window_get_header_from_active_tab (GtrWindow * window)
g_return_val_if_fail (GTR_IS_WINDOW (window), NULL);
- current_page = gtranslator_window_get_active_tab (window);
+ current_page = gtr_window_get_active_tab (window);
if (!current_page)
return NULL;
- po = gtranslator_tab_get_po (current_page);
- header = gtranslator_po_get_header (po);
+ po = gtr_tab_get_po (current_page);
+ header = gtr_po_get_header (po);
return header;
}
/**
- * gtranslator_window_get_notebook:
+ * gtr_window_get_notebook:
* @window: a #GtrWindow
*
* Gets the main #GtrNotebook of the @window.
@@ -1868,13 +1868,13 @@ gtranslator_window_get_header_from_active_tab (GtrWindow * window)
* Returns: the #GtrNotebook of the @window
*/
GtrNotebook *
-gtranslator_window_get_notebook (GtrWindow * window)
+gtr_window_get_notebook (GtrWindow * window)
{
return GTR_NOTEBOOK (window->priv->notebook);
}
/**
- * gtranslator_window_get_statusbar:
+ * gtr_window_get_statusbar:
* @window: a #GtrWindow
*
* Gets the statusbar widget of the window.
@@ -1882,13 +1882,13 @@ gtranslator_window_get_notebook (GtrWindow * window)
* Returns: the statusbar widget of the window
*/
GtkWidget *
-gtranslator_window_get_statusbar (GtrWindow * window)
+gtr_window_get_statusbar (GtrWindow * window)
{
return window->priv->statusbar;
}
/**
- * gtranslator_window_get_ui_manager:
+ * gtr_window_get_ui_manager:
* @window: a #GtrWindow
*
* Gets the #GtkUIManager of the window.
@@ -1896,13 +1896,13 @@ gtranslator_window_get_statusbar (GtrWindow * window)
* Returns: the #GtkUIManager of the @window
*/
GtkUIManager *
-gtranslator_window_get_ui_manager (GtrWindow * window)
+gtr_window_get_ui_manager (GtrWindow * window)
{
return window->priv->ui_manager;
}
/**
- * gtranslator_window_get_active_view:
+ * gtr_window_get_active_view:
* @window: a #GtranslationWindow
*
* Gets the active translation view in the #GtranslationWindow or
@@ -1912,19 +1912,19 @@ gtranslator_window_get_ui_manager (GtrWindow * window)
* NULL if there is not tab opened.
**/
GtrView *
-gtranslator_window_get_active_view (GtrWindow * window)
+gtr_window_get_active_view (GtrWindow * window)
{
GtrTab *current_tab;
- current_tab = gtranslator_window_get_active_tab (window);
+ current_tab = gtr_window_get_active_tab (window);
if (!current_tab)
return NULL;
- return gtranslator_tab_get_active_view (current_tab);
+ return gtr_tab_get_active_view (current_tab);
}
/**
- * gtranslator_window_get_all_views:
+ * gtr_window_get_all_views:
* @window: the #GtranslationWindow
* @original: TRUE if you want original TextViews.
* @translated: TRUE if you want transtated TextViews.
@@ -1934,7 +1934,7 @@ gtranslator_window_get_active_view (GtrWindow * window)
* Return value: a newly allocated list of #GtranslationWindow objects
**/
GList *
-gtranslator_window_get_all_views (GtrWindow * window,
+gtr_window_get_all_views (GtrWindow * window,
gboolean original, gboolean translated)
{
gint numtabs;
@@ -1953,7 +1953,7 @@ gtranslator_window_get_all_views (GtrWindow * window,
i);
views =
g_list_concat (views,
- gtranslator_tab_get_all_views (GTR_TAB (tab), original,
+ gtr_tab_get_all_views (GTR_TAB (tab), original,
translated));
i--;
}
@@ -1962,7 +1962,7 @@ gtranslator_window_get_all_views (GtrWindow * window,
}
/**
- * gtranslator_window_add_widget:
+ * gtr_window_add_widget:
* @window: a #GtrWindow
* @widget: the widget to add in the window
* @name: the name of the widged
@@ -1974,7 +1974,7 @@ gtranslator_window_get_all_views (GtrWindow * window,
* specific name, title and icon you want.
*/
void
-gtranslator_window_add_widget (GtrWindow * window,
+gtr_window_add_widget (GtrWindow * window,
GtkWidget * widget,
const gchar * name,
const gchar * title,
@@ -1987,14 +1987,14 @@ gtranslator_window_add_widget (GtrWindow * window,
}
/**
- * gtranslator_window_remove_widget:
+ * gtr_window_remove_widget:
* @window: a #GtrWindow
* @widget: the widget to remove
*
* Removes from the @window the @widget if it exists.
*/
void
-gtranslator_window_remove_widget (GtrWindow * window,
+gtr_window_remove_widget (GtrWindow * window,
GtkWidget * widget)
{
/*FIXME: We have to manage the error */
@@ -2002,7 +2002,7 @@ gtranslator_window_remove_widget (GtrWindow * window,
}
/**
- * _gtranslator_window_get_layout_manager:
+ * _gtr_window_get_layout_manager:
* @window: a #GtrWindow
*
* Gets the GDL layout manager of the window.
@@ -2010,7 +2010,7 @@ gtranslator_window_remove_widget (GtrWindow * window,
* Returns: the GDL layout manager of the window.
*/
GObject *
-_gtranslator_window_get_layout_manager (GtrWindow * window)
+_gtr_window_get_layout_manager (GtrWindow * window)
{
g_return_val_if_fail (GTR_IS_WINDOW (window), NULL);
@@ -2018,7 +2018,7 @@ _gtranslator_window_get_layout_manager (GtrWindow * window)
}
/**
- * gtranslator_window_get_tab_from_uri:
+ * gtr_window_get_tab_from_uri:
* @window: a #GtrWindow
* @location: the GFile of the po file of the #GtrTab
*
@@ -2028,7 +2028,7 @@ _gtranslator_window_get_layout_manager (GtrWindow * window)
* Returns: the #GtrTab which @location matches with its po file.
*/
GtkWidget *
-gtranslator_window_get_tab_from_location (GtrWindow * window,
+gtr_window_get_tab_from_location (GtrWindow * window,
GFile * location)
{
GList *tabs, *l;
@@ -2037,13 +2037,13 @@ gtranslator_window_get_tab_from_location (GtrWindow * window,
g_return_val_if_fail (GTR_IS_WINDOW (window), NULL);
- tabs = gtranslator_window_get_all_tabs (window);
+ tabs = gtr_window_get_all_tabs (window);
for (l = tabs; l != NULL; l = g_list_next (l))
{
- po = gtranslator_tab_get_po (GTR_TAB (l->data));
+ po = gtr_tab_get_po (GTR_TAB (l->data));
- po_location = gtranslator_po_get_location (po);
+ po_location = gtr_po_get_location (po);
if (g_file_equal (location, po_location) == TRUE)
{
@@ -2058,14 +2058,14 @@ gtranslator_window_get_tab_from_location (GtrWindow * window,
}
/**
- * gtranslator_window_set_active_tab:
+ * gtr_window_set_active_tab:
* @window: a #GtrWindow
* @tab: a #GtrTab
*
* Sets the active tab for the @window.
*/
void
-gtranslator_window_set_active_tab (GtrWindow * window,
+gtr_window_set_active_tab (GtrWindow * window,
GtkWidget * tab)
{
gint page;
@@ -2076,7 +2076,7 @@ gtranslator_window_set_active_tab (GtrWindow * window,
}
/**
- * _gtranslator_window_close_tab:
+ * _gtr_window_close_tab:
* @window: a #GtrWindow
* @tab: a #GtrTab
*
@@ -2084,7 +2084,7 @@ gtranslator_window_set_active_tab (GtrWindow * window,
* widgets.
*/
void
-_gtranslator_window_close_tab (GtrWindow * window,
+_gtr_window_close_tab (GtrWindow * window,
GtrTab * tab)
{
gint i;
@@ -2094,7 +2094,7 @@ _gtranslator_window_close_tab (GtrWindow * window,
i = gtk_notebook_page_num (GTK_NOTEBOOK (window->priv->notebook),
GTK_WIDGET (tab));
if (i != -1)
- gtranslator_notebook_remove_page (GTR_NOTEBOOK (window->priv->notebook),
+ gtr_notebook_remove_page (GTR_NOTEBOOK (window->priv->notebook),
i);
/*
@@ -2102,15 +2102,15 @@ _gtranslator_window_close_tab (GtrWindow * window,
*/
if (i == 0)
{
- gtranslator_statusbar_push (GTR_STATUSBAR (window->priv->statusbar),
+ gtr_statusbar_push (GTR_STATUSBAR (window->priv->statusbar),
0, " ");
- gtranslator_statusbar_clear_progress_bar (GTR_STATUSBAR
+ gtr_statusbar_clear_progress_bar (GTR_STATUSBAR
(window->priv->statusbar));
}
set_sensitive_according_to_window (window);
}
-GtkWidget * gtranslator_window_get_tm_menu (GtrWindow * window)
+GtkWidget * gtr_window_get_tm_menu (GtrWindow * window)
{
return window->priv->tm_menu;
}
diff --git a/src/gtr-window.h b/src/gtr-window.h
index a6dd3c3..d4cf5c2 100644
--- a/src/gtr-window.h
+++ b/src/gtr-window.h
@@ -36,7 +36,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_WINDOW (gtranslator_window_get_type ())
+#define GTR_TYPE_WINDOW (gtr_window_get_type ())
#define GTR_WINDOW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_WINDOW, GtrWindow))
#define GTR_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_WINDOW, GtrWindowClass))
#define GTR_IS_WINDOW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_WINDOW))
@@ -83,35 +83,35 @@ typedef enum
* Public methods
*/
GType
-gtranslator_window_get_type (void)
+gtr_window_get_type (void)
G_GNUC_CONST;
- GType gtranslator_window_register_type (GTypeModule * module);
+ GType gtr_window_register_type (GTypeModule * module);
- GtrTab *gtranslator_window_create_tab (GtrWindow *
+ GtrTab *gtr_window_create_tab (GtrWindow *
window,
GtrPo * po);
- GtrTab *gtranslator_window_get_active_tab (GtrWindow *
+ GtrTab *gtr_window_get_active_tab (GtrWindow *
window);
- GList *gtranslator_window_get_all_tabs (GtrWindow * window);
+ GList *gtr_window_get_all_tabs (GtrWindow * window);
- GtrNotebook *gtranslator_window_get_notebook (GtrWindow *
+ GtrNotebook *gtr_window_get_notebook (GtrWindow *
window);
GtrHeader
- *gtranslator_window_get_header_from_active_tab (GtrWindow *
+ *gtr_window_get_header_from_active_tab (GtrWindow *
window);
- GtkWidget *gtranslator_window_get_statusbar (GtrWindow * window);
+ GtkWidget *gtr_window_get_statusbar (GtrWindow * window);
- GtkUIManager *gtranslator_window_get_ui_manager (GtrWindow *
+ GtkUIManager *gtr_window_get_ui_manager (GtrWindow *
window);
- GtrView *gtranslator_window_get_active_view (GtrWindow *
+ GtrView *gtr_window_get_active_view (GtrWindow *
window);
- GList *gtranslator_window_get_all_views (GtrWindow * window,
+ GList *gtr_window_get_all_views (GtrWindow * window,
gboolean original,
gboolean translated);
@@ -120,7 +120,7 @@ gtranslator_window_get_type (void)
void set_sensitive_according_to_window (GtrWindow * window);
- void gtranslator_window_add_widget (GtrWindow * window,
+ void gtr_window_add_widget (GtrWindow * window,
GtkWidget * widget,
const gchar * name,
const gchar * title,
@@ -128,22 +128,22 @@ gtranslator_window_get_type (void)
GtrWindowPlacement
placement);
- void gtranslator_window_remove_widget (GtrWindow * window,
+ void gtr_window_remove_widget (GtrWindow * window,
GtkWidget * widget);
- GObject *_gtranslator_window_get_layout_manager
+ GObject *_gtr_window_get_layout_manager
(GtrWindow * window);
- GtkWidget *gtranslator_window_get_tab_from_location
+ GtkWidget *gtr_window_get_tab_from_location
(GtrWindow * window, GFile * location);
- void gtranslator_window_set_active_tab (GtrWindow * window,
+ void gtr_window_set_active_tab (GtrWindow * window,
GtkWidget * tab);
- void _gtranslator_window_close_tab (GtrWindow * window,
+ void _gtr_window_close_tab (GtrWindow * window,
GtrTab * tab);
- GtkWidget *gtranslator_window_get_tm_menu (GtrWindow * window);
+ GtkWidget *gtr_window_get_tm_menu (GtrWindow * window);
G_END_DECLS
#endif /* __WINDOW_H__ */
diff --git a/src/main.c b/src/main.c
index ebcbfcb..2d6d29e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -4,12 +4,12 @@
* Gediminas Paulauskas <menesis kabalak net>
* Peeter Vois <peeter kabalak net>
* Ignacio Casal <nacho resa gmail com>
- *
+ *
* gtranslator is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* gtranslator is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -111,7 +111,7 @@ setup_path (void)
g_free (bin);
if (!g_setenv ("PATH", path, TRUE))
- g_warning ("Could not set PATH for gedit");
+ g_warning ("Could not set PATH for gtranslator");
g_free (path);
}
@@ -176,7 +176,7 @@ main (gint argc, gchar * argv[])
g_option_context_parse (context, &argc, &argv, NULL);
/* We set the default icon dir */
- pixmaps_dir = gtranslator_dirs_get_pixmaps_dir ();
+ pixmaps_dir = gtr_dirs_get_pixmaps_dir ();
gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
pixmaps_dir);
g_free (pixmaps_dir);
@@ -184,36 +184,36 @@ main (gint argc, gchar * argv[])
/*
* Init preferences manager
*/
- gtranslator_prefs_manager_app_init ();
+ gtr_prefs_manager_app_init ();
/*
* Init plugin engine
*/
- engine = gtranslator_plugins_engine_get_default ();
+ engine = gtr_plugins_engine_get_default ();
- gtk_about_dialog_set_url_hook (gtranslator_utils_activate_url, NULL, NULL);
- gtk_about_dialog_set_email_hook (gtranslator_utils_activate_email, NULL,
+ gtk_about_dialog_set_url_hook (gtr_utils_activate_url, NULL, NULL);
+ gtk_about_dialog_set_email_hook (gtr_utils_activate_email, NULL,
NULL);
/*
* Load profiles list
*/
- config_folder = gtranslator_dirs_get_user_config_dir ();
+ config_folder = gtr_dirs_get_user_config_dir ();
filename = g_build_filename (config_folder, "profiles.xml", NULL);
file = g_file_new_for_path (filename);
if (g_file_query_exists (file, NULL))
{
profiles_list =
- gtranslator_profile_get_profiles_from_xml_file (filename);
+ gtr_profile_get_profiles_from_xml_file (filename);
}
- gtranslator_application_set_profiles (GTR_APP, profiles_list);
+ gtr_application_set_profiles (GTR_APP, profiles_list);
/*
* Create the main app-window.
*/
- window = gtranslator_application_open_window (GTR_APP);
+ window = gtr_application_open_window (GTR_APP);
/*
* Now we open the files passed as arguments
@@ -221,7 +221,7 @@ main (gint argc, gchar * argv[])
file_list = get_command_line_data ();
if (file_list)
{
- gtranslator_actions_load_locations (window, (const GSList *) file_list);
+ gtr_actions_load_locations (window, (const GSList *) file_list);
g_slist_foreach (file_list, (GFunc) g_object_unref, NULL);
g_slist_free (file_list);
}
@@ -233,7 +233,7 @@ main (gint argc, gchar * argv[])
*/
gtk_main ();
- gtranslator_prefs_manager_app_shutdown ();
+ gtr_prefs_manager_app_shutdown ();
return 0;
}
diff --git a/src/plugin-system/gtr-module.c b/src/plugin-system/gtr-module.c
index f454e1f..d315976 100644
--- a/src/plugin-system/gtr-module.c
+++ b/src/plugin-system/gtr-module.c
@@ -29,8 +29,8 @@
*/
/*
- * Modified by the gtranslator Team, 2005. See the AUTHORS file for a
- * list of people on the gtranslator Team.
+ * Modified by the gtr Team, 2005. See the AUTHORS file for a
+ * list of people on the gtr Team.
* See the ChangeLog files for a list of changes.
*
* $Id: module.c 6314 2008-06-05 12:57:53Z pborelli $
@@ -50,10 +50,10 @@ enum
PROP_PATH
};
-G_DEFINE_TYPE (GtrModule, gtranslator_module, G_TYPE_TYPE_MODULE);
+G_DEFINE_TYPE (GtrModule, gtr_module, G_TYPE_TYPE_MODULE);
static gboolean
-gtranslator_module_load (GTypeModule * gmodule)
+gtr_module_load (GTypeModule * gmodule)
{
GtrModule *module = GTR_MODULE (gmodule);
GtrModuleRegisterFunc register_func;
@@ -77,7 +77,7 @@ gtranslator_module_load (GTypeModule * gmodule)
}
/* extract symbols from the lib */
- if (!g_module_symbol (module->library, "register_gtranslator_plugin",
+ if (!g_module_symbol (module->library, "register_gtr_plugin",
(void *) ®ister_func))
{
g_warning ("%s", g_module_error ());
@@ -90,7 +90,7 @@ gtranslator_module_load (GTypeModule * gmodule)
* returned TRUE */
if (register_func == NULL)
{
- g_warning ("Symbol 'register_gtranslator_plugin' should not be NULL");
+ g_warning ("Symbol 'register_gtr_plugin' should not be NULL");
g_module_close (module->library);
return FALSE;
@@ -100,7 +100,7 @@ gtranslator_module_load (GTypeModule * gmodule)
if (module->type == 0)
{
- g_warning ("Invalid gtranslator plugin contained by module %s",
+ g_warning ("Invalid gtr plugin contained by module %s",
module->module_name);
return FALSE;
}
@@ -109,7 +109,7 @@ gtranslator_module_load (GTypeModule * gmodule)
}
static void
-gtranslator_module_unload (GTypeModule * gmodule)
+gtr_module_unload (GTypeModule * gmodule)
{
GtrModule *module = GTR_MODULE (gmodule);
@@ -122,19 +122,19 @@ gtranslator_module_unload (GTypeModule * gmodule)
}
static void
-gtranslator_module_class_real_garbage_collect (void)
+gtr_module_class_real_garbage_collect (void)
{
/* Do nothing */
}
static void
-gtranslator_module_init (GtrModule * module)
+gtr_module_init (GtrModule * module)
{
DEBUG_PRINT ("GtrModule %p initialising", module);
}
static void
-gtranslator_module_finalize (GObject * object)
+gtr_module_finalize (GObject * object)
{
GtrModule *module = GTR_MODULE (object);
@@ -143,11 +143,11 @@ gtranslator_module_finalize (GObject * object)
g_free (module->path);
g_free (module->module_name);
- G_OBJECT_CLASS (gtranslator_module_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_module_parent_class)->finalize (object);
}
static void
-gtranslator_module_get_property (GObject * object,
+gtr_module_get_property (GObject * object,
guint prop_id,
GValue * value, GParamSpec * pspec)
{
@@ -167,7 +167,7 @@ gtranslator_module_get_property (GObject * object,
}
static void
-gtranslator_module_set_property (GObject * object,
+gtr_module_set_property (GObject * object,
guint prop_id,
const GValue * value, GParamSpec * pspec)
{
@@ -188,19 +188,19 @@ gtranslator_module_set_property (GObject * object,
}
static void
-gtranslator_module_class_init (GtrModuleClass * klass)
+gtr_module_class_init (GtrModuleClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GTypeModuleClass *module_class = G_TYPE_MODULE_CLASS (klass);
- object_class->set_property = gtranslator_module_set_property;
- object_class->get_property = gtranslator_module_get_property;
- object_class->finalize = gtranslator_module_finalize;
+ object_class->set_property = gtr_module_set_property;
+ object_class->get_property = gtr_module_get_property;
+ object_class->finalize = gtr_module_finalize;
- module_class->load = gtranslator_module_load;
- module_class->unload = gtranslator_module_unload;
+ module_class->load = gtr_module_load;
+ module_class->unload = gtr_module_unload;
- klass->garbage_collect = gtranslator_module_class_real_garbage_collect;
+ klass->garbage_collect = gtr_module_class_real_garbage_collect;
g_object_class_install_property (object_class,
PROP_MODULE_NAME,
@@ -222,7 +222,7 @@ gtranslator_module_class_init (GtrModuleClass * klass)
}
void
-gtranslator_module_class_garbage_collect (GtrModuleClass * klass)
+gtr_module_class_garbage_collect (GtrModuleClass * klass)
{
g_return_if_fail (GTR_IS_MODULE_CLASS (klass));
@@ -230,7 +230,7 @@ gtranslator_module_class_garbage_collect (GtrModuleClass * klass)
}
GObject *
-gtranslator_module_new_object (GtrModule * module)
+gtr_module_new_object (GtrModule * module)
{
g_return_val_if_fail (module->type != 0, NULL);
@@ -240,7 +240,7 @@ gtranslator_module_new_object (GtrModule * module)
}
const gchar *
-gtranslator_module_get_path (GtrModule * module)
+gtr_module_get_path (GtrModule * module)
{
g_return_val_if_fail (GTR_IS_MODULE (module), NULL);
@@ -248,7 +248,7 @@ gtranslator_module_get_path (GtrModule * module)
}
const gchar *
-gtranslator_module_get_module_name (GtrModule * module)
+gtr_module_get_module_name (GtrModule * module)
{
g_return_val_if_fail (GTR_IS_MODULE (module), NULL);
diff --git a/src/plugin-system/gtr-module.h b/src/plugin-system/gtr-module.h
index 7217458..cae2d08 100644
--- a/src/plugin-system/gtr-module.h
+++ b/src/plugin-system/gtr-module.h
@@ -1,6 +1,6 @@
/*
* module.h
- * This file is part of gtranslator
+ * This file is part of gtr
*
* Copyright (C) 2005 - Paolo Maggi
*
@@ -29,8 +29,8 @@
*/
/*
- * Modified by the gtranslator Team, 2005. See the AUTHORS file for a
- * list of people on the gtranslator Team.
+ * Modified by the gtr Team, 2005. See the AUTHORS file for a
+ * list of people on the gtr Team.
* See the ChangeLog files for a list of changes.
*
* $Id: module.h 6263 2008-05-05 10:52:10Z sfre $
@@ -43,7 +43,7 @@
#include <gmodule.h>
G_BEGIN_DECLS
-#define GTR_TYPE_MODULE (gtranslator_module_get_type ())
+#define GTR_TYPE_MODULE (gtr_module_get_type ())
#define GTR_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTR_TYPE_MODULE, GtrModule))
#define GTR_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTR_TYPE_MODULE, GtrModuleClass))
#define GTR_IS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTR_TYPE_MODULE))
@@ -73,17 +73,17 @@ struct _GtrModuleClass
};
GType
-gtranslator_module_get_type (void)
+gtr_module_get_type (void)
G_GNUC_CONST;
- const gchar *gtranslator_module_get_path (GtrModule * module);
+ const gchar *gtr_module_get_path (GtrModule * module);
- const gchar *gtranslator_module_get_module_name (GtrModule *
+ const gchar *gtr_module_get_module_name (GtrModule *
module);
- GObject *gtranslator_module_new_object (GtrModule * module);
+ GObject *gtr_module_new_object (GtrModule * module);
- void gtranslator_module_class_garbage_collect
+ void gtr_module_class_garbage_collect
(GtrModuleClass * klass);
G_END_DECLS
diff --git a/src/plugin-system/gtr-plugin-info-priv.h b/src/plugin-system/gtr-plugin-info-priv.h
index ad36db3..6f72c90 100644
--- a/src/plugin-system/gtr-plugin-info-priv.h
+++ b/src/plugin-system/gtr-plugin-info-priv.h
@@ -1,6 +1,6 @@
/*
* plugin-info-priv.h
- * This file is part of gtranslator
+ * This file is part of gtr
*
* Copyright (C) 2002-2005 - Paolo Maggi
* Copyright (C) 2007 - Paolo Maggi, Steve Frécinaux
@@ -22,8 +22,8 @@
*/
/*
- * Modified by the gtranslator Team, 2002-2007. See the AUTHORS file for a
- * list of people on the gtranslator Team.
+ * Modified by the gtr Team, 2002-2007. See the AUTHORS file for a
+ * list of people on the gtr Team.
* See the ChangeLog files for a list of changes.
*
* $Id$
@@ -64,9 +64,9 @@ struct _GtrPluginInfo
gint available:1;
};
-GtrPluginInfo *_gtranslator_plugin_info_new (const gchar * file);
-void _gtranslator_plugin_info_ref (GtrPluginInfo * info);
-void _gtranslator_plugin_info_unref (GtrPluginInfo * info);
+GtrPluginInfo *_gtr_plugin_info_new (const gchar * file);
+void _gtr_plugin_info_ref (GtrPluginInfo * info);
+void _gtr_plugin_info_unref (GtrPluginInfo * info);
#endif /* __GTR_PLUGIN_INFO_PRIV_H__ */
diff --git a/src/plugin-system/gtr-plugin-info.c b/src/plugin-system/gtr-plugin-info.c
index 28f0c61..dd7499a 100644
--- a/src/plugin-system/gtr-plugin-info.c
+++ b/src/plugin-system/gtr-plugin-info.c
@@ -1,6 +1,6 @@
/*
* plugin-info.c
- * This file is part of gtranslator
+ * This file is part of gtr
*
* Copyright (C) 2002-2005 - Paolo Maggi
* Copyright (C) 2007 - Paolo Maggi, Steve Frécinaux
@@ -22,8 +22,8 @@
*/
/*
- * Modified by the gtranslator Team, 2002-2007. See the AUTHORS file for a
- * list of people on the gtranslator Team.
+ * Modified by the gtr Team, 2002-2007. See the AUTHORS file for a
+ * list of people on the gtr Team.
* See the ChangeLog files for a list of changes.
*
* $Id$
@@ -43,24 +43,24 @@
#include "gtr-plugin.h"
#ifdef ENABLE_PYTHON
-#include "gtranslator-python-module.h"
+#include "gtr-python-module.h"
#endif
void
-_gtranslator_plugin_info_ref (GtrPluginInfo * info)
+_gtr_plugin_info_ref (GtrPluginInfo * info)
{
g_atomic_int_inc (&info->refcount);
}
static GtrPluginInfo *
-gtranslator_plugin_info_copy (GtrPluginInfo * info)
+gtr_plugin_info_copy (GtrPluginInfo * info)
{
- _gtranslator_plugin_info_ref (info);
+ _gtr_plugin_info_ref (info);
return info;
}
void
-_gtranslator_plugin_info_unref (GtrPluginInfo * info)
+_gtr_plugin_info_unref (GtrPluginInfo * info)
{
if (!g_atomic_int_dec_and_test (&info->refcount))
return;
@@ -89,7 +89,7 @@ _gtranslator_plugin_info_unref (GtrPluginInfo * info)
}
/**
- * gtranslator_plugin_info_get_type:
+ * gtr_plugin_info_get_type:
*
* Retrieves the #GType object which is associated with the #GtrPluginInfo
* class.
@@ -97,22 +97,22 @@ _gtranslator_plugin_info_unref (GtrPluginInfo * info)
* Return value: the GType associated with #GtrPluginInfo.
**/
GType
-gtranslator_plugin_info_get_type (void)
+gtr_plugin_info_get_type (void)
{
static GType the_type = 0;
if (G_UNLIKELY (!the_type))
the_type = g_boxed_type_register_static ("GtrPluginInfo",
(GBoxedCopyFunc)
- gtranslator_plugin_info_copy,
+ gtr_plugin_info_copy,
(GBoxedFreeFunc)
- _gtranslator_plugin_info_unref);
+ _gtr_plugin_info_unref);
return the_type;
}
/**
- * gtranslator_plugin_info_new:
+ * gtr_plugin_info_new:
* @filename: the filename where to read the plugin information
*
* Creates a new #GtrPluginInfo from a file on the disk.
@@ -120,7 +120,7 @@ gtranslator_plugin_info_get_type (void)
* Return value: a newly created #GtrPluginInfo.
*/
GtrPluginInfo *
-_gtranslator_plugin_info_new (const gchar * file)
+_gtr_plugin_info_new (const gchar * file)
{
GtrPluginInfo *info;
GKeyFile *plugin_file = NULL;
@@ -280,7 +280,7 @@ error:
}
gboolean
-gtranslator_plugin_info_is_active (GtrPluginInfo * info)
+gtr_plugin_info_is_active (GtrPluginInfo * info)
{
g_return_val_if_fail (info != NULL, FALSE);
@@ -288,7 +288,7 @@ gtranslator_plugin_info_is_active (GtrPluginInfo * info)
}
gboolean
-gtranslator_plugin_info_is_available (GtrPluginInfo * info)
+gtr_plugin_info_is_available (GtrPluginInfo * info)
{
g_return_val_if_fail (info != NULL, FALSE);
@@ -296,7 +296,7 @@ gtranslator_plugin_info_is_available (GtrPluginInfo * info)
}
gboolean
-gtranslator_plugin_info_is_configurable (GtrPluginInfo * info)
+gtr_plugin_info_is_configurable (GtrPluginInfo * info)
{
DEBUG_PRINT ("Is '%s' configurable?", info->name);
@@ -305,11 +305,11 @@ gtranslator_plugin_info_is_configurable (GtrPluginInfo * info)
if (info->plugin == NULL || !info->active || !info->available)
return FALSE;
- return gtranslator_plugin_is_configurable (info->plugin);
+ return gtr_plugin_is_configurable (info->plugin);
}
const gchar *
-gtranslator_plugin_info_get_name (GtrPluginInfo * info)
+gtr_plugin_info_get_name (GtrPluginInfo * info)
{
g_return_val_if_fail (info != NULL, NULL);
@@ -317,7 +317,7 @@ gtranslator_plugin_info_get_name (GtrPluginInfo * info)
}
const gchar *
-gtranslator_plugin_info_get_description (GtrPluginInfo * info)
+gtr_plugin_info_get_description (GtrPluginInfo * info)
{
g_return_val_if_fail (info != NULL, NULL);
@@ -325,7 +325,7 @@ gtranslator_plugin_info_get_description (GtrPluginInfo * info)
}
const gchar *
-gtranslator_plugin_info_get_icon_name (GtrPluginInfo * info)
+gtr_plugin_info_get_icon_name (GtrPluginInfo * info)
{
g_return_val_if_fail (info != NULL, NULL);
@@ -340,7 +340,7 @@ gtranslator_plugin_info_get_icon_name (GtrPluginInfo * info)
}
const gchar **
-gtranslator_plugin_info_get_authors (GtrPluginInfo * info)
+gtr_plugin_info_get_authors (GtrPluginInfo * info)
{
g_return_val_if_fail (info != NULL, (const gchar **) NULL);
@@ -348,7 +348,7 @@ gtranslator_plugin_info_get_authors (GtrPluginInfo * info)
}
const gchar *
-gtranslator_plugin_info_get_website (GtrPluginInfo * info)
+gtr_plugin_info_get_website (GtrPluginInfo * info)
{
g_return_val_if_fail (info != NULL, NULL);
@@ -356,7 +356,7 @@ gtranslator_plugin_info_get_website (GtrPluginInfo * info)
}
const gchar *
-gtranslator_plugin_info_get_copyright (GtrPluginInfo * info)
+gtr_plugin_info_get_copyright (GtrPluginInfo * info)
{
g_return_val_if_fail (info != NULL, NULL);
@@ -364,7 +364,7 @@ gtranslator_plugin_info_get_copyright (GtrPluginInfo * info)
}
const gchar *
-gtranslator_plugin_info_get_license (GtrPluginInfo * info)
+gtr_plugin_info_get_license (GtrPluginInfo * info)
{
g_return_val_if_fail (info != NULL, NULL);
diff --git a/src/plugin-system/gtr-plugin-info.h b/src/plugin-system/gtr-plugin-info.h
index 0acc85f..21dd4ce 100644
--- a/src/plugin-system/gtr-plugin-info.h
+++ b/src/plugin-system/gtr-plugin-info.h
@@ -1,6 +1,6 @@
/*
* plugin-info.h
- * This file is part of gtranslator
+ * This file is part of gtr
*
* Copyright (C) 2002-2005 - Paolo Maggi
* Copyright (C) 2007 - Paolo Maggi, Steve Frécinaux
@@ -22,8 +22,8 @@
*/
/*
- * Modified by the gtranslator Team, 2002-2007. See the AUTHORS file for a
- * list of people on the gtranslator Team.
+ * Modified by the gtr Team, 2002-2007. See the AUTHORS file for a
+ * list of people on the gtr Team.
* See the ChangeLog files for a list of changes.
*
* $Id$
@@ -37,35 +37,35 @@
#include "gtr-module.h"
G_BEGIN_DECLS
-#define GTR_TYPE_PLUGIN_INFO (gtranslator_plugin_info_get_type ())
+#define GTR_TYPE_PLUGIN_INFO (gtr_plugin_info_get_type ())
#define GTR_PLUGIN_INFO(obj) ((GtrPluginInfo *) (obj))
typedef struct _GtrPluginInfo GtrPluginInfo;
GType
-gtranslator_plugin_info_get_type (void)
+gtr_plugin_info_get_type (void)
G_GNUC_CONST;
- gboolean gtranslator_plugin_info_is_active (GtrPluginInfo *
+ gboolean gtr_plugin_info_is_active (GtrPluginInfo *
info);
- gboolean gtranslator_plugin_info_is_available (GtrPluginInfo *
+ gboolean gtr_plugin_info_is_available (GtrPluginInfo *
info);
- gboolean gtranslator_plugin_info_is_configurable (GtrPluginInfo *
+ gboolean gtr_plugin_info_is_configurable (GtrPluginInfo *
info);
- const gchar *gtranslator_plugin_info_get_name (GtrPluginInfo *
+ const gchar *gtr_plugin_info_get_name (GtrPluginInfo *
info);
const gchar
- *gtranslator_plugin_info_get_description (GtrPluginInfo *
+ *gtr_plugin_info_get_description (GtrPluginInfo *
info);
- const gchar *gtranslator_plugin_info_get_icon_name (GtrPluginInfo
+ const gchar *gtr_plugin_info_get_icon_name (GtrPluginInfo
* info);
- const gchar **gtranslator_plugin_info_get_authors (GtrPluginInfo
+ const gchar **gtr_plugin_info_get_authors (GtrPluginInfo
* info);
- const gchar *gtranslator_plugin_info_get_website (GtrPluginInfo *
+ const gchar *gtr_plugin_info_get_website (GtrPluginInfo *
info);
- const gchar *gtranslator_plugin_info_get_copyright (GtrPluginInfo
+ const gchar *gtr_plugin_info_get_copyright (GtrPluginInfo
* info);
- const gchar *gtranslator_plugin_info_get_license (GtrPluginInfo *
+ const gchar *gtr_plugin_info_get_license (GtrPluginInfo *
info);
G_END_DECLS
diff --git a/src/plugin-system/gtr-plugin-manager.c b/src/plugin-system/gtr-plugin-manager.c
index 096c238..8806fa0 100644
--- a/src/plugin-system/gtr-plugin-manager.c
+++ b/src/plugin-system/gtr-plugin-manager.c
@@ -1,6 +1,6 @@
/*
* plugin-manager.c
- * This file is part of gtranslator
+ * This file is part of gtr
*
* Copyright (C) 2002 Paolo Maggi and James Willcox
* Copyright (C) 2003-2006 Paolo Maggi
@@ -22,8 +22,8 @@
*/
/*
- * Modified by the gtranslator Team, 1998-2006. See the AUTHORS file for a
- * list of people on the gtranslator Team.
+ * Modified by the gtr Team, 1998-2006. See the AUTHORS file for a
+ * list of people on the gtr Team.
* See the ChangeLog files for a list of changes.
*
* $Id: plugin-manager.c 6406 2008-08-13 20:04:04Z pborelli $
@@ -70,22 +70,22 @@ struct _GtrPluginManagerPrivate
GtkWidget *popup_menu;
};
-G_DEFINE_TYPE (GtrPluginManager, gtranslator_plugin_manager,
+G_DEFINE_TYPE (GtrPluginManager, gtr_plugin_manager,
GTK_TYPE_VBOX)
static GtrPluginInfo
*plugin_manager_get_selected_plugin (GtrPluginManager * pm);
static void plugin_manager_toggle_active (GtrPluginManager * pm,
GtkTreeIter * iter,
GtkTreeModel * model);
- static void gtranslator_plugin_manager_finalize (GObject * object);
+ static void gtr_plugin_manager_finalize (GObject * object);
static void
- gtranslator_plugin_manager_class_init (GtrPluginManagerClass *
+ gtr_plugin_manager_class_init (GtrPluginManagerClass *
klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = gtranslator_plugin_manager_finalize;
+ object_class->finalize = gtr_plugin_manager_finalize;
g_type_class_add_private (object_class,
sizeof (GtrPluginManagerPrivate));
@@ -96,7 +96,7 @@ about_button_cb (GtkWidget * button, GtrPluginManager * pm)
{
GtrPluginInfo *info;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
info = plugin_manager_get_selected_plugin (pm);
@@ -108,19 +108,19 @@ about_button_cb (GtkWidget * button, GtrPluginManager * pm)
pm->priv->about = g_object_new (GTK_TYPE_ABOUT_DIALOG,
"program-name",
- gtranslator_plugin_info_get_name (info),
+ gtr_plugin_info_get_name (info),
"copyright",
- gtranslator_plugin_info_get_copyright
+ gtr_plugin_info_get_copyright
(info), "authors",
- gtranslator_plugin_info_get_authors (info),
+ gtr_plugin_info_get_authors (info),
"license",
- gtranslator_plugin_info_get_license (info),
+ gtr_plugin_info_get_license (info),
"comments",
- gtranslator_plugin_info_get_description
+ gtr_plugin_info_get_description
(info), "website",
- gtranslator_plugin_info_get_website (info),
+ gtr_plugin_info_get_website (info),
"logo-icon-name",
- gtranslator_plugin_info_get_icon_name
+ gtr_plugin_info_get_icon_name
(info), NULL);
gtk_window_set_destroy_with_parent (GTK_WINDOW (pm->priv->about), TRUE);
@@ -143,17 +143,17 @@ configure_button_cb (GtkWidget * button, GtrPluginManager * pm)
GtrPluginInfo *info;
GtkWindow *toplevel;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
info = plugin_manager_get_selected_plugin (pm);
g_return_if_fail (info != NULL);
- DEBUG_PRINT ("Configuring: %s\n", gtranslator_plugin_info_get_name (info));
+ DEBUG_PRINT ("Configuring: %s\n", gtr_plugin_info_get_name (info));
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (pm)));
- gtranslator_plugins_engine_configure_plugin (pm->priv->engine,
+ gtr_plugins_engine_configure_plugin (pm->priv->engine,
info, toplevel);
DEBUG_PRINT ("Done");
@@ -177,11 +177,11 @@ plugin_manager_view_info_cell_cb (GtkTreeViewColumn * tree_column,
return;
text = g_markup_printf_escaped ("<b>%s</b>\n%s",
- gtranslator_plugin_info_get_name (info),
- gtranslator_plugin_info_get_description
+ gtr_plugin_info_get_name (info),
+ gtr_plugin_info_get_description
(info));
g_object_set (G_OBJECT (cell), "markup", text, "sensitive",
- gtranslator_plugin_info_is_available (info), NULL);
+ gtr_plugin_info_is_available (info), NULL);
g_free (text);
}
@@ -203,8 +203,8 @@ plugin_manager_view_icon_cell_cb (GtkTreeViewColumn * tree_column,
return;
g_object_set (G_OBJECT (cell),
- "icon-name", gtranslator_plugin_info_get_icon_name (info),
- "sensitive", gtranslator_plugin_info_is_available (info),
+ "icon-name", gtr_plugin_info_get_icon_name (info),
+ "sensitive", gtr_plugin_info_is_available (info),
NULL);
}
@@ -217,7 +217,7 @@ active_toggled_cb (GtkCellRendererToggle * cell,
GtkTreePath *path;
GtkTreeModel *model;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
path = gtk_tree_path_new_from_string (path_str);
@@ -238,7 +238,7 @@ cursor_changed_cb (GtkTreeView * view, gpointer data)
GtrPluginManager *pm = data;
GtrPluginInfo *info;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
info = plugin_manager_get_selected_plugin (pm);
@@ -246,7 +246,7 @@ cursor_changed_cb (GtkTreeView * view, gpointer data)
info != NULL);
gtk_widget_set_sensitive (GTK_WIDGET (pm->priv->configure_button),
(info != NULL) &&
- gtranslator_plugin_info_is_configurable (info));
+ gtr_plugin_info_is_configurable (info));
}
static void
@@ -258,7 +258,7 @@ row_activated_cb (GtkTreeView * tree_view,
GtkTreeIter iter;
GtkTreeModel *model;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
model = gtk_tree_view_get_model (GTK_TREE_VIEW (pm->priv->tree));
@@ -278,9 +278,9 @@ plugin_manager_populate_lists (GtrPluginManager * pm)
GtkListStore *model;
GtkTreeIter iter;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
- plugins = gtranslator_plugins_engine_get_plugin_list (pm->priv->engine);
+ plugins = gtr_plugins_engine_get_plugin_list (pm->priv->engine);
model =
GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (pm->priv->tree)));
@@ -293,9 +293,9 @@ plugin_manager_populate_lists (GtrPluginManager * pm)
gtk_list_store_append (model, &iter);
gtk_list_store_set (model, &iter,
ACTIVE_COLUMN,
- gtranslator_plugin_info_is_active (info),
+ gtr_plugin_info_is_active (info),
AVAILABLE_COLUMN,
- gtranslator_plugin_info_is_available (info),
+ gtr_plugin_info_is_available (info),
INFO_COLUMN, info, -1);
plugins = plugins->next;
@@ -316,7 +316,7 @@ plugin_manager_populate_lists (GtrPluginManager * pm)
INFO_COLUMN, &info, -1);
gtk_widget_set_sensitive (GTK_WIDGET (pm->priv->configure_button),
- gtranslator_plugin_info_is_configurable
+ gtr_plugin_info_is_configurable
(info));
}
}
@@ -329,7 +329,7 @@ plugin_manager_set_active (GtrPluginManager * pm,
GtrPluginInfo *info;
gboolean res = TRUE;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
gtk_tree_model_get (model, iter, INFO_COLUMN, &info, -1);
@@ -338,11 +338,11 @@ plugin_manager_set_active (GtrPluginManager * pm,
if (active)
{
/* activate the plugin */
- if (!gtranslator_plugins_engine_activate_plugin
+ if (!gtr_plugins_engine_activate_plugin
(pm->priv->engine, info))
{
DEBUG_PRINT ("Could not activate %s.\n",
- gtranslator_plugin_info_get_name (info));
+ gtr_plugin_info_get_name (info));
res = FALSE;
}
@@ -350,11 +350,11 @@ plugin_manager_set_active (GtrPluginManager * pm,
else
{
/* deactivate the plugin */
- if (!gtranslator_plugins_engine_deactivate_plugin
+ if (!gtr_plugins_engine_deactivate_plugin
(pm->priv->engine, info))
{
DEBUG_PRINT ("Could not deactivate %s.\n",
- gtranslator_plugin_info_get_name (info));
+ gtr_plugin_info_get_name (info));
res = FALSE;
}
@@ -369,7 +369,7 @@ plugin_manager_toggle_active (GtrPluginManager * pm,
{
gboolean active;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
gtk_tree_model_get (model, iter, ACTIVE_COLUMN, &active, -1);
@@ -386,7 +386,7 @@ plugin_manager_get_selected_plugin (GtrPluginManager * pm)
GtkTreeIter iter;
GtkTreeSelection *selection;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
model = gtk_tree_view_get_model (GTK_TREE_VIEW (pm->priv->tree));
g_return_val_if_fail (model != NULL, NULL);
@@ -408,7 +408,7 @@ plugin_manager_set_active_all (GtrPluginManager * pm, gboolean active)
GtkTreeModel *model;
GtkTreeIter iter;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
model = gtk_tree_view_get_model (GTK_TREE_VIEW (pm->priv->tree));
@@ -442,7 +442,7 @@ name_search_cb (GtkTreeModel * model,
return FALSE;
normalized_string =
- g_utf8_normalize (gtranslator_plugin_info_get_name (info), -1,
+ g_utf8_normalize (gtr_plugin_info_get_name (info), -1,
G_NORMALIZE_ALL);
normalized_key = g_utf8_normalize (key, -1, G_NORMALIZE_ALL);
case_normalized_string = g_utf8_casefold (normalized_string, -1);
@@ -517,14 +517,14 @@ create_tree_popup_menu (GtrPluginManager * pm)
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
g_signal_connect (item, "activate", G_CALLBACK (configure_button_cb), pm);
gtk_widget_set_sensitive (item,
- gtranslator_plugin_info_is_configurable (info));
+ gtr_plugin_info_is_configurable (info));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
item = gtk_check_menu_item_new_with_mnemonic (_("A_ctivate"));
gtk_widget_set_sensitive (item,
- gtranslator_plugin_info_is_available (info));
+ gtr_plugin_info_is_available (info));
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),
- gtranslator_plugin_info_is_active (info));
+ gtr_plugin_info_is_active (info));
g_signal_connect (item, "toggled", G_CALLBACK (enable_plugin_menu_cb), pm);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
@@ -571,7 +571,7 @@ show_tree_popup_menu (GtkTreeView * tree,
else
{
gtk_menu_popup (GTK_MENU (pm->priv->popup_menu), NULL, NULL,
- gtranslator_utils_menu_position_under_tree_view, tree,
+ gtr_utils_menu_position_under_tree_view, tree,
0, gtk_get_current_event_time ());
gtk_menu_shell_select_first (GTK_MENU_SHELL (pm->priv->popup_menu),
@@ -627,8 +627,8 @@ model_name_sort_func (GtkTreeModel * model,
gtk_tree_model_get (model, iter1, INFO_COLUMN, &info1, -1);
gtk_tree_model_get (model, iter2, INFO_COLUMN, &info2, -1);
- return g_utf8_collate (gtranslator_plugin_info_get_name (info1),
- gtranslator_plugin_info_get_name (info2));
+ return g_utf8_collate (gtr_plugin_info_get_name (info1),
+ gtr_plugin_info_get_name (info2));
}
static void
@@ -638,7 +638,7 @@ plugin_manager_construct_tree (GtrPluginManager * pm)
GtkCellRenderer *cell;
GtkListStore *model;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
model =
gtk_list_store_new (N_COLUMNS, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
@@ -749,16 +749,16 @@ plugin_toggled_cb (GtrPluginsEngine * engine,
{
g_warning
("GtrPluginManager: plugin '%s' not found in the tree model",
- gtranslator_plugin_info_get_name (info));
+ gtr_plugin_info_get_name (info));
return;
}
gtk_list_store_set (GTK_LIST_STORE (model), &iter, ACTIVE_COLUMN,
- gtranslator_plugin_info_is_active (info), -1);
+ gtr_plugin_info_is_active (info), -1);
}
static void
-gtranslator_plugin_manager_init (GtrPluginManager * pm)
+gtr_plugin_manager_init (GtrPluginManager * pm)
{
GtkWidget *label;
GtkWidget *alignment;
@@ -766,7 +766,7 @@ gtranslator_plugin_manager_init (GtrPluginManager * pm)
GtkWidget *hbuttonbox;
gchar *markup;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
pm->priv = GTR_PLUGIN_MANAGER_GET_PRIVATE (pm);
@@ -803,12 +803,12 @@ gtranslator_plugin_manager_init (GtrPluginManager * pm)
gtk_box_set_spacing (GTK_BOX (hbuttonbox), 8);
pm->priv->about_button =
- gtranslator_gtk_button_new_with_stock_icon (_("_About Plugin"),
+ gtr_gtk_button_new_with_stock_icon (_("_About Plugin"),
GTK_STOCK_ABOUT);
gtk_container_add (GTK_CONTAINER (hbuttonbox), pm->priv->about_button);
pm->priv->configure_button =
- gtranslator_gtk_button_new_with_stock_icon (_("C_onfigure Plugin"),
+ gtr_gtk_button_new_with_stock_icon (_("C_onfigure Plugin"),
GTK_STOCK_PREFERENCES);
gtk_container_add (GTK_CONTAINER (hbuttonbox), pm->priv->configure_button);
@@ -823,7 +823,7 @@ gtranslator_plugin_manager_init (GtrPluginManager * pm)
plugin_manager_construct_tree (pm);
/* get the plugin engine and populate the treeview */
- pm->priv->engine = gtranslator_plugins_engine_get_default ();
+ pm->priv->engine = gtr_plugins_engine_get_default ();
g_signal_connect_after (pm->priv->engine,
"activate-plugin",
@@ -832,7 +832,7 @@ gtranslator_plugin_manager_init (GtrPluginManager * pm)
"deactivate-plugin",
G_CALLBACK (plugin_toggled_cb), pm);
- if (gtranslator_plugins_engine_get_plugin_list (pm->priv->engine) != NULL)
+ if (gtr_plugins_engine_get_plugin_list (pm->priv->engine) != NULL)
{
plugin_manager_populate_lists (pm);
}
@@ -844,7 +844,7 @@ gtranslator_plugin_manager_init (GtrPluginManager * pm)
}
static void
-gtranslator_plugin_manager_finalize (GObject * object)
+gtr_plugin_manager_finalize (GObject * object)
{
GtrPluginManager *pm = GTR_PLUGIN_MANAGER (object);
@@ -854,12 +854,12 @@ gtranslator_plugin_manager_finalize (GObject * object)
if (pm->priv->popup_menu)
gtk_widget_destroy (pm->priv->popup_menu);
- G_OBJECT_CLASS (gtranslator_plugin_manager_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_plugin_manager_parent_class)->finalize (object);
}
GtkWidget *
-gtranslator_plugin_manager_new (void)
+gtr_plugin_manager_new (void)
{
return g_object_new (GTR_TYPE_PLUGIN_MANAGER, 0);
}
diff --git a/src/plugin-system/gtr-plugin-manager.h b/src/plugin-system/gtr-plugin-manager.h
index 764f9c5..8d92f83 100644
--- a/src/plugin-system/gtr-plugin-manager.h
+++ b/src/plugin-system/gtr-plugin-manager.h
@@ -1,6 +1,6 @@
/*
* plugin-manager.h
- * This file is part of gtranslator
+ * This file is part of gtr
*
* Copyright (C) 2002-2005 Paolo Maggi
*
@@ -21,8 +21,8 @@
*/
/*
- * Modified by the gtranslator Team, 2002-2005. See the AUTHORS file for a
- * list of people on the gtranslator Team.
+ * Modified by the gtr Team, 2002-2005. See the AUTHORS file for a
+ * list of people on the gtr Team.
* See the ChangeLog files for a list of changes.
*
* $Id: plugin-manager.h 5666 2007-06-29 19:52:25Z sfre $
@@ -37,7 +37,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_PLUGIN_MANAGER (gtranslator_plugin_manager_get_type())
+#define GTR_TYPE_PLUGIN_MANAGER (gtr_plugin_manager_get_type())
#define GTR_PLUGIN_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTR_TYPE_PLUGIN_MANAGER, GtrPluginManager))
#define GTR_PLUGIN_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTR_TYPE_PLUGIN_MANAGER, GtrPluginManagerClass))
#define GTR_IS_PLUGIN_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTR_TYPE_PLUGIN_MANAGER))
@@ -74,10 +74,10 @@ struct _GtrPluginManagerClass
* Public methods
*/
GType
-gtranslator_plugin_manager_get_type (void)
+gtr_plugin_manager_get_type (void)
G_GNUC_CONST;
- GtkWidget *gtranslator_plugin_manager_new (void);
+ GtkWidget *gtr_plugin_manager_new (void);
G_END_DECLS
#endif /* __GTR_PLUGIN_MANAGER_H__ */
diff --git a/src/plugin-system/gtr-plugin.c b/src/plugin-system/gtr-plugin.c
index b0d9463..1a87b9c 100644
--- a/src/plugin-system/gtr-plugin.c
+++ b/src/plugin-system/gtr-plugin.c
@@ -1,6 +1,6 @@
/*
* plugin.h
- * This file is part of gtranslator
+ * This file is part of gtr
*
* Copyright (C) 2002-2005 Paolo Maggi
*
@@ -21,8 +21,8 @@
*/
/*
- * Modified by the gtranslator Team, 2002-2005. See the AUTHORS file for a
- * list of people on the gtranslator Team.
+ * Modified by the gtr Team, 2002-2005. See the AUTHORS file for a
+ * list of people on the gtr Team.
* See the ChangeLog files for a list of changes.
*
* $Id: plugin.c 6448 2008-08-25 10:28:33Z icq $
@@ -34,7 +34,7 @@
#include "gtr-plugin.h"
-G_DEFINE_TYPE (GtrPlugin, gtranslator_plugin, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GtrPlugin, gtr_plugin, G_TYPE_OBJECT)
static void
dummy (GtrPlugin * plugin, GtrWindow * window)
{
@@ -55,7 +55,7 @@ is_configurable (GtrPlugin * plugin)
}
static void
-gtranslator_plugin_class_init (GtrPluginClass * klass)
+gtr_plugin_class_init (GtrPluginClass * klass)
{
klass->activate = dummy;
klass->deactivate = dummy;
@@ -66,20 +66,20 @@ gtranslator_plugin_class_init (GtrPluginClass * klass)
}
static void
-gtranslator_plugin_init (GtrPlugin * plugin)
+gtr_plugin_init (GtrPlugin * plugin)
{
/* Empty */
}
/**
- * gtranslator_plugin_activate:
+ * gtr_plugin_activate:
* @plugin: a #GtrPlugin
* @window: a #GtrWindow
*
* Activates the plugin.
*/
void
-gtranslator_plugin_activate (GtrPlugin * plugin,
+gtr_plugin_activate (GtrPlugin * plugin,
GtrWindow * window)
{
g_return_if_fail (GTR_IS_PLUGIN (plugin));
@@ -89,14 +89,14 @@ gtranslator_plugin_activate (GtrPlugin * plugin,
}
/**
- * gtranslator_plugin_deactivate:
+ * gtr_plugin_deactivate:
* @plugin: a #GtrPlugin
* @window: a #GtrWindow
*
* Deactivates the plugin.
*/
void
-gtranslator_plugin_deactivate (GtrPlugin * plugin,
+gtr_plugin_deactivate (GtrPlugin * plugin,
GtrWindow * window)
{
g_return_if_fail (GTR_IS_PLUGIN (plugin));
@@ -106,7 +106,7 @@ gtranslator_plugin_deactivate (GtrPlugin * plugin,
}
/**
- * gtranslator_plugin_update_ui:
+ * gtr_plugin_update_ui:
* @plugin: a #GtrPlugin
* @window: a #GtrWindow
*
@@ -114,7 +114,7 @@ gtranslator_plugin_deactivate (GtrPlugin * plugin,
* caused by the plugin.
*/
void
-gtranslator_plugin_update_ui (GtrPlugin * plugin,
+gtr_plugin_update_ui (GtrPlugin * plugin,
GtrWindow * window)
{
g_return_if_fail (GTR_IS_PLUGIN (plugin));
@@ -124,7 +124,7 @@ gtranslator_plugin_update_ui (GtrPlugin * plugin,
}
/**
- * gtranslator_plugin_is_configurable:
+ * gtr_plugin_is_configurable:
* @plugin: a #GtrPlugin
*
* Whether the plugin is configurable.
@@ -132,7 +132,7 @@ gtranslator_plugin_update_ui (GtrPlugin * plugin,
* Returns: TRUE if the plugin is configurable:
*/
gboolean
-gtranslator_plugin_is_configurable (GtrPlugin * plugin)
+gtr_plugin_is_configurable (GtrPlugin * plugin)
{
g_return_val_if_fail (GTR_IS_PLUGIN (plugin), FALSE);
@@ -140,7 +140,7 @@ gtranslator_plugin_is_configurable (GtrPlugin * plugin)
}
/**
- * gtranslator_plugin_create_configure_dialog:
+ * gtr_plugin_create_configure_dialog:
* @plugin: a #GtrPlugin
*
* Creates the configure dialog widget for the plugin.
@@ -148,7 +148,7 @@ gtranslator_plugin_is_configurable (GtrPlugin * plugin)
* Returns: the configure dialog widget for the plugin.
*/
GtkWidget *
-gtranslator_plugin_create_configure_dialog (GtrPlugin * plugin)
+gtr_plugin_create_configure_dialog (GtrPlugin * plugin)
{
g_return_val_if_fail (GTR_IS_PLUGIN (plugin), NULL);
diff --git a/src/plugin-system/gtr-plugin.h b/src/plugin-system/gtr-plugin.h
index 242c00e..902a25a 100644
--- a/src/plugin-system/gtr-plugin.h
+++ b/src/plugin-system/gtr-plugin.h
@@ -1,6 +1,6 @@
/*
* plugin.h
- * This file is part of gtranslator
+ * This file is part of gtr
*
* Copyright (C) 2002-2005 - Paolo Maggi
*
@@ -21,8 +21,8 @@
*/
/*
- * Modified by the gtranslator Team, 2002-2005. See the AUTHORS file for a
- * list of people on the gtranslator Team.
+ * Modified by the gtr Team, 2002-2005. See the AUTHORS file for a
+ * list of people on the gtr Team.
* See the ChangeLog files for a list of changes.
*
* $Id: plugin.h 6448 2008-08-25 10:28:33Z icq $
@@ -43,7 +43,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_PLUGIN (gtranslator_plugin_get_type())
+#define GTR_TYPE_PLUGIN (gtr_plugin_get_type())
#define GTR_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTR_TYPE_PLUGIN, GtrPlugin))
#define GTR_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTR_TYPE_PLUGIN, GtrPluginClass))
#define GTR_IS_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTR_TYPE_PLUGIN))
@@ -82,29 +82,29 @@ struct _GtrPluginClass
gboolean (*is_configurable) (GtrPlugin * plugin);
/* Padding for future expansion */
- void (*_gtranslator_reserved1) (void);
- void (*_gtranslator_reserved2) (void);
- void (*_gtranslator_reserved3) (void);
- void (*_gtranslator_reserved4) (void);
+ void (*_gtr_reserved1) (void);
+ void (*_gtr_reserved2) (void);
+ void (*_gtr_reserved3) (void);
+ void (*_gtr_reserved4) (void);
};
/*
* Public methods
*/
GType
-gtranslator_plugin_get_type (void)
+gtr_plugin_get_type (void)
G_GNUC_CONST;
- void gtranslator_plugin_activate (GtrPlugin * plugin,
+ void gtr_plugin_activate (GtrPlugin * plugin,
GtrWindow * window);
- void gtranslator_plugin_deactivate (GtrPlugin * plugin,
+ void gtr_plugin_deactivate (GtrPlugin * plugin,
GtrWindow * window);
- void gtranslator_plugin_update_ui (GtrPlugin * plugin,
+ void gtr_plugin_update_ui (GtrPlugin * plugin,
GtrWindow * window);
- gboolean gtranslator_plugin_is_configurable (GtrPlugin * plugin);
- GtkWidget *gtranslator_plugin_create_configure_dialog
+ gboolean gtr_plugin_is_configurable (GtrPlugin * plugin);
+ GtkWidget *gtr_plugin_create_configure_dialog
(GtrPlugin * plugin);
/**
@@ -132,7 +132,7 @@ static void plugin_name##_class_intern_init (gpointer klass) \
} \
\
G_MODULE_EXPORT GType \
-register_gtranslator_plugin (GTypeModule *module) \
+register_gtr_plugin (GTypeModule *module) \
{ \
static const GTypeInfo our_info = \
{ \
diff --git a/src/plugin-system/gtr-plugins-engine.c b/src/plugin-system/gtr-plugins-engine.c
index 95ceb4c..58a4baa 100644
--- a/src/plugin-system/gtr-plugins-engine.c
+++ b/src/plugin-system/gtr-plugins-engine.c
@@ -1,6 +1,6 @@
/*
* plugins-engine.c
- * This file is part of gtranslator
+ * This file is part of gtr
*
* Copyright (C) 2002-2005 Paolo Maggi
*
@@ -21,8 +21,8 @@
*/
/*
- * Modified by the gtranslator Team, 2002-2005. See the AUTHORS file for a
- * list of people on the gtranslator Team.
+ * Modified by the gtr Team, 2002-2005. See the AUTHORS file for a
+ * list of people on the gtr Team.
* See the ChangeLog files for a list of changes.
*
* $Id: plugins-engine.c 6376 2008-08-10 14:01:38Z pborelli $
@@ -46,12 +46,12 @@
#include "gtr-module.h"
#ifdef ENABLE_PYTHON
-#include "gtranslator-python-module.h"
+#include "gtr-python-module.h"
#endif
-#define USER_GTR_PLUGINS_LOCATION ".gtranslator/plugins/"
+#define USER_GTR_PLUGINS_LOCATION ".gtr/plugins/"
-#define GTR_PLUGINS_ENGINE_BASE_KEY "/apps/gtranslator/plugins"
+#define GTR_PLUGINS_ENGINE_BASE_KEY "/apps/gtr/plugins"
#define GTR_PLUGINS_ENGINE_KEY GTR_PLUGINS_ENGINE_BASE_KEY "/active-plugins"
#define PLUGIN_EXT ".plugin"
@@ -66,7 +66,7 @@ enum
static guint signals[LAST_SIGNAL];
-G_DEFINE_TYPE (GtrPluginsEngine, gtranslator_plugins_engine,
+G_DEFINE_TYPE (GtrPluginsEngine, gtr_plugins_engine,
G_TYPE_OBJECT)
struct _GtrPluginsEnginePrivate
{
@@ -77,20 +77,20 @@ G_DEFINE_TYPE (GtrPluginsEngine, gtranslator_plugins_engine,
GtrPluginsEngine *default_engine = NULL;
static void
- gtranslator_plugins_engine_active_plugins_changed (GConfClient *
+ gtr_plugins_engine_active_plugins_changed (GConfClient *
client,
guint cnxn_id,
GConfEntry * entry,
gpointer user_data);
static void
- gtranslator_plugins_engine_activate_plugin_real
+ gtr_plugins_engine_activate_plugin_real
(GtrPluginsEngine * engine, GtrPluginInfo * info);
static void
- gtranslator_plugins_engine_deactivate_plugin_real
+ gtr_plugins_engine_deactivate_plugin_real
(GtrPluginsEngine * engine, GtrPluginInfo * info);
static void
- gtranslator_plugins_engine_load_dir (GtrPluginsEngine * engine,
+ gtr_plugins_engine_load_dir (GtrPluginsEngine * engine,
const gchar * dir,
GSList * active_plugins)
{
@@ -119,7 +119,7 @@ G_DEFINE_TYPE (GtrPluginsEngine, gtranslator_plugins_engine,
GtrPluginInfo *info;
plugin_file = g_build_filename (dir, dirent, NULL);
- info = _gtranslator_plugin_info_new (plugin_file);
+ info = _gtr_plugin_info_new (plugin_file);
g_free (plugin_file);
if (info == NULL)
@@ -127,14 +127,14 @@ G_DEFINE_TYPE (GtrPluginsEngine, gtranslator_plugins_engine,
/* If a plugin with this name has already been loaded
* drop this one (user plugins override system plugins) */
- if (gtranslator_plugins_engine_get_plugin_info
+ if (gtr_plugins_engine_get_plugin_info
(engine, info->module_name) != NULL)
{
g_warning ("Two or more plugins named '%s'. "
"Only the first will be considered.\n",
info->module_name);
- _gtranslator_plugin_info_unref (info);
+ _gtr_plugin_info_unref (info);
continue;
}
@@ -156,7 +156,7 @@ G_DEFINE_TYPE (GtrPluginsEngine, gtranslator_plugins_engine,
}
static void
-gtranslator_plugins_engine_load_all (GtrPluginsEngine * engine)
+gtr_plugins_engine_load_all (GtrPluginsEngine * engine)
{
GSList *active_plugins = NULL;
const gchar *home;
@@ -181,7 +181,7 @@ gtranslator_plugins_engine_load_all (GtrPluginsEngine * engine)
pdir = g_build_filename (home, USER_GTR_PLUGINS_LOCATION, NULL);
if (g_file_test (pdir, G_FILE_TEST_IS_DIR))
- gtranslator_plugins_engine_load_dir (engine, pdir, active_plugins);
+ gtr_plugins_engine_load_dir (engine, pdir, active_plugins);
g_free (pdir);
}
@@ -193,14 +193,14 @@ gtranslator_plugins_engine_load_all (GtrPluginsEngine * engine)
/* FIXME, workaround to avoid enviroment variables on windows */
#ifdef G_OS_WIN32
- pdirs_env = gtranslator_utils_get_win32_plugindir ();
+ pdirs_env = gtr_utils_get_win32_plugindir ();
#endif
DEBUG_PRINT ("GTR_PLUGINS_PATH=%s", pdirs_env);
pdirs = g_strsplit (pdirs_env, G_SEARCHPATH_SEPARATOR_S, 0);
for (i = 0; pdirs[i] != NULL; i++)
- gtranslator_plugins_engine_load_dir (engine, pdirs[i], active_plugins);
+ gtr_plugins_engine_load_dir (engine, pdirs[i], active_plugins);
g_strfreev (pdirs);
g_slist_foreach (active_plugins, (GFunc) g_free, NULL);
@@ -208,13 +208,13 @@ gtranslator_plugins_engine_load_all (GtrPluginsEngine * engine)
}
static void
-gtranslator_plugins_engine_init (GtrPluginsEngine * engine)
+gtr_plugins_engine_init (GtrPluginsEngine * engine)
{
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
if (!g_module_supported ())
{
- g_warning ("gtranslator is not able to initialize the plugins engine.");
+ g_warning ("gtr is not able to initialize the plugins engine.");
return;
}
@@ -231,14 +231,14 @@ gtranslator_plugins_engine_init (GtrPluginsEngine * engine)
gconf_client_notify_add (engine->priv->gconf_client,
GTR_PLUGINS_ENGINE_KEY,
- gtranslator_plugins_engine_active_plugins_changed,
+ gtr_plugins_engine_active_plugins_changed,
engine, NULL, NULL);
- gtranslator_plugins_engine_load_all (engine);
+ gtr_plugins_engine_load_all (engine);
}
void
-gtranslator_plugins_engine_garbage_collect (GtrPluginsEngine * engine)
+gtr_plugins_engine_garbage_collect (GtrPluginsEngine * engine)
{
GType *module_types = g_type_children (GTR_TYPE_MODULE, NULL);
unsigned i;
@@ -246,17 +246,17 @@ gtranslator_plugins_engine_garbage_collect (GtrPluginsEngine * engine)
{
gpointer klass = g_type_class_peek (module_types[i]);
if (klass != NULL)
- gtranslator_module_class_garbage_collect (klass);
+ gtr_module_class_garbage_collect (klass);
}
g_free (module_types);
}
static void
-gtranslator_plugins_engine_finalize (GObject * object)
+gtr_plugins_engine_finalize (GObject * object)
{
GtrPluginsEngine *engine = GTR_PLUGINS_ENGINE (object);
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
#ifdef ENABLE_PYTHON
/* Note: that this may cause finalization of objects (typically
@@ -265,28 +265,28 @@ gtranslator_plugins_engine_finalize (GObject * object)
* finalization (typically they need to free the WindowData)
* it must run before we get rid of the plugins.
*/
- gtranslator_python_shutdown ();
+ gtr_python_shutdown ();
#endif
g_return_if_fail (engine->priv->gconf_client != NULL);
g_list_foreach (engine->priv->plugin_list,
- (GFunc) _gtranslator_plugin_info_unref, NULL);
+ (GFunc) _gtr_plugin_info_unref, NULL);
g_list_free (engine->priv->plugin_list);
g_object_unref (engine->priv->gconf_client);
}
static void
-gtranslator_plugins_engine_class_init (GtrPluginsEngineClass * klass)
+gtr_plugins_engine_class_init (GtrPluginsEngineClass * klass)
{
GType the_type = G_TYPE_FROM_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = gtranslator_plugins_engine_finalize;
- klass->activate_plugin = gtranslator_plugins_engine_activate_plugin_real;
+ object_class->finalize = gtr_plugins_engine_finalize;
+ klass->activate_plugin = gtr_plugins_engine_activate_plugin_real;
klass->deactivate_plugin =
- gtranslator_plugins_engine_deactivate_plugin_real;
+ gtr_plugins_engine_deactivate_plugin_real;
signals[ACTIVATE_PLUGIN] =
g_signal_new ("activate-plugin",
@@ -310,7 +310,7 @@ gtranslator_plugins_engine_class_init (GtrPluginsEngineClass * klass)
}
GtrPluginsEngine *
-gtranslator_plugins_engine_get_default (void)
+gtr_plugins_engine_get_default (void)
{
if (default_engine != NULL)
return default_engine;
@@ -323,9 +323,9 @@ gtranslator_plugins_engine_get_default (void)
}
const GList *
-gtranslator_plugins_engine_get_plugin_list (GtrPluginsEngine * engine)
+gtr_plugins_engine_get_plugin_list (GtrPluginsEngine * engine)
{
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
return engine->priv->plugin_list;
}
@@ -338,7 +338,7 @@ compare_plugin_info_and_name (GtrPluginInfo * info,
}
GtrPluginInfo *
-gtranslator_plugins_engine_get_plugin_info (GtrPluginsEngine * engine,
+gtr_plugins_engine_get_plugin_info (GtrPluginsEngine * engine,
const gchar * name)
{
GList *l = g_list_find_custom (engine->priv->plugin_list,
@@ -352,7 +352,7 @@ load_plugin_module (GtrPluginInfo * info)
{
gchar *dirname;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
g_return_val_if_fail (info != NULL, FALSE);
g_return_val_if_fail (info->file != NULL, FALSE);
@@ -366,11 +366,11 @@ load_plugin_module (GtrPluginInfo * info)
#ifdef ENABLE_PYTHON
if (info->module_type == GTR_TYPE_PYTHON_MODULE)
{
- if (!gtranslator_python_init ())
+ if (!gtr_python_init ())
{
/* Mark plugin as unavailable and fail */
info->available = FALSE;
- g_warning ("Cannot load Python plugin '%s' since gtranslator "
+ g_warning ("Cannot load Python plugin '%s' since gtr "
"was not able to initialize the Python interpreter.",
info->name);
}
@@ -387,8 +387,8 @@ load_plugin_module (GtrPluginInfo * info)
if (!g_type_module_use (G_TYPE_MODULE (info->module)))
{
g_warning ("Cannot load plugin '%s' since file '%s' cannot be read.",
- gtranslator_module_get_module_name (info->module),
- gtranslator_module_get_path (info->module));
+ gtr_module_get_module_name (info->module),
+ gtr_module_get_path (info->module));
g_object_unref (G_OBJECT (info->module));
info->module = NULL;
@@ -399,7 +399,7 @@ load_plugin_module (GtrPluginInfo * info)
return FALSE;
}
- info->plugin = GTR_PLUGIN (gtranslator_module_new_object (info->module));
+ info->plugin = GTR_PLUGIN (gtr_module_new_object (info->module));
g_type_module_unuse (G_TYPE_MODULE (info->module));
@@ -437,7 +437,7 @@ save_active_plugin_list (GtrPluginsEngine * engine)
}
static void
-gtranslator_plugins_engine_activate_plugin_real (GtrPluginsEngine *
+gtr_plugins_engine_activate_plugin_real (GtrPluginsEngine *
engine,
GtrPluginInfo * info)
{
@@ -452,10 +452,10 @@ gtranslator_plugins_engine_activate_plugin_real (GtrPluginsEngine *
if (res)
{
const GList *wins =
- gtranslator_application_get_windows
- (gtranslator_application_get_default ());
+ gtr_application_get_windows
+ (gtr_application_get_default ());
for (; wins != NULL; wins = wins->next)
- gtranslator_plugin_activate (info->plugin, GTR_WINDOW (wins->data));
+ gtr_plugin_activate (info->plugin, GTR_WINDOW (wins->data));
info->active = TRUE;
}
@@ -464,10 +464,10 @@ gtranslator_plugins_engine_activate_plugin_real (GtrPluginsEngine *
}
gboolean
-gtranslator_plugins_engine_activate_plugin (GtrPluginsEngine * engine,
+gtr_plugins_engine_activate_plugin (GtrPluginsEngine * engine,
GtrPluginInfo * info)
{
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
g_return_val_if_fail (info != NULL, FALSE);
@@ -485,7 +485,7 @@ gtranslator_plugins_engine_activate_plugin (GtrPluginsEngine * engine,
}
static void
-gtranslator_plugins_engine_deactivate_plugin_real (GtrPluginsEngine *
+gtr_plugins_engine_deactivate_plugin_real (GtrPluginsEngine *
engine,
GtrPluginInfo *
info)
@@ -496,20 +496,20 @@ gtranslator_plugins_engine_deactivate_plugin_real (GtrPluginsEngine *
return;
wins =
- gtranslator_application_get_windows (gtranslator_application_get_default
+ gtr_application_get_windows (gtr_application_get_default
());
for (; wins != NULL; wins = wins->next)
- gtranslator_plugin_deactivate (info->plugin, GTR_WINDOW (wins->data));
+ gtr_plugin_deactivate (info->plugin, GTR_WINDOW (wins->data));
info->active = FALSE;
}
gboolean
-gtranslator_plugins_engine_deactivate_plugin (GtrPluginsEngine *
+gtr_plugins_engine_deactivate_plugin (GtrPluginsEngine *
engine,
GtrPluginInfo * info)
{
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
g_return_val_if_fail (info != NULL, FALSE);
@@ -528,7 +528,7 @@ reactivate_all (GtrPluginsEngine * engine, GtrWindow * window)
{
GList *pl;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
for (pl = engine->priv->plugin_list; pl; pl = pl->next)
{
@@ -543,7 +543,7 @@ reactivate_all (GtrPluginsEngine * engine, GtrWindow * window)
res = load_plugin_module (info);
if (res)
- gtranslator_plugin_activate (info->plugin, window);
+ gtr_plugin_activate (info->plugin, window);
}
}
@@ -551,14 +551,14 @@ reactivate_all (GtrPluginsEngine * engine, GtrWindow * window)
}
void
-gtranslator_plugins_engine_update_plugins_ui (GtrPluginsEngine *
+gtr_plugins_engine_update_plugins_ui (GtrPluginsEngine *
engine,
GtrWindow * window,
gboolean new_window)
{
GList *pl;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
g_return_if_fail (GTR_IS_WINDOW (window));
@@ -575,12 +575,12 @@ gtranslator_plugins_engine_update_plugins_ui (GtrPluginsEngine *
DEBUG_PRINT ("Updating UI of %s", info->name);
- gtranslator_plugin_update_ui (info->plugin, window);
+ gtr_plugin_update_ui (info->plugin, window);
}
}
void
-gtranslator_plugins_engine_configure_plugin (GtrPluginsEngine *
+gtr_plugins_engine_configure_plugin (GtrPluginsEngine *
engine,
GtrPluginInfo * info,
GtkWindow * parent)
@@ -589,11 +589,11 @@ gtranslator_plugins_engine_configure_plugin (GtrPluginsEngine *
GtkWindowGroup *wg;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
g_return_if_fail (info != NULL);
- conf_dlg = gtranslator_plugin_create_configure_dialog (info->plugin);
+ conf_dlg = gtr_plugin_create_configure_dialog (info->plugin);
g_return_if_fail (conf_dlg != NULL);
gtk_window_set_transient_for (GTK_WINDOW (conf_dlg), parent);
@@ -611,7 +611,7 @@ gtranslator_plugins_engine_configure_plugin (GtrPluginsEngine *
}
static void
-gtranslator_plugins_engine_active_plugins_changed (GConfClient * client,
+gtr_plugins_engine_active_plugins_changed (GConfClient * client,
guint cnxn_id,
GConfEntry * entry,
gpointer user_data)
@@ -621,7 +621,7 @@ gtranslator_plugins_engine_active_plugins_changed (GConfClient * client,
gboolean to_activate;
GSList *active_plugins;
- //gtranslator_debug (DEBUG_PLUGINS);
+ //gtr_debug (DEBUG_PLUGINS);
g_return_if_fail (entry->key != NULL);
g_return_if_fail (entry->value != NULL);
diff --git a/src/plugin-system/gtr-plugins-engine.h b/src/plugin-system/gtr-plugins-engine.h
index 8697574..0effe82 100644
--- a/src/plugin-system/gtr-plugins-engine.h
+++ b/src/plugin-system/gtr-plugins-engine.h
@@ -1,6 +1,6 @@
/*
* plugins-engine.h
- * This file is part of gtranslator
+ * This file is part of gtr
*
* Copyright (C) 2002-2005 - Paolo Maggi
*
@@ -21,8 +21,8 @@
*/
/*
- * Modified by the gtranslator Team, 2002-2005. See the AUTHORS file for a
- * list of people on the gtranslator Team.
+ * Modified by the gtr Team, 2002-2005. See the AUTHORS file for a
+ * list of people on the gtr Team.
* See the ChangeLog files for a list of changes.
*
* $Id: plugins-engine.h 6264 2008-05-05 11:00:38Z sfre $
@@ -37,7 +37,7 @@
#include "gtr-plugin.h"
G_BEGIN_DECLS
-#define GTR_TYPE_PLUGINS_ENGINE (gtranslator_plugins_engine_get_type ())
+#define GTR_TYPE_PLUGINS_ENGINE (gtr_plugins_engine_get_type ())
#define GTR_PLUGINS_ENGINE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTR_TYPE_PLUGINS_ENGINE, GtrPluginsEngine))
#define GTR_PLUGINS_ENGINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTR_TYPE_PLUGINS_ENGINE, GtrPluginsEngineClass))
#define GTR_IS_PLUGINS_ENGINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTR_TYPE_PLUGINS_ENGINE))
@@ -67,36 +67,36 @@ struct _GtrPluginsEngineClass
};
GType
-gtranslator_plugins_engine_get_type (void)
+gtr_plugins_engine_get_type (void)
G_GNUC_CONST;
- GtrPluginsEngine *gtranslator_plugins_engine_get_default (void);
+ GtrPluginsEngine *gtr_plugins_engine_get_default (void);
- void gtranslator_plugins_engine_garbage_collect (GtrPluginsEngine
+ void gtr_plugins_engine_garbage_collect (GtrPluginsEngine
* engine);
const GList
- *gtranslator_plugins_engine_get_plugin_list (GtrPluginsEngine *
+ *gtr_plugins_engine_get_plugin_list (GtrPluginsEngine *
engine);
GtrPluginInfo
- *gtranslator_plugins_engine_get_plugin_info (GtrPluginsEngine *
+ *gtr_plugins_engine_get_plugin_info (GtrPluginsEngine *
engine,
const gchar * name);
gboolean
- gtranslator_plugins_engine_activate_plugin (GtrPluginsEngine *
+ gtr_plugins_engine_activate_plugin (GtrPluginsEngine *
engine,
GtrPluginInfo *
info);
gboolean
- gtranslator_plugins_engine_deactivate_plugin (GtrPluginsEngine
+ gtr_plugins_engine_deactivate_plugin (GtrPluginsEngine
* engine,
GtrPluginInfo *
info);
void
- gtranslator_plugins_engine_configure_plugin (GtrPluginsEngine *
+ gtr_plugins_engine_configure_plugin (GtrPluginsEngine *
engine,
GtrPluginInfo *
info, GtkWindow * parent);
@@ -106,7 +106,7 @@ gtranslator_plugins_engine_get_type (void)
* has been created
*/
void
- gtranslator_plugins_engine_update_plugins_ui (GtrPluginsEngine
+ gtr_plugins_engine_update_plugins_ui (GtrPluginsEngine
* engine,
GtrWindow *
window,
diff --git a/src/translation-memory/berkeley/gtr-berkeley.c b/src/translation-memory/berkeley/gtr-berkeley.c
index 5665ee4..2a90327 100644
--- a/src/translation-memory/berkeley/gtr-berkeley.c
+++ b/src/translation-memory/berkeley/gtr-berkeley.c
@@ -42,14 +42,14 @@
GtrBerkeleyPrivate))
static void
-gtranslator_translation_memory_iface_init (GtrTranslationMemoryIface *
+gtr_translation_memory_iface_init (GtrTranslationMemoryIface *
iface);
G_DEFINE_TYPE_WITH_CODE (GtrBerkeley,
- gtranslator_berkeley,
+ gtr_berkeley,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (GTR_TYPE_TRANSLATION_MEMORY,
- gtranslator_translation_memory_iface_init))
+ gtr_translation_memory_iface_init))
struct _GtrBerkeleyPrivate
{
GtrDbOrig *orig;
@@ -62,7 +62,7 @@ G_DEFINE_TYPE_WITH_CODE (GtrBerkeley,
};
static gboolean
- gtranslator_berkeley_store (GtrTranslationMemory * tm,
+ gtr_berkeley_store (GtrTranslationMemory * tm,
const gchar * original,
const gchar * translation)
{
@@ -72,24 +72,24 @@ G_DEFINE_TYPE_WITH_CODE (GtrBerkeley,
g_return_val_if_fail (GTR_IS_BERKELEY (ber), FALSE);
- key = gtranslator_db_orig_read (ber->priv->orig, original);
+ key = gtr_db_orig_read (ber->priv->orig, original);
if (key == 0)
{
- key = gtranslator_db_trans_write_string (ber->priv->trans,
+ key = gtr_db_trans_write_string (ber->priv->trans,
translation, 0);
ok = (key != 0)
- && gtranslator_db_orig_write (ber->priv->orig, original, key);
+ && gtr_db_orig_write (ber->priv->orig, original, key);
if (ok)
{
gchar **words = NULL;
gsize i;
- words = gtranslator_utils_split_string_in_words (original);
+ words = gtr_utils_split_string_in_words (original);
gsize sz = g_strv_length (words);
for (i = 0; i < sz; i++)
- gtranslator_db_words_append (ber->priv->words, words[i], sz, key);
+ gtr_db_words_append (ber->priv->words, words[i], sz, key);
g_strfreev (words);
}
return ok;
@@ -99,7 +99,7 @@ G_DEFINE_TYPE_WITH_CODE (GtrBerkeley,
gboolean found = FALSE;
gint i = 0;
gchar *translation_collate;
- GPtrArray *t = gtranslator_db_trans_read (ber->priv->trans,
+ GPtrArray *t = gtr_db_trans_read (ber->priv->trans,
key);
if (!t)
return FALSE;
@@ -136,7 +136,7 @@ G_DEFINE_TYPE_WITH_CODE (GtrBerkeley,
translations = (gchar **) g_ptr_array_free (t, FALSE);
- db_recno_t key2 = gtranslator_db_trans_write (ber->priv->trans,
+ db_recno_t key2 = gtr_db_trans_write (ber->priv->trans,
translations,
key);
g_strfreev (translations);
@@ -168,8 +168,8 @@ union_of_db_keys (GtrBerkeley * ber,
{
if (mask[i])
{
- gsize count = gtranslator_db_keys_get_count (keys[i]);
- db_recno_t *list = gtranslator_db_keys_get_list (keys[i]);
+ gsize count = gtr_db_keys_get_count (keys[i]);
+ db_recno_t *list = gtr_db_keys_get_list (keys[i]);
counters[i] = count;
heads[i] = list;
@@ -190,8 +190,8 @@ union_of_db_keys (GtrBerkeley * ber,
return NULL;
}
- result = gtranslator_db_keys_new_with_size (minSize);
- res_list = gtranslator_db_keys_get_list (result);
+ result = gtr_db_keys_new_with_size (minSize);
+ res_list = gtr_db_keys_get_list (result);
gsize res_count = 0;
// Do union of 'cnt' sorted arrays. Algorithm: treat arrays as lists,
@@ -267,7 +267,7 @@ union_of_db_keys (GtrBerkeley * ber,
result = NULL;
}
else
- gtranslator_db_keys_set_count (result, res_count);
+ gtr_db_keys_set_count (result, res_count);
return result;
}
@@ -326,7 +326,7 @@ look_fuzzy (GtrBerkeley * ber,
for (missing = 0, slot = 0, i = 0; i < cnt; i++)
{
keys[i] = NULL; // so that unused entries are NULL
- keys[slot] = gtranslator_db_words_read (ber->priv->words,
+ keys[slot] = gtr_db_words_read (ber->priv->words,
words[i], cnt + delta);
if (keys[slot])
slot++;
@@ -350,10 +350,10 @@ look_fuzzy (GtrBerkeley * ber,
{
GPtrArray *array;
- db_recno_t *list = gtranslator_db_keys_get_list (result);
- for (i = 0; i < gtranslator_db_keys_get_count (result); i++)
+ db_recno_t *list = gtr_db_keys_get_list (result);
+ for (i = 0; i < gtr_db_keys_get_count (result); i++)
{
- array = gtranslator_db_trans_read (ber->priv->trans, list[i]);
+ array = gtr_db_trans_read (ber->priv->trans, list[i]);
if (array)
{
gint j = 0;
@@ -404,10 +404,10 @@ look_fuzzy (GtrBerkeley * ber,
{
GPtrArray *array;
- db_recno_t *list = gtranslator_db_keys_get_list (result);
- for (i = 0; i < gtranslator_db_keys_get_count (result); i++)
+ db_recno_t *list = gtr_db_keys_get_list (result);
+ for (i = 0; i < gtr_db_keys_get_count (result); i++)
{
- array = gtranslator_db_trans_read (ber->priv->trans,
+ array = gtr_db_trans_read (ber->priv->trans,
list[i]);
if (array)
{
@@ -464,7 +464,7 @@ insert_match_sorted (gconstpointer a, gconstpointer b)
}
static GList *
-gtranslator_berkeley_lookup (GtrTranslationMemory * tm,
+gtr_berkeley_lookup (GtrTranslationMemory * tm,
const gchar * phrase)
{
GPtrArray *array = NULL;
@@ -482,12 +482,12 @@ gtranslator_berkeley_lookup (GtrTranslationMemory * tm,
hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
// First of all, try exact match:
- db_recno_t key = gtranslator_db_orig_read (ber->priv->orig, phrase);
+ db_recno_t key = gtr_db_orig_read (ber->priv->orig, phrase);
if (key != 0)
{
gint i = 0;
- array = gtranslator_db_trans_read (ber->priv->trans, key);
+ array = gtr_db_trans_read (ber->priv->trans, key);
if (array != NULL)
{
@@ -509,7 +509,7 @@ gtranslator_berkeley_lookup (GtrTranslationMemory * tm,
// (MAX_OMITS is max permitted number of unmatched words,
// MAX_DELTA is max difference in sentences lengths).
// Start with best matches first, continue to worse ones.
- words = gtranslator_utils_split_string_in_words (phrase);
+ words = gtr_utils_split_string_in_words (phrase);
for (omits = 0;
omits <= ber->priv->max_omits
&& g_hash_table_size (hash) < ber->priv->max_items; omits++)
@@ -540,7 +540,7 @@ list:g_hash_table_iter_init (&iter, hash);
}
static void
-gtranslator_berkeley_set_max_omits (GtrTranslationMemory * tm,
+gtr_berkeley_set_max_omits (GtrTranslationMemory * tm,
gsize omits)
{
GtrBerkeley *ber = GTR_BERKELEY (tm);
@@ -549,7 +549,7 @@ gtranslator_berkeley_set_max_omits (GtrTranslationMemory * tm,
}
static void
-gtranslator_berkeley_set_max_delta (GtrTranslationMemory * tm,
+gtr_berkeley_set_max_delta (GtrTranslationMemory * tm,
gsize delta)
{
GtrBerkeley *ber = GTR_BERKELEY (tm);
@@ -558,7 +558,7 @@ gtranslator_berkeley_set_max_delta (GtrTranslationMemory * tm,
}
static void
-gtranslator_berkeley_set_max_items (GtrTranslationMemory * tm,
+gtr_berkeley_set_max_items (GtrTranslationMemory * tm,
gint items)
{
GtrBerkeley *ber = GTR_BERKELEY (tm);
@@ -567,31 +567,31 @@ gtranslator_berkeley_set_max_items (GtrTranslationMemory * tm,
}
static void
-gtranslator_translation_memory_iface_init (GtrTranslationMemoryIface *
+gtr_translation_memory_iface_init (GtrTranslationMemoryIface *
iface)
{
- iface->store = gtranslator_berkeley_store;
- iface->lookup = gtranslator_berkeley_lookup;
- iface->set_max_omits = gtranslator_berkeley_set_max_omits;
- iface->set_max_delta = gtranslator_berkeley_set_max_delta;
- iface->set_max_items = gtranslator_berkeley_set_max_items;
+ iface->store = gtr_berkeley_store;
+ iface->lookup = gtr_berkeley_lookup;
+ iface->set_max_omits = gtr_berkeley_set_max_omits;
+ iface->set_max_delta = gtr_berkeley_set_max_delta;
+ iface->set_max_items = gtr_berkeley_set_max_items;
}
static void
-gtranslator_berkeley_init (GtrBerkeley * pf)
+gtr_berkeley_init (GtrBerkeley * pf)
{
pf->priv = GTR_BERKELEY_GET_PRIVATE (pf);
- pf->priv->orig = gtranslator_db_orig_new ();
- pf->priv->trans = gtranslator_db_trans_new ();
- pf->priv->words = gtranslator_db_words_new ();
+ pf->priv->orig = gtr_db_orig_new ();
+ pf->priv->trans = gtr_db_trans_new ();
+ pf->priv->words = gtr_db_words_new ();
pf->priv->max_omits = 0;
pf->priv->max_delta = 0;
pf->priv->max_items = 0;
}
static void
-gtranslator_berkeley_finalize (GObject * object)
+gtr_berkeley_finalize (GObject * object)
{
GtrBerkeley *ber = GTR_BERKELEY (object);
@@ -599,28 +599,28 @@ gtranslator_berkeley_finalize (GObject * object)
g_object_unref (ber->priv->trans);
g_object_unref (ber->priv->words);
- G_OBJECT_CLASS (gtranslator_berkeley_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_berkeley_parent_class)->finalize (object);
}
static void
-gtranslator_berkeley_class_init (GtrBerkeleyClass * klass)
+gtr_berkeley_class_init (GtrBerkeleyClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrBerkeleyPrivate));
- object_class->finalize = gtranslator_berkeley_finalize;
+ object_class->finalize = gtr_berkeley_finalize;
}
/**
- * gtranslator_berkeley_new:
+ * gtr_berkeley_new:
*
* Creates a new #GtrBerkeley object.
*
* Returns: a new #GtrBerkeley object
*/
GtrBerkeley *
-gtranslator_berkeley_new ()
+gtr_berkeley_new ()
{
GtrBerkeley *berkeley;
diff --git a/src/translation-memory/berkeley/gtr-berkeley.h b/src/translation-memory/berkeley/gtr-berkeley.h
index 27c5c11..46893b0 100644
--- a/src/translation-memory/berkeley/gtr-berkeley.h
+++ b/src/translation-memory/berkeley/gtr-berkeley.h
@@ -26,7 +26,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_BERKELEY (gtranslator_berkeley_get_type ())
+#define GTR_TYPE_BERKELEY (gtr_berkeley_get_type ())
#define GTR_BERKELEY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_BERKELEY, GtrBerkeley))
#define GTR_BERKELEY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_BERKELEY, GtrBerkeleyClass))
#define GTR_IS_BERKELEY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_BERKELEY))
@@ -62,12 +62,12 @@ struct _GtrBerkeleyClass
* Public methods
*/
GType
-gtranslator_berkeley_get_type (void)
+gtr_berkeley_get_type (void)
G_GNUC_CONST;
- GType gtranslator_berkeley_register_type (GTypeModule * module);
+ GType gtr_berkeley_register_type (GTypeModule * module);
- GtrBerkeley *gtranslator_berkeley_new (void);
+ GtrBerkeley *gtr_berkeley_new (void);
G_END_DECLS
#endif /* __BERKELEY_H__ */
diff --git a/src/translation-memory/berkeley/gtr-db-base.c b/src/translation-memory/berkeley/gtr-db-base.c
index db5c539..523f5c9 100644
--- a/src/translation-memory/berkeley/gtr-db-base.c
+++ b/src/translation-memory/berkeley/gtr-db-base.c
@@ -38,7 +38,7 @@
GTR_TYPE_DB_BASE, \
GtrDbBasePrivate))
-G_DEFINE_TYPE (GtrDbBase, gtranslator_db_base, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GtrDbBase, gtr_db_base, G_TYPE_OBJECT)
struct _GtrDbBasePrivate
{
@@ -52,7 +52,7 @@ get_db_base_directory ()
gchar *config;
gchar *db_dir;
- config = gtranslator_dirs_get_user_config_dir ();
+ config = gtr_dirs_get_user_config_dir ();
db_dir = g_build_filename (config, "berkeley", NULL);
g_free (config);
@@ -83,7 +83,7 @@ get_db_base_directory ()
}
static void
-gtranslator_db_base_init (GtrDbBase * base)
+gtr_db_base_init (GtrDbBase * base)
{
base->priv = GTR_DB_BASE_GET_PRIVATE (base);
@@ -91,31 +91,31 @@ gtranslator_db_base_init (GtrDbBase * base)
}
static void
-gtranslator_db_base_finalize (GObject * object)
+gtr_db_base_finalize (GObject * object)
{
GtrDbBase *base = GTR_DB_BASE (object);
int err;
if ((err = base->priv->db->close (base->priv->db, 0)) != 0)
- gtranslator_db_base_show_error (base, err);
+ gtr_db_base_show_error (base, err);
g_free (base->priv->path);
- G_OBJECT_CLASS (gtranslator_db_base_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_db_base_parent_class)->finalize (object);
}
static void
-gtranslator_db_base_class_init (GtrDbBaseClass * klass)
+gtr_db_base_class_init (GtrDbBaseClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrDbBasePrivate));
- object_class->finalize = gtranslator_db_base_finalize;
+ object_class->finalize = gtr_db_base_finalize;
}
void
-gtranslator_db_base_create_dabatase (GtrDbBase * base,
+gtr_db_base_create_dabatase (GtrDbBase * base,
const gchar * filename, DBTYPE type)
{
gint error;
@@ -126,7 +126,7 @@ gtranslator_db_base_create_dabatase (GtrDbBase * base,
error = db_create (&base->priv->db, NULL, 0);
if (error != 0)
{
- gtranslator_db_base_show_error (base, error);
+ gtr_db_base_show_error (base, error);
return;
}
@@ -140,13 +140,13 @@ gtranslator_db_base_create_dabatase (GtrDbBase * base,
if (error != 0)
{
- gtranslator_db_base_show_error (base, error);
+ gtr_db_base_show_error (base, error);
return;
}
}
void
-gtranslator_db_base_show_error (GtrDbBase * base, int error)
+gtr_db_base_show_error (GtrDbBase * base, int error)
{
gchar *err = NULL;
DB_ENV *env;
@@ -184,14 +184,14 @@ gtranslator_db_base_show_error (GtrDbBase * base, int error)
}
gint
-gtranslator_db_base_put (GtrDbBase * base,
+gtr_db_base_put (GtrDbBase * base,
DBT * key, DBT * data, u_int32_t flags)
{
return base->priv->db->put (base->priv->db, NULL, key, data, flags);
}
gint
-gtranslator_db_base_get (GtrDbBase * base, DBT * key, DBT * data)
+gtr_db_base_get (GtrDbBase * base, DBT * key, DBT * data)
{
return base->priv->db->get (base->priv->db, NULL, key, data, 0);
}
diff --git a/src/translation-memory/berkeley/gtr-db-base.h b/src/translation-memory/berkeley/gtr-db-base.h
index de4e7ba..c6865ac 100644
--- a/src/translation-memory/berkeley/gtr-db-base.h
+++ b/src/translation-memory/berkeley/gtr-db-base.h
@@ -27,7 +27,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_DB_BASE (gtranslator_db_base_get_type ())
+#define GTR_TYPE_DB_BASE (gtr_db_base_get_type ())
#define GTR_DB_BASE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_DB_BASE, GtrDbBase))
#define GTR_DB_BASE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_DB_BASE, GtrDbBaseClass))
#define GTR_IS_DB_BASE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_DB_BASE))
@@ -63,22 +63,22 @@ struct _GtrDbBaseClass
* Public methods
*/
GType
-gtranslator_db_base_get_type (void)
+gtr_db_base_get_type (void)
G_GNUC_CONST;
- GType gtranslator_db_base_register_type (GTypeModule * module);
+ GType gtr_db_base_register_type (GTypeModule * module);
- void gtranslator_db_base_create_dabatase (GtrDbBase * base,
+ void gtr_db_base_create_dabatase (GtrDbBase * base,
const gchar * filename,
DBTYPE type);
- void gtranslator_db_base_show_error (GtrDbBase * base,
+ void gtr_db_base_show_error (GtrDbBase * base,
gint error);
- gint gtranslator_db_base_put (GtrDbBase * base,
+ gint gtr_db_base_put (GtrDbBase * base,
DBT * key, DBT * data, u_int32_t flags);
- gint gtranslator_db_base_get (GtrDbBase * base,
+ gint gtr_db_base_get (GtrDbBase * base,
DBT * key, DBT * data);
G_END_DECLS
diff --git a/src/translation-memory/berkeley/gtr-db-keys.c b/src/translation-memory/berkeley/gtr-db-keys.c
index 53751f4..b3eabfc 100644
--- a/src/translation-memory/berkeley/gtr-db-keys.c
+++ b/src/translation-memory/berkeley/gtr-db-keys.c
@@ -36,40 +36,40 @@
GTR_TYPE_DB_KEYS, \
GtrDbKeysPrivate))
-G_DEFINE_TYPE (GtrDbKeys, gtranslator_db_keys, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GtrDbKeys, gtr_db_keys, G_TYPE_OBJECT)
struct _GtrDbKeysPrivate
{
db_recno_t *list;
gsize count;
};
- static void gtranslator_db_keys_init (GtrDbKeys * db_keys)
+ static void gtr_db_keys_init (GtrDbKeys * db_keys)
{
db_keys->priv = GTR_DB_KEYS_GET_PRIVATE (db_keys);
}
static void
-gtranslator_db_keys_finalize (GObject * object)
+gtr_db_keys_finalize (GObject * object)
{
GtrDbKeys *keys = GTR_DB_KEYS (object);
g_free (keys->priv->list);
- G_OBJECT_CLASS (gtranslator_db_keys_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_db_keys_parent_class)->finalize (object);
}
static void
-gtranslator_db_keys_class_init (GtrDbKeysClass * klass)
+gtr_db_keys_class_init (GtrDbKeysClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GtrDbKeysPrivate));
- object_class->finalize = gtranslator_db_keys_finalize;
+ object_class->finalize = gtr_db_keys_finalize;
}
/**
- * gtranslator_db_keys_new:
+ * gtr_db_keys_new:
* @data: the db_recno_t with the list of keys stored into it
*
* Creates a new #GtrDbKeys object.
@@ -77,7 +77,7 @@ gtranslator_db_keys_class_init (GtrDbKeysClass * klass)
* Returns: a new #GtrDbKeys object
*/
GtrDbKeys *
-gtranslator_db_keys_new (DBT * data)
+gtr_db_keys_new (DBT * data)
{
GtrDbKeys *db_keys;
@@ -91,7 +91,7 @@ gtranslator_db_keys_new (DBT * data)
}
/**
- * gtranslator_db_keys_new_with_size:
+ * gtr_db_keys_new_with_size:
* @cnt: the number of element for the list
*
* Creates a new #GtrDbKeys object with #cnt elements.
@@ -99,7 +99,7 @@ gtranslator_db_keys_new (DBT * data)
* Returns: a new #GtrDbKeys object
*/
GtrDbKeys *
-gtranslator_db_keys_new_with_size (gsize cnt)
+gtr_db_keys_new_with_size (gsize cnt)
{
GtrDbKeys *db_keys;
@@ -112,7 +112,7 @@ gtranslator_db_keys_new_with_size (gsize cnt)
}
/**
- * gtranslator_db_keys_get_list:
+ * gtr_db_keys_get_list:
* @db_keys: a #GtrDbKeys
*
* Gets the list of keys.
@@ -120,7 +120,7 @@ gtranslator_db_keys_new_with_size (gsize cnt)
* Returns: the list of keys
*/
db_recno_t *
-gtranslator_db_keys_get_list (GtrDbKeys * db_keys)
+gtr_db_keys_get_list (GtrDbKeys * db_keys)
{
g_return_val_if_fail (GTR_IS_DB_KEYS (db_keys), NULL);
@@ -128,7 +128,7 @@ gtranslator_db_keys_get_list (GtrDbKeys * db_keys)
}
/**
- * gtranslator_db_keys_get_count:
+ * gtr_db_keys_get_count:
* @db_keys: a #GtrDbKeys
*
* Gets the number of elements in the list.
@@ -136,7 +136,7 @@ gtranslator_db_keys_get_list (GtrDbKeys * db_keys)
* Returns: the number of elements in the list
*/
gsize
-gtranslator_db_keys_get_count (GtrDbKeys * db_keys)
+gtr_db_keys_get_count (GtrDbKeys * db_keys)
{
g_return_val_if_fail (GTR_IS_DB_KEYS (db_keys), 0);
@@ -144,7 +144,7 @@ gtranslator_db_keys_get_count (GtrDbKeys * db_keys)
}
void
-gtranslator_db_keys_set_count (GtrDbKeys * db_keys, gsize count)
+gtr_db_keys_set_count (GtrDbKeys * db_keys, gsize count)
{
g_return_if_fail (GTR_IS_DB_KEYS (db_keys));
diff --git a/src/translation-memory/berkeley/gtr-db-keys.h b/src/translation-memory/berkeley/gtr-db-keys.h
index 12bc175..dc24525 100644
--- a/src/translation-memory/berkeley/gtr-db-keys.h
+++ b/src/translation-memory/berkeley/gtr-db-keys.h
@@ -27,7 +27,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_DB_KEYS (gtranslator_db_keys_get_type ())
+#define GTR_TYPE_DB_KEYS (gtr_db_keys_get_type ())
#define GTR_DB_KEYS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_DB_KEYS, GtrDbKeys))
#define GTR_DB_KEYS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_DB_KEYS, GtrDbKeysClass))
#define GTR_IS_DB_KEYS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_DB_KEYS))
@@ -63,20 +63,20 @@ struct _GtrDbKeysClass
* Public methods
*/
GType
-gtranslator_db_keys_get_type (void)
+gtr_db_keys_get_type (void)
G_GNUC_CONST;
- GType gtranslator_db_keys_register_type (GTypeModule * module);
+ GType gtr_db_keys_register_type (GTypeModule * module);
- GtrDbKeys *gtranslator_db_keys_new (DBT * data);
+ GtrDbKeys *gtr_db_keys_new (DBT * data);
- GtrDbKeys *gtranslator_db_keys_new_with_size (gsize cnt);
+ GtrDbKeys *gtr_db_keys_new_with_size (gsize cnt);
- db_recno_t *gtranslator_db_keys_get_list (GtrDbKeys * db_keys);
+ db_recno_t *gtr_db_keys_get_list (GtrDbKeys * db_keys);
- gsize gtranslator_db_keys_get_count (GtrDbKeys * db_keys);
+ gsize gtr_db_keys_get_count (GtrDbKeys * db_keys);
- void gtranslator_db_keys_set_count (GtrDbKeys * db_keys,
+ void gtr_db_keys_set_count (GtrDbKeys * db_keys,
gsize count);
G_END_DECLS
diff --git a/src/translation-memory/berkeley/gtr-db-orig.c b/src/translation-memory/berkeley/gtr-db-orig.c
index 5c3c170..6a4b638 100644
--- a/src/translation-memory/berkeley/gtr-db-orig.c
+++ b/src/translation-memory/berkeley/gtr-db-orig.c
@@ -35,45 +35,45 @@
GTR_TYPE_DB_ORIG, \
GtrDbOrigPrivate))
-G_DEFINE_TYPE (GtrDbOrig, gtranslator_db_orig, GTR_TYPE_DB_BASE)
+G_DEFINE_TYPE (GtrDbOrig, gtr_db_orig, GTR_TYPE_DB_BASE)
struct _GtrDbOrigPrivate
{
};
- static void gtranslator_db_orig_init (GtrDbOrig * db_orig)
+ static void gtr_db_orig_init (GtrDbOrig * db_orig)
{
//db_orig->priv = GTR_DB_ORIG_GET_PRIVATE (db_orig);
- gtranslator_db_base_create_dabatase (GTR_DB_BASE (db_orig),
+ gtr_db_base_create_dabatase (GTR_DB_BASE (db_orig),
"original.db", DB_HASH);
}
static void
-gtranslator_db_orig_finalize (GObject * object)
+gtr_db_orig_finalize (GObject * object)
{
- G_OBJECT_CLASS (gtranslator_db_orig_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_db_orig_parent_class)->finalize (object);
}
static void
-gtranslator_db_orig_class_init (GtrDbOrigClass * klass)
+gtr_db_orig_class_init (GtrDbOrigClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
//g_type_class_add_private (klass, sizeof (GtrDbOrigPrivate));
- object_class->finalize = gtranslator_db_orig_finalize;
+ object_class->finalize = gtr_db_orig_finalize;
}
/**
- * gtranslator_db_orig_new:
+ * gtr_db_orig_new:
*
* Creates a new #GtrDbOrig object.
*
* Returns: a newly #GtrDbOrig object
*/
GtrDbOrig *
-gtranslator_db_orig_new ()
+gtr_db_orig_new ()
{
GtrDbOrig *db_orig;
@@ -83,7 +83,7 @@ gtranslator_db_orig_new ()
}
/**
- * gtranslator_db_orig_write:
+ * gtr_db_orig_write:
* @orig: a #GtrDbOrig
* @string: string to store in the database
* @value: the foreign key from #GtrDbTrans
@@ -94,7 +94,7 @@ gtranslator_db_orig_new ()
* Returns: TRUE if it was successfully stored.
*/
gboolean
-gtranslator_db_orig_write (GtrDbOrig * orig,
+gtr_db_orig_write (GtrDbOrig * orig,
const gchar * string, db_recno_t value)
{
DBT key, data;
@@ -107,10 +107,10 @@ gtranslator_db_orig_write (GtrDbOrig * orig,
data.data = &value;
data.size = sizeof (value);
- error = gtranslator_db_base_put (GTR_DB_BASE (orig), &key, &data, 0);
+ error = gtr_db_base_put (GTR_DB_BASE (orig), &key, &data, 0);
if (error != 0)
{
- gtranslator_db_base_show_error (GTR_DB_BASE (orig), error);
+ gtr_db_base_show_error (GTR_DB_BASE (orig), error);
return FALSE;
}
@@ -118,7 +118,7 @@ gtranslator_db_orig_write (GtrDbOrig * orig,
}
/**
- * gtranslator_db_orig_read:
+ * gtr_db_orig_read:
* @orig: a #GtrDbOrig
* @string: the primary key of the #GtrDbOrig
*
@@ -128,7 +128,7 @@ gtranslator_db_orig_write (GtrDbOrig * orig,
* Returns: the foreign key for #GtrDbTrans
*/
db_recno_t
-gtranslator_db_orig_read (GtrDbOrig * orig, const gchar * string)
+gtr_db_orig_read (GtrDbOrig * orig, const gchar * string)
{
DBT key, data;
gint error;
@@ -138,11 +138,11 @@ gtranslator_db_orig_read (GtrDbOrig * orig, const gchar * string)
key.data = (gpointer) string;
key.size = strlen (string);
- error = gtranslator_db_base_get (GTR_DB_BASE (orig), &key, &data);
+ error = gtr_db_base_get (GTR_DB_BASE (orig), &key, &data);
if (error != 0)
{
if (error != DB_NOTFOUND)
- gtranslator_db_base_show_error (GTR_DB_BASE (orig), error);
+ gtr_db_base_show_error (GTR_DB_BASE (orig), error);
return 0;
}
diff --git a/src/translation-memory/berkeley/gtr-db-orig.h b/src/translation-memory/berkeley/gtr-db-orig.h
index dd76202..dc72e82 100644
--- a/src/translation-memory/berkeley/gtr-db-orig.h
+++ b/src/translation-memory/berkeley/gtr-db-orig.h
@@ -27,7 +27,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_DB_ORIG (gtranslator_db_orig_get_type ())
+#define GTR_TYPE_DB_ORIG (gtr_db_orig_get_type ())
#define GTR_DB_ORIG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_DB_ORIG, GtrDbOrig))
#define GTR_DB_ORIG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_DB_ORIG, GtrDbOrigClass))
#define GTR_IS_DB_ORIG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_DB_ORIG))
@@ -63,18 +63,18 @@ struct _GtrDbOrigClass
* Public methods
*/
GType
-gtranslator_db_orig_get_type (void)
+gtr_db_orig_get_type (void)
G_GNUC_CONST;
- GType gtranslator_db_orig_register_type (GTypeModule * module);
+ GType gtr_db_orig_register_type (GTypeModule * module);
- GtrDbOrig *gtranslator_db_orig_new (void);
+ GtrDbOrig *gtr_db_orig_new (void);
- gboolean gtranslator_db_orig_write (GtrDbOrig * orig,
+ gboolean gtr_db_orig_write (GtrDbOrig * orig,
const gchar * string,
db_recno_t value);
- db_recno_t gtranslator_db_orig_read (GtrDbOrig * orig,
+ db_recno_t gtr_db_orig_read (GtrDbOrig * orig,
const gchar * string);
G_END_DECLS
diff --git a/src/translation-memory/berkeley/gtr-db-trans.c b/src/translation-memory/berkeley/gtr-db-trans.c
index d12a817..f2c22ec 100644
--- a/src/translation-memory/berkeley/gtr-db-trans.c
+++ b/src/translation-memory/berkeley/gtr-db-trans.c
@@ -35,45 +35,45 @@
GTR_TYPE_DB_TRANS, \
GtrDbTransPrivate))
-G_DEFINE_TYPE (GtrDbTrans, gtranslator_db_trans, GTR_TYPE_DB_BASE)
+G_DEFINE_TYPE (GtrDbTrans, gtr_db_trans, GTR_TYPE_DB_BASE)
struct _GtrDbTransPrivate
{
};
- static void gtranslator_db_trans_init (GtrDbTrans * db_trans)
+ static void gtr_db_trans_init (GtrDbTrans * db_trans)
{
//db_trans->priv = GTR_DB_TRANS_GET_PRIVATE (db_trans);
- gtranslator_db_base_create_dabatase (GTR_DB_BASE (db_trans),
+ gtr_db_base_create_dabatase (GTR_DB_BASE (db_trans),
"translations.db", DB_RECNO);
}
static void
-gtranslator_db_trans_finalize (GObject * object)
+gtr_db_trans_finalize (GObject * object)
{
- G_OBJECT_CLASS (gtranslator_db_trans_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_db_trans_parent_class)->finalize (object);
}
static void
-gtranslator_db_trans_class_init (GtrDbTransClass * klass)
+gtr_db_trans_class_init (GtrDbTransClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
//g_type_class_add_private (klass, sizeof (GtrDbTransPrivate));
- object_class->finalize = gtranslator_db_trans_finalize;
+ object_class->finalize = gtr_db_trans_finalize;
}
/**
- * gtranslator_db_trans_new:
+ * gtr_db_trans_new:
*
* Creates a new #GtrDbTrans object.
*
* Returns: a newly #GtrDbTrans object
*/
GtrDbTrans *
-gtranslator_db_trans_new ()
+gtr_db_trans_new ()
{
GtrDbTrans *db_trans;
@@ -83,7 +83,7 @@ gtranslator_db_trans_new ()
}
/**
- * gtranslator_db_trans_write_string:
+ * gtr_db_trans_write_string:
* @db_trans: a #GtrDbTrans
* @translation: string to be stored in the database
* @key: the index record in the database to be modified
@@ -93,7 +93,7 @@ gtranslator_db_trans_new ()
* Returns: if @index is 0 then returns the new index, else returns @index
*/
db_recno_t
-gtranslator_db_trans_write_string (GtrDbTrans * db_trans,
+gtr_db_trans_write_string (GtrDbTrans * db_trans,
const gchar * translation, db_recno_t key)
{
gchar *array[2];
@@ -102,7 +102,7 @@ gtranslator_db_trans_write_string (GtrDbTrans * db_trans,
array[0] = g_strdup (translation);
array[1] = NULL;
- toret = gtranslator_db_trans_write (db_trans, array, key);
+ toret = gtr_db_trans_write (db_trans, array, key);
g_free (array[0]);
@@ -110,7 +110,7 @@ gtranslator_db_trans_write_string (GtrDbTrans * db_trans,
}
/**
- * gtranslator_db_trans_write:
+ * gtr_db_trans_write:
* @db_trans: a #GtrDbTrans
* @translations: array of translations
* @index: the index record in the database to be modified
@@ -120,7 +120,7 @@ gtranslator_db_trans_write_string (GtrDbTrans * db_trans,
* Returns: if @index is 0 then returns the new index, else returns @index
*/
db_recno_t
-gtranslator_db_trans_write (GtrDbTrans * db_trans,
+gtr_db_trans_write (GtrDbTrans * db_trans,
gchar ** translations, db_recno_t index)
{
DBT key, data;
@@ -178,7 +178,7 @@ gtranslator_db_trans_write (GtrDbTrans * db_trans,
if (index == 0)
{
- error = gtranslator_db_base_put (GTR_DB_BASE (db_trans),
+ error = gtr_db_base_put (GTR_DB_BASE (db_trans),
&key, &data, DB_APPEND);
}
else
@@ -186,20 +186,20 @@ gtranslator_db_trans_write (GtrDbTrans * db_trans,
key.data = &index;
key.size = sizeof (index);
- error = gtranslator_db_base_put (GTR_DB_BASE (db_trans),
+ error = gtr_db_base_put (GTR_DB_BASE (db_trans),
&key, &data, 0);
}
if (error != 0)
{
- gtranslator_db_base_show_error (GTR_DB_BASE (db_trans), error);
+ gtr_db_base_show_error (GTR_DB_BASE (db_trans), error);
return 0;
}
return (index == 0) ? *((db_recno_t *) key.data) : index;
}
/**
- * gtranslator_db_trans_read:
+ * gtr_db_trans_read:
* @db_trans: a #GtrDbTrans
* @index: the index record in the database
*
@@ -208,7 +208,7 @@ gtranslator_db_trans_write (GtrDbTrans * db_trans,
* The caller must free the #GPtrArray.
*/
GPtrArray *
-gtranslator_db_trans_read (GtrDbTrans * db_trans, db_recno_t index)
+gtr_db_trans_read (GtrDbTrans * db_trans, db_recno_t index)
{
DBT key, data;
gint error;
@@ -226,10 +226,10 @@ gtranslator_db_trans_read (GtrDbTrans * db_trans, db_recno_t index)
/*
* We get the data from the key
*/
- error = gtranslator_db_base_get (GTR_DB_BASE (db_trans), &key, &data);
+ error = gtr_db_base_get (GTR_DB_BASE (db_trans), &key, &data);
if (error != 0)
{
- gtranslator_db_base_show_error (GTR_DB_BASE (db_trans), error);
+ gtr_db_base_show_error (GTR_DB_BASE (db_trans), error);
return NULL;
}
diff --git a/src/translation-memory/berkeley/gtr-db-trans.h b/src/translation-memory/berkeley/gtr-db-trans.h
index 1a7add1..8974573 100644
--- a/src/translation-memory/berkeley/gtr-db-trans.h
+++ b/src/translation-memory/berkeley/gtr-db-trans.h
@@ -27,7 +27,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_DB_TRANS (gtranslator_db_trans_get_type ())
+#define GTR_TYPE_DB_TRANS (gtr_db_trans_get_type ())
#define GTR_DB_TRANS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_DB_TRANS, GtrDbTrans))
#define GTR_DB_TRANS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_DB_TRANS, GtrDbTransClass))
#define GTR_IS_DB_TRANS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_DB_TRANS))
@@ -63,23 +63,23 @@ struct _GtrDbTransClass
* Public methods
*/
GType
-gtranslator_db_trans_get_type (void)
+gtr_db_trans_get_type (void)
G_GNUC_CONST;
- GType gtranslator_db_trans_register_type (GTypeModule * module);
+ GType gtr_db_trans_register_type (GTypeModule * module);
- GtrDbTrans *gtranslator_db_trans_new (void);
+ GtrDbTrans *gtr_db_trans_new (void);
- db_recno_t gtranslator_db_trans_write_string (GtrDbTrans *
+ db_recno_t gtr_db_trans_write_string (GtrDbTrans *
db_trans,
const gchar * translation,
db_recno_t key);
- db_recno_t gtranslator_db_trans_write (GtrDbTrans * db_trans,
+ db_recno_t gtr_db_trans_write (GtrDbTrans * db_trans,
gchar ** translations,
db_recno_t index);
- GPtrArray *gtranslator_db_trans_read (GtrDbTrans * db_trans,
+ GPtrArray *gtr_db_trans_read (GtrDbTrans * db_trans,
db_recno_t index);
G_END_DECLS
diff --git a/src/translation-memory/berkeley/gtr-db-words.c b/src/translation-memory/berkeley/gtr-db-words.c
index 4619328..dc9f04e 100644
--- a/src/translation-memory/berkeley/gtr-db-words.c
+++ b/src/translation-memory/berkeley/gtr-db-words.c
@@ -36,38 +36,38 @@
GTR_TYPE_DB_WORDS, \
GtrDbWordsPrivate))
-G_DEFINE_TYPE (GtrDbWords, gtranslator_db_words, GTR_TYPE_DB_BASE)
+G_DEFINE_TYPE (GtrDbWords, gtr_db_words, GTR_TYPE_DB_BASE)
struct _GtrDbWordsPrivate
{
};
- static void gtranslator_db_words_init (GtrDbWords * db_words)
+ static void gtr_db_words_init (GtrDbWords * db_words)
{
//db_words->priv = GTR_DB_WORDS_GET_PRIVATE (db_words);
- gtranslator_db_base_create_dabatase (GTR_DB_BASE (db_words),
+ gtr_db_base_create_dabatase (GTR_DB_BASE (db_words),
"words.db", DB_HASH);
}
static void
-gtranslator_db_words_finalize (GObject * object)
+gtr_db_words_finalize (GObject * object)
{
- G_OBJECT_CLASS (gtranslator_db_words_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtr_db_words_parent_class)->finalize (object);
}
static void
-gtranslator_db_words_class_init (GtrDbWordsClass * klass)
+gtr_db_words_class_init (GtrDbWordsClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
//g_type_class_add_private (klass, sizeof (GtrDbWordsPrivate));
- object_class->finalize = gtranslator_db_words_finalize;
+ object_class->finalize = gtr_db_words_finalize;
}
GtrDbWords *
-gtranslator_db_words_new ()
+gtr_db_words_new ()
{
GtrDbWords *db_words;
@@ -77,7 +77,7 @@ gtranslator_db_words_new ()
}
gboolean
-gtranslator_db_words_append (GtrDbWords * db_words,
+gtr_db_words_append (GtrDbWords * db_words,
const gchar * word,
guint sentence_size, db_recno_t value)
{
@@ -117,7 +117,7 @@ gtranslator_db_words_append (GtrDbWords * db_words,
key.data = buf;
key.size = buf_len;
- keys = gtranslator_db_words_read (db_words, word, sentence_size);
+ keys = gtr_db_words_read (db_words, word, sentence_size);
if (keys == NULL)
{
data.data = &value;
@@ -125,8 +125,8 @@ gtranslator_db_words_append (GtrDbWords * db_words,
}
else
{
- gsize count = gtranslator_db_keys_get_count (keys);
- db_recno_t *list = gtranslator_db_keys_get_list (keys);
+ gsize count = gtr_db_keys_get_count (keys);
+ db_recno_t *list = gtr_db_keys_get_list (keys);
value_buf = g_new (db_recno_t, count + 1);
memcpy (value_buf, list, count * sizeof (db_recno_t));
@@ -137,12 +137,12 @@ gtranslator_db_words_append (GtrDbWords * db_words,
g_object_unref (keys);
}
- error = gtranslator_db_base_put (GTR_DB_BASE (db_words), &key, &data, 0);
+ error = gtr_db_base_put (GTR_DB_BASE (db_words), &key, &data, 0);
g_free (value_buf);
if (error != 0)
{
- gtranslator_db_base_show_error (GTR_DB_BASE (db_words), error);
+ gtr_db_base_show_error (GTR_DB_BASE (db_words), error);
return FALSE;
}
@@ -150,7 +150,7 @@ gtranslator_db_words_append (GtrDbWords * db_words,
}
GtrDbKeys *
-gtranslator_db_words_read (GtrDbWords * db_words,
+gtr_db_words_read (GtrDbWords * db_words,
const gchar * word, guint sentence_size)
{
DBT key, data;
@@ -184,14 +184,14 @@ gtranslator_db_words_read (GtrDbWords * db_words,
key.data = buf;
key.size = buf_len;
- error = gtranslator_db_base_get (GTR_DB_BASE (db_words), &key, &data);
+ error = gtr_db_base_get (GTR_DB_BASE (db_words), &key, &data);
if (error != 0)
{
- gtranslator_db_base_show_error (GTR_DB_BASE (db_words), error);
+ gtr_db_base_show_error (GTR_DB_BASE (db_words), error);
return NULL;
}
- keys = gtranslator_db_keys_new (&data);
+ keys = gtr_db_keys_new (&data);
return keys;
}
diff --git a/src/translation-memory/berkeley/gtr-db-words.h b/src/translation-memory/berkeley/gtr-db-words.h
index d2f9851..b2f202d 100644
--- a/src/translation-memory/berkeley/gtr-db-words.h
+++ b/src/translation-memory/berkeley/gtr-db-words.h
@@ -28,7 +28,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_DB_WORDS (gtranslator_db_words_get_type ())
+#define GTR_TYPE_DB_WORDS (gtr_db_words_get_type ())
#define GTR_DB_WORDS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_DB_WORDS, GtrDbWords))
#define GTR_DB_WORDS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_DB_WORDS, GtrDbWordsClass))
#define GTR_IS_DB_WORDS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_DB_WORDS))
@@ -64,19 +64,19 @@ struct _GtrDbWordsClass
* Public methods
*/
GType
-gtranslator_db_words_get_type (void)
+gtr_db_words_get_type (void)
G_GNUC_CONST;
- GType gtranslator_db_words_register_type (GTypeModule * module);
+ GType gtr_db_words_register_type (GTypeModule * module);
- GtrDbWords *gtranslator_db_words_new (void);
+ GtrDbWords *gtr_db_words_new (void);
- gboolean gtranslator_db_words_append (GtrDbWords * db_words,
+ gboolean gtr_db_words_append (GtrDbWords * db_words,
const gchar * word,
guint sentence_size,
db_recno_t value);
- GtrDbKeys *gtranslator_db_words_read (GtrDbWords *
+ GtrDbKeys *gtr_db_words_read (GtrDbWords *
db_words,
const gchar * word,
guint sentence_size);
diff --git a/src/translation-memory/gtr-translation-memory-ui.c b/src/translation-memory/gtr-translation-memory-ui.c
index 6c3f7e4..4a7adce 100644
--- a/src/translation-memory/gtr-translation-memory-ui.c
+++ b/src/translation-memory/gtr-translation-memory-ui.c
@@ -45,7 +45,7 @@
GtrTranslationMemoryUiPrivate))
G_DEFINE_TYPE (GtrTranslationMemoryUi,
- gtranslator_translation_memory_ui, GTK_TYPE_SCROLLED_WINDOW)
+ gtr_translation_memory_ui, GTK_TYPE_SCROLLED_WINDOW)
struct _GtrTranslationMemoryUiPrivate
{
GtkWidget *tree_view;
@@ -78,27 +78,27 @@ G_DEFINE_TYPE (GtrTranslationMemoryUi,
gint index;
GtrWindow *window;
- window = gtranslator_application_get_active_window (GTR_APP);
+ window = gtr_application_get_active_window (GTR_APP);
- view = gtranslator_window_get_active_view (window);
+ view = gtr_window_get_active_view (window);
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
/* Possible this hack is not going to work with all languages neither, we
are supposing the integer at the end of the string */
index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menuitem), "option"));
- po = gtranslator_tab_get_po (tm_ui->priv->tab);
- current_msg = gtranslator_po_get_current_message (po);
+ po = gtr_tab_get_po (tm_ui->priv->tab);
+ current_msg = gtr_po_get_current_message (po);
msg = GTR_MSG (current_msg->data);
- gtranslator_msg_set_msgstr (msg, tm_ui->priv->tm_list[index - 1]);
+ gtr_msg_set_msgstr (msg, tm_ui->priv->tm_list[index - 1]);
gtk_text_buffer_begin_user_action (buffer);
gtk_text_buffer_set_text (buffer, tm_ui->priv->tm_list[index - 1], -1);
gtk_text_buffer_end_user_action (buffer);
- gtranslator_po_set_state (po, GTR_PO_STATE_MODIFIED);
+ gtr_po_set_state (po, GTR_PO_STATE_MODIFIED);
}
static void
@@ -138,20 +138,20 @@ showed_message_cb (GtrTab * tab,
GTK_LIST_STORE (gtk_tree_view_get_model
(GTK_TREE_VIEW (tm_ui->priv->tree_view)));
- window = gtranslator_application_get_active_window (GTR_APP);
- tm_menu = gtranslator_window_get_tm_menu (window);
+ window = gtr_application_get_active_window (GTR_APP);
+ tm_menu = gtr_window_get_tm_menu (window);
g_signal_connect (tm_ui->priv->tree_view,
"size_allocate",
G_CALLBACK (tree_view_size_cb), tm_ui->priv->tree_view);
- msgid = gtranslator_msg_get_msgid (msg);
+ msgid = gtr_msg_get_msgid (msg);
tm =
- GTR_TRANSLATION_MEMORY (gtranslator_application_get_translation_memory
+ GTR_TRANSLATION_MEMORY (gtr_application_get_translation_memory
(GTR_APP));
- tm_list = gtranslator_translation_memory_lookup (tm, msgid);
+ tm_list = gtr_translation_memory_lookup (tm, msgid);
if (tm_list == NULL)
{
@@ -200,7 +200,7 @@ showed_message_cb (GtrTab * tab,
items_menu = gtk_menu_new ();
- manager = gtranslator_window_get_ui_manager (window);
+ manager = gtr_window_get_ui_manager (window);
gtk_menu_set_accel_group (GTK_MENU (items_menu),
gtk_ui_manager_get_accel_group (manager));
@@ -267,7 +267,7 @@ tree_view_size_cb (GtkWidget * widget,
static void
-gtranslator_translation_memory_ui_draw (GtrTranslationMemoryUi *
+gtr_translation_memory_ui_draw (GtrTranslationMemoryUi *
tm_ui)
{
GtrTranslationMemoryUiPrivate *priv = tm_ui->priv;
@@ -320,28 +320,28 @@ gtranslator_translation_memory_ui_draw (GtrTranslationMemoryUi *
}
static void
-gtranslator_translation_memory_ui_init (GtrTranslationMemoryUi *
+gtr_translation_memory_ui_init (GtrTranslationMemoryUi *
tm_ui)
{
tm_ui->priv = GTR_TRANSLATION_MEMORY_UI_GET_PRIVATE (tm_ui);
tm_ui->priv->tm_list = NULL;
- gtranslator_translation_memory_ui_draw (tm_ui);
+ gtr_translation_memory_ui_draw (tm_ui);
}
static void
-gtranslator_translation_memory_ui_finalize (GObject * object)
+gtr_translation_memory_ui_finalize (GObject * object)
{
GtrTranslationMemoryUi *tm_ui = GTR_TRANSLATION_MEMORY_UI (object);
g_strfreev (tm_ui->priv->tm_list);
- G_OBJECT_CLASS (gtranslator_translation_memory_ui_parent_class)->
+ G_OBJECT_CLASS (gtr_translation_memory_ui_parent_class)->
finalize (object);
}
static void
-gtranslator_translation_memory_ui_class_init
+gtr_translation_memory_ui_class_init
(GtrTranslationMemoryUiClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -349,11 +349,11 @@ gtranslator_translation_memory_ui_class_init
g_type_class_add_private (klass,
sizeof (GtrTranslationMemoryUiPrivate));
- object_class->finalize = gtranslator_translation_memory_ui_finalize;
+ object_class->finalize = gtr_translation_memory_ui_finalize;
}
GtkWidget *
-gtranslator_translation_memory_ui_new (GtkWidget * tab)
+gtr_translation_memory_ui_new (GtkWidget * tab)
{
GtrTranslationMemoryUi *tm_ui;
tm_ui = g_object_new (GTR_TYPE_TRANSLATION_MEMORY_UI, NULL);
diff --git a/src/translation-memory/gtr-translation-memory-ui.h b/src/translation-memory/gtr-translation-memory-ui.h
index 5d0028f..3f3c8d3 100644
--- a/src/translation-memory/gtr-translation-memory-ui.h
+++ b/src/translation-memory/gtr-translation-memory-ui.h
@@ -29,7 +29,7 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GTR_TYPE_TRANSLATION_MEMORY_UI (gtranslator_translation_memory_ui_get_type ())
+#define GTR_TYPE_TRANSLATION_MEMORY_UI (gtr_translation_memory_ui_get_type ())
#define GTR_TRANSLATION_MEMORY_UI(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_TRANSLATION_MEMORY_UI, GtrTranslationMemoryUi))
#define GTR_TRANSLATION_MEMORY_UI_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_TRANSLATION_MEMORY_UI, GtrTranslationMemoryUiClass))
#define GTR_IS_TRANSLATION_MEMORY_UI(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_TRANSLATION_MEMORY_UI))
@@ -67,13 +67,13 @@ struct _GtrTranslationMemoryUiClass
* Public methods
*/
GType
-gtranslator_translation_memory_ui_get_type (void)
+gtr_translation_memory_ui_get_type (void)
G_GNUC_CONST;
- GType gtranslator_translation_memory_ui_register_type (GTypeModule *
+ GType gtr_translation_memory_ui_register_type (GTypeModule *
module);
- GtkWidget *gtranslator_translation_memory_ui_new (GtkWidget * tab);
+ GtkWidget *gtr_translation_memory_ui_new (GtkWidget * tab);
G_END_DECLS
#endif /* __TRANSLATION_MEMORY_UI_H__ */
diff --git a/src/translation-memory/gtr-translation-memory.c b/src/translation-memory/gtr-translation-memory.c
index e8727ce..06a55ae 100644
--- a/src/translation-memory/gtr-translation-memory.c
+++ b/src/translation-memory/gtr-translation-memory.c
@@ -18,7 +18,7 @@
#include "gtr-translation-memory.h"
/**
- * gtranslator_translation_memory_store:
+ * gtr_translation_memory_store:
* @obj: a #GtrTranslationMemory
* @original: the untranslated text
* @translation: the @original text translated
@@ -26,7 +26,7 @@
* Stores the @original and @translation strings in the database.
*/
gboolean
-gtranslator_translation_memory_store (GtrTranslationMemory * obj,
+gtr_translation_memory_store (GtrTranslationMemory * obj,
const gchar * original,
const gchar * translation)
{
@@ -37,7 +37,7 @@ gtranslator_translation_memory_store (GtrTranslationMemory * obj,
/* Default implementation */
static gboolean
-gtranslator_translation_memory_store_default (GtrTranslationMemory *
+gtr_translation_memory_store_default (GtrTranslationMemory *
obj, const gchar * original,
const gchar * translation)
{
@@ -45,7 +45,7 @@ gtranslator_translation_memory_store_default (GtrTranslationMemory *
}
/**
- * gtranslator_translation_memory_lookup:
+ * gtr_translation_memory_lookup:
* @obj: a #GtrTranslationMemory
* @phrase: the unstranslated text to search for translations.
*
@@ -54,7 +54,7 @@ gtranslator_translation_memory_store_default (GtrTranslationMemory *
* Returns: a list of #GtrTranslationMemoryMatch.
*/
GList *
-gtranslator_translation_memory_lookup (GtrTranslationMemory * obj,
+gtr_translation_memory_lookup (GtrTranslationMemory * obj,
const gchar * phrase)
{
g_return_val_if_fail (GTR_IS_TRANSLATION_MEMORY (obj), 0);
@@ -63,20 +63,20 @@ gtranslator_translation_memory_lookup (GtrTranslationMemory * obj,
/* Default implementation */
static GList *
-gtranslator_translation_memory_lookup_default (GtrTranslationMemory *
+gtr_translation_memory_lookup_default (GtrTranslationMemory *
obj, const gchar * phrase)
{
g_return_val_if_reached (0);
}
/**
- * gtranslator_translation_memory_set_max_omits:
+ * gtr_translation_memory_set_max_omits:
* @omits: the number of omits
*
* Sets the number of omits used in the search.
*/
void
-gtranslator_translation_memory_set_max_omits (GtrTranslationMemory *
+gtr_translation_memory_set_max_omits (GtrTranslationMemory *
obj, gsize omits)
{
g_return_if_fail (GTR_IS_TRANSLATION_MEMORY (obj));
@@ -85,20 +85,20 @@ gtranslator_translation_memory_set_max_omits (GtrTranslationMemory *
/* Default implementation */
static void
-gtranslator_translation_memory_set_max_omits_default
+gtr_translation_memory_set_max_omits_default
(GtrTranslationMemory * obj, gsize omits)
{
g_return_if_reached ();
}
/**
- * gtranslator_translation_memory_set_max_delta:
+ * gtr_translation_memory_set_max_delta:
* @delta: the difference in the length of strings
*
* Sets the difference in the length of string for searching in the database.
*/
void
-gtranslator_translation_memory_set_max_delta (GtrTranslationMemory *
+gtr_translation_memory_set_max_delta (GtrTranslationMemory *
obj, gsize delta)
{
g_return_if_fail (GTR_IS_TRANSLATION_MEMORY (obj));
@@ -107,20 +107,20 @@ gtranslator_translation_memory_set_max_delta (GtrTranslationMemory *
/* Default implementation */
static void
-gtranslator_translation_memory_set_max_delta_default
+gtr_translation_memory_set_max_delta_default
(GtrTranslationMemory * obj, gsize omits)
{
g_return_if_reached ();
}
/**
- * gtranslator_translation_memory_set_max_items:
+ * gtr_translation_memory_set_max_items:
* @items: the max item to return in lookup
*
- * Sets the number of item to return in gtranslator_translation_memory_lookup().
+ * Sets the number of item to return in gtr_translation_memory_lookup().
*/
void
-gtranslator_translation_memory_set_max_items (GtrTranslationMemory *
+gtr_translation_memory_set_max_items (GtrTranslationMemory *
obj, gint items)
{
g_return_if_fail (GTR_IS_TRANSLATION_MEMORY (obj));
@@ -129,23 +129,23 @@ gtranslator_translation_memory_set_max_items (GtrTranslationMemory *
/* Default implementation */
static void
-gtranslator_translation_memory_set_max_items_default
+gtr_translation_memory_set_max_items_default
(GtrTranslationMemory * obj, gint items)
{
g_return_if_reached ();
}
static void
-gtranslator_translation_memory_base_init (GtrTranslationMemoryIface *
+gtr_translation_memory_base_init (GtrTranslationMemoryIface *
klass)
{
static gboolean initialized = FALSE;
- klass->store = gtranslator_translation_memory_store_default;
- klass->lookup = gtranslator_translation_memory_lookup_default;
- klass->set_max_omits = gtranslator_translation_memory_set_max_omits_default;
- klass->set_max_delta = gtranslator_translation_memory_set_max_delta_default;
- klass->set_max_items = gtranslator_translation_memory_set_max_items_default;
+ klass->store = gtr_translation_memory_store_default;
+ klass->lookup = gtr_translation_memory_lookup_default;
+ klass->set_max_omits = gtr_translation_memory_set_max_omits_default;
+ klass->set_max_delta = gtr_translation_memory_set_max_delta_default;
+ klass->set_max_items = gtr_translation_memory_set_max_items_default;
if (!initialized)
{
@@ -155,14 +155,14 @@ gtranslator_translation_memory_base_init (GtrTranslationMemoryIface *
}
GType
-gtranslator_translation_memory_get_type (void)
+gtr_translation_memory_get_type (void)
{
static GType type = 0;
if (!type)
{
static const GTypeInfo info = {
sizeof (GtrTranslationMemoryIface),
- (GBaseInitFunc) gtranslator_translation_memory_base_init,
+ (GBaseInitFunc) gtr_translation_memory_base_init,
NULL,
NULL,
NULL,
diff --git a/src/translation-memory/gtr-translation-memory.h b/src/translation-memory/gtr-translation-memory.h
index a9cf32e..9a9331a 100644
--- a/src/translation-memory/gtr-translation-memory.h
+++ b/src/translation-memory/gtr-translation-memory.h
@@ -21,7 +21,7 @@
#include <glib-object.h>
G_BEGIN_DECLS
-#define GTR_TYPE_TRANSLATION_MEMORY (gtranslator_translation_memory_get_type ())
+#define GTR_TYPE_TRANSLATION_MEMORY (gtr_translation_memory_get_type ())
#define GTR_TRANSLATION_MEMORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTR_TYPE_TRANSLATION_MEMORY, GtrTranslationMemory))
#define GTR_IS_TRANSLATION_MEMORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTR_TYPE_TRANSLATION_MEMORY))
#define GTR_TRANSLATION_MEMORY_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTR_TYPE_TRANSLATION_MEMORY, GtrTranslationMemoryIface))
@@ -50,25 +50,25 @@ struct _GtrTranslationMemoryMatch
gint level;
};
-GType gtranslator_translation_memory_get_type (void);
+GType gtr_translation_memory_get_type (void);
-gboolean gtranslator_translation_memory_store (GtrTranslationMemory *
+gboolean gtr_translation_memory_store (GtrTranslationMemory *
obj, const gchar * original,
const gchar * translation);
-GList *gtranslator_translation_memory_lookup (GtrTranslationMemory *
+GList *gtr_translation_memory_lookup (GtrTranslationMemory *
obj, const gchar * phrase);
void
-gtranslator_translation_memory_set_max_omits (GtrTranslationMemory *
+gtr_translation_memory_set_max_omits (GtrTranslationMemory *
obj, gsize omits);
void
-gtranslator_translation_memory_set_max_delta (GtrTranslationMemory *
+gtr_translation_memory_set_max_delta (GtrTranslationMemory *
obj, gsize delta);
void
-gtranslator_translation_memory_set_max_items (GtrTranslationMemory *
+gtr_translation_memory_set_max_items (GtrTranslationMemory *
obj, gint items);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]