From 671153c765a1b2899bed564c50d718f9244f3287 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 23 Sep 2008 09:39:14 -0400 Subject: Merged 'set_docstatusbar_text' function into 'set_statusbar_text' with a flag. --- src/textadept.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'src/textadept.c') diff --git a/src/textadept.c b/src/textadept.c index a500a699..82343f43 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -370,22 +370,14 @@ void set_menubar(GtkWidget *new_menubar) { /** * Sets the notification statusbar text. * @param text The text to display. - */ -void set_statusbar_text(const char *text) { - if (!statusbar) return; - gtk_statusbar_pop(GTK_STATUSBAR(statusbar), 0); - gtk_statusbar_push(GTK_STATUSBAR(statusbar), 0, text); -} - -/** - * Sets the document status statusbar text. - * This is typically set via a Scintilla 'UpdateUI' notification. - * @param text The text to display. - */ -void set_docstatusbar_text(const char *text) { - if (!docstatusbar) return; - gtk_statusbar_pop(GTK_STATUSBAR(docstatusbar), 0); - gtk_statusbar_push(GTK_STATUSBAR(docstatusbar), 0, text); + * @param docbar Flag indicating whether or not the statusbar text is for the + * docstatusbar. + */ +void set_statusbar_text(const char *text, bool docbar) { + GtkWidget *bar = docbar ? docstatusbar : statusbar; + if (!bar) return; + gtk_statusbar_pop(GTK_STATUSBAR(bar), 0); + gtk_statusbar_push(GTK_STATUSBAR(bar), 0, text); } /** -- cgit v1.2.3