static void
action_calendar_taskpad_open_url_cb (GtkAction *action,
                                     ECalShellView *cal_shell_view)
{
	EShellView *shell_view;
	EShellWindow *shell_window;
	ECalShellContent *cal_shell_content;
	ECalModelComponent *comp_data;
	ETaskTable *task_table;
	icalproperty *prop;
	const gchar *uri;
	GSList *list;

	shell_view = E_SHELL_VIEW (cal_shell_view);
	shell_window = e_shell_view_get_shell_window (shell_view);

	cal_shell_content = cal_shell_view->priv->cal_shell_content;
	task_table = e_cal_shell_content_get_task_table (cal_shell_content);

	list = e_task_table_get_selected (task_table);
	g_return_if_fail (list != NULL);
	comp_data = list->data;

	/* XXX We only open the URI of the first selected task. */
	prop = icalcomponent_get_first_property (
		comp_data->icalcomp, ICAL_URL_PROPERTY);
	g_return_if_fail (prop != NULL);

	uri = icalproperty_get_url (prop);
	e_show_uri (GTK_WINDOW (shell_window), uri);
}
Ejemplo n.º 2
0
static gboolean
invoke_link_if_present (GtkTextBuffer *buffer,
                        GtkTextIter *iter)
{
	gboolean res;
	gchar *url;

	g_return_val_if_fail (buffer != NULL, FALSE);

	url = get_url_at_iter (buffer, iter);

	res = url && *url;
	if (res)
		e_show_uri (NULL, url);

	g_free (url);

	return res;
}
Ejemplo n.º 3
0
void
e_shell_utils_run_help_contents (EShell *shell)
{
#ifdef G_OS_WIN32
    gchar *online_help_url;
#endif
    GtkWindow *window;

    window = e_shell_get_active_window (shell);
#ifdef G_OS_WIN32
    /* On Windows, link to online help instead.
     * See https://bugzilla.gnome.org/show_bug.cgi?id=576478 */

    online_help_url = g_strconcat (
                          "http://library.gnome.org/users/evolution/",
                          BASE_VERSION, NULL);
    e_show_uri (window, online_help_url);
    g_free (online_help_url);
#else
    e_display_help (window, NULL);
#endif
}