[gnome-photos/wip/libgd: 1/4] Make use of the libgd submodule
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/libgd: 1/4] Make use of the libgd submodule
- Date: Sun, 11 Nov 2012 13:33:24 +0000 (UTC)
commit d4af6b7054319d943f0ddd55534c26dbe2d9c71c
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sat Nov 10 12:20:31 2012 +0100
Make use of the libgd submodule
configure.ac | 5 +----
src/Makefile.am | 2 ++
src/photos-main-toolbar.c | 2 +-
src/photos-organize-collection-view.c | 6 +++---
src/photos-utils.c | 2 +-
src/photos-view-container.c | 16 ++++++++++++----
6 files changed, 20 insertions(+), 13 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6462d83..bfbccc5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,13 +94,10 @@ PKG_CHECK_MODULES(LIBRSVG, [librsvg-2.0 >= $LIBRSVG_MIN_VERSION])
PKG_CHECK_MODULES(TRACKER, [tracker-sparql-0.14])
LIBGD_INIT([
- gtk-hacks
main-toolbar
main-icon-view
- margin-container
- notification
+ main-view
static
- tagged-entry
])
AC_CONFIG_FILES([
diff --git a/src/Makefile.am b/src/Makefile.am
index 431288e..1f5c9c4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -146,6 +146,7 @@ AM_CPPFLAGS = \
$(LIBEXIF_CFLAGS) \
$(LIBRSVG_CFLAGS) \
$(TRACKER_CFLAGS) \
+ -I$(top_srcdir)/libgd \
$(NULL)
gnome_photos_LDFLAGS =
@@ -167,6 +168,7 @@ gnome_photos_LDADD = \
$(LIBRSVG_LIBS) \
$(TRACKER_LIBS) \
$(LIBM) \
+ $(top_builddir)/libgd/libgd.la \
$(NULL)
if MAINTAINER_MODE
diff --git a/src/photos-main-toolbar.c b/src/photos-main-toolbar.c
index ffec30e..bc42b1c 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -29,8 +29,8 @@
#include <glib.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
+#include <libgd/gd.h>
-#include "gd-main-toolbar.h"
#include "photos-collection-manager.h"
#include "photos-item-manager.h"
#include "photos-main-toolbar.h"
diff --git a/src/photos-organize-collection-view.c b/src/photos-organize-collection-view.c
index a8ced2b..ebb50a0 100644
--- a/src/photos-organize-collection-view.c
+++ b/src/photos-organize-collection-view.c
@@ -26,8 +26,8 @@
#include "config.h"
#include <glib.h>
+#include <libgd/gd.h>
-#include "gd-styled-text-renderer.h"
#include "photos-organize-collection-model.h"
#include "photos-organize-collection-view.h"
@@ -162,9 +162,9 @@ photos_organize_collection_view_init (PhotosOrganizeCollectionView *self)
G_CALLBACK (photos_organize_collection_view_text_editing_canceled),
self);
- priv->renderer_detail = gd_styled_text_renderer_new ();
+ priv->renderer_detail = gd_two_lines_renderer_new ();
gtk_cell_renderer_set_padding (priv->renderer_detail, 16, 0);
- gd_styled_text_renderer_add_class (GD_STYLED_TEXT_RENDERER (priv->renderer_detail), "dim-label");
+ //gd_styled_text_renderer_add_class (GD_STYLED_TEXT_RENDERER (priv->renderer_detail), "dim-label");
gtk_tree_view_column_pack_start (priv->view_col, priv->renderer_detail, FALSE);
gtk_tree_view_column_set_cell_data_func (priv->view_col,
priv->renderer_detail,
diff --git a/src/photos-utils.c b/src/photos-utils.c
index 863a4c0..9a3bf9a 100644
--- a/src/photos-utils.c
+++ b/src/photos-utils.c
@@ -32,8 +32,8 @@
#include <glib.h>
#include <libgnome-desktop/gnome-desktop-thumbnail.h>
#include <tracker-sparql.h>
+#include <libgd/gd.h>
-#include "gd-main-view.h"
#include "photos-tracker-queue.h"
#include "photos-utils.h"
diff --git a/src/photos-view-container.c b/src/photos-view-container.c
index 69a9c02..f8d02ae 100644
--- a/src/photos-view-container.c
+++ b/src/photos-view-container.c
@@ -24,8 +24,9 @@
#include "config.h"
+#include <libgd/gd.h>
+#include <libgd/gd-main-view.h>
-#include "gd-main-view.h"
#include "photos-item-manager.h"
#include "photos-load-more-button.h"
#include "photos-mode-controller.h"
@@ -163,11 +164,15 @@ photos_view_container_query_status_changed (PhotosTrackerController *trk_cntrlr,
{
PhotosViewContainer *self = PHOTOS_VIEW_CONTAINER (user_data);
PhotosViewContainerPrivate *priv = self->priv;
+ GtkWidget *generic_view;
+
+ generic_view = gd_main_view_get_generic_view (priv->view);
if (!query_status)
{
priv->model = photos_item_manager_get_model (PHOTOS_ITEM_MANAGER (priv->item_mngr));
- gd_main_view_set_model (priv->view, GTK_TREE_MODEL (priv->model));
+
+ gd_main_view_generic_set_model (GD_MAIN_VIEW_GENERIC (generic_view), GTK_TREE_MODEL (priv->model));
photos_selection_controller_freeze_selection (priv->sel_cntrlr, FALSE);
/* TODO: update selection */
}
@@ -175,7 +180,7 @@ photos_view_container_query_status_changed (PhotosTrackerController *trk_cntrlr,
{
photos_selection_controller_freeze_selection (priv->sel_cntrlr, TRUE);
priv->model = NULL;
- gd_main_view_set_model (priv->view, NULL);
+ gd_main_view_generic_set_model (GD_MAIN_VIEW_GENERIC (generic_view), NULL);
}
}
@@ -186,7 +191,10 @@ photos_view_container_selection_mode_changed (PhotosSelectionController *sel_cnt
gpointer user_data)
{
PhotosViewContainer *self = PHOTOS_VIEW_CONTAINER (user_data);
- gd_main_view_set_selection_mode (self->priv->view, mode);
+ GtkWidget *generic_view;
+
+ generic_view = gd_main_view_get_generic_view (self->priv->view);
+ gd_main_view_generic_set_selection_mode (GD_MAIN_VIEW_GENERIC (generic_view), mode);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]