aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/google-account-setup
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-11-15 06:04:21 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-11-15 06:04:21 +0800
commit9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91 (patch)
tree2e1e96f33404781354c422a7e9beaf458ebeb655 /plugins/google-account-setup
parent7e8f8bb9e5167b0219b48ab3e8062080d3740b0a (diff)
downloadgsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.gz
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.bz2
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.lz
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.xz
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.zst
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.zip
** Remove trailing whitespace from source code.
2007-11-14 Matthew Barnes <mbarnes@redhat.com> ** Remove trailing whitespace from source code. svn path=/trunk/; revision=34537
Diffstat (limited to 'plugins/google-account-setup')
-rw-r--r--plugins/google-account-setup/google-source.c90
1 files changed, 45 insertions, 45 deletions
diff --git a/plugins/google-account-setup/google-source.c b/plugins/google-account-setup/google-source.c
index 686623c414..f20d6d7209 100644
--- a/plugins/google-account-setup/google-source.c
+++ b/plugins/google-account-setup/google-source.c
@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors :
+/*
+ * Authors :
* Ebby Wiselyn <ebbywiselyn@gmail.com>
*
* Copyright 2007, Novell, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU Lesser General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU Lesser General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -16,7 +16,7 @@
*
* * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
@@ -50,7 +50,7 @@
int e_plugin_lib_enable (EPluginLib *ep,
int enable);
-GtkWidget * plugin_google (EPlugin *epl,
+GtkWidget * plugin_google (EPlugin *epl,
EConfigHookItemFactoryData *data);
/*****************************************************************************/
@@ -62,7 +62,7 @@ ensure_google_source_group ()
ESourceList *slist;
ESourceGroup *group;
-
+
if (!e_cal_get_sources (&slist, E_CAL_SOURCE_TYPE_EVENT, NULL)) {
g_warning ("Could not get calendar source list from GConf!");
return;
@@ -77,13 +77,13 @@ ensure_google_source_group ()
gboolean res;
group = e_source_group_new (_("Google"), "Google://");
res = e_source_list_add_group (slist, group, -1);
-
+
if (res == FALSE) {
- g_warning ("Could not add Google source group!");
+ g_warning ("Could not add Google source group!");
} else {
e_source_list_sync (slist, NULL);
}
-
+
g_object_unref (group);
g_object_unref (slist);
}
@@ -147,7 +147,7 @@ FIXME: Not sure why this function is declared but called no where. This needs fi
static void
ssl_changed (GtkToggleButton *button, ESource *source)
{
- e_source_set_property(source, "ssl",
+ e_source_set_property(source, "ssl",
gtk_toggle_button_get_active(button) ? "1" : "0");
}
@@ -162,15 +162,15 @@ user_changed (GtkEntry *editable, ESource *source)
char *ruri;
const char *user;
char *projection;
-
- uri = e_source_get_uri (source);
+
+ uri = e_source_get_uri (source);
user = gtk_entry_get_text (GTK_ENTRY (editable));
-
+
if (uri == NULL) {
g_free (uri);
return;
}
-
+
euri = e_uri_new (uri);
g_free (euri->user);
@@ -186,12 +186,12 @@ user_changed (GtkEntry *editable, ESource *source)
if (!g_str_has_suffix (user, "gmail.com\0")) {
user = g_strconcat (user, "@gmail.com", NULL);
}
-
+
e_source_set_relative_uri (source, g_strconcat (CALENDAR_LOCATION, g_strdup(user), g_strdup (projection), NULL));
e_source_set_property (source, "username", euri->user);
e_source_set_property (source, "protocol", "google");
e_source_set_property (source, "auth-domain", "google");
-
+
ruri = print_uri_noproto (euri);
g_free (ruri);
e_uri_free (euri);
@@ -232,7 +232,7 @@ spin_changed (GtkSpinButton *spin, ECalConfigTargetSource *t)
GtkWidget *option;
option = g_object_get_data (G_OBJECT(spin), "option");
-
+
refresh_str = get_refresh_minutes ((GtkWidget *)spin, option);
e_source_set_property (t->source, "refresh", refresh_str);
g_free (refresh_str);
@@ -258,7 +258,7 @@ set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option)
int item_num = 0;
const char *refresh_str = e_source_get_property (source, "refresh");
time = refresh_str ? atoi (refresh_str) : 30;
-
+
if (time && !(time % 10080)) {
/* weeks */
item_num = 3;
@@ -277,7 +277,7 @@ set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option)
}
GtkWidget *
-plugin_google (EPlugin *epl,
+plugin_google (EPlugin *epl,
EConfigHookItemFactoryData *data)
{
ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target;
@@ -294,20 +294,20 @@ plugin_google (EPlugin *epl,
const char *ssl_prop;
gboolean ssl_enabled;
int row;
-
+
GtkWidget *option, *spin, *menu, *hbox;
GtkWidget *times [4];
int i;
-
+
source = t->source;
group = e_source_peek_group (source);
-
+
widget = NULL;
- if (!g_str_has_prefix (e_source_group_peek_base_uri (group),
+ if (!g_str_has_prefix (e_source_group_peek_base_uri (group),
"Google")) {
return NULL;
}
-
+
uri = e_source_get_uri (source);
euri = e_uri_new (uri);
g_free (uri);
@@ -320,7 +320,7 @@ plugin_google (EPlugin *epl,
euri->user = NULL;
uri = e_uri_to_string (euri, FALSE);
- ssl_prop = e_source_get_property (source, "ssl");
+ ssl_prop = e_source_get_property (source, "ssl");
if (ssl_prop && ssl_prop[0] == '1') {
ssl_enabled = TRUE;
} else {
@@ -336,16 +336,16 @@ plugin_google (EPlugin *epl,
cssl = gtk_check_button_new_with_mnemonic (_("Use _SSL"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cssl), ssl_enabled);
gtk_widget_show (cssl);
- gtk_table_attach (GTK_TABLE (parent),
- cssl, 1, 2,
- row + 3, row + 4,
+ gtk_table_attach (GTK_TABLE (parent),
+ cssl, 1, 2,
+ row + 3, row + 4,
GTK_FILL, 0, 0, 0);
luser = gtk_label_new_with_mnemonic (_("User_name:"));
gtk_widget_show (luser);
gtk_misc_set_alignment (GTK_MISC (luser), 0.0, 0.5);
- gtk_table_attach (GTK_TABLE (parent),
- luser, 0, 1,
- row + 1, row + 2,
+ gtk_table_attach (GTK_TABLE (parent),
+ luser, 0, 1,
+ row + 1, row + 2,
GTK_FILL, 0, 0, 0);
user = gtk_entry_new ();
@@ -360,19 +360,19 @@ plugin_google (EPlugin *epl,
GtkWidget *label = gtk_label_new_with_mnemonic (_("_Refresh:"));
gtk_widget_show (label);
gtk_misc_set_alignment (GTK_MISC(label), 0.0, 0.5);
- gtk_table_attach (GTK_TABLE (parent),
- label,
+ gtk_table_attach (GTK_TABLE (parent),
+ label,
0, 1,
- row + 2, row + 3,
+ row + 2, row + 3,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
-
+
hbox = gtk_hbox_new (FALSE, 6);
gtk_widget_show (hbox);
spin = gtk_spin_button_new_with_range (1, 100, 1);
gtk_label_set_mnemonic_widget (GTK_LABEL(label), spin);
- gtk_widget_show (spin);
+ gtk_widget_show (spin);
gtk_box_pack_start (GTK_BOX(hbox), spin, FALSE, TRUE, 0);
option = gtk_option_menu_new ();
@@ -381,7 +381,7 @@ plugin_google (EPlugin *epl,
times[1] = gtk_menu_item_new_with_label (_("hours"));
times[2] = gtk_menu_item_new_with_label (_("days"));
times[3] = gtk_menu_item_new_with_label (_("weeks"));
-
+
menu = gtk_menu_new ();
gtk_widget_show (menu);
for (i = 0; i < 4; i++) {
@@ -392,8 +392,8 @@ plugin_google (EPlugin *epl,
set_refresh_time (source, spin, option);
gtk_box_pack_start (GTK_BOX (hbox), option, FALSE, TRUE, 0);
- e_source_set_property (source, "refresh", "30");
-
+ e_source_set_property (source, "refresh", "30");
+
g_object_set_data (G_OBJECT (option), "spin", spin);
g_signal_connect (G_OBJECT (option), "changed", G_CALLBACK (option_changed), t);
g_object_set_data (G_OBJECT (spin), "option", option);
@@ -401,15 +401,15 @@ plugin_google (EPlugin *epl,
gtk_table_attach (GTK_TABLE (parent), hbox, 1, 2, row + 2, row + 3, GTK_EXPAND | GTK_FILL, 0, 0, 0);
- g_signal_connect (G_OBJECT (user),
- "changed",
+ g_signal_connect (G_OBJECT (user),
+ "changed",
G_CALLBACK (user_changed),
- source);
+ source);
g_free (uri);
g_free (username);
-
- return widget;
+
+ return widget;
}