aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-07-21 00:36:43 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-07-21 00:36:43 +0800
commit19e6ef7b327f9afaeb7e4857816566dcb0937ad2 (patch)
tree7700c90a3bc86c346a604689e82e26f908521ec1 /widgets
parent53527b388aa4226b9d84b0b720a1ec29dc6e3c32 (diff)
downloadgsoc2013-evolution-19e6ef7b327f9afaeb7e4857816566dcb0937ad2.tar
gsoc2013-evolution-19e6ef7b327f9afaeb7e4857816566dcb0937ad2.tar.gz
gsoc2013-evolution-19e6ef7b327f9afaeb7e4857816566dcb0937ad2.tar.bz2
gsoc2013-evolution-19e6ef7b327f9afaeb7e4857816566dcb0937ad2.tar.lz
gsoc2013-evolution-19e6ef7b327f9afaeb7e4857816566dcb0937ad2.tar.xz
gsoc2013-evolution-19e6ef7b327f9afaeb7e4857816566dcb0937ad2.tar.zst
gsoc2013-evolution-19e6ef7b327f9afaeb7e4857816566dcb0937ad2.zip
remove proto
2004-07-20 JP Rosevear <jpr@novell.com> * e-source-selector.h: remove proto * e-source-selector.c (selection_func): don't force the item to be checked (cell_toggled_callback): allow the cell to be untoggled even if its primary (init): set the pixbuf renderable (e_source_selector_set_toggle_selection): no longer necessary svn path=/trunk/; revision=26682
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/ChangeLog11
-rw-r--r--widgets/misc/e-source-selector.c52
-rw-r--r--widgets/misc/e-source-selector.h2
3 files changed, 24 insertions, 41 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 207f500fdd..f02fbde6ed 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,14 @@
+2004-07-20 JP Rosevear <jpr@novell.com>
+
+ * e-source-selector.h: remove proto
+
+ * e-source-selector.c (selection_func): don't force the item to be
+ checked
+ (cell_toggled_callback): allow the cell to be untoggled even if
+ its primary
+ (init): set the pixbuf renderable
+ (e_source_selector_set_toggle_selection): no longer necessary
+
2004-07-16 Chris Toshok <toshok@ximian.com>
* e-clipped-label.c (e_clipped_label_recalc_chars_displayed):
diff --git a/widgets/misc/e-source-selector.c b/widgets/misc/e-source-selector.c
index 466930ed4f..898e8b6c00 100644
--- a/widgets/misc/e-source-selector.c
+++ b/widgets/misc/e-source-selector.c
@@ -44,7 +44,7 @@ struct _ESourceSelectorPrivate {
ESourceList *list;
GtkTreeStore *tree_store;
-
+
GHashTable *selected_sources;
GtkTreeRowReference *saved_primary_selection;
@@ -52,7 +52,6 @@ struct _ESourceSelectorPrivate {
gboolean toggled_last;
gboolean checkboxes_shown;
- gboolean toggle_selection;
gboolean select_new;
};
@@ -467,15 +466,6 @@ selection_func (GtkTreeSelection *selection,
return FALSE;
}
- if (source_is_selected (selector, E_SOURCE (data))) {
- clear_saved_primary_selection (selector);
- g_object_unref (data);
-
- return TRUE;
- }
-
- e_source_selector_select_source (selector, E_SOURCE (data));
-
clear_saved_primary_selection (selector);
g_object_unref (data);
@@ -505,18 +495,15 @@ cell_toggled_callback (GtkCellRendererToggle *renderer,
if (!E_IS_SOURCE_GROUP (data)) {
source = E_SOURCE (data);
- if (e_source_selector_peek_primary_selection (selector) != source
- || selector->priv->toggle_selection) {
- if (source_is_selected (selector, source))
- unselect_source (selector, source);
- else
- select_source (selector, source);
-
- selector->priv->toggled_last = TRUE;
-
- gtk_tree_model_row_changed (model, path, &iter);
- g_signal_emit (selector, signals[SELECTION_CHANGED], 0);
- }
+ if (source_is_selected (selector, source))
+ unselect_source (selector, source);
+ else
+ select_source (selector, source);
+
+ selector->priv->toggled_last = TRUE;
+
+ gtk_tree_model_row_changed (model, path, &iter);
+ g_signal_emit (selector, signals[SELECTION_CHANGED], 0);
}
gtk_tree_path_free (path);
@@ -596,6 +583,8 @@ selector_button_press_event (GtkWidget *widget, GdkEventButton *event, ESourceSe
GtkTreePath *path;
ESource *source = NULL;
+ priv->toggled_last = FALSE;
+
/* only process right-clicks */
if (event->button != 3 || event->type != GDK_BUTTON_PRESS)
return FALSE;
@@ -742,6 +731,7 @@ init (ESourceSelector *selector)
gtk_tree_view_append_column (GTK_TREE_VIEW (selector), column);
cell_renderer = gtk_cell_renderer_pixbuf_new ();
+ g_object_set (G_OBJECT (cell_renderer), "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, NULL);
gtk_tree_view_column_pack_start (column, cell_renderer, FALSE);
gtk_tree_view_column_set_cell_data_func (column, cell_renderer, (GtkTreeCellDataFunc) pixbuf_cell_data_func, selector, NULL);
cell_renderer = gtk_cell_renderer_toggle_new ();
@@ -893,22 +883,6 @@ e_source_selector_selection_shown (ESourceSelector *selector)
}
/**
- * e_source_selector_set_toggle_selection:
- * @selector:
- * @state:
- *
- * Set the source selector behaviour, whether you can toggle the
- * current selection or not.
- **/
-void
-e_source_selector_set_toggle_selection(ESourceSelector *selector, gboolean state)
-{
- g_return_if_fail (E_IS_SOURCE_SELECTOR (selector));
-
- selector->priv->toggle_selection = state;
-}
-
-/**
* e_source_selector_set_select_new:
* @selector: An ESourceSelector widget
* @state: A gboolean
diff --git a/widgets/misc/e-source-selector.h b/widgets/misc/e-source-selector.h
index ec7d52bc26..92b5e7b67c 100644
--- a/widgets/misc/e-source-selector.h
+++ b/widgets/misc/e-source-selector.h
@@ -72,8 +72,6 @@ void e_source_selector_show_selection (ESourceSelector *selector,
gboolean show);
gboolean e_source_selector_selection_shown (ESourceSelector *selector);
-void e_source_selector_set_toggle_selection(ESourceSelector *selector, gboolean state);
-
void e_source_selector_set_select_new (ESourceSelector *selector, gboolean state);
ESource *e_source_selector_peek_primary_selection (ESourceSelector *selector);