[conduit/config-google: 20/20] Finished porting Google dataproviders to the new config



commit 8fddba56f64177502bd145f5e3ff69d20f92cdfb
Author: Alexandre Rosenfeld <airmind gmail com>
Date:   Fri May 15 11:45:40 2009 -0300

    Finished porting Google dataproviders to the new config
    
    Fixed None type error in XMLSerialization.py.
    Added image property to buttons in ConfigItems.py.
---
 conduit/XMLSerialization.py                        |   15 +-
 conduit/gtkui/ConfigItems.py                       |   22 +-
 conduit/modules/GoogleModule/GoogleModule.py       |  124 +++++-----
 conduit/modules/GoogleModule/Makefile.am           |    8 -
 conduit/modules/GoogleModule/contacts-config.glade |  260 --------------------
 .../modules/GoogleModule/documents-config.glade    |  216 ----------------
 conduit/modules/GoogleModule/picasa-config.glade   |  195 ---------------
 conduit/modules/GoogleModule/youtube-config.glade  |  215 ----------------
 8 files changed, 85 insertions(+), 970 deletions(-)

diff --git a/conduit/XMLSerialization.py b/conduit/XMLSerialization.py
index f4db41a..0a0daad 100644
--- a/conduit/XMLSerialization.py
+++ b/conduit/XMLSerialization.py
@@ -18,6 +18,9 @@
 from os.path import exists
 from xml.dom.minidom import parseString
 
+class Error(Exception):
+    pass
+
 class Settings( object ):
     """
     A class to store/retrieve data to/from an XML file
@@ -42,6 +45,10 @@ class Settings( object ):
             return int(string)
         elif desired_type == "str":
             return str(string) # 'just in case'
+        elif desired_type == "none":
+            return None
+        else:
+            raise Error("Type %s not recognized for value %s" % (desired_type, string))
 
     def __type_as_string__(self, data_type):
         """
@@ -61,6 +68,10 @@ class Settings( object ):
             return "str"
         elif type(data_type) == bool:
             return "bool"
