Exemplo n.º 1
0
static void
eom_statusbar_date_plugin_deactivate (EomWindowActivatable *activatable)
{
	EomStatusbarDatePlugin *plugin = EOM_STATUSBAR_DATE_PLUGIN (activatable);
	EomWindow *window = plugin->window;
	GtkWidget *statusbar = eom_window_get_statusbar (window);
	GtkWidget *view = eom_window_get_thumb_view (window);

	g_signal_handler_disconnect (view, plugin->signal_id);

	gtk_container_remove (GTK_CONTAINER (statusbar), plugin->statusbar_date);
}
Exemplo n.º 2
0
static void impl_deactivate(EomPlugin* plugin, EomWindow* window)
{
	GtkWidget* statusbar = eom_window_get_statusbar(window);
	GtkWidget* view = eom_window_get_thumb_view(window);
	WindowData* data;

	data = (WindowData*) g_object_get_data(G_OBJECT (window), WINDOW_DATA_KEY);

	g_signal_handler_disconnect(view, data->signal_id);

	gtk_container_remove(GTK_CONTAINER(statusbar), data->statusbar_date);

	g_object_set_data(G_OBJECT(window), WINDOW_DATA_KEY, NULL);
}
Exemplo n.º 3
0
static void
eom_statusbar_date_plugin_activate (EomWindowActivatable *activatable)
{
	EomStatusbarDatePlugin *plugin = EOM_STATUSBAR_DATE_PLUGIN (activatable);
	EomWindow *window = plugin->window;
	GtkWidget *statusbar = eom_window_get_statusbar (window);
	GtkWidget *thumbview = eom_window_get_thumb_view (window);

	eom_debug (DEBUG_PLUGINS);

	plugin->statusbar_date = gtk_statusbar_new ();
	gtk_widget_set_size_request (plugin->statusbar_date, 200, 10);
	gtk_widget_set_margin_top (GTK_WIDGET (plugin->statusbar_date), 0);
	gtk_widget_set_margin_bottom (GTK_WIDGET (plugin->statusbar_date), 0);
	gtk_box_pack_end (GTK_BOX (statusbar), plugin->statusbar_date, FALSE, FALSE, 0);

	plugin->signal_id = g_signal_connect_after (G_OBJECT (thumbview), "selection_changed",
	                                            G_CALLBACK (selection_changed_cb), plugin);

	statusbar_set_date (GTK_STATUSBAR (plugin->statusbar_date),
	                    EOM_THUMB_VIEW (eom_window_get_thumb_view (window)));
}
Exemplo n.º 4
0
static void impl_activate(EomPlugin* plugin, EomWindow* window)
{
	GtkWidget* statusbar = eom_window_get_statusbar(window);
	GtkWidget* thumbview = eom_window_get_thumb_view(window);
	WindowData* data;

	eom_debug(DEBUG_PLUGINS);

	data = g_new(WindowData, 1);
	data->statusbar_date = gtk_statusbar_new();
	gtk_widget_set_size_request(data->statusbar_date, 200, 10);
#if GTK_CHECK_VERSION (3, 0, 0)
	gtk_widget_set_margin_top (GTK_WIDGET (data->statusbar_date), 0);
	gtk_widget_set_margin_bottom (GTK_WIDGET (data->statusbar_date), 0);
#endif
	gtk_box_pack_end(GTK_BOX(statusbar), data->statusbar_date, FALSE, FALSE, 0);

	data->signal_id = g_signal_connect_after(G_OBJECT(thumbview), "selection_changed", G_CALLBACK(selection_changed_cb), data);

	statusbar_set_date(GTK_STATUSBAR(data->statusbar_date), EOM_THUMB_VIEW(eom_window_get_thumb_view(window)));

	g_object_set_data_full(G_OBJECT(window), WINDOW_DATA_KEY, data, (GDestroyNotify) free_window_data);
}