diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-03-30 20:37:09 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-04-02 15:28:48 +0800 |
commit | bd198afab778a63e7f5d1bbc58419fea06255733 (patch) | |
tree | 2c4510f3e63b0098977638a4237845dd46c6855a /src | |
parent | 34d921f36ef396aa81cf6491d932fe51c2a23283 (diff) | |
download | gsoc2013-empathy-bd198afab778a63e7f5d1bbc58419fea06255733.tar gsoc2013-empathy-bd198afab778a63e7f5d1bbc58419fea06255733.tar.gz gsoc2013-empathy-bd198afab778a63e7f5d1bbc58419fea06255733.tar.bz2 gsoc2013-empathy-bd198afab778a63e7f5d1bbc58419fea06255733.tar.lz gsoc2013-empathy-bd198afab778a63e7f5d1bbc58419fea06255733.tar.xz gsoc2013-empathy-bd198afab778a63e7f5d1bbc58419fea06255733.tar.zst gsoc2013-empathy-bd198afab778a63e7f5d1bbc58419fea06255733.zip |
accounts-dialog: keep a pointer on the text renderer
https://bugzilla.gnome.org/show_bug.cgi?id=673159
Diffstat (limited to 'src')
-rw-r--r-- | 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 93b8c781b..8a08c4ac2 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 */ |