[libgda] Raplaced CcGrayBAr with GdauiBar



commit 0df60e0d1af7451aa0833df9edc9bf343d10972c
Author: Vivien Malerba <malerba gnome-db org>
Date:   Wed Aug 22 15:07:07 2012 +0200

    Raplaced CcGrayBAr with GdauiBar
    
    which uses CSS theming to render

 control-center/Makefile.am                         |    4 +-
 control-center/cc-gray-bar.c                       |  530 --------------------
 control-center/cc-gray-bar.h                       |   67 ---
 control-center/dsn-config.c                        |    6 +-
 control-center/gdaui-bar.c                         |  439 ++++++++++++++++
 control-center/gdaui-bar.h                         |   67 +++
 control-center/main.c                              |    6 +-
 control-center/provider-config.c                   |    6 +-
 tools/browser/Makefile.am                          |    4 +-
 tools/browser/cc-gray-bar.c                        |    1 -
 tools/browser/cc-gray-bar.h                        |    1 -
 tools/browser/common/objects-cloud.c               |    2 +-
 tools/browser/data-manager/data-console.c          |   12 +-
 .../browser/data-manager/data-favorite-selector.c  |    6 +-
 tools/browser/doc/gda-browser-docs.sgml            |    2 +-
 tools/browser/doc/gda-browser-sections.txt         |   30 +-
 tools/browser/doc/gda-browser.types                |    4 +-
 tools/browser/gdaui-bar.c                          |    1 +
 tools/browser/gdaui-bar.h                          |    1 +
 tools/browser/ldap-browser/classes-view.c          |    2 +-
 tools/browser/ldap-browser/hierarchy-view.c        |    2 +-
 tools/browser/ldap-browser/ldap-classes-page.c     |    4 +-
 tools/browser/ldap-browser/ldap-entries-page.c     |    4 +-
 .../browser/ldap-browser/ldap-favorite-selector.c  |    6 +-
 tools/browser/ldap-browser/ldap-search-page.c      |    4 +-
 tools/browser/query-exec/query-console-page.c      |    8 +-
 tools/browser/query-exec/query-favorite-selector.c |    6 +-
 tools/browser/schema-browser/favorite-selector.c   |    6 +-
 tools/browser/schema-browser/objects-index.c       |    4 +-
 tools/browser/schema-browser/relations-diagram.c   |   14 +-
 tools/browser/schema-browser/table-columns.c       |    6 +-
 tools/browser/schema-browser/table-info.c          |    8 +-
 tools/browser/schema-browser/table-preferences.c   |    2 +-
 tools/browser/schema-browser/table-relations.c     |    2 +-
 34 files changed, 588 insertions(+), 679 deletions(-)
---
diff --git a/control-center/Makefile.am b/control-center/Makefile.am
index 9c1d314..11ae2fe 100644
--- a/control-center/Makefile.am
+++ b/control-center/Makefile.am
@@ -19,8 +19,8 @@ AM_CPPFLAGS = \
 gda_control_center_5_0_SOURCES=\
 	gdaui-login-dialog.c \
 	gdaui-login-dialog.h \
-	cc-gray-bar.c \
-	cc-gray-bar.h \
+	gdaui-bar.c \
+	gdaui-bar.h \
 	cc-utility.c \
 	cc-utility.h \
 	dsn-config.c \
diff --git a/control-center/dsn-config.c b/control-center/dsn-config.c
index 13428df..a376ca4 100644
--- a/control-center/dsn-config.c
+++ b/control-center/dsn-config.c
@@ -26,7 +26,7 @@
 #include "dsn-config.h"
 #include "dsn-properties-dialog.h"
 #include "cc-utility.h"
-#include "cc-gray-bar.h"
+#include "gdaui-bar.h"
 
 #define DSN_CONFIG_DATA "DSN_ConfigData"
 
@@ -116,12 +116,12 @@ dsn_config_new (void)
 	/* title */
 	title = g_strdup_printf ("<b>%s</b>\n%s", _("Data Sources"),
 				 _("Configured data sources in the system"));
-	priv->title = cc_gray_bar_new (title);
+	priv->title = gdaui_bar_new (title);
 	g_free (title);
 
 	gchar *path;
 	path = gda_gbr_get_file_path (GDA_DATA_DIR, LIBGDA_ABI_NAME, "pixmaps", "gdaui-generic.png", NULL);
-	cc_gray_bar_set_icon_from_file (CC_GRAY_BAR (priv->title), path);
+	gdaui_bar_set_icon_from_file (GDAUI_BAR (priv->title), path);
 	g_free (path);
 	gtk_box_pack_start (GTK_BOX (dsn), priv->title, FALSE, FALSE, 0);
 	gtk_widget_show (priv->title);
