[evolution/wip/webkit-composer] Rename EEditorLinkDialog to EHTMLEditorLinkDialog



commit e218275b9ecc8f556fe68e1ff0e9c3522f3b9449
Author: Tomas Popela <tpopela redhat com>
Date:   Mon Mar 31 11:26:28 2014 +0200

    Rename EEditorLinkDialog to EHTMLEditorLinkDialog

 .../evolution-util/evolution-util-docs.sgml        |    2 +-
 .../evolution-util/evolution-util-sections.txt     |   28 ++++----
 doc/reference/evolution-util/evolution-util.types  |    2 +-
 e-util/Makefile.am                                 |    4 +-
 e-util/e-editor-link-dialog.h                      |   69 -------------------
 e-util/e-html-editor-actions.c                     |    4 +-
 ...r-link-dialog.c => e-html-editor-link-dialog.c} |   64 +++++++++---------
 e-util/e-html-editor-link-dialog.h                 |   70 ++++++++++++++++++++
 e-util/e-html-editor-private.h                     |    2 +-
 e-util/e-util.h                                    |    2 +-
 10 files changed, 124 insertions(+), 123 deletions(-)
---
diff --git a/doc/reference/evolution-util/evolution-util-docs.sgml 
b/doc/reference/evolution-util/evolution-util-docs.sgml
index b7b08a3..3f77e4f 100644
--- a/doc/reference/evolution-util/evolution-util-docs.sgml
+++ b/doc/reference/evolution-util/evolution-util-docs.sgml
@@ -100,7 +100,6 @@
 
   <chapter>
     <title>HTML Editing</title>
-    <xi:include href="xml/e-editor-link-dialog.xml"/>
     <xi:include href="xml/e-editor-page-dialog.xml"/>
     <xi:include href="xml/e-editor-paragraph-dialog.xml"/>
     <xi:include href="xml/e-editor-replace-dialog.xml"/>
@@ -120,6 +119,7 @@
     <xi:include href="xml/e-html-editor-find-dialog.xml"/>
     <xi:include href="xml/e-html-editor-hrule-dialog.xml"/>
     <xi:include href="xml/e-html-editor-image-dialog.xml"/>
+    <xi:include href="xml/e-html-editor-link-dialog.xml"/>
     <xi:include href="xml/e-html-editor-selection.xml"/>
     <xi:include href="xml/e-html-editor-widget.xml"/>
     <xi:include href="xml/e-image-chooser-dialog.xml"/>
diff --git a/doc/reference/evolution-util/evolution-util-sections.txt 
b/doc/reference/evolution-util/evolution-util-sections.txt
index 694fd65..822e315 100644
--- a/doc/reference/evolution-util/evolution-util-sections.txt
+++ b/doc/reference/evolution-util/evolution-util-sections.txt
@@ -1691,21 +1691,21 @@ EHTMLEditorImageDialogPrivate
 </SECTION>
 
 <SECTION>
-<FILE>e-editor-link-dialog</FILE>
-<TITLE>EEditorLinkDialog</TITLE>
-EEditorLinkDialog
-e_editor_link_dialog_new
-<SUBSECTION Standard>
-E_EDITOR_LINK_DIALOG
-E_IS_EDITOR_LINK_DIALOG
-E_TYPE_EDITOR_LINK_DIALOG
-E_EDITOR_LINK_DIALOG_CLASS
-E_IS_EDITOR_LINK_DIALOG_CLASS
-E_EDITOR_LINK_DIALOG_GET_CLASS
-EEditorLinkDialogClass
-e_editor_link_dialog_get_type
-<SUBSECTION Private>
-EEditorLinkDialogPrivate
+<FILE>e-html-editor-link-dialog</FILE>
+<TITLE>EHTMLEditorLinkDialog</TITLE>
+EHTMLEditorLinkDialog
+e_html_editor_link_dialog_new
+<SUBSECTION Standard>
+E_HTML_EDITOR_LINK_DIALOG
+E_IS_HTML_EDITOR_LINK_DIALOG
+E_TYPE_HTML_EDITOR_LINK_DIALOG
+E_HTML_EDITOR_LINK_DIALOG_CLASS
+E_IS_HTML_EDITOR_LINK_DIALOG_CLASS
+E_HTML_EDITOR_LINK_DIALOG_GET_CLASS
+EHTMLEditorLinkDialogClass
+e_html_editor_link_dialog_get_type
+<SUBSECTION Private>
+EHTMLEditorLinkDialogPrivate
 </SECTION>
 
 <SECTION>