+        elif data_type is None:
+            return "none"
+        else:
+            raise Error("Type for %s is not supported" % data_type)
 
     def __bool_from_string__(self, string):
         """
@@ -136,8 +147,8 @@ class Settings( object ):
         #node.setAttribute("name", str(name))
         if type(data) == dict:
             for (index, value) in data.iteritems():
-                node.appendChild( self.__data_to_node__(index, value ))
-        elif type(data) == list:
+                node.appendChild(self.__data_to_node__(index, value))
+        elif type(data) == list or type(data) == tuple:
             for (index, value) in enumerate(data):
                 node.appendChild(self.__data_to_node__("item", value))
         else:
diff --git a/conduit/gtkui/ConfigItems.py b/conduit/gtkui/ConfigItems.py
index 1c19887..be56032 100644
--- a/conduit/gtkui/ConfigItems.py
+++ b/conduit/gtkui/ConfigItems.py
@@ -107,8 +107,8 @@ class ItemBase(gobject.GObject):
     }
     
     def __init__(self, container, title, order, config_name = None,
-        config_type = None, choices = [], needs_label = True,
-        needs_space = False, initial_value = None, initial_value_callback = None,
+        config_type = None, choices = None, needs_label = True,
+        needs_space = None, initial_value = None, initial_value_callback = None,
         save_callback = None, fill = False, enabled = True, disable_check = False,
         disabled_value = None):
         '''
@@ -151,6 +151,8 @@ class ItemBase(gobject.GObject):
         self.__widget = None
         self.__label = None
         self.__enabled = enabled
+        if not choices:
+            choices = []
         self.__choices = choices
 
         # These properties do not need any special processing when changed, 
@@ -167,6 +169,9 @@ class ItemBase(gobject.GObject):
         # happen at the moment)
         self.title = title
         self.order = order
+        if needs_space is None and title is None:
+            needs_space = False
+            needs_label = False
         self.needs_label = needs_label
         self.needs_space = needs_space
         self.fill = fill
@@ -463,7 +468,7 @@ class ConfigButton(ItemBase):
     
     def __init__(self, *args, **kwargs):
         action = kwargs.pop('action', None)
-        image = kwargs.pop('image', None)
+        self.image = kwargs.pop('image', None)
         ItemBase.__init__(self, *args, **kwargs)
         self.callback = None
         self.needs_space = kwargs.get('needs_space', False)
@@ -471,7 +476,7 @@ class ConfigButton(ItemBase):
         if action:
             self.initial_value = action
         self.read_only = True
-        
+    
     def _button_clicked(self, button_widget):
         if self.callback:
             self.callback(self)
@@ -479,14 +484,12 @@ class ConfigButton(ItemBase):
     def _build_widget(self):
         self.widget = gtk.Alignment(1.0, 0.5, 0.0, 1.0)
         button_widget = gtk.Button(self.title)
+        if self.image:
+            button_widget.set_image(gtk.image_new_from_icon_name(self.image, gtk.ICON_SIZE_BUTTON))
         button_widget.connect("clicked", self._button_clicked)
         self.widget.add(button_widget)
         
     def _set_value(self, value):
-        #if self.callback_id:
-        #    self.widget.disconnect(self.callback_id)
-        #self.callback_id = None
-        #self.callback = None
         if value is not None and not callable(value):
             raise Error("Button callback must be callable (%s is not)" % (value))
         self.callback = value
@@ -571,6 +574,7 @@ class ConfigRadio(ItemBase):
     def _set_value(self, new_value):
         if new_value in self.buttons:
             self.buttons[new_value].set_active(True)
+            self._active_button = self.buttons[new_value]
         else:
             log.warn("Value %s could not be applied to config %s" % (new_value, self.title))
 
@@ -580,7 +584,7 @@ class ConfigSpin(ItemBase):
     def __init__(self, *args, **kwargs):
         self.maximum = kwargs.pop('maximum', sys.maxint)
         self.minimum = kwargs.pop('minimum', 0)
-        self.step = kwargs.pop('step', 1)        
+        self.step = kwargs.pop('step', 1)
         ItemBase.__init__(self, *args, **kwargs)
     
     def _build_widget(self):
diff --git a/conduit/modules/GoogleModule/GoogleModule.py b/conduit/modules/GoogleModule/GoogleModule.py
index 7519ac4..2d19855 100644
--- a/conduit/modules/GoogleModule/GoogleModule.py
+++ b/conduit/modules/GoogleModule/GoogleModule.py
@@ -61,6 +61,8 @@ class _GoogleBase:
         )
         self.loggedIn = False
         self.service = service
+        self._status = "Not authenticated"
+        self.status_config = None
         
         if conduit.GLOBALS.settings.proxy_enabled():
             log.info("Configuring proxy for %s" % self.service)
@@ -81,22 +83,35 @@ class _GoogleBase:
                 self._do_login()
                 self.loggedIn = True
                 self.authenticated = True
+                self._set_status("Authenticated")
             except gdata.service.BadAuthentication:
                 log.info("Error logging in: Incorrect username or password")
+                self._set_status("Incorrect username or password")
             except Exception, e:
                 log.info("Error logging in: %s" % e)
-       
+                self._set_status("Error logging in")
+            else:
+                self._login_finished()
+                
+    def _set_status(self, status):
+        self._status = status
+        if self.status_config:
+            self.status_config.value = status
+
+    def _reset_authentication(self):
+        self.loggedIn = False
+        self.authenticated = False
+        self._set_status("Not authenticated")
+    
     def _set_username(self, username):
         if self.username != username:
             self.username = username
-            self.loggedIn = False
-            self.authenticated = False
+            self._reset_authentication()
     
     def _set_password(self, password):
         if self.password != password:
             self.password = password
-            self.loggedIn = False
-            self.authenticated = False
+            self._reset_authentication()
             
     def _login_finished(self):
         pass
@@ -105,7 +120,15 @@ class _GoogleBase:
         config.add_section("Google Account")
         username_config = config.add_item("Email", "text", config_name = "username")
         password_config = config.add_item("Password", "text", config_name = "password", password = True)
-        config.add_item("Login", "button")
+        
+        def _login(button):
+            config.apply_config(items = [username_config, password_config])
+            self._login()
+
+        if self.authenticated:
+            self._set_status("Authenticated")
+        self.status_config = config.add_item(None, "label", xalignment = 0.5, initial_value = self._status)
+        config.add_item("Authenticate", "button", image="dialog-password", action = _login)
         return username_config, password_config
 
     def is_configured (self, isSource, isTwoWay):
@@ -694,17 +717,16 @@ class PicasaTwoWay(_GoogleBase, Image.ImageTwoWay):
 
         self.service.Delete(self.gphoto_dict[LUID])
         del self.gphoto_dict[LUID]
+
+    def _login_finished(self):
+        if self.albums_config:
+            self.albums_config.choices = [album_name for album_name, album in self._get_albums()]
         
     def config_setup(self, config):
         username_config, password_config = _GoogleBase.config_setup(self, config)
-
-        def _load_albums(button):
-            config.apply_config(items = [username_config, password_config])
-            albums_config.choices = [album_name for album_name, album in self._get_albums()]
         
         config.add_section("Saved photo settings")
-        albums_config = config.add_item("Album", "combotext", config_name = "albumName")
-        config.add_item("Load albums", "button", action = _load_albums)
+        self.albums_config = config.add_item("Album", "combotext", config_name = "albumName")
         config.add_item("Resize photos", "combo", config_name = "imageSize", 
             choices = [self.NO_RESIZE] + self.IMAGE_SIZES)
 
@@ -734,6 +756,7 @@ class ContactsTwoWay(_GoogleBase,  DataProvider.TwoWay):
         self.update_configuration(
             selectedGroup = (None, self._set_contact_group, self._get_contact_group),
         )
+        self.group_config = None
 
     def _get_contact_group(self):
         if not self.selectedGroup:
@@ -752,7 +775,7 @@ class ContactsTwoWay(_GoogleBase,  DataProvider.TwoWay):
                 raise TypeError
             self.selectedGroup = _GoogleContactGroup(*value)
         except TypeError:
-            log.error("Unknown group information")
+            log.error("Unknown group information: %s" % str(value))
         
     def _google_contact_from_conduit_contact(self, contact, gc=None):
         """
