Commit cd605b70 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

hook up the hyperlink dialog.


2002-10-01  Jody Goldberg <jody@gnome.org>

	* src/workbook-control-gui.c (cb_insert_hyperlink) : hook up the
	  hyperlink dialog.

	* src/sheet-control-gui.c (context_menu_handler) : adjust to new
	  calling convention for dialog_hyperlink.

2002-09-30  Jody Goldberg <jody@gnome.org>

	* src/application.c (gnumeric_application_setup_icons) : add the new
	  icons.
	* src/pixmaps/Makefile.am : add the new protection icons

2002-09-30  Jody Goldberg <jody@gnome.org>

	Patch from : dorami@bu.iij4u.or.jp
	* src/gnumeric-canvas.c : re-enable IM support.

2002-09-30  Jody Goldberg <jody@gnome.org>

	* src/workbook-control-gui.c (cb_editline_focus_in) : give the entry a
	  chance to handle the focus-in too.
parent 007e5427
......@@ -29,7 +29,7 @@ Release Critical
1) graphs
2) stf
3) finish hlink
3) finish hlink dialog
4) finish support for h/v only splits
5) zip based format
5.1) move existing code into plugin
......@@ -48,6 +48,7 @@ Release Critical
16) some handling of external references
17) fix highlighting of completion code
18) look into using the default gtk font rather than our own
19) audit all of the import plugins to do utf8 conversions
Pending Patches
---------------
......
2002-10-01 Jody Goldberg <jody@gnome.org>
* src/workbook-control-gui.c (cb_insert_hyperlink) : hook up the
hyperlink dialog.
* src/sheet-control-gui.c (context_menu_handler) : adjust to new
calling convention for dialog_hyperlink.
2002-09-30 Jody Goldberg <jody@gnome.org>
* src/application.c (gnumeric_application_setup_icons) : add the new
icons.
* src/pixmaps/Makefile.am : add the new protection icons
2002-09-30 Jody Goldberg <jody@gnome.org>
Patch from : dorami@bu.iij4u.or.jp
......
2002-10-01 Jody Goldberg <jody@gnome.org>
* src/workbook-control-gui.c (cb_insert_hyperlink) : hook up the
hyperlink dialog.
* src/sheet-control-gui.c (context_menu_handler) : adjust to new
calling convention for dialog_hyperlink.
2002-09-30 Jody Goldberg <jody@gnome.org>
* src/application.c (gnumeric_application_setup_icons) : add the new
icons.
* src/pixmaps/Makefile.am : add the new protection icons
2002-09-30 Jody Goldberg <jody@gnome.org>
Patch from : dorami@bu.iij4u.or.jp
......
2002-10-01 Jody Goldberg <jody@gnome.org>
* src/workbook-control-gui.c (cb_insert_hyperlink) : hook up the
hyperlink dialog.
* src/sheet-control-gui.c (context_menu_handler) : adjust to new
calling convention for dialog_hyperlink.
2002-09-30 Jody Goldberg <jody@gnome.org>
* src/application.c (gnumeric_application_setup_icons) : add the new
icons.
* src/pixmaps/Makefile.am : add the new protection icons
2002-09-30 Jody Goldberg <jody@gnome.org>
Patch from : dorami@bu.iij4u.or.jp
......
......@@ -18,6 +18,12 @@ else
CORBA_DIR =
endif
if WITH_BONOBO
BONOBO_PLUGINS = uihello
else
BONOBO_PLUGINS =
endif
if WITH_PERL
PERL_DIR = perl
else
......@@ -61,6 +67,6 @@ SUBDIRS_LOADERS = $(PYTHON_LOADER_DIR) $(CORBA_DIR)
SUBDIRS_DATA_SOURCES = sample_datasource
SUBDIRS_EXAMPLES = $(GNOME_GLOSSARY_DIR) $(PYFUNC_DIR) uihello
SUBDIRS_EXAMPLES = $(GNOME_GLOSSARY_DIR) $(PYFUNC_DIR) $(BONOBO_PLUGINS)
SUBDIRS = $(SUBDIRS_FILE_FORMATS) $(SUBDIRS_FUNCTIONS) $(SUBDIRS_LOADERS) $(SUBDIRS_DATA_SOURCES) $(SUBDIRS_EXAMPLES)
......@@ -414,8 +414,8 @@ applix_parse_style (ApplixReadState *state, unsigned char **buffer)
/* Allocate the new style */
style = mstyle_new_default ();
mstyle_set_content_hidden (style, is_protected);
mstyle_set_content_locked (style, is_invisible);
mstyle_set_content_locked (style, is_protected);
mstyle_set_content_hidden (style, is_invisible);
if (sep[1] == '\'')
sep += 2;
......
......@@ -7,14 +7,14 @@
<loader type="Gnumeric_Builtin:module">
<attribute name="module_file" value="python_loader.la"/>
</loader>
<!--
<services>
<service type="plugin_loader" id="python"></service>
<!--
<service type="ui" id="console" file="ui-console-menu.xml">
<verbs>
<verb name="ShowConsole" id="console"/>
</verbs>
</service>
</services>
-->
</services>
</plugin>
......@@ -593,8 +593,8 @@ gnumeric_application_setup_icons (void)
{ gnm_object_radiobutton_24, NULL, "Gnumeric_ObjectRadiobutton" },
{ gnm_object_scrollbar_24, NULL, "Gnumeric_ObjectScrollbar" },
{ gnm_padlock, NULL, "Gnumeric_Padlock" },
{ gnm_padlock_no, NULL, "Gnumeric_PadlockNo" },
{ gnm_protection_yes, NULL, "Gnumeric_Protection_Yes" },
{ gnm_protection_no, NULL, "Gnumeric_Protection_No" },
{ gnm_link_add_24, gnm_link_add_16, "Gnumeric_Link_Add" },
{ NULL, gnm_link_delete_16, "Gnumeric_Link_Delete" },
......
2002-10-01 Jody Goldberg <jody@gnome.org>
* dialog-hyperlink.c (dialog_hyperlink) : tweak calling conventions.
2002-09-30 Morten Welinder <terra@diku.dk>
* dialog-search.c (dialog_search): Port to treestore. (Not
......
......@@ -25,6 +25,9 @@
#include <gui-util.h>
#include <hlink.h>
#include <sheet-control.h>
#include <sheet-view.h>
#include <sheet-style.h>
#include <workbook-edit.h>
#include <gnumeric-i18n.h>
......@@ -232,9 +235,12 @@ dialog_hyperlink_init (HyperlinkState *state)
#define GLADE_FILE "hyperlink.glade"
#define DIALOG_KEY "hyperlink-dialog"
void
dialog_hyperlink (WorkbookControlGUI *wbcg, GnmHLink *link)
dialog_hyperlink (WorkbookControlGUI *wbcg, SheetControl *sc)
{
HyperlinkState* state;
GnmHLink *link = NULL;
Sheet *sheet;
GList *ptr;
g_return_if_fail (wbcg != NULL);
......@@ -261,6 +267,11 @@ dialog_hyperlink (WorkbookControlGUI *wbcg, GnmHLink *link)
state->dialog = glade_xml_get_widget (state->gui, "hyperlink-dialog");
sheet = sc_sheet (sc);
for (ptr = sc_view (sc)->selections; ptr != NULL; ptr = ptr->next)
if (NULL != (link = sheet_style_region_contains_link (sheet, ptr->data)))
break;
state->link = NULL;
if (link != NULL)
last_link_type = G_OBJECT_TYPE (link);
......
......@@ -876,11 +876,11 @@ dialog_sheet_order (WorkbookControlGUI *wbcg)
state->old_order = NULL;
state->initial_colors_set = FALSE;
state->image_padlock = gtk_widget_render_icon (state->dialog,
"Gnumeric_Padlock",
"Gnumeric_Protection_Yes",
GTK_ICON_SIZE_LARGE_TOOLBAR,
"Gnumeric-Sheet-Manger");
state->image_padlock_no = gtk_widget_render_icon (state->dialog,
"Gnumeric_PadlockNo",
"Gnumeric_Protection_No",
GTK_ICON_SIZE_LARGE_TOOLBAR,
"Gnumeric-Sheet-Manger");
......
......@@ -49,7 +49,7 @@ void dialog_consolidate (WorkbookControlGUI *wbcg);
void dialog_sheet_order (WorkbookControlGUI *wbcg);
void dialog_row_height (WorkbookControlGUI *wbcg, gboolean set_default);
void dialog_col_width (WorkbookControlGUI *wbcg, gboolean set_default);
void dialog_hyperlink (WorkbookControlGUI *wbcg, GnmHLink *link);
void dialog_hyperlink (WorkbookControlGUI *wbcg, SheetControl *sc);
typedef void (* ColRowCallback_t) (WorkbookControlGUI *wbcg, gboolean is_cols, gpointer data);
GtkWidget *dialog_col_row (WorkbookControlGUI *wbcg, char const *operation,
......
......@@ -612,31 +612,6 @@ gnm_canvas_preedit_changed_cb (GtkIMContext *context, GnumericCanvas *gcanvas)
g_free (preedit_string);
}
static gboolean
gnm_canvas_retrieve_surrounding_cb (GtkIMContext *context, GnumericCanvas *gcanvas)
{
#if 0
gtk_im_context_set_surrounding (context,
entry->text,
entry->n_bytes,
g_utf8_offset_to_pointer (entry->text, entry->current_pos) - entry->text);
#endif
return FALSE;
}
static gboolean
gnm_canvas_delete_surrounding_cb (GtkIMContext *slave, gint offset, gint n_chars, GnumericCanvas *gcanvas)
{
#if 0
gtk_editable_delete_text (GTK_EDITABLE (entry),
entry->current_pos + offset,
entry->current_pos + offset + n_chars);
#endif
return TRUE;
}
static void
gnm_canvas_init (GnumericCanvas *gcanvas)
{
......@@ -664,8 +639,6 @@ gnm_canvas_init (GnumericCanvas *gcanvas)
G_CALLBACK (gnm_canvas_preedit_changed_cb), gcanvas);
g_signal_connect (G_OBJECT (gcanvas->im_context), "retrieve_surrounding",
G_CALLBACK (gnm_canvas_retrieve_surrounding_cb), gcanvas);
g_signal_connect (G_OBJECT (gcanvas->im_context), "delete_surrounding",
G_CALLBACK (gnm_canvas_delete_surrounding_cb), gcanvas);
GTK_WIDGET_SET_FLAGS (canvas, GTK_CAN_FOCUS);
......
......@@ -68,8 +68,8 @@ IMAGES = @STRIP_BEGIN@ \
border_top_n_double_bottom.xpm \
border_top_n_thick_bottom.xpm \
\
padlock.xpm \
padlock_no.xpm \
protection_no_24.png \
protection_yes_24.png \
\
link_add_16.png link_add_24.png \
link_delete_16.png \
......@@ -170,8 +170,8 @@ VARIABLES = @STRIP_BEGIN@ \
gnm_border_top_n_double_bottom $(srcdir)/border_top_n_double_bottom.xpm \
gnm_border_top_n_thick_bottom $(srcdir)/border_top_n_thick_bottom.xpm \
\
gnm_padlock $(srcdir)/padlock.xpm \
gnm_padlock_no $(srcdir)/padlock_no.xpm \
gnm_protection_no $(srcdir)/protection_no_24.png \
gnm_protection_yes $(srcdir)/protection_yes_24.png \
\
gnm_link_add_16 $(srcdir)/link_add_16.png \
gnm_link_add_24 $(srcdir)/link_add_24.png \
......
/* XPM */
static char * padlock[] = {
"24 24 137 2",
" c None",
". c #BBBBBB",
"+ c #A9A9A9",
"@ c #A0A0A0",
"# c #BABABA",
"$ c #B8B8B8",
"% c #B4B4B4",
"& c #7D7D7D",
"* c #A8A8A8",
"= c #9E9E9E",
"- c #A2937B",
"; c #B4A994",
"> c #B3AA9A",
", c #797979",
"' c #8D8D8D",
") c #A4957B",
"! c #C8B89A",
"~ c #DFD1B7",
"{ c #D7CBB6",
"] c #C2B297",
"^ c #89795F",
"/ c #0F0C09",
"( c #919191",
"_ c #5C5C5C",
": c #A6977C",
"< c #C6B597",
"[ c #E1D1B6",
"} c #E5D8C2",
"| c #CFBFA4",
"1 c #B8A486",
"2 c #9A886B",
"3 c #88765A",
"4 c #3E3930",
"5 c #6D6D6D",
"6 c #2E2E2E",
"7 c #A3947A",
"8 c #C6B496",
"9 c #DECDB1",
"0 c #E7DAC5",
"a c #D2C2A8",
"b c #BFAB8C",
"c c #A79475",
"d c #998567",
"e c #8A765A",
"f c #6E5E46",
"g c #2B2A29",
"h c #0B0B0B",
"i c #A5967A",
"j c #C5B395",
"k c #DBCAAC",
"l c #E6D8C3",
"m c #D6C8AF",
"n c #C2AE8E",
"o c #AF9C7D",
"p c #9A8669",
"q c #907C5F",
"r c #7D6A4E",
"s c #625139",
"t c #30271B",
"u c #000000",
"v c #92846B",
"w c #BCAC8F",
"x c #C9B99A",
"y c #DACEB8",
"z c #DACCB5",
"A c #C4B192",
"B c #B5A283",
"C c #9D896C",
"D c #917D60",
"E c #806D50",
"F c #6C593F",
"G c #55452F",
"H c #211A10",
"I c #877B63",
"J c #92846C",
"K c #AEA089",
"L c #CEC2AC",
"M c #BAA88C",
"N c #A18E6F",
"O c #937F62",
"P c #847054",
"Q c #725F44",
"R c #5E4C34",
"S c #483925",
"T c #040301",
"U c #6D6350",
"V c #716652",
"W c #6E644F",
"X c #92846A",
"Y c #9C8A6E",
"Z c #907C60",
"` c #867356",
" . c #766246",
".. c #655339",
"+. c #50402A",
"@. c #2D2316",
"#. c #4F493C",
"$. c #685F4C",
"%. c #625946",
"&. c #5A513E",
"*. c #695E4A",
"=. c #685D48",
"-. c #7C6B51",
";. c #736045",
">. c #6A563D",
",. c #56462F",
"'. c #433421",
"). c #0D0A05",
"!. c #4F493B",
"~. c #4D4536",
"{. c #433C2C",
"]. c #605643",
"^. c #655B48",
"/. c #625845",
"(. c #66563E",
"_. c #5A4830",
":. c #493925",
"<. c #281F12",
"[. c #403A2F",
"}. c #5C5443",
"|. c #796E59",
"1. c #665C49",
"2. c #645A46",
"3. c #5B5240",
"4. c #4D3E2A",
"5. c #3B2D1A",
"6. c #15130F",
"7. c #3D372C",
"8. c #534A3B",
"9. c #50483A",
"0. c #4D4636",
"a. c #443B2B",
"b. c #161008",
"c. c #030202",
"d. c #15110C",
"e. c #1F1B14",
"f. c #1C1812",
" ",
" ",
" ",
" ",
" ",
" . + @ # $ ",
" % & * = ",
" - ; > , ' ",
" ) ! ~ { ] ^ / ( _ ",
" : < [ } | 1 2 3 4 5 6 ",
" 7 8 9 0 a b c d e f g h ",
" i j k l m n o p q r s t u ",
" v w x y z A B C D E F G H u ",
" I J K L M 1 N O P Q R S T u ",
" U V W W X Y Z ` ...+.@.u u ",
" #.$.%.&.*.=.-.;.>.,.'.).u ",
" u !.~.{.].^./.(._.:.<.u u ",
" u [.}.|.1.2.3.4.5.T u u ",
" u u 6.7.8.9.0.a.b.u u ",
" u u c.d.e.f.u u ",
" u u u u u u ",
" ",
" ",
" "};
/* XPM */
static char * padlock_no[] = {
"24 24 119 2",
" c None",
". c #FF0000",
"+ c #B77777",
"@ c #A0A0A0",
"# c #BABABA",
"$ c #B8B8B8",
"% c #CB1E1E",
"& c #A8A8A8",
"* c #9E9E9E",
"= c #F5302A",
"- c #797979",
"; c #8D8D8D",
"> c #FD0000",
", c #FA3732",
"' c #D7CBB6",
") c #C2B297",
"! c #89795F",
"~ c #0F0C09",
"{ c #919191",
"] c #5C5C5C",
"^ c #F40000",
"/ c #F53129",
"( c #CFBFA4",
"_ c #B8A486",
": c #9A886B",
"< c #88765A",
"[ c #3E3930",
"} c #6D6D6D",
"| c #2E2E2E",
"1 c #E89D88",
"2 c #F93732",
"3 c #EF2B23",
"4 c #A79475",
"5 c #998567",
"6 c #8A765A",
"7 c #6E5E46",
"8 c #2B2A29",
"9 c #0B0B0B",
"0 c #F80000",
"a c #EF6859",
"b c #E6D8C3",
"c c #D6C8AF",
"d c #B3654F",
"e c #907C5F",
"f c #7D6A4E",
"g c #625139",
"h c #30271B",
"i c #000000",
"j c #E40B08",
"k c #F22F28",
"l c #DACEB8",
"m c #DACCB5",
"n c #C4B192",
"o c #C87A62",
"p c #A0523C",
"q c #6C593F",
"r c #55452F",
"s c #211A10",
"t c #B86F5F",
"u c #CEC2AC",
"v c #BAA88C",
"w c #A18E6F",
"x c #AE5F4A",
"y c #863827",
"z c #483925",
"A c #040301",
"B c #F70000",
"C c #B83329",
"D c #6E644F",
"E c #92846A",
"F c #9C8A6E",
"G c #907C60",
"H c #867356",
"I c #984A34",
"J c #D2100A",
"K c #2D2316",
"L c #DB1714",
"M c #685F4C",
"N c #625946",
"O c #5A513E",
"P c #695E4A",
"Q c #685D48",
"R c #7C6B51",
"S c #736045",
"T c #6A563D",
"U c #D6120C",
"V c #990000",
"W c #4F493B",
"X c #4D4536",
"Y c #433C2C",
"Z c #605643",
"` c #655B48",
" . c #625845",
".. c #66563E",
"+. c #5A4830",
"@. c #493925",
"#. c #CE0B06",
"$. c #F90000",
"%. c #AB0000",
"&. c #403A2F",
"*. c #5C5443",
"=. c #796E59",
"-. c #665C49",
";. c #645A46",
">. c #5B5240",
",. c #4D3E2A",
"'. c #3B2D1A",
"). c #FA0000",
"!. c #15130F",
"~. c #3D372C",
"{. c #534A3B",
"]. c #50483A",
"^. c #4D4636",
"/. c #443B2B",
"(. c #161008",
"_. c #030202",
":. c #15110C",
"<. c #1F1B14",
"[. c #1C1812",
" . . ",
" . . ",
" . . . . ",
" . . . . ",
" . . . . . ",
" . . . . + @ # $ ",
" . . . . % & * ",
" . . . . = - ; ",
" > . . , ' ) ! ~ { ] ",
" ^ . / . . ( _ : < [ } | ",
" . . 1 2 . 3 4 5 6 7 8 9 ",
" 0 . a b c . . d e f g h i ",
" j . k l m n o . . p q r s i ",
" . . t u v _ w x . . y z A i ",
" B . C D D E F G H I . J K i i ",
" . L M N O P Q R S T U . . i ",
" . V W X Y Z ` ...+.@.#.. i ",
" $.. %.i &.*.=.-.;.>.,.'.A i i ",
" ).. i i !.~.{.].^./.(.i i ",
" > . i i _.:.<.[.i i ",
" . . i i i i i i ",
" ",
" ",
" "};
......@@ -1320,8 +1320,6 @@ context_menu_handler (GnumericPopupMenuElement const *element,
Sheet *sheet = sc->sheet;
WorkbookControlGUI *wbcg = scg->wbcg;
WorkbookControl *wbc = sc->wbc;
GnmHLink *link = NULL;
GList *l;
g_return_val_if_fail (element != NULL, TRUE);
g_return_val_if_fail (IS_SHEET (sheet), TRUE);
......@@ -1377,12 +1375,8 @@ context_menu_handler (GnumericPopupMenuElement const *element,
break;
case CONTEXT_HYPERLINK_EDIT:
for (l = sc->view->selections; l != NULL; l = l->next)
if (NULL != (link = sheet_style_region_contains_link (sheet, l->data)))
break;
/* fall through */
case CONTEXT_HYPERLINK_ADD:
dialog_hyperlink (wbcg, link);
dialog_hyperlink (wbcg, sc);
break;
case CONTEXT_HYPERLINK_REMOVE: {
......
......@@ -2966,6 +2966,7 @@ cb_insert_image (GtkWidget *widget, WorkbookControlGUI *wbcg)
static void
cb_insert_hyperlink (GtkWidget *widget, WorkbookControlGUI *wbcg)
{
dialog_hyperlink (wbcg, SHEET_CONTROL (wbcg_cur_scg (wbcg)));
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment