aboutsummaryrefslogtreecommitdiff
path: root/src/textadept.c
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2008-09-23 09:39:14 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2008-09-23 09:39:14 -0400
commit671153c765a1b2899bed564c50d718f9244f3287 (patch)
tree6a6eaf8decf80a833cf73cccc0d186edff3e3247 /src/textadept.c
parent7a99258f7284bd2167840781b65c8a4f1e331ade (diff)
downloadtextadept-671153c765a1b2899bed564c50d718f9244f3287.tar.gz
textadept-671153c765a1b2899bed564c50d718f9244f3287.zip
Merged 'set_docstatusbar_text' function into 'set_statusbar_text' with a flag.
Diffstat (limited to 'src/textadept.c')
-rw-r--r--src/textadept.c24
1 files changed, 8 insertions, 16 deletions
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);
}
/**