root/trunk/third/nautilus/components/services/summary/nautilus-view/nautilus-summary-footer.c @ 15547

Revision 15547, 3.4 KB (checked in by ghudson, 9 years ago)

This commit was generated by cvs2svn to compensate for changes in r15546,
which included commits to RCS files with non-trunk default branches.

Line 
1/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2
3/*
4 * Copyright (C) 2000 Eazel, Inc
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public
17 * License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 *
21 * Author: J Shane Culpepper <pepper@eazel.com>
22 */
23
24#include <config.h>
25
26#include <bonobo/bonobo-control.h>
27#include <libgnomevfs/gnome-vfs-utils.h>
28
29#include <libnautilus-extensions/nautilus-background.h>
30#include <libnautilus-extensions/nautilus-bonobo-extensions.h>
31#include <libnautilus-extensions/nautilus-caption-table.h>
32#include <libnautilus-extensions/nautilus-file-utilities.h>
33#include <libnautilus-extensions/nautilus-font-factory.h>
34#include <libnautilus-extensions/nautilus-gdk-extensions.h>
35#include <libnautilus-extensions/nautilus-glib-extensions.h>
36#include <libnautilus-extensions/nautilus-global-preferences.h>
37#include <libnautilus-extensions/nautilus-gnome-extensions.h>
38#include <libnautilus-extensions/nautilus-gtk-extensions.h>
39#include <libnautilus-extensions/nautilus-gtk-macros.h>
40#include <libnautilus-extensions/nautilus-stock-dialogs.h>
41#include <libnautilus-extensions/nautilus-string.h>
42#include <libnautilus-extensions/nautilus-tabs.h>
43
44#include <libgnomeui/gnome-stock.h>
45#include <stdio.h>
46#include <unistd.h>
47
48#include <orb/orbit.h>
49#include <liboaf/liboaf.h>
50#include <libtrilobite/trilobite-redirect.h>
51#include <libtrilobite/eazelproxy.h>
52#include <libtrilobite/libammonite.h>
53#include <bonobo/bonobo-main.h>
54
55#include "nautilus-summary-view.h"
56#include "eazel-summary-shared.h"
57
58#include "eazel-services-footer.h"
59#include "eazel-services-header.h"
60#include "eazel-services-extensions.h"
61
62#include "nautilus-summary-callbacks.h"
63#include "nautilus-summary-dialogs.h"
64#include "nautilus-summary-footer.h"
65#include "nautilus-summary-view-private.h"
66
67#define notDEBUG_TEST   1
68#define notDEBUG_PEPPER 1
69
70
71void
72footer_item_clicked_callback (GtkWidget *widget, int index, gpointer callback_data)
73{
74        NautilusSummaryView *view;
75
76        g_return_if_fail (NAUTILUS_IS_SUMMARY_VIEW (callback_data));
77        g_return_if_fail (index >= FOOTER_REGISTER_OR_PREFERENCES);
78        g_return_if_fail (index <= FOOTER_PRIVACY_STATEMENT);
79
80        view = NAUTILUS_SUMMARY_VIEW (callback_data);
81
82        switch (index) {
83        case FOOTER_REGISTER_OR_PREFERENCES:
84                if (!view->details->logged_in) {
85                        register_button_cb (NULL, view);
86                } else {
87                        preferences_button_cb (NULL, view);
88                }
89                break;
90
91        case FOOTER_LOGIN_OR_LOGOUT:
92                if (!view->details->logged_in) {
93                        generate_login_dialog (view);
94                } else {
95                        logout_button_cb (NULL, view);
96                }
97                break;
98
99        case FOOTER_TERMS_OF_USER:
100                nautilus_view_open_location_in_this_window (view->details->nautilus_view, SUMMARY_TERMS_OF_USE_URI);
101                break;
102
103        case FOOTER_PRIVACY_STATEMENT:
104                nautilus_view_open_location_in_this_window (view->details->nautilus_view, SUMMARY_PRIVACY_STATEMENT_URI);
105                break;
106
107        default:
108                g_assert_not_reached ();
109                break;
110        }
111}
Note: See TracBrowser for help on using the browser.