[Goodies-commits] r6437 - in sion/trunk: . src

Enrico Troeger enrico at xfce.org
Mon Jan 12 00:45:40 CET 2009


Author: enrico
Date: 2009-01-11 23:45:40 +0000 (Sun, 11 Jan 2009)
New Revision: 6437

Modified:
   sion/trunk/ChangeLog
   sion/trunk/src/backendgvfs.c
   sion/trunk/src/bookmark.c
   sion/trunk/src/bookmarkdialog.c
   sion/trunk/src/bookmarkeditdialog.c
   sion/trunk/src/common.c
   sion/trunk/src/main.c
   sion/trunk/src/menubuttonaction.c
   sion/trunk/src/passworddialog.c
   sion/trunk/src/settings.c
   sion/trunk/src/window.c
   sion/trunk/wscript
Log:
Change used comments to multi-line variants.
Add -ansi to debug compile flags.

Modified: sion/trunk/ChangeLog
===================================================================
--- sion/trunk/ChangeLog	2009-01-11 23:08:47 UTC (rev 6436)
+++ sion/trunk/ChangeLog	2009-01-11 23:45:40 UTC (rev 6437)
@@ -11,6 +11,11 @@
    Fix mnemonics.
  * src/window.c:
    Fix 'Minimize to tray'.
+ * src/backendgvfs.c, src/bookmark.c, src/bookmarkdialog.c, src/main.c,
+   src/bookmarkeditdialog.c, src/common.c, src/menubuttonaction.c,
+   src/passworddialog.c, src/settings.c, src/window.c, wscript:
+   Change used comments to multi-line variants.
+   Add -ansi to debug compile flags.
 
 
 2009-01-10  Enrico Tröger  <enrico(at)xfce(dot)org>

Modified: sion/trunk/src/backendgvfs.c
===================================================================
--- sion/trunk/src/backendgvfs.c	2009-01-11 23:08:47 UTC (rev 6436)
+++ sion/trunk/src/backendgvfs.c	2009-01-11 23:45:40 UTC (rev 6437)
@@ -224,7 +224,7 @@
 
 	gtk_list_store_clear(priv->store);
 
-	// list mounts
+	/* list mounts */
 	mounts = g_volume_monitor_get_mounts(vm);
 	for (item = mounts; item != NULL; item = g_list_next(item))
 	{
@@ -258,13 +258,13 @@
 	g_list_foreach(mounts, (GFunc) g_object_unref, NULL);
 	g_list_free(mounts);
 
-	// list volumes
+	/* list volumes */
 	volumes = g_volume_monitor_get_volumes(vm);
 	for (item = volumes; item != NULL; item = g_list_next(item))
 	{
 		volume = G_VOLUME(item->data);
 		mount = g_volume_get_mount(volume);
-		// display this volume only if it is not mounted, otherwise it will be listed as mounted
+		/* display this volume only if it is not mounted, otherwise it will be listed as mounted */
 		if (mount == NULL)
 		{
 			icon = g_volume_get_icon(volume);
@@ -316,7 +316,7 @@
 		g_signal_connect(gvm, "volume-changed", G_CALLBACK(mount_volume_changed_cb), object);
 		g_signal_connect(gvm, "volume-removed", G_CALLBACK(mount_volume_changed_cb), object);
 
-		// fill the list store once
+		/* fill the list store once */
 		mount_volume_changed_cb(gvm, NULL, object);
 		break;
 	}
@@ -494,9 +494,9 @@
 		{
 			g_mount_operation_set_password(op,
 				sion_password_dialog_get_password(SION_PASSWORD_DIALOG(dialog)));
-			/// TODO make this configurable?
-			//~ g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_FOR_SESSION);
-			//~ g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_NEVER);
+			/* TODO make this configurable? */
+			/* g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_FOR_SESSION); */
+			/* g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_NEVER); */
 			g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_PERMANENTLY);
 		}
 	}

