[gnome-shell/wip/carlosg/startup-sequences: 152/152] shell: Hide/drop unused public API



commit 8ed0378254ba7f17d2cc28793dba7c5cccb3013c
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Aug 23 00:02:37 2018 +0200

    shell: Hide/drop unused public API
    
    These static methods won't work as-is as MetaStartupSequence API in
    JS bindings. Luckily those are used nowhere there.

 src/shell-window-tracker.c | 47 ++--------------------------------------------
 src/shell-window-tracker.h |  3 ---
 2 files changed, 2 insertions(+), 48 deletions(-)
---
diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c
index f83ac42a2..de5118e44 100644
--- a/src/shell-window-tracker.c
+++ b/src/shell-window-tracker.c
@@ -72,6 +72,7 @@ static void on_focus_window_changed (MetaDisplay *display, GParamSpec *spec, She
 static void track_window (ShellWindowTracker *tracker, MetaWindow *window);
 static void disassociate_window (ShellWindowTracker *tracker, MetaWindow *window);
 
+static ShellApp * shell_startup_sequence_get_app (MetaStartupSequence *sequence);
 
 static void
 shell_window_tracker_get_property (GObject    *gobject,
@@ -803,13 +804,7 @@ shell_window_tracker_get_startup_sequences (ShellWindowTracker *self)
   return meta_startup_notification_get_sequences (sn);
 }
 
-/**
- * shell_startup_sequence_get_app:
- * @sequence: A #MetaStartupSequence
- *
- * Returns: (transfer none): The application being launched, or %NULL if unknown.
- */
-ShellApp *
+static ShellApp *
 shell_startup_sequence_get_app (MetaStartupSequence *sequence)
 {
   const char *appid;
@@ -828,44 +823,6 @@ shell_startup_sequence_get_app (MetaStartupSequence *sequence)
   return app;
 }
 
-/**
- * shell_startup_sequence_create_icon:
- * @sequence:
- * @size: Size in pixels of icon
- *
- * Returns: (transfer none): A new #ClutterTexture containing an icon for the sequence
- */
-ClutterActor *
-shell_startup_sequence_create_icon (MetaStartupSequence *sequence,
-                                    guint                size)
-{
-  GIcon *themed;
-  const char *icon_name;
-  ClutterActor *texture;
-  gint scale;
-  ShellGlobal *global;
-  StThemeContext *context;
-
-  global = shell_global_get ();
-  context = st_theme_context_get_for_stage (shell_global_get_stage (global));
-  g_object_get (context, "scale-factor", &scale, NULL);
-
-  icon_name = meta_startup_sequence_get_icon_name (sequence);
-  if (!icon_name)
-    {
-      texture = clutter_texture_new ();
-      clutter_actor_set_size (texture, size * scale, size * scale);
-      return texture;
-    }
-
-  themed = g_themed_icon_new (icon_name);
-  texture = st_texture_cache_load_gicon (st_texture_cache_get_default (),
-                                         NULL, themed, size, scale);
-  g_object_unref (G_OBJECT (themed));
-  return texture;
-}
-
-
 /**
  * shell_window_tracker_get_default:
  *
diff --git a/src/shell-window-tracker.h b/src/shell-window-tracker.h
index 4270495b9..aee8a5d37 100644
--- a/src/shell-window-tracker.h
+++ b/src/shell-window-tracker.h
@@ -26,9 +26,6 @@ const char *_shell_window_tracker_get_app_context (ShellWindowTracker *tracker,
 
 GSList *shell_window_tracker_get_startup_sequences (ShellWindowTracker *tracker);
 
-ShellApp *shell_startup_sequence_get_app (MetaStartupSequence *sequence);
-ClutterActor *shell_startup_sequence_create_icon (MetaStartupSequence *sequence, guint size);
-
 G_END_DECLS
 
 #endif /* __SHELL_WINDOW_TRACKER_H__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]