[eog-plugins] Center on current selection on init
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog-plugins] Center on current selection on init
- Date: Sat, 5 Feb 2011 17:49:05 +0000 (UTC)
commit 8863542e64c90c23616148762058b069da13add3
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date: Sat Feb 6 00:53:50 2010 -0500
Center on current selection on init
plugins/map/eog-map-plugin.c | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
---
diff --git a/plugins/map/eog-map-plugin.c b/plugins/map/eog-map-plugin.c
index 5f10a79..db00165 100644
--- a/plugins/map/eog-map-plugin.c
+++ b/plugins/map/eog-map-plugin.c
@@ -276,6 +276,8 @@ static void
prepared_cb (EogWindow *window,
WindowData *data)
{
+ GtkWidget *thumbview;
+
data->store = eog_window_get_store (window);
if (!data->store)
@@ -285,6 +287,18 @@ prepared_cb (EogWindow *window,
gtk_tree_model_foreach (GTK_TREE_MODEL (data->store),
(GtkTreeModelForeachFunc) for_each_thumb,
data);
+
+ thumbview = eog_window_get_thumb_view (window);
+ data->selection_changed_id = g_signal_connect (G_OBJECT (thumbview),
+ "selection-changed",
+ G_CALLBACK (selection_changed_cb),
+ data);
+
+ /* Call the callback because if the plugin is activated after
+ * the image is loaded, selection_changed isn't emited
+ */
+ selection_changed_cb (EOG_THUMB_VIEW (thumbview), data);
+
}
static void
@@ -362,17 +376,6 @@ impl_activate (EogPlugin *plugin,
eog_sidebar_add_page (EOG_SIDEBAR (sidebar), _("Map"), vbox);
gtk_widget_show_all (vbox);
- thumbview = eog_window_get_thumb_view (window);
- data->selection_changed_id = g_signal_connect (G_OBJECT (thumbview),
- "selection-changed",
- G_CALLBACK (selection_changed_cb),
- data);
-
- /* Call the callback because if the plugin is activated after
- * the image is loaded, selection_changed isn't emited
- */
- selection_changed_cb (EOG_THUMB_VIEW (thumbview), data);
-
g_signal_connect (G_OBJECT (window),
"prepared",
G_CALLBACK (prepared_cb),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]