[evolution/wip/webkit-composer: 539/966] Make horizontal rule dialog work



commit 75e4848efdacdba83c5c505acda628853cd62d24
Author: Dan Vrátil <dvratil redhat com>
Date:   Tue Aug 7 16:38:51 2012 +0200

    Make horizontal rule dialog work
    
    The dialog is represented by EEditorHRuleDialog class which
    implements all the functionality.

 e-util/Makefile.am             |    2 +
 e-util/e-editor-actions.c      |   20 +-
 e-util/e-editor-actions.h      |    8 -
 e-util/e-editor-builder.ui     |  418 ----------------------------------------
 e-util/e-editor-hrule-dialog.c |  146 ++++++++++++++
 e-util/e-editor-hrule-dialog.h |   13 ++
 e-util/e-editor-link-dialog.c  |   59 ++----
 e-util/e-editor-private.h      |    2 +
 e-util/e-editor-utils.c        |   98 ----------
 e-util/e-editor-utils.h        |    4 +
 e-util/e-editor-widgets.h      |   24 ---
 e-util/e-util.h                |    1 +
 12 files changed, 195 insertions(+), 600 deletions(-)
---
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index 996c8fe..666f326 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -182,6 +182,7 @@ evolution_util_include_HEADERS =  \
        e-editor-actions.h \
        e-editor-dialog.h \
        e-editor-find-dialog.h \
+       e-editor-hrule-dialog.h \
        e-editor-link-dialog.h \
        e-editor-replace-dialog.h \
        e-editor-selection.h \
@@ -446,6 +447,7 @@ libevolution_util_la_SOURCES = \
        e-editor-actions.c \
        e-editor-dialog.c \
        e-editor-find-dialog.c \
+       e-editor-hrule-dialog.c \
        e-editor-link-dialog.c \
        e-editor-private.h \
        e-editor-replace-dialog.c \
diff --git a/e-util/e-editor-actions.c b/e-util/e-editor-actions.c
index adb40e2..b6f6c2f 100644
--- a/e-util/e-editor-actions.c
+++ b/e-util/e-editor-actions.c
@@ -685,15 +685,12 @@ static void
 action_insert_rule_cb (GtkAction *action,
                        EEditor *editor)
 {
-       WebKitDOMDocument *document;
-
-       document = webkit_web_view_get_dom_document (
-                       WEBKIT_WEB_VIEW (e_editor_get_editor_widget (editor)));
-       webkit_dom_document_exec_command (
-               document, "insertHorizontalRule", FALSE, "");
+       if (editor->priv->hrule_dialog == NULL) {
+               editor->priv->hrule_dialog =
+                       e_editor_hrule_dialog_new (editor);
+       }
 
-       /* FIXME WEBKIT - does the action work? */
-       gtk_action_activate (ACTION (PROPERTIES_RULE));
+       gtk_window_present (GTK_WINDOW (editor->priv->hrule_dialog));
 }
 
 static void
@@ -995,7 +992,12 @@ static void
 action_properties_rule_cb (GtkAction *action,
                            EEditor *editor)
 {
-       gtk_window_present (GTK_WINDOW (WIDGET (RULE_PROPERTIES_WINDOW)));
+       if (editor->priv->hrule_dialog == NULL) {
+               editor->priv->hrule_dialog =
+                       e_editor_hrule_dialog_new (editor);
+       }
+
+       gtk_window_present (GTK_WINDOW (editor->priv->hrule_dialog));
 }
 
 static void
diff --git a/e-util/e-editor-actions.h b/e-util/e-editor-actions.h
index 60c92f5..e88a6a2 100644
--- a/e-util/e-editor-actions.h
+++ b/e-util/e-editor-actions.h
@@ -26,14 +26,6 @@
 
 #define E_EDITOR_ACTION_BOLD(editor) \
        E_EDITOR_ACTION ((editor), "bold")
-#define E_EDITOR_ACTION_CONFIRM_REPLACE(editor) \
-       E_EDITOR_ACTION ((editor), "confirm-replace")
-#define E_EDITOR_ACTION_CONFIRM_REPLACE_ALL(editor) \
-       E_EDITOR_ACTION ((editor), "confirm-replace-all")
-#define E_EDITOR_ACTION_CONFIRM_REPLACE_CANCEL(editor) \
-       E_EDITOR_ACTION ((editor), "confirm-replace-cancel")
-#define E_EDITOR_ACTION_CONFIRM_REPLACE_NEXT(editor) \
-       E_EDITOR_ACTION ((editor), "confirm-replace-next")
 #define E_EDITOR_ACTION_CONTEXT_DELETE_CELL(editor) \
        E_EDITOR_ACTION ((editor), "context-delete-cell")
 #define E_EDITOR_ACTION_CONTEXT_DELETE_COLUMN(editor) \
diff --git a/e-util/e-editor-builder.ui b/e-util/e-editor-builder.ui
index 5414238..c81bdde 100644
--- a/e-util/e-editor-builder.ui
+++ b/e-util/e-editor-builder.ui
@@ -129,19 +129,6 @@
     <property name="page_size">0</property>
     <property name="value">0</property>
   </object>
-  <object class="GtkListStore" id="model1">
-    <columns>
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">px</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">%</col>
-      </row>
-    </data>
-  </object>
   <object class="GtkListStore" id="model10">
     <columns>
       <column type="gchararray"/>