@@ -952,61 +975,30 @@ class ContactsTwoWay(_GoogleBase,  DataProvider.TwoWay):
 
     def _get_all_groups(self):
         '''Get a list of addressbook groups'''
-        self._do_login()
+        self._login()
         #System Groups are only returned in version 2 of the API
         query=gdata.contacts.service.GroupsQuery()
         query['v']='2'
         feed = self.service.GetContactsFeed(query.ToUri())
         for entry in feed.entry:
             yield _GoogleContactGroup.from_google_format(entry)
+
+    def _login_finished(self):
+        if self.group_config:
+            groups = self._get_all_groups()
+            self.group_config.choices = [(group, group.get_name()) for group in groups]        
         
     def config_setup(self, config):
         username_config, password_config = _GoogleBase.config_setup(self, config)
-
-        def _load_groups(item):
-            config.apply_config(items = [username_config, password_config])
-            groups = self._get_all_groups()
-            group_config.choices = [(group, group.get_name()) for group in groups]
         
         config.add_section("Contacts group")
-        group_config = config.add_item("Group", "combo", config_name = "selectedGroup")
-        load_group_config = config.add_item("Load contact groups", "button", action = _load_groups)
-        
-    #TODO Test Contacts new config and remove old config
-    def configure_(self, window):
-        """
-        Configures the PicasaTwoWay
-        """
-        widget = Utils.dataprovider_glade_get_widget(
-                        __file__, 
-                        "contacts-config.glade", 
-                        "GoogleContactsConfigDialog")
-                        
-        #get a whole bunch of widgets
-        username = widget.get_widget("username")
-        password = widget.get_widget("password")
-        group = widget.get_widget("Group")
-        store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_PYOBJECT)
-        group.set_model(store)
-        
-        #preload the widgets        
-        username.set_text(self.username)
-        password.set_text(self.password)
-        
-        signalConnections = { "on_getGroups_clicked" : (self._load_groups, widget) }
-        widget.signal_autoconnect( signalConnections )
-        
-        if self.selectedGroup is not None:
-            rowref = store.append( (self.selectedGroup.get_name(), self.selectedGroup) )
-            group.set_active_iter(rowref)
-            
-        dlg = widget.get_widget("GoogleContactsConfigDialog")
-        response = Utils.run_dialog (dlg, window)
-        if response == True:
-            self._set_username(username.get_text())
-            self._set_password(password.get_text())
-            self.selectedGroup = store.get_value(group.get_active_iter(),1)
-        dlg.destroy()
+        if self.selectedGroup:
+            choices = [(self.selectedGroup, self.selectedGroup.get_name())]
+        self.group_config = config.add_item("Group", "combo", 
+            config_name = "selectedGroup",
+            initial_value_callback = lambda item: self.selectedGroup,
+            choices = choices,
+        )
 
     def is_configured (self, isSource, isTwoWay):
         if not _GoogleBase.is_configured(self, isSource, isTwoWay):
