[empathy] accounts-dialog: keep a pointer on the text renderer
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] accounts-dialog: keep a pointer on the text renderer
- Date: Mon, 2 Apr 2012 07:29:22 +0000 (UTC)
commit bd198afab778a63e7f5d1bbc58419fea06255733
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Fri Mar 30 14:37:09 2012 +0200
accounts-dialog: keep a pointer on the text renderer
https://bugzilla.gnome.org/show_bug.cgi?id=673159
src/empathy-accounts-dialog.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 93b8c78..8a08c4a 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -97,6 +97,7 @@ typedef struct {
GtkWidget *enabled_switch;
GtkWidget *treeview;
+ GtkCellRenderer *name_renderer;
GtkWidget *button_add;
GtkWidget *button_remove;
@@ -1443,21 +1444,22 @@ accounts_dialog_model_add_columns (EmpathyAccountsDialog *dialog)
NULL);
/* Name renderer */
- cell = gtk_cell_renderer_text_new ();
- g_object_set (cell,
+ priv->name_renderer = gtk_cell_renderer_text_new ();
+ g_object_set (priv->name_renderer,
"ellipsize", PANGO_ELLIPSIZE_END,
"width-chars", 25,
"editable", TRUE,
NULL);
- gtk_tree_view_column_pack_start (column, cell, TRUE);
- gtk_tree_view_column_add_attribute (column, cell, "text", COL_NAME);
- g_signal_connect (cell, "edited",
+ gtk_tree_view_column_pack_start (column, priv->name_renderer, TRUE);
+ gtk_tree_view_column_add_attribute (column, priv->name_renderer,
+ "text", COL_NAME);
+ g_signal_connect (priv->name_renderer, "edited",
G_CALLBACK (accounts_dialog_name_edited_cb),
dialog);
- g_signal_connect (cell, "editing-started",
+ g_signal_connect (priv->name_renderer, "editing-started",
G_CALLBACK (accounts_dialog_name_editing_started_cb),
dialog);
- g_object_set (cell, "ypad", 4, NULL);
+ g_object_set (priv->name_renderer, "ypad", 4, NULL);
#ifdef HAVE_MEEGO
/* Delete column */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]