@@ -174,22 +161,6 @@
       </row>
     </data>
   </object>
-  <object class="GtkListStore" id="model2">
-    <columns>
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">Left</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Center</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Right</col>
-      </row>
-    </data>
-  </object>
   <object class="GtkListStore" id="model3">
     <columns>
       <column type="gchararray"/>
@@ -760,395 +731,6 @@
       </object>
     </child>
   </object>
-  <object class="GtkWindow" id="link-properties-window">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title" translatable="yes">Link Properties</property>
-    <property name="modal">True</property>
-    <property name="window_position">GTK_WIN_POS_CENTER</property>
-    <property name="destroy_with_parent">True</property>
-    <signal handler="gtkhtml_editor_link_properties_show_window_cb" name="show"/>
-    <signal handler="gtk_widget_hide_on_delete" name="delete_event"/>
-    <child>
-      <object class="GtkVBox" id="link-properties-vbox">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="border_width">12</property>
-        <property name="spacing">12</property>
-        <child>
-          <object class="GtkTable" id="link-properties-table">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="n_rows">2</property>
-            <property name="n_columns">3</property>
-            <property name="column_spacing">6</property>
-            <property name="row_spacing">6</property>
-            <child>
-              <object class="GtkLabel" id="link-properties-url-label">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="xalign">1</property>
-                <property name="label" translatable="yes">_URL:</property>
-                <property name="use_underline">True</property>
-                <property name="mnemonic_widget">link-properties-url-entry</property>
-              </object>
-              <packing>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"/>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="link-properties-description-label">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">_Description:</property>
-                <property name="use_underline">True</property>
-                <property name="mnemonic_widget">link-properties-description-entry</property>
-              </object>
-              <packing>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"/>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="link-properties-url-entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <signal handler="gtkhtml_editor_link_properties_url_changed_cb" name="changed" 
object="link-properties-window"/>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="y_options"/>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="link-properties-description-entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <signal handler="gtkhtml_editor_link_properties_description_changed_cb" name="changed" 
object="link-properties-window"/>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">3</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="y_options"/>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="link-properties-test-button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-                <property name="x_options"/>
-                <property name="y_options"/>
-              </packing>
-            </child>
-          </object>
-        </child>
-        <child>
-          <object class="GtkHButtonBox" id="link-properties-button-box">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">6</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-            <child>
-              <object class="GtkButton" id="link-properties-close-button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label">gtk-close</property>
-                <property name="use_stock">True</property>
-                <signal handler="gtk_widget_hide" name="clicked" object="link-properties-window"/>
-              </object>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
-  <object class="GtkWindow" id="rule-properties-window">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">12</property>
-    <property name="title" translatable="yes" comments="Translators: Caption of a window. 'Rule' here means 
a horizontal line in an HTML text.">Rule Properties</property>
-    <property name="resizable">False</property>
-    <property name="modal">True</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="destroy_with_parent">True</property>
-    <signal handler="gtkhtml_editor_rule_properties_show_window_cb" name="show"/>
-    <signal handler="gtk_widget_hide_on_delete" name="delete_event"/>
-    <child>
-      <object class="GtkVBox" id="rule-properties-vbox">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">12</property>
-        <child>
-          <object class="GtkVBox" id="rule-properties-size-vbox">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">6</property>
-            <child>
-              <object class="GtkLabel" id="rule-properties-size-header">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Size</property>
-                <attributes>
-                  <attribute name="weight" value="bold"/>
-                </attributes>
-              </object>
-            </child>
-            <child>
-              <object class="GtkAlignment" id="rule-properties-size-alignment">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <object class="GtkTable" id="rule-properties-size-table">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="n_rows">2</property>
-                    <property name="n_columns">3</property>
-                    <property name="column_spacing">6</property>
-                    <property name="row_spacing">6</property>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="rule-properties-width-label">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">1</property>
-                        <property name="label" translatable="yes">_Width:</property>
-                        <property name="use_underline">True</property>
-                      </object>
-                      <packing>
-                        <property name="x_options"/>
-                        <property name="y_options"/>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkSpinButton" id="rule-properties-width-spin-button">
-                        <property name="width_request">100</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="adjustment">adjustment1</property>
-                        <signal handler="gtkhtml_editor_rule_properties_width_changed_cb" 
name="value_changed" object="rule-properties-window"/>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="y_options"/>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="rule-properties-size-label">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">1</property>
-                        <property name="label" translatable="yes">_Size:</property>
-                        <property name="use_underline">True</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options"/>
-                        <property name="y_options"/>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkSpinButton" id="rule-properties-size-spin-button">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="adjustment">adjustment2</property>
-                        <signal handler="gtkhtml_editor_rule_properties_size_changed_cb" 
name="value_changed" object="rule-properties-window"/>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="y_options"/>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkComboBox" id="rule-properties-width-combo-box">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <signal handler="gtkhtml_editor_rule_properties_width_changed_cb" name="changed" 
object="rule-properties-window"/>
-                        <property name="model">model1</property>
-                        <child>
-                          <object class="GtkCellRendererText" id="renderer1"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="right_attach">3</property>
-                        <property name="x_options"/>
-                        <property name="y_options"/>
-                      </packing>
-                    </child>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkVBox" id="rule-properties-style-vbox">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">6</property>
-            <child>
-              <object class="GtkLabel" id="rule-properties-style-header">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Style</property>
-                <attributes>
-                  <attribute name="weight" value="bold"/>
-                </attributes>
-              </object>
-            </child>
-            <child>
-              <object class="GtkAlignment" id="rule-properties-style-alignment">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <object class="GtkTable" id="rule-properties-style-table">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="n_rows">2</property>
-                    <property name="n_columns">2</property>
-                    <property name="column_spacing">6</property>
-                    <property name="row_spacing">6</property>
-                    <child>
-                      <object class="GtkLabel" id="rule-properties-alignment-label">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">1</property>
-                        <property name="label" translatable="yes">_Alignment:</property>
-                        <property name="use_underline">True</property>
-                      </object>
-                      <packing>
-                        <property name="x_options"/>
-                        <property name="y_options"/>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkComboBox" id="rule-properties-alignment-combo-box">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <signal handler="gtkhtml_editor_rule_properties_alignment_changed_cb" name="changed" 
object="rule-properties-window"/>
-                        <property name="model">model2</property>
-                        <child>
-                          <object class="GtkCellRendererText" id="renderer2"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="y_options"/>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkCheckButton" id="rule-properties-shaded-check-button">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">S_haded</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
-                        <signal handler="gtkhtml_editor_rule_properties_shaded_toggled_cb" name="toggled" 
object="rule-properties-window"/>
-                      </object>
-                      <packing>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="y_options"/>
-                      </packing>
-                    </child>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkHButtonBox" id="rule-properties-button-box">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">12</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-            <child>
-              <object class="GtkButton" id="rule-properties-close-button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label">gtk-close</property>
-                <property name="use_stock">True</property>
-                <signal handler="gtk_widget_hide" name="clicked" object="rule-properties-window"/>
-              </object>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
   <object class="GtkWindow" id="table-properties-window">
     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
     <property name="border_width">12</property>
