gnome-commander r2034 - trunk/src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r2034 - trunk/src
- Date: Thu, 4 Sep 2008 15:24:58 +0000 (UTC)
Author: epiotr
Date: Thu Sep 4 15:24:58 2008
New Revision: 2034
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=2034&view=rev
Log:
Code cleanup
Modified:
trunk/src/gnome-cmd-file-list.cc
trunk/src/gnome-cmd-file-selector.cc
Modified: trunk/src/gnome-cmd-file-list.cc
==============================================================================
--- trunk/src/gnome-cmd-file-list.cc (original)
+++ trunk/src/gnome-cmd-file-list.cc Thu Sep 4 15:24:58 2008
@@ -573,11 +573,10 @@
if (listlen > 1)
{
int total_len = 0;
- GList *tmp = sel_files;
GList *uri_str_list = NULL;
// create a list with the uri's of the selected files and calculate the total_length needed
- while (tmp)
+ for (GList *tmp=sel_files; tmp; tmp=tmp->next)
{
GnomeCmdFile *finfo = (GnomeCmdFile *) tmp->data;
const gchar *fn = NULL;
@@ -596,8 +595,6 @@
uri_str = g_strdup_printf ("%s\r\n", fn);
uri_str_list = g_list_append (uri_str_list, uri_str);
total_len += strlen (uri_str);
-
- tmp = tmp->next;
}
// allocate memory
@@ -608,15 +605,12 @@
data = copy = (gchar *) g_malloc (total_len+1);
// put the uri_str_list in the allocated memory
- tmp = uri_str_list;
- while (tmp)
+ for (GList *tmp=uri_str_list; tmp; tmp=tmp->next)
{
gchar *uri_str = (gchar *) tmp->data;
strcpy (copy, uri_str);
copy += strlen (uri_str);
-
- tmp = tmp->next;
}
g_list_foreach (uri_str_list, (GFunc) g_free, NULL);
@@ -1450,7 +1444,7 @@
*
* Params: @fl: The FileList to show the files in
* @list: A list of files to show
-* @sort: Wether to sort the files or not
+* @sort: Whether to sort the files or not
*
* Returns:
*
Modified: trunk/src/gnome-cmd-file-selector.cc
==============================================================================
--- trunk/src/gnome-cmd-file-selector.cc (original)
+++ trunk/src/gnome-cmd-file-selector.cc Thu Sep 4 15:24:58 2008
@@ -2174,7 +2174,7 @@
GtkWidget *close_btn = create_button_with_data (GTK_WIDGET (main_win), "x", GTK_SIGNAL_FUNC (on_filter_box_close), this);
gtk_signal_connect (GTK_OBJECT (entry), "key-press-event", GTK_SIGNAL_FUNC (on_filter_box_keypressed), this);
- gtk_box_pack_start (GTK_BOX (priv->filter_box), label, FALSE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (priv->filter_box), label, FALSE, TRUE, 6);
gtk_box_pack_start (GTK_BOX (priv->filter_box), entry, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (priv->filter_box), close_btn, FALSE, TRUE, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]