]> err.no Git - mapper/commitdiff
Cleanups to track point filter dialog.
authorKaj-Michael Lang <milang@onion.tal.org>
Thu, 21 Feb 2008 10:55:04 +0000 (12:55 +0200)
committerKaj-Michael Lang <milang@onion.tal.org>
Thu, 21 Feb 2008 10:55:04 +0000 (12:55 +0200)
src/cb.c
src/filter-gui.c
src/filter-gui.h [new file with mode: 0644]

index 89819fab5438594e473f4748fb0c2827746b0314..955e1ea285798af5135a660caeeee478fe210b82 100644 (file)
--- a/src/cb.c
+++ b/src/cb.c
@@ -60,6 +60,7 @@
 #include "gps-conn.h"
 #include "search.h"
 #include "dialogs.h"
+#include "filter-gui.h"
 #include "help.h"
 
 static void
@@ -187,7 +188,7 @@ return TRUE;
 gboolean 
 menu_cb_track_filter(GtkAction * action)
 {
-filter_dialog();
+filter_dialog(_window);
 return TRUE;
 }
 
index 251d02dee2d4d79beefd2397a497b79b3c0ce349..e1874e4f578a5e91c24654312c4f8bcab85637a0 100644 (file)
 #include "ui-common.h"
 #include "settings.h"
 #include "filter.h"
-#include "hildon-wrappers.h"
+#include "filter-gui.h"
+#include "config-gconf.h"
 
+gboolean
+filter_dialog(GtkWidget *window)
+{
 GtkWidget *dialog;
-GtkWidget *swindow;
 GtkWidget *table;
 GtkWidget *notebook;
 GtkWidget *label;
@@ -56,20 +59,14 @@ GtkWidget *num_vdop;
 GtkWidget *num_osm_dist;
 GtkWidget *num_maxdrop;
 
-gboolean
-filter_dialog(void)
-{
 dialog = gtk_dialog_new_with_buttons(_("Track Filter"),
-                               GTK_WINDOW(_window),
+                               GTK_WINDOW(window),
                                GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, 
-                               GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
-                               NULL);
+                               GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL);
 
-gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
-                  notebook = gtk_notebook_new(), TRUE, TRUE, 0);
+gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), notebook = gtk_notebook_new(), TRUE, TRUE, 0);
 
-gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
-                table = gtk_table_new(2,4,FALSE), label = gtk_label_new(_("GPS")));
+gtk_notebook_append_page(GTK_NOTEBOOK(notebook), table = gtk_table_new(2,4,FALSE), label = gtk_label_new(_("GPS")));
 
 gtk_table_attach(GTK_TABLE(table), chk_gps_filter = gtk_check_button_new_with_label(_("Enable track filter")),
                 0, 2, 0, 1, GTK_EXPAND | GTK_FILL, 0, 2, 4);
diff --git a/src/filter-gui.h b/src/filter-gui.h
new file mode 100644 (file)
index 0000000..641dad0
--- /dev/null
@@ -0,0 +1,12 @@
+#include "config.h"
+#include <glib.h>
+
+#ifndef _FILTER_GUI_H
+#define _FILTER_GUI_H
+
+#include "gpsdata.h"
+#include "filter.h"
+
+gboolean filter_dialog(GtkWidget *window);
+
+#endif