Branch: refs/heads/1.23
Author: unknown <enrico.troeger(a)uvena.de>
Committer: unknown <enrico.troeger(a)uvena.de>
Date: Sat, 18 May 2013 13:45:18 UTC
Commit: eea7ffbff0c5bf14a9662483d989c4213f1392f7
https://github.com/geany/geany/commit/eea7ffbff0c5bf14a9662483d989c4213f139…
Log Message:
-----------
Fix #3613096 by remembering the directory Geany was started from
This is one for more workaround for the current directory handling
on Windows: we now remember the directory from which Geany was started
to use this to resolve relative paths used to load files from
the command line.
Modified Paths:
--------------
src/main.c
Modified: src/main.c
10 files changed, 9 insertions(+), 1 deletions(-)
===================================================================
@@ -91,6 +91,7 @@
GeanyStatus main_status;
CommandLineOptions cl_options; /* fields initialised in parse_command_line_options */
+static gchar *original_cwd = NULL;
static const gchar geany_lib_versions[] = "GTK %u.%u.%u, GLib %u.%u.%u";
@@ -310,7 +311,11 @@ gchar *main_get_argv_filename(const gchar *filename)
else
{
/* use current dir */
- gchar *cur_dir = g_get_current_dir();
+ gchar *cur_dir = NULL;
+ if (original_cwd == NULL)
+ cur_dir = g_get_current_dir();
+ else
+ cur_dir = g_strdup(original_cwd);
result = g_strjoin(
G_DIR_SEPARATOR_S, cur_dir, filename, NULL);
@@ -379,6 +384,8 @@ static void get_line_and_column_from_filename(gchar *filename, gint *line, gint
#ifdef G_OS_WIN32
static void change_working_directory_on_windows(const gchar *install_dir)
{
+ /* remember original working directory for use with opening files from the command line */
+ original_cwd = g_get_current_dir();
/* On Windows, change the working directory to the Geany installation path to not lock
* the directory of a file passed as command line argument (see bug #2626124).
* This also helps if plugins or other code uses relative paths to load
@@ -1309,6 +1316,7 @@ void main_quit()
g_object_unref(geany_object);
geany_object = NULL;
+ g_free(original_cwd);
g_free(app);
ui_finalize_builder();
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Frank Lanitz <flanitz(a)bgc-jena.mpg.de>
Committer: Frank Lanitz <flanitz(a)bgc-jena.mpg.de>
Date: Fri, 17 May 2013 08:25:13 UTC
Commit: 9ebc082cfc239df5a2b44456a43fdd0663dec692
https://github.com/geany/geany/commit/9ebc082cfc239df5a2b44456a43fdd0663dec…
Log Message:
-----------
Adding owner and serial to list of keywords for SQL
Modified Paths:
--------------
data/filetypes.sql
Modified: data/filetypes.sql
2 files changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -22,7 +22,7 @@ quotedidentifier=identifier_2
[keywords]
# all items must be in one line
-keywords=absolute action add admin after aggregate alias all allocate alter and any are array as asc assertion at authorization auto_increment before begin bfile bigint binary bit blob bool boolean both breadth by call cascade cascaded case cast catalog char charset character check class clob close cluster collate collation column commit completion connect connection constraint constraints constructor continue corresponding create cross cube current current_date current_path current_role current_time current_timestamp current_user cursor cycle data date day deallocate dec decimal declare default deferrable deferred delete depth deref desc describe descriptor destroy destructor deterministic diagnostics dictionary dimension disconnect diskgroup distinct domain double drop dynamic each else elsif end end-exec engine equals escape every except exception exec execute exists explain external false fetch first fixed flashback float for foreign found from free full function general get global go goto grant group grouping having host hour identity if ignore immediate in index indextype indicator initialize initially inner inout input insert int integer intersect interval into is isolation iterate join key language large last lateral leading left less level like limit local localtime localtimestamp locator long map match materialized mediumblob mediumint mediumtext merge middleint minus minute modifies modify module month names national natural nchar nclob new next no noaudit none not null numeric nvarchar2 object of off old on only open operation option or order ordinality out outer output package pad parameter parameters partial path postfix precision prefix preorder prepare preserve primary prior privileges procedure profile public purge raise read reads real recursive ref references referencing regexp regexp_like relative rename restrict result return returning returns revoke right role rollback rollup routine row rows savepoint schema scroll scope search second section select sequence session session_user set sets size smallint some space specific specifictype sql sqlexception sqlstate sqlwarning start state statement static structure synonym system_user table tablespace temporary terminate text than then time timestamp timezone_hour timezone_minute tinyint to trailing transaction translation treat trigger true truncate type under union unique unknown unnest unsigned update usage user using value values varchar varchar2 variable varying view when whenever where with without work write year zone
+keywords=absolute action add admin after aggregate alias all allocate alter and any are array as asc assertion at authorization auto_increment before begin bfile bigint binary bit blob bool boolean both breadth by call cascade cascaded case cast catalog char charset character check class clob close cluster collate collation column commit completion connect connection constraint constraints constructor continue corresponding create cross cube current current_date current_path current_role current_time current_timestamp current_user cursor cycle data date day deallocate dec decimal declare default deferrable deferred delete depth deref desc describe descriptor destroy destructor deterministic diagnostics dictionary dimension disconnect diskgroup distinct domain double drop dynamic each else elsif end end-exec engine equals escape every except exception exec execute exists explain external false fetch first fixed flashback float for foreign found from free full function general get global go goto grant group grouping having host hour identity if ignore immediate in index indextype indicator initialize initially inner inout input insert int integer intersect interval into is isolation iterate join key language large last lateral leading left less level like limit local localtime localtimestamp locator long map match materialized mediumblob mediumint mediumtext merge middleint minus minute modifies modify module month names national natural nchar nclob new next no noaudit none not null numeric nvarchar2 object of off old on only open operation option or order ordinality out outer output owner package pad parameter parameters partial path postfix precision prefix preorder prepare preserve primary prior privileges procedure profile public purge raise read reads real recursive ref references referencing regexp regexp_like relative rename restrict result return returning returns revoke right role rollback rollup routine row rows savepoint schema scroll scope search second section select sequence session session_user serial set sets size smallint some space specific specifictype sql sqlexception sqlstate sqlwarning start state statement static structure synonym system_user table tablespace temporary terminate text than then time timestamp timezone_hour timezone_minute tinyint to trailing transaction translation treat trigger true truncate type under union unique unknown unnest unsigned update usage user using value values varchar varchar2 variable varying view when whenever where with without work write year zone
[settings]
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: elextr <elextr(a)gmail.com>
Committer: elextr <elextr(a)gmail.com>
Date: Wed, 15 May 2013 04:10:22 UTC
Commit: c2d2fddca3854efd7ab6711a25f451a2b5cc596d
https://github.com/geany/geany/commit/c2d2fddca3854efd7ab6711a25f451a2b5cc5…
Log Message:
-----------
Return a non-printing sequence for no context separators
Function symbols_get_context_separator() returns the symbol
separator for the language, but some languages do not have
symbol context separators, for example markup languages like
Asciidoc. To prevent the symbols pane wrongly detecting and
acting on a valid character sequence as a separator, return a
non-printing character which should not occur.
Options "" and NULL not used as they break some code and would
need an ABI bump.
Other languages can be added as they are identified.
Modified Paths:
--------------
src/symbols.c
Modified: src/symbols.c
7 files changed, 7 insertions(+), 0 deletions(-)
===================================================================
@@ -285,6 +285,9 @@ GString *symbols_find_tags_as_string(GPtrArray *tags_array, guint tag_types, gin
* type.
* @param ft_id File type identifier.
* @return The context separator string.
+ *
+ * Returns non-printing sequence "\x03" ie ETX (end of text) for filetypes
+ * without a context separator.
*
* @since 0.19
*/
@@ -303,6 +306,10 @@ const gchar *symbols_get_context_separator(gint ft_id)
case GEANY_FILETYPES_REST:
return ":::";
+ /* no context separator */
+ case GEANY_FILETYPES_ASCIIDOC:
+ return "\x03";
+
default:
return ".";
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger(a)uvena.de>
Committer: Enrico Tröger <enrico.troeger(a)uvena.de>
Date: Tue, 14 May 2013 22:37:42 UTC
Commit: 70c565da9850db4682dd0c1f915af49574c92774
https://github.com/geany/www.geany.org/commit/70c565da9850db4682dd0c1f915af…
Log Message:
-----------
Fix some typos
Modified Paths:
--------------
README.dev.md
Modified: README.dev.md
6 files changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -149,7 +149,7 @@ Now, finally, it's time to start your development server:
This will start a simple HTTP server on *localhost* port 8000.
You can open the resulting site in your browser by pointing it
-to *http://localhost:8000*.
+to http://localhost:8000 .
Basically now you are done and you can start improving the website.
A little detail you might notice: once you change any .py file
@@ -168,8 +168,8 @@ a special DNS record on the geany.org zone: ***.local.geany.org**.
This record and all subdomains will resolve to *127.0.0.1* (aka *localhost*).
-In your browser you can use http://pastebin.local.geany.org/ and
-http://nightly.local.geany.org/ to use this subsites with your
+In your browser you can use http://pastebin.local.geany.org:8000/ and
+http://nightly.local.geany.org:8000/ to use these subsites with your
local development server.
All other domains not recognized as a known subsite will fallback to
the main website.
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger(a)uvena.de>
Committer: Enrico Tröger <enrico.troeger(a)uvena.de>
Date: Tue, 14 May 2013 22:31:54 UTC
Commit: 258ea630e61328bb8cf950d5423b1bc33ed883a3
https://github.com/geany/www.geany.org/commit/258ea630e61328bb8cf950d5423b1…
Log Message:
-----------
Use aware datetime objects
Modified Paths:
--------------
pastebin/api/create.py
Modified: pastebin/api/create.py
9 files changed, 5 insertions(+), 4 deletions(-)
===================================================================
@@ -3,16 +3,17 @@
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
-#
+#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from datetime import datetime, timedelta
+from datetime import timedelta
+from django.utils.timezone import now
from pastebin.forms import SnippetForm
from pastebin.highlight import LEXER_LIST_ALL, LEXER_DEFAULT
from pastebin.models import Snippet
@@ -131,7 +132,7 @@ def _preprocess_data(self):
def _create_snippet(self):
cleaned_data = self._snippet_form.cleaned_data
expire_options = int(cleaned_data.get('expire_options', 3600))
- expires = datetime.now() + timedelta(seconds=expire_options)
+ expires = now() + timedelta(seconds=expire_options)
self._snippet = Snippet.objects.create(
content=cleaned_data['content'],
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger(a)uvena.de>
Committer: Enrico Tröger <enrico.troeger(a)uvena.de>
Date: Tue, 14 May 2013 22:25:19 UTC
Commit: 56a91ea400068767ed1003173c6b5801f9d1c026
https://github.com/geany/www.geany.org/commit/56a91ea400068767ed1003173c6b5…
Log Message:
-----------
Fix using the correct Site object for the response URL
Modified Paths:
--------------
pastebin/views.py
Modified: pastebin/views.py
16 files changed, 12 insertions(+), 4 deletions(-)
===================================================================
@@ -3,12 +3,12 @@
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
-#
+#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -234,6 +234,14 @@ def guess_lexer(request):
#----------------------------------------------------------------------
+def _get_site(request):
+ if hasattr(request, 'site'):
+ return request.site
+ else:
+ return Site.objects.get_current()
+
+
+#----------------------------------------------------------------------
@require_POST
@csrf_exempt
def api_create(request):
@@ -246,7 +254,7 @@ def api_create(request):
except SnippetValidationError, e:
return HttpResponseBadRequest(unicode(e), content_type=u'text/plain')
- site = Site.objects.get_current()
+ site = _get_site(request)
absolute_url = snippet.get_absolute_url()
- result = u'http://%s%s' % (site.domain, absolute_url)
+ result = u'http://%s%s/' % (site.domain, absolute_url)
return HttpResponse(result, content_type=u'text/plain')
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger(a)uvena.de>
Committer: Enrico Tröger <enrico.troeger(a)uvena.de>
Date: Tue, 14 May 2013 22:20:07 UTC
Commit: ae6b36443dd5d8cc7e3963416a7bd49798c0cd55
https://github.com/geany/www.geany.org/commit/ae6b36443dd5d8cc7e3963416a7bd…
Log Message:
-----------
Add first version of development environment howto
To be continued, made with Geany and the great Markdown plugin.
Modified Paths:
--------------
README.dev.md
Modified: README.dev.md
184 files changed, 184 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,184 @@
+www.geany.org - Dev Environment
+===============================
+
+About
+-----
+This document describes the process of setting up a development environment to
+get a local instance of this website running.
+
+The website is implemented as a Django (https://www.djangoproject.com/) project
+and uses Mezzanine (http://mezzanine.jupo.org/) for content management.
+
+As Django is based on Python, first of all you need Python and a couple of
+extra packages installed on your system.
+
+For now, the code is tested against Python2 only.
+
+
+Prepare your system
+-------------------
+
+To ease package handling and to get a clean environment, we use
+virtualenv. Into the virtualenv we will install Django, Mezzanine and a couple of
+other helper packages.
+
+To be able to use virtualenv, you first need to install it as well as some
+development libraries for the MySQL and Memcache client libraries.
+The most easy way is to use the package manager of your distribution.
+On the Debian like systems the following command should install the necessary
+packages:
+
+ apt-get install python-virtualenv python-pip libmysqlclient-dev libmemcached-dev
+
+
+Get the code
+------------
+
+Perform a usual clone of the www.geany.org repository from Github:
+
+ git clone git://github.com/geany/www.geany.org
+
+
+Setting up a virtualenv
+-----------------------
+
+Change into the freshly cloned repository directory and execute the following commands
+to create a new virtualenv and install required Python packages:
+
+ export PIP_REQUIRE_VIRTUALENV=true
+ export VIRTUALENV_USE_DISTRIBUTE=true
+ export VIRTUALENV_NO_SITE_PACKAGES=true
+
+ virtualenv --distribute --no-site-packages venv
+ # activate virtual environment
+ source venv/bin/activate
+ # upgrade some packages, just to be safe
+ pip install --upgrade pip distribute
+ # very helpful tool to manage packages in addition to pip
+ pip install yolk
+ # install our requirements
+ pip install -r requirements.txt
+
+This will setup a new virtualenv, upgrade the Python package manager
+pip and install required packages for the website.
+
+
+Create a local config
+---------------------
+
+Use a text editor of choice (we all know what this would be...) and create a new file
+*local_settings.py* in *www.geany.org/geany/* (next to the existing *settings.py*).
+
+Django will first read *settings.py* and then overwrite all settings found in
+*local_settings.py*. This way you can adjust the installation to your needs.
+Also, some sensitive settings like the database connection are not properly
+configured in *settings.py* on purpose, so you **must** configure them
+locally.
+
+You can use the following sample *local_settings.py* as a start and then adjust
+the settings to your needs:
+
+ DEBUG = True
+
+ DATABASES = {
+ "default": {
+ "ENGINE": "django.db.backends.mysql",
+ "NAME": "dbname",
+ "USER": "dbuser",
+ "PASSWORD": "supersecret",
+ "HOST": "127.0.0.1",
+ },
+ 'nightlybuilds': {
+ 'ENGINE': 'django.db.backends.mysql',
+ 'NAME': 'dbname2',
+ "USER": "dbuser",
+ "PASSWORD": "supersecret",
+ "HOST": "127.0.0.1",
+ }
+ }
+
+ # some random characters, should be unique per site, e.g. use str(uuid.uuid4())
+ SECRET_KEY = "12345"
+
+ CACHES = {
+ 'default': {
+ 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
+ }
+ }
+
+ NIGHTLYBUILDS_BASE_DIR = '/path/to/nightlybuilds/or/just/empty/'
+
+
+### Database settings ###
+
+The above example configures a MySQL database connection.
+For local development you can also use Sqlite which is simpler
+to setup but harder to work with when you need to manipulate the
+data directly.
+Your choice.
+Whatever database you use, ask Enrico to get a dump of a demo database
+to get something to work with. This dump can be easily imported into
+a configured database with the following command:
+
+ python manage.py loaddata geany_dump.fixture
+
+
+Start the development server
+----------------------------
+
+After you setup everything as described above, you are almost ready
+to start the development server to actually do something.
+
+Before, just one further step is required: activate your virtual environment.
+Execute the following command in the directory *www.geany.org*:
+
+ source venv/bin/activate
+
+This will activate the previously created virtualenv and mangles
+your Python environment so that the interpreter and related packages
+in the *venv* sub directory are used instead of the gloablly installed
+ones.
+On some shells, you will see a `(venv)` prefix in the prompt indicating
+a virtualenv is activated.
+If you later want to clean up your shell and leave that virtualenv, just
+type `deactivate` in your shell.
+
+Now, finally, it's time to start your development server:
+
+ python manage.py runserver
+
+This will start a simple HTTP server on *localhost* port 8000.
+You can open the resulting site in your browser by pointing it
+to *http://localhost:8000*.
+
+Basically now you are done and you can start improving the website.
+A little detail you might notice: once you change any .py file
+which is knwon by Django, the development server will restart automatically
+to reload the changed file(s). This is very helpful.
+
+To stop the server, simply interrupt it with *Ctrl-C*.
+
+
+Special hostnames / DNS
+-----------------------
+
+Since this website project not only contains www.geany.org but also
+some related subsites (pastebin.geany.org, nightly.geany.org) there is
+a special DNS record on the geany.org zone: ***.local.geany.org**.
+
+This record and all subdomains will resolve to *127.0.0.1* (aka *localhost*).
+
+In your browser you can use http://pastebin.local.geany.org/ and
+http://nightly.local.geany.org/ to use this subsites with your
+local development server.
+All other domains not recognized as a known subsite will fallback to
+the main website.
+
+
+Useful shell aliases
+--------------------
+
+No magic, just save some typing:
+
+ alias vac='source venv/bin/activate'
+ alias runserver='python manage.py runserver'
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).