[Gpredict-svn] SF.net SVN: gpredict:[372] trunk/src/gtk-sat-module-popup.c
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
|
From: <cs...@us...> - 2009-08-06 13:55:29
|
Revision: 372
http://gpredict.svn.sourceforge.net/gpredict/?rev=372&view=rev
Author: csete
Date: 2009-08-06 13:38:16 +0000 (Thu, 06 Aug 2009)
Log Message:
-----------
Migrated to new user configuration.
Modified Paths:
--------------
trunk/src/gtk-sat-module-popup.c
Modified: trunk/src/gtk-sat-module-popup.c
===================================================================
--- trunk/src/gtk-sat-module-popup.c 2009-08-06 13:29:37 UTC (rev 371)
+++ trunk/src/gtk-sat-module-popup.c 2009-08-06 13:38:16 UTC (rev 372)
@@ -360,15 +360,12 @@
gtk_entry_get_text (GTK_ENTRY (entry)));
/* build full file names */
- source = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S,
- ".gpredict2", G_DIR_SEPARATOR_S,
- "modules", G_DIR_SEPARATOR_S,
- module->name, ".mod", NULL);
- target = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S,
- ".gpredict2", G_DIR_SEPARATOR_S,
- "modules", G_DIR_SEPARATOR_S,
- gtk_entry_get_text (GTK_ENTRY (entry)),
- ".mod", NULL);
+ gchar *moddir = get_modules_dir ();
+ source = g_strconcat (moddir, G_DIR_SEPARATOR_S,
+ module->name, ".mod", NULL);
+ target = g_strconcat (moddir, G_DIR_SEPARATOR_S,
+ gtk_entry_get_text (GTK_ENTRY (entry)), ".mod", NULL);
+ g_free (moddir);
/* copy file */
if (gpredict_file_copy (source, target)) {
@@ -377,9 +374,9 @@
__FILE__, __LINE__, module->name);
}
else {
- sat_log_log (SAT_LOG_LEVEL_MSG,
- _("%s:%d: Successfully cloned %s."),
- __FILE__, __LINE__, module->name);
+ sat_log_log (SAT_LOG_LEVEL_MSG,
+ _("%s:%d: Successfully cloned %s."),
+ __FILE__, __LINE__, module->name);
/* open module if requested */
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle))) {
@@ -1046,14 +1043,13 @@
{
gchar *file;
GtkWidget *dialog;
- //GtkWidget *parent = gtk_widget_get_toplevel (GTK_WIDGET (data));
+ gchar *moddir;
+ moddir = get_modules_dir ();
+ file = g_strconcat (moddir, G_DIR_SEPARATOR_S,
+ GTK_SAT_MODULE (data)->name, ".mod", NULL);
+ g_free (moddir);
- file = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S,
- ".gpredict2", G_DIR_SEPARATOR_S,
- "modules", G_DIR_SEPARATOR_S,
- GTK_SAT_MODULE (data)->name, ".mod", NULL);
-
gtk_sat_module_close_cb (menuitem, data);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|