[Xfce4-commits] <xfce4-settings:xrandr-display-settings> Make +xfce_randr_find_mode_by_id() accessible

Jérôme Guelfucci noreply at xfce.org
Mon Jun 21 11:46:05 CEST 2010


Updating branch refs/heads/xrandr-display-settings
         to 92e59e7cf2122df7d5ee91e3d5167ea04fd91f0f (commit)
       from 856ea3e49669d7a3f63eea5fe740c6c73fa5b39b (commit)

commit 92e59e7cf2122df7d5ee91e3d5167ea04fd91f0f
Author: Lionel Le Folgoc <mrpouit at gmail.com>
Date:   Sat Jun 19 23:20:22 2010 +0200

    Make +xfce_randr_find_mode_by_id() accessible
    
    This function is used in the interface, should be visible.

 dialogs/display-settings/xfce-randr.c |   50 ++++++++++++++++----------------
 dialogs/display-settings/xfce-randr.h |   30 +++++++++++--------
 2 files changed, 42 insertions(+), 38 deletions(-)

diff --git a/dialogs/display-settings/xfce-randr.c b/dialogs/display-settings/xfce-randr.c
index 397bd45..170292b 100644
--- a/dialogs/display-settings/xfce-randr.c
+++ b/dialogs/display-settings/xfce-randr.c
@@ -124,31 +124,6 @@ xfce_randr_get_safe_rotations (XfceRandr *randr,
 
 
 static XfceRRMode *
-xfce_randr_find_mode_by_id (XfceRandr *randr,
-                            gint       output,
-                            RRMode     id)
-{
-    gint n;
-
-    g_return_val_if_fail (randr != NULL, NULL);
-    g_return_val_if_fail (output >= 0 && output < randr->resources->noutput,
-                          NULL);
-
-    if (id == None)
-        return NULL;
-
-    for (n = 0; n < randr->output_info[output]->nmode; ++n)
-    {
-        if (randr->modes[output][n].id == id)
-            return &randr->modes[output][n];
-    }
-
-    return NULL;
-}
-
-
-
-static XfceRRMode *
 xfce_randr_list_supported_modes (XRRScreenResources *resources,
                                 XRROutputInfo       *output_info)
 {
@@ -629,4 +604,29 @@ xfce_randr_friendly_name (XfceRandr   *randr,
     return g_strdup (name);
 }
 
+
+
+XfceRRMode *
+xfce_randr_find_mode_by_id (XfceRandr *randr,
+                            gint       output,
+                            RRMode     id)
+{
+    gint n;
+
+    g_return_val_if_fail (randr != NULL, NULL);
+    g_return_val_if_fail (output >= 0 && output < randr->resources->noutput,
+                          NULL);
+
+    if (id == None)
+        return NULL;
+
+    for (n = 0; n < randr->output_info[output]->nmode; ++n)
+    {
+        if (randr->modes[output][n].id == id)
+            return &randr->modes[output][n];
+    }
+
+    return NULL;
+}
+
 #endif /* !HAS_RANDR_ONE_POINT_TWO */
diff --git a/dialogs/display-settings/xfce-randr.h b/dialogs/display-settings/xfce-randr.h
index 3141799..7067fd6 100644
--- a/dialogs/display-settings/xfce-randr.h
+++ b/dialogs/display-settings/xfce-randr.h
@@ -110,24 +110,28 @@ struct _XfceRandr
 
 
 
-XfceRandr *xfce_randr_new           (GdkDisplay    *display,
-                                     GError       **error);
+XfceRandr *xfce_randr_new              (GdkDisplay    *display,
+                                        GError       **error);
 
-void       xfce_randr_free          (XfceRandr     *randr);
+void        xfce_randr_free            (XfceRandr     *randr);
 
-void       xfce_randr_reload        (XfceRandr     *randr);
+void        xfce_randr_reload          (XfceRandr     *randr);
 
-void       xfce_randr_save          (XfceRandr     *randr,
-                                     const gchar   *scheme,
-                                     XfconfChannel *channel);
+void        xfce_randr_save            (XfceRandr     *randr,
+                                        const gchar   *scheme,
+                                        XfconfChannel *channel);
 
-void       xfce_randr_load          (XfceRandr     *randr,
-                                     const gchar   *scheme,
-                                     XfconfChannel *channel);
+void        xfce_randr_load            (XfceRandr     *randr,
+                                        const gchar   *scheme,
+                                        XfconfChannel *channel);
 
-gchar     *xfce_randr_friendly_name (XfceRandr     *randr,
-                                     RROutput       output,
-                                     const gchar   *name);
+gchar      *xfce_randr_friendly_name   (XfceRandr     *randr,
+                                        RROutput       output,
+                                        const gchar   *name);
+
+XfceRRMode *xfce_randr_find_mode_by_id (XfceRandr     *randr,
+                                        gint           output,
+                                        RRMode         id);
 
 #endif /* !HAS_RANDR_ONE_POINT_TWO */
 



More information about the Xfce4-commits mailing list