gtranslator r3624 - in trunk: . plugins plugins/source-code-view plugins/source-view
- From: icq svn gnome org
- To: svn-commits-list gnome org
- Subject: gtranslator r3624 - in trunk: . plugins plugins/source-code-view plugins/source-view
- Date: Mon, 22 Sep 2008 09:39:35 +0000 (UTC)
Author: icq
Date: Mon Sep 22 09:39:35 2008
New Revision: 3624
URL: http://svn.gnome.org/viewvc/gtranslator?rev=3624&view=rev
Log:
Squashed commit of the following:
commit 649a6ab26c62580884f7f12d61840ffba8e67a8b
Author: Ignacio Casal Quinteiro <nacho resa gmail com>
Date: Thu Jul 31 12:03:56 2008 +0200
2008-07-31 Ignacio Casal Quinteiro <nacho resa gmail com>
* configure.ac:
* plugins/Makefile.am:
* plugins/source-view:
Renamed from source-view to source-code-view.
commit 34c5b112b70f170d0afb356263c9c9e4d7986d13
Author: Ignacio Casal Quinteiro <nacho resa gmail com>
Date: Thu Jul 31 11:59:23 2008 +0200
Following renaming the plugin from source-view to source-code-view
commit 537980739be77099809f6831a09536ffae8cd06c
Author: Ignacio Casal Quinteiro <nacho resa gmail com>
Date: Thu Jul 31 11:55:07 2008 +0200
Moved from source-view to source-code-view
Added:
trunk/plugins/source-code-view/
trunk/plugins/source-code-view/Makefile.am
- copied, changed from r3623, /trunk/plugins/source-view/Makefile.am
trunk/plugins/source-code-view/source-code-view-dialog.glade
- copied, changed from r3623, /trunk/plugins/source-view/source-view-dialog.glade
trunk/plugins/source-code-view/source-code-view-plugin.c
- copied, changed from r3623, /trunk/plugins/source-view/source-view-plugin.c
trunk/plugins/source-code-view/source-code-view-plugin.h
trunk/plugins/source-code-view/source-code-view.gtranslator-plugin.desktop.in
- copied, changed from r3623, /trunk/plugins/source-view/source-view.gtranslator-plugin.desktop.in
trunk/plugins/source-code-view/viewer.c
- copied, changed from r3623, /trunk/plugins/source-view/viewer.c
trunk/plugins/source-code-view/viewer.glade
- copied, changed from r3623, /trunk/plugins/source-view/viewer.glade
trunk/plugins/source-code-view/viewer.h
- copied, changed from r3623, /trunk/plugins/source-view/viewer.h
Removed:
trunk/plugins/source-view/Makefile.am
trunk/plugins/source-view/source-view-dialog.glade
trunk/plugins/source-view/source-view-plugin.c
trunk/plugins/source-view/source-view-plugin.h
trunk/plugins/source-view/source-view.gtranslator-plugin.desktop.in
trunk/plugins/source-view/viewer.c
trunk/plugins/source-view/viewer.glade
trunk/plugins/source-view/viewer.h
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/plugins/Makefile.am
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon Sep 22 09:39:35 2008
@@ -521,7 +521,7 @@
plugins/fullscreen/Makefile
plugins/insert-tags/Makefile
plugins/open-tran/Makefile
-plugins/source-view/Makefile
+plugins/source-code-view/Makefile
plugins/subversion/Makefile
src/Makefile
src/dialogs/Makefile
Modified: trunk/plugins/Makefile.am
==============================================================================
--- trunk/plugins/Makefile.am (original)
+++ trunk/plugins/Makefile.am Mon Sep 22 09:39:35 2008
@@ -2,7 +2,7 @@
alternate-language \
fullscreen \
insert-tags \
- source-view
+ source-code-view
if USE_CHARMAP
SUBDIRS += charmap
Copied: trunk/plugins/source-code-view/Makefile.am (from r3623, /trunk/plugins/source-view/Makefile.am)
==============================================================================
--- /trunk/plugins/source-view/Makefile.am (original)
+++ trunk/plugins/source-code-view/Makefile.am Mon Sep 22 09:39:35 2008
@@ -1,4 +1,4 @@
-# source-view plugin
+# source-code-view plugin
plugindir = $(libdir)/gtranslator/plugins
INCLUDES = \
@@ -12,15 +12,15 @@
-DGTR_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
plugin_LTLIBRARIES = \
- libsourceview.la
+ libsourcecodeview.la
-libsourceview_la_SOURCES = \
- source-view-plugin.c \
- source-view-plugin.h \
+libsourcecodeview_la_SOURCES = \
+ source-code-view-plugin.c \
+ source-code-view-plugin.h \
viewer.c \
viewer.h
-libsourceview_la_LDFLAGS = \
+libsourcecodeview_la_LDFLAGS = \
$(PLUGIN_LIBTOOL_FLAGS) \
$(GTRANSLATOR_LIBS)
@@ -28,11 +28,11 @@
glade_DATA = \
viewer.glade \
- source-view-dialog.glade
+ source-code-view-dialog.glade
# Plugin Info
-plugin_in_files = source-view.gtranslator-plugin.desktop.in
+plugin_in_files = source-code-view.gtranslator-plugin.desktop.in
%.gtranslator.plugin: %.gtranslator-plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
Copied: trunk/plugins/source-code-view/source-code-view-dialog.glade (from r3623, /trunk/plugins/source-view/source-view-dialog.glade)
==============================================================================
Copied: trunk/plugins/source-code-view/source-code-view-plugin.c (from r3623, /trunk/plugins/source-view/source-view-plugin.c)
==============================================================================
--- /trunk/plugins/source-view/source-view-plugin.c (original)
+++ trunk/plugins/source-code-view/source-code-view-plugin.c Mon Sep 22 09:39:35 2008
@@ -20,7 +20,7 @@
#include <config.h>
#endif
-#include "source-view-plugin.h"
+#include "source-code-view-plugin.h"
#include "comment.h"
#include "utils.h"
#include "viewer.h"
@@ -33,20 +33,20 @@
#include <gconf/gconf-client.h>
/* Gconf keys */
-#define SOURCE_VIEW_BASE_KEY "/apps/gtranslator/plugins/source-view"
-#define USE_EDITOR_KEY SOURCE_VIEW_BASE_KEY "/use_editor"
-#define PROGRAM_CMD_KEY SOURCE_VIEW_BASE_KEY "/program_cmd"
-#define LINE_CMD_KEY SOURCE_VIEW_BASE_KEY "/line_cmd"
+#define SOURCE_CODE_VIEW_BASE_KEY "/apps/gtranslator/plugins/source-view"
+#define USE_EDITOR_KEY SOURCE_CODE_VIEW_BASE_KEY "/use_editor"
+#define PROGRAM_CMD_KEY SOURCE_CODE_VIEW_BASE_KEY "/program_cmd"
+#define LINE_CMD_KEY SOURCE_CODE_VIEW_BASE_KEY "/line_cmd"
/* Glade */
#define GLADE_FILE DATADIR"/source-view-dialog.glade"
-#define GTR_SOURCE_VIEW_PLUGIN_GET_PRIVATE(object) \
+#define GTR_SOURCE_CODE_VIEW_PLUGIN_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
- GTR_TYPE_SOURCE_VIEW_PLUGIN, \
- GtranslatorSourceViewPluginPrivate))
+ GTR_TYPE_SOURCE_CODE_VIEW_PLUGIN, \
+ GtranslatorSourceCodeViewPluginPrivate))
-struct _GtranslatorSourceViewPluginPrivate
+struct _GtranslatorSourceCodeViewPluginPrivate
{
GConfClient *gconf_client;
@@ -64,7 +64,7 @@
gint inserted_lines;
};
-GTR_PLUGIN_REGISTER_TYPE(GtranslatorSourceViewPlugin, gtranslator_source_view_plugin)
+GTR_PLUGIN_REGISTER_TYPE(GtranslatorSourceCodeViewPlugin, gtranslator_source_code_view_plugin)
static void
insert_link (GtkTextBuffer *buffer,
@@ -129,7 +129,7 @@
}
static void
-show_source (GtranslatorSourceViewPlugin *plugin,
+show_source (GtranslatorSourceCodeViewPlugin *plugin,
const gchar *path,
gint line)
{
@@ -166,7 +166,7 @@
}
static void
-follow_if_link (GtranslatorSourceViewPlugin *plugin,
+follow_if_link (GtranslatorSourceCodeViewPlugin *plugin,
GtkWidget *text_view,
GtkTextIter *iter)
{
@@ -208,7 +208,7 @@
static gboolean
event_after (GtkWidget *text_view,
GdkEvent *ev,
- GtranslatorSourceViewPlugin *plugin)
+ GtranslatorSourceCodeViewPlugin *plugin)
{
GtkTextIter start, end, iter;
GtkTextBuffer *buffer;
@@ -331,34 +331,34 @@
}
static void
-gtranslator_source_view_plugin_init (GtranslatorSourceViewPlugin *plugin)
+gtranslator_source_code_view_plugin_init (GtranslatorSourceCodeViewPlugin *plugin)
{
- plugin->priv = GTR_SOURCE_VIEW_PLUGIN_GET_PRIVATE (plugin);
+ plugin->priv = GTR_SOURCE_CODE_VIEW_PLUGIN_GET_PRIVATE (plugin);
plugin->priv->gconf_client = gconf_client_get_default ();
gconf_client_add_dir (plugin->priv->gconf_client,
- SOURCE_VIEW_BASE_KEY,
+ SOURCE_CODE_VIEW_BASE_KEY,
GCONF_CLIENT_PRELOAD_ONELEVEL,
NULL);
}
static void
-gtranslator_source_view_plugin_finalize (GObject *object)
+gtranslator_source_code_view_plugin_finalize (GObject *object)
{
- GtranslatorSourceViewPlugin *plugin = GTR_SOURCE_VIEW_PLUGIN (object);
+ GtranslatorSourceCodeViewPlugin *plugin = GTR_SOURCE_CODE_VIEW_PLUGIN (object);
gconf_client_suggest_sync (plugin->priv->gconf_client, NULL);
g_object_unref (G_OBJECT (plugin->priv->gconf_client));
- G_OBJECT_CLASS (gtranslator_source_view_plugin_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtranslator_source_code_view_plugin_parent_class)->finalize (object);
}
static void
showed_message_cb (GtranslatorTab *tab,
GtranslatorMsg *msg,
- GtranslatorSourceViewPlugin *plugin)
+ GtranslatorSourceCodeViewPlugin *plugin)
{
const gchar *filename = NULL;
gint i = 0;
@@ -392,7 +392,7 @@
static void
message_edition_finished_cb (GtranslatorTab *tab,
GtranslatorMsg *msg,
- GtranslatorSourceViewPlugin *plugin)
+ GtranslatorSourceCodeViewPlugin *plugin)
{
GSList *tags = NULL, *tagp = NULL;
GtkTextIter iter;
@@ -434,7 +434,7 @@
page_added_cb (GtkNotebook *notebook,
GtkWidget *child,
guint page_num,
- GtranslatorSourceViewPlugin *plugin)
+ GtranslatorSourceCodeViewPlugin *plugin)
{
GtranslatorCommentPanel *panel;
GtkTextView *view;
@@ -457,14 +457,14 @@
static void
use_editor_toggled (GtkToggleButton *button,
- GtranslatorSourceViewPlugin *plugin)
+ GtranslatorSourceCodeViewPlugin *plugin)
{
gtk_widget_set_sensitive (plugin->priv->program_box,
gtk_toggle_button_get_active (button));
}
static GtkWidget *
-get_configuration_dialog (GtranslatorSourceViewPlugin *plugin)
+get_configuration_dialog (GtranslatorSourceCodeViewPlugin *plugin)
{
gboolean ret;
@@ -532,7 +532,7 @@
GtranslatorWindow *window)
{
GtkWidget *notebook;
- GtranslatorSourceViewPlugin *source_view = GTR_SOURCE_VIEW_PLUGIN (plugin);
+ GtranslatorSourceCodeViewPlugin *source_code_view = GTR_SOURCE_CODE_VIEW_PLUGIN (plugin);
GList *tabs, *l;
/*
@@ -543,7 +543,7 @@
notebook = GTK_WIDGET (gtranslator_window_get_notebook (window));
- source_view->priv->window = window;
+ source_code_view->priv->window = window;
g_signal_connect (notebook, "page-added",
G_CALLBACK (page_added_cb), plugin);
@@ -555,7 +555,7 @@
for (l = tabs; l != NULL; l = g_list_next (l))
{
page_added_cb (GTK_NOTEBOOK (notebook),
- l->data, 0, GTR_SOURCE_VIEW_PLUGIN (plugin));
+ l->data, 0, GTR_SOURCE_CODE_VIEW_PLUGIN (plugin));
}
}
@@ -597,7 +597,7 @@
}
static void
-ok_button_pressed (GtranslatorSourceViewPlugin *plugin)
+ok_button_pressed (GtranslatorSourceCodeViewPlugin *plugin)
{
const gchar *program_cmd;
const gchar *line_cmd;
@@ -643,7 +643,7 @@
static void
configure_dialog_response_cb (GtkWidget *widget,
gint response,
- GtranslatorSourceViewPlugin *plugin)
+ GtranslatorSourceCodeViewPlugin *plugin)
{
switch (response)
{
@@ -666,12 +666,12 @@
{
GtkWidget *dialog;
- dialog = get_configuration_dialog (GTR_SOURCE_VIEW_PLUGIN (plugin));
+ dialog = get_configuration_dialog (GTR_SOURCE_CODE_VIEW_PLUGIN (plugin));
g_signal_connect (dialog,
"response",
G_CALLBACK (configure_dialog_response_cb),
- GTR_SOURCE_VIEW_PLUGIN (plugin));
+ GTR_SOURCE_CODE_VIEW_PLUGIN (plugin));
g_signal_connect (dialog,
"destroy",
G_CALLBACK (gtk_widget_destroy),
@@ -681,16 +681,16 @@
}
static void
-gtranslator_source_view_plugin_class_init (GtranslatorSourceViewPluginClass *klass)
+gtranslator_source_code_view_plugin_class_init (GtranslatorSourceCodeViewPluginClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtranslatorPluginClass *plugin_class = GTR_PLUGIN_CLASS (klass);
- object_class->finalize = gtranslator_source_view_plugin_finalize;
+ object_class->finalize = gtranslator_source_code_view_plugin_finalize;
plugin_class->activate = impl_activate;
plugin_class->deactivate = impl_deactivate;
plugin_class->create_configure_dialog = impl_create_configure_dialog;
- g_type_class_add_private (object_class, sizeof (GtranslatorSourceViewPluginPrivate));
+ g_type_class_add_private (object_class, sizeof (GtranslatorSourceCodeViewPluginPrivate));
}
Added: trunk/plugins/source-code-view/source-code-view-plugin.h
==============================================================================
--- (empty file)
+++ trunk/plugins/source-code-view/source-code-view-plugin.h Mon Sep 22 09:39:35 2008
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2008 Ignacio Casal Quinteiro <nacho resa gmail com>
+ *
+ * This program 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANPOILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef __GTR_SOURCE_CODE_VIEW_PLUGIN_H__
+#define __GTR_SOURCE_CODE_VIEW_PLUGIN_H__
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "plugin.h"
+
+G_BEGIN_DECLS
+
+/*
+ * Type checking and casting macros
+ */
+#define GTR_TYPE_SOURCE_CODE_VIEW_PLUGIN (gtranslator_source_code_view_plugin_get_type ())
+#define GTR_SOURCE_CODE_VIEW_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_SOURCE_CODE_VIEW_PLUGIN, GtranslatorSourceCodeViewPlugin))
+#define GTR_SOURCE_CODE_VIEW_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_SOURCE_CODE_VIEW_PLUGIN, GtranslatorSourceCodeViewPluginClass))
+#define GTR_IS_SOURCE_CODE_VIEW_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_SOURCE_CODE_VIEW_PLUGIN))
+#define GTR_IS_SOURCE_CODE_VIEW_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTR_TYPE_SOURCE_CODE_VIEW_PLUGIN))
+#define GTR_SOURCE_CODE_VIEW_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTR_TYPE_SOURCE_CODE_VIEW_PLUGIN_PLUGIN, GtranslatorSourceCodeViewPluginClass))
+
+/* Private structure type */
+typedef struct _GtranslatorSourceCodeViewPluginPrivate GtranslatorSourceCodeViewPluginPrivate;
+
+/*
+ * Main object structure
+ */
+typedef struct _GtranslatorSourceCodeViewPlugin GtranslatorSourceCodeViewPlugin;
+
+struct _GtranslatorSourceCodeViewPlugin
+{
+ GtranslatorPlugin parent_instance;
+
+ /* private */
+ GtranslatorSourceCodeViewPluginPrivate *priv;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _GtranslatorSourceCodeViewPluginClass GtranslatorSourceCodeViewPluginClass;
+
+struct _GtranslatorSourceCodeViewPluginClass
+{
+ GtranslatorPluginClass parent_class;
+};
+
+/*
+ * Public methods
+ */
+GType gtranslator_source_code_view_plugin_get_type (void) G_GNUC_CONST;
+
+/* All the plugins must implement this function */
+G_MODULE_EXPORT GType register_gtranslator_plugin (GTypeModule *module);
+
+G_END_DECLS
+
+#endif /* __GTR_SOURCE_CODE_VIEW_PLUGIN_H__ */
Copied: trunk/plugins/source-code-view/source-code-view.gtranslator-plugin.desktop.in (from r3623, /trunk/plugins/source-view/source-view.gtranslator-plugin.desktop.in)
==============================================================================
--- /trunk/plugins/source-view/source-view.gtranslator-plugin.desktop.in (original)
+++ trunk/plugins/source-code-view/source-code-view.gtranslator-plugin.desktop.in Mon Sep 22 09:39:35 2008
@@ -1,7 +1,7 @@
[Gtranslator Plugin]
-Module=sourceview
+Module=sourcecodeview
IAge=2
-_Name=Source View
+_Name=Source Code View
_Description=Show the message in the source code.
Authors=Ignacio Casal Quinteiro <nacho resa gmail com>
Copyright=Copyright @ 2008 Ignacio Casal Quinteiro
Copied: trunk/plugins/source-code-view/viewer.c (from r3623, /trunk/plugins/source-view/viewer.c)
==============================================================================
Copied: trunk/plugins/source-code-view/viewer.glade (from r3623, /trunk/plugins/source-view/viewer.glade)
==============================================================================
Copied: trunk/plugins/source-code-view/viewer.h (from r3623, /trunk/plugins/source-view/viewer.h)
==============================================================================
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]