diff --git a/doc/reference/evolution-util/evolution-util.types 
b/doc/reference/evolution-util/evolution-util.types
index 9e49ed2..6881cf0 100644
--- a/doc/reference/evolution-util/evolution-util.types
+++ b/doc/reference/evolution-util/evolution-util.types
@@ -63,7 +63,6 @@ e_contact_store_get_type
 e_data_capture_get_type
 e_date_edit_get_type
 e_destination_store_get_type
-e_editor_link_dialog_get_type
 e_editor_page_dialog_get_type
 e_editor_paragraph_dialog_get_type
 e_editor_replace_dialog_get_type
@@ -76,6 +75,7 @@ e_html_editor_dialog_get_type
 e_html_editor_find_dialog_get_type
 e_html_editor_hrule_dialog_get_type
 e_html_editor_image_dialog_get_type
+e_html_editor_link_dialog_get_type
 e_html_editor_selection_get_type
 e_html_editor_view_get_type
 e_emoticon_action_get_type
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index 7902078..54a41a7 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -176,7 +176,6 @@ evolution_util_include_HEADERS =  \
        e-destination-store.h \
        e-dialog-utils.h \
        e-dialog-widgets.h \
-       e-editor-link-dialog.h \
        e-editor-page-dialog.h \
        e-editor-paragraph-dialog.h \
        e-editor-replace-dialog.h \
@@ -208,6 +207,7 @@ evolution_util_include_HEADERS =  \
        e-html-editor-find-dialog.h \
        e-html-editor-hrule-dialog.h \
        e-html-editor-image-dialog.h \
+       e-html-editor-link-dialog.h \
        e-html-editor-selection.h \
        e-html-editor-utils.h \
        e-html-editor-view.h \
@@ -447,7 +447,6 @@ libevolution_util_la_SOURCES = \
        e-destination-store.c \
        e-dialog-utils.c \
        e-dialog-widgets.c \
-       e-editor-link-dialog.c \
        e-editor-page-dialog.c \
        e-editor-paragraph-dialog.c \
        e-editor-replace-dialog.c \
@@ -479,6 +478,7 @@ libevolution_util_la_SOURCES = \
        e-html-editor-find-dialog.c \
        e-html-editor-hrule-dialog.c \
        e-html-editor-image-dialog.c \
+       e-html-editor-link-dialog.c \
        e-html-editor-private.h \
        e-html-editor-selection.c \
        e-html-editor-utils.c \
