~ubuntu-branches/ubuntu/oneiric/gnome-panel/oneiric

« back to all changes in this revision

Viewing changes to doc/reference/panel-applet/html/getting-started.introspection.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher, Sebastien Bacher, Jeremy Bicha
  • Date: 2011-05-30 11:04:49 UTC
  • mfrom: (1.13.10 upstream) (2.2.5 experimental)
  • Revision ID: james.westby@ubuntu.com-20110530110449-hinl17kxkcefjw6x
Tags: 1:3.0.2-0ubuntu1
[ Sebastien Bacher ]
* New upstream version
* debian/control.in:
  - the new libgweather version is in oneiric, use it
  - drop the python and python-gconf depends, 
    they were added for gnome-panel-add which is still using gconf and buggy
* debian/gnome-panel-data.install:
  - don't install the apport hook, it's only getting gconf datas which 
    doesn't work since gnome-panel uses gsettings
* debian/patches/90_build_fixes.patch:
  - restore build fix from git not applied in the new serie
* debian/patches/01_panel_submenus.patch:
  - don't take that Debian diff, the .menus use the upstream naming in Ubuntu
* debian/patches/06_no_resize_grip.patch:
  - dropped, the issue is fixed in the new version
* debian/patches/50_fix-potfiles.patch:
  - dropped, the issue is fixed in the new version
* debian/watch:
  - track unstable series as well

Drop those delta, since gnome-panel is not the default Ubuntu session now we
can go back to an experience closer to the upstream one: 
* debian/control.in:
  - drop the indicators recommends, unity-2d is the ubuntu fallback session
    so we can get back to use an upstream config for gnome-panel and reduce
    the delta we carry
* debian/patches/04_default_panel_config.patch:
  - don't modify the upstream layout
* debian/patches/05_no_session_delay.patch:
  - no need to tweak the upstream session to optimize it
* debian/patches/16_compiz_workspace_switcher.patch:
  - go back to the upstream switcher behaviour    
* debian/patches/25_dynamic_fusa_detection.patch:
  - not needed since we use the upstream layout, could be ported if someone
    is wanting to do the work though
* debian/patches/30_disable-initial-animation.patch, debian/rules:
  - drop the --disable-initial-animation, that was some login optimization
    but since it's not the default desktop you should go back to the 
    upstream behaviour

[ Jeremy Bicha ]   
* New upstream version
* Merge from Debian experimental, remaining Ubuntu changes:
* debian/control:
  - Recommends gnome-settings-daemon which has the timezone polkit service
* debian/rules:
  - Update translations template.
* debian/gnome-panel-data.install:
  - Install apport hook
  - Install the "About Ubuntu" menu item.
* debian/patches/01_layout.patch:
  - Disabled, Help & About Ubuntu don't fit as well in Gnome Panel 3
* debian/patches/01_panel_submenus.patch.
  - Dropped
* debian/patches/03_dnd_places_link.patch:
  - Disabled, when using Drag'n'Drop from Places menu, install a link launcher
    (.desktop file) instead of copying the entire directory.
* debian/patches/17_about-ubuntu-translation.patch:
  - List ubuntu-about.desktop for translation.
* debian/patches/40_unset_menuproxy.patch:
  - Make sure gnome-panel and the applets don't pick up menu proxies.
* debian/patches/50_fix-potfiles.patch
  - Fix i18n
* debian/patches/85_disable_shutdown_on_ltsp.patch:
  - Suppress the shutdown option in the panel if LTSP_CLIENT is set.
* debian/patches/71_change_bookmark_submenu_limit_value.patch
  - Dropped, picked up by Debian
* debian/patches/18_lockdown_lock_editor.patch:
* debian/patches/90_git_wnck_show_realize.patch:
* debian/patches/90_fix_linking_DSO_link.patch:
* debian/patches/91_gir_annotations.patch
* debian/patches/92_git_calendar_day.patch
* debian/patches/92_git_fix_applets_in_multiscreen.patch:
  - Dropped, applied upstream
