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



commit ce0a78a225279cccbccf60abb84bc3844e0a1be9
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 513e28643..f51bea370 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,
@@ -797,13 +798,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;
@@ -822,44 +817,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 57a1d4652..87c38f882 100644
--- a/src/shell-window-tracker.h
+++ b/src/shell-window-tracker.h
@@ -24,9 +24,6 @@ ShellApp *shell_window_tracker_get_app_from_pid (ShellWindowTracker *tracker, in
 
 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]