[Xfce4-commits] [apps/ristretto] 01/01: Clean up unused functions

noreply at xfce.org noreply at xfce.org
Mon Sep 16 16:23:31 CEST 2019


This is an automated email from the git hooks/post-receive script.

f   2   4   0   4       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/ristretto.

commit 8c1474c149348068563c6012dae6fd6f2ef0ede0
Author: Igor <f2404 at yandex.ru>
Date:   Mon Sep 16 10:23:20 2019 -0400

    Clean up unused functions
---
 src/icon_bar.c | 104 ++-------------------------------------------------------
 1 file changed, 2 insertions(+), 102 deletions(-)

diff --git a/src/icon_bar.c b/src/icon_bar.c
index 5c4d598..29c20fc 100644
--- a/src/icon_bar.c
+++ b/src/icon_bar.c
@@ -146,17 +146,6 @@ rstto_icon_bar_button_release (
         GdkEventButton *event);
 
 static void
-rstto_icon_bar_set_adjustments (
-        RsttoIconBar  *icon_bar,
-        GtkAdjustment *hadj,
-        GtkAdjustment *vadj);
-
-static void
-cb_rstto_icon_bar_adjustment_value_changed (
-        GtkAdjustment *adjustment,
-        RsttoIconBar  *icon_bar);
-
-static void
 rstto_icon_bar_invalidate (RsttoIconBar *icon_bar);
 
 static RsttoIconBarItem *
@@ -901,8 +890,8 @@ rstto_icon_bar_draw (
     GdkRectangle      area;
     RsttoIconBar     *icon_bar = RSTTO_ICON_BAR (widget);
     GList            *lp;
-    RsttoFile        *file;
-    GtkTreeIter       iter;
+    /*RsttoFile        *file;
+    GtkTreeIter       iter;*/
     GdkRGBA           bg_color;
 
     /* Paint the background color - white */
@@ -1114,95 +1103,6 @@ rstto_icon_bar_button_release (
 }
 
 
-static void
-rstto_icon_bar_set_adjustments (
-        RsttoIconBar  *icon_bar,
-        GtkAdjustment *hadj,
-        GtkAdjustment *vadj)
-{
-#if 0
-    gboolean need_adjust = FALSE;
-
-    if (hadj != NULL)
-        g_return_if_fail (GTK_IS_ADJUSTMENT (hadj));
-    else
-        hadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
-
-    if (vadj != NULL)
-        g_return_if_fail (GTK_IS_ADJUSTMENT (vadj));
-    else
-        vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
-
-    if (icon_bar->priv->hadjustment && (icon_bar->priv->hadjustment != hadj))
-    {
-        g_signal_handlers_disconnect_matched (icon_bar->priv->hadjustment, G_SIGNAL_MATCH_DATA,
-                0, 0, NULL, NULL, icon_bar);
-        g_object_unref (icon_bar->priv->hadjustment);
-    }
-
-    if (icon_bar->priv->vadjustment && (icon_bar->priv->vadjustment != vadj))
-    {
-        g_signal_handlers_disconnect_matched (icon_bar->priv->vadjustment, G_SIGNAL_MATCH_DATA,
-                0, 0, NULL, NULL, icon_bar);
-        g_object_unref (icon_bar->priv->vadjustment);
-    }
-
-    if (icon_bar->priv->hadjustment != hadj)
-    {
-        icon_bar->priv->hadjustment = hadj;
-        g_object_ref (icon_bar->priv->hadjustment);
-        // TODO: is this needed?
-        g_object_ref_sink (icon_bar->priv->hadjustment);
-
-        g_signal_connect (icon_bar->priv->hadjustment, "value_changed",
-                G_CALLBACK (cb_rstto_icon_bar_adjustment_value_changed), icon_bar);
-        need_adjust = TRUE;
-    }
-
-    if (icon_bar->priv->vadjustment != vadj)
-    {
-        icon_bar->priv->vadjustment = vadj;
-        g_object_ref (icon_bar->priv->vadjustment);
-        // TODO: is this needed?
-        g_object_ref_sink (icon_bar->priv->vadjustment);
-
-        g_signal_connect (icon_bar->priv->vadjustment, "value_changed",
-                G_CALLBACK (cb_rstto_icon_bar_adjustment_value_changed), icon_bar);
-        need_adjust = TRUE;
-    }
-
-    if (need_adjust)
-        cb_rstto_icon_bar_adjustment_value_changed (NULL, icon_bar);
-#endif
-}
-
-
-
-static void
-cb_rstto_icon_bar_adjustment_value_changed (
-        GtkAdjustment *adjustment,
-        RsttoIconBar  *icon_bar)
-{
-#if 0
-    if (gtk_widget_get_realized (GTK_WIDGET (icon_bar)))
-    {
-        /* Set auto_center to false, this should be the default behaviour
-         * in case a user changes the value of the adjustments.
-         *
-         * If the value is set internally, and auto-center was enabled
-         * the function calling gtk_adjustment_value_changed should set
-         * auto_center to TRUE afterwards.
-         */
-        icon_bar->priv->auto_center = FALSE;
-
-        gdk_window_move (icon_bar->priv->bin_window,
-                - gtk_adjustment_get_value (icon_bar->priv->hadjustment),
-                - gtk_adjustment_get_value (icon_bar->priv->vadjustment));
-
-        gdk_window_process_updates (icon_bar->priv->bin_window, TRUE);
-    }
-#endif
-}
 
 static void
 rstto_icon_bar_invalidate (RsttoIconBar *icon_bar)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list