* debian/watch:
  - watch unstable versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
5
<title>Writing an applet in languages other than C</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
 
7
<link rel="home" href="index.html" title="Panel Applet Library Reference Manual">
 
8
<link rel="up" href="getting-started.html" title="Part II. Getting Started with the Panel Applet library">
 
9
<link rel="prev" href="getting-started.in-out-process.html" title="Out-of-Process vs In-Process">
 
10
<link rel="next" href="port-gnome2.html" title="Part III. Porting Applets from GNOME 2.x">
 
11
<meta name="generator" content="GTK-Doc V1.17.1 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
</head>
 
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
 
16
<td><a accesskey="p" href="getting-started.in-out-process.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
17
<td><a accesskey="u" href="getting-started.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
18
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
19
<th width="100%" align="center">Panel Applet Library Reference Manual</th>
 
20
<td><a accesskey="n" href="port-gnome2.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
21
</tr></table>
 
22
<div class="chapter">
 
23
<div class="titlepage"><div><div><h2 class="title">
 
24
<a name="getting-started.introspection"></a>Writing an applet in languages other than C</h2></div></div></div>
 
25
<p>
 
26
     The Panel Applet library comes with support for <a class="ulink" href="http://live.gnome.org/GObjectIntrospection" target="_top">GObject Introspection</a>. This makes it possible to write applets in the languages that have <a class="ulink" href="http://live.gnome.org/GObjectIntrospection/Users" target="_top">bindings based on GObject Introspection</a>.
 
27
    </p>
 
28
<p>
 
29
     Here is a simple example of a python applet:
 
30
 
 
31
     </p>
 
32
<div class="example">
 
33
<a name="id2579553"></a><p class="title"><b>Example 4. Hello World applet, in Python</b></p>
 
34
<div class="example-contents">
 
35
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
36
    <tbody>
 
37
      <tr>
 
38
        <td class="listing_lines" align="right"><pre>1
 
39
2
 
40
3
 
41
4
 
42
5
 
43
6
 
44
7
 
45
8
 
46
9
 
47
10
 
48
11
 
49
12
 
50
13
 
51
14
 
52
15
 
53
16
 
54
17
 
55
18
 
56
19</pre></td>
 
57
        <td class="listing_code"><pre class="programlisting">from gi.repository import Gtk
 
58
from gi.repository import PanelApplet
 
59
 
 
60
def applet_fill(applet):
 
61
    label = Gtk.Label(<span class="number">&quot;Hello World&quot;</span>)
 
62
    applet.add(label)
 
63
    applet.show_all()
 
64
 
 
65
def applet_factory(applet, iid, data):
 
66
    <span class="keyword">if</span> iid != <span class="number">&quot;HelloWorldApplet&quot;</span>:
 
67
       <span class="keyword">return</span> False
 
68
 
 
69
    applet_fill(applet)
 
70
 
 
71
    <span class="keyword">return</span> True
 
72
 
 
73
PanelApplet.Applet.factory_main(<span class="number">&quot;HelloWorldFactory&quot;</span>,
 
74
                                PanelApplet.Applet.__gtype__,
 
75
                                applet_factory, None)</pre></td>
 
76
      </tr>
 
77
    </tbody>
 
78
  </table>
 
79
</div>
 
80
 
 
81
</div>
 
82
<p><br class="example-break">
 
83
    </p>
 
84
<p>
 
85
     The only limitation of writing an applet in a language other than C is that the applet will not be able to run in the panel process: it will have to stay out-of-process. However, since it is recommended to leave applets out-of-process, this limitation is mitigated.
 
86
    </p>
 
87
</div>
 
88
<div class="footer">
 
89
<hr>
 
90
          Generated by GTK-Doc V1.17.1</div>
 
91
</body>
 
92
</html>
 
 
b'\\ No newline at end of file'