Commit 5e1bd6b8 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels

remove unused code

This was used by old menu button, menu bar and user menu objects.
parent 36eb2ec6
Pipeline #31022 failed with stage
in 2 minutes and 27 seconds
......@@ -22,13 +22,6 @@
<value nick='64px' value='64'/>
</enum>
<enum id='org.gnome.gnome-panel.icon-size'>
<value nick='16px' value='1'/>
<value nick='24px' value='3'/>
<value nick='32px' value='5'/>
<value nick='48px' value='6'/>
</enum>
<schema id="org.gnome.gnome-panel.general" path="/org/gnome/gnome-panel/general/">
<key name="enable-tooltips" type="b">
<default>true</default>
......@@ -53,14 +46,6 @@
<description>The maximum size of icons in panels.</description>
</key>
<key name="panel-menu" enum="org.gnome.gnome-panel.icon-size">
<default>'24px'</default>
<summary>Icon size in the menus</summary>
</key>
<key name="panel-menu-bar" enum="org.gnome.gnome-panel.icon-size">
<default>'16px'</default>
<summary>Icon size for only Applications item in the Menu Bar applet</summary>
</key>
<key name="theme-variant" enum="org.gnome.gnome-panel.PanelThemeVariant">
<default>'system'</default>
<summary>Which theme variant to use</summary>
......
......@@ -28,16 +28,11 @@ panel_sources = \
applet.c \
panel-util.c \
panel-run-dialog.c \
menu.c \
panel-context-menu.c \
launcher.c \
panel-applet-frame.c \
panel-applets-manager.c \
panel-stock-icons.c \
panel-action-button.c \
panel-image-menu-item.c \
panel-menu-items.c \
panel-recent.c \
panel-action-protocol.c \
panel-toplevel.c \
panel-struts.c \
......@@ -62,16 +57,11 @@ panel_headers = \
applet.h \
panel-util.h \
panel-run-dialog.h \
menu.h \
panel-context-menu.h \
launcher.h \
panel-applet-frame.h \
panel-applets-manager.h \
panel-stock-icons.h \
panel-action-button.h \
panel-image-menu-item.h \
panel-menu-items.h \
panel-recent.h \
panel-action-protocol.h \
panel-toplevel.h \
panel-struts.h \
......
This diff is collapsed.
/*
* Copyright (C) 1997 - 2000 The Free Software Foundation
* Copyright (C) 2000 Helix Code, Inc.
* Copyright (C) 2000 Eazel, Inc.
* Copyright (C) 2004 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __MENU_H__
#define __MENU_H__
#include "panel-widget.h"
#include "applet.h"
#include <gmenu-tree.h>
#include <gio/gio.h>
G_BEGIN_DECLS
void setup_menuitem (GtkWidget *menuitem,
GtkIconSize icon_size,
GtkWidget *pixmap,
const char *title);
void setup_menu_item_with_icon (GtkWidget *item,
GtkIconSize icon_size,
const char *icon_name,
GIcon *gicon,
const char *title);
GtkWidget *create_empty_menu (void);
GtkWidget *create_applications_menu (const char *menu_file,
const char *menu_path);
GtkWidget *create_main_menu (PanelWidget *panel);
void setup_internal_applet_drag (GtkWidget *menuitem,
PanelActionButtonType type);
void setup_uri_drag (GtkWidget *menuitem,
const char *uri,
const char *icon);
GtkWidget * panel_create_menu (void);
GtkWidget * panel_image_menu_item_new2 (void);
GdkPixbuf * panel_make_menu_icon (GtkIconTheme *icon_theme,
const char *icon,
const char *fallback,
int size,
gboolean *long_operation);
GtkWidget *add_menu_separator (GtkWidget *menu);
gboolean menu_dummy_button_press_event (GtkWidget *menuitem,
GdkEventButton *event);
gchar *get_applications_menu (void);
G_END_DECLS
#endif /* __MENU_H__ */
......@@ -31,7 +31,6 @@
#include <libpanel-util/panel-glib.h>
#include "launcher.h"
#include "menu.h"
#include "panel.h"
#include "panel-applets-manager.h"
#include "panel-applet-frame.h"
......@@ -581,6 +580,14 @@ panel_addto_populate_application_model (GtkTreeStore *store,
}
}
static gchar *
get_applications_menu (void)
{
const gchar *xdg_menu_prefx = g_getenv ("XDG_MENU_PREFIX");
return g_strdup_printf ("%sapplications.menu",
!PANEL_GLIB_STR_EMPTY (xdg_menu_prefx) ? xdg_menu_prefx : "gnome-");
}
static void
panel_addto_make_application_model (PanelAddtoDialog *dialog)
{
......
......@@ -39,7 +39,6 @@
#include "panel-lockdown.h"
#include "panel-object-loader.h"
#include "panel-schemas.h"
#include "panel-stock-icons.h"
#include <libpanel-applet-private/panel-applet-frame-dbus.h>
#include "panel-applet-frame.h"
......
......@@ -117,6 +117,19 @@ present_properties_dialog (GtkWidget *widget,
gtk_window_present (GTK_WINDOW (dialog));
}
static GtkWidget *
add_menu_separator (GtkWidget *menu)
{
GtkWidget *menuitem;
menuitem = gtk_separator_menu_item_new ();
gtk_widget_set_sensitive (menuitem, FALSE);
gtk_widget_show (menuitem);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
return menuitem;
}
static void
panel_context_menu_build_edition (PanelWidget *panel_widget,
GtkWidget *menu)
......@@ -161,6 +174,46 @@ panel_context_menu_build_edition (PanelWidget *panel_widget,
panel_layout_is_writable ());
}
static GtkWidget *
panel_create_menu (void)
{
GtkWidget *retval;
GtkStyleContext *context;
retval = gtk_menu_new ();
gtk_widget_set_name (retval, "gnome-panel-main-menu");
context = gtk_widget_get_style_context (retval);
gtk_style_context_add_class (context, "gnome-panel-main-menu");
return retval;
}
static gboolean
menu_dummy_button_press_event (GtkWidget *menuitem,
GdkEventButton *event)
{
if (event->button == 3)
return TRUE;
return FALSE;
}
static GtkWidget *
create_empty_menu (void)
{
GtkWidget *retval;
retval = panel_create_menu ();
/* intercept all right button clicks makes sure they don't
go to the object itself */
g_signal_connect (retval, "button_press_event",
G_CALLBACK (menu_dummy_button_press_event), NULL);
return retval;
}
GtkWidget *
panel_context_menu_create (PanelWidget *panel)
{
......
This diff is collapsed.
/* GTK - The GIMP Toolkit
* Copyright (C) Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
/*
* This is modified version of gtkimagemenuitem.h copied from GTK+
* 3.8.9 release:
* https://git.gnome.org/browse/gtk+/plain/gtk/gtkimagemenuitem.h?id=3.8.9
*/
#ifndef PANEL_IMAGE_MENU_ITEM_H
#define PANEL_IMAGE_MENU_ITEM_H
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define PANEL_TYPE_IMAGE_MENU_ITEM (panel_image_menu_item_get_type ())
#define PANEL_IMAGE_MENU_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PANEL_TYPE_IMAGE_MENU_ITEM, PanelImageMenuItem))
#define PANEL_IMAGE_MENU_ITEM_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), PANEL_TYPE_IMAGE_MENU_ITEM, PanelImageMenuItemClass))
#define PANEL_IS_IMAGE_MENU_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PANEL_TYPE_IMAGE_MENU_ITEM))
#define PANEL_IS_IMAGE_MENU_ITEM_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), PANEL_TYPE_IMAGE_MENU_ITEM))
#define PANEL_IMAGE_MENU_ITEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PANEL_TYPE_IMAGE_MENU_ITEM, PanelImageMenuItemClass))
typedef struct _PanelImageMenuItem PanelImageMenuItem;
typedef struct _PanelImageMenuItemPrivate PanelImageMenuItemPrivate;
typedef struct _PanelImageMenuItemClass PanelImageMenuItemClass;
struct _PanelImageMenuItem {
GtkMenuItem parent;
PanelImageMenuItemPrivate *priv;
};
struct _PanelImageMenuItemClass {
GtkMenuItemClass parent_class;
};
GType panel_image_menu_item_get_type (void) G_GNUC_CONST;
GtkWidget* panel_image_menu_item_new (void);
GtkWidget* panel_image_menu_item_new_with_label (const gchar *label);
GtkWidget* panel_image_menu_item_new_with_mnemonic (const gchar *label);
void panel_image_menu_item_set_always_show_image (PanelImageMenuItem *image_menu_item,
gboolean always_show);
gboolean panel_image_menu_item_get_always_show_image (PanelImageMenuItem *image_menu_item);
void panel_image_menu_item_set_image (PanelImageMenuItem *image_menu_item,
GtkWidget *image);
GtkWidget* panel_image_menu_item_get_image (PanelImageMenuItem *image_menu_item);
G_END_DECLS
#endif
This diff is collapsed.
/*
* Copyright (C) 2005 Vincent Untz
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
* Authors:
* Vincent Untz <vincent@vuntz.net>
*/
#ifndef __PANEL_MENU_ITEMS_H__
#define __PANEL_MENU_ITEMS_H__
#include "panel-image-menu-item.h"
G_BEGIN_DECLS
#define PANEL_TYPE_PLACE_MENU_ITEM (panel_place_menu_item_get_type ())
#define PANEL_PLACE_MENU_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PANEL_TYPE_PLACE_MENU_ITEM, PanelPlaceMenuItem))
#define PANEL_PLACE_MENU_ITEM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PANEL_TYPE_PLACE_MENU_ITEM, PanelPlaceMenuItemClass))
#define PANEL_IS_PLACE_MENU_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PANEL_TYPE_PLACE_MENU_ITEM))
#define PANEL_IS_PLACE_MENU_ITEM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PANEL_TYPE_PLACE_MENU_ITEM))
#define PANEL_PLACE_MENU_ITEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PANEL_TYPE_PLACE_MENU_ITEM, PanelPlaceMenuItemClass))
typedef struct _PanelPlaceMenuItem PanelPlaceMenuItem;
typedef struct _PanelPlaceMenuItemClass PanelPlaceMenuItemClass;
typedef struct _PanelPlaceMenuItemPrivate PanelPlaceMenuItemPrivate;
struct _PanelPlaceMenuItem {
PanelImageMenuItem parent;
PanelPlaceMenuItemPrivate *priv;
};
struct _PanelPlaceMenuItemClass {
PanelImageMenuItemClass parent_class;
};
GType panel_place_menu_item_get_type (void) G_GNUC_CONST;
#define PANEL_TYPE_DESKTOP_MENU_ITEM (panel_desktop_menu_item_get_type ())
#define PANEL_DESKTOP_MENU_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PANEL_TYPE_DESKTOP_MENU_ITEM, PanelDesktopMenuItem))
#define PANEL_DESKTOP_MENU_ITEM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PANEL_TYPE_DESKTOP_MENU_ITEM, PanelDesktopMenuItemClass))
#define PANEL_IS_DESKTOP_MENU_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PANEL_TYPE_DESKTOP_MENU_ITEM))
#define PANEL_IS_DESKTOP_MENU_ITEM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PANEL_TYPE_DESKTOP_MENU_ITEM))
#define PANEL_DESKTOP_MENU_ITEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PANEL_TYPE_DESKTOP_MENU_ITEM, PanelDesktopMenuItemClass))
typedef struct _PanelDesktopMenuItem PanelDesktopMenuItem;
typedef struct _PanelDesktopMenuItemClass PanelDesktopMenuItemClass;
typedef struct _PanelDesktopMenuItemPrivate PanelDesktopMenuItemPrivate;
struct _PanelDesktopMenuItem{
PanelImageMenuItem parent;
PanelDesktopMenuItemPrivate *priv;
};
struct _PanelDesktopMenuItemClass {
PanelImageMenuItemClass parent_class;
};
GType panel_desktop_menu_item_get_type (void) G_GNUC_CONST;
GtkWidget *panel_place_menu_item_new (gboolean use_image,
gboolean in_menubar);
GtkWidget *panel_desktop_menu_item_new (gboolean use_image,
gboolean in_menubar,
gboolean append_lock_logout);
void panel_menu_items_append_lock_logout (GtkWidget *menu);
void panel_menu_item_activate_desktop_file (GtkWidget *menuitem,
const char *path);
G_END_DECLS
#endif /* __PANEL_MENU_ITEMS_H__ */
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* panel-recent.c
*
* Copyright (C) 2002 James Willcox <jwillcox@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
* Authors:
* James Willcox <jwillcox@gnome.org>
*/
#include <config.h>
#include <string.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
#include <libpanel-util/panel-error.h>
#include <libpanel-util/panel-show.h>
#include "menu.h"
#include "panel-util.h"
#include "panel-recent.h"
#include "panel-stock-icons.h"
#include "panel-multiscreen.h"
#include "panel-icon-names.h"
#include "panel-image-menu-item.h"
static gboolean
show_uri (const char *uri, const char *mime_type, GdkScreen *screen,
GError **error)
{
return panel_show_uri_force_mime_type (screen, uri, mime_type,
gtk_get_current_event_time (),
error);
}
static void
recent_documents_activate_cb (GtkRecentChooser *chooser,
gpointer data)
{
GtkRecentInfo *recent_info;
const char *uri;
const char *mime_type;
GdkScreen *screen;
GError *error = NULL;
screen = gtk_widget_get_screen (GTK_WIDGET (chooser));
recent_info = gtk_recent_chooser_get_current_item (chooser);
uri = gtk_recent_info_get_uri (recent_info);
mime_type = gtk_recent_info_get_mime_type (recent_info);
//FIXME gtk_recent_info_get_application_info() could be useful
if (show_uri (uri, mime_type, screen, &error) != TRUE) {
char *uri_utf8;
uri_utf8 = g_filename_to_utf8 (uri, -1, NULL, NULL, NULL);
//FIXME this could fail... Maybe we want gtk_recent_info_get_display_name()
if (error) {
char *primary;
primary = g_strdup_printf (_("Could not open recently used document \"%s\""),
uri_utf8);
panel_error_dialog (NULL, screen,
"cannot_open_recent_doc", TRUE,
primary, error->message);
g_free (primary);
g_error_free (error);
} else {
char *primary;
char *secondary;
primary = g_strdup_printf (_("Could not open recently used document \"%s\""),
uri_utf8);
secondary = g_strdup_printf (_("An unknown error occurred while trying to open \"%s\"."),
uri_utf8);
panel_error_dialog (NULL, screen,
"cannot_open_recent_doc", TRUE,
primary, secondary);
g_free (primary);
g_free (secondary);
}
g_free (uri_utf8);
}
/* we can unref it only after having used the data we fetched from it */
gtk_recent_info_unref (recent_info);
}
static void
panel_recent_manager_changed_cb (GtkRecentManager *manager,
GtkWidget *menu_item)
{
int size;
g_object_get (manager, "size", &size, NULL);
gtk_widget_set_sensitive (menu_item, size > 0);
}
static GtkWidget *clear_recent_dialog = NULL;
static void
clear_dialog_response (GtkWidget *widget,
int response,
GtkRecentManager *manager)
{
if (response == GTK_RESPONSE_ACCEPT)
gtk_recent_manager_purge_items (manager, NULL);
gtk_widget_destroy (widget);
}
static void
recent_documents_clear_cb (GtkMenuItem *menuitem,
GtkRecentManager *manager)
{
gpointer tmp;
if (clear_recent_dialog != NULL) {
gtk_window_set_screen (GTK_WINDOW (clear_recent_dialog),
gtk_widget_get_screen (GTK_WIDGET (menuitem)));
gtk_window_present (GTK_WINDOW (clear_recent_dialog));
return;
}
clear_recent_dialog = gtk_message_dialog_new (NULL,
0 /* flags */,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_NONE,
_("Clear the Recent Documents list?"));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (clear_recent_dialog),
_("If you clear the Recent Documents list, you clear the following:\n"
"\342\200\242 All items from the Places \342\206\222 Recent Documents menu item.\n"
"\342\200\242 All items from the recent documents list in all applications."));
gtk_dialog_add_buttons (GTK_DIALOG (clear_recent_dialog),
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("C_lear"), GTK_RESPONSE_ACCEPT,
NULL);
gtk_container_set_border_width (GTK_CONTAINER (clear_recent_dialog), 6);
gtk_window_set_title (GTK_WINDOW (clear_recent_dialog),
_("Clear Recent Documents"));
gtk_dialog_set_default_response (GTK_DIALOG (clear_recent_dialog),
GTK_RESPONSE_ACCEPT);
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (clear_recent_dialog),
FALSE);
g_signal_connect (clear_recent_dialog, "response",
G_CALLBACK (clear_dialog_response), manager);
g_signal_connect (clear_recent_dialog, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&clear_recent_dialog);
tmp = &clear_recent_dialog;
g_object_add_weak_pointer (G_OBJECT (clear_recent_dialog), tmp);
gtk_window_set_screen (GTK_WINDOW (clear_recent_dialog),
gtk_widget_get_screen (GTK_WIDGET (menuitem)));
gtk_widget_show (clear_recent_dialog);
}
void
panel_recent_append_documents_menu (GtkWidget *top_menu,
GtkRecentManager *manager)
{
GtkWidget *recent_menu;
GtkWidget *menu_item;
int size;
menu_item = panel_image_menu_item_new ();
setup_menu_item_with_icon (menu_item,
panel_menu_icon_get_size (),
PANEL_ICON_RECENT,
NULL,
_("Recent Documents"));
recent_menu = gtk_recent_chooser_menu_new_for_manager (manager);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), recent_menu);
g_signal_connect (G_OBJECT (recent_menu), "button_press_event",
G_CALLBACK (menu_dummy_button_press_event), NULL);
gtk_menu_shell_append (GTK_MENU_SHELL (top_menu), menu_item);
gtk_widget_show_all (menu_item);
gtk_recent_chooser_set_local_only (GTK_RECENT_CHOOSER (recent_menu),
FALSE);
gtk_recent_chooser_set_show_tips (GTK_RECENT_CHOOSER (recent_menu),
TRUE);
gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (recent_menu),
GTK_RECENT_SORT_MRU);
g_signal_connect (GTK_RECENT_CHOOSER (recent_menu),
"item-activated",
G_CALLBACK (recent_documents_activate_cb),
NULL);
//FIXME this is not possible with GtkRecent...: egg_recent_view_gtk_set_icon_size (view, panel_menu_icon_get_size ());
g_signal_connect_object (manager, "changed",
G_CALLBACK (panel_recent_manager_changed_cb),
menu_item, 0);
size = 0;
g_object_get (manager, "size", &size, NULL);
gtk_widget_set_sensitive (menu_item, size > 0);
add_menu_separator (recent_menu);
menu_item = panel_image_menu_item_new ();
setup_menu_item_with_icon (menu_item,
panel_menu_icon_get_size (),
"edit-clear", NULL,
_("Clear Recent Documents..."));
panel_util_set_tooltip_text (menu_item,
_("Clear all items from the recent documents list"));
gtk_menu_shell_append (GTK_MENU_SHELL (recent_menu), menu_item);
g_signal_connect (menu_item, "activate",
G_CALLBACK (recent_documents_clear_cb),
manager);
}
/*
* panel-recent.h
*
* Copyright (C) 2002 James Willcox <jwillcox@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
* Authors:
* James Willcox <jwillcox@gnome.org>
*/
#ifndef __PANEL_RECENT_H__
#define __PANEL_RECENT_H__
#include "gtk/gtk.h"
G_BEGIN_DECLS
void panel_recent_append_documents_menu (GtkWidget *menu,
GtkRecentManager *manager);
G_END_DECLS
#endif /* __PANEL_RECENT_H__ */
......@@ -51,9 +51,7 @@
#include "panel-util.h"
#include "panel-enums.h"
#include "panel-stock-icons.h"
#include "panel-multiscreen.h"
#include "menu.h"
#include "panel-lockdown.h"
#include "panel-xutils.h"
#include "panel-icon-names.h"
......@@ -892,6 +890,14 @@ get_all_applications_from_dir (GMenuTreeDirectory *directory,
return list;
}
static gchar *
get_applications_menu (void)
{
const gchar *xdg_menu_prefx = g_getenv ("XDG_MENU_PREFIX");
return g_strdup_printf ("%sapplications.menu",
!PANEL_GLIB_STR_EMPTY (xdg_menu_prefx) ? xdg_menu_prefx : "gnome-");
}
static GSList *
get_all_applications (void)
{
......
/*
* panel-stock-icons.c panel stock icons registration
*
* Copyright (C) 2002 Sun Microsystems, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
* Authors:
* Mark McLoughlin <mark@skynet.ie>
*/
#include "config.h"
#include "panel-stock-icons.h"
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include "panel-icon-names.h"
static GtkIconSize panel_menu_icon_size = 0;
GtkIconSize
panel_menu_icon_get_size (void)
{
if (panel_menu_icon_size == 0) {
GSettings *settings = g_settings_new ("org.gnome.gnome-panel.general");
panel_menu_icon_size = (GtkIconSize) g_settings_get_enum (settings, "panel-menu");