[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r7077 - in gnunet-gtk/src: common include plugins/chat plug
From: |
gnunet |
Subject: |
[GNUnet-SVN] r7077 - in gnunet-gtk/src: common include plugins/chat plugins/daemon plugins/fs plugins/stats |
Date: |
Sat, 7 Jun 2008 15:49:42 -0600 (MDT) |
Author: grothoff
Date: 2008-06-07 15:49:42 -0600 (Sat, 07 Jun 2008)
New Revision: 7077
Modified:
gnunet-gtk/src/common/helper.c
gnunet-gtk/src/common/logging.c
gnunet-gtk/src/include/gnunetgtk_common.h
gnunet-gtk/src/plugins/chat/chat.c
gnunet-gtk/src/plugins/daemon/daemon.c
gnunet-gtk/src/plugins/fs/collection.c
gnunet-gtk/src/plugins/fs/fs.c
gnunet-gtk/src/plugins/fs/namespace.c
gnunet-gtk/src/plugins/fs/namespace_search.c
gnunet-gtk/src/plugins/fs/search.c
gnunet-gtk/src/plugins/stats/functions.c
Log:
indent
Modified: gnunet-gtk/src/common/helper.c
===================================================================
--- gnunet-gtk/src/common/helper.c 2008-06-07 21:49:33 UTC (rev 7076)
+++ gnunet-gtk/src/common/helper.c 2008-06-07 21:49:42 UTC (rev 7077)
@@ -698,8 +698,9 @@
return TRUE;
}
-GtkWidget *GNUNET_GTK_extract_main_widget_from_window (GladeXML * xml,
- const char *windowName)
+GtkWidget *
+GNUNET_GTK_extract_main_widget_from_window (GladeXML * xml,
+ const char *windowName)
{
GtkContainer *window;
GtkWidget *ret;
Modified: gnunet-gtk/src/common/logging.c
===================================================================
--- gnunet-gtk/src/common/logging.c 2008-06-07 21:49:33 UTC (rev 7076)
+++ gnunet-gtk/src/common/logging.c 2008-06-07 21:49:42 UTC (rev 7077)
@@ -38,9 +38,10 @@
if (infoWindowTextView != NULL)
return;
infoWindowTextView
- = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML(),
- "messageWindowTextView");
+ = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (),
+ "messageWindowTextView");
}
+
/**
* Do not track more than MAX messages
*/
@@ -52,7 +53,7 @@
static void *
doInfoMessage (void *args)
{
- char * note = args;
+ char *note = args;
GtkTextIter iter;
GtkTextBuffer *buffer;
GtkTextIter end;
@@ -63,7 +64,7 @@
gtk_text_buffer_insert (buffer, &iter, note, -1);
if (gtk_text_buffer_get_line_count (buffer) >= MAX_LINES)
{
- gtk_text_buffer_get_iter_at_line (buffer, &iter, MAX_LINES-1);
+ gtk_text_buffer_get_iter_at_line (buffer, &iter, MAX_LINES - 1);
gtk_text_buffer_get_iter_at_line (buffer, &end, -1);
gtk_text_buffer_delete (buffer, &iter, &end);
}
@@ -79,7 +80,7 @@
GNUNET_GTK_show_info_message (const char *format, ...)
{
va_list args;
- gchar * note;
+ gchar *note;
va_start (args, format);
note = g_strdup_vprintf (format, args);
Modified: gnunet-gtk/src/include/gnunetgtk_common.h
===================================================================
--- gnunet-gtk/src/include/gnunetgtk_common.h 2008-06-07 21:49:33 UTC (rev
7076)
+++ gnunet-gtk/src/include/gnunetgtk_common.h 2008-06-07 21:49:42 UTC (rev
7077)
@@ -175,7 +175,8 @@
GtkWidget *GNUNET_GTK_extract_main_widget_from_window (GladeXML * xml,
- const char *windowName);
+ const char
+ *windowName);
Modified: gnunet-gtk/src/plugins/chat/chat.c
===================================================================
--- gnunet-gtk/src/plugins/chat/chat.c 2008-06-07 21:49:33 UTC (rev 7076)
+++ gnunet-gtk/src/plugins/chat/chat.c 2008-06-07 21:49:42 UTC (rev 7077)
@@ -262,8 +262,8 @@
glade_xml_new (GNUNET_GTK_get_glade_filename (),
"chatFrame", PACKAGE_NAME);
GNUNET_GTK_connect_glade_with_plugins (client->chatXML);
- client->chatFrame = GNUNET_GTK_extract_main_widget_from_window
(client->chatXML,
- "chatFrame");
+ client->chatFrame =
+ GNUNET_GTK_extract_main_widget_from_window (client->chatXML, "chatFrame");
chatLabel = gtk_label_new (room_name);
gtk_notebook_append_page (GTK_NOTEBOOK (chatnotebook),
client->chatFrame, chatLabel);
Modified: gnunet-gtk/src/plugins/daemon/daemon.c
===================================================================
--- gnunet-gtk/src/plugins/daemon/daemon.c 2008-06-07 21:49:33 UTC (rev
7076)
+++ gnunet-gtk/src/plugins/daemon/daemon.c 2008-06-07 21:49:42 UTC (rev
7077)
@@ -78,7 +78,7 @@
char *pos;
char *desc;
GtkListStore *model;
-
+
model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
apps = NULL;
sock = GNUNET_client_connection_create (ectx, cfg);
@@ -257,7 +257,7 @@
ret = 0;
if (last != ret)
{
- updateAppModel(NULL);
+ updateAppModel (NULL);
last = ret;
}
GNUNET_GTK_save_call (&doUpdateMenus, &ret);
@@ -282,10 +282,9 @@
gtk_widget_set_sensitive (launchEntry, FALSE);
if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg))
{
- GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (),
- &cronCheckDaemon,
- 15 * GNUNET_CRON_SECONDS,
- NULL);
+ GNUNET_cron_advance_job (GNUNET_GTK_get_cron_manager (),
+ &cronCheckDaemon,
+ 15 * GNUNET_CRON_SECONDS, NULL);
return;
}
else
@@ -325,10 +324,9 @@
GNUNET_GTK_add_log_entry (_("Launched gnunetd\n"));
}
g_free (fn);
- GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (),
- &cronCheckDaemon,
- 15 * GNUNET_CRON_SECONDS,
- NULL);
+ GNUNET_cron_advance_job (GNUNET_GTK_get_cron_manager (),
+ &cronCheckDaemon,
+ 15 * GNUNET_CRON_SECONDS, NULL);
return;
}
else
@@ -348,10 +346,9 @@
}
if (fn != NULL)
g_free (fn);
- GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (),
- &cronCheckDaemon,
- 15 * GNUNET_CRON_SECONDS,
- NULL);
+ GNUNET_cron_advance_job (GNUNET_GTK_get_cron_manager (),
+ &cronCheckDaemon,
+ 15 * GNUNET_CRON_SECONDS, NULL);
}
}
@@ -390,10 +387,8 @@
}
GNUNET_client_connection_destroy (sock);
}
- GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (),
- &cronCheckDaemon,
- 15 * GNUNET_CRON_SECONDS,
- NULL);
+ GNUNET_cron_advance_job (GNUNET_GTK_get_cron_manager (),
+ &cronCheckDaemon, 15 * GNUNET_CRON_SECONDS, NULL);
}
void
@@ -474,8 +469,8 @@
GNUNET_free (daemon_config);
cron = GNUNET_GTK_get_cron_manager ();
- GNUNET_cron_add_job (cron, &cronCheckDaemon, 2 * GNUNET_CRON_SECONDS, 15 *
GNUNET_CRON_SECONDS,
- NULL);
+ GNUNET_cron_add_job (cron, &cronCheckDaemon, 2 * GNUNET_CRON_SECONDS,
+ 15 * GNUNET_CRON_SECONDS, NULL);
GNUNET_cron_add_job (cron, &updateAppModel, 5 * GNUNET_CRON_MINUTES,
5 * GNUNET_CRON_MINUTES, NULL);
}
Modified: gnunet-gtk/src/plugins/fs/collection.c
===================================================================
--- gnunet-gtk/src/plugins/fs/collection.c 2008-06-07 21:49:33 UTC (rev
7076)
+++ gnunet-gtk/src/plugins/fs/collection.c 2008-06-07 21:49:42 UTC (rev
7077)
@@ -137,7 +137,8 @@
}
else
{
- GNUNET_GTK_show_info_message (_("Failed to stop collection (consult
logs).\n"));
+ GNUNET_GTK_show_info_message (_
+ ("Failed to stop collection (consult
logs).\n"));
}
}
Modified: gnunet-gtk/src/plugins/fs/fs.c
===================================================================
--- gnunet-gtk/src/plugins/fs/fs.c 2008-06-07 21:49:33 UTC (rev 7076)
+++ gnunet-gtk/src/plugins/fs/fs.c 2008-06-07 21:49:42 UTC (rev 7077)
@@ -676,23 +676,21 @@
}
-static void
-init_cron_job(void * arg)
+static void
+init_cron_job (void *arg)
{
- GtkWidget * tab = arg;
+ GtkWidget *tab = arg;
- ctx = GNUNET_FSUI_start (ectx, cfg, "gnunet-gtk",
- 8, /* FIXME: allow user to configure download
parallelism */
+ ctx = GNUNET_FSUI_start (ectx, cfg, "gnunet-gtk", 8, /* FIXME: allow user
to configure download parallelism */
GNUNET_YES, &eventProcessor, NULL);
- GNUNET_GTK_save_call((GNUNET_ThreadMainFunction) >k_widget_show,
- tab);
+ GNUNET_GTK_save_call ((GNUNET_ThreadMainFunction) & gtk_widget_show, tab);
}
void
init_fs (struct GNUNET_GE_Context *e, struct GNUNET_GC_Configuration *c)
{
GtkWidget *tab;
- struct GNUNET_CronManager * cron;
+ struct GNUNET_CronManager *cron;
ectx = e;
cfg = c;
@@ -701,8 +699,8 @@
fs_collection_start ();
fs_namespace_start ();
tab = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "fsnotebook");
- cron = GNUNET_GTK_get_cron_manager();
- GNUNET_cron_add_job(cron, &init_cron_job, 0, 0, tab);
+ cron = GNUNET_GTK_get_cron_manager ();
+ GNUNET_cron_add_job (cron, &init_cron_job, 0, 0, tab);
}
static void *
@@ -712,19 +710,19 @@
fs_summary_stop ();
fs_namespace_stop ();
- gtk_widget_hide(tab);
+ gtk_widget_hide (tab);
return NULL;
}
void
done_fs ()
{
- struct GNUNET_CronManager * cron;
+ struct GNUNET_CronManager *cron;
GtkWidget *tab;
tab = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "fsnotebook");
- cron = GNUNET_GTK_get_cron_manager();
- GNUNET_cron_del_job(cron, &init_cron_job, 0, tab);
+ cron = GNUNET_GTK_get_cron_manager ();
+ GNUNET_cron_del_job (cron, &init_cron_job, 0, tab);
if (ctx != NULL)
GNUNET_FSUI_stop (ctx);
GNUNET_GTK_save_call (&cleanup_save_call, tab);
Modified: gnunet-gtk/src/plugins/fs/namespace.c
===================================================================
--- gnunet-gtk/src/plugins/fs/namespace.c 2008-06-07 21:49:33 UTC (rev
7076)
+++ gnunet-gtk/src/plugins/fs/namespace.c 2008-06-07 21:49:42 UTC (rev
7077)
@@ -120,9 +120,11 @@
= glade_xml_new (GNUNET_GTK_get_glade_filename (),
"namespaceContentFrame", PACKAGE_NAME);
GNUNET_GTK_connect_glade_with_plugins (namespaceXML);
- child = GNUNET_GTK_extract_main_widget_from_window (namespaceXML,
"namespaceContentFrame");
- resultList = glade_xml_get_widget (namespaceXML,
- "namespaceContentFrameTreeView");
+ child =
+ GNUNET_GTK_extract_main_widget_from_window (namespaceXML,
+ "namespaceContentFrame");
+ resultList =
+ glade_xml_get_widget (namespaceXML, "namespaceContentFrameTreeView");
entry->addButton = glade_xml_get_widget (namespaceXML, "addButton");
entry->updateButton = glade_xml_get_widget (namespaceXML,
"namespaceUpdateButton");
Modified: gnunet-gtk/src/plugins/fs/namespace_search.c
===================================================================
--- gnunet-gtk/src/plugins/fs/namespace_search.c 2008-06-07 21:49:33 UTC
(rev 7076)
+++ gnunet-gtk/src/plugins/fs/namespace_search.c 2008-06-07 21:49:42 UTC
(rev 7077)
@@ -80,10 +80,10 @@
{
if (nsName != NULL)
{
- GNUNET_GE_ASSERT(NULL,
- GNUNET_OK ==
- GNUNET_pseudonym_name_to_id(ectx, cfg,
- nsName, &nsid));
+ GNUNET_GE_ASSERT (NULL,
+ GNUNET_OK ==
+ GNUNET_pseudonym_name_to_id (ectx, cfg,
+ nsName, &nsid));
newrating = gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin));
rating = GNUNET_pseudonym_rank (ectx,
cfg, &nsid, newrating - rating);
@@ -157,10 +157,10 @@
}
else if (nsName != NULL)
{
- GNUNET_GE_ASSERT(NULL,
- GNUNET_OK ==
- GNUNET_pseudonym_name_to_id(ectx, cfg,
- nsName, &ns));
+ GNUNET_GE_ASSERT (NULL,
+ GNUNET_OK ==
+ GNUNET_pseudonym_name_to_id (ectx, cfg,
+ nsName, &ns));
gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), rating);
gtk_widget_set_sensitive (spin, TRUE);
keyword
@@ -261,7 +261,8 @@
}
if (found == GNUNET_NO)
{
- GNUNET_GTK_show_info_message (_("Namespace `%s' found: %s.\n"),
nni->namespaceName, desc);
+ GNUNET_GTK_show_info_message (_("Namespace `%s' found: %s.\n"),
+ nni->namespaceName, desc);
gtk_list_store_append (model, &iter);
gtk_list_store_set (model,
&iter,
Modified: gnunet-gtk/src/plugins/fs/search.c
===================================================================
--- gnunet-gtk/src/plugins/fs/search.c 2008-06-07 21:49:33 UTC (rev 7076)
+++ gnunet-gtk/src/plugins/fs/search.c 2008-06-07 21:49:42 UTC (rev 7077)
@@ -255,13 +255,13 @@
}
}
#else
- mime = GNUNET_strdup(rawMime);
+ mime = GNUNET_strdup (rawMime);
#endif
gtk_tree_store_set (searchContext->tree, iter,
SEARCH_NAME, name, SEARCH_SIZE, size, SEARCH_HSIZE,
- size_h, SEARCH_MIME, mime,
- SEARCH_RAW_MIME, rawMime, SEARCH_DESC, desc,
+ size_h, SEARCH_MIME, mime,
+ SEARCH_RAW_MIME, rawMime, SEARCH_DESC, desc,
SEARCH_PIXBUF, pixbuf, SEARCH_URI,
GNUNET_ECRS_uri_duplicate (info->uri), SEARCH_META,
GNUNET_meta_data_duplicate (info->meta),
@@ -270,11 +270,11 @@
searchContext, SEARCH_INTERNAL_PARENT, downloadParent,
SEARCH_STATUS, getStatusName (state),
SEARCH_APPLICABILITY_RANK, 1, SEARCH_RANK_SORT,
- (long long) 1, SEARCH_RANK_PIXBUF, rankbuf,
+ (long long) 1, SEARCH_RANK_PIXBUF, rankbuf,
#ifdef HAVE_GIO
SEARCH_ICON, icon,
#endif
- -1);
+ -1);
g_object_unref (rankbuf);
if (pixbuf != NULL)
g_object_unref (pixbuf);
@@ -711,15 +711,16 @@
PACKAGE_NAME);
GNUNET_GTK_connect_glade_with_plugins (list->searchXML);
list->searchpage
- = GNUNET_GTK_extract_main_widget_from_window (list->searchXML,
"searchResultsFrame");
+ =
+ GNUNET_GTK_extract_main_widget_from_window (list->searchXML,
+ "searchResultsFrame");
/* setup tree view and renderers */
list->treeview = GTK_TREE_VIEW (glade_xml_get_widget (list->searchXML,
"searchResults"));
g_signal_connect_swapped (list->treeview,
"button-press-event",
G_CALLBACK (search_click_handler), list);
- list->tree = gtk_tree_store_new (SEARCH_NUM,
- G_TYPE_STRING, /* name */
+ list->tree = gtk_tree_store_new (SEARCH_NUM, G_TYPE_STRING, /* name */
G_TYPE_UINT64, /* size */
G_TYPE_STRING, /* human-readable size
*/
G_TYPE_STRING, /* mime-type */
@@ -739,7 +740,7 @@
GDK_TYPE_PIXBUF, /* ranking
visualization */
G_TYPE_INT64 /* numeric sort */
#ifdef HAVE_GIO
- , GDK_TYPE_PIXBUF /* icon */
+ , GDK_TYPE_PIXBUF /* icon */
#endif
);
@@ -935,7 +936,9 @@
"searchTabLabelWindow", PACKAGE_NAME);
GNUNET_GTK_connect_glade_with_plugins (list->labelXML);
list->tab_label
- = GNUNET_GTK_extract_main_widget_from_window (list->labelXML,
"searchTabLabelWindow");
+ =
+ GNUNET_GTK_extract_main_widget_from_window (list->labelXML,
+ "searchTabLabelWindow");
/* process existing results */
for (i = 0; i < resultCount; i++)
fs_search_result_received (list, &results[i], uri);
@@ -1186,14 +1189,14 @@
if (nsName != NULL)
{
char *ustring;
- GNUNET_EncName enc;
- GNUNET_HashCode nsid;
+ GNUNET_EncName enc;
+ GNUNET_HashCode nsid;
- GNUNET_GE_ASSERT(NULL,
- GNUNET_OK ==
- GNUNET_pseudonym_name_to_id(ectx, cfg,
- nsName, &nsid));
- GNUNET_hash_to_enc(&nsid, &enc);
+ GNUNET_GE_ASSERT (NULL,
+ GNUNET_OK ==
+ GNUNET_pseudonym_name_to_id (ectx, cfg,
+ nsName, &nsid));
+ GNUNET_hash_to_enc (&nsid, &enc);
ustring =
GNUNET_malloc (strlen (searchString) + sizeof (GNUNET_EncName) +
@@ -1201,7 +1204,7 @@
strlen (GNUNET_ECRS_SUBSPACE_INFIX) + 10);
strcpy (ustring, GNUNET_ECRS_URI_PREFIX);
strcat (ustring, GNUNET_ECRS_SUBSPACE_INFIX);
- strcat (ustring, (const char*)&enc);
+ strcat (ustring, (const char *) &enc);
strcat (ustring, "/");
strcat (ustring, searchString);
fsss.uri = GNUNET_ECRS_string_to_uri (ectx, ustring);
Modified: gnunet-gtk/src/plugins/stats/functions.c
===================================================================
--- gnunet-gtk/src/plugins/stats/functions.c 2008-06-07 21:49:33 UTC (rev
7076)
+++ gnunet-gtk/src/plugins/stats/functions.c 2008-06-07 21:49:42 UTC (rev
7077)
@@ -478,7 +478,8 @@
return GNUNET_OK;
}
-struct UpdateClosure {
+struct UpdateClosure
+{
GNUNET_CronTime delta;
int is_running;
};
@@ -489,7 +490,7 @@
static void *
updateDaemonStatus (void *cls)
{
- struct UpdateClosure * uc = cls;
+ struct UpdateClosure *uc = cls;
static gboolean once = TRUE;
static int last_status = -5;
unsigned long long connected_peers;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r7077 - in gnunet-gtk/src: common include plugins/chat plugins/daemon plugins/fs plugins/stats,
gnunet <=