diff --git a/control-center/gdaui-bar.c b/control-center/gdaui-bar.c
new file mode 100644
index 0000000..88f1710
--- /dev/null
+++ b/control-center/gdaui-bar.c
@@ -0,0 +1,439 @@
+/*
+ * Copyright (C) 2009 - 2011 Vivien Malerba <malerba gnome-db org>
+ *
+ * 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 program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#include "gdaui-bar.h"
+
+struct _GdauiBarPrivate
+{
+	GtkWidget *content_area;
+	GtkWidget *action_area;
+
+	GtkWidget *icon;
+        gboolean   show_icon;
+        GtkWidget *label;
+};
+
+/* Properties */
+enum {
+        PROP_0,
+        PROP_TEXT,
+        PROP_SHOW_ICON
+};
+
+static GObjectClass *parent_class = NULL;
+
+#define ACTION_AREA_DEFAULT_BORDER 2
+#define ACTION_AREA_DEFAULT_SPACING 2
+#define CONTENT_AREA_DEFAULT_BORDER 5
+#define CONTENT_AREA_DEFAULT_SPACING 2
+
+static void gdaui_bar_class_init (GdauiBarClass *klass);
+static void gdaui_bar_init (GdauiBar *bar);
+static void gdaui_bar_set_property (GObject        *object,
+				    guint           prop_id,
+				    const GValue   *value,
+				    GParamSpec     *pspec);
+static void gdaui_bar_get_property (GObject        *object,
+				    guint           prop_id,
+				    GValue         *value,
+				    GParamSpec     *pspec);
+static void gdaui_bar_get_preferred_width (GtkWidget *widget,
+					   gint      *minimum_width,
+					   gint      *natural_width);
+static void gdaui_bar_get_preferred_height (GtkWidget *widget,
+					    gint *minimum_height,
+					    gint *natural_height);
+static gboolean gdaui_bar_draw (GtkWidget *widget, cairo_t *cr);
+static void gdaui_bar_dispose (GObject *object);
+
+GType
+gdaui_bar_get_type (void)
+{
+        static GType type = 0;
+
+        if (G_UNLIKELY (type == 0)) {
+                static const GTypeInfo info = {
+                        sizeof (GdauiBarClass),
+                        (GBaseInitFunc) NULL,
+                        (GBaseFinalizeFunc) NULL,
+                        (GClassInitFunc) gdaui_bar_class_init,
+                        NULL,
+                        NULL,
+                        sizeof (GdauiBar),
+                        0,
+                        (GInstanceInitFunc) gdaui_bar_init,
+                        0
+                };
+                type = g_type_register_static (GTK_TYPE_BOX, "GdauiBar", &info, 0);
+        }
+        return type;
+}
+
+static void
+gdaui_bar_class_init (GdauiBarClass *klass)
+{
+	GtkWidgetClass *widget_class;
+	GObjectClass *object_class;
+
+	parent_class = g_type_class_peek_parent (klass);
+	widget_class = GTK_WIDGET_CLASS (klass);
+	object_class = G_OBJECT_CLASS (klass);
+
+	object_class->get_property = gdaui_bar_get_property;
+	object_class->set_property = gdaui_bar_set_property;
+	object_class->dispose = gdaui_bar_dispose;
+
+	widget_class->get_preferred_width = gdaui_bar_get_preferred_width;
+	widget_class->get_preferred_height = gdaui_bar_get_preferred_height;
+	widget_class->draw = gdaui_bar_draw;
+
+	/* add class properties */
+        g_object_class_install_property (object_class, PROP_TEXT,
+                                         g_param_spec_string ("text", NULL,
+							      "Text showed inside the widget.", NULL,
+                                                              (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+        g_object_class_install_property (object_class, PROP_SHOW_ICON,
+                                         g_param_spec_boolean ("show_icon", NULL, NULL, FALSE,
+                                                               (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+}
+
+static void
+gdaui_bar_init (GdauiBar *bar)
+{
+	GtkWidget *widget = GTK_WIDGET (bar);
+	GtkWidget *content_area;
+	GtkWidget *action_area;
+
+	bar->priv = g_new0 (GdauiBarPrivate, 1);
+
+	content_area = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+	gtk_widget_show (content_area);
+	gtk_box_pack_start (GTK_BOX (bar), content_area, TRUE, TRUE, 0);
+
+	action_area = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
+	gtk_widget_show (action_area);
+	gtk_button_box_set_layout (GTK_BUTTON_BOX (action_area), GTK_BUTTONBOX_END);
+	gtk_box_pack_start (GTK_BOX (bar), action_area, FALSE, TRUE, 0);
+
+	gtk_widget_set_app_paintable (widget, TRUE);
+	gtk_widget_set_redraw_on_allocate (widget, TRUE);
+
+	bar->priv->content_area = content_area;
+	bar->priv->action_area = action_area;
+
+	/* set default spacings */
+	gtk_box_set_spacing (GTK_BOX (bar->priv->action_area), ACTION_AREA_DEFAULT_SPACING);
+	gtk_container_set_border_width (GTK_CONTAINER (bar->priv->action_area), ACTION_AREA_DEFAULT_BORDER);
+	gtk_box_set_spacing (GTK_BOX (bar->priv->content_area), CONTENT_AREA_DEFAULT_SPACING);
+	gtk_container_set_border_width (GTK_CONTAINER (bar->priv->content_area), CONTENT_AREA_DEFAULT_BORDER);
+
+	bar->priv->show_icon = FALSE;
+	bar->priv->icon = gtk_image_new ();
+        gtk_misc_set_alignment (GTK_MISC (bar->priv->icon), 1., 0.5);
+        gtk_widget_hide (bar->priv->icon);
+        gtk_box_pack_end (GTK_BOX (bar->priv->content_area), bar->priv->icon,
+			  FALSE, TRUE, 0);
+
+	bar->priv->label = gtk_label_new ("");
+        gtk_label_set_selectable (GTK_LABEL (bar->priv->label), FALSE);
+        gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0., 0.5);
+        gtk_box_pack_end (GTK_BOX (bar->priv->content_area), bar->priv->label,
+                          TRUE, TRUE, 0);
+        gtk_widget_show (bar->priv->label);
+
+	/* CSS theming */
+	GtkStyleContext *context;
+	GtkStyleProvider *provider;
+#define CSS ".gdauibar {\n" \
+		"background-color: #b3b3b3;\n"		\
+		"padding: 5px;\n"			\
+		"}"
+	context = gtk_widget_get_style_context (GTK_WIDGET (bar));
+	provider = GTK_STYLE_PROVIDER (gtk_css_provider_new ());
+	gtk_style_context_add_provider (context, provider, G_MAXUINT);
+	gtk_css_provider_load_from_data (GTK_CSS_PROVIDER (provider), CSS, -1, NULL);
+	g_object_unref (provider);
+	gtk_style_context_add_class (context, "gdauibar");
+}
+
+static void
+gdaui_bar_set_property (GObject      *object,
+			guint         prop_id,
+			const GValue *value,
+			GParamSpec   *pspec)
+{
+	GdauiBar *bar = GDAUI_BAR (object);
+
+	switch (prop_id) {
+	case PROP_TEXT:
+		gdaui_bar_set_text (bar, g_value_get_string (value));
+		break;
+	case PROP_SHOW_ICON:
+		gdaui_bar_set_show_icon (bar, g_value_get_boolean (value));
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
+}
+
+static void
+gdaui_bar_get_property (GObject    *object,
+			guint       prop_id,
+			GValue     *value,
+			GParamSpec *pspec)
+{
+	GdauiBar *bar = GDAUI_BAR (object);
+
+	switch (prop_id) {
+	case PROP_TEXT:
+		g_value_set_string (value, gdaui_bar_get_text (bar));
+		break;
+	case PROP_SHOW_ICON:
+		g_value_set_boolean (value, gdaui_bar_get_show_icon (bar));
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
+}
+
+static void
+gdaui_bar_dispose (GObject *object)
+{
+	GdauiBar *bar = (GdauiBar*) object;
+	if (bar->priv) {
+		g_free (bar->priv);
+		bar->priv = NULL;
+	}
+	G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+
+static void
+get_padding_and_border (GtkWidget *widget,
+                        GtkBorder *border)
+{
+	GtkStyleContext *context;
+	GtkStateFlags state;
+	GtkBorder tmp;
+
+	context = gtk_widget_get_style_context (widget);
+	state = gtk_widget_get_state_flags (widget);
+
+	gtk_style_context_get_padding (context, state, border);
+	gtk_style_context_get_border (context, state, &tmp);
+	border->top += tmp.top;
+	border->right += tmp.right;
+	border->bottom += tmp.bottom;
+	border->left += tmp.left;
+}
+
+static void
+gdaui_bar_get_preferred_width (GtkWidget *widget,
+			       gint      *minimum_width,
+			       gint      *natural_width)
+{
+	GtkBorder border;
+
+	get_padding_and_border (widget, &border);
+
+	GTK_WIDGET_CLASS (parent_class)->get_preferred_width (widget,
+							      minimum_width,
+							      natural_width);
+
+	if (minimum_width)
+		*minimum_width += border.left + border.right;
+	if (natural_width)
+		*natural_width += border.left + border.right;
+}
+
+static void
+gdaui_bar_get_preferred_height (GtkWidget *widget,
+				gint      *minimum_height,
+				gint      *natural_height)
+{
+	GtkBorder border;
+
+	get_padding_and_border (widget, &border);
+
+	GTK_WIDGET_CLASS (parent_class)->get_preferred_height (widget,
+							       minimum_height,
+							       natural_height);
+
+	if (minimum_height)
+		*minimum_height += border.top + border.bottom;
+	if (natural_height)
+		*natural_height += border.top + border.bottom;
+}
+
+static gboolean
+gdaui_bar_draw (GtkWidget *widget,
+		cairo_t   *cr)
+{
+	GtkStyleContext *context;
+
+	context = gtk_widget_get_style_context (widget);
+
+	gtk_render_background (context, cr, 0, 0,
+			       gtk_widget_get_allocated_width (widget),
+			       gtk_widget_get_allocated_height (widget));
+	gtk_render_frame (context, cr, 0, 0,
+			  gtk_widget_get_allocated_width (widget),
+			  gtk_widget_get_allocated_height (widget));
+
+	GTK_WIDGET_CLASS (parent_class)->draw (widget, cr);
+
+	return FALSE;
+}
+
+/**
+ * gdaui_bar_new:
+ *
+ * Creates a new #GdauiBar object.
+ *
+ * Returns: a new #GdauiBar object
+ */
+GtkWidget *
+gdaui_bar_new (const gchar *text)
+{
+	return g_object_new (GDAUI_TYPE_BAR, "text", text, NULL);
+}
+
+/**
+ * gdaui_bar_get_text:
+ * @bar: a #GdauiBar widget.
+ *
+ * Get the text being displayed in the given gray bar widget. This
+ * does not include any embedded underlines indicating mnemonics or
+ * Pango markup.
+ *
+ * Returns: the text in the widget.
+ */
+const gchar *
+gdaui_bar_get_text (GdauiBar *bar)
+{
+        g_return_val_if_fail (GDAUI_IS_BAR (bar), NULL);
+
+	return gtk_label_get_text (GTK_LABEL (bar->priv->label));
+}
+
+/**
+ * gdaui_bar_set_text
+ * @bar: a #GdauiBar widget
+ * @text: a string
+ *
+ * Set the text displayed in the given gray bar widget. This can include
+ * embedded underlines indicating mnemonics or Pango markup.
+ *
+ */
+void
+gdaui_bar_set_text (GdauiBar *bar, const gchar *text)
+{
+        g_return_if_fail (GDAUI_IS_BAR (bar));
+
+        gtk_label_set_markup (GTK_LABEL (bar->priv->label), text);
+}
+
+/**
+ * gdaui_set_icon_from_file
+ * @bar: a #GdauiBar widget.
+ * @file: filename.
+ *
+ * Set the icon displayed in the given gray bar widget. This can include
+ * embedded underlines indicating mnemonics or Pango markup.
+ *
+ */
+void
+gdaui_bar_set_icon_from_file (GdauiBar *bar, const gchar *file)
+{
+        g_return_if_fail (GDAUI_IS_BAR (bar));
+
+        gtk_image_set_from_file (GTK_IMAGE (bar->priv->icon), file);
+        gdaui_bar_set_show_icon (bar, TRUE);
+}
+
+/**
+ * gdaui_set_icon_from_stock
+ * @bar: a #GdauiBar widget.
+ * @stock_id: a stock icon name.
+ * @size: a tock icon size.
+ *
+ * Set the icon using a stock icon for the given gray bar.
+ */
+void
+gdaui_bar_set_icon_from_stock (GdauiBar *bar, const gchar *stock_id, GtkIconSize size)
+{
+        g_return_if_fail (GDAUI_IS_BAR (bar));
+
+        gtk_image_set_from_stock (GTK_IMAGE (bar->priv->icon), stock_id, size);
+        gdaui_bar_set_show_icon (bar, TRUE);
+}
+
+/**
+ * gdaui_set_icon_from_pixbuf
+ * @bar: a #GdauiBar widget.
+ * @pixbuf: a #GdkPixbuf
+ *
+ * Set the icon using a stock icon for the given gray bar.
+ */
+void
+gdaui_bar_set_icon_from_pixbuf (GdauiBar *bar, GdkPixbuf *pixbuf)
+{
+        g_return_if_fail (GDAUI_IS_BAR (bar));
+
+        gtk_image_set_from_pixbuf (GTK_IMAGE (bar->priv->icon), pixbuf);
+        gdaui_bar_set_show_icon (bar, TRUE);
+}
+
+/**
+ * gdaui_bar_set_show_icon
+ * @bar: a #GdauiBar widget.
+ * @show: whether to show the icon or not.
+ *
+ * Set the icon displaying mode for the given grid.
+ */
+void
+gdaui_bar_set_show_icon (GdauiBar *bar, gboolean show)
+{
+        g_return_if_fail (GDAUI_IS_BAR (bar));
+
+        if (show) {
+                gtk_widget_show (bar->priv->icon);
+                bar->priv->show_icon = TRUE;
+        } else {
+                gtk_widget_hide (bar->priv->icon);
+                bar->priv->show_icon = FALSE;
+        }
+}
+
+/**
+ * gdaui_bar_get_show_icon
+ * @bar: a #GdauiBar widget.
+ *
+ * Get whether the icon is being shown for the given gray bar.
+ *
+ * Returns: TRUE if the icon is shown, FALSE if not.
+ */
+gboolean
+gdaui_bar_get_show_icon (GdauiBar *bar)
+{
+        g_return_val_if_fail (GDAUI_IS_BAR (bar), FALSE);
+
+        return bar->priv->show_icon;
+}
diff --git a/control-center/gdaui-bar.h b/control-center/gdaui-bar.h
new file mode 100644
index 0000000..c77f342
--- /dev/null
+++ b/control-center/gdaui-bar.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2009 - 2011 Vivien Malerba <malerba gnome-db org>
+ *
+ * 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 program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#ifndef __GDAUI_BAR_H__
+#define __GDAUI_BAR_H__
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+/*
+ * Type checking and casting macros
+ */
+#define GDAUI_TYPE_BAR              (gdaui_bar_get_type())
+#define GDAUI_BAR(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj), GDAUI_TYPE_BAR, GdauiBar))
+#define GDAUI_BAR_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), GDAUI_TYPE_BAR, GdauiBarClass))
+#define GDAUI_IS_BAR(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj), GDAUI_TYPE_BAR))
+#define GDAUI_IS_BAR_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDAUI_TYPE_BAR))
+#define GDAUI_BAR_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GDAUI_TYPE_BAR, GdauiBarClass))
+
+
+typedef struct _GdauiBarPrivate GdauiBarPrivate;
+typedef struct _GdauiBarClass GdauiBarClass;
+typedef struct _GdauiBar GdauiBar;
+
+struct _GdauiBar
+{
+	GtkBox parent;
+
+	/*< private > */
+	GdauiBarPrivate *priv;
+};
+
+
+struct _GdauiBarClass
+{
+	GtkBoxClass parent_class;
+};
+
+GType        gdaui_bar_get_type             (void) G_GNUC_CONST;
+GtkWidget   *gdaui_bar_new                  (const gchar *text);
+const gchar *gdaui_bar_get_text             (GdauiBar *bar);
+void         gdaui_bar_set_text             (GdauiBar *bar, const gchar *text);
+void         gdaui_bar_set_icon_from_pixbuf (GdauiBar *bar, GdkPixbuf *pixbuf);
+void         gdaui_bar_set_icon_from_file   (GdauiBar *bar, const gchar *file);
+void         gdaui_bar_set_icon_from_stock  (GdauiBar *bar, const gchar *stock_id, GtkIconSize size);
+void         gdaui_bar_set_show_icon        (GdauiBar *bar, gboolean show);
+gboolean     gdaui_bar_get_show_icon        (GdauiBar *bar);
+
+G_END_DECLS
+
+#endif
diff --git a/control-center/main.c b/control-center/main.c
index 7b49163..6a79250 100644
--- a/control-center/main.c
+++ b/control-center/main.c
@@ -27,6 +27,7 @@
 #include "provider-config.h"
 #include "gdaui-dsn-assistant.h"
 
+GtkApplication *app;
 GtkWindow *main_window;
 GtkActionGroup *actions;
 
@@ -142,7 +143,7 @@ file_delete_cb (G_GNUC_UNUSED GtkAction *action, gpointer user_data)
 static void
 window_closed_cb (G_GNUC_UNUSED GtkAction *action, G_GNUC_UNUSED gpointer user_data)
 {
-	gtk_main_quit ();
+	g_application_quit (G_APPLICATION (app));
 }
 
 static void
@@ -261,7 +262,7 @@ create_main_window (void)
 	GdkPixbuf *icon;
 
 	/* create the main window */
-	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+	window = gtk_application_window_new (app);
 	main_window = GTK_WINDOW (window);
 	gtk_window_set_title (GTK_WINDOW (window), _("Database access control center"));
 	gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER);
@@ -311,7 +312,6 @@ activate (GtkApplication *app)
 int
 main (int argc, char *argv[])
 {
-	GtkApplication *app;
 	gint status;
 	
 	app = gtk_application_new ("org.GnomeDb.GdaBrowser", G_APPLICATION_FLAGS_NONE);
diff --git a/control-center/provider-config.c b/control-center/provider-config.c
index 32f1060..c947b69 100644
--- a/control-center/provider-config.c
+++ b/control-center/provider-config.c
@@ -24,7 +24,7 @@
 #include <gtk/gtk.h>
 #include <libgda-ui/libgda-ui.h>
 #include "provider-config.h"
-#include "cc-gray-bar.h"
+#include "gdaui-bar.h"
 
 #define PROVIDER_CONFIG_DATA "Provider_ConfigData"
 
@@ -59,12 +59,12 @@ provider_config_new (void)
 	/* title */
 	title = g_strdup_printf ("<b>%s</b>\n%s", _("Providers"),
 				 _("Installed providers"));
-	priv->title = cc_gray_bar_new (title);
+	priv->title = gdaui_bar_new (title);
 	g_free (title);
 
 	gchar *path;
 	path = gda_gbr_get_file_path (GDA_DATA_DIR, LIBGDA_ABI_NAME, "pixmaps", "gdaui-generic.png", NULL);
-	cc_gray_bar_set_icon_from_file (CC_GRAY_BAR (priv->title), path);
+	gdaui_bar_set_icon_from_file (GDAUI_BAR (priv->title), path);
 	g_free (path);
 
 	gtk_box_pack_start (GTK_BOX (provider), priv->title, FALSE, FALSE, 0);
diff --git a/tools/browser/Makefile.am b/tools/browser/Makefile.am
index 319e10b..8a5f9f4 100644
--- a/tools/browser/Makefile.am
+++ b/tools/browser/Makefile.am
@@ -45,8 +45,8 @@ libbrowser_la_SOURCES=\
 	../config-info.c \
 	../tools-utils.h \
 	../tools-utils.c \
-	cc-gray-bar.c \
-	cc-gray-bar.h \
+	gdaui-bar.c \
+	gdaui-bar.h \
 	marshal.c \
 	marshal.h \
 	decl.h \
diff --git a/tools/browser/common/objects-cloud.c b/tools/browser/common/objects-cloud.c
index 2431447..5b2b2fa 100644
--- a/tools/browser/common/objects-cloud.c
+++ b/tools/browser/common/objects-cloud.c
@@ -26,7 +26,7 @@
 #include <libgda-ui/gdaui-tree-store.h>
 #include "../dnd.h"
 #include "../support.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include "marshal.h"
 #include <gdk/gdkkeysyms.h>
 #include <libgda-ui/internal/popup-container.h>
diff --git a/tools/browser/data-manager/data-console.c b/tools/browser/data-manager/data-console.c
index e709671..8a10d6b 100644
--- a/tools/browser/data-manager/data-console.c
+++ b/tools/browser/data-manager/data-console.c
@@ -26,7 +26,7 @@
 #include "ui-spec-editor.h"
 #include "../dnd.h"
 #include "../support.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include "../browser-window.h"
 #include "../browser-page.h"
 #include "../browser-perspective.h"
@@ -52,7 +52,7 @@ typedef enum {
 struct _DataConsolePrivate {
 	DataSourceManager *mgr;
 
-	CcGrayBar *header;
+	GdauiBar *header;
 	LayoutType layout_type;
 	BrowserConnection *bcnc;
 
@@ -299,11 +299,11 @@ data_console_new (BrowserConnection *bcnc)
 	gtk_box_pack_start (GTK_BOX (dconsole), hbox, FALSE, FALSE, 0);
 
 	str = g_strdup_printf ("<b>%s</b>\n%s", _("Data Manager"), _("Unsaved"));
-	label = cc_gray_bar_new (str);
+	label = gdaui_bar_new (str);
 	g_free (str);
         gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
         gtk_widget_show (label);
-	dconsole->priv->header = CC_GRAY_BAR (label);
+	dconsole->priv->header = GDAUI_BAR (label);
 
 	wid = gtk_button_new ();
 	label = gtk_image_new_from_stock (GTK_STOCK_SAVE, GTK_ICON_SIZE_BUTTON);
@@ -508,7 +508,7 @@ data_console_set_fav_id (DataConsole *dconsole, gint fav_id, GError **error)
 		tmp = g_markup_printf_escaped (_("'%s' data manager"), fav.name);
 		str = g_strdup_printf ("<b>%s</b>\n%s", _("Data manager"), tmp);
 		g_free (tmp);
-		cc_gray_bar_set_text (dconsole->priv->header, str);
+		gdaui_bar_set_text (dconsole->priv->header, str);
 		g_free (str);
 		
 		dconsole->priv->fav_id = fav.id;
@@ -518,7 +518,7 @@ data_console_set_fav_id (DataConsole *dconsole, gint fav_id, GError **error)
 	else {
 		gchar *str;
 		str = g_strdup_printf ("<b>%s</b>\n%s", _("Data manager"), _("Unsaved"));
-		cc_gray_bar_set_text (dconsole->priv->header, str);
+		gdaui_bar_set_text (dconsole->priv->header, str);
 		g_free (str);
 		dconsole->priv->fav_id = -1;
 	}
diff --git a/tools/browser/data-manager/data-favorite-selector.c b/tools/browser/data-manager/data-favorite-selector.c
index a8985c4..5f61b4b 100644
--- a/tools/browser/data-manager/data-favorite-selector.c
+++ b/tools/browser/data-manager/data-favorite-selector.c
@@ -28,7 +28,7 @@
 #include "../dnd.h"
 #include "../support.h"
 #include "marshal.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include <gdk/gdkkeysyms.h>
 #include <libgda-ui/internal/popup-container.h>
 
@@ -480,9 +480,9 @@ data_favorite_selector_new (BrowserConnection *bcnc)
 	GtkWidget *label;
 	gchar *str;
 	str = g_strdup_printf ("<b>%s</b>", _("Saved"));
-	label = cc_gray_bar_new (str);
+	label = gdaui_bar_new (str);
 	g_free (str);
-	cc_gray_bar_set_icon_from_pixbuf (CC_GRAY_BAR (label), browser_get_pixbuf_icon (BROWSER_ICON_BOOKMARK));
+	gdaui_bar_set_icon_from_pixbuf (GDAUI_BAR (label), browser_get_pixbuf_icon (BROWSER_ICON_BOOKMARK));
         gtk_box_pack_start (GTK_BOX (tsel), label, FALSE, FALSE, 0);
         gtk_widget_show (label);
 
diff --git a/tools/browser/doc/gda-browser-docs.sgml b/tools/browser/doc/gda-browser-docs.sgml
index de7cb6d..346d35d 100644
--- a/tools/browser/doc/gda-browser-docs.sgml
+++ b/tools/browser/doc/gda-browser-docs.sgml
@@ -142,7 +142,7 @@
 	which can be used in any extension.
       </para>
       <xi:include href="xml/ui-formgrid.xml"/>
-      <xi:include href="xml/cc-gray-bar.xml"/>
+      <xi:include href="xml/gdaui-bar.xml"/>
       <xi:include href="xml/popup-container.xml"/>
     </chapter>
 
diff --git a/tools/browser/doc/gda-browser-sections.txt b/tools/browser/doc/gda-browser-sections.txt
index 817ab7e..e76675c 100644
--- a/tools/browser/doc/gda-browser-sections.txt
+++ b/tools/browser/doc/gda-browser-sections.txt
@@ -50,24 +50,24 @@ BROWSER_CORE_CLASS
 </SECTION>
 
 <SECTION>
-<FILE>cc-gray-bar</FILE>
-CcGrayBarPrivate
-<TITLE>CcGrayBar</TITLE>
-CcGrayBar
-cc_gray_bar_new
-cc_gray_bar_get_text
-cc_gray_bar_set_text
-cc_gray_bar_set_icon_from_pixbuf
-cc_gray_bar_set_icon_from_file
-cc_gray_bar_set_icon_from_stock
-cc_gray_bar_set_show_icon
-cc_gray_bar_get_show_icon
+<FILE>gdaui-bar</FILE>
+GdauiBarPrivate
+<TITLE>GdauiBar</TITLE>
+GdauiBar
+gdaui_bar_new
+gdaui_bar_get_text
+gdaui_bar_set_text
+gdaui_bar_set_icon_from_pixbuf
+gdaui_bar_set_icon_from_file
+gdaui_bar_set_icon_from_stock
+gdaui_bar_set_show_icon
+gdaui_bar_get_show_icon
 <SUBSECTION Standard>
-CC_GRAY_BAR
+GDAUI_BAR
 CC_IS_GRAY_BAR
 CC_TYPE_GRAY_BAR
-cc_gray_bar_get_type
-CC_GRAY_BAR_CLASS
+gdaui_bar_get_type
+GDAUI_BAR_CLASS
 CC_IS_GRAY_BAR_CLASS
 </SECTION>
 
diff --git a/tools/browser/doc/gda-browser.types b/tools/browser/doc/gda-browser.types
index 4157c5e..01fcdea 100644
--- a/tools/browser/doc/gda-browser.types
+++ b/tools/browser/doc/gda-browser.types
@@ -3,7 +3,7 @@
 #include <common/favorites-actions.h>
 #include <browser-window.h>
 #include <browser-page.h>
-#include <cc-gray-bar.h>
+#include <gdaui-bar.h>
 #include <libgda-ui/internal/popup-container.h>
 #include <data-manager/data-manager-perspective.h>
 #include <schema-browser/schema-browser-perspective.h>
@@ -16,7 +16,7 @@ tools_favorites_get_type
 browser_window_get_type
 browser_perspective_get_type
 browser_page_get_type
-cc_gray_bar_get_type
+gdaui_bar_get_type
 popup_container_get_type
 data_manager_perspective_get_type
 schema_browser_perspective_get_type
diff --git a/tools/browser/gdaui-bar.c b/tools/browser/gdaui-bar.c
new file mode 120000
index 0000000..a1652fa
--- /dev/null
+++ b/tools/browser/gdaui-bar.c
@@ -0,0 +1 @@
+../../control-center/gdaui-bar.c
\ No newline at end of file
diff --git a/tools/browser/gdaui-bar.h b/tools/browser/gdaui-bar.h
new file mode 120000
index 0000000..8740a39
--- /dev/null
+++ b/tools/browser/gdaui-bar.h
@@ -0,0 +1 @@
+../../control-center/gdaui-bar.h
\ No newline at end of file
diff --git a/tools/browser/ldap-browser/classes-view.c b/tools/browser/ldap-browser/classes-view.c
index 3280909..789fa68 100644
--- a/tools/browser/ldap-browser/classes-view.c
+++ b/tools/browser/ldap-browser/classes-view.c
@@ -22,7 +22,7 @@
 #include "classes-view.h"
 #include "../dnd.h"
 #include "../support.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include "../browser-stock-icons.h"
 #include <virtual/gda-ldap-connection.h>
 #include "mgr-ldap-classes.h"
diff --git a/tools/browser/ldap-browser/hierarchy-view.c b/tools/browser/ldap-browser/hierarchy-view.c
index b5138bd..b0ba96c 100644
--- a/tools/browser/ldap-browser/hierarchy-view.c
+++ b/tools/browser/ldap-browser/hierarchy-view.c
@@ -22,7 +22,7 @@
 #include "hierarchy-view.h"
 #include "../dnd.h"
 #include "../support.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include "../browser-stock-icons.h"
 #include <virtual/gda-ldap-connection.h>
 #include "mgr-ldap-entries.h"
diff --git a/tools/browser/ldap-browser/ldap-classes-page.c b/tools/browser/ldap-browser/ldap-classes-page.c
index a301094..2370bad 100644
--- a/tools/browser/ldap-browser/ldap-classes-page.c
+++ b/tools/browser/ldap-browser/ldap-classes-page.c
@@ -24,7 +24,7 @@
 #include "class-properties.h"
 #include "../dnd.h"
 #include "../support.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include "../browser-page.h"
 #include "../browser-stock-icons.h"
 #include "../browser-window.h"
@@ -361,7 +361,7 @@ ldap_classes_page_new (BrowserConnection *bcnc, const gchar *classname)
 	gchar *str;
 
 	str = g_strdup_printf ("<b>%s</b>", _("LDAP classes browser"));
-	label = cc_gray_bar_new (str);
+	label = gdaui_bar_new (str);
 	g_free (str);
         gtk_box_pack_start (GTK_BOX (ebrowser), label, FALSE, FALSE, 0);
         gtk_widget_show (label);
diff --git a/tools/browser/ldap-browser/ldap-entries-page.c b/tools/browser/ldap-browser/ldap-entries-page.c
index 29e91de..f6fde04 100644
--- a/tools/browser/ldap-browser/ldap-entries-page.c
+++ b/tools/browser/ldap-browser/ldap-entries-page.c
@@ -24,7 +24,7 @@
 #include "entry-properties.h"
 #include "../dnd.h"
 #include "../support.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include "../browser-page.h"
 #include "../browser-stock-icons.h"
 #include "../browser-window.h"
@@ -367,7 +367,7 @@ ldap_entries_page_new (BrowserConnection *bcnc, const gchar *dn)
 	gchar *str;
 
 	str = g_strdup_printf ("<b>%s</b>", _("LDAP entries browser"));
-	label = cc_gray_bar_new (str);
+	label = gdaui_bar_new (str);
 	g_free (str);
         gtk_box_pack_start (GTK_BOX (ebrowser), label, FALSE, FALSE, 0);
         gtk_widget_show (label);
diff --git a/tools/browser/ldap-browser/ldap-favorite-selector.c b/tools/browser/ldap-browser/ldap-favorite-selector.c
index 6dc2547..6813e40 100644
--- a/tools/browser/ldap-browser/ldap-favorite-selector.c
+++ b/tools/browser/ldap-browser/ldap-favorite-selector.c
@@ -27,7 +27,7 @@
 #include "../dnd.h"
 #include "../support.h"
 #include "marshal.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include <gdk/gdkkeysyms.h>
 #include <libgda-ui/internal/popup-container.h>
 
@@ -475,9 +475,9 @@ ldap_favorite_selector_new (BrowserConnection *bcnc)
 	GtkWidget *label;
 	gchar *str;
 	str = g_strdup_printf ("<b>%s</b>", _("Favorites"));
-	label = cc_gray_bar_new (str);
+	label = gdaui_bar_new (str);
 	g_free (str);
-	cc_gray_bar_set_icon_from_pixbuf (CC_GRAY_BAR (label), browser_get_pixbuf_icon (BROWSER_ICON_BOOKMARK));
+	gdaui_bar_set_icon_from_pixbuf (GDAUI_BAR (label), browser_get_pixbuf_icon (BROWSER_ICON_BOOKMARK));
         gtk_box_pack_start (GTK_BOX (fsel), label, FALSE, FALSE, 0);
         gtk_widget_show (label);
 
diff --git a/tools/browser/ldap-browser/ldap-search-page.c b/tools/browser/ldap-browser/ldap-search-page.c
index 2606ff3..b84651a 100644
--- a/tools/browser/ldap-browser/ldap-search-page.c
+++ b/tools/browser/ldap-browser/ldap-search-page.c
@@ -21,7 +21,7 @@
 #include <string.h>
 #include "ldap-search-page.h"
 #include "filter-editor.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include "../browser-page.h"
 #include "../browser-window.h"
 #include "../browser-connection.h"
@@ -285,7 +285,7 @@ ldap_search_page_new (BrowserConnection *bcnc, const gchar *base_dn)
 	gchar *str;
 
 	str = g_strdup_printf ("<b>%s</b>", _("LDAP search page"));
-	label = cc_gray_bar_new (str);
+	label = gdaui_bar_new (str);
 	g_free (str);
         gtk_box_pack_start (GTK_BOX (epage), label, FALSE, FALSE, 0);
         gtk_widget_show (label);
diff --git a/tools/browser/query-exec/query-console-page.c b/tools/browser/query-exec/query-console-page.c
index 91fb079..49520fc 100644
--- a/tools/browser/query-exec/query-console-page.c
+++ b/tools/browser/query-exec/query-console-page.c
@@ -23,7 +23,7 @@
 #include "query-console-page.h"
 #include "../dnd.h"
 #include "../support.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include "query-exec-perspective.h"
 #include "../browser-window.h"
 #include "../browser-page.h"
@@ -97,7 +97,7 @@ struct _QueryConsolePagePrivate {
 
 	GtkActionGroup *agroup;
 
-	CcGrayBar *header;
+	GdauiBar *header;
 	GtkWidget *vpaned; /* top=>query editor, bottom=>results */
 
 	QueryEditor *editor;
@@ -289,11 +289,11 @@ query_console_page_new (BrowserConnection *bcnc)
         GtkWidget *label;
 	gchar *str;
 	str = g_strdup_printf ("<b>%s</b>", _("Query editor"));
-	label = cc_gray_bar_new (str);
+	label = gdaui_bar_new (str);
 	g_free (str);
         gtk_box_pack_start (GTK_BOX (tconsole), label, FALSE, FALSE, 0);
         gtk_widget_show (label);
-	tconsole->priv->header = CC_GRAY_BAR (label);
+	tconsole->priv->header = GDAUI_BAR (label);
 
 	/* main contents */
 	GtkWidget *vpaned;
diff --git a/tools/browser/query-exec/query-favorite-selector.c b/tools/browser/query-exec/query-favorite-selector.c
index a734bb9..4c26053 100644
--- a/tools/browser/query-exec/query-favorite-selector.c
+++ b/tools/browser/query-exec/query-favorite-selector.c
@@ -28,7 +28,7 @@
 #include "../dnd.h"
 #include "../support.h"
 #include "marshal.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include <gdk/gdkkeysyms.h>
 #include <libgda-ui/internal/popup-container.h>
 #include "query-editor.h"
@@ -561,9 +561,9 @@ query_favorite_selector_new (BrowserConnection *bcnc)
 	GtkWidget *label;
 	gchar *str;
 	str = g_strdup_printf ("<b>%s</b>", _("Favorites"));
-	label = cc_gray_bar_new (str);
+	label = gdaui_bar_new (str);
 	g_free (str);
-	cc_gray_bar_set_icon_from_pixbuf (CC_GRAY_BAR (label), browser_get_pixbuf_icon (BROWSER_ICON_BOOKMARK));
+	gdaui_bar_set_icon_from_pixbuf (GDAUI_BAR (label), browser_get_pixbuf_icon (BROWSER_ICON_BOOKMARK));
         gtk_box_pack_start (GTK_BOX (tsel), label, FALSE, FALSE, 0);
         gtk_widget_show (label);
 
diff --git a/tools/browser/schema-browser/favorite-selector.c b/tools/browser/schema-browser/favorite-selector.c
index 9e94e4e..9ac3427 100644
--- a/tools/browser/schema-browser/favorite-selector.c
+++ b/tools/browser/schema-browser/favorite-selector.c
@@ -27,7 +27,7 @@
 #include "../dnd.h"
 #include "../support.h"
 #include "marshal.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include <gdk/gdkkeysyms.h>
 
 struct _FavoriteSelectorPrivate {
@@ -243,9 +243,9 @@ favorite_selector_new (BrowserConnection *bcnc)
 	GtkWidget *label;
 	gchar *str;
 	str = g_strdup_printf ("<b>%s</b>", _("Favorites"));
-	label = cc_gray_bar_new (str);
+	label = gdaui_bar_new (str);
 	g_free (str);
-	cc_gray_bar_set_icon_from_pixbuf (CC_GRAY_BAR (label), browser_get_pixbuf_icon (BROWSER_ICON_BOOKMARK));
+	gdaui_bar_set_icon_from_pixbuf (GDAUI_BAR (label), browser_get_pixbuf_icon (BROWSER_ICON_BOOKMARK));
         gtk_box_pack_start (GTK_BOX (tsel), label, FALSE, FALSE, 0);
         gtk_widget_show (label);
 
diff --git a/tools/browser/schema-browser/objects-index.c b/tools/browser/schema-browser/objects-index.c
index 96548e9..becb9f5 100644
--- a/tools/browser/schema-browser/objects-index.c
+++ b/tools/browser/schema-browser/objects-index.c
@@ -26,7 +26,7 @@
 #include <libgda-ui/gdaui-tree-store.h>
 #include "../dnd.h"
 #include "../support.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include "marshal.h"
 #include <gdk/gdkkeysyms.h>
 #include <libgda-ui/internal/popup-container.h>
@@ -169,7 +169,7 @@ objects_index_new (BrowserConnection *bcnc)
 	gchar *str;
 
 	str = g_strdup_printf ("<b>%s</b>", _("Tables' index"));
-	label = cc_gray_bar_new (str);
+	label = gdaui_bar_new (str);
 	g_free (str);
         gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
         gtk_widget_show (label);
diff --git a/tools/browser/schema-browser/relations-diagram.c b/tools/browser/schema-browser/relations-diagram.c
index b981f77..597ec4e 100644
--- a/tools/browser/schema-browser/relations-diagram.c
+++ b/tools/browser/schema-browser/relations-diagram.c
@@ -22,7 +22,7 @@
 #include <string.h>
 #include "relations-diagram.h"
 #include "../support.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include "../canvas/browser-canvas-db-relations.h"
 #include <gdk/gdkkeysyms.h>
 #include <libgda-ui/internal/popup-container.h>
@@ -36,7 +36,7 @@ struct _RelationsDiagramPrivate {
 	BrowserConnection *bcnc;
 	gint fav_id; /* diagram's ID as a favorite, -1=>not a favorite */
 
-	CcGrayBar *header;
+	GdauiBar *header;
 	GtkWidget *canvas;
 	GtkWidget *save_button;
 
@@ -327,10 +327,10 @@ relations_diagram_new (BrowserConnection *bcnc)
         GtkWidget *label;
 	gchar *str;
 	str = g_strdup_printf ("<b>%s</b>\n%s", _("Relations diagram"), _("Unsaved"));
-	label = cc_gray_bar_new (str);
+	label = gdaui_bar_new (str);
 	g_free (str);
         gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
-	diagram->priv->header = CC_GRAY_BAR (label);
+	diagram->priv->header = GDAUI_BAR (label);
 
 	wid = gtk_button_new ();
 	label = gtk_image_new_from_stock (GTK_STOCK_SAVE, GTK_ICON_SIZE_BUTTON);
@@ -385,7 +385,7 @@ relations_diagram_new_with_fav_id (BrowserConnection *bcnc, gint fav_id, GError
 	tmp = g_markup_printf_escaped (_("'%s' diagram"), fav.name);
 	str = g_strdup_printf ("<b>%s</b>\n%s", _("Relations diagram"), tmp);
 	g_free (tmp);
-	cc_gray_bar_set_text (diagram->priv->header, str);
+	gdaui_bar_set_text (diagram->priv->header, str);
 	g_free (str);
 	diagram->priv->fav_id = fav_id;
 	relations_diagram_set_fav_id (diagram, fav_id, NULL);
@@ -465,7 +465,7 @@ relations_diagram_set_fav_id (RelationsDiagram *diagram, gint fav_id, GError **e
 		tmp = g_markup_printf_escaped (_("'%s' diagram"), fav.name);
 		str = g_strdup_printf ("<b>%s</b>\n%s", _("Relations diagram"), tmp);
 		g_free (tmp);
-		cc_gray_bar_set_text (diagram->priv->header, str);
+		gdaui_bar_set_text (diagram->priv->header, str);
 		g_free (str);
 		
 		diagram->priv->fav_id = fav.id;
@@ -475,7 +475,7 @@ relations_diagram_set_fav_id (RelationsDiagram *diagram, gint fav_id, GError **e
 	else {
 		gchar *str;
 		str = g_strdup_printf ("<b>%s</b>\n%s", _("Relations diagram"), _("Unsaved"));
-		cc_gray_bar_set_text (diagram->priv->header, str);
+		gdaui_bar_set_text (diagram->priv->header, str);
 		g_free (str);
 		diagram->priv->fav_id = -1;
 	}
diff --git a/tools/browser/schema-browser/table-columns.c b/tools/browser/schema-browser/table-columns.c
index 78681c1..c6a2b31 100644
--- a/tools/browser/schema-browser/table-columns.c
+++ b/tools/browser/schema-browser/table-columns.c
@@ -29,7 +29,7 @@
 #include <libgda-ui/gdaui-tree-store.h>
 #include "../tools-utils.h"
 #include "../support.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include "mgr-columns.h"
 #include "schema-browser-perspective.h"
 #include "../browser-window.h"
@@ -687,7 +687,7 @@ table_columns_new (TableInfo *tinfo)
 		gchar *str;
 		
 		str = g_strdup_printf ("<b>%s</b>", _("LDAP virtual table definition"));
-		label = cc_gray_bar_new (str);
+		label = gdaui_bar_new (str);
 		g_free (str);
 		gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
 		tcolumns->priv->ldap_header = label;
@@ -734,7 +734,7 @@ table_columns_new (TableInfo *tinfo)
 	gchar *str;
 
 	str = g_strdup_printf ("<b>%s</b>", _("Constraints and integrity rules"));
-	label = cc_gray_bar_new (str);
+	label = gdaui_bar_new (str);
 	g_free (str);
         gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
 
diff --git a/tools/browser/schema-browser/table-info.c b/tools/browser/schema-browser/table-info.c
index ee20c6a..6fba0d5 100644
--- a/tools/browser/schema-browser/table-info.c
+++ b/tools/browser/schema-browser/table-info.c
@@ -23,7 +23,7 @@
 #include "table-info.h"
 #include "../dnd.h"
 #include "../support.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include "table-columns.h"
 #include "table-preferences.h"
 #ifdef HAVE_GOOCANVAS
@@ -47,7 +47,7 @@ struct _TableInfoPrivate {
 	gchar *table_name;
 	gchar *table_short_name;
 
-	CcGrayBar *header;
+	GdauiBar *header;
 	GtkWidget *contents; /* notebook with pageO <=> @unknown_table_notice, page1 <=> @pages */
 	GtkWidget *unknown_table_notice;
 	GtkWidget *pages; /* notebook to store individual pages */
@@ -332,11 +332,11 @@ table_info_new (BrowserConnection *bcnc,
 	tmp = g_strdup_printf (_("In schema '%s'"), schema);
 	str = g_strdup_printf ("<b>%s</b>\n%s", table, tmp);
 	g_free (tmp);
-	label = cc_gray_bar_new (str);
+	label = gdaui_bar_new (str);
 	g_free (str);
         gtk_box_pack_start (GTK_BOX (tinfo), label, FALSE, FALSE, 0);
         gtk_widget_show (label);
-	tinfo->priv->header = CC_GRAY_BAR (label);
+	tinfo->priv->header = GDAUI_BAR (label);
 
 	/* main contents */
 	GtkWidget *top_nb;
diff --git a/tools/browser/schema-browser/table-preferences.c b/tools/browser/schema-browser/table-preferences.c
index 876cba7..1358b1c 100644
--- a/tools/browser/schema-browser/table-preferences.c
+++ b/tools/browser/schema-browser/table-preferences.c
@@ -27,7 +27,7 @@
 #include "table-preferences.h"
 #include <libgda-ui/gdaui-tree-store.h>
 #include "../support.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include "schema-browser-perspective.h"
 #include "../query-exec/query-editor.h"
 #include <libgda-ui/gdaui-plugin.h>
diff --git a/tools/browser/schema-browser/table-relations.c b/tools/browser/schema-browser/table-relations.c
index 935ad03..44eb2c4 100644
--- a/tools/browser/schema-browser/table-relations.c
+++ b/tools/browser/schema-browser/table-relations.c
@@ -27,7 +27,7 @@
 #include "table-relations.h"
 #include <libgda-ui/gdaui-tree-store.h>
 #include "../support.h"
-#include "../cc-gray-bar.h"
+#include "../gdaui-bar.h"
 #include "schema-browser-perspective.h"
 #include "../canvas/browser-canvas-db-relations.h"
 



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