File tree Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,6 @@ def configuration_dialog(self):
20
20
pass
21
21
22
22
def connect_dialog (self ):
23
- pass
23
+ geany . dialogs . show_msgbox ( "Not yet implemented" , gtk . MESSAGE_ERROR )
24
24
25
25
Original file line number Diff line number Diff line change 1
- #!/usr/bin/env python
1
+ + #!/usr/bin/env python
2
2
# -*- coding: utf-8 -*-
3
3
import os
4
4
import sys
5
+ import geany
6
+ import gtk
7
+
5
8
import sqlanydb
6
9
sys .path .append (os .path .dirname (__file__ ))
7
10
from .geanypysqldb import GeanyPySQLDB
Original file line number Diff line number Diff line change 3
3
4
4
import sys
5
5
import os
6
+ import geany
7
+ import gtk
8
+
6
9
import sqlite3
7
10
sys .path .append (os .path .dirname (__file__ ))
8
11
from .geanypysqldb import GeanyPySQLDB
9
12
sys .path .remove (os .path .dirname (__file__ ))
10
13
14
+
11
15
class GPS_sqlite (GeanyPySQLDB ):
12
16
13
17
def __init__ (self , path = None ):
@@ -24,4 +28,19 @@ def disconnect(self):
24
28
self .connection .close ()
25
29
26
30
def connect_dialog (self ):
27
- pass
31
+
32
+ db_path = geany .dialogs .show_input (
33
+ title = "Path of sqlite DB" ,
34
+ parent = geany .main_widgets .window ,
35
+ label_text = "Please specify path of SQLite database" )
36
+ if os .path .isfile (db_path ):
37
+ self .path = db_path
38
+ try :
39
+ self .connect ()
40
+ print "Connected"
41
+ except :
42
+ geany .dialogs .show_msgbox ("Could not create connection" , gtk .MESSAGE_ERROR )
43
+ else :
44
+ geany .dialogs .show_msgbox ("Seems not to be a valid path" , gtk .MESSAGE_ERROR )
45
+
46
+
You can’t perform that action at this time.
0 commit comments