Modified: sion/trunk/src/bookmark.c
===================================================================
--- sion/trunk/src/bookmark.c	2009-01-11 23:08:47 UTC (rev 6436)
+++ sion/trunk/src/bookmark.c	2009-01-11 23:45:40 UTC (rev 6437)
@@ -145,12 +145,12 @@
 	/* find end of host/port, this is the first slash after the initial double slashes */
 	end = strchr(s, '/');
 	if (end == NULL)
-		end = s + strlen(s); // there is no trailing '/', so use the whole remaining string
+		end = s + strlen(s); /* there is no trailing '/', so use the whole remaining string */
 
 	/* find username */
 	t = strchr(s, '@');
-	// if we found a '@', search for a second one and use the second one as end of the username
-	// as the username itself might contain a '@'
+	/* if we found a '@', search for a second one and use the second one as end of the username
+	 * as the username itself might contain a '@' */
 	if (t != NULL && (x = strchr(t + 1, '@')) != NULL)
 		t = x;
 	if (t != NULL)
@@ -159,7 +159,7 @@
 		x = s;
 		while (*x != '\0' && x < t && *x != ':')
 		{
-			l++; // count the len of the username
+			l++; /* count the len of the username */
 			x++;
 		}
 		if (l == 0)
@@ -173,11 +173,11 @@
 
 	/* find hostname */
 	s = (t) ? t + 1 : s;
-	if (*s == '[') // obex://[00:12:D1:94:1B:28]/ or http://[1080:0:0:0:8:800:200C:417A]/index.html
+	if (*s == '[') /* obex://[00:12:D1:94:1B:28]/ or http://[1080:0:0:0:8:800:200C:417A]/index.html */
 	{
 		gchar *hostend;
 
-		s++; // skip the found '['
+		s++; /* skip the found '[' */
 		hostend = strchr(s, ']');
 		if (! hostend || hostend > end)
 		{
@@ -189,7 +189,7 @@
 		x = s;
 		while (*x != '\0' && x < end && *x != ']')
 		{
-			l++; // count the len of the hostname
+			l++; /* count the len of the hostname */
 			x++;
 		}
 		priv->host = g_strndup(s, l);
@@ -201,7 +201,7 @@
 		x = s;
 		while (*x != '\0' && x < end && *x != ':')
 		{
-			l++; // count the len of the hostname
+			l++; /* count the len of the hostname */
 			x++;
 		}
 		priv->host = g_strndup(s, l);
@@ -213,16 +213,16 @@
 	{
 		gchar *tmp;
 
-		t++; // skip the found ':'
+		t++; /* skip the found ':' */
 		l = 0;
 		x = t;
 		while (*x != '\0' && x < end)
 		{
-			l++; // count the len of the port
+			l++; /* count the len of the port */
 			x++;
 		}
-		// atoi should be enough as it returns simply 0 if there are any errors and 0 marks an
-		// invalid port
+		/* atoi should be enough as it returns simply 0 if there are any errors and 0 marks an
+		 * invalid port */
 		tmp = g_strndup(t, l);
 		priv->port = (guint) atoi(tmp);
 		g_free(tmp);

Modified: sion/trunk/src/bookmarkdialog.c
===================================================================
--- sion/trunk/src/bookmarkdialog.c	2009-01-11 23:08:47 UTC (rev 6436)
+++ sion/trunk/src/bookmarkdialog.c	2009-01-11 23:45:40 UTC (rev 6437)
@@ -374,11 +374,11 @@
 	gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(priv->tree), TRUE);
 	gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(priv->tree), TRUE);
 
-	// sorting
+	/* sorting */
 	gtk_tree_sortable_set_sort_column_id(
 		GTK_TREE_SORTABLE(priv->store), COL_NAME, GTK_SORT_ASCENDING);
 
-	// selection handling
+	/* selection handling */
 	sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->tree));
 	gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE);
 

Modified: sion/trunk/src/bookmarkeditdialog.c
===================================================================
--- sion/trunk/src/bookmarkeditdialog.c	2009-01-11 23:08:47 UTC (rev 6436)
+++ sion/trunk/src/bookmarkeditdialog.c	2009-01-11 23:45:40 UTC (rev 6437)
@@ -183,11 +183,11 @@
 
 		if (res != GTK_RESPONSE_OK)
 			break;
