[nautilus-actions] Insulate status bar management in nact-statusbar.{c, h}



commit d2e44f4343446d3e81eda3e0f295f48611a240f2
Author: Pierre Wieser <pwieser trychlos org>
Date:   Wed Aug 19 21:12:41 2009 +0200

    Insulate status bar management in nact-statusbar.{c,h}

 ChangeLog                 |    5 ++++
 src/nact/nact-statusbar.c |   55 +++++++++++++++++++++++++++++++++++++++++++++
 src/nact/nact-statusbar.h |   43 +++++++++++++++++++++++++++++++++++
 3 files changed, 103 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c864b5e..6e01f70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-19 Pierre Wieser <pwieser trychlos org>
+
+	* src/nact/nact-statusbar.c:
+	* src/nact/nact-statusbar.h: New files.
+
 2009-08-18 Pierre Wieser <pwieser trychlos org>
 
 	* src/nact/base-application-class.h:
diff --git a/src/nact/nact-statusbar.c b/src/nact/nact-statusbar.c
new file mode 100644
index 0000000..ee59c8f
--- /dev/null
+++ b/src/nact/nact-statusbar.c
@@ -0,0 +1,55 @@
+/*
+ * Nautilus Actions
+ * A Nautilus extension which offers configurable context menu actions.
+ *
+ * Copyright (C) 2005 The GNOME Foundation
+ * Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
+ * Copyright (C) 2009 Pierre Wieser and others (see AUTHORS)
+ *
+ * This Program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this Library; see the file COPYING.  If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place,
+ * Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ *   Frederic Ruaudel <grumz grumz net>
+ *   Rodrigo Moya <rodrigo gnome-db org>
+ *   Pierre Wieser <pwieser trychlos org>
+ *   ... and many others (see AUTHORS)
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "nact-statusbar.h"
+
+void
+nact_statusbar_display_status( NactMainWindow *window, const gchar *context, const gchar *status )
+{
+	GtkStatusbar *bar = nact_main_window_get_statusbar( window );
+	if( bar ){
+		guint context_id = gtk_statusbar_get_context_id( bar, context );
+		gtk_statusbar_push( bar, context_id, status );
+	}
+}
+
+void
+nact_statusbar_hide_status( NactMainWindow *window, const gchar *context )
+{
+	GtkStatusbar *bar = nact_main_window_get_statusbar( window );
+	if( bar ){
+		guint context_id = gtk_statusbar_get_context_id( bar, context );
+		gtk_statusbar_pop( bar, context_id );
+	}
+}
diff --git a/src/nact/nact-statusbar.h b/src/nact/nact-statusbar.h
new file mode 100644
index 0000000..6d8221a
--- /dev/null
+++ b/src/nact/nact-statusbar.h
@@ -0,0 +1,43 @@
+/*
+ * Nautilus Actions
+ * A Nautilus extension which offers configurable context menu actions.
+ *
+ * Copyright (C) 2005 The GNOME Foundation
+ * Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
+ * Copyright (C) 2009 Pierre Wieser and others (see AUTHORS)
+ *
+ * This Program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this Library; see the file COPYING.  If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place,
+ * Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ *   Frederic Ruaudel <grumz grumz net>
+ *   Rodrigo Moya <rodrigo gnome-db org>
+ *   Pierre Wieser <pwieser trychlos org>
+ *   ... and many others (see AUTHORS)
+ */
+
+#ifndef __NACT_STATUSBAR_H__
+#define __NACT_STATUSBAR_H__
+
+#include "nact-main-window.h"
+
+G_BEGIN_DECLS
+
+void  nact_statusbar_display_status( NactMainWindow *window, const gchar *context, const gchar *status );
+void  nact_statusbar_hide_status( NactMainWindow *window, const gchar *context );
+
+G_END_DECLS
+
+#endif /* __NACT_STATUSBAR_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]