97
97
Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
100
pathEntry = new Entry ();
101
pathEntry.Text = syncPath;
102
table.Attach (pathEntry, 1, 2, 0, 1,
100
pathButton = new FileChooserButton (Catalog.GetString ("Select Synchronization Folder..."),
101
FileChooserAction.SelectFolder);
102
l.MnemonicWidget = pathButton;
103
pathButton.SetFilename (syncPath);
105
table.Attach (pathButton, 1, 2, 0, 1,
103
106
Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
104
107
Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
106
l.MnemonicWidget = pathEntry;
108
Image browseImage = new Image (Stock.Open, IconSize.Button);
109
Label browseLabel = new Label (Catalog.GetString ("_Browse..."));
111
HBox browseBox = new HBox (false, 0);
112
browseBox.PackStart (browseImage);
113
browseBox.PackStart (browseLabel);
115
Button browseButton = new Button ();
116
browseButton.Add (browseBox);
117
browseLabel.MnemonicWidget = browseButton;
118
browseButton.Clicked += OnBrowseButtonClicked;
119
table.Attach (browseButton, 2, 3, 0, 1, AttachOptions.Shrink, AttachOptions.Expand, 0, 0);
121
110
table.ShowAll ();
125
private void OnBrowseButtonClicked (object sender, EventArgs args)
127
FileChooserDialog chooserDlg =
128
new FileChooserDialog (Catalog.GetString ("Select Synchronization Folder..."),
130
FileChooserAction.SelectFolder,
131
Stock.Cancel, ResponseType.Cancel,
132
Stock.Ok, ResponseType.Ok);
133
chooserDlg.DefaultResponse = ResponseType.Cancel;
134
chooserDlg.SetFilename (pathEntry.Text);
136
ResponseType response = (ResponseType) chooserDlg.Run ();
138
if (response == ResponseType.Ok)
139
pathEntry.Text = chooserDlg.Filename;
141
chooserDlg.Destroy ();
145
115
/// The Addin should verify and check the connection to the service
146
116
/// when this is called. If verification and connection is successful,