diff --git a/e-util/e-editor-hrule-dialog.c b/e-util/e-editor-hrule-dialog.c
index c954277..5880c2e 100644
--- a/e-util/e-editor-hrule-dialog.c
+++ b/e-util/e-editor-hrule-dialog.c
@@ -1,8 +1,11 @@
 /*
  * e-editor-hrule-dialog.h
  *
+<<<<<<< HEAD
  * Copyright (C) 2012 Dan Vrátil <dvratil redhat com>
  *
+=======
+>>>>>>> Make horizontal rule dialog work
  * 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
@@ -24,15 +27,25 @@
 
 #include "e-editor-hrule-dialog.h"
 #include "e-editor-utils.h"
+<<<<<<< HEAD
 #include "e-editor-widget.h"
+=======
+>>>>>>> Make horizontal rule dialog work
 
 #include <glib/gi18n-lib.h>
 #include <webkit/webkitdom.h>
 #include <stdlib.h>
 
+<<<<<<< HEAD
 #define E_EDITOR_HRULE_DIALOG_GET_PRIVATE(obj) \
        (G_TYPE_INSTANCE_GET_PRIVATE \
        ((obj), E_TYPE_EDITOR_HRULE_DIALOG, EEditorHRuleDialogPrivate))
+=======
+G_DEFINE_TYPE (
+       EEditorHRuleDialog,
+       e_editor_hrule_dialog,
+       E_TYPE_EDITOR_DIALOG);
+>>>>>>> Make horizontal rule dialog work
 
 struct _EEditorHRuleDialogPrivate {
        GtkWidget *width_edit;
@@ -42,6 +55,7 @@ struct _EEditorHRuleDialogPrivate {
        GtkWidget *alignment_combo;
        GtkWidget *shaded_check;
 
+<<<<<<< HEAD
        WebKitDOMHTMLHRElement *hr_element;
 };
 
@@ -50,6 +64,13 @@ G_DEFINE_TYPE (
        e_editor_hrule_dialog,
        E_TYPE_EDITOR_DIALOG);
 
+=======
+       GtkWidget *close_button;
+
+       WebKitDOMHTMLHRElement *hr_element;
+};
+
+>>>>>>> Make horizontal rule dialog work
 static void
 editor_hrule_dialog_set_alignment (EEditorHRuleDialog *dialog)
 {
@@ -57,8 +78,13 @@ editor_hrule_dialog_set_alignment (EEditorHRuleDialog *dialog)
 
        g_return_if_fail (WEBKIT_DOM_IS_HTMLHR_ELEMENT (dialog->priv->hr_element));
 
+<<<<<<< HEAD
        alignment = gtk_combo_box_get_active_id (
                        GTK_COMBO_BOX (dialog->priv->alignment_combo));
+=======
+       alignment = gtk_combo_box_text_get_active_text (
+                       GTK_COMBO_BOX_TEXT (dialog->priv->alignment_combo));
+>>>>>>> Make horizontal rule dialog work
 
        webkit_dom_htmlhr_element_set_align (dialog->priv->hr_element, alignment);
 }
@@ -120,21 +146,36 @@ editor_hrule_dialog_get_size (EEditorHRuleDialog *dialog)
 static void
 editor_hrule_dialog_set_width (EEditorHRuleDialog *dialog)
 {
+<<<<<<< HEAD
        gchar *width, *units;
 
        g_return_if_fail (WEBKIT_DOM_IS_HTMLHR_ELEMENT (dialog->priv->hr_element));
 
        units = gtk_combo_box_text_get_active_text (
                        GTK_COMBO_BOX_TEXT (dialog->priv->unit_combo));
+=======
+       gchar *width;
+
+       g_return_if_fail (WEBKIT_DOM_IS_HTMLHR_ELEMENT (dialog->priv->hr_element));
+
+>>>>>>> Make horizontal rule dialog work
        width = g_strdup_printf (
                "%d%s",
                (gint) gtk_spin_button_get_value (
                        GTK_SPIN_BUTTON (dialog->priv->width_edit)),
+<<<<<<< HEAD
                units);
 
        webkit_dom_htmlhr_element_set_width (dialog->priv->hr_element, width);
 
        g_free (units);
+=======
+               gtk_combo_box_text_get_active_text (
+                       GTK_COMBO_BOX_TEXT (dialog->priv->unit_combo)));
+
+       webkit_dom_htmlhr_element_set_width (dialog->priv->hr_element, width);
+
+>>>>>>> Make horizontal rule dialog work
        g_free (width);
 }
 
@@ -195,6 +236,7 @@ editor_hrule_dialog_get_shading (EEditorHRuleDialog *dialog)
 }
 
 static void
+<<<<<<< HEAD
 editor_hrule_dialog_hide (GtkWidget *widget)
 {
        EEditorHRuleDialogPrivate *priv;
@@ -204,6 +246,13 @@ editor_hrule_dialog_hide (GtkWidget *widget)
        priv->hr_element = NULL;
 
        GTK_WIDGET_CLASS (e_editor_hrule_dialog_parent_class)->hide (widget);
+=======
+editor_hrule_dialog_close (EEditorHRuleDialog *dialog)
+{
+       gtk_widget_hide (GTK_WIDGET (dialog));
+
+       dialog->priv->hr_element = NULL;
+>>>>>>> Make horizontal rule dialog work
 }
 
 static void
@@ -234,6 +283,7 @@ editor_hrule_dialog_show (GtkWidget *widget)
 
        range = webkit_dom_dom_selection_get_range_at (selection, 0, NULL);
 
+<<<<<<< HEAD
        rule = e_editor_dom_node_find_parent_element (
                webkit_dom_range_get_start_container (range, NULL), "HR");
        if (!rule) {
@@ -247,6 +297,24 @@ editor_hrule_dialog_show (GtkWidget *widget)
 
                rule = e_editor_dom_node_find_child_element (
                        webkit_dom_range_get_start_container (range, NULL), "HR");
+=======
+       rule = e_editor_dom_node_get_parent_element (
+               webkit_dom_range_get_start_container (range, NULL),
+               WEBKIT_TYPE_DOM_HTMLHR_ELEMENT);
+       if (!rule) {
+               rule = e_editor_dom_node_find_child_element (
+                       webkit_dom_range_get_start_container (range, NULL),
+                       WEBKIT_TYPE_DOM_HTMLHR_ELEMENT);
+       }
+
+       if (!rule) {
+               webkit_dom_document_exec_command (
+                       document, "insertHorizontalRule", FALSE, "");
+
+               rule = e_editor_dom_node_find_child_element (
+                       webkit_dom_range_get_start_container (range, NULL),
+                       WEBKIT_TYPE_DOM_HTMLHR_ELEMENT);
+>>>>>>> Make horizontal rule dialog work
 
                dialog->priv->hr_element = WEBKIT_DOM_HTMLHR_ELEMENT (rule);
 
@@ -280,6 +348,7 @@ editor_hrule_dialog_show (GtkWidget *widget)
 }
 
 static void
+<<<<<<< HEAD
 e_editor_hrule_dialog_class_init (EEditorHRuleDialogClass *class)
 {
        GtkWidgetClass *widget_class;
@@ -289,29 +358,62 @@ e_editor_hrule_dialog_class_init (EEditorHRuleDialogClass *class)
        widget_class = GTK_WIDGET_CLASS (class);
        widget_class->show = editor_hrule_dialog_show;
        widget_class->hide = editor_hrule_dialog_hide;
+=======
+e_editor_hrule_dialog_class_init (EEditorHRuleDialogClass *klass)
+{
+       GtkWidgetClass *widget_class;
+
+       g_type_class_peek_parent (klass);
+       g_type_class_add_private (klass, sizeof (EEditorHRuleDialogPrivate));
+
+       widget_class = GTK_WIDGET_CLASS (klass);
+       widget_class->show = editor_hrule_dialog_show;
+>>>>>>> Make horizontal rule dialog work
 }
 
 static void
 e_editor_hrule_dialog_init (EEditorHRuleDialog *dialog)
 {
+<<<<<<< HEAD
        GtkGrid *main_layout, *grid;
        GtkWidget *widget;
 
        dialog->priv = E_EDITOR_HRULE_DIALOG_GET_PRIVATE (dialog);
 
        main_layout = e_editor_dialog_get_container (E_EDITOR_DIALOG (dialog));
+=======
+       GtkBox *main_layout;
+       GtkGrid *grid;
+       GtkWidget *widget;
+
+       dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE (
+               dialog, E_TYPE_EDITOR_HRULE_DIALOG, EEditorHRuleDialogPrivate);
+
+       main_layout = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 5));
+       gtk_container_add (GTK_CONTAINER (dialog), GTK_WIDGET (main_layout));
+       gtk_container_set_border_width (GTK_CONTAINER (dialog), 10);
+
+>>>>>>> Make horizontal rule dialog work
 
        /* == Size == */
        widget = gtk_label_new ("");
        gtk_label_set_markup (GTK_LABEL (widget), _("<b>Size</b>"));
        gtk_misc_set_alignment (GTK_MISC (widget), 0, 0.5);
