[gnome-pilot] Convert druid to GtkAssistant. Still work to do converting applet to GtkBuilder.
- From: Matthew Charles Davey <mcdavey src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-pilot] Convert druid to GtkAssistant. Still work to do converting applet to GtkBuilder.
- Date: Thu, 22 Oct 2009 01:41:47 +0000 (UTC)
commit b2f92b60932353603c3d5287f75cd106f2ded1ad
Author: Matt Davey <mcdavey mrao cam ac uk>
Date: Thu Sep 17 09:19:31 2009 +0100
Convert druid to GtkAssistant. Still work to do converting applet to GtkBuilder.
capplet/Makefile.am | 14 +-
...gnome-pilot-druid.c => gnome-pilot-assistant.c} | 543 +++--
...gnome-pilot-druid.h => gnome-pilot-assistant.h} | 36 +-
capplet/gnome-pilot-capplet.c | 24 +-
capplet/gnome-pilot-cdialog.c | 26 +-
capplet/gnome-pilot-ddialog.c | 30 +-
capplet/gnome-pilot-pdialog.c | 29 +-
capplet/gpilotd-capplet.glade | 3120 --------------------
capplet/gpilotd-capplet.ui | 2038 +++++++++++++
capplet/gpilotd-control-applet.c | 36 +-
capplet/util.c | 102 +-
capplet/util.h | 7 +-
configure.in | 2 -
13 files changed, 2522 insertions(+), 3485 deletions(-)
---
diff --git a/capplet/Makefile.am b/capplet/Makefile.am
index 18d3576..4637d6e 100644
--- a/capplet/Makefile.am
+++ b/capplet/Makefile.am
@@ -8,7 +8,7 @@ INCLUDES = \
$(GNOME_PILOT_CFLAGS) \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DGNOMEPIXMAPSDIR=\""$(datadir)/pixmaps"\" \
- -DGLADEDATADIR=\""$(gladedir)"\" \
+ -DUIDATADIR=\""$(uidir)"\" \
$(NULL)
gpilotd_control_applet_SOURCES = \
@@ -21,8 +21,8 @@ gpilotd_control_applet_SOURCES = \
gnome-pilot-ddialog.h \
gnome-pilot-cdialog.c \
gnome-pilot-cdialog.h \
- gnome-pilot-druid.c \
- gnome-pilot-druid.h \
+ gnome-pilot-assistant.c \
+ gnome-pilot-assistant.h \
util.c \
util.h \
pilot.c \
@@ -50,9 +50,9 @@ desktop_DATA = $(desktop_in_in_file:.desktop.in.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
-gladedir = $(datadir)/gnome-pilot/glade
-glade_DATA = \
- gpilotd-capplet.glade \
+uidir = $(datadir)/gnome-pilot/ui
+ui_DATA = \
+ gpilotd-capplet.ui \
gnome-pilot-watermark.png \
gnome-palm.png \
$(NULL)
@@ -67,7 +67,7 @@ appicon_DATA = \
EXTRA_DIST = \
$(desktop_in_in_file) \
$(appicon_DATA) \
- $(glade_DATA) \
+ $(ui_DATA) \
$(NULL)
BUILT_SOURCES = $(desktop_DATA)
diff --git a/capplet/gnome-pilot-druid.c b/capplet/gnome-pilot-assistant.c
similarity index 56%
rename from capplet/gnome-pilot-druid.c
rename to capplet/gnome-pilot-assistant.c
index 826cfc9..54c3fb8 100644
--- a/capplet/gnome-pilot-druid.c
+++ b/capplet/gnome-pilot-assistant.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* gnome-pilot-druid.c
+/* gnome-pilot-assistant.c
*
* Copyright (C) 1998 Red Hat Software
* Copyright (C) 1999-2000 Free Software Foundation
@@ -31,19 +31,24 @@
#include <config.h>
#endif
-#include <glade/glade.h>
#include <libgnomeui/gnome-uidefs.h>
-#include <libgnomeui/gnome-druid.h>
#include "pilot.h"
#include "util.h"
-#include "gnome-pilot-druid.h"
+#include "gnome-pilot-assistant.h"
+#define GPD_PAGE_WELCOME 0
+#define GPD_PAGE_CRADLE 1
+#define GPD_PAGE_ERROR 2
+#define GPD_PAGE_PILOT_ONE 3
+#define GPD_PAGE_SYNC 4
+#define GPD_PAGE_PILOT_TWO 5
+#define GPD_PAGE_FINISH 6
static GtkObjectClass *parent_class = NULL;
-struct _GnomePilotDruidPrivate
+struct _GnomePilotAssistantPrivate
{
- GladeXML *xml;
+ GtkBuilder *ui;
GnomePilotClient *gpc;
gint handle1;
@@ -51,20 +56,20 @@ struct _GnomePilotDruidPrivate
gboolean finished;
gboolean started;
+ gchar *errstr;
PilotState *state;
PilotState *orig_state;
GPilotDevice *device;
GPilotPilot *pilot;
- GtkWidget *druid_window;
- GtkWidget *druid;
+ GtkWidget *assistant;
GtkWidget *page_cradle;
+ GtkWidget *page_error;
GtkWidget *page_pilot_one;
GtkWidget *page_sync;
GtkWidget *page_pilot_two;
- GtkWidget *page_conduits;
GtkWidget *page_finish;
GtkWidget *device_name;
@@ -78,10 +83,6 @@ struct _GnomePilotDruidPrivate
GtkWidget *device_irda;
GtkWidget *device_network;
GtkWidget *device_bluetooth;
-#ifdef PILOT_LINK_0_12
- GtkWidget *libusb_label;
- GList *libusb_list;
-#endif
GtkWidget *pilot_info;
GtkWidget *pilot_info_no;
@@ -100,30 +101,32 @@ struct _GnomePilotDruidPrivate
GtkWidget *pilot_charset_combo;
};
-static void class_init (GnomePilotDruidClass *klass);
-static void init (GnomePilotDruid *gpd);
+static void class_init (GnomePilotAssistantClass *klass);
+static void init (GnomePilotAssistant *gpd);
-static gboolean get_widgets (GnomePilotDruid *gpd);
-static void map_widgets (GnomePilotDruid *gpd);
-static void init_widgets (GnomePilotDruid *gpd);
-static void fill_widgets (GnomePilotDruid *gpd);
-static void set_widget_visibility_by_type(GnomePilotDruid *gpd, int type);
+static gboolean get_widgets (GnomePilotAssistant *gpd);
+static void map_widgets (GnomePilotAssistant *gpd);
+static void init_widgets (GnomePilotAssistant *gpd);
+static void fill_widgets (GnomePilotAssistant *gpd);
+static void set_widget_visibility_by_type(GnomePilotAssistant *gpd, int type);
static void network_device_toggled_callback (GtkRadioButton *btn,
void *data);
static gboolean gpd_delete_window (GtkWidget *widget,GdkEvent *event,gpointer user_data);
-static void gpd_canceled (GnomeDruid *druid, gpointer user_data);
-static void gpd_help (GnomeDruid *druid, gpointer user_data);
+static void gpd_canceled (GtkAssistant *assistant, gpointer user_data);
+
+static gint gpd_forward_page(gint current_page, gpointer user_data);
+static void gpd_page_prepare (GtkAssistant *assistant, GtkWidget *page, gpointer user_data);
+static gboolean gpd_cancel_sync (GnomePilotAssistant *gpd);
+static void gpd_finish_page_finished (GtkAssistant *assistant, gpointer user_data);
-static void gpd_cradle_page_prepare (GnomeDruidPage *page, gpointer arg1, gpointer user_data);
-static gboolean gpd_cradle_page_next (GnomeDruidPage *page, gpointer arg1, gpointer user_data);
+static gboolean gpd_cradle_page_next (GnomePilotAssistant *gpd);
-static void gpd_sync_page_prepare (GnomeDruidPage *page, gpointer arg1, gpointer user_data);
-static gboolean gpd_sync_page_back (GnomeDruidPage *druidpage, gpointer arg1, gpointer user_data);
-static gboolean gpd_pilot_page_two_next (GnomeDruidPage *druidpage, gpointer arg1, gpointer user_data);
-static void gpd_finish_page_finished (GnomeDruidPage *druidpage, gpointer arg1, gpointer user_data);
+static void gpd_sync_page_prepare (GnomePilotAssistant *gpd);
+static gboolean gpd_pilot_page_two_next (GnomePilotAssistant *gpd);
static void gpd_device_info_check (GtkEditable *editable, gpointer user_data);
+static void gpd_pilot_name_check (GtkEditable *editable, gpointer user_data);
static void gpd_pilot_info_check (GtkEditable *editable, gpointer user_data);
static void gpd_pilot_info_button (GtkToggleButton *toggle, gpointer user_data);
@@ -135,7 +138,7 @@ static void gpd_system_info_requested (GnomePilotClient *gpc,
static void gpd_destroy (GtkObject *object);
GtkType
-gnome_pilot_druid_get_type (void)
+gnome_pilot_assistant_get_type (void)
{
static GtkType type = 0;
@@ -143,9 +146,9 @@ gnome_pilot_druid_get_type (void)
{
static const GtkTypeInfo info =
{
- "GnomePilotDruid",
- sizeof (GnomePilotDruid),
- sizeof (GnomePilotDruidClass),
+ "GnomePilotAssistant",
+ sizeof (GnomePilotAssistant),
+ sizeof (GnomePilotAssistantClass),
(GtkClassInitFunc) class_init,
(GtkObjectInitFunc) init,
/* reserved_1 */ NULL,
@@ -160,7 +163,7 @@ gnome_pilot_druid_get_type (void)
}
static void
-class_init (GnomePilotDruidClass *klass)
+class_init (GnomePilotAssistantClass *klass)
{
GtkObjectClass *object_class;
@@ -172,16 +175,23 @@ class_init (GnomePilotDruidClass *klass)
}
static void
-init (GnomePilotDruid *gpd)
+init (GnomePilotAssistant *gpd)
{
- GnomePilotDruidPrivate *priv;
-
- priv = g_new0 (GnomePilotDruidPrivate, 1);
+ GnomePilotAssistantPrivate *priv;
+ guint error;
+ gchar *objects[] = {"Assistant",
+ "assistant_device_timeout_adjustment",
+ "assistant_pilot_charset_store",
+ "assistant_device_port_store",
+ "assistant_device_speed_store", NULL};
+
+ priv = g_new0 (GnomePilotAssistantPrivate, 1);
gpd->priv = priv;
priv->finished = FALSE;
priv->started = FALSE;
+ priv->errstr = NULL;
/* State information */
loadPilotState (&priv->orig_state);
@@ -190,17 +200,18 @@ init (GnomePilotDruid *gpd)
priv->device = g_new0 (GPilotDevice,1);
/* Gui stuff */
- priv->xml = glade_xml_new ("gpilotd-capplet.glade", NULL, NULL);
- if (!priv->xml) {
- priv->xml = glade_xml_new (GLADEDATADIR "/gpilotd-capplet.glade", NULL, NULL);
- if (!priv->xml) {
- g_message ("gnome-pilot-druid init(): Could not load the Glade XML file!");
+ priv->ui = gtk_builder_new ();
+ error = gtk_builder_add_objects_from_file (priv->ui, "gpilotd-capplet.ui", objects, NULL);
+ if (error == 0) {
+ error = gtk_builder_add_objects_from_file (priv->ui, UIDATADIR "/gpilotd-capplet.ui", objects, NULL);
+ if (error == 0) {
+ g_message ("gnome-pilot-assistant init(): Could not load the GtkBuilder UI file!");
goto error;
}
}
if (!get_widgets (gpd)) {
- g_message ("gnome-pilot-druid init(): Could not find all widgets in the XML file!");
+ g_message ("gnome-pilot-assistant init(): Could not find all widgets in the UI file!");
goto error;
}
@@ -215,14 +226,14 @@ init (GnomePilotDruid *gpd)
GtkObject *
-gnome_pilot_druid_new (GnomePilotClient *gpc)
+gnome_pilot_assistant_new (GnomePilotClient *gpc)
{
- GnomePilotDruid *gpd;
+ GnomePilotAssistant *gpd;
GtkObject *obj;
- obj = gtk_type_new (GNOME_PILOT_TYPE_DRUID);
+ obj = gtk_type_new (GNOME_PILOT_TYPE_ASSISTANT);
- gpd = GNOME_PILOT_DRUID (obj);
+ gpd = GNOME_PILOT_ASSISTANT (obj);
gpd->priv->gpc = gpc;
gtk_signal_connect (GTK_OBJECT (gpc), "completed_request",
@@ -236,74 +247,102 @@ gnome_pilot_druid_new (GnomePilotClient *gpc)
}
static gboolean
-get_widgets (GnomePilotDruid *gpd)
+get_widgets (GnomePilotAssistant *gpd)
{
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistantPrivate *priv;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
- priv = gpd->priv;
+ GtkWidget *w;
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->druid_window = GW ("DruidWindow");
- priv->druid = GW ("druid");
-
- priv->page_cradle = GW ("druidpage_cradle");
- priv->page_pilot_one = GW ("druidpage_pilot1");
- priv->page_sync = GW ("druidpage_sync");
- priv->page_pilot_two = GW ("druidpage_pilot2");
- priv->page_conduits = GW ("druidpage_conduits");
- priv->page_finish = GW ("druidpage_finish");
-
- priv->device_name = GW ("druid_device_name_entry");
- priv->device_port = GW ("druid_device_port_entry");
- priv->device_port_label = GW ("druid_device_port_label");
- priv->device_port_combo = GW ("druid_device_port_combo");
- priv->device_speed = GW ("druid_device_speed_menu");
- priv->device_speed_label = GW ("druid_device_speed_label");
- priv->device_timeout = GW ("druid_device_timeout_spinner");
- priv->device_usb = GW ("druid_usb_radio");
- priv->device_irda = GW ("druid_irda_radio");
- priv->device_network = GW ("druid_network_radio");
- priv->device_bluetooth = GW ("druid_bluetooth_radio");
+ priv = gpd->priv;
+//#define GW(name) GTK_WIDGET (gtk_builder_get_object (priv->ui, name))
+#define GW(name) w = GTK_WIDGET (gtk_builder_get_object (priv->ui, name)); if (!w) printf("'%s'\n", name)
+
+ priv->assistant = GW ("Assistant");
+
+ priv->page_cradle = GW ("page_cradle");
+ priv->page_error = GW ("page_error");
+ priv->page_pilot_one = GW ("page_pilot1");
+ priv->page_sync = GW ("page_sync");
+ priv->page_pilot_two = GW ("page_pilot2");
+ priv->page_finish = GW ("page_finish");
+
+
+ gtk_assistant_set_page_complete (GTK_ASSISTANT (priv->assistant),
+ gtk_assistant_get_nth_page (GTK_ASSISTANT (priv->assistant), GPD_PAGE_WELCOME),
+ TRUE);
+ gtk_assistant_set_page_complete (GTK_ASSISTANT (priv->assistant),
+ priv->page_cradle, FALSE);
+ gtk_assistant_set_page_complete (GTK_ASSISTANT (priv->assistant),
+ priv->page_error, FALSE);
+ gtk_assistant_set_page_complete (GTK_ASSISTANT (priv->assistant),
+ priv->page_pilot_one, TRUE);
+ gtk_assistant_set_page_complete (GTK_ASSISTANT (priv->assistant),
+ priv->page_pilot_two, FALSE);
+
+ priv->device_name = GW ("assistant_device_name_entry");
+ priv->device_port_combo = GW ("assistant_device_port_combo");
+ priv->device_port = gtk_bin_get_child (
+ GTK_BIN(priv->device_port_combo));
+ priv->device_port_label = GW ("assistant_device_port_label");
+ priv->device_speed = GW ("assistant_device_speed_combo");
+ priv->device_speed_label = GW ("assistant_device_speed_label");
+ priv->device_timeout = GW ("assistant_device_timeout_spinner");
+ priv->device_usb = GW ("assistant_usb_radio");
+ priv->device_irda = GW ("assistant_irda_radio");
+ priv->device_network = GW ("assistant_network_radio");
+ priv->device_bluetooth = GW ("assistant_bluetooth_radio");
+
+ /* Doing the cell layout in glade .ui file seemed to result
+ * in duplicated text. Probably a bug in glade/gtkbuilder?
+ */
+ // model = GTK_TREE_MODEL(gtk_list_store_new (1, G_TYPE_STRING));
+ model = GTK_TREE_MODEL(gtk_builder_get_object (priv->ui,
+ "assistant_device_port_store"));
+ gtk_combo_box_set_model (GTK_COMBO_BOX (priv->device_port_combo), model);
+ gtk_combo_box_entry_set_text_column(
+ GTK_COMBO_BOX_ENTRY (priv->device_port_combo), 0);
+ gtk_cell_layout_clear(GTK_CELL_LAYOUT(priv->device_port_combo));
+ GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (priv->device_port_combo),
+ renderer, TRUE);
+ gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (priv->device_port_combo),
+ renderer, "text", 0);
#ifdef PILOT_LINK_0_12
/* usb: (libusb) pseudo-device is available from pilot-link 0.12.0 */
- priv->libusb_list = NULL;
- priv->libusb_label = gtk_list_item_new_with_label ("usb:");
- gtk_widget_show(priv->libusb_label);
- priv->libusb_list = g_list_append(priv->libusb_list, priv->libusb_label);
- gtk_list_insert_items (GTK_LIST((GTK_COMBO(priv->device_port_combo))->list),
- priv->libusb_list, 1);
+ gtk_list_store_prepend (GTK_LIST_STORE (model), &iter);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, "usb:", -1);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->device_usb), 1);
+
#endif
+ gtk_combo_box_set_active(
+ GTK_COMBO_BOX (priv->device_port_combo), 0);
+
priv->pilot_info = GW ("pilot_user_frame");
priv->pilot_info_no = GW ("no_radio_button");
- priv->pilot_username = GW ("druid_pilot_username_entry");
- priv->pilot_id = GW ("druid_pilot_id_entry");
+ priv->pilot_username = GW ("assistant_pilot_username_entry");
+ priv->pilot_id = GW ("assistant_pilot_id_entry");
- /* FIXME: is this a libglade bug or what? if sync_label
- is constructed in .glade it is not properly redrawn the first time. */
- priv->sync_label_vbox = GW ("sync_label_vbox");
+ priv->sync_label_vbox = GW ("page_sync");
priv->sync_label = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (priv->sync_label_vbox), priv->sync_label, TRUE, FALSE, GNOME_PAD_SMALL);
- priv->pilot_name = GW ("druid_pilot_name_entry");
- priv->pilot_basedir = GW ("druid_pilot_basedir_entry");
+ priv->pilot_name = GW ("assistant_pilot_name_entry");
+ priv->pilot_basedir = GW ("assistant_pilot_basedir_entry");
+ priv->pilot_charset_label = GW ("assistant_pilot_charset_label");
+ priv->pilot_charset_combo = GW ("assistant_pilot_charset_combo");
#ifdef PILOT_LINK_0_12
- priv->pilot_charset = GW ("druid_pilot_charset_entry");
+ priv->pilot_charset = gtk_bin_get_child (
+ GTK_BIN(priv->pilot_charset_combo));
#endif
- priv->pilot_charset_label = GW ("druid_pilot_charset_label");
- priv->pilot_charset_combo = GW ("druid_pilot_charset_combo");
-
+
+
#undef GW
- return (priv->druid_window
- && priv->druid
- && priv->page_cradle
- && priv->page_pilot_one
- && priv->page_sync
- && priv->page_pilot_two
- && priv->page_finish
+ return (priv->assistant
&& priv->device_name
&& priv->device_port
&& priv->device_speed
@@ -328,15 +367,15 @@ get_widgets (GnomePilotDruid *gpd)
}
static void
-map_widgets (GnomePilotDruid *gpd)
+map_widgets (GnomePilotAssistant *gpd)
{
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistantPrivate *priv;
priv = gpd->priv;
gtk_object_set_data (GTK_OBJECT (gpd), "port_entry", priv->device_port);
gtk_object_set_data (GTK_OBJECT (gpd), "name_entry", priv->device_name);
- gtk_object_set_data (GTK_OBJECT (gpd), "speed_menu", priv->device_speed);
+ gtk_object_set_data (GTK_OBJECT (gpd), "speed_combo", priv->device_speed);
gtk_object_set_data (GTK_OBJECT (gpd), "timeout_spinner", priv->device_timeout);
gtk_object_set_data (GTK_OBJECT (gpd), "usb_radio", priv->device_usb);
gtk_object_set_data (GTK_OBJECT (gpd), "irda_radio", priv->device_irda);
@@ -353,38 +392,28 @@ map_widgets (GnomePilotDruid *gpd)
}
static void
-init_widgets (GnomePilotDruid *gpd)
+init_widgets (GnomePilotAssistant *gpd)
{
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistantPrivate *priv;
priv = gpd->priv;
/* Main signals */
- gtk_signal_connect (GTK_OBJECT (priv->druid_window), "delete_event",
+ gtk_signal_connect (GTK_OBJECT (priv->assistant), "delete_event",
GTK_SIGNAL_FUNC (gpd_delete_window), gpd);
- gtk_signal_connect (GTK_OBJECT (priv->druid), "cancel",
+ gtk_signal_connect (GTK_OBJECT (priv->assistant), "cancel",
GTK_SIGNAL_FUNC (gpd_canceled), gpd);
- gtk_signal_connect (GTK_OBJECT (priv->druid), "help",
- GTK_SIGNAL_FUNC (gpd_help), gpd);
+ // gtk_signal_connect (GTK_OBJECT (priv->assistant), "help",
+ // GTK_SIGNAL_FUNC (gpd_help), gpd);
/* Page signals */
- g_signal_connect_after (G_OBJECT (priv->page_cradle), "prepare",
- G_CALLBACK (gpd_cradle_page_prepare), gpd);
- g_signal_connect_after (G_OBJECT (priv->page_cradle), "next",
- G_CALLBACK (gpd_cradle_page_next), gpd);
-
- g_signal_connect_after (G_OBJECT (priv->page_sync), "prepare",
- G_CALLBACK (gpd_sync_page_prepare), gpd);
- g_signal_connect_after (G_OBJECT (priv->page_sync),"back",
- G_CALLBACK (gpd_sync_page_back), gpd);
-
- g_signal_connect_after (G_OBJECT (priv->page_pilot_two), "next",
- G_CALLBACK (gpd_pilot_page_two_next), gpd);
+ gtk_assistant_set_forward_page_func(GTK_ASSISTANT(priv->assistant),
+ gpd_forward_page, gpd, NULL);
+ g_signal_connect_after (G_OBJECT (priv->assistant), "prepare",
+ G_CALLBACK (gpd_page_prepare), gpd);
- g_signal_connect_after (G_OBJECT (priv->page_finish), "finish",
- G_CALLBACK (gpd_finish_page_finished), gpd);
/* Other widget signals */
gtk_signal_connect (GTK_OBJECT (priv->device_name),"changed",
@@ -408,13 +437,15 @@ init_widgets (GnomePilotDruid *gpd)
GTK_SIGNAL_FUNC (insert_numeric_callback), NULL);
gtk_signal_connect (GTK_OBJECT (priv->pilot_id),"changed",
GTK_SIGNAL_FUNC (gpd_pilot_info_check), gpd);
+ gtk_signal_connect (GTK_OBJECT (priv->pilot_name),"changed",
+ GTK_SIGNAL_FUNC (gpd_pilot_name_check), gpd);
}
static void
-fill_widgets (GnomePilotDruid *gpd)
+fill_widgets (GnomePilotAssistant *gpd)
{
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistantPrivate *priv;
gchar buf[256];
char *str, *str2;
@@ -429,8 +460,6 @@ fill_widgets (GnomePilotDruid *gpd)
GTK_TOGGLE_BUTTON(priv->device_bluetooth)->active) ?
PILOT_DEVICE_NETWORK : PILOT_DEVICE_SERIAL);
- fill_speed_menu (GTK_OPTION_MENU (priv->device_speed), 0);
-
/* First pilot page */
gtk_entry_set_text (GTK_ENTRY (priv->pilot_username), g_get_real_name ());
@@ -456,14 +485,14 @@ fill_widgets (GnomePilotDruid *gpd)
}
gboolean
-gnome_pilot_druid_run_and_close (GnomePilotDruid *gpd)
+gnome_pilot_assistant_run_and_close (GnomePilotAssistant *gpd)
{
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistantPrivate *priv;
gboolean result;
priv = gpd->priv;
- gtk_widget_show_all (priv->druid_window);
+ gtk_widget_show_all (priv->assistant);
gtk_main ();
@@ -475,9 +504,9 @@ gnome_pilot_druid_run_and_close (GnomePilotDruid *gpd)
}
static gboolean
-cancel_dialog (GnomePilotDruid *gpd)
+cancel_dialog (GnomePilotAssistant *gpd)
{
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistantPrivate *priv;
GtkWidget *dlg;
priv = gpd->priv;
@@ -485,7 +514,7 @@ cancel_dialog (GnomePilotDruid *gpd)
if (!priv->started)
return TRUE;
- dlg = gtk_message_dialog_new (GTK_WINDOW (priv->druid_window), GTK_DIALOG_DESTROY_WITH_PARENT,
+ dlg = gtk_message_dialog_new (GTK_WINDOW (priv->assistant), GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
_("Setup did not complete and settings will not\n"
"be saved. Are you sure you want to quit?"));
@@ -514,9 +543,9 @@ cancel_dialog (GnomePilotDruid *gpd)
}
static gboolean
-check_cradle_settings (GnomePilotDruid *gpd)
+check_cradle_settings (GnomePilotAssistant *gpd)
{
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistantPrivate *priv;
priv = gpd->priv;
@@ -525,9 +554,9 @@ check_cradle_settings (GnomePilotDruid *gpd)
}
static gboolean
-check_pilot_settings (GnomePilotDruid *gpd)
+check_pilot_settings (GnomePilotAssistant *gpd)
{
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistantPrivate *priv;
priv = gpd->priv;
@@ -538,37 +567,124 @@ check_pilot_settings (GnomePilotDruid *gpd)
static gboolean
gpd_delete_window (GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
- return !cancel_dialog (GNOME_PILOT_DRUID (user_data));
+ return !cancel_dialog (GNOME_PILOT_ASSISTANT (user_data));
}
static void
-gpd_canceled (GnomeDruid *druid, gpointer user_data)
+gpd_canceled (GtkAssistant *assistant, gpointer user_data)
{
- if (cancel_dialog (GNOME_PILOT_DRUID (user_data)))
+ if (cancel_dialog (GNOME_PILOT_ASSISTANT (user_data)))
gtk_main_quit ();
}
-static void
-gpd_help (GnomeDruid *druid, gpointer user_data)
-{
- gtk_show_uri (NULL, "ghelp:gnome-pilot#assistant", gtk_get_current_event_time (),NULL);
-}
-
static void
-gpd_cradle_page_prepare (GnomeDruidPage *page, gpointer arg1, gpointer user_data)
+gpd_page_prepare (GtkAssistant *assistant, GtkWidget *page,
+ gpointer user_data)
{
- GnomePilotDruid *gpd = GNOME_PILOT_DRUID (user_data);
+ GnomePilotAssistant *gpd = GNOME_PILOT_ASSISTANT (user_data);
+ gint pageid = gtk_assistant_get_current_page(assistant);
gboolean ready;
- ready = check_cradle_settings (gpd);
- gnome_druid_set_buttons_sensitive (GNOME_DRUID (arg1), TRUE, ready, TRUE, TRUE);
+ switch (pageid) {
+ case GPD_PAGE_WELCOME:
+ case GPD_PAGE_ERROR:
+ /* intro page, carry straight on. */
+ break;
+ case GPD_PAGE_CRADLE:
+ /* Device settings: check if widgets already filled in */
+ ready = check_cradle_settings (gpd);
+ gtk_assistant_set_page_complete (assistant,
+ gpd->priv->page_cradle, ready);
+ break;
+ case GPD_PAGE_PILOT_ONE:
+ /* PDA Identification aka "page_pilot1" */
+ gpd_cancel_sync(gpd); // deal with 'back' behaviour from page_sync
+ break;
+ case GPD_PAGE_SYNC:
+ /* Initial Sync aka "page_sync" */
+ gpd_sync_page_prepare(gpd);
+ break;
+ case GPD_PAGE_PILOT_TWO:
+ /* PDA Attributes aka "page_pilot2" */
+ gtk_assistant_set_page_complete (assistant,
+ gpd->priv->page_pilot_two, TRUE);
+ break;
+ case GPD_PAGE_FINISH:
+ gtk_signal_connect (GTK_OBJECT (gpd->priv->assistant), "close",
+ GTK_SIGNAL_FUNC (gpd_finish_page_finished), gpd);
+
+ default:
+ break;
+ }
}
+static gint
+gpd_forward_page(gint current_page, gpointer user_data)
+{
+ GnomePilotAssistant *gpd = GNOME_PILOT_ASSISTANT (user_data);
+
+ switch (current_page)
+ {
+ case GPD_PAGE_WELCOME:
+ return 1;
+ case GPD_PAGE_CRADLE:
+ // forward_page is called for various reasons, it seems,
+ // by GtkAssistant (e.g. figuring out how the assistant
+ // is wired)
+ if (gtk_assistant_get_page_complete (
+ GTK_ASSISTANT (gpd->priv->assistant),
+ gtk_assistant_get_nth_page (
+ GTK_ASSISTANT (gpd->priv->assistant),
+ GPD_PAGE_CRADLE)
+ )) {
+ if (gpd_cradle_page_next(gpd)) {
+ gtk_label_set_text (
+ GTK_LABEL (gpd->priv->page_error),
+ gpd->priv->errstr);
+ return GPD_PAGE_ERROR;
+ } else {
+ return GPD_PAGE_PILOT_ONE;
+ }
+ } else {
+ return GPD_PAGE_PILOT_ONE;
+ }
+ break;
+ case GPD_PAGE_ERROR:
+ /* never allowed forward from this page... */
+ return GPD_PAGE_PILOT_ONE;
+ break;
+ case GPD_PAGE_PILOT_ONE:
+ /* PDA Identification aka "druidpage_pilot1" */
+ return GPD_PAGE_SYNC;
+ break;
+ case GPD_PAGE_SYNC:
+ /* Initial Sync aka "druidpage_sync" */
+ return GPD_PAGE_PILOT_TWO;
+ case GPD_PAGE_PILOT_TWO:
+ /* PDA Attributes aka "druidpage_pilot2" */
+ if (gpd_pilot_page_two_next(gpd)) {
+ gtk_label_set_text (
+ GTK_LABEL (gpd->priv->page_error),
+ gpd->priv->errstr);
+ return GPD_PAGE_ERROR;
+ } else {
+ return GPD_PAGE_FINISH;
+ }
+ break;
+ case GPD_PAGE_FINISH:
+ return GPD_PAGE_FINISH;
+ default:
+ return -1;
+ }
+}
+
+
+
+
static gboolean
-gpd_cradle_page_next (GnomeDruidPage *page, gpointer arg1, gpointer user_data)
+gpd_cradle_page_next (GnomePilotAssistant *gpd)
{
- GnomePilotDruid *gpd = GNOME_PILOT_DRUID (user_data);
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistantPrivate *priv;
GPilotDevice *tmp_device;
gboolean result;
@@ -577,30 +693,39 @@ gpd_cradle_page_next (GnomeDruidPage *page, gpointer arg1, gpointer user_data)
/* check the device settings */
tmp_device = gpilot_device_new();
read_device_config(GTK_OBJECT(gpd), tmp_device);
- result = check_device_settings(tmp_device);
+ if (priv->errstr != NULL) {
+ g_free(priv->errstr);
+ priv->errstr = NULL;
+ }
+ result = check_device_settings(tmp_device, &priv->errstr);
g_free(tmp_device->name);
g_free(tmp_device->port);
- if (!result)
+ if (!result) {
+ gtk_label_set_text (GTK_LABEL (priv->page_error), priv->errstr);
/* cancel proceeding to next page */
+ /*gtk_assistant_set_page_complete (
+ GTK_ASSISTANT (priv->assistant),
+ gtk_assistant_get_nth_page (
+ GTK_ASSISTANT (priv->assistant), 1),
+ FALSE);*/
return TRUE;
-
+ }
priv->started = TRUE;
return FALSE;
}
static void
-gpd_sync_page_prepare (GnomeDruidPage *page, gpointer arg1, gpointer user_data)
+gpd_sync_page_prepare (GnomePilotAssistant *gpd)
{
-
- GnomePilotDruid *gpd = GNOME_PILOT_DRUID (user_data);
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistantPrivate *priv;
GNOME_Pilot_UserInfo user;
gchar *text, *location;
priv = gpd->priv;
read_device_config (GTK_OBJECT (gpd), priv->device);
+
if (priv->state->devices == NULL)
priv->state->devices = g_list_append (priv->state->devices, priv->device);
@@ -651,19 +776,19 @@ gpd_sync_page_prepare (GnomeDruidPage *page, gpointer arg1, gpointer user_data)
g_free (text);
if (priv->handle1 <= 0 || priv->handle2 <= 0) {
- error_dialog (GTK_WINDOW (priv->druid_window), _("Failed sending request to gpilotd"));
+ error_dialog (GTK_WINDOW (priv->assistant), _("Failed sending request to gpilotd"));
return;
}
/* disable NEXT until we've synced */
- gnome_druid_set_buttons_sensitive (GNOME_DRUID (priv->druid), TRUE, FALSE, TRUE, TRUE);
+ gtk_assistant_set_page_complete (GTK_ASSISTANT(priv->assistant),
+ priv->page_sync, FALSE);
}
static gboolean
-gpd_sync_page_back (GnomeDruidPage *druidpage, gpointer arg1, gpointer user_data)
+gpd_cancel_sync (GnomePilotAssistant *gpd)
{
- GnomePilotDruid *gpd = GNOME_PILOT_DRUID (user_data);
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistantPrivate *priv;
gboolean need_restart = FALSE;
priv = gpd->priv;
@@ -684,26 +809,28 @@ gpd_sync_page_back (GnomeDruidPage *druidpage, gpointer arg1, gpointer user_data
}
static gboolean
-gpd_pilot_page_two_next (GnomeDruidPage *druidpage, gpointer arg1, gpointer user_data)
+gpd_pilot_page_two_next (GnomePilotAssistant *gpd)
{
- GnomePilotDruid *gpd = GNOME_PILOT_DRUID (user_data);
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistantPrivate *priv;
priv = gpd->priv;
-
- return (!(check_base_directory (gtk_entry_get_text (GTK_ENTRY (priv->pilot_basedir)))
+ if(priv->errstr != NULL) {
+ g_free(priv->errstr);
+ priv->errstr = NULL;
+ }
+ return (!(check_base_directory (gtk_entry_get_text (GTK_ENTRY (priv->pilot_basedir)), &priv->errstr)
#ifdef PILOT_LINK_0_12
- && check_pilot_charset (gtk_entry_get_text (GTK_ENTRY (priv->pilot_charset)))
+ && check_pilot_charset (gtk_entry_get_text (GTK_ENTRY (priv->pilot_charset)), &priv->errstr)
#endif
- ));
+ ));
}
static void
-gpd_finish_page_finished (GnomeDruidPage *druidpage, gpointer arg1, gpointer user_data)
+gpd_finish_page_finished (GtkAssistant *assistant, gpointer data)
{
- GnomePilotDruid *gpd = GNOME_PILOT_DRUID (user_data);
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistant *gpd = GNOME_PILOT_ASSISTANT (data);
+ GnomePilotAssistantPrivate *priv;
priv = gpd->priv;
@@ -720,21 +847,22 @@ gpd_finish_page_finished (GnomeDruidPage *druidpage, gpointer arg1, gpointer use
static void
gpd_device_info_check (GtkEditable *editable, gpointer user_data)
{
- GnomePilotDruid *gpd = GNOME_PILOT_DRUID (user_data);
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistant *gpd = GNOME_PILOT_ASSISTANT (user_data);
+ GnomePilotAssistantPrivate *priv;
gboolean ready;
priv = gpd->priv;
ready = check_cradle_settings (gpd);
- gnome_druid_set_buttons_sensitive (GNOME_DRUID (priv->druid), TRUE, ready, TRUE, TRUE);
+ gtk_assistant_set_page_complete (GTK_ASSISTANT (priv->assistant),
+ priv->page_cradle, ready);
}
static void
gpd_pilot_info_check (GtkEditable *editable, gpointer user_data)
{
- GnomePilotDruid *gpd = GNOME_PILOT_DRUID (user_data);
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistant *gpd = GNOME_PILOT_ASSISTANT (user_data);
+ GnomePilotAssistantPrivate *priv;
gboolean ready = TRUE;
priv = gpd->priv;
@@ -742,14 +870,29 @@ gpd_pilot_info_check (GtkEditable *editable, gpointer user_data)
if (GTK_TOGGLE_BUTTON (priv->pilot_info_no)->active)
ready = check_pilot_settings (gpd);
- gnome_druid_set_buttons_sensitive (GNOME_DRUID (priv->druid), TRUE, ready, TRUE, TRUE);
+ gtk_assistant_set_page_complete (GTK_ASSISTANT (priv->assistant),
+ priv->page_pilot_one, ready);
+}
+
+static void
+gpd_pilot_name_check (GtkEditable *editable, gpointer user_data)
+{
+ GnomePilotAssistant *gpd = GNOME_PILOT_ASSISTANT (user_data);
+ GnomePilotAssistantPrivate *priv;
+
+ priv = gpd->priv;
+ gtk_assistant_set_page_complete (
+ GTK_ASSISTANT (priv->assistant),
+ priv->page_pilot_two,
+ check_editable (GTK_EDITABLE (priv->pilot_name)));
+ return;
}
static void
gpd_pilot_info_button (GtkToggleButton *toggle, gpointer user_data)
{
- GnomePilotDruid *gpd = GNOME_PILOT_DRUID (user_data);
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistant *gpd = GNOME_PILOT_ASSISTANT (user_data);
+ GnomePilotAssistantPrivate *priv;
gboolean ready = TRUE;
priv = gpd->priv;
@@ -758,14 +901,15 @@ gpd_pilot_info_button (GtkToggleButton *toggle, gpointer user_data)
if (toggle->active)
ready = check_pilot_settings (gpd);
- gnome_druid_set_buttons_sensitive (GNOME_DRUID (priv->druid), TRUE, ready, TRUE, TRUE);
+ gtk_assistant_set_page_complete (GTK_ASSISTANT (priv->assistant),
+ priv->page_pilot_one, ready);
}
static void
gpd_request_completed (GnomePilotClient* client, const gchar *id, gint handle, gpointer user_data)
{
- GnomePilotDruid *gpd = GNOME_PILOT_DRUID (user_data);
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistant *gpd = GNOME_PILOT_ASSISTANT (user_data);
+ GnomePilotAssistantPrivate *priv;
priv = gpd->priv;
@@ -777,16 +921,16 @@ gpd_request_completed (GnomePilotClient* client, const gchar *id, gint handle, g
return;
if (priv->handle1 == -1 && priv->handle2 == -1) {
- gnome_druid_set_buttons_sensitive (
- GNOME_DRUID (priv->druid), TRUE, TRUE, TRUE, TRUE);
+ gtk_assistant_set_page_complete (GTK_ASSISTANT (priv->assistant),
+ priv->page_sync, TRUE);
}
}
static void
gpd_userinfo_requested (GnomePilotClient *gpc, const gchar *device, const GNOME_Pilot_UserInfo *user, gpointer user_data)
{
- GnomePilotDruid *gpd = GNOME_PILOT_DRUID (user_data);
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistant *gpd = GNOME_PILOT_ASSISTANT (user_data);
+ GnomePilotAssistantPrivate *priv;
gchar *text;
gchar buf[20];
@@ -813,9 +957,10 @@ gpd_userinfo_requested (GnomePilotClient *gpc, const gchar *device, const GNOME_
gtk_entry_set_text (GTK_ENTRY (priv->pilot_id), buf);
g_free (text);
- /* gnome_druid_set_buttons_sensitive (GNOME_DRUID (priv->druid), TRUE, TRUE, TRUE, TRUE);
+ gtk_assistant_set_page_complete (GTK_ASSISTANT (priv->assistant),
+ priv->page_sync, TRUE);
- priv->handle1 = priv->handle2 = -1; */
+ priv->handle1 = priv->handle2 = -1;
}
static void
@@ -824,8 +969,8 @@ gpd_system_info_requested (GnomePilotClient *gpc,
const GNOME_Pilot_SysInfo *sysinfo,
gpointer user_data)
{
- GnomePilotDruid *gpd = GNOME_PILOT_DRUID (user_data);
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistant *gpd = GNOME_PILOT_ASSISTANT (user_data);
+ GnomePilotAssistantPrivate *priv;
priv = gpd->priv;
@@ -840,13 +985,13 @@ gpd_system_info_requested (GnomePilotClient *gpc,
static void
gpd_destroy (GtkObject *object)
{
- GnomePilotDruid *gpd = GNOME_PILOT_DRUID (object);
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistant *gpd = GNOME_PILOT_ASSISTANT (object);
+ GnomePilotAssistantPrivate *priv;
priv = gpd->priv;
- gtk_widget_destroy (priv->druid_window);
- g_object_unref (priv->xml);
+ gtk_widget_destroy (priv->assistant);
+ g_object_unref (priv->ui);
gtk_signal_disconnect_by_data (GTK_OBJECT (priv->gpc), object);
@@ -857,8 +1002,8 @@ gpd_destroy (GtkObject *object)
static void
network_device_toggled_callback (GtkRadioButton *btn, void *data)
{
- GnomePilotDruid *gpd = (GnomePilotDruid *)data;
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistant *gpd = (GnomePilotAssistant *)data;
+ GnomePilotAssistantPrivate *priv;
int type;
priv = gpd->priv;
@@ -878,8 +1023,8 @@ network_device_toggled_callback (GtkRadioButton *btn, void *data)
}
static void
-set_widget_visibility_by_type(GnomePilotDruid *gpd, int type) {
- GnomePilotDruidPrivate *priv;
+set_widget_visibility_by_type(GnomePilotAssistant *gpd, int type) {
+ GnomePilotAssistantPrivate *priv;
gboolean enable_extra_widgets = (type != PILOT_DEVICE_NETWORK &&
type != PILOT_DEVICE_BLUETOOTH);
diff --git a/capplet/gnome-pilot-druid.h b/capplet/gnome-pilot-assistant.h
similarity index 54%
rename from capplet/gnome-pilot-druid.h
rename to capplet/gnome-pilot-assistant.h
index 44b2f53..36a47f5 100644
--- a/capplet/gnome-pilot-druid.h
+++ b/capplet/gnome-pilot-assistant.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* gnome-pilot-druid.c
+/* gnome-pilot-assistant.c
*
* Copyright (C) 1998 Red Hat Software
* Copyright (C) 1999-2000 Free Software Foundation
@@ -27,8 +27,8 @@
*
*/
-#ifndef _GNOME_PILOT_DRUID_H_
-#define _GNOME_PILOT_DRUID_H_
+#ifndef _GNOME_PILOT_ASSISTANT_H_
+#define _GNOME_PILOT_ASSISTANT_H_
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -41,35 +41,35 @@ extern "C" {
#pragma }
#endif /* __cplusplus */
-#define GNOME_PILOT_TYPE_DRUID (gnome_pilot_druid_get_type ())
-#define GNOME_PILOT_DRUID(obj) (GTK_CHECK_CAST ((obj), GNOME_PILOT_TYPE_DRUID, GnomePilotDruid))
-#define GNOME_PILOT_DRUID_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_PILOT_TYPE_DRUID, GnomePilotDruidClass))
-#define GNOME_PILOT_IS_DRUID(obj) (GTK_CHECK_TYPE ((obj), GNOME_PILOT_TYPE_DRUID))
-#define GNOME_PILOT_IS_DRUID_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), GNOME_PILOT_TYPE_DRUID))
+#define GNOME_PILOT_TYPE_ASSISTANT (gnome_pilot_assistant_get_type ())
+#define GNOME_PILOT_ASSISTANT(obj) (GTK_CHECK_CAST ((obj), GNOME_PILOT_TYPE_ASSISTANT, GnomePilotAssistant))
+#define GNOME_PILOT_ASSISTANT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_PILOT_TYPE_ASSISTANT, GnomePilotAssistantClass))
+#define GNOME_PILOT_IS_ASSISTANT(obj) (GTK_CHECK_TYPE ((obj), GNOME_PILOT_TYPE_ASSISTANT))
+#define GNOME_PILOT_IS_ASSISTANT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), GNOME_PILOT_TYPE_ASSISTANT))
-typedef struct _GnomePilotDruid GnomePilotDruid;
-typedef struct _GnomePilotDruidPrivate GnomePilotDruidPrivate;
-typedef struct _GnomePilotDruidClass GnomePilotDruidClass;
+typedef struct _GnomePilotAssistant GnomePilotAssistant;
+typedef struct _GnomePilotAssistantPrivate GnomePilotAssistantPrivate;
+typedef struct _GnomePilotAssistantClass GnomePilotAssistantClass;
-struct _GnomePilotDruid {
+struct _GnomePilotAssistant {
GtkObject parent;
- GnomePilotDruidPrivate *priv;
+ GnomePilotAssistantPrivate *priv;
};
-struct _GnomePilotDruidClass {
+struct _GnomePilotAssistantClass {
GtkObjectClass parent_class;
};
-GtkType gnome_pilot_druid_get_type (void);
-GtkObject *gnome_pilot_druid_new (GnomePilotClient *gpc);
+GtkType gnome_pilot_assistant_get_type (void);
+GtkObject *gnome_pilot_assistant_new (GnomePilotClient *gpc);
-gboolean gnome_pilot_druid_run_and_close (GnomePilotDruid *gpd);
+gboolean gnome_pilot_assistant_run_and_close (GnomePilotAssistant *gpd);
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* _GNOME_PILOT_DRUID_H_ */
+#endif /* _GNOME_PILOT_ASSISTANT_H_ */
diff --git a/capplet/gnome-pilot-capplet.c b/capplet/gnome-pilot-capplet.c
index 6417f92..e40166b 100644
--- a/capplet/gnome-pilot-capplet.c
+++ b/capplet/gnome-pilot-capplet.c
@@ -28,7 +28,6 @@
*/
#include <sys/stat.h>
-#include <glade/glade.h>
#include <libgnomeui/gnome-app-helper.h>
#include "pilot.h"
#include "util.h"
@@ -43,7 +42,7 @@ static GObjectClass *parent_class = NULL;
struct _GnomePilotCappletPrivate
{
- GladeXML *xml;
+ GtkBuilder *ui;
GnomePilotClient *gpc;
gint handle;
@@ -160,7 +159,9 @@ static void
init (GnomePilotCapplet *gpcap)
{
GnomePilotCappletPrivate *priv;
-
+ guint error;
+ gchar *objects[] = {"CappletMain", NULL};
+
priv = g_new0 (GnomePilotCappletPrivate, 1);
gpcap->priv = priv;
@@ -170,17 +171,18 @@ init (GnomePilotCapplet *gpcap)
priv->state = dupPilotState (priv->orig_state);
/* Gui stuff */
- priv->xml = glade_xml_new ("gpilotd-capplet.glade", "CappletMain", NULL);
- if (!priv->xml) {
- priv->xml = glade_xml_new (GLADEDATADIR "/gpilotd-capplet.glade", "CappletMain", NULL);
- if (!priv->xml) {
- g_message ("gnome-pilot-capplet init(): Could not load the Glade XML file!");
+ priv->ui = gtk_builder_new ();
+ error = gtk_builder_add_objects_from_file (priv->ui, "gpilotd-capplet.ui", objects, NULL);
+ if (error == 0) {
+ error = gtk_builder_add_objects_from_file (priv->ui, UIDATADIR "/pilotd-capplet.ui", objects, NULL);
+ if (error == 0) {
+ g_message ("gnome-pilot-capplet init(): Could not load the GtkBuilder UI file!");
goto error;
}
}
if (!get_widgets (gpcap)) {
- g_message ("gnome-pilot-capplet init(): Could not find all widgets in the XML file!");
+ g_message ("gnome-pilot-capplet init(): Could not find all widgets in the UI file!");
goto error;
}
@@ -211,7 +213,7 @@ get_widgets (GnomePilotCapplet *gpcap)
priv = gpcap->priv;
-#define GW(name) glade_xml_get_widget (priv->xml, name)
+#define GW(name) GTK_WIDGET (gtk_builder_get_object (priv->ui, name))
gtk_window_set_title (GTK_WINDOW (gpcap), _("gnome-pilot Settings"));
gtk_dialog_set_has_separator (GTK_DIALOG (gpcap), FALSE);
@@ -1294,7 +1296,7 @@ gpcap_dispose (GObject *object)
g_hash_table_destroy (priv->conduits);
- g_object_unref (priv->xml);
+ g_object_unref (priv->ui);
if (priv->pilots_popup)
gtk_widget_destroy (priv->pilots_popup);
diff --git a/capplet/gnome-pilot-cdialog.c b/capplet/gnome-pilot-cdialog.c
index 1492b77..0953c4a 100644
--- a/capplet/gnome-pilot-cdialog.c
+++ b/capplet/gnome-pilot-cdialog.c
@@ -28,7 +28,6 @@
*/
#include <sys/stat.h>
-#include <glade/glade.h>
#include "pilot.h"
#include "util.h"
#include "gnome-pilot-cdialog.h"
@@ -38,7 +37,7 @@ static GtkObjectClass *parent_class = NULL;
struct _GnomePilotCDialogPrivate
{
- GladeXML *xml;
+ GtkBuilder *ui;
ConduitState *state;
@@ -103,23 +102,26 @@ static void
init (GnomePilotCDialog *gpcd)
{
GnomePilotCDialogPrivate *priv;
-
+ guint error;
+ gchar *objects[] = {"ConduitSettings", NULL};
+
priv = g_new0 (GnomePilotCDialogPrivate, 1);
gpcd->priv = priv;
- /* Gui stuff */
- priv->xml = glade_xml_new ("gpilotd-capplet.glade", "ConduitSettings", NULL);
- if (!priv->xml) {
- priv->xml = glade_xml_new (GLADEDATADIR "/gpilotd-capplet.glade", "ConduitSettings", NULL);
- if (!priv->xml) {
- g_message ("gnome-pilot-cdialog init(): Could not load the Glade XML file!");
+ /* Gui stuff */
+ priv->ui = gtk_builder_new ();
+ error = gtk_builder_add_objects_from_file (priv->ui, "gpilotd-capplet.ui", objects, NULL);
+ if (error == 0) {
+ error = gtk_builder_add_objects_from_file (priv->ui, UIDATADIR "/gpilotd-capplet.ui", objects, NULL);
+ if (error == 0) {
+ g_message ("gnome-pilot-cdialog init(): Could not load the GtkBuilder UI file!");
goto error;
}
}
if (!get_widgets (gpcd)) {
- g_message ("gnome-pilot-cdialog init(): Could not find all widgets in the XML file!");
+ g_message ("gnome-pilot-cdialog init(): Could not find all widgets in the UI file!");
goto error;
}
@@ -153,7 +155,7 @@ get_widgets (GnomePilotCDialog *gpcd)
priv = gpcd->priv;
-#define GW(name) glade_xml_get_widget (priv->xml, name)
+#define GW(name) GTK_WIDGET (gtk_builder_get_object (priv->ui, name))
priv->dialog = GW ("ConduitSettings");
@@ -286,7 +288,7 @@ gpcd_destroy (GtkObject *object)
priv = gpcd->priv;
- gtk_object_unref (GTK_OBJECT (priv->xml));
+ gtk_object_unref (GTK_OBJECT (priv->ui));
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
diff --git a/capplet/gnome-pilot-ddialog.c b/capplet/gnome-pilot-ddialog.c
index 78b2181..e3e2ca3 100644
--- a/capplet/gnome-pilot-ddialog.c
+++ b/capplet/gnome-pilot-ddialog.c
@@ -28,7 +28,6 @@
*/
#include <sys/stat.h>
-#include <glade/glade.h>
#include "pilot.h"
#include "util.h"
#include "gnome-pilot-ddialog.h"
@@ -38,7 +37,7 @@ static GtkObjectClass *parent_class = NULL;
struct _GnomePilotDDialogPrivate
{
- GladeXML *xml;
+ GtkBuilder *ui;
GPilotDevice *device;
@@ -116,23 +115,26 @@ static void
init (GnomePilotDDialog *gpdd)
{
GnomePilotDDialogPrivate *priv;
+ guint error;
+ gchar *objects[] = {"DeviceSettings", NULL};
priv = g_new0 (GnomePilotDDialogPrivate, 1);
gpdd->priv = priv;
/* Gui stuff */
- priv->xml = glade_xml_new ("gpilotd-capplet.glade", "DeviceSettings", NULL);
- if (!priv->xml) {
- priv->xml = glade_xml_new (GLADEDATADIR "/gpilotd-capplet.glade", "DeviceSettings", NULL);
- if (!priv->xml) {
- g_message ("gnome-pilot-ddialog init(): Could not load the Glade XML file!");
+ priv->ui = gtk_builder_new ();
+ error = gtk_builder_add_objects_from_file (priv->ui, "gpilotd-capplet.ui", objects, NULL);
+ if (error == 0) {
+ error = gtk_builder_add_objects_from_file (priv->ui, UIDATADIR "/gpilotd-capplet.ui", objects, NULL);
+ if (error == 0) {
+ g_message ("gnome-pilot-ddialog init(): Could not load the GtkBuilder UI file!");
goto error;
}
}
if (!get_widgets (gpdd)) {
- g_message ("gnome-pilot-ddialog init(): Could not find all widgets in the XML file!");
+ g_message ("gnome-pilot-ddialog init(): Could not find all widgets in the UI file!");
goto error;
}
@@ -167,7 +169,7 @@ get_widgets (GnomePilotDDialog *gpdd)
priv = gpdd->priv;
-#define GW(name) glade_xml_get_widget (priv->xml, name)
+#define GW(name) GTK_WIDGET (gtk_builder_get_object (priv->ui, name))
priv->dialog = GW ("DeviceSettings");
@@ -253,8 +255,6 @@ fill_widgets (GnomePilotDDialog *gpdd)
if (priv->device->port != NULL)
gtk_entry_set_text (GTK_ENTRY (priv->device_port), priv->device->port);
- fill_speed_menu (GTK_OPTION_MENU (priv->device_speed), priv->device->speed);
-
gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->device_timeout), priv->device->timeout);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->device_serial),
@@ -277,6 +277,7 @@ gnome_pilot_ddialog_run_and_close (GnomePilotDDialog *gpdd, GtkWindow *parent)
GnomePilotDDialogPrivate *priv;
gint btn;
GPilotDevice *tmpdev = g_new0 (GPilotDevice, 1);
+ gchar *errstr = NULL;
priv = gpdd->priv;
@@ -286,9 +287,12 @@ gnome_pilot_ddialog_run_and_close (GnomePilotDDialog *gpdd, GtkWindow *parent)
if (btn == GTK_RESPONSE_OK) {
read_device_config (GTK_OBJECT (gpdd), tmpdev);
- if(check_device_settings (tmpdev)) {
+ if(check_device_settings (tmpdev, &errstr)) {
*priv->device = *tmpdev;
break;
+ } else {
+ error_dialog(NULL, errstr);
+ g_free(errstr);
}
} else {
break;
@@ -309,7 +313,7 @@ gpdd_destroy (GtkObject *object)
priv = gpdd->priv;
gtk_widget_destroy (priv->dialog);
- gtk_object_unref (GTK_OBJECT (priv->xml));
+ gtk_object_unref (GTK_OBJECT (priv->ui));
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
diff --git a/capplet/gnome-pilot-pdialog.c b/capplet/gnome-pilot-pdialog.c
index 36c51e1..2a49bc9 100644
--- a/capplet/gnome-pilot-pdialog.c
+++ b/capplet/gnome-pilot-pdialog.c
@@ -28,7 +28,6 @@
*/
#include <sys/stat.h>
-#include <glade/glade.h>
#include <pi-util.h>
#include "pilot.h"
#include "util.h"
@@ -39,7 +38,7 @@ static GtkObjectClass *parent_class = NULL;
struct _GnomePilotPDialogPrivate
{
- GladeXML *xml;
+ GtkBuilder *ui;
GnomePilotClient *gpc;
gint handle1, handle2;
@@ -132,23 +131,26 @@ static void
init (GnomePilotPDialog *gppd)
{
GnomePilotPDialogPrivate *priv;
-
+ guint error;
+ gchar *objects[] = {"PilotSettings", NULL};
+
priv = g_new0 (GnomePilotPDialogPrivate, 1);
gppd->priv = priv;
/* Gui stuff */
- priv->xml = glade_xml_new ("gpilotd-capplet.glade", "PilotSettings", NULL);
- if (!priv->xml) {
- priv->xml = glade_xml_new (GLADEDATADIR "/gpilotd-capplet.glade", "PilotSettings", NULL);
- if (!priv->xml) {
- g_message ("gnome-pilot-pdialog init(): Could not load the Glade XML file!");
+ priv->ui = gtk_builder_new ();
+ error = gtk_builder_add_objects_from_file (priv->ui, "gpilotd-capplet.ui", objects, NULL);
+ if (error == 0) {
+ error = gtk_builder_add_objects_from_file (priv->ui, UIDATADIR "/gpilotd-capplet.ui", objects, NULL);
+ if (error == 0) {
+ g_message ("gnome-pilot-pdialog init(): Could not load the GtkBuilder UI file!");
goto error;
}
}
if (!get_widgets (gppd)) {
- g_message ("gnome-pilot-pdialog init(): Could not find all widgets in the XML file!");
+ g_message ("gnome-pilot-pdialog init(): Could not find all widgets in the UI file!");
goto error;
}
@@ -202,7 +204,7 @@ get_widgets (GnomePilotPDialog *gppd)
priv = gppd->priv;
-#define GW(name) glade_xml_get_widget (priv->xml, name)
+#define GW(name) GTK_WIDGET (gtk_builder_get_object (priv->ui, name))
priv->dialog = GW ("PilotSettings");
@@ -301,6 +303,7 @@ gnome_pilot_pdialog_run_and_close (GnomePilotPDialog *gppd, GtkWindow *parent)
{
GnomePilotPDialogPrivate *priv;
gint btn;
+ gchar *IAMHERE;
priv = gppd->priv;
@@ -312,10 +315,10 @@ gnome_pilot_pdialog_run_and_close (GnomePilotPDialog *gppd, GtkWindow *parent)
if(
#ifdef PILOT_LINK_0_12
check_pilot_charset(gtk_entry_get_text(
- GTK_ENTRY(priv->pilot_charset))) &&
+ GTK_ENTRY(priv->pilot_charset)), &IAMHERE) &&
#endif
check_base_directory(gtk_entry_get_text(
- GTK_ENTRY(priv->pilot_basedir)))) {
+ GTK_ENTRY(priv->pilot_basedir)), &IAMHERE)) {
read_pilot_config (GTK_OBJECT (gppd),
priv->pilot);
break;
@@ -523,7 +526,7 @@ gppd_destroy (GtkObject *object)
priv = gppd->priv;
gtk_widget_destroy (priv->dialog);
- gtk_object_unref (GTK_OBJECT (priv->xml));
+ gtk_object_unref (GTK_OBJECT (priv->ui));
gtk_signal_disconnect_by_data (GTK_OBJECT (priv->gpc), object);
diff --git a/capplet/gpilotd-capplet.ui b/capplet/gpilotd-capplet.ui
new file mode 100644
index 0000000..b449487
--- /dev/null
+++ b/capplet/gpilotd-capplet.ui
@@ -0,0 +1,2038 @@
+<?xml version="1.0"?>
+<interface>
+ <!-- interface-requires gtk+ 2.12 -->
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkListStore" id="assistant_pilot_charset_store">
+ <columns>
+ <!-- column-name item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0">CP1252</col>
+ </row>
+ <row>
+ <col id="0">GB18030</col>
+ </row>
+ <row>
+ <col id="0">GBK</col>
+ </row>
+ <row>
+ <col id="0">BIG5</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="assistant_device_port_store">
+ <columns>
+ <!-- column-name item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0">/dev/pilot</col>
+ </row>
+ <row>
+ <col id="0">/dev/ttyUSB0</col>
+ </row>
+ <row>
+ <col id="0">/dev/ttyUSB1</col>
+ </row>
+ <row>
+ <col id="0">/dev/ttyS0</col>
+ </row>
+ <row>
+ <col id="0">/dev/ttyS1</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="pilot_charset_store">
+ <columns>
+ <!-- column-name item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0">CP1252</col>
+ </row>
+ <row>
+ <col id="0">GB18030</col>
+ </row>
+ <row>
+ <col id="0">GBK</col>
+ </row>
+ <row>
+ <col id="0">BIG5</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="device_speed_store">
+ <columns>
+ <!-- column-name label -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0">9600</col>
+ </row>
+ <row>
+ <col id="0">19200</col>
+ </row>
+ <row>
+ <col id="0">38400</col>
+ </row>
+ <row>
+ <col id="0">57600</col>
+ </row>
+ <row>
+ <col id="0">115200</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="assistant_device_speed_store">
+ <columns>
+ <!-- column-name label -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0">9600</col>
+ </row>
+ <row>
+ <col id="0">19200</col>
+ </row>
+ <row>
+ <col id="0">38400</col>
+ </row>
+ <row>
+ <col id="0">57600</col>
+ </row>
+ <row>
+ <col id="0">115200</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkWindow" id="Capplet">
+ <property name="title" translatable="yes">gnome-pilot Settings</property>
+ <child>
+ <object class="GtkNotebook" id="CappletMain">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="border_width">6</property>
+ <property name="show_border">False</property>
+ <child>
+ <object class="GtkVBox" id="vbox5">
+ <property name="visible">True</property>
+ <property name="border_width">12</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkTreeView" id="pilots_treeview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHButtonBox" id="hbuttonbox3">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="pilots_add_button">
+ <property name="label" translatable="yes">_Add...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="pilots_edit_button">
+ <property name="label" translatable="yes">_Edit...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="pilots_delete_button">
+ <property name="label" translatable="yes">_Delete</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_PDAs</property>
+ <property name="use_underline">True</property>
+ <property name="justify">center</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <property name="border_width">12</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkTreeView" id="devices_treeview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHButtonBox" id="hbuttonbox2">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="devices_add_button">
+ <property name="label" translatable="yes">_Add...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="devices_edit_button">
+ <property name="label" translatable="yes">_Edit...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="devices_delete_button">
+ <property name="label" translatable="yes">_Delete</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">De_vices</property>
+ <property name="use_underline">True</property>
+ <property name="justify">center</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox18">
+ <property name="visible">True</property>
+ <property name="border_width">12</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkTable" id="table13">
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label156">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">P_DA:</property>
+ <property name="use_underline">True</property>
+ <property name="justify">center</property>
+ </object>
+ <packing>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="username_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="justify">center</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label157">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Owner:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="pilots_combo">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="table14">
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkVButtonBox" id="vbuttonbox5">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="conduit_enable_button">
+ <property name="label" translatable="yes">_Enable</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="conduit_disable_button">
+ <property name="label" translatable="yes">D_isable</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="conduit_settings_button">
+ <property name="label" translatable="yes">_Settings...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox10">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label196">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Description:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="description_label">
+ <property name="visible">True</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTreeView" id="conduit_treeview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label152">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">C_onduits</property>
+ <property name="use_underline">True</property>
+ <property name="justify">center</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <object class="GtkDialog" id="ConduitSettings">
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Conduit Settings</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="type_hint">dialog</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox5">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkTable" id="master_table1">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label169">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Conduit Actions</b></property>
+ <property name="use_markup">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label171">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="xpad">6</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="interior_table">
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label172">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Action:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label173">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_One time action:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="sync_one_actions_combo">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="sync_actions_combo">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="settings_frame">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label170">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Conduit Settings</b></property>
+ <property name="use_markup">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label174">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="xpad">6</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_SHRINK</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="options_frame">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area6">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancelbutton1">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="okbutton1">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">cancelbutton1</action-widget>
+ <action-widget response="-5">okbutton1</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkDialog" id="ChooseDevice">
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Choose Device</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="type_hint">dialog</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox7">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkHBox" id="hbox7">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="yalign">0</property>
+ <property name="stock">gtk-dialog-question</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox19">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label180">
+ <property name="visible">True</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes"><span weight="bold" size="larger">Which device should be used for this operation?</span>
+
+Since you have more than one connection device defined for this computer you need to identify which one is to be used for this operation.</property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox8">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label181">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Device:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="device_combo">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area8">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancelbutton3">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="okbutton3">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">cancelbutton3</action-widget>
+ <action-widget response="-5">okbutton3</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkDialog" id="PilotSettings">
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">PDA Settings</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="type_hint">dialog</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox8">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkTable" id="table15">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label183">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">O_wner:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">pilot_username_entry</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label184">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label185">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_PDA ID:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">pilot_id_entry</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="pilot_username_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="pilot_id_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label182">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>PDA Identification</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox9">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkButton" id="get_from_pilot_button">
+ <property name="label" translatable="yes">_Get from PDA</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Get the Owner's name and ID from the PDA</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="send_to_pilot_button">
+ <property name="label" translatable="yes">_Send to PDA</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Send the Owner's name and ID to the PDA, overwriting any existing identity</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="table16">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label189">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes"><b>PDA Attributes</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label190">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label187">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Name of PDA:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">pilot_name_entry</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label197">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Local folder:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">pilot_basedir_entry</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="pilot_name_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">The name for your PDA. It is only used for identification.</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="pilot_basedir_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">Set the root directory for all PDA files to be stored.</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pilot_charset_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">C_harset of PDA:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxEntry" id="pilot_charset_combo">
+ <property name="visible">True</property>
+ <property name="model">pilot_charset_store</property>
+ <property name="active">0</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area9">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancelbutton4">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="okbutton4">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">cancelbutton4</action-widget>
+ <action-widget response="-5">okbutton4</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkDialog" id="DeviceSettings">
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Device Settings</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="type_hint">dialog</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox9">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkTable" id="table17">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label191">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Name:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">device_name_entry</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="device_name_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="device_speed_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">S_peed:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label195">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Type:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox5">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="serial_radio">
+ <property name="label" translatable="yes">_Serial</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="usb_radio">
+ <property name="label" translatable="yes">_USB</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">serial_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="irda_radio">
+ <property name="label" translatable="yes">I_rDA</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">serial_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="network_radio">
+ <property name="label" translatable="yes">Net_work</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">serial_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="bluetooth_radio">
+ <property name="label" translatable="yes">_Bluetooth</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">serial_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="device_port_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Device:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label194">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Ti_meout:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">timeout_spinner</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="timeout_spinner">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">timeout_adjustment</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="device_speed_combo">
+ <property name="visible">True</property>
+ <property name="model">device_speed_store</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxEntry" id="device_port_combo">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area10">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancelbutton5">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="okbutton5">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">cancelbutton5</action-widget>
+ <action-widget response="-5">okbutton5</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkAssistant" id="Assistant">
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">gnome-pilot Settings</property>
+ <property name="modal">True</property>
+ <child>
+ <object class="GtkLabel" id="page_welcome">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">You seem to be running gnome-pilot for the first time.
+The following steps will setup gnome-pilot for syncing.
+You can always change any options later from
+PilotLink panel in Gnome Control Center.
+
+Press 'Forward' to continue.
+Press 'Cancel' to exit.</property>
+ </object>
+ <packing>
+ <property name="page_type">intro</property>
+ <property name="title" translatable="yes">Welcome to gnome-pilot!</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="page_cradle">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">9</property>
+ <property name="row_spacing">4</property>
+ <child>
+ <object class="GtkComboBoxEntry" id="assistant_device_port_combo">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+<!-- <property name="active">1</property> -->
+<!-- <property
+name="model">assistant_device_port_store</property> -->
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext2"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+<!-- <child internal-child="accessible">
+ <object class="AtkObject" id="assistant_device_port_combo-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes">Port</property>
+ </object>
+ </child> -->
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="assistant_device_speed_combo">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="active">3</property>
+ <property name="model">assistant_device_speed_store</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext3"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="assistant_device_name_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">•</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label105">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Name:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">assistant_device_name_entry</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="assistant_device_port_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Device:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="assistant_device_speed_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">S_peed:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label120">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Type:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox4">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkRadioButton" id="assistant_serial_radio">
+ <property name="label" translatable="yes">_Serial</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="assistant_usb_radio">
+ <property name="label" translatable="yes">_USB</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">assistant_serial_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="assistant_irda_radio">
+ <property name="label" translatable="yes">_IrDA</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">assistant_serial_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="assistant_network_radio">
+ <property name="label" translatable="yes">Net_work</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">assistant_serial_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="assistant_bluetooth_radio">
+ <property name="label" translatable="yes">_Bluetooth</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">assistant_serial_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label149">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Ti_meout:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">assistant_device_timeout_spinner</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="assistant_device_timeout_spinner">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">•</property>
+ <property name="adjustment">assistant_device_timeout_adjustment</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="title" translatable="yes">Device Settings</property>
+ <property name="header_image">gnome-palm.png</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="page_error">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="title" translatable="yes">Please fix the
+following problem...</property>
+ <property name="header_image">gnome-palm.png</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="page_pilot1">
+ <property name="visible">True</property>
+ <property name="border_width">7</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkRadioButton" id="yes_radio_button">
+ <property name="label" translatable="yes">_Yes, I've used sync software with this PDA before.</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Choose this option if you have used sync software before, even on another computer</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="no_radio_button">
+ <property name="label" translatable="yes">_No, I've never used sync software with this PDA before.</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">yes_radio_button</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="pilot_user_frame">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="label_xalign">0</property>
+ <child>
+ <object class="GtkTable" id="table5">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">9</property>
+ <property name="row_spacing">4</property>
+ <child>
+ <object class="GtkEntry" id="assistant_pilot_username_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">Enter Owner Name you want stored on your PDA</property>
+ <property name="invisible_char">•</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="assistant_pilot_id_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">This integer ID identifies your PDA and must be unique between different PDAs that you use.</property>
+ <property name="invisible_char">•</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label109">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_PDA ID:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">assistant_pilot_id_entry</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label108">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Owner:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">assistant_pilot_username_entry</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label166">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Owner Name and ID to set on the PDA</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="title" translatable="yes">PDA Identification</property>
+ <property name="header_image">gnome-palm.png</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="page_sync">
+ <property name="visible">True</property>
+ <property name="border_width">16</property>
+ <property name="orientation">vertical</property>
+ </object>
+ <packing>
+ <property name="title" translatable="yes">Initial Sync</property>
+ <property name="header_image">gnome-palm.png</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="page_pilot2">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">9</property>
+ <property name="row_spacing">4</property>
+ <child>
+ <object class="GtkEntry" id="assistant_pilot_name_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">The name for your PDA. It is only used for identification.</property>
+ <property name="invisible_char">•</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="assistant_pilot_basedir_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">Set the root directory for all PDA files to be stored.</property>
+ <property name="invisible_char">•</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxEntry" id="assistant_pilot_charset_combo">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="model">assistant_pilot_charset_store</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext4"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label115">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Local folder:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">assistant_pilot_basedir_entry</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label114">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Name of PDA:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">assistant_pilot_name_entry</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="assistant_pilot_charset_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">C_harset of PDA:</property>
+ <property name="use_underline">True</property>
+ <property name="justify">center</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="title" translatable="yes">PDA Attributes</property>
+ <property name="header_image">gnome-palm.png</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="page_finish">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Congratulations, gnome-pilot is configured!
+
+You can change gnome-pilot settings at any time from
+PilotLink and Conduits tabs in control center.
+
+You can monitor syncing of gnome-pilot by adding
+PilotLink applet to your panel.</property>
+ </object>
+ <packing>
+ <property name="page_type">summary</property>
+ <property name="title" translatable="yes">Success</property>
+ </packing>
+ </child>
+ </object>
+ <object class="GtkAdjustment" id="assistant_device_timeout_adjustment">
+ <property name="value">2</property>
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="timeout_adjustment">
+ <property name="value">2</property>
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+</interface>
diff --git a/capplet/gpilotd-control-applet.c b/capplet/gpilotd-control-applet.c
index d96fda2..91ec7cc 100644
--- a/capplet/gpilotd-control-applet.c
+++ b/capplet/gpilotd-control-applet.c
@@ -29,13 +29,12 @@
#include <config.h>
#include <ctype.h>
-#include <glade/glade.h>
#include <libgnomeui/gnome-window-icon.h>
#include <libgnomeui/gnome-ui-init.h>
#include <gpilotd/gnome-pilot-client.h>
-#include "gnome-pilot-druid.h"
+#include "gnome-pilot-assistant.h"
#include "gnome-pilot-capplet.h"
#include <bonobo-activation/bonobo-activation.h>
@@ -75,10 +74,10 @@ main (int argc, char *argv[])
GnomePilotClient *gpc = NULL;
PilotState *state = NULL;
GnomePilotCapplet *gpcap = NULL;
- gboolean druid_on = FALSE, druid_prog = FALSE;
+ gboolean assistant_on = FALSE, assistant_prog = FALSE;
struct poptOption options[] = {
- {"druid", '\0', POPT_ARG_NONE, &druid_on, 0, N_("Start druid only"), NULL},
+ {"assistant", '\0', POPT_ARG_NONE, &assistant_on, 0, "Start assistant only", NULL}, /* FIXME: Make N_() translatable after string freeze */
{NULL, '\0', 0, NULL, 0, NULL, NULL}
};
@@ -93,8 +92,8 @@ main (int argc, char *argv[])
VERSION, argc, argv,
options,0,NULL);
- druid_on = TRUE;
- druid_prog = TRUE;
+ assistant_on = TRUE;
+ assistant_prog = TRUE;
} else {
/* we're a capplet (we get CORBA for free from capplet_init) */
switch (gnome_init_with_popt_table ("gpilotd-control-applet", VERSION, argc, argv,
@@ -106,9 +105,6 @@ main (int argc, char *argv[])
}
gnome_window_icon_set_default_from_file (GNOME_ICONDIR"/gnome-palm.png");
- /* we using glade */
- glade_gnome_init ();
-
/* put all code to set things up in here */
if (loadPilotState (&state) < 0) {
error_dialog (NULL, _("Error loading PDA state, aborting"));
@@ -125,36 +121,36 @@ main (int argc, char *argv[])
}
monitor_pilots (gpc, state);
- if (druid_on) {
- GtkObject *druid;
+ if (assistant_on) {
+ GtkObject *assistant;
if (state->pilots!= NULL || state->devices!= NULL) {
- error_dialog (NULL, _("Cannot run druid if PDAs or devices already configured"));
+ error_dialog (NULL, "Cannot run assistant if PDAs or devices already configured"); /* FIXME: Make translatable after string freeze */
return -1;
}
- druid = gnome_pilot_druid_new (gpc);
- gnome_pilot_druid_run_and_close (GNOME_PILOT_DRUID (druid));
+ assistant = gnome_pilot_assistant_new (gpc);
+ gnome_pilot_assistant_run_and_close (GNOME_PILOT_ASSISTANT (assistant));
} else {
- gboolean druid_finished = TRUE;
+ gboolean assistant_finished = TRUE;
gpcap = gnome_pilot_capplet_new (gpc);
/* quit when the Close button is clicked on our dialog */
g_signal_connect (G_OBJECT (gpcap), "response", G_CALLBACK (response_cb), NULL);
- /* popup the druid if nothing is configured - assume this is the first time */
+ /* popup the assistant if nothing is configured - assume this is the first time */
if (state->pilots == NULL && state->devices == NULL) {
- GtkObject *druid;
+ GtkObject *assistant;
- druid = gnome_pilot_druid_new (gpc);
- druid_finished = gnome_pilot_druid_run_and_close (GNOME_PILOT_DRUID (druid));
+ assistant = gnome_pilot_assistant_new (gpc);
+ assistant_finished = gnome_pilot_assistant_run_and_close (GNOME_PILOT_ASSISTANT (assistant));
if (gpcap != NULL)
gnome_pilot_capplet_update (GNOME_PILOT_CAPPLET (gpcap));
}
- if (druid_finished) {
+ if (assistant_finished) {
gtk_widget_show (GTK_WIDGET (gpcap));
gtk_main ();
}
diff --git a/capplet/util.c b/capplet/util.c
index 56aa8f8..b8b4ebf 100644
--- a/capplet/util.c
+++ b/capplet/util.c
@@ -26,40 +26,11 @@
#include <sys/stat.h>
#include <errno.h>
#include <ctype.h>
-#include <glade/glade.h>
#include <errno.h>
#include "util.h"
#include <iconv.h>
+#include <gtk/gtk.h>
-static const guint speedList[] = {9600, 19200, 38400, 57600, 115200, 0};
-#define DEFAULT_SPEED_INDEX 3 /* Default to 57600 */
-
-void
-fill_speed_menu (GtkOptionMenu *option_menu, guint default_speed)
-{
- gint i = 0, n = DEFAULT_SPEED_INDEX;
- GtkWidget *menu ,*menu_item;
- gchar buf[20];
-
- g_return_if_fail (option_menu != NULL);
- g_return_if_fail (GTK_IS_OPTION_MENU (option_menu));
-
- menu = gtk_menu_new ();
-
- while (speedList[i] != 0) {
- g_snprintf (buf,sizeof (buf),"%d",speedList[i]);
- menu_item = gtk_menu_item_new_with_label (buf);
- gtk_widget_show (menu_item);
- gtk_object_set_data (GTK_OBJECT (menu_item), "speed", GINT_TO_POINTER (speedList[i]));
- gtk_menu_append (GTK_MENU (menu),menu_item);
-
- if (speedList[i] == default_speed)
- n = i;
- i++;
- }
- gtk_option_menu_set_menu (option_menu, menu);
- gtk_option_menu_set_history (option_menu, n);
-}
void
fill_conduit_sync_type_menu (GtkOptionMenu *option_menu, ConduitState *state)
@@ -185,15 +156,17 @@ get_default_pilot_charset(void) {
static GPilotDevice *
real_choose_pilot_dialog (PilotState *state)
{
- GladeXML *xml;
+ GtkBuilder *ui;
GtkWidget *dlg;
GtkWidget *option_menu, *menu_item, *menu;
GList *tmp;
GPilotDevice *dev;
+ gchar *objects[] = {"ChooseDevice", NULL};
- xml = glade_xml_new (GLADEDATADIR "/gpilotd-capplet.glade", "ChooseDevice", NULL);
- dlg = glade_xml_get_widget (xml,"ChooseDevice");
- option_menu = glade_xml_get_widget (xml, "device_menu");
+ ui = gtk_builder_new ();
+ gtk_builder_add_objects_from_file (ui, UIDATADIR "/gpilotd-capplet.ui", objects, NULL);
+ dlg = GTK_WIDGET (gtk_builder_get_object (ui,"ChooseDevice"));
+ option_menu = GTK_WIDGET (gtk_builder_get_object (ui, "device_menu"));
gtk_object_set_data (GTK_OBJECT (dlg), "device_menu", option_menu);
@@ -269,7 +242,8 @@ get_default_device (PilotState *state)
device->name = next_cradle_name (state);
device->port = g_strdup ("/dev/pilot");
- device->speed = speedList[DEFAULT_SPEED_INDEX];
+ /* XXX */
+ // device->speed = speedList[DEFAULT_SPEED_INDEX];
device->type = PILOT_DEVICE_SERIAL;
device->timeout = 2;
@@ -463,44 +437,42 @@ check_device_info (GPilotDevice* device1, GPilotDevice *device2)
}
gboolean
-check_base_directory (const gchar *dir_name)
+check_base_directory (const gchar *dir_name, gchar **errstr)
{
gboolean ret = TRUE;
/* check basedir validity */
if (mkdir (dir_name, 0700) < 0 ) {
struct stat buf;
- gchar *errstr;
switch (errno) {
case EEXIST:
stat (dir_name, &buf);
if (S_ISDIR (buf.st_mode)) {
if (!(buf.st_mode & (S_IRUSR | S_IWUSR |S_IXUSR))) {
- error_dialog (NULL, _("The specified base directory exists but has the wrong permissions.\n"
- "Please fix or choose another directory"));
+ *errstr = g_strdup(_("The specified base directory exists but has the wrong permissions.\n"
+ "Please fix or choose another directory"));;
ret = FALSE;
}
} else {
- error_dialog (NULL, _("The specified base directory exists but is not a directory.\n"
+ *errstr = g_strdup (_("The specified base directory exists but is not a directory.\n"
"Please make it a directory or choose another directory"));
ret = FALSE;
}
break;
case EACCES:
- error_dialog (NULL, _("It wasn't possible to create the specified base directory.\n"
+ *errstr = g_strdup(_("It wasn't possible to create the specified base directory.\n"
"Please verify the permitions on the specified path or choose another directory"));
ret = FALSE;
break;
case ENOENT:
- error_dialog (NULL, _("The path specified for the base directory is invalid.\n"
+ *errstr = g_strdup (_("The path specified for the base directory is invalid.\n"
"Please choose another directory"));
ret = FALSE;
break;
default:
- errstr = strerror (errno);
- error_dialog (NULL, errstr);
- ret = FALSE;
+ *errstr = g_strdup(strerror (errno));
+ ret = FALSE;
}
}
return ret;
@@ -510,7 +482,7 @@ check_base_directory (const gchar *dir_name)
* return TRUE if it's valid, or FALSE otherwise.
*/
gboolean
-check_pilot_charset (const gchar *charset)
+check_pilot_charset (const gchar *charset, gchar **errstr)
{
#ifndef PILOT_LINK_0_12
return TRUE;
@@ -521,10 +493,10 @@ check_pilot_charset (const gchar *charset)
return TRUE;
cd = iconv_open(charset, "UTF8");
if (cd == (iconv_t)-1) {
- error_dialog (NULL, _("`%s' is not a valid character set"
- " identifier. Please enter a valid"
+ *errstr = g_strdup (g_strdup_printf(_("`%s' is not a valid character set"
+ " identifier.\nPlease enter a valid"
" identifier or select from the available"
- " options."), charset);
+ " options."), charset));
return FALSE;
}
@@ -537,14 +509,15 @@ check_pilot_charset (const gchar *charset)
void
read_device_config (GtkObject *object, GPilotDevice* device)
{
- GtkWidget *port_entry, *speed_menu, *item, *name_entry;
+ GtkWidget *port_entry, *speed_combo, *item, *name_entry;
GtkWidget *usb_radio, *irda_radio, *network_radio, *timeout_spinner, *bluetooth_radio;
+ GtkTreeIter iter;
g_return_if_fail (device!= NULL);
port_entry = gtk_object_get_data (GTK_OBJECT (object), "port_entry");
name_entry = gtk_object_get_data (GTK_OBJECT (object), "name_entry");
- speed_menu = gtk_object_get_data (GTK_OBJECT (object), "speed_menu");
+ speed_combo = gtk_object_get_data (GTK_OBJECT (object), "speed_combo");
usb_radio = gtk_object_get_data (GTK_OBJECT (object), "usb_radio");
irda_radio = gtk_object_get_data (GTK_OBJECT (object), "irda_radio");
network_radio = gtk_object_get_data (GTK_OBJECT (object), "network_radio");
@@ -560,9 +533,10 @@ read_device_config (GtkObject *object, GPilotDevice* device)
device->name = g_strdup (gtk_entry_get_text (GTK_ENTRY (name_entry)));
if (device->name == NULL) device->name = g_strdup ("Cradle");
- item = gtk_option_menu_get_menu (GTK_OPTION_MENU (speed_menu));
- item = gtk_menu_get_active (GTK_MENU (item));
- device->speed = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (item), "speed"));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (speed_combo), &iter);
+ gtk_tree_model_get(gtk_combo_box_get_model(GTK_COMBO_BOX (speed_combo)),
+ &iter, 0, &item, -1);
+ sscanf((gchar *)item, "%d", &device->speed);
device->type = PILOT_DEVICE_SERIAL;
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (usb_radio))) {
@@ -629,10 +603,12 @@ save_config_and_restart (GnomePilotClient *gpc, PilotState *state)
gnome_pilot_client_reread_config (gpc);
}
+/* returns TRUE if the device passes basic sanity checks,
+ * otherwise, returns FALSE and an error-string in *errstr.
+ */
gboolean
-check_device_settings (GPilotDevice *device)
-{
-
+check_device_settings (GPilotDevice *device, char **errstr)
+{
char *str;
#ifndef WITH_HAL
struct stat buf;
@@ -645,9 +621,7 @@ check_device_settings (GPilotDevice *device)
if (strcmp(device->port, "usb:") == 0 && device->type != PILOT_DEVICE_NETWORK
&& device->type != PILOT_DEVICE_BLUETOOTH
&& device->type != PILOT_DEVICE_USB_VISOR) {
- str = g_strdup (_("Device 'usb:' is only valid for devices of type USB"));
- error_dialog (NULL, str);
- g_free (str);
+ *errstr = g_strdup (_("Device 'usb:' is only valid for devices of type USB"));
return FALSE;
}
#endif
@@ -655,12 +629,10 @@ check_device_settings (GPilotDevice *device)
if (device->type == PILOT_DEVICE_SERIAL) {
g_message ("checking rw on %s", device->port);
if (access (device->port, R_OK|W_OK)) {
- str = g_strdup_printf ("%s\n%s (%s)\n%s",
+ *errstr = g_strdup_printf ("%s\n%s (%s)\n%s",
_("Read/Write permissions failed on"),
device->name, device->port,
_("Check the permissions on the device and retry"));
- error_dialog (NULL, str);
- g_free (str);
return FALSE;
}
#ifndef WITH_HAL
@@ -672,13 +644,11 @@ check_device_settings (GPilotDevice *device)
stat ("/proc/bus/usb/devices_please-use-sysfs-instead", &buf) != 0) ||
!(S_ISREG(buf.st_mode)) ||
!(buf.st_mode & S_IRUSR))) {
- str = g_strdup_printf (
+ *errstr = g_strdup_printf (
_("Failed to find directory %s or read file %s. "
"Check that usbfs or sysfs is mounted."),
sysfs_dir,
usbdevicesfile_str);
- error_dialog (NULL, str);
- g_free (str);
return FALSE;
}
#endif /* linux */
diff --git a/capplet/util.h b/capplet/util.h
index 687f3c1..f1d4649 100644
--- a/capplet/util.h
+++ b/capplet/util.h
@@ -26,7 +26,6 @@
#include "pilot.h"
/* Gui routines */
-void fill_speed_menu (GtkOptionMenu *optionMenu, guint default_speed);
void fill_synctype_menu (GtkOptionMenu *optionMenu, GnomePilotConduitSyncType type);
void fill_conduit_sync_type_menu (GtkOptionMenu *option_menu, ConduitState *state);
void fill_conduit_first_sync_type_menu (GtkOptionMenu *option_menu, ConduitState *state);
@@ -56,8 +55,8 @@ const gchar* display_sync_type_name (gboolean enabled, GnomePilotConduitSyncType
gboolean check_pilot_info (GPilotPilot* pilot1, GPilotPilot *pilot2);
gboolean check_device_info (GPilotDevice* device1, GPilotDevice *device2);
-gboolean check_base_directory (const gchar *dir_name);
-gboolean check_pilot_charset (const gchar *charset);
+gboolean check_base_directory (const gchar *dir_name, gchar **errstr);
+gboolean check_pilot_charset (const gchar *charset, gchar **errstr);
/* Dialogs */
void error_dialog (GtkWindow *parent, gchar *mesg, ...);
@@ -69,4 +68,4 @@ void read_pilot_config (GtkObject *object, GPilotPilot *pilot);
void save_config_and_restart (GnomePilotClient *gpc, PilotState *state);
-gboolean check_device_settings (GPilotDevice *device);
+gboolean check_device_settings (GPilotDevice *device, char **errstr);
diff --git a/configure.in b/configure.in
index 9e5ff3f..d111542 100644
--- a/configure.in
+++ b/configure.in
@@ -153,7 +153,6 @@ dnl ******************************
LIBXML_REQUIRED="libxml-2.0"
LIBGNOME_REQUIRED="libgnome-2.0 >= 2.0.0"
LIBGNOMEUI_REQUIRED="libgnomeui-2.0 >= 2.0.0"
-LIBGLADE_REQUIRED="libglade-2.0 >= 2.0.0"
ORBIT_REQUIRED="ORBit-2.0 >= 2.0.0"
LIBBONOBO_REQUIRED="libbonobo-2.0 >= 2.0.0"
BONOBO_ACTIVATION_REQUIRED="bonobo-activation-2.0 >= 1.0.3"
@@ -165,7 +164,6 @@ PKG_CHECK_MODULES(GNOME_PILOT,
$LIBXML_REQUIRED
$LIBGNOME_REQUIRED
$LIBGNOMEUI_REQUIRED
- $LIBGLADE_REQUIRED
$LIBBONOBO_REQUIRED
$ORBIT_REQUIRED
$BONOBO_ACTIVATION_REQUIRED
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]