Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
2003-01-14  Paolo Maggi <[email protected]>

	* TRANSLATABLE_FILES:
	* TODO:
	* BUGS: Updated

2003-01-14  Paolo Maggi <[email protected]>

	* gedit-document.c (gedit_document_finalize):
	free document->priv->encoding
	(gedit_document_save_as_real): don't leak chars and
	bak_ext

	* gedit-output-window.c: don't leak tooltips
  • Loading branch information
Paolo Maggi authored and Paolo Maggi committed Jan 14, 2003
1 parent c9fb225 commit e1eb4b3
Show file tree
Hide file tree
Showing 12 changed files with 124 additions and 77 deletions.
9 changes: 5 additions & 4 deletions BUGS
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
KNOWN BUGS
----------


Search on http://bugzilla.gnome.org for a list of known gedit's bug.

If you find a new bug, please report it at
http://bugzilla.gnome.org/enter_bug.cgi?product=gedit.

Thanks,
Paolo
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2003-01-14 Paolo Maggi <[email protected]>

* TRANSLATABLE_FILES:
* TODO:
* BUGS: Updated

2003-01-06 Paolo Maggi <[email protected]>

* configure.in:
Expand Down
6 changes: 3 additions & 3 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TODO (last update: November 27, 2002)
===================================
TODO (last update: January 14, 2003)
====================================

Here you can find a list of TODOs for gedit.
For each item you will find a state flag (A: assigned, X: finished) and a responsible person.
Expand Down Expand Up @@ -48,7 +48,7 @@ Easy tasks
Tasks for non developers
------------------------

[ ] Designing a new logo (Resp: Paolo)
[X] Designing a new logo
[ ] Maintaining the web site (Resp: James Willcox)
[ ] Writing new taglists (Resp: Paolo)
[A] Writing user documentation for plugins (Resp: Paolo, assigned to Ajit George <[email protected]>)
Expand Down
4 changes: 4 additions & 0 deletions TRANSLATABLE_FILES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#
# THIS FILE IS OUT OF DATE - Paolo (14 Jan 2003)
#

README
NEWS

Expand Down
17 changes: 17 additions & 0 deletions gedit/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
2003-01-14 Paolo Maggi <[email protected]>

* gedit-document.c (gedit_document_finalize):
free document->priv->encoding
(gedit_document_save_as_real): don't leak chars and
bak_ext

* gedit-output-window.c: don't leak tooltips

2003-01-09 Paolo Maggi <[email protected]>

* gedit-view.c (gedit_view_key_press_cb): call
gedit_prefs_manager_get_auto_indent and
gedit_prefs_manager_get_insert_spaces only when needed.
Return FALSE if the event is not managed
(this fixes bug #102619).

2003-01-10 James Willcox <[email protected]>

Updated to latest recent-files code (fixes memory leak)
Expand Down
27 changes: 13 additions & 14 deletions gedit/gedit-document.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,10 @@ gedit_document_finalize (GObject *object)
document->priv->untitled_number);
}

if (document->priv->uri)
{
g_free (document->priv->uri);
document->priv->uri = NULL;
}

if (document->priv->last_searched_text)
g_free (document->priv->last_searched_text);

if (document->priv->last_replace_text)
g_free (document->priv->last_replace_text);

g_free (document->priv->uri);
g_free (document->priv->last_searched_text);
g_free (document->priv->last_replace_text);
g_free (document->priv->encoding);

g_object_unref (G_OBJECT (document->priv->undo_manager));

