[gnome-bluetooth] Underline the text in activatable cells
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] Underline the text in activatable cells
- Date: Thu, 22 Oct 2009 10:28:04 +0000 (UTC)
commit 02638983a86c372a9f37e0692b292af2b48a347a
Author: Joshua Lock <josh linux intel com>
Date: Wed Oct 21 15:40:25 2009 +0100
Underline the text in activatable cells
In an attempt to make the clickable cells in the treeview more apparent
use pango markup to underline the text.
https://bugzilla.gnome.org/show_bug.cgi?id=599277
.../moblin-copy-n-paste/mux-cell-renderer-text.c | 20 ++++++++++++++++++++
moblin/moblin-panel.c | 6 +++---
2 files changed, 23 insertions(+), 3 deletions(-)
---
diff --git a/moblin/moblin-copy-n-paste/mux-cell-renderer-text.c b/moblin/moblin-copy-n-paste/mux-cell-renderer-text.c
index ce07026..c6ce31e 100644
--- a/moblin/moblin-copy-n-paste/mux-cell-renderer-text.c
+++ b/moblin/moblin-copy-n-paste/mux-cell-renderer-text.c
@@ -42,11 +42,31 @@ mux_cell_renderer_text_activate (GtkCellRenderer *cell,
}
static void
+mux_cell_renderer_text_render (GtkCellRenderer *cell,
+ GdkDrawable *window,
+ GtkWidget *widget,
+ GdkRectangle *bg_area,
+ GdkRectangle *cell_area,
+ GdkRectangle *expose_area,
+ GtkCellRendererState flags)
+{
+ GTK_CELL_RENDERER_CLASS (mux_cell_renderer_text_parent_class)->render (cell,
+ window,
+ widget,
+ bg_area,
+ cell_area,
+ expose_area,
+ GTK_CELL_RENDERER_SELECTED);
+}
+
+
+static void
mux_cell_renderer_text_class_init (MuxCellRendererTextClass *klass)
{
GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (klass);
cell_class->activate = mux_cell_renderer_text_activate;
+ cell_class->render = mux_cell_renderer_text_render;
signals[ACTIVATED] =
g_signal_new ("activated",
diff --git a/moblin/moblin-panel.c b/moblin/moblin-panel.c
index fd9f3f2..60936c8 100644
--- a/moblin/moblin-panel.c
+++ b/moblin/moblin-panel.c
@@ -816,7 +816,7 @@ pair_to_text (GtkTreeViewColumn *column, GtkCellRenderer *cell,
BLUETOOTH_COLUMN_TRUSTED, &trusted, -1);
if (!paired && !trusted) {
- g_object_set (cell, "markup", _("Pair"), NULL);
+ g_object_set (cell, "markup", _("<u>Pair</u>"), NULL);
}
}
@@ -830,7 +830,7 @@ connect_to_text (GtkTreeViewColumn *column, GtkCellRenderer *cell,
BLUETOOTH_COLUMN_TRUSTED, &trusted, -1);
if ((paired || trusted) && connected == FALSE) {
- g_object_set (cell, "markup", _("Connect"), NULL);
+ g_object_set (cell, "markup", _("<u>Connect</u>"), NULL);
} else {
g_object_set (cell, "markup", "", NULL);
}
@@ -849,7 +849,7 @@ browse_to_text (GtkTreeViewColumn *column, GtkCellRenderer *cell,
if (uuids != NULL) {
for (i = 0; uuids[i] != NULL; i++)
if (g_str_equal (uuids[i], "OBEXFileTransfer")) {
- g_object_set (cell, "markup", _("Browse"), NULL);
+ g_object_set (cell, "markup", _("<u>Browse</u>"), NULL);
found = TRUE;
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]