From 8bc10b4d1b62d9069b838ee6448168652815be96 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Thu, 21 Feb 2008 12:55:04 +0200 Subject: [PATCH] Cleanups to track point filter dialog. --- src/cb.c | 3 ++- src/filter-gui.c | 21 +++++++++------------ src/filter-gui.h | 12 ++++++++++++ 3 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 src/filter-gui.h diff --git a/src/cb.c b/src/cb.c index 89819fa..955e1ea 100644 --- 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; } diff --git a/src/filter-gui.c b/src/filter-gui.c index 251d02d..e1874e4 100644 --- a/src/filter-gui.c +++ b/src/filter-gui.c @@ -41,10 +41,13 @@ #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 index 0000000..641dad0 --- /dev/null +++ b/src/filter-gui.h @@ -0,0 +1,12 @@ +#include "config.h" +#include + +#ifndef _FILTER_GUI_H +#define _FILTER_GUI_H + +#include "gpsdata.h" +#include "filter.h" + +gboolean filter_dialog(GtkWidget *window); + +#endif -- 2.39.5