[Buoh-dev] CVS commit to /cvsroot/buoh/buoh/src by carlosgc
- From: noreply at forge.novell.com (noreply forge novell com)
- Subject: [Buoh-dev] CVS commit to /cvsroot/buoh/buoh/src by carlosgc
- Date: Sat Oct 21 09:50:12 2006
CVS commit to /cvsroot/buoh/buoh/src by carlosgc
Modified Files:
buoh-view-comic.c buoh-view-comic.h buoh-view.c buoh-view.h
buoh-window.c
Log Message:
2006-10-21 Carlos Garcia Campos <carlosgc gnome org>
* data/buoh.schemas.in:
* src/buoh-view-comic.[ch]:
* src/buoh-view.[ch]:
* src/buoh-window.c:
Store zoom mode in GConf so that it can be remembered between
sessions.
===================================================================
RCS file: /cvsroot/buoh/buoh/src/buoh-view-comic.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- /cvsroot/buoh/buoh/src/buoh-view-comic.c 2006/10/21 14:50:30 1.20
+++ /cvsroot/buoh/buoh/src/buoh-view-comic.c 2006/10/21 15:50:10 1.21
@@ -837,15 +837,6 @@
}
static void
-buoh_view_comic_set_zoom_mode (BuohViewComic *c_view,
- BuohViewZoomMode mode)
-{
- g_object_set (G_OBJECT (c_view),
- "zoom-mode", mode,
- NULL);
-}
-
-static void
buoh_view_comic_zoom (BuohViewComic *c_view, gdouble factor, gboolean relative)
{
gdouble scale;
@@ -948,3 +939,14 @@
return c_view->priv->zoom_mode;
}
+
+void
+buoh_view_comic_set_zoom_mode (BuohViewComic *c_view,
+ BuohViewZoomMode mode)
+{
+ g_return_if_fail (BUOH_IS_VIEW_COMIC (c_view));
+
+ g_object_set (G_OBJECT (c_view),
+ "zoom-mode", mode,
+ NULL);
+}
===================================================================
RCS file: /cvsroot/buoh/buoh/src/buoh-view-comic.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /cvsroot/buoh/buoh/src/buoh-view-comic.h 2006/10/08 15:38:29 1.4
+++ /cvsroot/buoh/buoh/src/buoh-view-comic.h 2006/10/21 15:50:10 1.5
@@ -47,17 +47,19 @@
};
GType buoh_view_comic_get_type (void) G_GNUC_CONST;
-GtkWidget *buoh_view_comic_new (BuohView *view);
+GtkWidget *buoh_view_comic_new (BuohView *view);
-gboolean buoh_view_comic_is_min_zoom (BuohViewComic *c_view);
-gboolean buoh_view_comic_is_max_zoom (BuohViewComic *c_view);
-gboolean buoh_view_comic_is_normal_size (BuohViewComic *c_view);
-void buoh_view_comic_zoom_in (BuohViewComic *c_view);
-void buoh_view_comic_zoom_out (BuohViewComic *c_view);
-void buoh_view_comic_normal_size (BuohViewComic *c_view);
-void buoh_view_comic_best_fit (BuohViewComic *c_view);
-void buoh_view_comic_fit_width (BuohViewComic *c_view);
-BuohViewZoomMode buoh_view_comic_get_zoom_mode (BuohViewComic *c_view);
+gboolean buoh_view_comic_is_min_zoom (BuohViewComic *c_view);
+gboolean buoh_view_comic_is_max_zoom (BuohViewComic *c_view);
+gboolean buoh_view_comic_is_normal_size (BuohViewComic *c_view);
+void buoh_view_comic_zoom_in (BuohViewComic *c_view);
+void buoh_view_comic_zoom_out (BuohViewComic *c_view);
+void buoh_view_comic_normal_size (BuohViewComic *c_view);
+void buoh_view_comic_best_fit (BuohViewComic *c_view);
+void buoh_view_comic_fit_width (BuohViewComic *c_view);
+BuohViewZoomMode buoh_view_comic_get_zoom_mode (BuohViewComic *c_view);
+void buoh_view_comic_set_zoom_mode (BuohViewComic *c_view,
+ BuohViewZoomMode mode);
G_END_DECLS
===================================================================
RCS file: /cvsroot/buoh/buoh/src/buoh-view.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- /cvsroot/buoh/buoh/src/buoh-view.c 2006/10/21 14:50:30 1.16
+++ /cvsroot/buoh/buoh/src/buoh-view.c 2006/10/21 15:50:10 1.17
@@ -400,6 +400,16 @@
return buoh_view_comic_get_zoom_mode (BUOH_VIEW_COMIC (view->priv->comic));
}
+void
+buoh_view_set_zoom_mode (BuohView *view,
+ BuohViewZoomMode mode)
+{
+ g_return_if_fail (BUOH_IS_VIEW (view));
+
+ buoh_view_comic_set_zoom_mode (BUOH_VIEW_COMIC (view->priv->comic),
+ mode);
+}
+
BuohViewStatus
buoh_view_get_status (BuohView *view)
{
===================================================================
RCS file: /cvsroot/buoh/buoh/src/buoh-view.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- /cvsroot/buoh/buoh/src/buoh-view.h 2006/10/08 15:38:29 1.9
+++ /cvsroot/buoh/buoh/src/buoh-view.h 2006/10/21 15:50:10 1.10
@@ -80,6 +80,8 @@
void buoh_view_zoom_best_fit (BuohView *view);
void buoh_view_zoom_fit_width (BuohView *view);
BuohViewZoomMode buoh_view_get_zoom_mode (BuohView *view);
+void buoh_view_set_zoom_mode (BuohView *view,
+ BuohViewZoomMode mode);
/* Status */
BuohViewStatus buoh_view_get_status (BuohView *view);
===================================================================
RCS file: /cvsroot/buoh/buoh/src/buoh-window.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- /cvsroot/buoh/buoh/src/buoh-window.c 2006/10/21 14:50:30 1.36
+++ /cvsroot/buoh/buoh/src/buoh-window.c 2006/10/21 15:50:10 1.37
@@ -58,6 +58,7 @@
#define GCONF_SHOW_TOOLBAR "/apps/buoh/show_toolbar"
#define GCONF_SHOW_STATUSBAR "/apps/buoh/show_statusbar"
+#define GCONF_ZOOM_MODE "/apps/buoh/zoom_mode"
#define GCONF_LOCKDOWN_SAVE "/desktop/gnome/lockdown/disable_save_to_disk"
static void buoh_window_init (BuohWindow *buoh_window);
@@ -245,6 +246,7 @@
GError *error = NULL;
gboolean visible_toolbar;
gboolean visible_statusbar;
+ BuohViewZoomMode zoom_mode;
buoh_window->priv = BUOH_WINDOW_GET_PRIVATE (buoh_window);
@@ -311,7 +313,7 @@
action = gtk_action_group_get_action (action_group, "ViewStatusbar");
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
visible_statusbar);
-
+
/* Toolbar */
toolbar = gtk_ui_manager_get_widget (buoh_window->priv->ui_manager,
"/Toolbar");
@@ -324,10 +326,15 @@
/* Pane */
paned = gtk_hpaned_new ();
+ /* FIXME: Remember side position */
gtk_paned_set_position (GTK_PANED (paned), 230);
/* buoh view */
buoh_window->priv->view = BUOH_VIEW (buoh_view_new ());
+ zoom_mode = gconf_client_get_int (buoh_window->priv->gconf_client,
+ GCONF_ZOOM_MODE,
+ NULL);
+ buoh_view_set_zoom_mode (buoh_window->priv->view, zoom_mode);
g_signal_connect (G_OBJECT (buoh_window->priv->view), "notify::status",
G_CALLBACK (buoh_window_view_status_change_cb),
(gpointer) buoh_window);
@@ -732,8 +739,14 @@
if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) {
buoh_view_zoom_best_fit (window->priv->view);
+ gconf_client_set_int (window->priv->gconf_client,
+ GCONF_ZOOM_MODE,
+ VIEW_ZOOM_BEST_FIT, NULL);
} else {
buoh_view_zoom_normal_size (window->priv->view);
+ gconf_client_set_int (window->priv->gconf_client,
+ GCONF_ZOOM_MODE,
+ VIEW_ZOOM_FREE, NULL);
}
}
@@ -744,8 +757,14 @@
if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) {
buoh_view_zoom_fit_width (window->priv->view);
+ gconf_client_set_int (window->priv->gconf_client,
+ GCONF_ZOOM_MODE,
+ VIEW_ZOOM_FIT_WIDTH, NULL);
} else {
buoh_view_zoom_normal_size (window->priv->view);
+ gconf_client_set_int (window->priv->gconf_client,
+ GCONF_ZOOM_MODE,
+ VIEW_ZOOM_FREE, NULL);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]