@@ -1027,6 +1019,8 @@ class _GoogleContactGroup:
         return cls(name, uri)
         
     def __eq__(self, other):
+        if not isinstance(other, _GoogleContactGroup):
+            return False
         if other is None:
             return False
         else:
@@ -1296,14 +1290,14 @@ class DocumentsSink(_GoogleBase,  DataProvider.DataSink):
     def config_setup(self, config):
         username_config, password_config = _GoogleBase.config_setup(self, config)
         
-        config.add_section("Downloaded document format")
-        
-        config.add_item("Documents", "combo", config_name = "documentFormat",
-            choices = self.SUPPORTED_DOCUMENTS)
-        config.add_item("Spreadsheets", "combo", config_name = "spreadsheetFormat",
-            choices = self.SUPPORTED_SPREADSHEETS)
-        config.add_item("Presentations", "combo", config_name = "presentationFormat",
-            choices = self.SUPPORTED_PRESENTATIONS)
+        #FIXME: It seems this is disabled in the old code
+        #config.add_section("Downloaded document format")
+        #config.add_item("Documents", "combo", config_name = "documentFormat",
+        #    choices = self.SUPPORTED_DOCUMENTS)
+        #config.add_item("Spreadsheets", "combo", config_name = "spreadsheetFormat",
+        #    choices = self.SUPPORTED_SPREADSHEETS)
+        #config.add_item("Presentations", "combo", config_name = "presentationFormat",
+        #    choices = self.SUPPORTED_PRESENTATIONS)
 
 class VideoUploadInfo:
     """
diff --git a/conduit/modules/GoogleModule/Makefile.am b/conduit/modules/GoogleModule/Makefile.am
index a738736..44cf639 100644
--- a/conduit/modules/GoogleModule/Makefile.am
+++ b/conduit/modules/GoogleModule/Makefile.am
@@ -5,17 +5,9 @@ conduit_handlers_PYTHON = GoogleModule.py
 
 conduit_handlers_DATA = \
 	calendar-config.glade \
-	picasa-config.glade \
-	youtube-config.glade \
-	contacts-config.glade \
-	documents-config.glade
 
 EXTRA_DIST = \
 	calendar-config.glade \
-	picasa-config.glade \
-	youtube-config.glade \
-	contacts-config.glade \
-	documents-config.glade
 
 clean-local:
 	rm -rf *.pyc *.pyo
diff --git a/conduit/modules/GoogleModule/contacts-config.glade b/conduit/modules/GoogleModule/contacts-config.glade
deleted file mode 100644
index c94f1d0..0000000
--- a/conduit/modules/GoogleModule/contacts-config.glade
+++ /dev/null
@@ -1,260 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
-
-<glade-interface>
-
-<widget class="GtkDialog" id="GoogleContactsConfigDialog">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Google Contacts</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="default_width">250</property>
-  <property name="default_height">350</property>
-  <property name="resizable">False</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <property name="has_separator">True</property>
-
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="vbox30">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">5</property>
-
-      <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="hbuttonbox12">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-	  <child>
-	    <widget class="GtkButton" id="button32">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-cancel</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-6</property>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="okBtn">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-5</property>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkComboBox" id="Group">
-	  <property name="visible">True</property>
-	  <property name="can_default">True</property>
-	  <property name="has_default">True</property>
-	  <property name="items" translatable="yes"></property>
-	  <property name="add_tearoffs">False</property>
-	  <property name="focus_on_click">True</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkLabel" id="label77">
-	  <property name="visible">True</property>
-	  <property name="label" translatable="yes">&lt;b&gt;Group&lt;/b&gt;</property>
-	  <property name="use_underline">False</property>
-	  <property name="use_markup">True</property>
-	  <property name="justify">GTK_JUSTIFY_LEFT</property>
-	  <property name="wrap">False</property>
-	  <property name="selectable">False</property>
-	  <property name="xalign">0.5</property>
-	  <property name="yalign">0.5</property>
-	  <property name="xpad">0</property>
-	  <property name="ypad">0</property>
-	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	  <property name="width_chars">-1</property>
-	  <property name="single_line_mode">False</property>
-	  <property name="angle">0</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkButton" id="getGroups">
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="label" translatable="yes">Get Addressbook Groups</property>
-	  <property name="use_underline">True</property>
-	  <property name="relief">GTK_RELIEF_NORMAL</property>
-	  <property name="focus_on_click">True</property>
-	  <signal name="clicked" handler="on_getGroups_clicked" last_modification_time="Tue, 10 Mar 2009 19:15:11 GMT"/>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkLabel" id="label74">
-	  <property name="visible">True</property>
-	  <property name="label" translatable="yes">&lt;b&gt;Account Details&lt;/b&gt;</property>
-	  <property name="use_underline">False</property>
-	  <property name="use_markup">True</property>
-	  <property name="justify">GTK_JUSTIFY_LEFT</property>
-	  <property name="wrap">False</property>
-	  <property name="selectable">False</property>
-	  <property name="xalign">0.5</property>
-	  <property name="yalign">0.5</property>
-	  <property name="xpad">0</property>
-	  <property name="ypad">0</property>
-	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	  <property name="width_chars">-1</property>
-	  <property name="single_line_mode">False</property>
-	  <property name="angle">0</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkLabel" id="label75">
-	  <property name="visible">True</property>
-	  <property name="label" translatable="yes">Email:</property>
-	  <property name="use_underline">False</property>
-	  <property name="use_markup">False</property>
-	  <property name="justify">GTK_JUSTIFY_LEFT</property>
-	  <property name="wrap">False</property>
-	  <property name="selectable">False</property>
-	  <property name="xalign">0</property>
-	  <property name="yalign">0.5</property>
-	  <property name="xpad">0</property>
-	  <property name="ypad">0</property>
-	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	  <property name="width_chars">-1</property>
-	  <property name="single_line_mode">False</property>
-	  <property name="angle">0</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkEntry" id="username">
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="editable">True</property>
-	  <property name="visibility">True</property>
-	  <property name="max_length">0</property>
-	  <property name="text" translatable="yes"></property>
-	  <property name="has_frame">True</property>
-	  <property name="invisible_char">â??</property>
-	  <property name="activates_default">False</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkLabel" id="label76">
-	  <property name="visible">True</property>
-	  <property name="label" translatable="yes">Password:</property>
-	  <property name="use_underline">False</property>
-	  <property name="use_markup">False</property>
-	  <property name="justify">GTK_JUSTIFY_LEFT</property>
-	  <property name="wrap">False</property>
-	  <property name="selectable">False</property>
-	  <property name="xalign">0</property>
-	  <property name="yalign">0.5</property>
-	  <property name="xpad">0</property>
-	  <property name="ypad">0</property>
-	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	  <property name="width_chars">-1</property>
-	  <property name="single_line_mode">False</property>
-	  <property name="angle">0</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkEntry" id="password">
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="editable">True</property>
-	  <property name="visibility">False</property>
-	  <property name="max_length">0</property>
-	  <property name="text" translatable="yes"></property>
-	  <property name="has_frame">True</property>
-	  <property name="invisible_char">â??</property>
-	  <property name="activates_default">False</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHButtonBox" id="hbuttonbox13">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-	  <property name="spacing">0</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-</glade-interface>
diff --git a/conduit/modules/GoogleModule/documents-config.glade b/conduit/modules/GoogleModule/documents-config.glade
deleted file mode 100644
index 08615e7..0000000
--- a/conduit/modules/GoogleModule/documents-config.glade
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
-<glade-interface>
-  <widget class="GtkDialog" id="GoogleDocumentsConfigDialog">
-    <property name="visible">True</property>
-    <property name="title" translatable="yes">Google Documents</property>
-    <property name="resizable">False</property>
-    <property name="default_width">250</property>
-    <property name="default_height">350</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="vbox30">
-        <property name="visible">True</property>
-        <property name="spacing">5</property>
-        <child>
-          <widget class="GtkLabel" id="label74">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">&lt;b&gt;Account Details&lt;/b&gt;</property>
-            <property name="use_markup">True</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkLabel" id="label75">
-            <property name="visible">True</property>
-            <property name="xalign">0</property>
-            <property name="label" translatable="yes">Email:</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">3</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkEntry" id="username">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">4</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkLabel" id="label76">
-            <property name="visible">True</property>
-            <property name="xalign">0</property>
-            <property name="label" translatable="yes">Password:</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">5</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkEntry" id="password">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="visibility">False</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">6</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHButtonBox" id="hbuttonbox13">
-            <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">7</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkLabel" id="label1">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">&lt;b&gt;Downloaded Document Format&lt;/b&gt;</property>
-            <property name="use_markup">True</property>
-          </widget>
-          <packing>
-            <property name="position">8</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHBox" id="hbox1">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkLabel" id="label2">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Documents</property>
-                <property name="width_chars">13</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkComboBox" id="documentCombo">
-                <property name="visible">True</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">9</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHBox" id="hbox2">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkLabel" id="label3">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Spreadsheets</property>
-                <property name="width_chars">13</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkComboBox" id="spreadsheetCombo">
-                <property name="visible">True</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">10</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHBox" id="hbox3">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkLabel" id="label4">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Presentations</property>
-                <property name="width_chars">13</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkComboBox" id="presentationCombo">
-                <property name="visible">True</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">11</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="hbuttonbox12">
-            <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-            <child>
-              <widget class="GtkButton" id="button32">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-cancel</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">-6</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkButton" id="okBtn">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-ok</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">-5</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/conduit/modules/GoogleModule/picasa-config.glade b/conduit/modules/GoogleModule/picasa-config.glade
deleted file mode 100644
index 725898f..0000000
--- a/conduit/modules/GoogleModule/picasa-config.glade
+++ /dev/null
@@ -1,195 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
-<glade-interface>
-  <widget class="GtkDialog" id="PicasaTwoWayConfigDialog">
-    <property name="visible">True</property>
-    <property name="title" translatable="yes">Picasa</property>
-    <property name="resizable">False</property>
-    <property name="default_width">250</property>
-    <property name="default_height">350</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="vbox30">
-        <property name="visible">True</property>
-        <property name="spacing">5</property>
-        <child>
-          <widget class="GtkLabel" id="label74">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">&lt;b&gt;Account Details&lt;/b&gt;</property>
-            <property name="use_markup">True</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkLabel" id="label75">
-            <property name="visible">True</property>
-            <property name="xalign">0</property>
-            <property name="label" translatable="yes">Username:</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">3</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkEntry" id="username">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">4</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkLabel" id="label76">
-            <property name="visible">True</property>
-            <property name="xalign">0</property>
-            <property name="label" translatable="yes">Password:</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">5</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkEntry" id="password">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="visibility">False</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">6</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkButton" id="login_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="label" translatable="yes">Login</property>
-            <property name="use_underline">True</property>
-            <property name="response_id">0</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">7</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHSeparator" id="hseparator1">
-            <property name="visible">True</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">8</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkLabel" id="label78">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">&lt;b&gt;Saved Photo Settings&lt;/b&gt;</property>
-            <property name="use_markup">True</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">9</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkLabel" id="label77">
-            <property name="visible">True</property>
-            <property name="xalign">0</property>
-            <property name="label" translatable="yes">Album:</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">10</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkComboBoxEntry" id="album_combobox">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child internal-child="entry">
-              <widget class="GtkEntry" id="album_combo_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">11</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkLabel" id="label1">
-            <property name="visible">True</property>
-            <property name="xalign">0</property>
-            <property name="label" translatable="yes">Resize Photos:</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">12</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkComboBox" id="resize_combobox">
-            <property name="visible">True</property>
-          </widget>
-          <packing>
-            <property name="position">13</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="hbuttonbox12">
-            <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-            <child>
-              <widget class="GtkButton" id="button32">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-cancel</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">-6</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkButton" id="ok_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-ok</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">-5</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/conduit/modules/GoogleModule/youtube-config.glade b/conduit/modules/GoogleModule/youtube-config.glade
deleted file mode 100644
index ecec6de..0000000
--- a/conduit/modules/GoogleModule/youtube-config.glade
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
-<glade-interface>
-  <widget class="GtkDialog" id="YouTubeTwoWayConfigDialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">YouTube Source</property>
-    <property name="resizable">False</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkVBox" id="vbox1">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkLabel" id="label2">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">&lt;b&gt;Account Details&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label5">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Username:</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkEntry" id="username">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label6">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Password:</property>
-                <property name="ellipsize">PANGO_ELLIPSIZE_START</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkEntry" id="password">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="visibility">False</property>
-              </widget>
-              <packing>
-                <property name="position">4</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label1">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">&lt;b&gt;Download Videos&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">5</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="vbox2">
-                <property name="visible">True</property>
-                <property name="spacing">5</property>
-                <child>
-                  <widget class="GtkRadioButton" id="mostviewed">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="label" translatable="yes">Most viewed</property>
-                    <property name="use_underline">True</property>
-                    <property name="response_id">0</property>
-                    <property name="active">True</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkRadioButton" id="toprated">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="label" translatable="yes">Top rated</property>
-                    <property name="use_underline">True</property>
-                    <property name="response_id">0</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">mostviewed</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkRadioButton" id="uploadedby">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="label" translatable="yes">Uploaded by above user</property>
-                    <property name="use_underline">True</property>
-                    <property name="response_id">0</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">mostviewed</property>
-                  </widget>
-                  <packing>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkRadioButton" id="favoritesof">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="label" translatable="yes">Favorites of above user</property>
-                    <property name="response_id">0</property>
-                    <property name="active">True</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">mostviewed</property>
-                  </widget>
-                  <packing>
-                    <property name="position">3</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">6</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label3">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Max retrieved videos (0 is unlimited):</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">7</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkSpinButton" id="maxdownloads">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="adjustment">0 0 100 1 10 10</property>
-              </widget>
-              <packing>
-                <property name="position">8</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label">gtk-cancel</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">-6</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button2">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label">gtk-ok</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">-5</property>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]