From 92ba1e2db39b69340462ce0570bb971154ecdf2d Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Fri, 7 Jan 2011 17:42:43 -0800 Subject: Change references from matecomponent-applet to external-applet in mateconf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Germán Póo-Caamaño --- mate-panel/mate-panel-add.in | 2 +- mate-panel/panel-default-setup.entries | 12 ++++++------ mate-panel/panel-object.schemas.in | 6 ++++-- mate-panel/panel-profile.c | 4 +++- 4 files changed, 14 insertions(+), 10 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/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 @@ applets/window_menu/object_type /schemas/apps/panel/objects/object_type - matecomponent-applet + external-applet @@ -388,7 +388,7 @@ applets/clock/object_type /schemas/apps/panel/objects/object_type - matecomponent-applet + external-applet @@ -442,7 +442,7 @@ applets/notification_area/object_type /schemas/apps/panel/objects/object_type - matecomponent-applet + external-applet @@ -496,7 +496,7 @@ applets/show_desktop_button/object_type /schemas/apps/panel/objects/object_type - matecomponent-applet + external-applet @@ -550,7 +550,7 @@ applets/window_list/object_type /schemas/apps/panel/objects/object_type - matecomponent-applet + external-applet @@ -604,7 +604,7 @@ applets/workspace_switcher/object_type /schemas/apps/panel/objects/object_type - matecomponent-applet + external-applet 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 @@ 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". @@ -105,7 +106,8 @@ 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"). 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" }, -- cgit v1.2.1 From 065282bda1caacc9891c4f0c5411f03f17dc5555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20P=C3=B3o-Caama=C3=B1o?= Date: Sat, 29 Jan 2011 22:08:32 -0800 Subject: mate-panel-desktop: Fix the Categories key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mate-panel is not an utility, it is part of the core. Hence, the Categories reflects panel is part of System. https://bugzilla.gnome.org/show_bug.cgi?id=640690 Signed-off-by: Germán Póo-Caamaño --- mate-panel/mate-panel.desktop.in.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1 From ab55bf3e46ccab95d268bf0e10dce2e15294cabf Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Thu, 17 Feb 2011 12:47:25 +0100 Subject: matecomponent: Remove API to build matecomponent applet as shared library Yes, it's bad, it breaks API and ABI. In a stable branch. But it's the matecomponent compatibility module. And it's a rather important fix. We can't have matecomponent applets as shared libraries since both matecomponent applets and dbus applets are sharing the MatePanelApplet type name, and they will conflict in the same process. Since we know we want to allow dbus in-process applets, it means we have to disallow matecomponent in-process applets. Hence this change. --- .../libmate-panel-applet/mate-panel-applet.c | 49 ---------------------- .../libmate-panel-applet/mate-panel-applet.h | 32 -------------- 2 files changed, 81 deletions(-) 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 #include #include -#include #include #include #include @@ -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 -- cgit v1.2.1 From 68ec89213e4d7c23cb681016b0b627e39fae9e4f Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Sun, 23 Aug 2009 20:40:16 +0000 Subject: When using Drag'n'Drop from Places menu, install a link launcher (.desktop file) instead of copying the entire directory. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=357934 Bug-Ubuntu: https://launchpad.net/bugs/62529 --- mate-panel/menu.c | 5 +++-- mate-panel/menu.h | 3 ++- mate-panel/panel-menu-items.c | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/mate-panel/menu.c b/mate-panel/menu.c index 273fae86..b3256842 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); 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-menu-items.c b/mate-panel/panel-menu-items.c index 81668dbc..e39fa567 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 * -- cgit v1.2.1 From e0d316abc53e6858814ccc83cb42b3e541e72977 Mon Sep 17 00:00:00 2001 From: "Jorge Bernal \"Koke" Date: Wed, 23 Mar 2005 03:20:01 +0100 Subject: Show a default icon for .desktop files that don't have one Bug: https://bugzilla.gnome.org/show_bug.cgi?id=76495 --- mate-panel/menu.c | 2 +- mate-panel/panel-stock-icons.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mate-panel/menu.c b/mate-panel/menu.c index b3256842..8b60058c 100644 --- a/mate-panel/menu.c +++ b/mate-panel/menu.c @@ -1489,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/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); -- cgit v1.2.1 From 8c25e1bdd328a8712735c0b00cf4aede7993da1d Mon Sep 17 00:00:00 2001 From: Oliver Grawert Date: Mon, 13 Oct 2008 16:53:28 +0200 Subject: Suppress the shutdown option in the panel if LTSP_CLIENT is set --- mate-panel/panel-menu-items.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mate-panel/panel-menu-items.c b/mate-panel/panel-menu-items.c index e39fa567..bd234de9 100644 --- a/mate-panel/panel-menu-items.c +++ b/mate-panel/panel-menu-items.c @@ -1603,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); -- cgit v1.2.1 From 4cd113800b89a73dfa77ed4081811055a4cbe23e Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Fri, 10 Jul 2009 14:24:56 +0200 Subject: lockdown locks the menu editor entry too Bug: http://bugzilla.gnome.org/show_bug.cgi?id=499148 Bug-Ubuntu: https://bugs.launchpad.net/bugs/4712 --- mate-panel/panel-menu-bar.c | 2 +- mate-panel/panel-menu-button.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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); -- cgit v1.2.1