SF.net SVN: geany:[4970] branches/sm
statc at users.sourceforge.net
statc at xxxxx
Mon May 31 09:23:56 UTC 2010
Revision: 4970
http://geany.svn.sourceforge.net/geany/?rev=4970&view=rev
Author: statc
Date: 2010-05-31 09:23:56 +0000 (Mon, 31 May 2010)
Log Message:
-----------
Fix a bug: files specified in command line did not open together with default session if the session "referenced" a project.
Modified Paths:
--------------
branches/sm/ChangeLog.sm
branches/sm/src/main.c
Modified: branches/sm/ChangeLog.sm
===================================================================
--- branches/sm/ChangeLog.sm 2010-05-31 09:23:33 UTC (rev 4969)
+++ branches/sm/ChangeLog.sm 2010-05-31 09:23:56 UTC (rev 4970)
@@ -1,3 +1,10 @@
+2010-05-30 Eugene Arshinov <earshinov(at)gmail(dot)com>
+
+ * src/main.c:
+ Fix a bug: files specified in command line did not open together
+ with default session if the session "referenced" a project.
+
+
2010-02-23 Eugene Arshinov <earshinov(at)gmail(dot)com>
* src/main.c:
Modified: branches/sm/src/main.c
===================================================================
--- branches/sm/src/main.c 2010-05-31 09:23:33 UTC (rev 4969)
+++ branches/sm/src/main.c 2010-05-31 09:23:56 UTC (rev 4970)
@@ -826,12 +826,10 @@
/* open files from command line */
-static gboolean open_cl_files(gint argc, gchar **argv)
+static void open_cl_files(gint argc, gchar **argv)
{
gint i;
- if (argc <= 1) return FALSE;
-
for (i = 1; i < argc; i++)
{
gchar *filename = main_get_argv_filename(argv[i]);
@@ -849,7 +847,6 @@
}
g_free(filename);
}
- return TRUE;
}
@@ -927,11 +924,10 @@
load_session = TRUE;
}
- any_files_opened = open_cl_files(argc, argv);
- if (any_files_opened && !prefs.load_session_even_if_any_files_opened)
+ if (!cl_options.load_session)
load_default_session = FALSE;
- if (!cl_options.load_session)
+ if (argc > 1 && !prefs.load_session_even_if_any_files_opened)
load_default_session = FALSE;
if (load_default_session)
@@ -945,12 +941,14 @@
{
/* load files into tabs, as they are found in the session_files variable */
configuration_open_files();
+ }
- if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.notebook)) == 0)
- {
- ui_update_popup_copy_items(NULL);
- ui_update_popup_reundo_items(NULL);
- }
+ open_cl_files(argc, argv);
+
+ if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.notebook)) == 0)
+ {
+ ui_update_popup_copy_items(NULL);
+ ui_update_popup_reundo_items(NULL);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list