[evolution-patches] gtkhtml: dialogs UI
- From: Radek Doulík <rodo ximian com>
- To: Patches <evolution-patches ximian com>
- Cc: Larry Ewing <lewing ximian com>, Anna Dirks <anna ximian com>, Ettore Perazzoli <ettore ximian com>
- Subject: [evolution-patches] gtkhtml: dialogs UI
- Date: 02 May 2003 18:54:55 +0200
The attached patch is simplified version of my last HIGifing patch.
Screenshots are in http://primates.ximian.com/~rodo/dialogs/
This patch modifies few localized strings as well.
Index: body.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/body.c,v
retrieving revision 1.36
diff -u -p -r1.36 body.c
--- body.c 28 Feb 2003 23:12:17 -0000 1.36
+++ body.c 2 May 2003 16:53:12 -0000
@@ -246,13 +246,13 @@ body_properties (GtkHTMLControlData *cd,
data->left_margin = 10;
table = gtk_table_new (2, 2, FALSE);
- gtk_container_set_border_width (GTK_CONTAINER (table), 3);
- gtk_table_set_col_spacings (GTK_TABLE (table), 3);
- gtk_table_set_row_spacings (GTK_TABLE (table), 2);
-
- vb1 = gtk_vbox_new (FALSE, 0);
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 3);
+ gtk_container_set_border_width (GTK_CONTAINER (table), 12);
+ gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+ gtk_table_set_row_spacings (GTK_TABLE (table), 4);
+
+ vb1 = gtk_vbox_new (FALSE, 6);
+ hbox = gtk_hbox_new (FALSE, 12);
+ gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
frame = gtk_frame_new (_("Template"));
data->option_template = gtk_option_menu_new ();
fill_templates (data);
@@ -262,8 +262,8 @@ body_properties (GtkHTMLControlData *cd,
gtk_container_add (GTK_CONTAINER (frame), hbox);
gtk_box_pack_start (GTK_BOX (vb1), frame, FALSE, TRUE, 0);
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 3);
+ hbox = gtk_hbox_new (FALSE, 12);
+ gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
data->entry_title = gtk_entry_new ();
if (gtk_html_get_title (data->cd->html)) {
gtk_entry_set_text (GTK_ENTRY (data->entry_title),
@@ -276,8 +276,8 @@ body_properties (GtkHTMLControlData *cd,
gtk_box_pack_start (GTK_BOX (vb1), frame, FALSE, TRUE, 0);
frame = gtk_frame_new (_("Background Image"));
- vbox = gtk_vbox_new (FALSE, 2);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
+ vbox = gtk_vbox_new (FALSE, 4);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
data->pixmap_entry = gnome_pixmap_entry_new ("background_image", _("Background Image"), FALSE);
if (cd->html->engine->bgPixmapPtr) {
@@ -302,7 +302,7 @@ body_properties (GtkHTMLControlData *cd,
frame = gtk_frame_new (_("Colors"));
vbox = gtk_vbox_new (FALSE, 2);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
group = NULL;
i = 0;
@@ -316,7 +316,7 @@ body_properties (GtkHTMLControlData *cd,
color_combo_set_color (COLOR_COMBO (combo), &data->color [ct]); \
g_object_set_data (G_OBJECT (combo), "type", GINT_TO_POINTER (ct)); \
g_signal_connect (combo, "color_changed", G_CALLBACK (color_changed), data); \
- hbox = gtk_hbox_new (FALSE, 3); \
+ hbox = gtk_hbox_new (FALSE, 12); \
gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0); \
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (x), FALSE, FALSE, 0); \
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); \
Index: gtkhtml-editor-properties.glade
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/gtkhtml-editor-properties.glade,v
retrieving revision 1.30
diff -u -p -r1.30 gtkhtml-editor-properties.glade
--- gtkhtml-editor-properties.glade 9 Jan 2003 15:31:53 -0000 1.30
+++ gtkhtml-editor-properties.glade 2 May 2003 16:53:13 -0000
@@ -21,16 +21,14 @@
<property name="show_border">True</property>
<property name="tab_pos">GTK_POS_TOP</property>
<property name="scrollable">False</property>
- <property name="tab_hborder">2</property>
- <property name="tab_vborder">2</property>
<property name="enable_popup">False</property>
<child>
<widget class="GtkVBox" id="table_page">
- <property name="border_width">2</property>
+ <property name="border_width">12</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">6</property>
<child>
<widget class="GtkFrame" id="frame4">
@@ -42,13 +40,13 @@
<child>
<widget class="GtkTable" id="bg_table">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">1</property>
<property name="n_columns">4</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">0</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkCheckButton" id="check_table_bg_color">
@@ -184,13 +182,13 @@
<child>
<widget class="GtkTable" id="table1">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">5</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">2</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkLabel" id="label1">
@@ -481,7 +479,7 @@
<widget class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">12</property>
<child>
<widget class="GtkFrame" id="frame2">
@@ -493,13 +491,13 @@
<child>
<widget class="GtkTable" id="table2">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">4</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">2</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkSpinButton" id="spin_spacing">
@@ -676,13 +674,13 @@
<child>
<widget class="GtkTable" id="table3">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">1</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">2</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkLabel" id="label3">
@@ -824,14 +822,13 @@
<child>
<widget class="GtkVBox" id="cell_page">
- <property name="border_width">2</property>
+ <property name="border_width">12</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">6</property>
<child>
<widget class="GtkFrame" id="frame13">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -839,13 +836,13 @@
<child>
<widget class="GtkTable" id="table11">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">1</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">0</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkLabel" id="label21">
@@ -955,7 +952,6 @@
<child>
<widget class="GtkFrame" id="frame9">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -963,13 +959,13 @@
<child>
<widget class="GtkTable" id="table_cell_bg">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">1</property>
<property name="n_columns">4</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">0</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkCheckButton" id="check_cell_bg_color">
@@ -1097,7 +1093,6 @@
<child>
<widget class="GtkFrame" id="frame6">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -1105,13 +1100,13 @@
<child>
<widget class="GtkTable" id="table4">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">6</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">2</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkCheckButton" id="check_cell_width">
@@ -1398,11 +1393,10 @@
<widget class="GtkHBox" id="hbox3">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">12</property>
<child>
<widget class="GtkFrame" id="frame7">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -1410,13 +1404,13 @@
<child>
<widget class="GtkTable" id="table5">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">2</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkOptionMenu" id="option_cell_halign">
@@ -1596,7 +1590,6 @@
<child>
<widget class="GtkFrame" id="frame8">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -1604,13 +1597,13 @@
<child>
<widget class="GtkTable" id="table6">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">2</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkOptionMenu" id="option_cell_style">
@@ -1798,13 +1791,13 @@
<child>
<widget class="GtkVBox" id="table_insert_page">
+ <property name="border_width">12</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">6</property>
<child>
<widget class="GtkFrame" id="frame14">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -1819,6 +1812,7 @@
<child>
<widget class="GtkHBox" id="hbox6">
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
@@ -1887,7 +1881,6 @@
<child>
<widget class="GtkFrame" id="frame11">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -1895,12 +1888,13 @@
<child>
<widget class="GtkTable" id="table9">
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">5</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">4</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkOptionMenu" id="option_table_width">
@@ -2189,7 +2183,6 @@
<child>
<widget class="GtkFrame" id="frame12">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -2197,13 +2190,13 @@
<child>
<widget class="GtkTable" id="table10">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">4</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">4</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkSpinButton" id="spin_spacing">
@@ -2398,13 +2391,13 @@
<child>
<widget class="GtkVBox" id="rule_page">
+ <property name="border_width">12</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">6</property>
<child>
<widget class="GtkFrame" id="frame_template">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -2419,6 +2412,7 @@
<child>
<widget class="GtkHBox" id="hbox7">
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
@@ -2489,11 +2483,10 @@
<widget class="GtkHBox" id="hbox8">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">12</property>
<child>
<widget class="GtkFrame" id="frame16">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -2501,13 +2494,13 @@
<child>
<widget class="GtkTable" id="table19">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">3</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">4</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkLabel" id="label23">
@@ -2667,7 +2660,6 @@
<child>
<widget class="GtkFrame" id="frame17">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -2675,21 +2667,21 @@
<child>
<widget class="GtkVBox" id="vbox5">
- <property name="border_width">3</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">3</property>
+ <property name="spacing">4</property>
<child>
<widget class="GtkHBox" id="hbox17">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">4</property>
+ <property name="spacing">12</property>
<child>
<widget class="GtkLabel" id="label43">
<property name="visible">True</property>
- <property name="label" translatable="yes">Alignment</property>
+ <property name="label" translatable="yes">Alignment:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
@@ -2837,13 +2829,13 @@
<child>
<widget class="GtkVBox" id="vbox_template">
+ <property name="border_width">12</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">6</property>
<child>
<widget class="GtkFrame" id="frame18">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -2851,10 +2843,10 @@
<child>
<widget class="GtkHBox" id="hbox11">
- <property name="border_width">3</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">4</property>
+ <property name="spacing">18</property>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow1">
@@ -2890,8 +2882,8 @@
<property name="n_rows">2</property>
<property name="n_columns">3</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">3</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkOptionMenu" id="option_template_halign">
@@ -3117,23 +3109,23 @@
<child>
<widget class="GtkVBox" id="image_page">
+ <property name="border_width">12</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">6</property>
<child>
<widget class="GtkHBox" id="hbox_image_preview">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">12</property>
<child>
<widget class="GtkFrame" id="frame_image_sample">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<placeholder/>
@@ -3150,11 +3142,10 @@
<widget class="GtkVBox" id="vbox9">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">6</property>
<child>
<widget class="GtkFrame" id="frame_image_template">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -3162,7 +3153,7 @@
<child>
<widget class="GtkFrame" id="frame36">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -3220,7 +3211,6 @@
<child>
<widget class="GtkFrame" id="frame31">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -3228,14 +3218,14 @@
<child>
<widget class="GtkFrame" id="frame37">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkOptionMenu" id="option_image_align">
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="history">0</property>
@@ -3302,7 +3292,6 @@
<child>
<widget class="GtkFrame" id="frame30">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -3310,10 +3299,10 @@
<child>
<widget class="GtkHBox" id="hbox14">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">4</property>
+ <property name="spacing">12</property>
<child>
<widget class="GtkLabel" id="label38">
@@ -3385,7 +3374,6 @@
<child>
<widget class="GtkFrame" id="frame29">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -3393,13 +3381,13 @@
<child>
<widget class="GtkTable" id="table17">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">4</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkSpinButton" id="spin_image_padv">
@@ -3537,11 +3525,10 @@
<widget class="GtkHBox" id="hbox13">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">12</property>
<child>
<widget class="GtkFrame" id="frame27">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -3556,6 +3543,7 @@
<child>
<widget class="GnomePixmapEntry" id="pentry_image_location">
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="max_saved">10</property>
<property name="modal">False</property>
@@ -3636,7 +3624,6 @@
<child>
<widget class="GtkFrame" id="frame28">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -3644,13 +3631,13 @@
<child>
<widget class="GtkTable" id="table18">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">3</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">4</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkSpinButton" id="spin_image_width">
@@ -3871,7 +3858,6 @@
<child>
<widget class="GtkFrame" id="frame26">
- <property name="border_width">2</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
@@ -3879,13 +3865,13 @@
<child>
<widget class="GtkTable" id="table21">
- <property name="border_width">2</property>
+ <property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">3</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">2</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">12</property>
<child>
<widget class="GtkEntry" id="entry_image_url">
Index: link.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/link.c,v
retrieving revision 1.27
diff -u -p -r1.27 link.c
--- link.c 13 Jan 2003 15:55:54 -0000 1.27
+++ link.c 2 May 2003 16:53:13 -0000
@@ -33,6 +33,7 @@
#include "properties.h"
#include "link.h"
+#include "utils.h"
struct _GtkHTMLEditLinkProperties {
GtkHTMLControlData *cd;
@@ -76,14 +77,42 @@ set_ui (GtkHTMLEditLinkProperties *data)
g_free (url);
}
+static gboolean stock_test_url_added = FALSE;
+#define GTKHTML_STOCK_TEST_URL "gtkhtml-stock-test-url"
+static GtkStockItem test_url_items [] =
+{
+ { GTKHTML_STOCK_TEST_URL, N_("Test URL..."), 0, 0, NULL }
+};
+
static GtkWidget *
link_widget (GtkHTMLEditLinkProperties *data, gboolean insert)
{
GtkHTMLControlData *cd = data->cd;
GtkWidget *vbox, *hbox, *button, *frame, *f1;
- vbox = gtk_vbox_new (FALSE, 3);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
+ if (!stock_test_url_added) {
+ GdkPixbuf *pixbuf;
+ GError *error = NULL;
+
+ pixbuf = gdk_pixbuf_new_from_file (ICONDIR "/insert-link-16.png", &error);
+ if (!pixbuf) {
+ g_error_free (error);
+ } else {
+ GtkIconSet *test_url_iconset = gtk_icon_set_new_from_pixbuf (pixbuf);
+
+ if (test_url_iconset) {
+ GtkIconFactory *factory = gtk_icon_factory_new ();
+
+ gtk_icon_factory_add (factory, GTKHTML_STOCK_TEST_URL, test_url_iconset);
+ gtk_icon_factory_add_default (factory);
+ }
+ gtk_stock_add_static (test_url_items, G_N_ELEMENTS (test_url_items));
+ }
+ stock_test_url_added = TRUE;
+ }
+
+ vbox = gtk_vbox_new (FALSE, 6);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
data->entry_text = gtk_entry_new ();
data->entry_url = gtk_entry_new ();
@@ -91,7 +120,7 @@ link_widget (GtkHTMLEditLinkProperties *
frame = gtk_frame_new (_("Link text"));
f1 = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (f1), GTK_SHADOW_NONE);
- gtk_container_set_border_width (GTK_CONTAINER (f1), 3);
+ gtk_container_set_border_width (GTK_CONTAINER (f1), 6);
gtk_container_add (GTK_CONTAINER (f1), data->entry_text);
gtk_container_add (GTK_CONTAINER (frame), f1);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
@@ -107,9 +136,9 @@ link_widget (GtkHTMLEditLinkProperties *
frame = gtk_frame_new (_("Click will follow this URL"));
f1 = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (f1), GTK_SHADOW_NONE);
- gtk_container_set_border_width (GTK_CONTAINER (f1), 3);
- hbox = gtk_hbox_new (FALSE, 5);
- button = gtk_button_new_with_label (_("Test URL..."));
+ gtk_container_set_border_width (GTK_CONTAINER (f1), 6);
+ hbox = gtk_hbox_new (FALSE, 12);
+ button = gtk_button_new_from_stock (GTKHTML_STOCK_TEST_URL);
gtk_box_pack_start (GTK_BOX (hbox), data->entry_url, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_container_add (GTK_CONTAINER (f1), hbox);
Index: menubar.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/menubar.c,v
retrieving revision 1.85
diff -u -p -r1.85 menubar.c
--- menubar.c 29 Apr 2003 18:58:06 -0000 1.85
+++ menubar.c 2 May 2003 16:53:13 -0000
@@ -225,7 +225,7 @@ insert_file_dialog (GtkHTMLControlData *
return;
}
- cd->file_dialog = gtk_file_selection_new (html ? _("Insert HTML file") : _("Insert text file"));
+ cd->file_dialog = gtk_file_selection_new (html ? _("Insert: HTML File") : _("Insert: Text File"));
gtk_file_selection_set_filename (GTK_FILE_SELECTION (cd->file_dialog), "~/");
g_signal_connect_object (GTK_FILE_SELECTION (cd->file_dialog)->cancel_button,
Index: paragraph.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/paragraph.c,v
retrieving revision 1.18
diff -u -p -r1.18 paragraph.c
--- paragraph.c 24 Mar 2003 18:20:30 -0000 1.18
+++ paragraph.c 2 May 2003 16:53:13 -0000
@@ -107,13 +107,13 @@ paragraph_properties (GtkHTMLControlData
data->flow = HTML_CLUEFLOW (cd->html->engine->cursor->object->parent);
table = gtk_table_new (2, 2, FALSE);
- gtk_container_set_border_width (GTK_CONTAINER (table), 3);
- gtk_table_set_col_spacings (GTK_TABLE (table), 3);
- gtk_table_set_row_spacings (GTK_TABLE (table), 2);
+ gtk_container_set_border_width (GTK_CONTAINER (table), 12);
+ gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+ gtk_table_set_row_spacings (GTK_TABLE (table), 4);
frame = gtk_frame_new (_("Style"));
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 3);
+ hbox = gtk_hbox_new (FALSE, 12);
+ gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
menu = gtk_menu_new ();
#undef ADD_ITEM
@@ -147,8 +147,8 @@ paragraph_properties (GtkHTMLControlData
gtk_table_attach (GTK_TABLE (table), frame, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
frame = gtk_frame_new (_("Align"));
- hbox = gtk_hbox_new (FALSE, 3);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 3);
+ hbox = gtk_hbox_new (FALSE, 12);
+ gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
#define ADD_RADIO(x,a) \
radio = gtk_radio_button_new_with_label (group, x); \
Index: properties.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/properties.c,v
retrieving revision 1.26
diff -u -p -r1.26 properties.c
--- properties.c 15 Jan 2003 17:25:12 -0000 1.26
+++ properties.c 2 May 2003 16:53:13 -0000
@@ -113,12 +113,33 @@ dialog_response (GtkDialog *dialog, gint
}
}
+static gboolean stock_insert_added = FALSE;
+#define GTKHTML_STOCK_INSERT "gtkhtml-stock-insert"
+static GtkStockItem insert_items [] =
+{
+ { GTKHTML_STOCK_INSERT, N_("Insert"), 0, 0, NULL }
+};
+
GtkHTMLEditPropertiesDialog *
gtk_html_edit_properties_dialog_new (GtkHTMLControlData *cd, gboolean insert, gchar *title, gchar *icon_path)
{
GtkHTMLEditPropertiesDialog *d = g_new (GtkHTMLEditPropertiesDialog, 1);
+ GtkWidget *vbox;
GtkWindow *parent;
+ if (insert && !stock_insert_added) {
+ GtkIconSet *jumpto = gtk_icon_factory_lookup_default (GTK_STOCK_JUMP_TO);
+
+ if (jumpto) {
+ GtkIconFactory *factory = gtk_icon_factory_new ();
+
+ gtk_icon_factory_add (factory, GTKHTML_STOCK_INSERT, jumpto);
+ gtk_icon_factory_add_default (factory);
+ }
+ gtk_stock_add_static (insert_items, G_N_ELEMENTS (insert_items));
+ stock_insert_added = TRUE;
+ }
+
d->page_data = NULL;
d->title = g_strdup (title);
d->insert = insert;
@@ -126,17 +147,25 @@ gtk_html_edit_properties_dialog_new (Gtk
parent = get_parent_window (GTK_WIDGET (cd->html));
d->dialog = insert ? gtk_dialog_new_with_buttons (title, parent, 0,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
- _("Insert"), 1,
+ GTKHTML_STOCK_INSERT, 1,
NULL)
: gtk_dialog_new_with_buttons (title, parent, 0,
GTK_STOCK_APPLY, 1,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
GTK_STOCK_OK, 0,
NULL);
+
+ gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (d->dialog)->vbox), 6);
+ gtk_container_set_border_width (GTK_CONTAINER (d->dialog), 6);
+
d->notebook = gtk_notebook_new ();
g_signal_connect (d->dialog, "destroy", G_CALLBACK (destroy_dialog), d);
g_signal_connect (d->notebook, "switch_page", G_CALLBACK (switch_page), d);
- gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (d->dialog)->vbox), d->notebook);
+ vbox = gtk_vbox_new (FALSE, 6);
+ gtk_widget_show (vbox);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
+ gtk_box_pack_start_defaults (GTK_BOX (vbox), d->notebook);
+ gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (d->dialog)->vbox), vbox);
gtk_widget_show (d->notebook);
g_signal_connect (d->dialog, "response", G_CALLBACK (dialog_response), d);
@@ -145,6 +174,7 @@ gtk_html_edit_properties_dialog_new (Gtk
gtk_dialog_set_response_sensitive (GTK_DIALOG (d->dialog), 0, FALSE);
if (!insert)
gtk_dialog_set_response_sensitive (GTK_DIALOG (d->dialog), 1, FALSE);
+ gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (d->dialog)->vbox), 6);
return d;
}
@@ -199,6 +229,8 @@ gtk_html_edit_properties_dialog_show (Gt
if (g_list_length (d->page_data) <= 1) {
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (d->notebook), FALSE);
gtk_notebook_set_show_border (GTK_NOTEBOOK (d->notebook), FALSE);
+ if (g_list_length (d->page_data) == 1)
+ gtk_container_set_border_width (GTK_CONTAINER (gtk_notebook_get_nth_page (GTK_NOTEBOOK (d->notebook), 0)), 0);
}
gtk_widget_show (d->dialog);
}
Index: replace.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/replace.c,v
retrieving revision 1.16
diff -u -p -r1.16 replace.c
--- replace.c 14 Apr 2003 14:40:36 -0000 1.16
+++ replace.c 2 May 2003 16:53:13 -0000
@@ -145,7 +145,7 @@ GtkHTMLReplaceDialog *
gtk_html_replace_dialog_new (GtkHTML *html, GtkHTMLControlData *cd)
{
GtkHTMLReplaceDialog *dialog = g_new (GtkHTMLReplaceDialog, 1);
- GtkWidget *hbox;
+ GtkWidget *hbox, *vbox;
GtkWidget *table;
GtkWidget *label;
@@ -183,11 +183,15 @@ gtk_html_replace_dialog_new (GtkHTML *ht
gtk_box_pack_start (GTK_BOX (hbox), dialog->backward, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), dialog->case_sensitive, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (dialog->dialog->vbox), table, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (dialog->dialog->vbox), hbox, FALSE, FALSE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (dialog->dialog->vbox), 6);
+ vbox = gtk_vbox_new (FALSE, 6);
+ gtk_widget_show (vbox);
+ gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (dialog->dialog), 6);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
+ gtk_container_set_border_width (GTK_CONTAINER (dialog->dialog->vbox), 6);
+ gtk_box_set_spacing (GTK_BOX (dialog->dialog->vbox), 6);
+ gtk_box_pack_start (GTK_BOX (dialog->dialog->vbox), vbox, FALSE, FALSE, 0);
gtk_widget_show_all (table);
gtk_widget_show_all (hbox);
Index: search.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/search.c,v
retrieving revision 1.20
diff -u -p -r1.20 search.c
--- search.c 14 Apr 2003 14:40:36 -0000 1.20
+++ search.c 2 May 2003 16:53:13 -0000
@@ -68,7 +68,7 @@ GtkHTMLSearchDialog *
gtk_html_search_dialog_new (GtkHTML *html, GtkHTMLControlData *cd)
{
GtkHTMLSearchDialog *dialog = g_new (GtkHTMLSearchDialog, 1);
- GtkWidget *hbox;
+ GtkWidget *hbox, *vbox;
dialog->dialog = GTK_DIALOG (gtk_dialog_new_with_buttons (_("Find"), NULL, 0,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
@@ -88,11 +88,15 @@ gtk_html_search_dialog_new (GtkHTML *htm
gtk_box_pack_start (GTK_BOX (hbox), dialog->backward, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), dialog->case_sensitive, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (dialog->dialog->vbox), dialog->entry, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (dialog->dialog->vbox), hbox, FALSE, FALSE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (dialog->dialog->vbox), 6);
+ vbox = gtk_vbox_new (FALSE, 6);
+ gtk_widget_show (vbox);
+ gtk_box_pack_start (GTK_BOX (vbox), dialog->entry, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (dialog->dialog), 6);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
+ gtk_container_set_border_width (GTK_CONTAINER (dialog->dialog->vbox), 6);
+ gtk_box_set_spacing (GTK_BOX (dialog->dialog->vbox), 6);
+ gtk_box_pack_start (GTK_BOX (dialog->dialog->vbox), vbox, FALSE, FALSE, 0);
gtk_widget_show (dialog->entry);
gtk_widget_show_all (hbox);
Index: table.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/table.c,v
retrieving revision 1.41
diff -u -p -r1.41 table.c
--- table.c 13 Jan 2003 15:55:54 -0000 1.41
+++ table.c 2 May 2003 16:53:13 -0000
@@ -578,7 +578,7 @@ table_widget (GtkHTMLEditTableProperties
UPPER_FIX (cols);
UPPER_FIX (rows);
- gtk_box_pack_start (GTK_BOX (table_page), sample_frame (&d->sample), FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (table_page), sample_frame (&d->sample), TRUE, TRUE, 0);
gtk_widget_show_all (table_page);
/* RM2 gdk_color_alloc (gdk_window_get_colormap (d->cd->html->engine->window), &d->bg_color); */
@@ -644,7 +644,7 @@ table_insert_widget (GtkHTMLEditTablePro
g_signal_connect (gtk_option_menu_get_menu (GTK_OPTION_MENU (d->option_template)), "selection-done",
G_CALLBACK (changed_template), d);
fill_templates (d);
- gtk_box_pack_start (GTK_BOX (table_page), sample_frame (&d->sample), FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (table_page), sample_frame (&d->sample), TRUE, TRUE, 0);
gtk_widget_show_all (table_page);
Index: text.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/text.c,v
retrieving revision 1.38
diff -u -p -r1.38 text.c
--- text.c 13 Jan 2003 16:35:53 -0000 1.38
+++ text.c 2 May 2003 16:53:13 -0000
@@ -213,14 +213,14 @@ text_properties (GtkHTMLControlData *cd,
html_color_ref (data->color);
table = gtk_table_new (3, 2, FALSE);
- gtk_container_set_border_width (GTK_CONTAINER (table), 3);
- gtk_table_set_col_spacings (GTK_TABLE (table), 3);
- gtk_table_set_row_spacings (GTK_TABLE (table), 2);
+ gtk_container_set_border_width (GTK_CONTAINER (table), 12);
+ gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+ gtk_table_set_row_spacings (GTK_TABLE (table), 4);
- vbox = gtk_vbox_new (FALSE, 0);
+ vbox = gtk_vbox_new (FALSE, 6);
frame = gtk_frame_new (_("Style"));
t1 = gtk_table_new (2, 2, FALSE);
- gtk_container_set_border_width (GTK_CONTAINER (t1), 3);
+ gtk_container_set_border_width (GTK_CONTAINER (t1), 6);
#define ADD_CHECK(x,c,r) \
data->check [i] = gtk_check_button_new_with_label (x); \
@@ -248,7 +248,7 @@ text_properties (GtkHTMLControlData *cd,
gtk_entry_set_text (GTK_ENTRY (data->entry_url), data->url);
}
f1 = gtk_frame_new (NULL);
- gtk_container_set_border_width (GTK_CONTAINER (f1), 3);
+ gtk_container_set_border_width (GTK_CONTAINER (f1), 6);
gtk_frame_set_shadow_type (GTK_FRAME (f1), GTK_SHADOW_NONE);
gtk_container_add (GTK_CONTAINER (f1), data->entry_url);
gtk_container_add (GTK_CONTAINER (frame), f1);
@@ -282,15 +282,15 @@ text_properties (GtkHTMLControlData *cd,
gtk_option_menu_set_menu (GTK_OPTION_MENU (data->sel_size), menu);
gtk_option_menu_set_history (GTK_OPTION_MENU (data->sel_size), get_size (data->style_or));
vbox = gtk_vbox_new (FALSE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_box_pack_start (GTK_BOX (vbox), data->sel_size, FALSE, FALSE, 0);
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_table_attach (GTK_TABLE (table), frame, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
/* color selection */
frame = gtk_frame_new (_("Color"));
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 3);
+ hbox = gtk_hbox_new (FALSE, 12);
+ gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
data->color_combo = color_combo_new (NULL, _("Automatic"),
&data->color->color,
Index: utils.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/utils.c,v
retrieving revision 1.11
diff -u -p -r1.11 utils.c
--- utils.c 11 Nov 2002 13:40:35 -0000 1.11
+++ utils.c 2 May 2003 16:53:13 -0000
@@ -106,12 +106,11 @@ sample_frame (GtkHTML **html)
*html = GTK_HTML (gtk_html_new ());
scroll_frame = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll_frame), GTK_SHADOW_IN);
- gtk_container_set_border_width (GTK_CONTAINER (scroll_frame), 3);
+ gtk_container_set_border_width (GTK_CONTAINER (scroll_frame), 6);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll_frame), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (scroll_frame), GTK_WIDGET (*html));
gtk_container_add (GTK_CONTAINER (frame), scroll_frame);
g_signal_connect (*html, "url_requested", G_CALLBACK (url_requested), NULL);
- gtk_widget_set_size_request (frame, -1, 120);
return frame;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]