[libdazzle] shortcuts: remove add/remove theme API
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] shortcuts: remove add/remove theme API
- Date: Tue, 13 Jun 2017 06:48:30 +0000 (UTC)
commit 98e576dd2a130514bf4978c6dbd5ab82948a6f81
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 12 19:04:50 2017 -0700
shortcuts: remove add/remove theme API
As previously noted, this will all happen via the file loading API now.
src/shortcuts/dzl-shortcut-manager.c | 50 ----------------------------------
src/shortcuts/dzl-shortcut-manager.h | 4 ---
2 files changed, 0 insertions(+), 54 deletions(-)
---
diff --git a/src/shortcuts/dzl-shortcut-manager.c b/src/shortcuts/dzl-shortcut-manager.c
index 74da0b7..f8ea532 100644
--- a/src/shortcuts/dzl-shortcut-manager.c
+++ b/src/shortcuts/dzl-shortcut-manager.c
@@ -721,56 +721,6 @@ list_model_iface_init (GListModelInterface *iface)
iface->get_item = dzl_shortcut_manager_get_item;
}
-void
-dzl_shortcut_manager_add_theme (DzlShortcutManager *self,
- DzlShortcutTheme *theme)
-{
- DzlShortcutManagerPrivate *priv = dzl_shortcut_manager_get_instance_private (self);
- guint position;
-
- g_return_if_fail (DZL_IS_SHORTCUT_MANAGER (self));
- g_return_if_fail (DZL_IS_SHORTCUT_THEME (theme));
-
- for (guint i = 0; i < priv->themes->len; i++)
- {
- if (g_ptr_array_index (priv->themes, i) == theme)
- {
- g_warning ("%s named %s has already been added",
- G_OBJECT_TYPE_NAME (theme),
- dzl_shortcut_theme_get_name (theme));
- return;
- }
- }
-
- position = priv->themes->len;
-
- g_ptr_array_add (priv->themes, g_object_ref (theme));
-
- _dzl_shortcut_theme_set_manager (theme, self);
-
- g_list_model_items_changed (G_LIST_MODEL (self), position, 0, 1);
-}
-
-void
-dzl_shortcut_manager_remove_theme (DzlShortcutManager *self,
- DzlShortcutTheme *theme)
-{
- DzlShortcutManagerPrivate *priv = dzl_shortcut_manager_get_instance_private (self);
-
- g_return_if_fail (DZL_IS_SHORTCUT_MANAGER (self));
- g_return_if_fail (DZL_IS_SHORTCUT_THEME (theme));
-
- for (guint i = 0; i < priv->themes->len; i++)
- {
- if (g_ptr_array_index (priv->themes, i) == theme)
- {
- g_ptr_array_remove_index (priv->themes, i);
- g_list_model_items_changed (G_LIST_MODEL (self), i, 1, 0);
- break;
- }
- }
-}
-
const gchar *
dzl_shortcut_manager_get_user_dir (DzlShortcutManager *self)
{
diff --git a/src/shortcuts/dzl-shortcut-manager.h b/src/shortcuts/dzl-shortcut-manager.h
index dff9f7a..99c2886 100644
--- a/src/shortcuts/dzl-shortcut-manager.h
+++ b/src/shortcuts/dzl-shortcut-manager.h
@@ -85,10 +85,6 @@ DzlShortcutTheme *dzl_shortcut_manager_get_theme_by_name (DzlShortcutMan
gboolean dzl_shortcut_manager_handle_event (DzlShortcutManager *self,
const GdkEventKey *event,
GtkWidget *toplevel);
-void dzl_shortcut_manager_add_theme (DzlShortcutManager *self,
- DzlShortcutTheme *theme);
-void dzl_shortcut_manager_remove_theme (DzlShortcutManager *self,
- DzlShortcutTheme *theme);
const gchar *dzl_shortcut_manager_get_user_dir (DzlShortcutManager *self);
void dzl_shortcut_manager_set_user_dir (DzlShortcutManager *self,
const gchar *user_dir);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]