+<<<<<<< HEAD
        gtk_grid_attach (main_layout, widget, 0, 0, 1, 1);
+=======
+       gtk_box_pack_start (main_layout, widget, TRUE, TRUE, 0);
+>>>>>>> Make horizontal rule dialog work
 
        grid = GTK_GRID (gtk_grid_new ());
        gtk_grid_set_column_spacing (grid, 5);
        gtk_grid_set_row_spacing (grid, 5);
        gtk_widget_set_margin_left (GTK_WIDGET (grid), 10);
+<<<<<<< HEAD
        gtk_grid_attach (main_layout, GTK_WIDGET (grid), 0, 1, 1, 1);
+=======
+       gtk_box_pack_start (main_layout, GTK_WIDGET (grid), TRUE, TRUE, 5);
+>>>>>>> Make horizontal rule dialog work
 
        /* Width */
        widget = gtk_spin_button_new_with_range (0.0, 100.0, 1.0);
@@ -323,8 +425,12 @@ e_editor_hrule_dialog_init (EEditorHRuleDialog *dialog)
        dialog->priv->width_edit = widget;
        gtk_grid_attach (grid, widget, 1, 0, 1, 1);
 
+<<<<<<< HEAD
        widget = gtk_label_new_with_mnemonic (_("_Width:"));
        gtk_label_set_justify (GTK_LABEL (widget), GTK_JUSTIFY_RIGHT);
