diff options
-rw-r--r-- | mate-panel/mate-panel-add.in | 2 | ||||
-rw-r--r-- | mate-panel/mate-panel.desktop.in.in | 2 | ||||
-rw-r--r-- | mate-panel/menu.c | 7 | ||||
-rw-r--r-- | mate-panel/menu.h | 3 | ||||
-rw-r--r-- | mate-panel/panel-default-setup.entries | 12 | ||||
-rw-r--r-- | mate-panel/panel-menu-bar.c | 2 | ||||
-rw-r--r-- | mate-panel/panel-menu-button.c | 5 | ||||
-rw-r--r-- | mate-panel/panel-menu-items.c | 7 | ||||
-rw-r--r-- | mate-panel/panel-object.schemas.in | 6 | ||||
-rw-r--r-- | mate-panel/panel-profile.c | 4 | ||||
-rw-r--r-- | mate-panel/panel-stock-icons.h | 2 | ||||
-rw-r--r-- | matecomponent/libmate-panel-applet/mate-panel-applet.c | 49 | ||||
-rw-r--r-- | matecomponent/libmate-panel-applet/mate-panel-applet.h | 32 |
13 files changed, 31 insertions, 102 deletions
diff --git a/mate-panel/mate-panel-add.in b/mate-panel/mate-panel-add.in index 728eebf2..b332ffdb 100644 --- a/mate-panel/mate-panel-add.in +++ b/mate-panel/mate-panel-add.in @@ -261,7 +261,7 @@ class PanelAdder: self.client.set_bool(os.path.join(dir, 'panel_right_stick'), self.right_stick) if self.type == PANEL_TYPE_APPLET: - self.client.set_string(os.path.join(dir, 'object_type'), 'matecomponent-applet') + self.client.set_string(os.path.join(dir, 'object_type'), 'external-applet') self.client.set_string(os.path.join(dir, 'applet_iid'), self.applet_iid) id_list = self._panel_get_list(MATE_PANEL_APPLETS_KEY) id_list.append(id) diff --git a/mate-panel/mate-panel.desktop.in.in b/mate-panel/mate-panel.desktop.in.in index 068eaba5..8eb482f2 100644 --- a/mate-panel/mate-panel.desktop.in.in +++ b/mate-panel/mate-panel.desktop.in.in @@ -10,7 +10,7 @@ X-MATE-Bugzilla-Bugzilla=MATE X-MATE-Bugzilla-Product=mate-panel X-MATE-Bugzilla-Component=general X-MATE-Bugzilla-Version=@VERSION@ -Categories=MATE;GTK;Utility;Core; +Categories=MATE;GTK;System;Core; OnlyShowIn=MATE; NoDisplay=true X-MATE-AutoRestart=true diff --git a/mate-panel/menu.c b/mate-panel/menu.c index 273fae86..8b60058c 100644 --- a/mate-panel/menu.c +++ b/mate-panel/menu.c @@ -1211,7 +1211,8 @@ drag_data_get_string_cb (GtkWidget *widget, GdkDragContext *context, void setup_uri_drag (GtkWidget *menuitem, const char *uri, - const char *icon) + const char *icon, + GdkDragAction action) { static GtkTargetEntry menu_item_targets[] = { { "text/uri-list", 0, 0 } @@ -1223,7 +1224,7 @@ setup_uri_drag (GtkWidget *menuitem, gtk_drag_source_set (menuitem, GDK_BUTTON1_MASK|GDK_BUTTON2_MASK, menu_item_targets, 1, - GDK_ACTION_COPY); + action); if (icon != NULL) gtk_drag_source_set_icon_name (menuitem, icon); @@ -1488,7 +1489,7 @@ create_menuitem (GtkWidget *menu, NULL, NULL, alias_directory ? matemenu_tree_directory_get_icon (alias_directory) : matemenu_tree_entry_get_icon (entry), - NULL); + PANEL_STOCK_DEFAULT_ICON); setup_menuitem (menuitem, panel_menu_icon_get_size (), diff --git a/mate-panel/menu.h b/mate-panel/menu.h index 8638cbb8..628b25cf 100644 --- a/mate-panel/menu.h +++ b/mate-panel/menu.h @@ -53,7 +53,8 @@ void setup_internal_applet_drag (GtkWidget *menuitem, PanelActionButtonType type); void setup_uri_drag (GtkWidget *menuitem, const char *uri, - const char *icon); + const char *icon, + GdkDragAction action); GtkWidget * panel_create_menu (void); diff --git a/mate-panel/panel-default-setup.entries b/mate-panel/panel-default-setup.entries index aad2f5d5..c232b4d8 100644 --- a/mate-panel/panel-default-setup.entries +++ b/mate-panel/panel-default-setup.entries @@ -334,7 +334,7 @@ <key>applets/window_menu/object_type</key> <schema_key>/schemas/apps/panel/objects/object_type</schema_key> <value> - <string>matecomponent-applet</string> + <string>external-applet</string> </value> </entry> <entry> @@ -388,7 +388,7 @@ <key>applets/clock/object_type</key> <schema_key>/schemas/apps/panel/objects/object_type</schema_key> <value> - <string>matecomponent-applet</string> + <string>external-applet</string> </value> </entry> <entry> @@ -442,7 +442,7 @@ <key>applets/notification_area/object_type</key> <schema_key>/schemas/apps/panel/objects/object_type</schema_key> <value> - <string>matecomponent-applet</string> + <string>external-applet</string> </value> </entry> <entry> @@ -496,7 +496,7 @@ <key>applets/show_desktop_button/object_type</key> <schema_key>/schemas/apps/panel/objects/object_type</schema_key> <value> - <string>matecomponent-applet</string> + <string>external-applet</string> </value> </entry> <entry> @@ -550,7 +550,7 @@ <key>applets/window_list/object_type</key> <schema_key>/schemas/apps/panel/objects/object_type</schema_key> <value> - <string>matecomponent-applet</string> + <string>external-applet</string> </value> </entry> <entry> @@ -604,7 +604,7 @@ <key>applets/workspace_switcher/object_type</key> <schema_key>/schemas/apps/panel/objects/object_type</schema_key> <value> - <string>matecomponent-applet</string> + <string>external-applet</string> </value> </entry> <entry> diff --git a/mate-panel/panel-menu-bar.c b/mate-panel/panel-menu-bar.c index 05e26850..1a2d3ac6 100644 --- a/mate-panel/panel-menu-bar.c +++ b/mate-panel/panel-menu-bar.c @@ -288,7 +288,7 @@ static void panel_menu_bar_load(PanelWidget* panel, gboolean locked, int positio mate_panel_applet_add_callback(menubar->priv->info, "help", GTK_STOCK_HELP, _("_Help"), NULL); /* Menu editors */ - if (panel_is_program_in_path("mozo") || panel_is_program_in_path("matemenu-simple-editor")) + if (!panel_lockdown_get_locked_down () && (panel_is_program_in_path("mozo") || panel_is_program_in_path("matemenu-simple-editor"))) { mate_panel_applet_add_callback (menubar->priv->info, "edit", NULL, _("_Edit Menus"), NULL); } diff --git a/mate-panel/panel-menu-button.c b/mate-panel/panel-menu-button.c index e37c736d..6a08291a 100644 --- a/mate-panel/panel-menu-button.c +++ b/mate-panel/panel-menu-button.c @@ -664,8 +664,9 @@ panel_menu_button_load (const char *menu_path, mate_panel_applet_add_callback (info, "help", GTK_STOCK_HELP, _("_Help"), NULL); - if (panel_is_program_in_path ("mozo") || - panel_is_program_in_path ("matemenu-simple-editor")) + if (!panel_lockdown_get_locked_down () && + (panel_is_program_in_path ("mozo") || + panel_is_program_in_path ("matemenu-simple-editor"))) mate_panel_applet_add_callback (info, "edit", NULL, _("_Edit Menus"), NULL); diff --git a/mate-panel/panel-menu-items.c b/mate-panel/panel-menu-items.c index 81668dbc..bd234de9 100644 --- a/mate-panel/panel-menu-items.c +++ b/mate-panel/panel-menu-items.c @@ -261,7 +261,7 @@ panel_menu_items_append_from_desktop (GtkWidget *menu, uri = g_filename_to_uri (full_path, NULL, NULL); - setup_uri_drag (item, uri, icon); + setup_uri_drag (item, uri, icon, GDK_ACTION_COPY); g_free (uri); g_key_file_free (key_file); @@ -308,7 +308,8 @@ panel_menu_items_append_place_item (const char *icon_name, g_signal_connect (G_OBJECT (item), "button_press_event", G_CALLBACK (menu_dummy_button_press_event), NULL); - setup_uri_drag (item, uri, icon_name); + if (g_str_has_prefix (uri, "file:")) /*Links only work for local files*/ + setup_uri_drag (item, uri, icon_name, GDK_ACTION_LINK); } static GtkWidget * @@ -1602,7 +1603,7 @@ panel_menu_items_append_lock_logout (GtkWidget *menu) } item = panel_menu_items_create_action_item (PANEL_ACTION_SHUTDOWN); - if (item != NULL) { + if (item != NULL && !g_getenv("LTSP_CLIENT")) { if (!separator_inserted) add_menu_separator (menu); diff --git a/mate-panel/panel-object.schemas.in b/mate-panel/panel-object.schemas.in index 2039ee57..7bc2d34f 100644 --- a/mate-panel/panel-object.schemas.in +++ b/mate-panel/panel-object.schemas.in @@ -15,7 +15,8 @@ <long> The type of this panel object. Possible values are "drawer-object", "menu-object", "launcher-object", - "matecomponent-applet", "action-applet" and "menu-bar". + "external-applet", "action-applet", "menu-bar" and + "separator". </long> </locale> </schema> @@ -105,7 +106,8 @@ <long> The implementation ID of the applet - e.g. "ClockAppletFactory::ClockApplet". This key is only - relevant if the object_type key is "matecomponent-applet". + relevant if the object_type key is "external-applet" + (or the deprecated "matecomponent-applet"). </long> </locale> </schema> diff --git a/mate-panel/panel-profile.c b/mate-panel/panel-profile.c index 52cb353b..4f2fb931 100644 --- a/mate-panel/panel-profile.c +++ b/mate-panel/panel-profile.c @@ -99,10 +99,12 @@ static MateConfEnumStringPair panel_object_type_map [] = { { PANEL_OBJECT_DRAWER, "drawer-object" }, { PANEL_OBJECT_MENU, "menu-object" }, { PANEL_OBJECT_LAUNCHER, "launcher-object" }, - { PANEL_OBJECT_APPLET, "matecomponent-applet" }, + { PANEL_OBJECT_APPLET, "external-applet" }, { PANEL_OBJECT_ACTION, "action-applet" }, { PANEL_OBJECT_MENU_BAR, "menu-bar" }, { PANEL_OBJECT_SEPARATOR, "separator" }, + /* The following is for backwards compatibility with 2.30.x and earlier */ + { PANEL_OBJECT_APPLET, "matecomponent-applet" }, /* The following two are for backwards compatibility with 2.0.x */ { PANEL_OBJECT_LOCK, "lock-object" }, { PANEL_OBJECT_LOGOUT, "logout-object" }, diff --git a/mate-panel/panel-stock-icons.h b/mate-panel/panel-stock-icons.h index cb6085f4..9a55b884 100644 --- a/mate-panel/panel-stock-icons.h +++ b/mate-panel/panel-stock-icons.h @@ -48,6 +48,8 @@ extern "C" { #define PANEL_STOCK_EXECUTE "panel-execute" #define PANEL_STOCK_CLEAR "panel-clear" #define PANEL_STOCK_DONT_DELETE "panel-dont-delete" +/* FIXME: put a more representative icon here */ +#define PANEL_STOCK_DEFAULT_ICON "application-default-icon" void panel_init_stock_icons_and_items (void); GtkIconSize panel_menu_icon_get_size (void); diff --git a/matecomponent/libmate-panel-applet/mate-panel-applet.c b/matecomponent/libmate-panel-applet/mate-panel-applet.c index c83df49f..d8ad2a0a 100644 --- a/matecomponent/libmate-panel-applet/mate-panel-applet.c +++ b/matecomponent/libmate-panel-applet/mate-panel-applet.c @@ -40,7 +40,6 @@ #include <matecomponent/matecomponent-types.h> #include <matecomponent/matecomponent-property-bag.h> #include <matecomponent/matecomponent-item-handler.h> -#include <matecomponent/matecomponent-shlib-factory.h> #include <matecomponent/matecomponent-property-bag-client.h> #include <mateconf/mateconf.h> #include <mateconf/mateconf-client.h> @@ -1811,54 +1810,6 @@ mate_panel_applet_factory_main (const gchar *iid, return mate_panel_applet_factory_main_closure (iid, applet_type, closure); } -MateComponent_Unknown -mate_panel_applet_shlib_factory_closure (const char *iid, - GType applet_type, - PortableServer_POA poa, - gpointer impl_ptr, - GClosure *closure, - CORBA_Environment *ev) -{ - MateComponentShlibFactory *factory; - - g_return_val_if_fail (iid != NULL, CORBA_OBJECT_NIL); - g_return_val_if_fail (closure != NULL, CORBA_OBJECT_NIL); - - g_assert (g_type_is_a (applet_type, PANEL_TYPE_APPLET)); - - bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR); - bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); - - closure = matecomponent_closure_store (closure, mate_panel_applet_marshal_BOOLEAN__STRING); - - factory = matecomponent_shlib_factory_new_closure ( - iid, poa, impl_ptr, - g_cclosure_new (G_CALLBACK (mate_panel_applet_factory_callback), - mate_panel_applet_callback_data_new (applet_type, closure), - (GClosureNotify) mate_panel_applet_callback_data_free)); - - return CORBA_Object_duplicate (MATECOMPONENT_OBJREF (factory), ev); -} - -MateComponent_Unknown -mate_panel_applet_shlib_factory (const char *iid, - GType applet_type, - PortableServer_POA poa, - gpointer impl_ptr, - MatePanelAppletFactoryCallback callback, - gpointer user_data, - CORBA_Environment *ev) -{ - g_return_val_if_fail (iid != NULL, CORBA_OBJECT_NIL); - g_return_val_if_fail (callback != NULL, CORBA_OBJECT_NIL); - - return mate_panel_applet_shlib_factory_closure ( - iid, applet_type, poa, impl_ptr, - g_cclosure_new (G_CALLBACK (callback), - user_data, NULL), - ev); -} - void mate_panel_applet_set_background_widget (MatePanelApplet *applet, GtkWidget *widget) diff --git a/matecomponent/libmate-panel-applet/mate-panel-applet.h b/matecomponent/libmate-panel-applet/mate-panel-applet.h index 28d9e89d..3310fa32 100644 --- a/matecomponent/libmate-panel-applet/mate-panel-applet.h +++ b/matecomponent/libmate-panel-applet/mate-panel-applet.h @@ -159,21 +159,6 @@ int mate_panel_applet_factory_main_closure (const gchar *iid, GType applet_type, GClosure *closure); -MateComponent_Unknown mate_panel_applet_shlib_factory (const char *iid, - GType applet_type, - PortableServer_POA poa, - gpointer impl_ptr, - MatePanelAppletFactoryCallback callback, - gpointer user_data, - CORBA_Environment *ev); - -MateComponent_Unknown mate_panel_applet_shlib_factory_closure (const char *iid, - GType applet_type, - PortableServer_POA poa, - gpointer impl_ptr, - GClosure *closure, - CORBA_Environment *ev); - /* * These macros are getting a bit unwieldy. * @@ -234,23 +219,6 @@ int main (int argc, char *argv []) \ return retval; \ } -#define MATE_PANEL_APPLET_MATECOMPONENT_SHLIB_FACTORY(iid, type, descr, callback, data) \ -static MateComponent_Unknown \ -__mate_panel_applet_shlib_factory (PortableServer_POA poa, \ - const char *oafiid, \ - gpointer impl_ptr, \ - CORBA_Environment *ev) \ -{ \ - _MATE_PANEL_APPLET_SETUP_GETTEXT (FALSE); \ - return mate_panel_applet_shlib_factory ((iid), (type), poa, impl_ptr, \ - (callback), (data), ev); \ -} \ -static MateComponentActivationPluginObject plugin_list[] = { \ - { (iid), __mate_panel_applet_shlib_factory }, \ - { NULL } \ -}; \ -const MateComponentActivationPlugin MateComponent_Plugin_info = { plugin_list, (descr) }; - #ifdef __cplusplus } #endif |