diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-11-21 01:20:13 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-11-21 01:33:30 +0800 |
commit | 598a34e693dcbff6e57df4876138971b5ba63748 (patch) | |
tree | 670ee3258902eebbeb3e786566bf0288b236a6c4 | |
parent | 9bb9e9d47844ff9102bd114c6636783a5d41d625 (diff) | |
download | gsoc2013-evolution-598a34e693dcbff6e57df4876138971b5ba63748.tar gsoc2013-evolution-598a34e693dcbff6e57df4876138971b5ba63748.tar.gz gsoc2013-evolution-598a34e693dcbff6e57df4876138971b5ba63748.tar.bz2 gsoc2013-evolution-598a34e693dcbff6e57df4876138971b5ba63748.tar.lz gsoc2013-evolution-598a34e693dcbff6e57df4876138971b5ba63748.tar.xz gsoc2013-evolution-598a34e693dcbff6e57df4876138971b5ba63748.tar.zst gsoc2013-evolution-598a34e693dcbff6e57df4876138971b5ba63748.zip |
EMFolderTree: Remove "ellipsize" property.
Always ellipsize folder names, otherwise it interferes with the status
icons. The property was once bound to a hidden GSettings key, but the
setting was silly and was removed some time ago.
-rw-r--r-- | mail/em-folder-tree.c | 54 | ||||
-rw-r--r-- | mail/em-folder-tree.h | 4 |
2 files changed, 1 insertions, 57 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 57f9ef61f5..ffd9c67f2f 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -102,7 +102,6 @@ struct _EMFolderTreePrivate { gboolean skip_double_click; GtkCellRenderer *text_renderer; - PangoEllipsizeMode ellipsize; GtkWidget *selectable; /* an ESelectable, where to pass selectable calls */ @@ -121,7 +120,6 @@ enum { PROP_0, PROP_ALERT_SINK, PROP_COPY_TARGET_LIST, - PROP_ELLIPSIZE, PROP_MODEL, PROP_PASTE_TARGET_LIST, PROP_SESSION @@ -1014,12 +1012,6 @@ folder_tree_set_property (GObject *object, g_value_get_object (value)); return; - case PROP_ELLIPSIZE: - em_folder_tree_set_ellipsize ( - EM_FOLDER_TREE (object), - g_value_get_enum (value)); - return; - case PROP_MODEL: gtk_tree_view_set_model ( GTK_TREE_VIEW (object), @@ -1057,13 +1049,6 @@ folder_tree_get_property (GObject *object, EM_FOLDER_TREE (object))); return; - case PROP_ELLIPSIZE: - g_value_set_enum ( - value, - em_folder_tree_get_ellipsize ( - EM_FOLDER_TREE (object))); - return; - case PROP_MODEL: g_value_set_object ( value, @@ -1208,17 +1193,13 @@ folder_tree_constructed (GObject *object) folder_tree_render_icon, NULL, NULL); renderer = gtk_cell_renderer_text_new (); + g_object_set (renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL); gtk_tree_view_column_pack_start (column, renderer, TRUE); gtk_tree_view_column_set_cell_data_func ( column, renderer, (GtkTreeCellDataFunc) folder_tree_render_display_name, NULL, NULL); priv->text_renderer = g_object_ref (renderer); - g_object_bind_property ( - object, "ellipsize", - renderer, "ellipsize", - G_BINDING_SYNC_CREATE); - g_signal_connect_swapped ( renderer, "edited", G_CALLBACK (folder_tree_cell_edited_cb), object); @@ -1513,17 +1494,6 @@ em_folder_tree_class_init (EMFolderTreeClass *class) PROP_COPY_TARGET_LIST, "copy-target-list"); - g_object_class_install_property ( - object_class, - PROP_ELLIPSIZE, - g_param_spec_enum ( - "ellipsize", - NULL, - NULL, - PANGO_TYPE_ELLIPSIZE_MODE, - PANGO_ELLIPSIZE_NONE, - G_PARAM_READWRITE)); - /* XXX We override the GtkTreeView:model property to add * G_PARAM_CONSTRUCT_ONLY so the model is set by the * time we get to folder_tree_constructed(). */ @@ -1845,28 +1815,6 @@ em_folder_tree_new_activity (EMFolderTree *folder_tree) return activity; } -PangoEllipsizeMode -em_folder_tree_get_ellipsize (EMFolderTree *folder_tree) -{ - g_return_val_if_fail (EM_IS_FOLDER_TREE (folder_tree), 0); - - return folder_tree->priv->ellipsize; -} - -void -em_folder_tree_set_ellipsize (EMFolderTree *folder_tree, - PangoEllipsizeMode ellipsize) -{ - g_return_if_fail (EM_IS_FOLDER_TREE (folder_tree)); - - if (ellipsize == folder_tree->priv->ellipsize) - return; - - folder_tree->priv->ellipsize = ellipsize; - - g_object_notify (G_OBJECT (folder_tree), "ellipsize"); -} - EAlertSink * em_folder_tree_get_alert_sink (EMFolderTree *folder_tree) { diff --git a/mail/em-folder-tree.h b/mail/em-folder-tree.h index ae54133e8c..8c7902471e 100644 --- a/mail/em-folder-tree.h +++ b/mail/em-folder-tree.h @@ -96,10 +96,6 @@ GtkWidget * em_folder_tree_new_with_model (EMailSession *session, EAlertSink *alert_sink, EMFolderTreeModel *model); EActivity * em_folder_tree_new_activity (EMFolderTree *folder_tree); -PangoEllipsizeMode - em_folder_tree_get_ellipsize (EMFolderTree *folder_tree); -void em_folder_tree_set_ellipsize (EMFolderTree *folder_tree, - PangoEllipsizeMode ellipsize); EAlertSink * em_folder_tree_get_alert_sink (EMFolderTree *folder_tree); EMailSession * em_folder_tree_get_session (EMFolderTree *folder_tree); void em_folder_tree_enable_drag_and_drop |