+=======
+       widget = gtk_label_new_with_mnemonic (_("Width:"));
+>>>>>>> Make horizontal rule dialog work
        gtk_label_set_mnemonic_widget (GTK_LABEL (widget), dialog->priv->size_edit);
        gtk_grid_attach (grid, widget, 0, 0, 1, 1);
 
@@ -348,22 +454,38 @@ e_editor_hrule_dialog_init (EEditorHRuleDialog *dialog)
        dialog->priv->size_edit = widget;
        gtk_grid_attach (grid, widget, 1, 1, 1, 1);
 
+<<<<<<< HEAD
        widget = gtk_label_new_with_mnemonic (_("_Size:"));
        gtk_label_set_justify (GTK_LABEL (widget), GTK_JUSTIFY_RIGHT);
        gtk_label_set_mnemonic_widget (GTK_LABEL (widget), dialog->priv->size_edit);
        gtk_grid_attach (grid, widget, 0, 1, 1, 1);
 
+=======
+       widget = gtk_label_new_with_mnemonic (_("Size:"));
+       gtk_label_set_mnemonic_widget (GTK_LABEL (widget), dialog->priv->size_edit);
+       gtk_grid_attach (grid, widget, 0, 1, 1, 1);
+
+
+>>>>>>> Make horizontal rule dialog work
        /* == Style == */
        widget = gtk_label_new ("");
        gtk_label_set_markup (GTK_LABEL (widget), _("<b>Style</b>"));
        gtk_misc_set_alignment (GTK_MISC (widget), 0, 0.5);
+<<<<<<< HEAD
        gtk_grid_attach (main_layout, widget, 0, 2, 1, 1);
+=======
+       gtk_box_pack_start (main_layout, widget, TRUE, TRUE, 0);
+>>>>>>> Make horizontal rule dialog work
 
        grid = GTK_GRID (gtk_grid_new ());
        gtk_grid_set_column_spacing (grid, 5);
        gtk_grid_set_row_spacing (grid, 5);
        gtk_widget_set_margin_left (GTK_WIDGET (grid), 10);
+<<<<<<< HEAD
        gtk_grid_attach (main_layout, GTK_WIDGET (grid), 0, 3, 1, 1);
+=======
+       gtk_box_pack_start (main_layout, GTK_WIDGET (grid), TRUE, TRUE, 5);
+>>>>>>> Make horizontal rule dialog work
 
        /* Alignment */
        widget = gtk_combo_box_text_new ();
@@ -380,19 +502,43 @@ e_editor_hrule_dialog_init (EEditorHRuleDialog *dialog)
        dialog->priv->alignment_combo = widget;
        gtk_grid_attach (grid, widget, 1, 0, 2, 1);
 
+<<<<<<< HEAD
        widget = gtk_label_new_with_mnemonic (_("_Alignment:"));
        gtk_label_set_justify (GTK_LABEL (widget), GTK_JUSTIFY_RIGHT);
+=======
+       widget = gtk_label_new_with_mnemonic (_("Alignment:"));
+>>>>>>> Make horizontal rule dialog work
        gtk_label_set_mnemonic_widget (GTK_LABEL (widget), widget);
        gtk_grid_attach (grid, widget, 0, 0, 1, 1);
 
        /* Shaded */
