Diff of /trunk/src/settings.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 121 by harbaum, Thu Jul 30 08:29:52 2009 UTC revision 122 by harbaum, Mon Sep 21 13:15:25 2009 UTC
# Line 71  static void location_select(location_con Line 71  static void location_select(location_con
71      gtk_widget_set_sensitive(context->but_remove,  FALSE);      gtk_widget_set_sensitive(context->but_remove,  FALSE);
72  }  }
73    
74  #ifdef USE_MAEMO  #ifdef ENABLE_MAEMO_MAPPER
75  #include "dbus.h"  #include "dbus.h"
76    
77  typedef struct {  typedef struct {
# Line 140  static void on_location_edit(GtkWidget * Line 140  static void on_location_edit(GtkWidget *
140    } else    } else
141      printf("location edit for Home\n");      printf("location edit for Home\n");
142    
143  #ifdef USE_MAEMO  #ifdef ENABLE_MAEMO_MAPPER
144    mm_context_t mm_context;    mm_context_t mm_context;
145  #else  #else
146    GtkWidget *lat, *lon;    GtkWidget *lat, *lon;
# Line 167  static void on_location_edit(GtkWidget * Line 167  static void on_location_edit(GtkWidget *
167    gtk_table_attach_defaults(GTK_TABLE(table),    gtk_table_attach_defaults(GTK_TABLE(table),
168                     label = gtk_label_new(_("Latitude:")), 0, 1, 1, 2);                     label = gtk_label_new(_("Latitude:")), 0, 1, 1, 2);
169    gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);    gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
170  #ifdef USE_MAEMO  #ifdef ENABLE_MAEMO_MAPPER
171    gtk_table_attach_defaults(GTK_TABLE(table),    gtk_table_attach_defaults(GTK_TABLE(table),
172                      mm_context.lat = lat_entry_new(pos.lat), 1, 2, 1, 2);                      mm_context.lat = lat_entry_new(pos.lat), 1, 2, 1, 2);
173    g_signal_connect(G_OBJECT(mm_context.lat), "changed",    g_signal_connect(G_OBJECT(mm_context.lat), "changed",
# Line 181  static void on_location_edit(GtkWidget * Line 181  static void on_location_edit(GtkWidget *
181    gtk_table_attach_defaults(GTK_TABLE(table),    gtk_table_attach_defaults(GTK_TABLE(table),
182                      label = gtk_label_new(_("Longitude:")), 0, 1, 2, 3);                      label = gtk_label_new(_("Longitude:")), 0, 1, 2, 3);
183    gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);    gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
184  #ifdef USE_MAEMO  #ifdef ENABLE_MAEMO_MAPPER
185    gtk_table_attach_defaults(GTK_TABLE(table),    gtk_table_attach_defaults(GTK_TABLE(table),
186                     mm_context.lon = lon_entry_new(pos.lon), 1, 2, 2, 3);                     mm_context.lon = lon_entry_new(pos.lon), 1, 2, 2, 3);
187    g_signal_connect(G_OBJECT(mm_context.lon), "changed",    g_signal_connect(G_OBJECT(mm_context.lon), "changed",
# Line 198  static void on_location_edit(GtkWidget * Line 198  static void on_location_edit(GtkWidget *
198      gtk_widget_set_sensitive(GTK_WIDGET(name), FALSE);      gtk_widget_set_sensitive(GTK_WIDGET(name), FALSE);
199    }    }
200    
201  #ifdef USE_MAEMO  #ifdef ENABLE_MAEMO_MAPPER
202    mm_context.appdata = context->appdata;    mm_context.appdata = context->appdata;
203    if(loc) mm_context.pos = loc->pos;    if(loc) mm_context.pos = loc->pos;
204    else    mm_context.pos = context->appdata->home;    else    mm_context.pos = context->appdata->home;
# Line 230  static void on_location_edit(GtkWidget * Line 230  static void on_location_edit(GtkWidget *
230    if(GTK_RESPONSE_ACCEPT == gtk_dialog_run(GTK_DIALOG(dialog))) {    if(GTK_RESPONSE_ACCEPT == gtk_dialog_run(GTK_DIALOG(dialog))) {
231      pos_t pos;      pos_t pos;
232    
233  #ifdef USE_MAEMO  #ifdef ENABLE_MAEMO_MAPPER
234      pos.lat = lat_get(mm_context.lat);      pos.lat = lat_get(mm_context.lat);
235      pos.lon = lon_get(mm_context.lon);      pos.lon = lon_get(mm_context.lon);
236  #else  #else

Legend:
Removed from v.121  
changed lines
  Added in v.122