| 1 | /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ |
|---|
| 2 | /* |
|---|
| 3 | * Copyright (C) 2000 Eazel, Inc |
|---|
| 4 | * |
|---|
| 5 | * This program is free software; you can redistribute it and/or |
|---|
| 6 | * modify it under the terms of the GNU General Public License as |
|---|
| 7 | * published by the Free Software Foundation; either version 2 of the |
|---|
| 8 | * License, or (at your option) any later version. |
|---|
| 9 | * |
|---|
| 10 | * This program is distributed in the hope that it will be useful, |
|---|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 13 | * General Public License for more details. |
|---|
| 14 | * |
|---|
| 15 | * You should have received a copy of the GNU General Public |
|---|
| 16 | * License along with this program; if not, write to the |
|---|
| 17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
|---|
| 18 | * Boston, MA 02111-1307, USA. |
|---|
| 19 | * |
|---|
| 20 | * Authors: J Shane Culpepper |
|---|
| 21 | */ |
|---|
| 22 | |
|---|
| 23 | #ifndef NAUTILUS_SUMMARY_VIEW_PRIVATE_H |
|---|
| 24 | #define NAUTILUS_SUMMARY_VIEW_PRIVATE_H |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | #include <gnome.h> |
|---|
| 28 | |
|---|
| 29 | #define DEFAULT_SUMMARY_BACKGROUND_COLOR_SPEC "rgb:FFFF/FFFF/FFFF" |
|---|
| 30 | #define DEFAULT_SUMMARY_BACKGROUND_COLOR_RGB NAUTILUS_RGB_COLOR_WHITE |
|---|
| 31 | #define DEFAULT_SUMMARY_TEXT_COLOR_RGB NAUTILUS_RGB_COLOR_BLACK |
|---|
| 32 | |
|---|
| 33 | #define URL_REDIRECT_TABLE_HOME "eazel-services://anonymous/services/urls" |
|---|
| 34 | #define URL_REDIRECT_TABLE_HOME_2 "eazel-services:/services/urls" |
|---|
| 35 | #define SUMMARY_CONFIG_XML "eazel-services://anonymous/services" |
|---|
| 36 | #define SUMMARY_CONFIG_XML_2 "eazel-services:/services" |
|---|
| 37 | |
|---|
| 38 | #define SUMMARY_TERMS_OF_USE_URI "eazel-services://anonymous/aboutus/terms_of_use" |
|---|
| 39 | #define SUMMARY_PRIVACY_STATEMENT_URI "eazel-services://anonymous/aboutus/privacy" |
|---|
| 40 | #define SUMMARY_CHANGE_PWD_FORM "eazel-services://anonymous/account/login/lost_pwd_form" |
|---|
| 41 | |
|---|
| 42 | #define SUMMARY_XML_KEY "eazel_summary_xml" |
|---|
| 43 | #define URL_REDIRECT_TABLE "eazel_url_table_xml" |
|---|
| 44 | #define REGISTER_KEY "eazel_service_register" |
|---|
| 45 | #define PREFERENCES_KEY "eazel_service_account_maintenance" |
|---|
| 46 | |
|---|
| 47 | #define GOTO_BUTTON_LABEL _("Go There!") |
|---|
| 48 | #define SOFTCAT_GOTO_BUTTON_LABEL _("More Info!") |
|---|
| 49 | #define INSTALL_GOTO_BUTTON_LABEL _("Install Me!") |
|---|
| 50 | |
|---|
| 51 | #define MAX_IMAGE_WIDTH 50 |
|---|
| 52 | #define MAX_IMAGE_HEIGHT 50 |
|---|
| 53 | |
|---|
| 54 | #define FOOTER_REGISTER_OR_PREFERENCES 0 |
|---|
| 55 | #define FOOTER_LOGIN_OR_LOGOUT 1 |
|---|
| 56 | #define FOOTER_TERMS_OF_USER 2 |
|---|
| 57 | #define FOOTER_PRIVACY_STATEMENT 3 |
|---|
| 58 | |
|---|
| 59 | |
|---|
| 60 | enum { |
|---|
| 61 | LOGIN_DIALOG_NAME_ROW, |
|---|
| 62 | LOGIN_DIALOG_PASSWORD_ROW, |
|---|
| 63 | LOGIN_DIALOG_ROW_COUNT |
|---|
| 64 | }; |
|---|
| 65 | |
|---|
| 66 | enum { |
|---|
| 67 | LOGIN_DIALOG_REGISTER_BUTTON_INDEX, |
|---|
| 68 | LOGIN_DIALOG_OK_BUTTON_INDEX, |
|---|
| 69 | LOGIN_DIALOG_CANCEL_BUTTON |
|---|
| 70 | }; |
|---|
| 71 | |
|---|
| 72 | typedef struct _ServicesButtonCallbackData ServicesButtonCallbackData; |
|---|
| 73 | |
|---|
| 74 | typedef enum { |
|---|
| 75 | Pending_None, |
|---|
| 76 | Pending_Login, |
|---|
| 77 | } SummaryPendingOperationType; |
|---|
| 78 | |
|---|
| 79 | typedef enum { |
|---|
| 80 | initial, |
|---|
| 81 | retry |
|---|
| 82 | } SummaryLoginAttemptType; |
|---|
| 83 | |
|---|
| 84 | |
|---|
| 85 | struct _ServicesButtonCallbackData { |
|---|
| 86 | NautilusView *nautilus_view; |
|---|
| 87 | char *uri; |
|---|
| 88 | }; |
|---|
| 89 | |
|---|
| 90 | /* A NautilusContentView's private information. */ |
|---|
| 91 | struct _NautilusSummaryViewDetails { |
|---|
| 92 | char *uri; |
|---|
| 93 | NautilusView *nautilus_view; |
|---|
| 94 | SummaryData *xml_data; |
|---|
| 95 | |
|---|
| 96 | /* Parent form and title */ |
|---|
| 97 | GtkWidget *form; |
|---|
| 98 | GtkWidget *form_title; |
|---|
| 99 | |
|---|
| 100 | /* Login State */ |
|---|
| 101 | char *user_name; |
|---|
| 102 | volatile gboolean logged_in; |
|---|
| 103 | GtkWidget *caption_table; |
|---|
| 104 | SummaryLoginAttemptType current_attempt; |
|---|
| 105 | int attempt_number; |
|---|
| 106 | |
|---|
| 107 | /* EazelProxy -- for logging in/logging out */ |
|---|
| 108 | EazelProxy_UserControl user_control; |
|---|
| 109 | SummaryPendingOperationType pending_operation; |
|---|
| 110 | EazelProxy_AuthnCallback authn_callback; |
|---|
| 111 | |
|---|
| 112 | /* Services control panel */ |
|---|
| 113 | int current_service_row; |
|---|
| 114 | GtkWidget *services_row; |
|---|
| 115 | GtkWidget *services_icon_container; |
|---|
| 116 | GtkWidget *services_icon_widget; |
|---|
| 117 | char *services_icon_name; |
|---|
| 118 | GtkWidget *services_description_header_widget; |
|---|
| 119 | char *services_description_header; |
|---|
| 120 | GtkWidget *services_description_body_widget; |
|---|
| 121 | char *services_description_body; |
|---|
| 122 | GtkWidget *services_button_container; |
|---|
| 123 | GtkWidget *services_goto_button; |
|---|
| 124 | GtkWidget *services_goto_label_widget; |
|---|
| 125 | char *services_goto_label; |
|---|
| 126 | char *services_redirects[500]; |
|---|
| 127 | gboolean services_button_enabled; |
|---|
| 128 | GtkWidget *services_notebook; |
|---|
| 129 | |
|---|
| 130 | /* Login Frame Widgets */ |
|---|
| 131 | GnomeDialog *login_dialog; |
|---|
| 132 | GtkWidget *username_label; |
|---|
| 133 | GtkWidget *password_label; |
|---|
| 134 | GtkWidget *username_entry; |
|---|
| 135 | GtkWidget *password_entry; |
|---|
| 136 | /* Buttons available if user is not logged in */ |
|---|
| 137 | GtkWidget *login_button; |
|---|
| 138 | GtkWidget *login_label; |
|---|
| 139 | GtkWidget *register_button; |
|---|
| 140 | GtkWidget *register_label; |
|---|
| 141 | /* Buttons available if user is logged in */ |
|---|
| 142 | GtkWidget *preferences_button; |
|---|
| 143 | GtkWidget *preferences_label; |
|---|
| 144 | GtkWidget *logout_button; |
|---|
| 145 | GtkWidget *logout_label; |
|---|
| 146 | |
|---|
| 147 | /* Eazel news panel */ |
|---|
| 148 | int current_news_row; |
|---|
| 149 | gboolean news_has_data; |
|---|
| 150 | GtkWidget *service_news_row; |
|---|
| 151 | GtkWidget *news_icon_container; |
|---|
| 152 | GtkWidget *news_icon_widget; |
|---|
| 153 | char *news_icon_name; |
|---|
| 154 | GtkWidget *news_date_widget; |
|---|
| 155 | char *news_date; |
|---|
| 156 | GtkWidget *news_description_header_widget; |
|---|
| 157 | char *news_description_header; |
|---|
| 158 | GtkWidget *news_description_body_widget; |
|---|
| 159 | char *news_description_body; |
|---|
| 160 | |
|---|
| 161 | /* Update control panel */ |
|---|
| 162 | int current_update_row; |
|---|
| 163 | gboolean updates_has_data; |
|---|
| 164 | GtkWidget *updates_row; |
|---|
| 165 | GtkWidget *update_icon_container; |
|---|
| 166 | GtkWidget *update_icon_widget; |
|---|
| 167 | char *update_icon_name; |
|---|
| 168 | GtkWidget *update_description_header_widget; |
|---|
| 169 | char *update_description_header; |
|---|
| 170 | GtkWidget *update_description_body_widget; |
|---|
| 171 | char *update_description_body; |
|---|
| 172 | GtkWidget *update_description_version_widget; |
|---|
| 173 | char *update_description_version; |
|---|
| 174 | GtkWidget *update_button_container; |
|---|
| 175 | GtkWidget *update_goto_button; |
|---|
| 176 | GtkWidget *update_goto_label_widget; |
|---|
| 177 | char *update_goto_label; |
|---|
| 178 | char *update_redirects[500]; |
|---|
| 179 | GtkWidget *update_softcat_goto_button; |
|---|
| 180 | GtkWidget *update_softcat_goto_label_widget; |
|---|
| 181 | char *update_softcat_goto_label; |
|---|
| 182 | char *update_softcat_redirects[500]; |
|---|
| 183 | GtkWidget *updates_notebook; |
|---|
| 184 | |
|---|
| 185 | }; |
|---|
| 186 | |
|---|
| 187 | |
|---|
| 188 | #endif /* NAUTILUS_SUMMARY_VIEW_PRIVATE_H */ |
|---|
| 189 | |
|---|