+<<<<<<< HEAD
        widget = gtk_check_button_new_with_mnemonic (_("S_haded"));
+=======
+       widget = gtk_check_button_new_with_mnemonic (_("Shaded"));
+>>>>>>> Make horizontal rule dialog work
        g_signal_connect_swapped (
                widget, "toggled",
                G_CALLBACK (editor_hrule_dialog_set_shading), dialog);
        dialog->priv->shaded_check = widget;
        gtk_grid_attach (grid, widget, 0, 1, 2, 1);
 
+<<<<<<< HEAD
+=======
+
+       /* == Button box == */
+       widget = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
+       g_signal_connect_swapped (
+               widget, "clicked",
+               G_CALLBACK (editor_hrule_dialog_close), dialog);
+       dialog->priv->close_button = widget;
+
+       widget = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
+       gtk_button_box_set_layout (GTK_BUTTON_BOX (widget), GTK_BUTTONBOX_END);
+       gtk_box_pack_start (main_layout, widget, TRUE, TRUE, 0);
+       gtk_box_pack_start (GTK_BOX (widget), dialog->priv->close_button, FALSE, FALSE, 5);
+
+>>>>>>> Make horizontal rule dialog work
        gtk_widget_show_all (GTK_WIDGET (main_layout));
 }
 
diff --git a/e-util/e-editor-hrule-dialog.h b/e-util/e-editor-hrule-dialog.h
index fad94fc..76803e9 100644
--- a/e-util/e-editor-hrule-dialog.h
+++ b/e-util/e-editor-hrule-dialog.h
@@ -1,8 +1,11 @@
 /*
  * e-editor-hrule-dialog.h
  *
+<<<<<<< HEAD
  * Copyright (C) 2012 Dan Vrátil <dvratil redhat com>
  *
+=======
+>>>>>>> Make horizontal rule dialog work
  * 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
@@ -54,6 +57,10 @@ typedef struct _EEditorHRuleDialogPrivate EEditorHRuleDialogPrivate;
 
 struct _EEditorHRuleDialog {
        EEditorDialog parent;
+<<<<<<< HEAD
+=======
+
+>>>>>>> Make horizontal rule dialog work
        EEditorHRuleDialogPrivate *priv;
 };
 
@@ -61,8 +68,14 @@ struct _EEditorHRuleDialogClass {
        EEditorDialogClass parent_class;
 };
 
+<<<<<<< HEAD
 GType          e_editor_hrule_dialog_get_type  (void) G_GNUC_CONST;
 GtkWidget *    e_editor_hrule_dialog_new       (EEditor *editor);
+=======
+GType          e_editor_hrule_dialog_get_type  (void);
+
+GtkWidget*     e_editor_hrule_dialog_new       (EEditor *editor);
+>>>>>>> Make horizontal rule dialog work
 
 G_END_DECLS
 
diff --git a/e-util/e-editor-link-dialog.c b/e-util/e-editor-link-dialog.c
index 1db2790..15aa9ee 100644
--- a/e-util/e-editor-link-dialog.c
+++ b/e-util/e-editor-link-dialog.c
@@ -41,47 +41,6 @@ struct _EEditorLinkDialogPrivate {
        GtkWidget *ok_button;
 };
 
-static WebKitDOMElement *
-find_anchor_element (WebKitDOMRange *range)
-{
-       WebKitDOMElement *link;
-       WebKitDOMNode *node;
-
-       node = webkit_dom_range_get_start_container (range, NULL);
-
-       /* Try to find if the selection is within a link */
-       link = NULL;
-       link = e_editor_dom_node_get_parent_element (
-                       node, WEBKIT_TYPE_DOM_HTML_ANCHOR_ELEMENT);
-
-       /* ...or if there is a link within selection */
-       if (!link) {
-               WebKitDOMNode *start_node = node;
-               gboolean found = FALSE;
-               do {
-                       if (WEBKIT_DOM_IS_HTML_ANCHOR_ELEMENT (node)) {
-                               found = TRUE;
-                               break;
-                       }
-
-                       if (webkit_dom_node_has_child_nodes (node)) {
-                               node = webkit_dom_node_get_first_child (node);
-                       } else if (webkit_dom_node_get_next_sibling (node)) {
-                               node = webkit_dom_node_get_next_sibling (node);
-                       } else {
-                               node = webkit_dom_node_get_parent_node (node);
-                       }
-               } while (!webkit_dom_node_is_same_node (node, start_node));
-
-               if (found) {
-                       link = WEBKIT_DOM_ELEMENT (node);
-               }
-       }
-
-       return link;
-}
-
-
 static void
 editor_link_dialog_test_link (EEditorLinkDialog *dialog)
 {
@@ -139,7 +98,14 @@ editor_link_dialog_ok (EEditorLinkDialog *dialog)
        }
 
        range = webkit_dom_dom_selection_get_range_at (dom_selection, 0, NULL);
