]> git.0d.be Git - empathy.git/blobdiff - ubuntu-online-accounts/cc-plugins/generate-plugins.py
Center the 'smiley images' inside the menu items
[empathy.git] / ubuntu-online-accounts / cc-plugins / generate-plugins.py
index c17a55ef604a02bedfbbd94368f1320cb3f1bfda..2845d3632c7973a80abe1f238d3ee605612469e5 100755 (executable)
@@ -25,61 +25,7 @@ class Plugin:
         self.protocol = protocol
         self.icon = icon
 
-##### The plugin itself #####
-
-def generate_build_block(p):
-    la = 'lib%s_la' % p.protocol.replace('-', '_')
-
-    output = '''%s_SOURCES = \\
-       empathy-accounts-plugin.c \\
-       empathy-accounts-plugin.h \\
-       empathy-accounts-plugin-widget.c \\
-       empathy-accounts-plugin-widget.h
-%s_LDFLAGS = -module -avoid-version
-%s_LIBADD = \\
-       $(UOA_LIBS)                                     \\
-       $(top_builddir)/libempathy-gtk/libempathy-gtk.la
-''' % (la, la, la)
-
-    return output
-
-def generate_makefile_am(plugins):
-    '''Generate Makefile.am'''
-    libs = []
-    build_blocks = []
-
-    for p in plugins:
-        name = '       lib%s.la' % p.protocol
-        libs.append(name)
-
-        build_blocks.append(generate_build_block(p))
-
-    f = open('Makefile.am', 'w')
-
-    f.write(
-'''# Generated using empathy/ubuntu-online-accounts/cc-plugins/generate-plugins.py
-# Do NOT edit manually
-SUBDIRS = providers services app-plugin
-
-plugindir = $(ACCOUNTS_PROVIDER_PLUGIN_DIR)
-
-INCLUDES =                                     \\
-       -I$(top_builddir)                       \\
-       -I$(top_srcdir)                         \\
-       -DLOCALEDIR=\\""$(datadir)/locale"\\"   \\
-       $(UOA_CFLAGS)                           \\
-       $(WARN_CFLAGS)                          \\
-       $(ERROR_CFLAGS)                         \\
-       $(DISABLE_DEPRECATED)                   \\
-       $(EMPATHY_CFLAGS)
-
-plugin_LTLIBRARIES = \\
-%s \\
-       $(NULL)
-
-%s''' % ('\\\n'.join(libs), '\n\n'.join(build_blocks)))
-
-##### Providers #####
+##### providers/ #####
 
 def generate_provider_file(p):
     f = open('providers/%s.provider' % p.protocol, 'w')
@@ -91,6 +37,7 @@ def generate_provider_file(p):
 <provider id="%s">
   <name>%s</name>
   <icon>%s</icon>
+  <plugin>empathy-accounts-plugin</plugin>
 </provider>
 ''' % (p.protocol, p.name, p.icon))
 
@@ -117,7 +64,7 @@ providers_DATA = \\
 EXTRA_DIST = $(providers_DATA)
 ''' % ('\\\n'.join(providers)))
 
-##### Services #####
+##### services/ #####
 
 def generate_service_file(p):
     f = open('services/%s-im.service' % p.protocol, 'w')
@@ -138,6 +85,10 @@ def generate_service_file(p):
       <setting name="manager">%s</setting>
       <setting name="protocol">%s</setting>
     </group>
+    <group name="auth">
+      <setting name="method">password</setting>
+      <setting name="mechanism">password</setting>
+    </group>
   </template>
 
 </service>
@@ -172,7 +123,6 @@ def generate_all():
     for name, cm, protocol, icon in ALL:
         plugins.append(Plugin(name, cm, protocol, icon))
 
-    generate_makefile_am(plugins)
     generate_providers(plugins)
     generate_services(plugins)