[balsa/gtk3] Clean up, and make LibBalsaAddressView opaque
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Clean up, and make LibBalsaAddressView opaque
- Date: Mon, 24 Jan 2011 02:56:53 +0000 (UTC)
commit d32a8c578180182f802280ff2a4fdfd0402aeffa
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Jan 23 21:49:29 2011 -0500
Clean up, and make LibBalsaAddressView opaque
* libbalsa/address-view.c (lbav_ensure_blank_line_idle_cb),
(libbalsa_address_view_new): clean up, and make
LibBalsaAddressView opaque.
* libbalsa/address-view.h: ditto.
ChangeLog | 7 +++++++
libbalsa/address-view.c | 42 ++++++++++++++++++++++++++++++++++++------
libbalsa/address-view.h | 33 ---------------------------------
3 files changed, 43 insertions(+), 39 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 92266cb..3d7dfe6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2011-01-23 Peter Bloomfield
+ * libbalsa/address-view.c (lbav_ensure_blank_line_idle_cb),
+ (libbalsa_address_view_new): clean up, and make
+ LibBalsaAddressView opaque.
+ * libbalsa/address-view.h: ditto.
+
+2011-01-23 Peter Bloomfield
+
* configure.in: change html-widget default to "webkit", and warn
if it is not chosen; change gtkspell default to "no", and warn
if it is not chosen; clarify GtkSourceView option.
diff --git a/libbalsa/address-view.c b/libbalsa/address-view.c
index 545f654..43aa84f 100644
--- a/libbalsa/address-view.c
+++ b/libbalsa/address-view.c
@@ -43,6 +43,38 @@
#include "cell-renderer-button.h"
#include "misc.h"
+struct _LibBalsaAddressView {
+ GtkTreeView parent;
+
+ /*
+ * Permanent data
+ */
+ const gchar *const *types;
+ guint n_types;
+ gboolean fallback;
+ GList *address_book_list;
+
+ gchar *domain;
+
+ GtkTreeViewColumn *type_column;
+ GtkTreeViewColumn *focus_column;
+
+ /*
+ * Ephemera
+ */
+ gboolean last_was_escape; /* keystroke */
+
+ GtkTreeRowReference *focus_row; /* set cursor */
+ guint focus_idle_id; /* ditto */
+
+ GtkCellEditable *editable; /* cell editing */
+ gchar *path_string; /* ditto */
+};
+
+struct _LibBalsaAddressViewClass {
+ GtkTreeViewClass parent_class;
+};
+
/*
* GObject class boilerplate
*/
@@ -253,10 +285,8 @@ lbav_ensure_blank_line_idle_cb(LibBalsaAddressView * address_view)
* gtk_widget_grab_focus(tree_view) in order to give keyboard
* focus to the widget."
* but in fact, that leaves the entry /not/ open for editing. */
- gtk_tree_view_set_cursor_on_cell(GTK_TREE_VIEW(address_view),
- focus_path,
- address_view->focus_column,
- address_view->focus_cell, TRUE);
+ gtk_tree_view_set_cursor(GTK_TREE_VIEW(address_view), focus_path,
+ address_view->focus_column, TRUE);
gtk_tree_path_free(focus_path);
address_view->focus_idle_id = 0;
@@ -1049,11 +1079,11 @@ libbalsa_address_view_new(const gchar * const *types,
gtk_tree_view_append_column(tree_view, column);
}
- /* Column for the entry widget and the address-book/remove button. */
+ /* Column for the entry widget. */
address_view->focus_column = column = gtk_tree_view_column_new();
/* The address entry: */
- address_view->focus_cell = renderer = gtk_cell_renderer_text_new();
+ renderer = gtk_cell_renderer_text_new();
g_object_set(renderer, "editable", TRUE, NULL);
g_signal_connect(renderer, "editing-started",
G_CALLBACK(lbav_row_editing_cb), address_view);
diff --git a/libbalsa/address-view.h b/libbalsa/address-view.h
index 0f0da50..424f05d 100644
--- a/libbalsa/address-view.h
+++ b/libbalsa/address-view.h
@@ -51,39 +51,6 @@ G_BEGIN_DECLS
typedef struct _LibBalsaAddressView LibBalsaAddressView;
typedef struct _LibBalsaAddressViewClass LibBalsaAddressViewClass;
-struct _LibBalsaAddressView {
- GtkTreeView parent;
-
- /*
- * Permanent data
- */
- const gchar *const *types;
- guint n_types;
- gboolean fallback;
- GList *address_book_list;
-
- gchar *domain;
-
- GtkTreeViewColumn *type_column;
- GtkTreeViewColumn *focus_column;
- GtkCellRenderer *focus_cell;
-
- /*
- * Ephemera
- */
- gboolean last_was_escape; /* keystroke */
-
- GtkTreeRowReference *focus_row; /* set cursor */
- guint focus_idle_id; /* ditto */
-
- GtkCellEditable *editable; /* cell editing */
- gchar *path_string; /* ditto */
-};
-
-struct _LibBalsaAddressViewClass {
- GtkTreeViewClass parent_class;
-};
-
GType libbalsa_address_view_get_type(void) G_GNUC_CONST;
LibBalsaAddressView *libbalsa_address_view_new(const gchar * const *types,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]