-       link = find_anchor_element (range);
+       link = e_editor_dom_node_get_parent_element (
+               webkit_dom_range_get_start_container (range, NULL),
+               WEBKIT_TYPE_DOM_HTML_ANCHOR_ELEMENT);
+       if (!link) {
+               link = e_editor_dom_node_find_child_element (
+                       webkit_dom_range_get_start_container (range, NULL),
+                       WEBKIT_TYPE_DOM_HTML_ANCHOR_ELEMENT);
+       }
 
        if (link) {
                webkit_dom_html_anchor_element_set_href (
@@ -210,7 +176,14 @@ editor_link_dialog_show (GtkWidget *widget)
        }
 
        range = webkit_dom_dom_selection_get_range_at (dom_selection, 0, NULL);
-       link = find_anchor_element (range);
+       link = e_editor_dom_node_get_parent_element (
+               webkit_dom_range_get_start_container (range, NULL),
+               WEBKIT_TYPE_DOM_HTML_ANCHOR_ELEMENT);
+       if (!link) {
+               link = e_editor_dom_node_find_child_element (
+                       webkit_dom_range_get_start_container (range, NULL),
+                       WEBKIT_TYPE_DOM_HTML_ANCHOR_ELEMENT);
+       }
 
        if (link) {
                gchar *href, *text;
diff --git a/e-util/e-editor-private.h b/e-util/e-editor-private.h
index 5872a8a..0eabc08 100644
--- a/e-util/e-editor-private.h
+++ b/e-util/e-editor-private.h
@@ -27,6 +27,7 @@
 #include <e-editor-find-dialog.h>
 #include <e-editor-replace-dialog.h>
 #include <e-editor-link-dialog.h>
+#include <e-editor-hrule-dialog.h>
 
 #ifdef HAVE_XFREE
 #include <X11/XF86keysym.h>
@@ -58,6 +59,7 @@ struct _EEditorPrivate {
        GtkWidget *find_dialog;
        GtkWidget *replace_dialog;
        GtkWidget *link_dialog;
+       GtkWidget *hrule_dialog;
 
        GtkWidget *color_combo_box;
        GtkWidget *mode_combo_box;
diff --git a/e-util/e-editor-utils.c b/e-util/e-editor-utils.c
index 7eea064..8509e03 100644
--- a/e-util/e-editor-utils.c
+++ b/e-util/e-editor-utils.c
@@ -1,11 +1,6 @@
 /*
  * e-editor-utils.c
  *
-<<<<<<< HEAD
- * Copyright (C) 2012 Dan Vrátil <dvratil redhat com>
- *
-=======
->>>>>>> Make the URL editor work
  * 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
@@ -26,47 +21,6 @@
 #endif
 
 #include "e-editor-utils.h"
-<<<<<<< HEAD
-#include <string.h>
-
-/**
- * e_editor_dom_node_find_parent_element:
- * @node: Start node
- * @tagname: Tag name of element to search
- *
- * Recursively searches for first occurance of element with given @tagname
- * that is parent of given @node.
- *
- * Returns: A #WebKitDOMElement with @tagname representing parent of @node or
- * @NULL when @node has no parent with given @tagname. When @node matches @tagname,
- * then the @node is returned.
- */
-WebKitDOMElement *
-e_editor_dom_node_find_parent_element (WebKitDOMNode *node,
-                                       const gchar *tagname)
-{
-       gint taglen = strlen (tagname);
-
-       while (node) {
-
-               if (WEBKIT_DOM_IS_ELEMENT (node)) {
-                       gchar *node_tagname;
-
-                       node_tagname = webkit_dom_element_get_tag_name (
-                                               WEBKIT_DOM_ELEMENT (node));
-
-                       if (node_tagname &&
-                           (strlen (node_tagname) == taglen) &&
-                           (g_ascii_strncasecmp (node_tagname, tagname, taglen) == 0)) {
-                               g_free (node_tagname);
-                               return WEBKIT_DOM_ELEMENT (node);
-                       }
-
-                       g_free (node_tagname);
-               }
-
-               node = WEBKIT_DOM_NODE (webkit_dom_node_get_parent_element (node));
-=======
 
 
 WebKitDOMElement *
@@ -79,59 +33,7 @@ e_editor_dom_node_get_parent_element (WebKitDOMNode *node,
                        return (WebKitDOMElement *) node;
 
                node = (WebKitDOMNode *) webkit_dom_node_get_parent_element (node);
->>>>>>> Make the URL editor work
        }
 
        return NULL;
 }
-<<<<<<< HEAD
-
-/**
- * e_editor_dom_node_find_child_element:
- * @node: Start node
- * @tagname: Tag name of element to search.
- *
- * Recursively searches for first occurence of element with given @tagname that
- * is a child of @node.
- *
- * Returns: A #WebKitDOMElement with @tagname representing a child of @node or
- * @NULL when @node has no child with given @tagname. When @node matches @tagname,
- * then the @node is returned.
- */
-WebKitDOMElement *
-e_editor_dom_node_find_child_element (WebKitDOMNode *node,
-                                      const gchar *tagname)
-{
-       WebKitDOMNode *start_node = node;
-       gint taglen = strlen (tagname);
-
-       do {
-               if (WEBKIT_DOM_IS_ELEMENT (node)) {
-                       gchar *node_tagname;
-
-                       node_tagname = webkit_dom_element_get_tag_name (
-                                       WEBKIT_DOM_ELEMENT (node));
-
-                       if (node_tagname &&
-                           (strlen (node_tagname) == taglen) &&
-                           (g_ascii_strncasecmp (node_tagname, tagname, taglen) == 0)) {
-                               g_free (node_tagname);
-                               return WEBKIT_DOM_ELEMENT (node);
-                       }
-
-                       g_free (node_tagname);
-               }
-
-               if (webkit_dom_node_has_child_nodes (node)) {
-                       node = webkit_dom_node_get_first_child (node);
-               } else if (webkit_dom_node_get_next_sibling (node)) {
-                       node = webkit_dom_node_get_next_sibling (node);
-               } else {
-                       node = webkit_dom_node_get_parent_node (node);
-               }
-       } while (!webkit_dom_node_is_same_node (node, start_node));
-
-       return NULL;
-}
-=======
->>>>>>> Make the URL editor work
diff --git a/e-util/e-editor-utils.h b/e-util/e-editor-utils.h
index 0cba92d..143f8c2 100644
--- a/e-util/e-editor-utils.h
+++ b/e-util/e-editor-utils.h
@@ -50,4 +50,8 @@ WebKitDOMElement *    e_editor_dom_node_get_parent_element
                                                         GType parent_type);
Make the URL editor work
 
+WebKitDOMElement *     e_editor_dom_node_find_child_element
+                                                       (WebKitDOMNode *node,
+                                                        GType child_type);
+
 #endif /* E_EDITOR_UTILS_H */
diff --git a/e-util/e-editor-widgets.h b/e-util/e-editor-widgets.h
index 6c697cf..5901c4e 100644
--- a/e-util/e-editor-widgets.h
+++ b/e-util/e-editor-widgets.h
@@ -87,16 +87,6 @@
 #define E_EDITOR_WIDGETS_IMAGE_PROPERTIES_Y_PADDING_SPIN_BUTTON(editor) \
        E_EDITOR_WIDGETS ((editor), "image-properties-y-padding-spin-button")
 
-/* Link Properties Window */
-#define E_EDITOR_WIDGETS_LINK_PROPERTIES_DESCRIPTION_ENTRY(editor) \
-       E_EDITOR_WIDGETS ((editor), "link-properties-description-entry")
-#define E_EDITOR_WIDGETS_LINK_PROPERTIES_TEST_BUTTON(editor) \
-       E_EDITOR_WIDGETS ((editor), "link-properties-test-button")
-#define E_EDITOR_WIDGETS_LINK_PROPERTIES_URL_ENTRY(editor) \
-       E_EDITOR_WIDGETS ((editor), "link-properties-url-entry")
-#define E_EDITOR_WIDGETS_LINK_PROPERTIES_WINDOW(editor) \
-       E_EDITOR_WIDGETS ((editor), "link-properties-window")
-
 /* Page Properties Window */
 #define E_EDITOR_WIDGETS_PAGE_PROPERTIES_BACKGROUND_COLOR_COMBO(editor) \
        E_EDITOR_WIDGETS ((editor), "page-properties-background-color-combo")
@@ -123,20 +113,6 @@
 #define E_EDITOR_WIDGETS_PARAGRAPH_PROPERTIES_WINDOW(editor) \
        E_EDITOR_WIDGETS ((editor), "paragraph-properties-window")
 
-/* Rule Properties Window */
-#define E_EDITOR_WIDGETS_RULE_PROPERTIES_ALIGNMENT_COMBO_BOX(editor) \
-       E_EDITOR_WIDGETS ((editor), "rule-properties-alignment-combo-box")
-#define E_EDITOR_WIDGETS_RULE_PROPERTIES_SHADED_CHECK_BUTTON(editor) \
-       E_EDITOR_WIDGETS ((editor), "rule-properties-shaded-check-button")
-#define E_EDITOR_WIDGETS_RULE_PROPERTIES_SIZE_SPIN_BUTTON(editor) \
-       E_EDITOR_WIDGETS ((editor), "rule-properties-size-spin-button")
-#define E_EDITOR_WIDGETS_RULE_PROPERTIES_WIDTH_COMBO_BOX(editor) \
-       E_EDITOR_WIDGETS ((editor), "rule-properties-width-combo-box")
-#define E_EDITOR_WIDGETS_RULE_PROPERTIES_WIDTH_SPIN_BUTTON(editor) \
-       E_EDITOR_WIDGETS ((editor), "rule-properties-width-spin-button")
-#define E_EDITOR_WIDGETS_RULE_PROPERTIES_WINDOW(editor) \
-       E_EDITOR_WIDGETS ((editor), "rule-properties-window")
-
 /* Spell Check Window */
 #define E_EDITOR_WIDGETS_SPELL_WINDOW(editor) \
        E_EDITOR_WIDGETS ((editor), "spell-window")
diff --git a/e-util/e-util.h b/e-util/e-util.h
index 4c5c742..5348909 100644
--- a/e-util/e-util.h
+++ b/e-util/e-util.h
@@ -94,6 +94,7 @@
 #include <e-util/e-editor-actions.h>
 #include <e-util/e-editor-dialog.h>
 #include <e-util/e-editor-find-dialog.h>
+#include <e-util/e-editor-hrule-dialog.h>
 #include <e-util/e-editor-link-dialog.h>
 #include <e-util/e-editor-replace-dialog.h>
 #include <e-util/e-editor-selection.h>


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