[gnome-photos] dlna-renderer, dlna-renderers-dialog: Style fixes and typos
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] dlna-renderer, dlna-renderers-dialog: Style fixes and typos
- Date: Thu, 16 Jan 2014 11:06:37 +0000 (UTC)
commit d6401eade59ab94891a0d3d9710b4c78e5e579e0
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Jan 16 11:37:29 2014 +0100
dlna-renderer, dlna-renderers-dialog: Style fixes and typos
src/photos-dlna-renderer.c | 21 ++++++++++++---------
src/photos-dlna-renderers-dialog.c | 23 +++++++++--------------
2 files changed, 21 insertions(+), 23 deletions(-)
---
diff --git a/src/photos-dlna-renderer.c b/src/photos-dlna-renderer.c
index d10dbcf..abd99e4 100644
--- a/src/photos-dlna-renderer.c
+++ b/src/photos-dlna-renderer.c
@@ -528,9 +528,10 @@ photos_dlna_renderer_unshare_remove_file_cb (GObject *source_object,
dleyna_push_host_call_remove_file_finish (DLEYNA_PUSH_HOST (source_object), res, &error);
if (error != NULL)
{
- /* Assume that ignoring RemoveFile() errors is safe, since they are
- * likely caused by the file being already removed or the DBus service
- * having been restarted. */
+ /* Assume that ignoring RemoveFile() errors is safe, since they
+ * are likely caused by the file being already removed or the
+ * DBus service having been restarted.
+ */
g_warning ("Failed to call the RemoveFile method: %s", error->message);
g_error_free (error);
success = FALSE;
@@ -672,15 +673,17 @@ photos_dlna_renderer_device_get_icon_cb (GObject *source_object,
gsize icon_data_size;
GError *error = NULL;
- /* The icon data is forced to be a GVariant since the GDBus bindings assume
- * bytestrings (type 'ay') to be nul-terminated and thus do not return the length
- * of the buffer */
+ /* The icon data is forced to be a GVariant since the GDBus bindings
+ * assume bytestrings (type 'ay') to be nul-terminated and thus do
+ * not return the length of the buffer.
+ */
dleyna_renderer_device_call_get_icon_finish (DLEYNA_RENDERER_DEVICE (source_object),
&icon_variant, NULL, res, &error);
RETURN_ON_ERROR (task, error, "Failed to call the GetIcon method");
- /* We know that the serialization of variant containing just a byte array
- * 'ay' is the byte array itself */
+ /* We know that the serialization of variant containing just a byte
+ * array 'ay' is the byte array itself.
+ */
icon_bytes = g_variant_get_data_as_bytes (icon_variant);
g_variant_unref (icon_variant);
@@ -719,8 +722,8 @@ photos_dlna_renderer_get_udn (PhotosDlnaRenderer *self)
void
photos_dlna_renderer_get_icon (PhotosDlnaRenderer *self,
- const gchar *resolution,
const gchar *requested_mimetype,
+ const gchar *resolution,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
diff --git a/src/photos-dlna-renderers-dialog.c b/src/photos-dlna-renderers-dialog.c
index 3124f75..633bbed 100644
--- a/src/photos-dlna-renderers-dialog.c
+++ b/src/photos-dlna-renderers-dialog.c
@@ -170,8 +170,7 @@ out:
static void
-photos_dlna_renderers_dialog_add_renderer (PhotosDlnaRenderersDialog *self,
- PhotosDlnaRenderer *renderer)
+photos_dlna_renderers_dialog_add_renderer (PhotosDlnaRenderersDialog *self, PhotosDlnaRenderer *renderer)
{
PhotosDlnaRenderersDialogPrivate *priv = self->priv;
GIcon *icon;
@@ -182,12 +181,13 @@ photos_dlna_renderers_dialog_add_renderer (PhotosDlnaRenderersDialog *self,
const gchar *name;
row = gtk_list_box_row_new ();
+ gtk_container_add (GTK_CONTAINER (priv->listbox), row);
+
row_grid = gtk_grid_new ();
gtk_container_set_border_width (GTK_CONTAINER (row_grid), 12);
gtk_orientable_set_orientation (GTK_ORIENTABLE (row_grid), GTK_ORIENTATION_HORIZONTAL);
gtk_grid_set_column_spacing (GTK_GRID (row_grid), 12);
gtk_container_add (GTK_CONTAINER (row), row_grid);
- gtk_container_add (GTK_CONTAINER (priv->listbox), row);
g_object_set_data_full (G_OBJECT (row), "renderer", renderer, g_object_unref);
@@ -197,8 +197,7 @@ photos_dlna_renderers_dialog_add_renderer (PhotosDlnaRenderersDialog *self,
image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_DIALOG);
g_object_ref (image); /* keep a ref for the following async call and release it in the callback */
- photos_dlna_renderer_get_icon (renderer, "", "", NULL,
- photos_dlna_renderers_dialog_set_icon_cb, image);
+ photos_dlna_renderer_get_icon (renderer, "", "", NULL, photos_dlna_renderers_dialog_set_icon_cb, image);
gtk_container_add (GTK_CONTAINER (row_grid), image);
@@ -223,10 +222,9 @@ photos_dlna_renderers_dialog_init (PhotosDlnaRenderersDialog *self)
PhotosDlnaRenderersDialogPrivate *priv;
GList *renderers;
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- PHOTOS_TYPE_DLNA_RENDERERS_DIALOG,
- PhotosDlnaRenderersDialogPrivate);
+ self->priv = photos_dlna_renderers_dialog_get_instance_private (self);
priv = self->priv;
+
priv->item_mngr = photos_item_manager_dup_singleton ();
priv->renderers_mngr = photos_dlna_renderers_manager_dup_singleton ();
priv->remote_mngr = photos_remote_display_manager_dup_singleton ();
@@ -268,8 +266,7 @@ photos_dlna_renderers_dialog_class_init (PhotosDlnaRenderersDialogClass *class)
NULL,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
- gtk_widget_class_set_template_from_resource (widget_class,
- "/org/gnome/photos/dlna-renderers-dialog.ui");
+ gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/photos/dlna-renderers-dialog.ui");
gtk_widget_class_bind_template_child_private (widget_class, PhotosDlnaRenderersDialog, listbox);
gtk_widget_class_bind_template_callback (widget_class, photos_dlna_renderers_dialog_row_activated_cb);
@@ -277,11 +274,9 @@ photos_dlna_renderers_dialog_class_init (PhotosDlnaRenderersDialogClass *class)
GtkWidget *
-photos_dlna_renderers_dialog_new (GtkWindow *parent,
- const gchar *urn)
+photos_dlna_renderers_dialog_new (GtkWindow *parent, const gchar *urn)
{
g_return_val_if_fail (GTK_IS_WINDOW (parent), NULL);
- return g_object_new (PHOTOS_TYPE_DLNA_RENDERERS_DIALOG,
- "transient-for", parent, "urn", urn, NULL);
+ return g_object_new (PHOTOS_TYPE_DLNA_RENDERERS_DIALOG, "transient-for", parent, "urn", urn, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]