diff --git a/ChangeLog-1999-07-09 b/ChangeLog-1999-07-09 index 83fedf39c2ee45f04b185056cc8ee33db52c52bb..5300b788cd1f0fec69f5629a89b75cdd2df8a457 100644 --- a/ChangeLog-1999-07-09 +++ b/ChangeLog-1999-07-09 @@ -1,3 +1,18 @@ +1998-11-23 Miguel de Icaza + + * src/dialog-cell-format.c (create_number_format_page): Put the + clist inside a scrolled window for the new CList api. + + * src/dialog-define-names.c (dialog_define_names): ditto. + + * src/dialog-goto-cell.c (dialog_goto_cell): ditto + + +1998-11-23 Marin Purgar + + * src/dialog-cell-format.c: Style general was applied to more + than one cell in various cases. + 1998-11-18 Bruno Unna * src/style.c: added the default italic font as helvetica-oblique. diff --git a/ChangeLog-2000-02-23 b/ChangeLog-2000-02-23 index 83fedf39c2ee45f04b185056cc8ee33db52c52bb..5300b788cd1f0fec69f5629a89b75cdd2df8a457 100644 --- a/ChangeLog-2000-02-23 +++ b/ChangeLog-2000-02-23 @@ -1,3 +1,18 @@ +1998-11-23 Miguel de Icaza + + * src/dialog-cell-format.c (create_number_format_page): Put the + clist inside a scrolled window for the new CList api. + + * src/dialog-define-names.c (dialog_define_names): ditto. + + * src/dialog-goto-cell.c (dialog_goto_cell): ditto + + +1998-11-23 Marin Purgar + + * src/dialog-cell-format.c: Style general was applied to more + than one cell in various cases. + 1998-11-18 Bruno Unna * src/style.c: added the default italic font as helvetica-oblique. diff --git a/OChangeLog-1999-07-09 b/OChangeLog-1999-07-09 index 83fedf39c2ee45f04b185056cc8ee33db52c52bb..5300b788cd1f0fec69f5629a89b75cdd2df8a457 100644 --- a/OChangeLog-1999-07-09 +++ b/OChangeLog-1999-07-09 @@ -1,3 +1,18 @@ +1998-11-23 Miguel de Icaza + + * src/dialog-cell-format.c (create_number_format_page): Put the + clist inside a scrolled window for the new CList api. + + * src/dialog-define-names.c (dialog_define_names): ditto. + + * src/dialog-goto-cell.c (dialog_goto_cell): ditto + + +1998-11-23 Marin Purgar + + * src/dialog-cell-format.c: Style general was applied to more + than one cell in various cases. + 1998-11-18 Bruno Unna * src/style.c: added the default italic font as helvetica-oblique. diff --git a/OChangeLog-2000-02-23 b/OChangeLog-2000-02-23 index 83fedf39c2ee45f04b185056cc8ee33db52c52bb..5300b788cd1f0fec69f5629a89b75cdd2df8a457 100644 --- a/OChangeLog-2000-02-23 +++ b/OChangeLog-2000-02-23 @@ -1,3 +1,18 @@ +1998-11-23 Miguel de Icaza + + * src/dialog-cell-format.c (create_number_format_page): Put the + clist inside a scrolled window for the new CList api. + + * src/dialog-define-names.c (dialog_define_names): ditto. + + * src/dialog-goto-cell.c (dialog_goto_cell): ditto + + +1998-11-23 Marin Purgar + + * src/dialog-cell-format.c: Style general was applied to more + than one cell in various cases. + 1998-11-18 Bruno Unna * src/style.c: added the default italic font as helvetica-oblique. diff --git a/src/cell.c b/src/cell.c index 525e72fefe812b595d119966097ff29a12fe76f1..467bc899e14685e864d3c10bcce51e59bc796020 100644 --- a/src/cell.c +++ b/src/cell.c @@ -1327,10 +1327,12 @@ cell_draw (Cell *cell, void *sv, GdkGC *gc, GdkDrawable *drawable, int x1, int y else do_multi_line = FALSE; +#if 0 if (cell->text) text = cell->text->str; else text = ""; +#endif if (do_multi_line){ GList *lines, *l; diff --git a/src/dialog-cell-format.c b/src/dialog-cell-format.c index 21f7ebd3ee516ffbd11d95f54a61575eef0d65f9..e3153ea2f748c1448c1a57bf7809bcae18c6aef9 100644 --- a/src/dialog-cell-format.c +++ b/src/dialog-cell-format.c @@ -91,7 +91,7 @@ format_list_fill (int n) gtk_clist_clear (cl); for (i = 0; texts [i]; i++){ - char *t [1]; + const gchar *t [1]; t [0] = _(texts [i]); @@ -211,7 +211,6 @@ my_clist_new (void) cl = GTK_CLIST (gtk_clist_new (1)); gtk_clist_column_titles_hide (cl); - gtk_clist_set_policy (cl, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_clist_set_selection_mode (cl,GTK_SELECTION_SINGLE); /* Configure the size */ @@ -236,7 +235,7 @@ static GtkWidget * create_number_format_page (GtkWidget *prop_win, CellList *cells) { StyleFormat *format; - GtkWidget *l; + GtkWidget *l, *scrolled_list; GtkTable *t, *tt; int i; @@ -257,7 +256,9 @@ create_number_format_page (GtkWidget *prop_win, CellList *cells) gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); number_cat_list = my_clist_new (); - gtk_table_attach (t, number_cat_list, 0, 1, BOXES_LINE+1, BOXES_LINE+2, + scrolled_list = gtk_scrolled_window_new (NULL, NULL); + gtk_container_add (GTK_CONTAINER (scrolled_list), number_cat_list); + gtk_table_attach (t, scrolled_list, 0, 1, BOXES_LINE+1, BOXES_LINE+2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 4, 0); /* 1.1 Connect our signal handler */ @@ -267,7 +268,7 @@ create_number_format_page (GtkWidget *prop_win, CellList *cells) /* 1.2 Fill the category list */ gtk_clist_freeze (GTK_CLIST (number_cat_list)); for (i = 0; cell_formats [i].name; i++){ - char *text [1] = { _(cell_formats [i].name) }; + const gchar *text [1] = { _(cell_formats [i].name) }; gtk_clist_append (GTK_CLIST (number_cat_list), text); } @@ -296,11 +297,13 @@ create_number_format_page (GtkWidget *prop_win, CellList *cells) /* 3. Format codes */ number_format_list = my_clist_new (); + scrolled_list = gtk_scrolled_window_new (NULL, NULL); + gtk_container_add (GTK_CONTAINER (scrolled_list), number_format_list); gtk_table_attach (t, l = gtk_label_new (_("Format codes")), 1, 2, BOXES_LINE, BOXES_LINE+1, GTK_FILL | GTK_EXPAND, 0, 0, 0); gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); - gtk_table_attach_defaults (t, number_format_list, 1, 2, BOXES_LINE + 1, BOXES_LINE + 2); + gtk_table_attach_defaults (t, scrolled_list, 1, 2, BOXES_LINE + 1, BOXES_LINE + 2); format_list_fill (0); /* 3.1 connect the signal handled for row selected */ @@ -312,8 +315,7 @@ create_number_format_page (GtkWidget *prop_win, CellList *cells) if (format){ if (!format_find (format->format)) gtk_entry_set_text (GTK_ENTRY (number_input), format->format); - } else - gtk_clist_select_row (GTK_CLIST (number_format_list), 0, 0); + } /* 4. finish */ @@ -327,6 +329,9 @@ apply_number_formats (Style *style, Sheet *sheet, CellList *list) { char *str = gtk_entry_get_text (GTK_ENTRY (number_input)); + if (!strcmp (str, "")) + return; + for (;list; list = list->next){ Cell *cell = list->data; diff --git a/src/dialog-define-names.c b/src/dialog-define-names.c index da927bb76679f974708b8b3103ee9446f51ee66e..7fc7586fa45a8d34d0bc02cff5a45806d15fd7d1 100644 --- a/src/dialog-define-names.c +++ b/src/dialog-define-names.c @@ -15,7 +15,7 @@ void dialog_define_names (Workbook *wb) { static GtkWidget *dialog; - GtkWidget *l, *box; + GtkWidget *l, *box, *swin; GtkCList *clist; GtkEntry *name, *refers; @@ -26,8 +26,11 @@ dialog_define_names (Workbook *wb) _("Add"), _("Remove"), NULL); - + + swin = gtk_scrolled_window_new (NULL, NULL); clist = (GtkCList *) gtk_clist_new (1); + gtk_container_add (GTK_CONTAINER (swin), GTK_WIDGET (clist)); + gtk_clist_column_titles_hide (clist); name = (GtkEntry *) gtk_entry_new (); @@ -40,7 +43,7 @@ dialog_define_names (Workbook *wb) gtk_box_pack_start (GTK_BOX (box), l, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (name), TRUE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (clist), TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (swin), TRUE, TRUE, 0); l = gtk_label_new (_("Refers to")); gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); diff --git a/src/dialog-goto-cell.c b/src/dialog-goto-cell.c index 6b5f5eafc53dbf4b082df2f5f71759dab6615f47..b9e76e51c589b20d32c101cbf0f242f742064990 100644 --- a/src/dialog-goto-cell.c +++ b/src/dialog-goto-cell.c @@ -31,12 +31,13 @@ dialog_goto_cell (Workbook *wb) { static GtkWidget *dialog; static GtkWidget *clist; + static GtkWidget *swin; static GtkWidget *entry; char *text; if (!dialog){ GtkWidget *box; - char *titles [2]; + const gchar *titles [2]; titles [0] = _("Cell"); titles [1] = NULL; @@ -48,11 +49,10 @@ dialog_goto_cell (Workbook *wb) GNOME_STOCK_BUTTON_CANCEL, NULL); gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE); - + + swin = gtk_scrolled_window_new (NULL, NULL); clist = gtk_clist_new_with_titles (1, titles); - gtk_clist_set_policy (GTK_CLIST (clist), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); + gtk_container_add (GTK_CONTAINER (swin), clist); entry = gtk_entry_new (); gtk_signal_connect (GTK_OBJECT (entry), "activate", @@ -63,7 +63,7 @@ dialog_goto_cell (Workbook *wb) box = gtk_vbox_new (FALSE, 0); - gtk_box_pack_start_defaults (GTK_BOX (box), clist); + gtk_box_pack_start_defaults (GTK_BOX (box), swin); gtk_box_pack_start_defaults (GTK_BOX (box), entry); gtk_box_pack_start_defaults (GTK_BOX (GNOME_DIALOG (dialog)->vbox), @@ -82,7 +82,7 @@ dialog_goto_cell (Workbook *wb) if (*text){ if (workbook_parse_and_jump (wb, text)){ - char *texts [1]; + const gchar *texts [1]; texts [0] = text; diff --git a/src/dialogs/dialog-cell-format.c b/src/dialogs/dialog-cell-format.c index 21f7ebd3ee516ffbd11d95f54a61575eef0d65f9..e3153ea2f748c1448c1a57bf7809bcae18c6aef9 100644 --- a/src/dialogs/dialog-cell-format.c +++ b/src/dialogs/dialog-cell-format.c @@ -91,7 +91,7 @@ format_list_fill (int n) gtk_clist_clear (cl); for (i = 0; texts [i]; i++){ - char *t [1]; + const gchar *t [1]; t [0] = _(texts [i]); @@ -211,7 +211,6 @@ my_clist_new (void) cl = GTK_CLIST (gtk_clist_new (1)); gtk_clist_column_titles_hide (cl); - gtk_clist_set_policy (cl, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_clist_set_selection_mode (cl,GTK_SELECTION_SINGLE); /* Configure the size */ @@ -236,7 +235,7 @@ static GtkWidget * create_number_format_page (GtkWidget *prop_win, CellList *cells) { StyleFormat *format; - GtkWidget *l; + GtkWidget *l, *scrolled_list; GtkTable *t, *tt; int i; @@ -257,7 +256,9 @@ create_number_format_page (GtkWidget *prop_win, CellList *cells) gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); number_cat_list = my_clist_new (); - gtk_table_attach (t, number_cat_list, 0, 1, BOXES_LINE+1, BOXES_LINE+2, + scrolled_list = gtk_scrolled_window_new (NULL, NULL); + gtk_container_add (GTK_CONTAINER (scrolled_list), number_cat_list); + gtk_table_attach (t, scrolled_list, 0, 1, BOXES_LINE+1, BOXES_LINE+2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 4, 0); /* 1.1 Connect our signal handler */ @@ -267,7 +268,7 @@ create_number_format_page (GtkWidget *prop_win, CellList *cells) /* 1.2 Fill the category list */ gtk_clist_freeze (GTK_CLIST (number_cat_list)); for (i = 0; cell_formats [i].name; i++){ - char *text [1] = { _(cell_formats [i].name) }; + const gchar *text [1] = { _(cell_formats [i].name) }; gtk_clist_append (GTK_CLIST (number_cat_list), text); } @@ -296,11 +297,13 @@ create_number_format_page (GtkWidget *prop_win, CellList *cells) /* 3. Format codes */ number_format_list = my_clist_new (); + scrolled_list = gtk_scrolled_window_new (NULL, NULL); + gtk_container_add (GTK_CONTAINER (scrolled_list), number_format_list); gtk_table_attach (t, l = gtk_label_new (_("Format codes")), 1, 2, BOXES_LINE, BOXES_LINE+1, GTK_FILL | GTK_EXPAND, 0, 0, 0); gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); - gtk_table_attach_defaults (t, number_format_list, 1, 2, BOXES_LINE + 1, BOXES_LINE + 2); + gtk_table_attach_defaults (t, scrolled_list, 1, 2, BOXES_LINE + 1, BOXES_LINE + 2); format_list_fill (0); /* 3.1 connect the signal handled for row selected */ @@ -312,8 +315,7 @@ create_number_format_page (GtkWidget *prop_win, CellList *cells) if (format){ if (!format_find (format->format)) gtk_entry_set_text (GTK_ENTRY (number_input), format->format); - } else - gtk_clist_select_row (GTK_CLIST (number_format_list), 0, 0); + } /* 4. finish */ @@ -327,6 +329,9 @@ apply_number_formats (Style *style, Sheet *sheet, CellList *list) { char *str = gtk_entry_get_text (GTK_ENTRY (number_input)); + if (!strcmp (str, "")) + return; + for (;list; list = list->next){ Cell *cell = list->data; diff --git a/src/dialogs/dialog-define-names.c b/src/dialogs/dialog-define-names.c index da927bb76679f974708b8b3103ee9446f51ee66e..7fc7586fa45a8d34d0bc02cff5a45806d15fd7d1 100644 --- a/src/dialogs/dialog-define-names.c +++ b/src/dialogs/dialog-define-names.c @@ -15,7 +15,7 @@ void dialog_define_names (Workbook *wb) { static GtkWidget *dialog; - GtkWidget *l, *box; + GtkWidget *l, *box, *swin; GtkCList *clist; GtkEntry *name, *refers; @@ -26,8 +26,11 @@ dialog_define_names (Workbook *wb) _("Add"), _("Remove"), NULL); - + + swin = gtk_scrolled_window_new (NULL, NULL); clist = (GtkCList *) gtk_clist_new (1); + gtk_container_add (GTK_CONTAINER (swin), GTK_WIDGET (clist)); + gtk_clist_column_titles_hide (clist); name = (GtkEntry *) gtk_entry_new (); @@ -40,7 +43,7 @@ dialog_define_names (Workbook *wb) gtk_box_pack_start (GTK_BOX (box), l, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (name), TRUE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (clist), TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (swin), TRUE, TRUE, 0); l = gtk_label_new (_("Refers to")); gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); diff --git a/src/dialogs/dialog-goto-cell.c b/src/dialogs/dialog-goto-cell.c index 6b5f5eafc53dbf4b082df2f5f71759dab6615f47..b9e76e51c589b20d32c101cbf0f242f742064990 100644 --- a/src/dialogs/dialog-goto-cell.c +++ b/src/dialogs/dialog-goto-cell.c @@ -31,12 +31,13 @@ dialog_goto_cell (Workbook *wb) { static GtkWidget *dialog; static GtkWidget *clist; + static GtkWidget *swin; static GtkWidget *entry; char *text; if (!dialog){ GtkWidget *box; - char *titles [2]; + const gchar *titles [2]; titles [0] = _("Cell"); titles [1] = NULL; @@ -48,11 +49,10 @@ dialog_goto_cell (Workbook *wb) GNOME_STOCK_BUTTON_CANCEL, NULL); gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE); - + + swin = gtk_scrolled_window_new (NULL, NULL); clist = gtk_clist_new_with_titles (1, titles); - gtk_clist_set_policy (GTK_CLIST (clist), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); + gtk_container_add (GTK_CONTAINER (swin), clist); entry = gtk_entry_new (); gtk_signal_connect (GTK_OBJECT (entry), "activate", @@ -63,7 +63,7 @@ dialog_goto_cell (Workbook *wb) box = gtk_vbox_new (FALSE, 0); - gtk_box_pack_start_defaults (GTK_BOX (box), clist); + gtk_box_pack_start_defaults (GTK_BOX (box), swin); gtk_box_pack_start_defaults (GTK_BOX (box), entry); gtk_box_pack_start_defaults (GTK_BOX (GNOME_DIALOG (dialog)->vbox), @@ -82,7 +82,7 @@ dialog_goto_cell (Workbook *wb) if (*text){ if (workbook_parse_and_jump (wb, text)){ - char *texts [1]; + const gchar *texts [1]; texts [0] = text; diff --git a/src/plugin-manager.c b/src/plugin-manager.c index 9d83b0d56bfbf52cf0c4267e5a352ff3cdd6a213..5bb9d5c8e9be5c3c06d6d5e673320093d27aa2c9 100644 --- a/src/plugin-manager.c +++ b/src/plugin-manager.c @@ -26,7 +26,7 @@ typedef struct static void add_to_clist (PluginData *pd, GtkWidget *clist) { - gchar *data[2]; + const gchar *data[2]; gint row; data [0] = pd->title; @@ -90,8 +90,8 @@ GtkWidget * plugin_manager_new (void) { PluginManager *pm; - gchar *n_titles[2] = { N_("Name"), N_("File") }; - gchar *titles[2] = { N_("Name"), N_("File") }; + const gchar *n_titles[2] = { N_("Name"), N_("File") }; + const gchar *titles[2] = { N_("Name"), N_("File") }; pm = g_new0 (PluginManager, 1); if (!pm)