diff --git a/e-util/e-html-editor-actions.c b/e-util/e-html-editor-actions.c
index 7024708..5cfbd4e 100644
--- a/e-util/e-html-editor-actions.c
+++ b/e-util/e-html-editor-actions.c
@@ -525,7 +525,7 @@ action_insert_link_cb (GtkAction *action,
 {
        if (editor->priv->link_dialog == NULL)
                editor->priv->link_dialog =
-                       e_editor_link_dialog_new (editor);
+                       e_html_editor_link_dialog_new (editor);
 
        gtk_window_present (GTK_WINDOW (editor->priv->link_dialog));
 }
@@ -750,7 +750,7 @@ action_properties_link_cb (GtkAction *action,
 {
        if (editor->priv->link_dialog == NULL) {
                editor->priv->link_dialog =
-                       e_editor_link_dialog_new (editor);
+                       e_html_editor_link_dialog_new (editor);
        }
 
        gtk_window_present (GTK_WINDOW (editor->priv->link_dialog));
diff --git a/e-util/e-editor-link-dialog.c b/e-util/e-html-editor-link-dialog.c
similarity index 84%
rename from e-util/e-editor-link-dialog.c
rename to e-util/e-html-editor-link-dialog.c
index f3d2c47..b6aa0f9 100644
--- a/e-util/e-editor-link-dialog.c
+++ b/e-util/e-html-editor-link-dialog.c
@@ -1,5 +1,5 @@
 /*
- * e-editor-link-dialog.h
+ * e-html-editor-link-dialog.h
  *
  * Copyright (C) 2012 Dan Vrátil <dvratil redhat com>
  *
@@ -22,23 +22,23 @@
 #include <config.h>
 #endif
 
-#include "e-editor-link-dialog.h"
+#include "e-html-editor-link-dialog.h"
 #include "e-html-editor-selection.h"
 #include "e-html-editor-utils.h"
 #include "e-html-editor-view.h"
 
 #include <glib/gi18n-lib.h>
 
-#define E_EDITOR_LINK_DIALOG_GET_PRIVATE(obj) \
+#define E_HTML_EDITOR_LINK_DIALOG_GET_PRIVATE(obj) \
        (G_TYPE_INSTANCE_GET_PRIVATE \
-       ((obj), E_TYPE_EDITOR_LINK_DIALOG, EEditorLinkDialogPrivate))
+       ((obj), E_TYPE_HTML_EDITOR_LINK_DIALOG, EHTMLEditorLinkDialogPrivate))
 
 G_DEFINE_TYPE (
-       EEditorLinkDialog,
-       e_editor_link_dialog,
+       EHTMLEditorLinkDialog,
+       e_html_editor_link_dialog,
        E_TYPE_HTML_EDITOR_DIALOG);
 
-struct _EEditorLinkDialogPrivate {
+struct _EHTMLEditorLinkDialogPrivate {
        GtkWidget *url_edit;
        GtkWidget *label_edit;
        GtkWidget *test_button;
@@ -50,7 +50,7 @@ struct _EEditorLinkDialogPrivate {
 };
 
 static void
-editor_link_dialog_test_link (EEditorLinkDialog *dialog)
+html_editor_link_dialog_test_link (EHTMLEditorLinkDialog *dialog)
 {
        gtk_show_uri (
                gtk_window_get_screen (GTK_WINDOW (dialog)),
@@ -60,7 +60,7 @@ editor_link_dialog_test_link (EEditorLinkDialog *dialog)
 }
 
 static void
-editor_link_dialog_url_changed (EEditorLinkDialog *dialog)
+html_editor_link_dialog_url_changed (EHTMLEditorLinkDialog *dialog)
 {
        if (dialog->priv->label_autofill &&
            gtk_widget_is_sensitive (dialog->priv->label_edit)) {
@@ -74,7 +74,7 @@ editor_link_dialog_url_changed (EEditorLinkDialog *dialog)
 }
 
 static gboolean
-editor_link_dialog_description_changed (EEditorLinkDialog *dialog)
+html_editor_link_dialog_description_changed (EHTMLEditorLinkDialog *dialog)
 {
        const gchar *text;
 
@@ -85,7 +85,7 @@ editor_link_dialog_description_changed (EEditorLinkDialog *dialog)
 }
 
 static void
-editor_link_dialog_remove_link (EEditorLinkDialog *dialog)
+html_editor_link_dialog_remove_link (EHTMLEditorLinkDialog *dialog)
 {
        EHTMLEditor *editor;
        EHTMLEditorView *view;
@@ -100,7 +100,7 @@ editor_link_dialog_remove_link (EEditorLinkDialog *dialog)
 }
 
 static void
-editor_link_dialog_ok (EEditorLinkDialog *dialog)
+html_editor_link_dialog_ok (EHTMLEditorLinkDialog *dialog)
 {
        EHTMLEditor *editor;
        EHTMLEditorView *view;
@@ -196,13 +196,13 @@ editor_link_dialog_ok (EEditorLinkDialog *dialog)
 }
 
 static gboolean
-editor_link_dialog_entry_key_pressed (EEditorLinkDialog *dialog,
+html_editor_link_dialog_entry_key_pressed (EHTMLEditorLinkDialog *dialog,
                                       GdkEventKey *event)
 {
        /* We can't do thins in key_released, because then you could not open
         * this dialog from main menu by pressing enter on Insert->Link action */
        if (event->keyval == GDK_KEY_Return) {
-               editor_link_dialog_ok (dialog);
+               html_editor_link_dialog_ok (dialog);
                return TRUE;
        }
 
@@ -210,18 +210,18 @@ editor_link_dialog_entry_key_pressed (EEditorLinkDialog *dialog,
 }
 
 static void
-editor_link_dialog_show (GtkWidget *widget)
+html_editor_link_dialog_show (GtkWidget *widget)
 {
        EHTMLEditor *editor;
        EHTMLEditorView *view;
-       EEditorLinkDialog *dialog;
+       EHTMLEditorLinkDialog *dialog;
        WebKitDOMDocument *document;
        WebKitDOMDOMWindow *window;
        WebKitDOMDOMSelection *dom_selection;
        WebKitDOMRange *range;
        WebKitDOMElement *link;
 
-       dialog = E_EDITOR_LINK_DIALOG (widget);
+       dialog = E_HTML_EDITOR_LINK_DIALOG (widget);
        editor = e_html_editor_dialog_get_editor (E_HTML_EDITOR_DIALOG (dialog));
        view = e_html_editor_get_view (editor);
 
@@ -296,28 +296,28 @@ editor_link_dialog_show (GtkWidget *widget)
 
  chainup:
        /* Chain up to parent implementation */
-       GTK_WIDGET_CLASS (e_editor_link_dialog_parent_class)->show (widget);
+       GTK_WIDGET_CLASS (e_html_editor_link_dialog_parent_class)->show (widget);
 }
 
 static void
-e_editor_link_dialog_class_init (EEditorLinkDialogClass *class)
+e_html_editor_link_dialog_class_init (EHTMLEditorLinkDialogClass *class)
 {
        GtkWidgetClass *widget_class;
 
-       g_type_class_add_private (class, sizeof (EEditorLinkDialogPrivate));
+       g_type_class_add_private (class, sizeof (EHTMLEditorLinkDialogPrivate));
 
        widget_class = GTK_WIDGET_CLASS (class);
-       widget_class->show = editor_link_dialog_show;
+       widget_class->show = html_editor_link_dialog_show;
 }
 
 static void
-e_editor_link_dialog_init (EEditorLinkDialog *dialog)
+e_html_editor_link_dialog_init (EHTMLEditorLinkDialog *dialog)
 {
        GtkGrid *main_layout;
        GtkBox *button_box;
        GtkWidget *widget;
 
-       dialog->priv = E_EDITOR_LINK_DIALOG_GET_PRIVATE (dialog);
+       dialog->priv = E_HTML_EDITOR_LINK_DIALOG_GET_PRIVATE (dialog);
 
        main_layout = e_html_editor_dialog_get_container (E_HTML_EDITOR_DIALOG (dialog));
 
@@ -325,10 +325,10 @@ e_editor_link_dialog_init (EEditorLinkDialog *dialog)
        gtk_grid_attach (main_layout, widget, 1, 0, 1, 1);
        g_signal_connect_swapped (
                widget, "notify::text",
-               G_CALLBACK (editor_link_dialog_url_changed), dialog);
+               G_CALLBACK (html_editor_link_dialog_url_changed), dialog);
        g_signal_connect_swapped (
                widget, "key-press-event",
-               G_CALLBACK (editor_link_dialog_entry_key_pressed), dialog);
+               G_CALLBACK (html_editor_link_dialog_entry_key_pressed), dialog);
        dialog->priv->url_edit = widget;
 
        widget = gtk_label_new_with_mnemonic (_("_URL:"));
@@ -340,17 +340,17 @@ e_editor_link_dialog_init (EEditorLinkDialog *dialog)
        gtk_grid_attach (main_layout, widget, 2, 0, 1, 1);
        g_signal_connect_swapped (
                widget, "clicked",
-               G_CALLBACK (editor_link_dialog_test_link), dialog);
+               G_CALLBACK (html_editor_link_dialog_test_link), dialog);
        dialog->priv->test_button = widget;
 
        widget = gtk_entry_new ();
        gtk_grid_attach (main_layout, widget, 1, 1, 2, 1);
        g_signal_connect_swapped (
                widget, "key-release-event",
-               G_CALLBACK (editor_link_dialog_description_changed), dialog);
+               G_CALLBACK (html_editor_link_dialog_description_changed), dialog);
        g_signal_connect_swapped (
                widget, "key-press-event",
-               G_CALLBACK (editor_link_dialog_entry_key_pressed), dialog);
+               G_CALLBACK (html_editor_link_dialog_entry_key_pressed), dialog);
        dialog->priv->label_edit = widget;
 
        widget = gtk_label_new_with_mnemonic (_("_Description:"));
@@ -363,14 +363,14 @@ e_editor_link_dialog_init (EEditorLinkDialog *dialog)
        widget = gtk_button_new_with_mnemonic (_("_Remove Link"));
        g_signal_connect_swapped (
                widget, "clicked",
-               G_CALLBACK (editor_link_dialog_remove_link), dialog);
+               G_CALLBACK (html_editor_link_dialog_remove_link), dialog);
        gtk_box_pack_start (button_box, widget, FALSE, FALSE, 5);
        dialog->priv->remove_link_button = widget;
 
        widget = gtk_button_new_from_stock (GTK_STOCK_OK);
        g_signal_connect_swapped (
                widget, "clicked",
-               G_CALLBACK (editor_link_dialog_ok), dialog);
+               G_CALLBACK (html_editor_link_dialog_ok), dialog);
        gtk_box_pack_end (button_box, widget, FALSE, FALSE, 5);
        dialog->priv->ok_button = widget;
 
@@ -378,11 +378,11 @@ e_editor_link_dialog_init (EEditorLinkDialog *dialog)
 }
 
 GtkWidget *
-e_editor_link_dialog_new (EHTMLEditor *editor)
+e_html_editor_link_dialog_new (EHTMLEditor *editor)
 {
        return GTK_WIDGET (
                g_object_new (
-                       E_TYPE_EDITOR_LINK_DIALOG,
+                       E_TYPE_HTML_EDITOR_LINK_DIALOG,
                        "editor", editor,
                        "icon-name", "insert-link",
                        "title", N_("Link Properties"),
diff --git a/e-util/e-html-editor-link-dialog.h b/e-util/e-html-editor-link-dialog.h
new file mode 100644
index 0000000..a1e426f
--- /dev/null
+++ b/e-util/e-html-editor-link-dialog.h
@@ -0,0 +1,70 @@
+/*
+ * e-html-editor-link-dialog.h
+ *
+ * Copyright (C) 2012 Dan Vrátil <dvratil redhat com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
+#error "Only <e-util/e-util.h> should be included directly."
+#endif
+
+#ifndef E_HTML_EDITOR_LINK_DIALOG_H
+#define E_HTML_EDITOR_LINK_DIALOG_H
+
+#include <e-util/e-html-editor-dialog.h>
+
+/* Standard GObject macros */
+#define E_TYPE_HTML_EDITOR_LINK_DIALOG \
+       (e_html_editor_link_dialog_get_type ())
+#define E_HTML_EDITOR_LINK_DIALOG(obj) \
+       (G_TYPE_CHECK_INSTANCE_CAST \
+       ((obj), E_TYPE_HTML_EDITOR_LINK_DIALOG, EHTMLEditorLinkDialog))
+#define E_HTML_EDITOR_LINK_DIALOG_CLASS(cls) \
+       (G_TYPE_CHECK_CLASS_CAST \
+       ((cls), E_TYPE_HTML_EDITOR_LINK_DIALOG, EHTMLEditorLinkDialogClass))
+#define E_IS_HTML_EDITOR_LINK_DIALOG(obj) \
+       (G_TYPE_CHECK_INSTANCE_TYPE \
+       ((obj), E_TYPE_HTML_EDITOR_LINK_DIALOG))
+#define E_IS_HTML_EDITOR_LINK_DIALOG_CLASS(cls) \
+       (G_TYPE_CHECK_CLASS_TYPE \
+       ((cls), E_TYPE_HTML_EDITOR_LINK_DIALOG))
+#define E_HTML_EDITOR_LINK_DIALOG_GET_CLASS(obj) \
+       (G_TYPE_INSTANCE_GET_CLASS \
+       ((obj), E_TYPE_HTML_EDITOR_LINK_DIALOG, EHTMLEditorLinkDialogClass))
+
+G_BEGIN_DECLS
+
+typedef struct _EHTMLEditorLinkDialog EHTMLEditorLinkDialog;
+typedef struct _EHTMLEditorLinkDialogClass EHTMLEditorLinkDialogClass;
+typedef struct _EHTMLEditorLinkDialogPrivate EHTMLEditorLinkDialogPrivate;
+
+struct _EHTMLEditorLinkDialog {
+       EHTMLEditorDialog parent;
+       EHTMLEditorLinkDialogPrivate *priv;
+};
+
+struct _EHTMLEditorLinkDialogClass {
+       EHTMLEditorDialogClass parent_class;
+};
+
+GType          e_html_editor_link_dialog_get_type
+                                               (void) G_GNUC_CONST;
+GtkWidget *    e_html_editor_link_dialog_new   (EHTMLEditor *editor);
+
+G_END_DECLS
+
+#endif /* E_HTML_EDITOR_LINK_DIALOG_H */
diff --git a/e-util/e-html-editor-private.h b/e-util/e-html-editor-private.h
index 80c3e9b..87e5186 100644
--- a/e-util/e-html-editor-private.h
+++ b/e-util/e-html-editor-private.h
@@ -29,9 +29,9 @@
 #include <e-html-editor-find-dialog.h>
 #include <e-html-editor-hrule-dialog.h>
 #include <e-html-editor-image-dialog.h>
+#include <e-html-editor-link-dialog.h>
 #include <e-html-editor-view.h>
 #include <e-editor-replace-dialog.h>
-#include <e-editor-link-dialog.h>
 #include <e-editor-table-dialog.h>
 #include <e-editor-page-dialog.h>
 #include <e-editor-text-dialog.h>
diff --git a/e-util/e-util.h b/e-util/e-util.h
index fc6b8ee..dcb23a0 100644
--- a/e-util/e-util.h
+++ b/e-util/e-util.h
@@ -91,7 +91,6 @@
 #include <e-util/e-destination-store.h>
 #include <e-util/e-dialog-utils.h>
 #include <e-util/e-dialog-widgets.h>
-#include <e-util/e-editor-link-dialog.h>
 #include <e-util/e-editor-page-dialog.h>
 #include <e-util/e-editor-paragraph-dialog.h>
 #include <e-util/e-editor-replace-dialog.h>
@@ -123,6 +122,7 @@
 #include <e-util/e-html-editor-find-dialog.h>
 #include <e-util/e-html-editor-hrule-dialog.h>
 #include <e-util/e-html-editor-image-dialog.h>
+#include <e-util/e-html-editor-link-dialog.h>
 #include <e-util/e-html-editor-selection.h>
 #include <e-util/e-html-editor-utils.h>
 #include <e-util/e-html-editor-view.h>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]