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

« back to all changes in this revision

Viewing changes to gnome-panel/libpanel-applet-private/panel-applet-container.c

  • 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:
21
21
 */
22
22
 
23
23
#include <string.h>
 
24
#include <gtk/gtkx.h>
24
25
#include "panel-applet-container.h"
25
26
#include "panel-marshal.h"
26
27
 
40
41
        APPLET_BROKEN,
41
42
        APPLET_MOVE,
42
43
        APPLET_REMOVE,
43
 
        APPLET_LOCK,
44
44
        CHILD_PROPERTY_CHANGED,
45
45
        LAST_SIGNAL
46
46
};
53
53
} AppletPropertyInfo;
54
54
 
55
55
static const AppletPropertyInfo applet_properties [] = {
56
 
        { "prefs-key",   "PrefsKey" },
57
 
        { "orient",      "Orient" },
58
 
        { "size",        "Size" },
59
 
        { "size-hints",  "SizeHints" },
60
 
        { "background",  "Background" },
61
 
        { "flags",       "Flags" },
62
 
        { "locked",      "Locked" },
63
 
        { "locked-down", "LockedDown" }
 
56
        { "settings-path", "SettingsPath" },
 
57
        { "prefs-key",     "PrefsKey" },
 
58
        { "orient",        "Orient" },
 
59
        { "size",          "Size" },
 
60
        { "size-hints",    "SizeHints" },
 
61
        { "background",    "Background" },
 
62
        { "flags",         "Flags" },
 
63
        { "locked-down",   "LockedDown" }
64
64
};
65
65
 
66
66
#define PANEL_APPLET_CONTAINER_GET_PRIVATE(o) \
188
188
                              g_cclosure_marshal_VOID__VOID,
189
189
                              G_TYPE_NONE,
190
190
                              0);
191
 
        signals[APPLET_LOCK] =
192
 
                g_signal_new ("applet-lock",
193
 
                              G_TYPE_FROM_CLASS (klass),
194
 
                              G_SIGNAL_RUN_LAST,
195
 
                              G_STRUCT_OFFSET (PanelAppletContainerClass, applet_lock),
196
 
                              NULL,
197
 
                              NULL,
198
 
                              g_cclosure_marshal_VOID__BOOLEAN,
199
 
                              G_TYPE_NONE,
200
 
                              1, G_TYPE_BOOLEAN);
201
191
        signals[CHILD_PROPERTY_CHANGED] =
202
192
                g_signal_new ("child-property-changed",
203
193
                              G_TYPE_FROM_CLASS (klass),
272
262
                g_signal_emit (container, signals[APPLET_MOVE], 0);
273
263
        } else if (g_strcmp0 (signal_name, "RemoveFromPanel") == 0) {
274
264
                g_signal_emit (container, signals[APPLET_REMOVE], 0);
275
 
        } else if (g_strcmp0 (signal_name, "Lock") == 0) {
276
 
                g_signal_emit (container, signals[APPLET_LOCK], 0, TRUE);
277
 
        } else if (g_strcmp0 (signal_name, "Unlock") == 0) {
278
 
                g_signal_emit (container, signals[APPLET_LOCK], 0, FALSE);
279
265
        }
280
266
}
281
267
 
797
783
 
798
784
        return !g_simple_async_result_propagate_error (simple, error);
799
785
}
 
786
 
 
787
void
 
788
panel_applet_container_child_popup_edit_menu (PanelAppletContainer *container,
 
789
                                              guint                 button,
 
790
                                              guint32               timestamp,
 
791
                                              GCancellable         *cancellable,
 
792
                                              GAsyncReadyCallback   callback,
 
793
                                              gpointer              user_data)
 
794
{
 
795
        GSimpleAsyncResult *result;
 
796
        GDBusProxy         *proxy = container->priv->applet_proxy;
 
797
 
 
798
        if (!proxy)
 
799
                return;
 
800
 
 
801
        result = g_simple_async_result_new (G_OBJECT (container),
 
802
                                            callback,
 
803
                                            user_data,
 
804
                                            panel_applet_container_child_popup_edit_menu);
 
805
 
 
806
        g_dbus_connection_call (g_dbus_proxy_get_connection (proxy),
 
807
                                g_dbus_proxy_get_name (proxy),
 
808
                                g_dbus_proxy_get_object_path (proxy),
 
809
                                PANEL_APPLET_INTERFACE,
 
810
                                "PopupEditMenu",
 
811
                                g_variant_new ("(uu)", button, timestamp),
 
812
                                NULL,
 
813
                                G_DBUS_CALL_FLAGS_NO_AUTO_START,
 
814
                                -1, cancellable,
 
815
                                child_popup_menu_cb,
 
816
                                result);
 
817
}
 
818
 
 
819
gboolean
 
820
panel_applet_container_child_popup_edit_menu_finish (PanelAppletContainer *container,
 
821
                                                     GAsyncResult         *result,
 
822
                                                     GError              **error)
 
823
{
 
824
        GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
 
825
 
 
826
        g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == panel_applet_container_child_popup_edit_menu);
 
827
 
 
828
        return !g_simple_async_result_propagate_error (simple, error);
 
829
}