Commit 797642a5 authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington

Use anonymous mark instead of making up a bogus name for first_para_mark

2000-06-23  Havoc Pennington  <hp@redhat.com>

* gtk/gtktextview.c (gtk_text_view_set_buffer): Use anonymous mark
instead of making up a bogus name for first_para_mark

* gtk/gtkstatusbar.h, gtk/gtkstatusbar.c: Allow
0 as a context ID
parent a626ad31
2000-06-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_buffer): Use anonymous mark
instead of making up a bogus name for first_para_mark
* gtk/gtkstatusbar.h, gtk/gtkstatusbar.c: Allow
0 as a context ID
Thu Jun 22 17:43:51 BST 2000 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: Change filename. Add Section 3.
......
2000-06-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_buffer): Use anonymous mark
instead of making up a bogus name for first_para_mark
* gtk/gtkstatusbar.h, gtk/gtkstatusbar.c: Allow
0 as a context ID
Thu Jun 22 17:43:51 BST 2000 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: Change filename. Add Section 3.
......
2000-06-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_buffer): Use anonymous mark
instead of making up a bogus name for first_para_mark
* gtk/gtkstatusbar.h, gtk/gtkstatusbar.c: Allow
0 as a context ID
Thu Jun 22 17:43:51 BST 2000 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: Change filename. Add Section 3.
......
2000-06-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_buffer): Use anonymous mark
instead of making up a bogus name for first_para_mark
* gtk/gtkstatusbar.h, gtk/gtkstatusbar.c: Allow
0 as a context ID
Thu Jun 22 17:43:51 BST 2000 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: Change filename. Add Section 3.
......
2000-06-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_buffer): Use anonymous mark
instead of making up a bogus name for first_para_mark
* gtk/gtkstatusbar.h, gtk/gtkstatusbar.c: Allow
0 as a context ID
Thu Jun 22 17:43:51 BST 2000 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: Change filename. Add Section 3.
......
2000-06-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_buffer): Use anonymous mark
instead of making up a bogus name for first_para_mark
* gtk/gtkstatusbar.h, gtk/gtkstatusbar.c: Allow
0 as a context ID
Thu Jun 22 17:43:51 BST 2000 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: Change filename. Add Section 3.
......
2000-06-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_buffer): Use anonymous mark
instead of making up a bogus name for first_para_mark
* gtk/gtkstatusbar.h, gtk/gtkstatusbar.c: Allow
0 as a context ID
Thu Jun 22 17:43:51 BST 2000 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: Change filename. Add Section 3.
......
......@@ -202,7 +202,6 @@ gtk_statusbar_push (GtkStatusbar *statusbar,
g_return_val_if_fail (statusbar != NULL, 0);
g_return_val_if_fail (GTK_IS_STATUSBAR (statusbar), 0);
g_return_val_if_fail (text != NULL, 0);
g_return_val_if_fail (context_id > 0, 0);
class = GTK_STATUSBAR_GET_CLASS (statusbar);
msg = g_chunk_new (GtkStatusbarMsg, class->messages_mem_chunk);
......@@ -228,7 +227,6 @@ gtk_statusbar_pop (GtkStatusbar *statusbar,
g_return_if_fail (statusbar != NULL);
g_return_if_fail (GTK_IS_STATUSBAR (statusbar));
g_return_if_fail (context_id > 0);
if (statusbar->messages)
{
......@@ -271,7 +269,6 @@ gtk_statusbar_remove (GtkStatusbar *statusbar,
g_return_if_fail (statusbar != NULL);
g_return_if_fail (GTK_IS_STATUSBAR (statusbar));
g_return_if_fail (context_id > 0);
g_return_if_fail (message_id > 0);
msg = statusbar->messages ? statusbar->messages->data : NULL;
......
......@@ -84,6 +84,9 @@ struct _GtkStatusbarMsg
GtkType gtk_statusbar_get_type (void);
GtkWidget* gtk_statusbar_new (void);
/* If you don't want to use contexts, 0 is a predefined global
* context_id you can pass to push/pop/remove
*/
guint gtk_statusbar_get_context_id (GtkStatusbar *statusbar,
const gchar *context_description);
/* Returns message_id used for gtk_statusbar_remove */
......
......@@ -667,13 +667,10 @@ gtk_text_view_set_buffer (GtkTextView *text_view,
"__drag_target",
&start, FALSE);
/* Initialize. FIXME: Allow anonymous marks and use one here
*/
mark_name = g_strdup_printf ("__first_para_%p", text_view);
text_view->first_para_mark = gtk_text_buffer_create_mark (text_view->buffer,
mark_name,
NULL,
&start, TRUE);
g_free (mark_name);
text_view->first_para_pixels = 0;
gtk_signal_connect (GTK_OBJECT (text_view->buffer), "mark_set",
......
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