-		// perform some error checking and don't return until entered values are sane
+		/* perform some error checking and don't return until entered values are sane */
 		else
 		{
 			if (sion_widget_get_flags(priv->name_entry) & GTK_VISIBLE)
-			{	// check the name only if we are creating/editing a bookmark
+			{	/* check the name only if we are creating/editing a bookmark */
 				tmp = gtk_entry_get_text(GTK_ENTRY(priv->name_entry));
 				if (! *tmp)
 				{
@@ -197,7 +197,7 @@
 					gtk_widget_grab_focus(priv->name_entry);
 				}
 				else
-				{	// check for duplicate bookmark names
+				{	/* check for duplicate bookmark names */
 					SionBookmarkList *bml = sion_settings_get_bookmarks(priv->settings);
 					SionBookmark *bm;
 					guint i;
@@ -621,7 +621,7 @@
 			    &iter, COLUMN_INDEX, &idx, -1);
 
 	tmp = gtk_entry_get_text(GTK_ENTRY(priv->name_entry));
-	if (*tmp)	// the name might be empty if the dialog is used as a Connect dialog
+	if (*tmp)	/* the name might be empty if the dialog is used as a Connect dialog */
 		sion_bookmark_set_name(priv->bookmark_update, tmp);
 
 	if (idx == -1)

Modified: sion/trunk/src/common.c
===================================================================
--- sion/trunk/src/common.c	2009-01-11 23:08:47 UTC (rev 6436)
+++ sion/trunk/src/common.c	2009-01-11 23:45:40 UTC (rev 6437)
@@ -71,7 +71,7 @@
 	else if (sion_str_equal(scheme, "sftp"))
 		return _("SSH");
 	else if (sion_str_equal(scheme, "obex"))
-		/// TODO find something better
+		/* TODO find something better */
 		return _("OBEX");
 	else if (sion_str_equal(scheme, "dav"))
 		return _("WebDAV");

Modified: sion/trunk/src/main.c
===================================================================
--- sion/trunk/src/main.c	2009-01-11 23:08:47 UTC (rev 6436)
+++ sion/trunk/src/main.c	2009-01-11 23:45:40 UTC (rev 6437)
@@ -122,8 +122,8 @@
 
 	settings = sion_settings_new();
 
-	// GVFS currently depends on gnome-mount for HAL-based GVolumeMonitor implementation,
-	// when gnome-mount is not installed, we can use "unix" as GVolumeMonitor implementation.
+	/* GVFS currently depends on gnome-mount for HAL-based GVolumeMonitor implementation,
+	 * when gnome-mount is not installed, we can use "unix" as GVolumeMonitor implementation. */
 	if ((vm_impl = sion_settings_get_vm_impl(settings)) != NULL)
 		g_setenv("GIO_USE_VOLUME_MONITOR", vm_impl, 0);
 

Modified: sion/trunk/src/menubuttonaction.c
===================================================================
--- sion/trunk/src/menubuttonaction.c	2009-01-11 23:08:47 UTC (rev 6436)
+++ sion/trunk/src/menubuttonaction.c	2009-01-11 23:45:40 UTC (rev 6437)
@@ -151,11 +151,11 @@
 		}
 
 		if (menu != NULL)
-		{	// clear the old menu items
+		{	/* clear the old menu items */
 			gtk_container_foreach(GTK_CONTAINER(menu), (GtkCallback) gtk_widget_destroy, NULL);
 		}
 		else
-		{	// create new menu
+		{	/* create new menu */
 			menu = gtk_menu_new();
 			set_menu(l->data, menu);
 		}

Modified: sion/trunk/src/passworddialog.c
===================================================================
--- sion/trunk/src/passworddialog.c	2009-01-11 23:08:47 UTC (rev 6436)
+++ sion/trunk/src/passworddialog.c	2009-01-11 23:45:40 UTC (rev 6437)
@@ -102,10 +102,8 @@
 
 	gtk_window_set_title(GTK_WINDOW(dialog), _("Authentication information needed"));
 	gtk_window_set_icon_name(GTK_WINDOW(dialog), GTK_STOCK_DIALOG_AUTHENTICATION);
-	//~ gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
 	gtk_container_set_border_width(GTK_CONTAINER(dialog), 5);
 	gtk_box_set_spacing(GTK_BOX(dialog_vbox), 2);
-	//~ gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
 
 	gtk_dialog_add_buttons(GTK_DIALOG(dialog),
 		GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,

Modified: sion/trunk/src/settings.c
===================================================================
--- sion/trunk/src/settings.c	2009-01-11 23:08:47 UTC (rev 6436)
+++ sion/trunk/src/settings.c	2009-01-11 23:45:40 UTC (rev 6437)
@@ -48,10 +48,10 @@
 
 	gchar		*file_manager;
 	gint		 autoconnect_interval;
-	gchar		*vm_impl; // GVolumeMonitor implementation to use
-	gint		*geometry; // window size and position, field 4 is a flag for maximized state
+	gchar		*vm_impl; /* GVolumeMonitor implementation to use */
+	gint		*geometry; /* window size and position, field 4 is a flag for maximized state */
 
-	SionBookmarkList *bookmarks; // array of known bookmarks
+	SionBookmarkList *bookmarks; /* array of known bookmarks */
 };
 
 static void sion_settings_class_init		(SionSettingsClass *klass);
@@ -60,7 +60,7 @@
 
 static GObjectClass *parent_class = NULL;
 
-// keyfile section names
+/* keyfile section names */
 #define SECTION_GENERAL	"general"
 #define SECTION_UI		"ui"
 
@@ -526,7 +526,7 @@
 		error = NULL;
 	}
 
-	// read groups for bookmarks
+	/* read groups for bookmarks */
 	groups = g_key_file_get_groups(k, &len);
 	for (i = 0; i < len; i++)
 	{

Modified: sion/trunk/src/window.c
===================================================================
--- sion/trunk/src/window.c	2009-01-11 23:08:47 UTC (rev 6436)
+++ sion/trunk/src/window.c	2009-01-11 23:45:40 UTC (rev 6437)
@@ -271,7 +271,7 @@
 		for (l = items; l != NULL; l = l->next)
 		{
 			gtk_tree_model_get_iter(model, iter, l->data);
-			// the selection mode is SINGLE, so the list should never have more than one entry
+			/* the selection mode is SINGLE, so the list should never have more than one entry */
 			break;
 		}
 
@@ -516,8 +516,8 @@
 			}
 			else
 			{
-				/// FIXME make the open command configurable or find a better solution
-				///       maybe gtk_show_uri() ?
+				// FIXME make the open command configurable or find a better solution
+				//       maybe gtk_show_uri() ?
 				GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(window),
 							GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
 							_("Non-local mountpoints can't be opened."));
@@ -576,16 +576,16 @@
 		gtk_tree_model_get(model, iter, SION_WINDOW_COL_REF_TYPE, &ref_type, -1);
 		is_bookmark = iter_is_bookmark(window, model, iter);
 
-		//~ gtk_action_set_sensitive(priv->action_connect, (ref_type != SION_WINDOW_REF_TYPE_MOUNT));
-		//~ gtk_action_set_sensitive(priv->action_bookmarks_toolbar, (ref_type != SION_WINDOW_REF_TYPE_MOUNT));
+		/* gtk_action_set_sensitive(priv->action_connect, (ref_type != SION_WINDOW_REF_TYPE_MOUNT)); */
+		/* gtk_action_set_sensitive(priv->action_bookmarks_toolbar, (ref_type != SION_WINDOW_REF_TYPE_MOUNT)); */
 		gtk_action_set_sensitive(priv->action_disconnect, (ref_type == SION_WINDOW_REF_TYPE_MOUNT));
 		gtk_action_set_sensitive(priv->action_bookmark_create, ! is_bookmark);
 		gtk_action_set_sensitive(priv->action_open, sion_settings_has_file_manager(priv->settings));
 	}
 	else
 	{
-		//~ gtk_action_set_sensitive(priv->action_connect, FALSE);
-		//~ gtk_action_set_sensitive(priv->action_bookmarks_toolbar, FALSE);
+		/* gtk_action_set_sensitive(priv->action_connect, FALSE); */
+		/* gtk_action_set_sensitive(priv->action_bookmarks_toolbar, FALSE); */
 		gtk_action_set_sensitive(priv->action_disconnect, FALSE);
 		gtk_action_set_sensitive(priv->action_bookmark_create, FALSE);
 		gtk_action_set_sensitive(priv->action_open, FALSE);
@@ -663,7 +663,7 @@
 			SION_WINDOW_COL_REF_TYPE, &ref_type, -1);
 		if (ref_type == SION_WINDOW_REF_TYPE_MOUNT)
 		{
-			//~ action_unmount_cb(NULL, data);
+			/* action_unmount_cb(NULL, data); */
 			action_open_cb(NULL, window);
 		}
 		else
@@ -835,14 +835,14 @@
 				{
 					GtkWidget *edit_dialog;
 
-					// show the bookmark edit dialog and add the bookmark only if it was
-					// not cancelled
+					/* show the bookmark edit dialog and add the bookmark only if it was
+					 * not cancelled */
 					edit_dialog = sion_bookmark_edit_dialog_new_with_bookmark(
 						GTK_WIDGET(window), priv->settings, SION_BE_MODE_EDIT, bm);
 					if (sion_bookmark_edit_dialog_run(SION_BOOKMARK_EDIT_DIALOG(edit_dialog)) ==
 						GTK_RESPONSE_OK)
 					{
-						// this fills the values of the dialog into 'bm'
+						/* this fills the values of the dialog into 'bm' */
 						g_object_set(edit_dialog, "bookmark-update", bm, NULL);
 
 						g_ptr_array_add(sion_settings_get_bookmarks(priv->settings),
@@ -1208,7 +1208,7 @@
 	priv->toolbar = gtk_ui_manager_get_widget(ui_manager, "/toolbar");
 	priv->trayicon_popup_menu = gtk_ui_manager_get_widget(ui_manager, "/traymenu");
 	priv->tree_popup_menu = gtk_ui_manager_get_widget(ui_manager, "/treemenu");
-	// increase refcount to keep the widgets after the ui manager is destroyed
+	/* increase refcount to keep the widgets after the ui manager is destroyed */
 	g_object_ref(priv->trayicon_popup_menu);
 	g_object_ref(priv->tree_popup_menu);
 	g_object_ref(priv->toolbar);

Modified: sion/trunk/wscript
===================================================================
--- sion/trunk/wscript	2009-01-11 23:08:47 UTC (rev 6436)
+++ sion/trunk/wscript	2009-01-11 23:45:40 UTC (rev 6437)
@@ -59,7 +59,7 @@
 
 	# debug flags
 	if Options.options.debug:
-		conf.env.append_value('CCFLAGS', '-g -O0 -DDEBUG -DGSEAL_ENABLE -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -D_FORTIFY_SOURCE=2 -fno-common -Waggregate-return -Wcast-align -Wdeclaration-after-statement -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-security -Winit-self -Wmissing-declarations -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wundef -Wwrite-strings')
+		conf.env.append_value('CCFLAGS', '-g -O0 -DDEBUG -DGSEAL_ENABLE -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -D_FORTIFY_SOURCE=2 -ansi -fno-common -Waggregate-return -Wcast-align -Wdeclaration-after-statement -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-security -Winit-self -Wmissing-declarations -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wundef -Wwrite-strings')
 
 	Utils.pprint('BLUE', 'Summary:')
 	print_message(conf, 'Install sion ' + VERSION + ' in', conf.env['PREFIX'])




More information about the Goodies-commits mailing list