summaryrefslogtreecommitdiff
path: root/plugins/time
diff options
context:
space:
mode:
authorPerberos <[email protected]>2011-11-07 19:52:18 -0300
committerPerberos <[email protected]>2011-11-07 19:52:18 -0300
commit5ded9cba8563f336939400303d6a841d5089b107 (patch)
treec5676588cff26ba37e12369fe4de24b54e9f6682 /plugins/time
parentf00b3a11a199f9f85a4d46a600f9d14179b37dbf (diff)
downloadpluma-5ded9cba8563f336939400303d6a841d5089b107.tar.bz2
pluma-5ded9cba8563f336939400303d6a841d5089b107.tar.xz
renaming from gedit to pluma
Diffstat (limited to 'plugins/time')
-rwxr-xr-xplugins/time/Makefile.am22
-rwxr-xr-xplugins/time/gedit-time-plugin.h78
-rwxr-xr-xplugins/time/pluma-time-dialog.ui (renamed from plugins/time/gedit-time-dialog.ui)0
-rwxr-xr-xplugins/time/pluma-time-plugin.c (renamed from plugins/time/gedit-time-plugin.c)202
-rwxr-xr-xplugins/time/pluma-time-plugin.h78
-rwxr-xr-xplugins/time/pluma-time-setup-dialog.ui (renamed from plugins/time/gedit-time-setup-dialog.ui)0
-rwxr-xr-xplugins/time/time.pluma-plugin.desktop.in (renamed from plugins/time/time.gedit-plugin.desktop.in)4
7 files changed, 192 insertions, 192 deletions
diff --git a/plugins/time/Makefile.am b/plugins/time/Makefile.am
index c532f7d4..bfb442b6 100755
--- a/plugins/time/Makefile.am
+++ b/plugins/time/Makefile.am
@@ -1,31 +1,31 @@
# time plugin
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
+plugindir = $(PLUMA_PLUGINS_LIBS_DIR)
INCLUDES = \
-I$(top_srcdir) \
- $(GEDIT_CFLAGS) \
+ $(PLUMA_CFLAGS) \
$(WARN_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS)
plugin_LTLIBRARIES = libtime.la
libtime_la_SOURCES = \
- gedit-time-plugin.h \
- gedit-time-plugin.c
+ pluma-time-plugin.h \
+ pluma-time-plugin.c
libtime_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
-libtime_la_LIBADD = $(GEDIT_LIBS)
+libtime_la_LIBADD = $(PLUMA_LIBS)
-uidir = $(GEDIT_PLUGINS_DATA_DIR)/time
+uidir = $(PLUMA_PLUGINS_DATA_DIR)/time
ui_DATA = \
- gedit-time-dialog.ui \
- gedit-time-setup-dialog.ui
+ pluma-time-dialog.ui \
+ pluma-time-setup-dialog.ui
-plugin_in_files = time.gedit-plugin.desktop.in
+plugin_in_files = time.pluma-plugin.desktop.in
-%.gedit-plugin: %.gedit-plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+%.pluma-plugin: %.pluma-plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-plugin_DATA = $(plugin_in_files:.gedit-plugin.desktop.in=.gedit-plugin)
+plugin_DATA = $(plugin_in_files:.pluma-plugin.desktop.in=.pluma-plugin)
EXTRA_DIST = $(ui_DATA) $(plugin_in_files)
diff --git a/plugins/time/gedit-time-plugin.h b/plugins/time/gedit-time-plugin.h
deleted file mode 100755
index 6d598264..00000000
--- a/plugins/time/gedit-time-plugin.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * gedit-time-plugin.h
- *
- * Copyright (C) 2002-2005 - Paolo Maggi
- *
- * 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 2, 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
- * MERCHANTABILITY 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
- */
-
-#ifndef __GEDIT_TIME_PLUGIN_H__
-#define __GEDIT_TIME_PLUGIN_H__
-
-#include <glib.h>
-#include <glib-object.h>
-#include <gedit/gedit-plugin.h>
-
-G_BEGIN_DECLS
-
-/*
- * Type checking and casting macros
- */
-#define GEDIT_TYPE_TIME_PLUGIN (gedit_time_plugin_get_type ())
-#define GEDIT_TIME_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GEDIT_TYPE_TIME_PLUGIN, GeditTimePlugin))
-#define GEDIT_TIME_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GEDIT_TYPE_TIME_PLUGIN, GeditTimePluginClass))
-#define GEDIT_IS_TIME_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GEDIT_TYPE_TIME_PLUGIN))
-#define GEDIT_IS_TIME_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GEDIT_TYPE_TIME_PLUGIN))
-#define GEDIT_TIME_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GEDIT_TYPE_TIME_PLUGIN, GeditTimePluginClass))
-
-/* Private structure type */
-typedef struct _GeditTimePluginPrivate GeditTimePluginPrivate;
-
-/*
- * Main object structure
- */
-typedef struct _GeditTimePlugin GeditTimePlugin;
-
-struct _GeditTimePlugin
-{
- GeditPlugin parent_instance;
-
- /*< private >*/
- GeditTimePluginPrivate *priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _GeditTimePluginClass GeditTimePluginClass;
-
-struct _GeditTimePluginClass
-{
- GeditPluginClass parent_class;
-};
-
-/*
- * Public methods
- */
-GType gedit_time_plugin_get_type (void) G_GNUC_CONST;
-
-/* All the plugins must implement this function */
-G_MODULE_EXPORT GType register_gedit_plugin (GTypeModule *module);
-
-G_END_DECLS
-
-#endif /* __GEDIT_TIME_PLUGIN_H__ */
diff --git a/plugins/time/gedit-time-dialog.ui b/plugins/time/pluma-time-dialog.ui
index 398e9b98..398e9b98 100755
--- a/plugins/time/gedit-time-dialog.ui
+++ b/plugins/time/pluma-time-dialog.ui
diff --git a/plugins/time/gedit-time-plugin.c b/plugins/time/pluma-time-plugin.c
index 42bf6cb9..d504bdf4 100755
--- a/plugins/time/gedit-time-plugin.c
+++ b/plugins/time/pluma-time-plugin.c
@@ -1,5 +1,5 @@
/*
- * gedit-time-plugin.c
+ * pluma-time-plugin.c
*
* Copyright (C) 2002-2005 - Paolo Maggi
*
@@ -21,8 +21,8 @@
*/
/*
- * Modified by the gedit Team, 2002. See the AUTHORS file for a
- * list of people on the gedit Team.
+ * Modified by the pluma Team, 2002. See the AUTHORS file for a
+ * list of people on the pluma Team.
* See the ChangeLog files for a list of changes.
*/
@@ -35,25 +35,25 @@
#include <mateconf/mateconf-client.h>
-#include "gedit-time-plugin.h"
-#include <gedit/gedit-help.h>
+#include "pluma-time-plugin.h"
+#include <pluma/pluma-help.h>
#include <glib/gi18n-lib.h>
#include <glib.h>
#include <gmodule.h>
-#include <gedit/gedit-debug.h>
-#include <gedit/gedit-utils.h>
+#include <pluma/pluma-debug.h>
+#include <pluma/pluma-utils.h>
-#define GEDIT_TIME_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
- GEDIT_TYPE_TIME_PLUGIN, \
- GeditTimePluginPrivate))
+#define PLUMA_TIME_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
+ PLUMA_TYPE_TIME_PLUGIN, \
+ PlumaTimePluginPrivate))
-#define WINDOW_DATA_KEY "GeditTimePluginWindowData"
+#define WINDOW_DATA_KEY "PlumaTimePluginWindowData"
#define MENU_PATH "/MenuBar/EditMenu/EditOps_4"
/* mateconf keys */
-#define TIME_BASE_KEY "/apps/gedit-2/plugins/time"
+#define TIME_BASE_KEY "/apps/pluma-2/plugins/time"
#define PROMPT_TYPE_KEY TIME_BASE_KEY "/prompt_type"
#define SELECTED_FORMAT_KEY TIME_BASE_KEY "/selected_format"
#define CUSTOM_FORMAT_KEY TIME_BASE_KEY "/custom_format"
@@ -122,7 +122,7 @@ struct _TimeConfigureDialog
GtkWidget *custom_format_example;
/* Info needed for the response handler */
- GeditTimePlugin *plugin;
+ PlumaTimePlugin *plugin;
};
typedef struct _ChooseFormatDialog ChooseFormatDialog;
@@ -142,7 +142,7 @@ struct _ChooseFormatDialog
/* Info needed for the response handler */
GtkTextBuffer *buffer;
- GeditTimePlugin *plugin;
+ PlumaTimePlugin *plugin;
};
typedef enum
@@ -151,14 +151,14 @@ typedef enum
PROMPT_CUSTOM_FORMAT, /* Popup dialog with entry preselected */
USE_SELECTED_FORMAT, /* Use selected format directly */
USE_CUSTOM_FORMAT /* Use custom format directly */
-} GeditTimePluginPromptType;
+} PlumaTimePluginPromptType;
-struct _GeditTimePluginPrivate
+struct _PlumaTimePluginPrivate
{
MateConfClient *mateconf_client;
};
-GEDIT_PLUGIN_REGISTER_TYPE(GeditTimePlugin, gedit_time_plugin)
+PLUMA_PLUGIN_REGISTER_TYPE(PlumaTimePlugin, pluma_time_plugin)
typedef struct
{
@@ -168,8 +168,8 @@ typedef struct
typedef struct
{
- GeditWindow *window;
- GeditTimePlugin *plugin;
+ PlumaWindow *window;
+ PlumaTimePlugin *plugin;
} ActionData;
static void time_cb (GtkAction *action, ActionData *data);
@@ -187,11 +187,11 @@ static const GtkActionEntry action_entries[] =
};
static void
-gedit_time_plugin_init (GeditTimePlugin *plugin)
+pluma_time_plugin_init (PlumaTimePlugin *plugin)
{
- gedit_debug_message (DEBUG_PLUGINS, "GeditTimePlugin initializing");
+ pluma_debug_message (DEBUG_PLUGINS, "PlumaTimePlugin initializing");
- plugin->priv = GEDIT_TIME_PLUGIN_GET_PRIVATE (plugin);
+ plugin->priv = PLUMA_TIME_PLUGIN_GET_PRIVATE (plugin);
plugin->priv->mateconf_client = mateconf_client_get_default ();
@@ -202,17 +202,17 @@ gedit_time_plugin_init (GeditTimePlugin *plugin)
}
static void
-gedit_time_plugin_finalize (GObject *object)
+pluma_time_plugin_finalize (GObject *object)
{
- GeditTimePlugin *plugin = GEDIT_TIME_PLUGIN (object);
+ PlumaTimePlugin *plugin = PLUMA_TIME_PLUGIN (object);
- gedit_debug_message (DEBUG_PLUGINS, "GeditTimePlugin finalizing");
+ pluma_debug_message (DEBUG_PLUGINS, "PlumaTimePlugin finalizing");
mateconf_client_suggest_sync (plugin->priv->mateconf_client, NULL);
g_object_unref (G_OBJECT (plugin->priv->mateconf_client));
- G_OBJECT_CLASS (gedit_time_plugin_parent_class)->finalize (object);
+ G_OBJECT_CLASS (pluma_time_plugin_parent_class)->finalize (object);
}
static void
@@ -225,17 +225,17 @@ free_window_data (WindowData *data)
}
static void
-update_ui_real (GeditWindow *window,
+update_ui_real (PlumaWindow *window,
WindowData *data)
{
- GeditView *view;
+ PlumaView *view;
GtkAction *action;
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
- view = gedit_window_get_active_view (window);
+ view = pluma_window_get_active_view (window);
- gedit_debug_message (DEBUG_PLUGINS, "View: %p", view);
+ pluma_debug_message (DEBUG_PLUGINS, "View: %p", view);
action = gtk_action_group_get_action (data->action_group,
"InsertDateAndTime");
@@ -245,24 +245,24 @@ update_ui_real (GeditWindow *window,
}
static void
-impl_activate (GeditPlugin *plugin,
- GeditWindow *window)
+impl_activate (PlumaPlugin *plugin,
+ PlumaWindow *window)
{
GtkUIManager *manager;
WindowData *data;
ActionData *action_data;
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
data = g_new (WindowData, 1);
action_data = g_new (ActionData, 1);
- action_data->plugin = GEDIT_TIME_PLUGIN (plugin);
+ action_data->plugin = PLUMA_TIME_PLUGIN (plugin);
action_data->window = window;
- manager = gedit_window_get_ui_manager (window);
+ manager = pluma_window_get_ui_manager (window);
- data->action_group = gtk_action_group_new ("GeditTimePluginActions");
+ data->action_group = gtk_action_group_new ("PlumaTimePluginActions");
gtk_action_group_set_translation_domain (data->action_group,
GETTEXT_PACKAGE);
gtk_action_group_add_actions_full (data->action_group,
@@ -292,15 +292,15 @@ impl_activate (GeditPlugin *plugin,
}
static void
-impl_deactivate (GeditPlugin *plugin,
- GeditWindow *window)
+impl_deactivate (PlumaPlugin *plugin,
+ PlumaWindow *window)
{
GtkUIManager *manager;
WindowData *data;
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
- manager = gedit_window_get_ui_manager (window);
+ manager = pluma_window_get_ui_manager (window);
data = (WindowData *) g_object_get_data (G_OBJECT (window), WINDOW_DATA_KEY);
g_return_if_fail (data != NULL);
@@ -312,12 +312,12 @@ impl_deactivate (GeditPlugin *plugin,
}
static void
-impl_update_ui (GeditPlugin *plugin,
- GeditWindow *window)
+impl_update_ui (PlumaPlugin *plugin,
+ PlumaWindow *window)
{
WindowData *data;
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
data = (WindowData *) g_object_get_data (G_OBJECT (window), WINDOW_DATA_KEY);
g_return_if_fail (data != NULL);
@@ -326,11 +326,11 @@ impl_update_ui (GeditPlugin *plugin,
}
/* whether we should prompt the user or use the specified format */
-static GeditTimePluginPromptType
-get_prompt_type (GeditTimePlugin *plugin)
+static PlumaTimePluginPromptType
+get_prompt_type (PlumaTimePlugin *plugin)
{
gchar *prompt_type;
- GeditTimePluginPromptType res;
+ PlumaTimePluginPromptType res;
prompt_type = mateconf_client_get_string (plugin->priv->mateconf_client,
PROMPT_TYPE_KEY,
@@ -354,8 +354,8 @@ get_prompt_type (GeditTimePlugin *plugin)
}
static void
-set_prompt_type (GeditTimePlugin *plugin,
- GeditTimePluginPromptType prompt_type)
+set_prompt_type (PlumaTimePlugin *plugin,
+ PlumaTimePluginPromptType prompt_type)
{
const gchar * str;
@@ -389,7 +389,7 @@ set_prompt_type (GeditTimePlugin *plugin,
/* The selected format in the list */
static gchar *
-get_selected_format (GeditTimePlugin *plugin)
+get_selected_format (PlumaTimePlugin *plugin)
{
gchar *sel_format;
@@ -401,7 +401,7 @@ get_selected_format (GeditTimePlugin *plugin)
}
static void
-set_selected_format (GeditTimePlugin *plugin,
+set_selected_format (PlumaTimePlugin *plugin,
const gchar *format)
{
g_return_if_fail (format != NULL);
@@ -421,7 +421,7 @@ set_selected_format (GeditTimePlugin *plugin,
/* the custom format in the entry */
static gchar *
-get_custom_format (GeditTimePlugin *plugin)
+get_custom_format (PlumaTimePlugin *plugin)
{
gchar *format;
@@ -433,7 +433,7 @@ get_custom_format (GeditTimePlugin *plugin)
}
static void
-set_custom_format (GeditTimePlugin *plugin,
+set_custom_format (PlumaTimePlugin *plugin,
const gchar *format)
{
g_return_if_fail (format != NULL);
@@ -459,7 +459,7 @@ get_time (const gchar* format)
size_t out_length = 0;
gchar *locale_format;
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
g_return_val_if_fail (format != NULL, NULL);
@@ -501,24 +501,24 @@ get_time (const gchar* format)
static void
dialog_destroyed (GtkObject *obj, gpointer dialog_pointer)
{
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
g_free (dialog_pointer);
- gedit_debug_message (DEBUG_PLUGINS, "END");
+ pluma_debug_message (DEBUG_PLUGINS, "END");
}
static GtkTreeModel *
create_model (GtkWidget *listview,
const gchar *sel_format,
- GeditTimePlugin *plugin)
+ PlumaTimePlugin *plugin)
{
gint i = 0;
GtkListStore *store;
GtkTreeSelection *selection;
GtkTreeIter iter;
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
/* create list store */
store = gtk_list_store_new (NUM_COLUMNS, G_TYPE_STRING, G_TYPE_INT);
@@ -541,7 +541,7 @@ create_model (GtkWidget *listview,
str = get_time (formats[i]);
- gedit_debug_message (DEBUG_PLUGINS, "%d : %s", i, str);
+ pluma_debug_message (DEBUG_PLUGINS, "%d : %s", i, str);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
COLUMN_FORMATS, str,
@@ -572,7 +572,7 @@ scroll_to_selected (GtkTreeView *tree_view)
GtkTreeSelection *selection;
GtkTreeIter iter;
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
model = gtk_tree_view_get_model (tree_view);
g_return_if_fail (model != NULL);
@@ -597,12 +597,12 @@ scroll_to_selected (GtkTreeView *tree_view)
static void
create_formats_list (GtkWidget *listview,
const gchar *sel_format,
- GeditTimePlugin *plugin)
+ PlumaTimePlugin *plugin)
{
GtkTreeViewColumn *column;
GtkCellRenderer *cell;
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
g_return_if_fail (listview != NULL);
g_return_if_fail (sel_format != NULL);
@@ -636,7 +636,7 @@ updated_custom_format_example (GtkEntry *format_entry,
gchar *str;
gchar *escaped_time;
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
g_return_if_fail (GTK_IS_ENTRY (format_entry));
g_return_if_fail (GTK_IS_LABEL (format_example));
@@ -659,7 +659,7 @@ static void
choose_format_dialog_button_toggled (GtkToggleButton *button,
ChooseFormatDialog *dialog)
{
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->custom)))
{
@@ -683,7 +683,7 @@ choose_format_dialog_button_toggled (GtkToggleButton *button,
static void
configure_dialog_button_toggled (GtkToggleButton *button, TimeConfigureDialog *dialog)
{
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->custom)))
{
@@ -720,7 +720,7 @@ get_format_from_list (GtkWidget *listview)
GtkTreeSelection *selection;
GtkTreeIter iter;
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
model = gtk_tree_view_get_model (GTK_TREE_VIEW (listview));
g_return_val_if_fail (model != NULL, 0);
@@ -734,7 +734,7 @@ get_format_from_list (GtkWidget *listview)
gtk_tree_model_get (model, &iter, COLUMN_INDEX, &selected_value, -1);
- gedit_debug_message (DEBUG_PLUGINS, "Sel value: %d", selected_value);
+ pluma_debug_message (DEBUG_PLUGINS, "Sel value: %d", selected_value);
return selected_value;
}
@@ -743,14 +743,14 @@ get_format_from_list (GtkWidget *listview)
}
static TimeConfigureDialog *
-get_configure_dialog (GeditTimePlugin *plugin)
+get_configure_dialog (PlumaTimePlugin *plugin)
{
TimeConfigureDialog *dialog = NULL;
gchar *data_dir;
gchar *ui_file;
GtkWidget *content;
GtkWidget *viewport;
- GeditTimePluginPromptType prompt_type;
+ PlumaTimePluginPromptType prompt_type;
gchar *sf, *cf;
GtkWidget *error_widget;
gboolean ret;
@@ -759,7 +759,7 @@ get_configure_dialog (GeditTimePlugin *plugin)
NULL
};
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
dialog = g_new0 (TimeConfigureDialog, 1);
@@ -784,9 +784,9 @@ get_configure_dialog (GeditTimePlugin *plugin)
g_return_val_if_fail (dialog->dialog != NULL, NULL);
- data_dir = gedit_plugin_get_data_dir (GEDIT_PLUGIN (plugin));
- ui_file = g_build_filename (data_dir, "gedit-time-setup-dialog.ui", NULL);
- ret = gedit_utils_get_ui_objects (ui_file,
+ data_dir = pluma_plugin_get_data_dir (PLUMA_PLUGIN (plugin));
+ ui_file = g_build_filename (data_dir, "pluma-time-setup-dialog.ui", NULL);
+ ret = pluma_utils_get_ui_objects (ui_file,
root_objects,
&error_widget,
"time_dialog_content", &content,
@@ -894,7 +894,7 @@ static void
real_insert_time (GtkTextBuffer *buffer,
const gchar *the_time)
{
- gedit_debug_message (DEBUG_PLUGINS, "Insert: %s", the_time);
+ pluma_debug_message (DEBUG_PLUGINS, "Insert: %s", the_time);
gtk_text_buffer_begin_user_action (buffer);
@@ -928,8 +928,8 @@ choose_format_dialog_row_activated (GtkTreeView *list,
static ChooseFormatDialog *
get_choose_format_dialog (GtkWindow *parent,
- GeditTimePluginPromptType prompt_type,
- GeditTimePlugin *plugin)
+ PlumaTimePluginPromptType prompt_type,
+ PlumaTimePlugin *plugin)
{
ChooseFormatDialog *dialog;
gchar *data_dir;
@@ -944,9 +944,9 @@ get_choose_format_dialog (GtkWindow *parent,
dialog = g_new0 (ChooseFormatDialog, 1);
- data_dir = gedit_plugin_get_data_dir (GEDIT_PLUGIN (plugin));
- ui_file = g_build_filename (data_dir, "gedit-time-dialog.ui", NULL);
- ret = gedit_utils_get_ui_objects (ui_file,
+ data_dir = pluma_plugin_get_data_dir (PLUMA_PLUGIN (plugin));
+ ui_file = g_build_filename (data_dir, "pluma-time-dialog.ui", NULL);
+ ret = pluma_utils_get_ui_objects (ui_file,
NULL,
&error_widget,
"choose_format_dialog", &dialog->dialog,
@@ -1068,17 +1068,17 @@ choose_format_dialog_response_cb (GtkWidget *widget,
{
case GTK_RESPONSE_HELP:
{
- gedit_debug_message (DEBUG_PLUGINS, "GTK_RESPONSE_HELP");
- gedit_help_display (GTK_WINDOW (widget),
+ pluma_debug_message (DEBUG_PLUGINS, "GTK_RESPONSE_HELP");
+ pluma_help_display (GTK_WINDOW (widget),
NULL,
- "gedit-insert-date-time-plugin");
+ "pluma-insert-date-time-plugin");
break;
}
case GTK_RESPONSE_OK:
{
gchar *the_time;
- gedit_debug_message (DEBUG_PLUGINS, "GTK_RESPONSE_OK");
+ pluma_debug_message (DEBUG_PLUGINS, "GTK_RESPONSE_OK");
/* Get the user's chosen format */
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->use_list)))
@@ -1111,7 +1111,7 @@ choose_format_dialog_response_cb (GtkWidget *widget,
break;
}
case GTK_RESPONSE_CANCEL:
- gedit_debug_message (DEBUG_PLUGINS, "GTK_RESPONSE_CANCEL");
+ pluma_debug_message (DEBUG_PLUGINS, "GTK_RESPONSE_CANCEL");
gtk_widget_destroy (dialog->dialog);
}
}
@@ -1122,11 +1122,11 @@ time_cb (GtkAction *action,
{
GtkTextBuffer *buffer;
gchar *the_time = NULL;
- GeditTimePluginPromptType prompt_type;
+ PlumaTimePluginPromptType prompt_type;
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
- buffer = GTK_TEXT_BUFFER (gedit_window_get_active_document (data->window));
+ buffer = GTK_TEXT_BUFFER (pluma_window_get_active_document (data->window));
g_return_if_fail (buffer != NULL);
prompt_type = get_prompt_type (data->plugin);
@@ -1179,7 +1179,7 @@ ok_button_pressed (TimeConfigureDialog *dialog)
gint sel_format;
const gchar *custom_format;
- gedit_debug (DEBUG_PLUGINS);
+ pluma_debug (DEBUG_PLUGINS);
sel_format = get_format_from_list (dialog->list);
@@ -1201,7 +1201,7 @@ ok_button_pressed (TimeConfigureDialog *dialog)
set_prompt_type (dialog->plugin, PROMPT_SELECTED_FORMAT);
}
- gedit_debug_message (DEBUG_PLUGINS, "Sel: %d", sel_format);
+ pluma_debug_message (DEBUG_PLUGINS, "Sel: %d", sel_format);
}
static void
@@ -1213,16 +1213,16 @@ configure_dialog_response_cb (GtkWidget *widget,
{
case GTK_RESPONSE_HELP:
{
- gedit_debug_message (DEBUG_PLUGINS, "GTK_RESPONSE_HELP");
+ pluma_debug_message (DEBUG_PLUGINS, "GTK_RESPONSE_HELP");
- gedit_help_display (GTK_WINDOW (dialog),
+ pluma_help_display (GTK_WINDOW (dialog),
NULL,
- "gedit-date-time-configure");
+ "pluma-date-time-configure");
break;
}
case GTK_RESPONSE_OK:
{
- gedit_debug_message (DEBUG_PLUGINS, "GTK_RESPONSE_OK");
+ pluma_debug_message (DEBUG_PLUGINS, "GTK_RESPONSE_OK");
ok_button_pressed (dialog);
@@ -1231,20 +1231,20 @@ configure_dialog_response_cb (GtkWidget *widget,
}
case GTK_RESPONSE_CANCEL:
{
- gedit_debug_message (DEBUG_PLUGINS, "GTK_RESPONSE_CANCEL");
+ pluma_debug_message (DEBUG_PLUGINS, "GTK_RESPONSE_CANCEL");
gtk_widget_destroy (dialog->dialog);
}
}
}
static GtkWidget *
-impl_create_configure_dialog (GeditPlugin *plugin)
+impl_create_configure_dialog (PlumaPlugin *plugin)
{
TimeConfigureDialog *dialog;
- dialog = get_configure_dialog (GEDIT_TIME_PLUGIN (plugin));
+ dialog = get_configure_dialog (PLUMA_TIME_PLUGIN (plugin));
- dialog->plugin = GEDIT_TIME_PLUGIN (plugin);
+ dialog->plugin = PLUMA_TIME_PLUGIN (plugin);
g_signal_connect (dialog->dialog,
"response",
@@ -1255,12 +1255,12 @@ impl_create_configure_dialog (GeditPlugin *plugin)
}
static void
-gedit_time_plugin_class_init (GeditTimePluginClass *klass)
+pluma_time_plugin_class_init (PlumaTimePluginClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GeditPluginClass *plugin_class = GEDIT_PLUGIN_CLASS (klass);
+ PlumaPluginClass *plugin_class = PLUMA_PLUGIN_CLASS (klass);
- object_class->finalize = gedit_time_plugin_finalize;
+ object_class->finalize = pluma_time_plugin_finalize;
plugin_class->activate = impl_activate;
plugin_class->deactivate = impl_deactivate;
@@ -1268,5 +1268,5 @@ gedit_time_plugin_class_init (GeditTimePluginClass *klass)
plugin_class->create_configure_dialog = impl_create_configure_dialog;
- g_type_class_add_private (object_class, sizeof (GeditTimePluginPrivate));
+ g_type_class_add_private (object_class, sizeof (PlumaTimePluginPrivate));
}
diff --git a/plugins/time/pluma-time-plugin.h b/plugins/time/pluma-time-plugin.h
new file mode 100755
index 00000000..e7b66909
--- /dev/null
+++ b/plugins/time/pluma-time-plugin.h
@@ -0,0 +1,78 @@
+/*
+ * pluma-time-plugin.h
+ *
+ * Copyright (C) 2002-2005 - Paolo Maggi
+ *
+ * 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 2, 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
+ * MERCHANTABILITY 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
+ */
+
+#ifndef __PLUMA_TIME_PLUGIN_H__
+#define __PLUMA_TIME_PLUGIN_H__
+
+#include <glib.h>
+#include <glib-object.h>
+#include <pluma/pluma-plugin.h>
+
+G_BEGIN_DECLS
+
+/*
+ * Type checking and casting macros
+ */
+#define PLUMA_TYPE_TIME_PLUGIN (pluma_time_plugin_get_type ())
+#define PLUMA_TIME_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PLUMA_TYPE_TIME_PLUGIN, PlumaTimePlugin))
+#define PLUMA_TIME_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PLUMA_TYPE_TIME_PLUGIN, PlumaTimePluginClass))
+#define PLUMA_IS_TIME_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PLUMA_TYPE_TIME_PLUGIN))
+#define PLUMA_IS_TIME_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PLUMA_TYPE_TIME_PLUGIN))
+#define PLUMA_TIME_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PLUMA_TYPE_TIME_PLUGIN, PlumaTimePluginClass))
+
+/* Private structure type */
+typedef struct _PlumaTimePluginPrivate PlumaTimePluginPrivate;
+
+/*
+ * Main object structure
+ */
+typedef struct _PlumaTimePlugin PlumaTimePlugin;
+
+struct _PlumaTimePlugin
+{
+ PlumaPlugin parent_instance;
+
+ /*< private >*/
+ PlumaTimePluginPrivate *priv;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _PlumaTimePluginClass PlumaTimePluginClass;
+
+struct _PlumaTimePluginClass
+{
+ PlumaPluginClass parent_class;
+};
+
+/*
+ * Public methods
+ */
+GType pluma_time_plugin_get_type (void) G_GNUC_CONST;
+
+/* All the plugins must implement this function */
+G_MODULE_EXPORT GType register_pluma_plugin (GTypeModule *module);
+
+G_END_DECLS
+
+#endif /* __PLUMA_TIME_PLUGIN_H__ */
diff --git a/plugins/time/gedit-time-setup-dialog.ui b/plugins/time/pluma-time-setup-dialog.ui
index 46fb5b9d..46fb5b9d 100755
--- a/plugins/time/gedit-time-setup-dialog.ui
+++ b/plugins/time/pluma-time-setup-dialog.ui
diff --git a/plugins/time/time.gedit-plugin.desktop.in b/plugins/time/time.pluma-plugin.desktop.in
index ba06854a..a6dbc791 100755
--- a/plugins/time/time.gedit-plugin.desktop.in
+++ b/plugins/time/time.pluma-plugin.desktop.in
@@ -1,8 +1,8 @@
-[Gedit Plugin]
+[Pluma Plugin]
Module=time
IAge=2
_Name=Insert Date/Time
_Description=Inserts current date and time at the cursor position.
Authors=Paolo Maggi <[email protected]>;Lee Mallabone <[email protected]>
Copyright=Copyright © 2002-2005 Paolo Maggi
-Website=http://www.gedit.org
+Website=http://www.pluma.org