Expand Down Expand Up @@ -1088,7 +1080,7 @@ gedit_document_save_as_real (GeditDocument* doc, const gchar *uri,
gchar *dirname;
mode_t saved_umask;
struct stat st;
char *chars;
gchar *chars = NULL;
gint chars_len;
gint fd;
gint retval;
Expand Down Expand Up @@ -1316,12 +1308,17 @@ gedit_document_save_as_real (GeditDocument* doc, const gchar *uri,

if (create_backup_copy)
{
gchar *bak_ext;
gint result;

bak_ext = gedit_prefs_manager_get_backup_extension ();

backup_filename = g_strconcat (real_filename,
gedit_prefs_manager_get_backup_extension (),
bak_ext,
NULL);

g_free (bak_ext);

result = rename (real_filename, backup_filename);

if (result != 0)
Expand Down Expand Up @@ -1366,6 +1363,8 @@ gedit_document_save_as_real (GeditDocument* doc, const gchar *uri,

out:

g_free (chars);

g_free (filename);
g_free (real_filename);
g_free (backup_filename);
Expand Down
32 changes: 19 additions & 13 deletions gedit/gedit-output-window.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,18 @@

struct _GeditOutputWindowPrivate
{
GtkWidget *close_button;
GtkWidget *copy_button;
GtkWidget *clear_button;
GtkTooltips *tooltips;

GtkWidget *close_button;
GtkWidget *copy_button;
GtkWidget *clear_button;

GtkWidget *close_menu_item;
GtkWidget *copy_menu_item;
GtkWidget *clear_menu_item;
GtkWidget *close_menu_item;
GtkWidget *copy_menu_item;
GtkWidget *clear_menu_item;

GtkWidget *treeview;
GtkTreeModel *model;
GtkWidget *treeview;
GtkTreeModel *model;
};

enum {
Expand Down Expand Up @@ -288,7 +290,6 @@ gedit_output_window_treeview_selection_changed (GtkTreeSelection *selection,
static void
gedit_output_window_init (GeditOutputWindow *output_window)
{
GtkTooltips *tooltips;
GtkSettings *settings;
gint w, h;
GtkWidget *vbox1;
Expand All @@ -308,7 +309,10 @@ gedit_output_window_init (GeditOutputWindow *output_window)

output_window->priv = g_new0 (GeditOutputWindowPrivate, 1);

tooltips = gtk_tooltips_new ();
output_window->priv->tooltips = gtk_tooltips_new ();

g_object_ref (G_OBJECT (output_window->priv->tooltips ));
gtk_object_sink (GTK_OBJECT (output_window->priv->tooltips ));

settings = gtk_widget_get_settings (GTK_WIDGET (output_window));

Expand All @@ -324,7 +328,7 @@ gedit_output_window_init (GeditOutputWindow *output_window)
gtk_box_pack_start (GTK_BOX (vbox1), output_window->priv->close_button, FALSE, FALSE, 0);
gtk_widget_set_size_request (output_window->priv->close_button, w + 2, h + 2);

gtk_tooltips_set_tip (tooltips,
gtk_tooltips_set_tip (output_window->priv->tooltips,
output_window->priv->close_button,
_("Close the output window"),
NULL);
Expand Down Expand Up @@ -362,7 +366,7 @@ gedit_output_window_init (GeditOutputWindow *output_window)
gtk_box_pack_start (GTK_BOX (vbox2), output_window->priv->copy_button, FALSE, FALSE, 0);
gtk_widget_set_size_request (output_window->priv->copy_button, w + 2, h + 2);

gtk_tooltips_set_tip (tooltips,
gtk_tooltips_set_tip (output_window->priv->tooltips,
output_window->priv->copy_button,
_("Copy selected lines"),
NULL);
Expand All @@ -382,7 +386,7 @@ gedit_output_window_init (GeditOutputWindow *output_window)
gtk_box_pack_start (GTK_BOX (vbox2), output_window->priv->clear_button, FALSE, FALSE, 0);
gtk_widget_set_size_request (output_window->priv->clear_button, w + 2, h + 2);

gtk_tooltips_set_tip (tooltips,
gtk_tooltips_set_tip (output_window->priv->tooltips,
output_window->priv->clear_button,
_("Clear the output window"),
NULL);
Expand Down Expand Up @@ -470,6 +474,8 @@ gedit_output_window_finalize (GObject *object)

ow = GEDIT_OUTPUT_WINDOW (object);

g_object_unref (ow->priv->tooltips);

if (ow->priv != NULL)
{
g_free (ow->priv);
Expand Down
12 changes: 4 additions & 8 deletions gedit/gedit-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -1304,11 +1304,6 @@ gedit_view_key_press_cb (GtkWidget *widget, GdkEventKey *event, GeditView *view)
GtkTextIter cur;
GtkTextMark *mark;
gint key;
gboolean auto_indent;
gboolean insert_spaces;

auto_indent = gedit_prefs_manager_get_auto_indent();
insert_spaces = gedit_prefs_manager_get_insert_spaces ();

buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget));

Expand All @@ -1317,7 +1312,8 @@ gedit_view_key_press_cb (GtkWidget *widget, GdkEventKey *event, GeditView *view)
mark = gtk_text_buffer_get_mark (buf, "insert");
gtk_text_buffer_get_iter_at_mark (buf, &cur, mark);

if ((key == GDK_Return) && auto_indent && gtk_text_iter_ends_line (&cur))
if ((key == GDK_Return) && gtk_text_iter_ends_line (&cur) &&
gedit_prefs_manager_get_auto_indent ())
{
/* Auto-indent means that when you press ENTER at the end of a
* line, the new line is automatically indented at the same
Expand All @@ -1342,7 +1338,7 @@ gedit_view_key_press_cb (GtkWidget *widget, GdkEventKey *event, GeditView *view)
}
}

if ((key == GDK_Tab) && insert_spaces)
if ((key == GDK_Tab) && gedit_prefs_manager_get_insert_spaces ())
{
gint cur_pos;
gint num_of_equivalent_spaces;
Expand Down Expand Up @@ -1375,7 +1371,7 @@ gedit_view_key_press_cb (GtkWidget *widget, GdkEventKey *event, GeditView *view)
return TRUE;
}

return GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event);
return FALSE;
}


17 changes: 17 additions & 0 deletions src/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
2003-01-14 Paolo Maggi <[email protected]>

* gedit-document.c (gedit_document_finalize):
free document->priv->encoding
(gedit_document_save_as_real): don't leak chars and
bak_ext

* gedit-output-window.c: don't leak tooltips

2003-01-09 Paolo Maggi <[email protected]>

* gedit-view.c (gedit_view_key_press_cb): call
gedit_prefs_manager_get_auto_indent and
gedit_prefs_manager_get_insert_spaces only when needed.
Return FALSE if the event is not managed
(this fixes bug #102619).

2003-01-10 James Willcox <[email protected]>

Updated to latest recent-files code (fixes memory leak)
Expand Down
27 changes: 13 additions & 14 deletions src/gedit-document.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,10 @@ gedit_document_finalize (GObject *object)
document->priv->untitled_number);
}

if (document->priv->uri)
{
g_free (document->priv->uri);
document->priv->uri = NULL;
}

if (document->priv->last_searched_text)
g_free (document->priv->last_searched_text);

if (document->priv->last_replace_text)
g_free (document->priv->last_replace_text);

g_free (document->priv->uri);
g_free (document->priv->last_searched_text);
g_free (document->priv->last_replace_text);
g_free (document->priv->encoding);

g_object_unref (G_OBJECT (document->priv->undo_manager));

Expand Down Expand Up @@ -1088,7 +1080,7 @@ gedit_document_save_as_real (GeditDocument* doc, const gchar *uri,
gchar *dirname;
mode_t saved_umask;
struct stat st;
char *chars;
gchar *chars = NULL;
gint chars_len;
gint fd;
gint retval;
Expand Down Expand Up @@ -1316,12 +1308,17 @@ gedit_document_save_as_real (GeditDocument* doc, const gchar *uri,

if (create_backup_copy)
{
gchar *bak_ext;
gint result;

bak_ext = gedit_prefs_manager_get_backup_extension ();

backup_filename = g_strconcat (real_filename,
gedit_prefs_manager_get_backup_extension (),
bak_ext,
NULL);

g_free (bak_ext);

result = rename (real_filename, backup_filename);

if (result != 0)
Expand Down Expand Up @@ -1366,6 +1363,8 @@ gedit_document_save_as_real (GeditDocument* doc, const gchar *uri,

out:

g_free (chars);

g_free (filename);
g_free (real_filename);
g_free (backup_filename);
Expand Down
Loading

0 comments on commit e1eb4b3

Please sign in to comment.