Commit 56be007b authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

removed incorrect cast from GthViewerPage to GtkWidget

parent 7f77c61a
......@@ -380,7 +380,7 @@ gth_browser_activate_set_desktop_background (GSimpleAction *action,
if (gth_main_extension_is_active ("image_viewer")
&& (gth_browser_get_file_modified (browser) || ! _gdk_pixbuf_mime_type_is_readable (mime_type)))
{
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
viewer_page = gth_browser_get_viewer_page (browser);
if (viewer_page != NULL) {
......
......@@ -285,7 +285,7 @@ image_task_completed_cb (GthTask *task,
if (self->priv->apply_to_original) {
if (self->priv->destination != NULL) {
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
viewer_page = gth_image_viewer_page_tool_get_page (GTH_IMAGE_VIEWER_PAGE_TOOL (self));
gth_image_viewer_page_set_image (GTH_IMAGE_VIEWER_PAGE (viewer_page), self->priv->destination, TRUE);
......@@ -390,7 +390,7 @@ static GtkWidget *
gth_file_tool_adjust_colors_get_options (GthFileTool *base)
{
GthFileToolAdjustColors *self;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
GtkWidget *viewer;
cairo_surface_t *source;
GtkWidget *options;
......@@ -506,7 +506,7 @@ static void
gth_file_tool_adjust_colors_destroy_options (GthFileTool *base)
{
GthFileToolAdjustColors *self;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
self = (GthFileToolAdjustColors *) base;
......@@ -517,7 +517,7 @@ gth_file_tool_adjust_colors_destroy_options (GthFileTool *base)
viewer_page = gth_image_viewer_page_tool_get_page (GTH_IMAGE_VIEWER_PAGE_TOOL (self));
gth_image_viewer_page_reset_viewer_tool (GTH_IMAGE_VIEWER_PAGE (viewer_page));
gth_viewer_page_update_sensitivity (GTH_VIEWER_PAGE (viewer_page));
gth_viewer_page_update_sensitivity (viewer_page);
_cairo_clear_surface (&self->priv->preview);
_cairo_clear_surface (&self->priv->destination);
......
......@@ -359,8 +359,8 @@ image_task_completed_cb (GthTask *task,
if (self->priv->apply_to_original) {
if (self->priv->destination != NULL) {
GtkWidget *window;
GtkWidget *viewer_page;
GtkWidget *window;
GthViewerPage *viewer_page;
window = gth_file_tool_get_window (GTH_FILE_TOOL (self));
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
......@@ -487,7 +487,7 @@ gth_file_tool_adjust_contrast_get_options (GthFileTool *base)
{
GthFileToolAdjustContrast *self;
GtkWidget *window;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
GtkWidget *viewer;
cairo_surface_t *source;
GtkWidget *options;
......@@ -566,7 +566,7 @@ gth_file_tool_adjust_contrast_destroy_options (GthFileTool *base)
{
GthFileToolAdjustContrast *self;
GtkWidget *window;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
self = (GthFileToolAdjustContrast *) base;
......@@ -578,7 +578,7 @@ gth_file_tool_adjust_contrast_destroy_options (GthFileTool *base)
window = gth_file_tool_get_window (GTH_FILE_TOOL (self));
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
gth_image_viewer_page_reset_viewer_tool (GTH_IMAGE_VIEWER_PAGE (viewer_page));
gth_viewer_page_update_sensitivity (GTH_VIEWER_PAGE (viewer_page));
gth_viewer_page_update_sensitivity (viewer_page);
_g_clear_object (&self->priv->builder);
......
......@@ -85,7 +85,7 @@ image_task_completed_cb (GthTask *task,
{
GthFileToolCrop *self = user_data;
cairo_surface_t *destination;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
if (error != NULL) {
g_object_unref (task);
......@@ -401,7 +401,7 @@ gth_file_tool_crop_get_options (GthFileTool *base)
{
GthFileToolCrop *self;
GtkWidget *window;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
GtkWidget *viewer;
cairo_surface_t *source;
GtkWidget *options;
......@@ -571,7 +571,7 @@ gth_file_tool_crop_destroy_options (GthFileTool *base)
{
GthFileToolCrop *self;
GtkWidget *window;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
GtkWidget *viewer;
GSettings *viewer_settings;
......
......@@ -218,8 +218,8 @@ image_task_completed_cb (GthTask *task,
if (self->priv->apply_to_original) {
if (self->priv->destination != NULL) {
GtkWidget *window;
GtkWidget *viewer_page;
GtkWidget *window;
GthViewerPage *viewer_page;
window = gth_file_tool_get_window (GTH_FILE_TOOL (self));
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
......@@ -600,7 +600,7 @@ static GtkWidget *
gth_file_tool_curves_get_options (GthFileTool *base)
{
GthFileToolCurves *self;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
GtkWidget *viewer;
cairo_surface_t *source;
GtkWidget *options;
......@@ -756,7 +756,7 @@ static void
gth_file_tool_curves_destroy_options (GthFileTool *base)
{
GthFileToolCurves *self;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
self = (GthFileToolCurves *) base;
......@@ -767,7 +767,7 @@ gth_file_tool_curves_destroy_options (GthFileTool *base)
viewer_page = gth_image_viewer_page_tool_get_page (GTH_IMAGE_VIEWER_PAGE_TOOL (self));
gth_image_viewer_page_reset_viewer_tool (GTH_IMAGE_VIEWER_PAGE (viewer_page));
gth_viewer_page_update_sensitivity (GTH_VIEWER_PAGE (viewer_page));
gth_viewer_page_update_sensitivity (viewer_page);
_cairo_clear_surface (&self->priv->preview);
_cairo_clear_surface (&self->priv->destination);
......
......@@ -93,8 +93,8 @@ image_task_completed_cb (GthTask *task,
if (self->priv->apply_to_original) {
if (self->priv->destination != NULL) {
GtkWidget *window;
GtkWidget *viewer_page;
GtkWidget *window;
GthViewerPage *viewer_page;
window = gth_file_tool_get_window (GTH_FILE_TOOL (self));
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
......@@ -202,7 +202,7 @@ gth_file_tool_effects_get_options (GthFileTool *base)
{
GthFileToolEffects *self;
GtkWidget *window;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
GtkWidget *viewer;
cairo_surface_t *source;
GtkWidget *options;
......@@ -264,7 +264,7 @@ gth_file_tool_effects_destroy_options (GthFileTool *base)
{
GthFileToolEffects *self;
GtkWidget *window;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
self = (GthFileToolEffects *) base;
......@@ -276,7 +276,7 @@ gth_file_tool_effects_destroy_options (GthFileTool *base)
window = gth_file_tool_get_window (GTH_FILE_TOOL (self));
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
gth_image_viewer_page_reset_viewer_tool (GTH_IMAGE_VIEWER_PAGE (viewer_page));
gth_viewer_page_update_sensitivity (GTH_VIEWER_PAGE (viewer_page));
gth_viewer_page_update_sensitivity (viewer_page);
_g_clear_object (&self->priv->builder);
......
......@@ -50,9 +50,9 @@ flip_exec (GthAsyncTask *task,
static void
gth_file_tool_flip_activate (GthFileTool *base)
{
GtkWidget *window;
GtkWidget *viewer_page;
GthTask *task;
GtkWidget *window;
GthViewerPage *viewer_page;
GthTask *task;
window = gth_file_tool_get_window (base);
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
......
......@@ -197,8 +197,8 @@ image_task_completed_cb (GthTask *task,
if (self->priv->apply_to_original) {
if (self->priv->destination != NULL) {
GtkWidget *window;
GtkWidget *viewer_page;
GtkWidget *window;
GthViewerPage *viewer_page;
window = gth_file_tool_get_window (GTH_FILE_TOOL (self));
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
......@@ -324,7 +324,7 @@ gth_file_tool_grayscale_get_options (GthFileTool *base)
{
GthFileToolGrayscale *self;
GtkWidget *window;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
GtkWidget *viewer;
cairo_surface_t *source;
GtkWidget *options;
......@@ -402,8 +402,8 @@ static void
gth_file_tool_grayscale_destroy_options (GthFileTool *base)
{
GthFileToolGrayscale *self;
GtkWidget *window;
GtkWidget *viewer_page;
GtkWidget *window;
GthViewerPage *viewer_page;
self = (GthFileToolGrayscale *) base;
......@@ -415,7 +415,7 @@ gth_file_tool_grayscale_destroy_options (GthFileTool *base)
window = gth_file_tool_get_window (GTH_FILE_TOOL (self));
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
gth_image_viewer_page_reset_viewer_tool (GTH_IMAGE_VIEWER_PAGE (viewer_page));
gth_viewer_page_update_sensitivity (GTH_VIEWER_PAGE (viewer_page));
gth_viewer_page_update_sensitivity (viewer_page);
_g_clear_object (&self->priv->builder);
......
......@@ -50,9 +50,9 @@ mirror_exec (GthAsyncTask *task,
static void
gth_file_tool_mirror_activate (GthFileTool *base)
{
GtkWidget *window;
GtkWidget *viewer_page;
GthTask *task;
GtkWidget *window;
GthViewerPage *viewer_page;
GthTask *task;
window = gth_file_tool_get_window (base);
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
......
......@@ -31,8 +31,8 @@ G_DEFINE_TYPE (GthFileToolRedo, gth_file_tool_redo, GTH_TYPE_FILE_TOOL)
static void
gth_file_tool_redo_update_sensitivity (GthFileTool *base)
{
GtkWidget *window;
GtkWidget *viewer_page;
GtkWidget *window;
GthViewerPage *viewer_page;
window = gth_file_tool_get_window (base);
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
......@@ -46,8 +46,8 @@ gth_file_tool_redo_update_sensitivity (GthFileTool *base)
static void
gth_file_tool_redo_activate (GthFileTool *base)
{
GtkWidget *window;
GtkWidget *viewer_page;
GtkWidget *window;
GthViewerPage *viewer_page;
window = gth_file_tool_get_window (base);
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
......
......@@ -88,7 +88,7 @@ resize_task_completed_cb (GthTask *task,
{
GthFileToolResize *self = user_data;
GtkWidget *window;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
self->priv->resize_task = NULL;
......@@ -121,7 +121,7 @@ resize_task_completed_cb (GthTask *task,
self->priv->new_image,
-1,
TRUE);
gth_viewer_page_focus (GTH_VIEWER_PAGE (viewer_page));
gth_viewer_page_focus (viewer_page);
gth_file_tool_hide_options (GTH_FILE_TOOL (self));
}
else {
......@@ -513,7 +513,7 @@ gth_file_tool_resize_get_options (GthFileTool *base)
GthFileToolResize *self = (GthFileToolResize *) base;
cairo_surface_t *source;
GtkWidget *window;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
GtkWidget *viewer;
GtkAllocation allocation;
int preview_width;
......@@ -672,7 +672,7 @@ gth_file_tool_resize_destroy_options (GthFileTool *base)
{
GthFileToolResize *self;
GtkWidget *window;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
GtkWidget *viewer;
GSettings *viewer_settings;
......
......@@ -50,9 +50,9 @@ rotate_left_exec (GthAsyncTask *task,
static void
gth_file_tool_rotate_left_activate (GthFileTool *base)
{
GtkWidget *window;
GtkWidget *viewer_page;
GthTask *task;
GtkWidget *window;
GthViewerPage *viewer_page;
GthTask *task;
window = gth_file_tool_get_window (base);
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
......
......@@ -50,9 +50,9 @@ rotate_right_exec (GthAsyncTask *task,
static void
gth_file_tool_rotate_right_activate (GthFileTool *base)
{
GtkWidget *window;
GtkWidget *viewer_page;
GthTask *task;
GtkWidget *window;
GthViewerPage *viewer_page;
GthTask *task;
window = gth_file_tool_get_window (base);
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
......
......@@ -145,12 +145,12 @@ static void
alignment_changed_cb (GthImageLineTool *line_tool,
GthFileToolRotate *self)
{
GtkWidget *window;
GtkWidget *viewer_page;
GtkWidget *viewer;
GdkPoint p1;
GdkPoint p2;
double angle;
GtkWidget *window;
GthViewerPage *viewer_page;
GtkWidget *viewer;
GdkPoint p1;
GdkPoint p2;
double angle;
window = gth_file_tool_get_window (GTH_FILE_TOOL (self));
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
......@@ -177,9 +177,9 @@ static void
alignment_cancel_button_clicked_cb (GtkButton *button,
GthFileToolRotate *self)
{
GtkWidget *window;
GtkWidget *viewer_page;
GtkWidget *viewer;
GtkWidget *window;
GthViewerPage *viewer_page;
GtkWidget *viewer;
window = gth_file_tool_get_window (GTH_FILE_TOOL (self));
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
......@@ -193,9 +193,9 @@ static void
align_button_clicked_cb (GtkButton *button,
GthFileToolRotate *self)
{
GtkWidget *window;
GtkWidget *viewer_page;
GtkWidget *viewer;
GtkWidget *window;
GthViewerPage *viewer_page;
GtkWidget *viewer;
window = gth_file_tool_get_window (GTH_FILE_TOOL (self));
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
......@@ -353,7 +353,7 @@ gth_file_tool_rotate_get_options (GthFileTool *base)
{
GthFileToolRotate *self;
GtkWidget *window;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
GtkWidget *viewer;
char *color_spec;
GdkRGBA background_color;
......@@ -436,7 +436,7 @@ gth_file_tool_rotate_get_options (GthFileTool *base)
gth_image_viewer_page_set_image (GTH_IMAGE_VIEWER_PAGE (viewer_page), self->priv->image, FALSE);
viewer = gth_image_viewer_page_get_image_viewer (GTH_IMAGE_VIEWER_PAGE (viewer_page));
gth_image_viewer_set_tool (GTH_IMAGE_VIEWER (viewer), self->priv->rotator);
gth_viewer_page_update_sensitivity (GTH_VIEWER_PAGE (viewer_page));
gth_viewer_page_update_sensitivity (viewer_page);
self->priv->crop_enabled = TRUE;
self->priv->crop_region.x = 0;
......@@ -518,7 +518,7 @@ gth_file_tool_rotate_destroy_options (GthFileTool *base)
{
GthFileToolRotate *self;
GtkWidget *window;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
self = (GthFileToolRotate *) base;
......@@ -542,7 +542,7 @@ gth_file_tool_rotate_destroy_options (GthFileTool *base)
window = gth_file_tool_get_window (GTH_FILE_TOOL (self));
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
gth_image_viewer_page_reset_viewer_tool (GTH_IMAGE_VIEWER_PAGE (viewer_page));
gth_viewer_page_update_sensitivity (GTH_VIEWER_PAGE (viewer_page));
gth_viewer_page_update_sensitivity (viewer_page);
cairo_surface_destroy (self->priv->image);
self->priv->image = NULL;
......@@ -557,7 +557,7 @@ gth_file_tool_rotate_apply_options (GthFileTool *base)
{
GthFileToolRotate *self;
GtkWidget *window;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
GthTask *task;
self = (GthFileToolRotate *) base;
......
......@@ -35,7 +35,7 @@ gth_file_tool_save_as_update_sensitivity (GthFileTool *base)
window = gth_file_tool_get_window (base);
can_save = gth_viewer_page_can_save (GTH_VIEWER_PAGE (gth_browser_get_viewer_page (GTH_BROWSER (window))));
can_save = gth_viewer_page_can_save (gth_browser_get_viewer_page (GTH_BROWSER (window)));
can_save = can_save && (gth_browser_get_current_file (GTH_BROWSER (window)) != NULL);
gtk_widget_set_sensitive (GTK_WIDGET (base), can_save);
}
......@@ -44,12 +44,12 @@ gth_file_tool_save_as_update_sensitivity (GthFileTool *base)
static void
gth_file_tool_save_as_activate (GthFileTool *tool)
{
GtkWidget *window;
GtkWidget *viewer_page;
GtkWidget *window;
GthViewerPage *viewer_page;
window = gth_file_tool_get_window (tool);
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
gth_viewer_page_save_as (GTH_VIEWER_PAGE (viewer_page), NULL, NULL);
gth_viewer_page_save_as (viewer_page, NULL, NULL);
}
......
......@@ -40,12 +40,12 @@ gth_file_tool_save_update_sensitivity (GthFileTool *base)
static void
gth_file_tool_save_activate (GthFileTool *tool)
{
GtkWidget *window;
GtkWidget *viewer_page;
GtkWidget *window;
GthViewerPage *viewer_page;
window = gth_file_tool_get_window (tool);
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
gth_viewer_page_save (GTH_VIEWER_PAGE (viewer_page), NULL, NULL, NULL);
gth_viewer_page_save (viewer_page, NULL, NULL, NULL);
}
......
......@@ -313,7 +313,7 @@ static void
gth_file_tool_sharpen_apply_options (GthFileTool *base)
{
GthFileToolSharpen *self;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
SharpenData *sharpen_data;
GthTask *task;
......
......@@ -31,8 +31,8 @@ G_DEFINE_TYPE (GthFileToolUndo, gth_file_tool_undo, GTH_TYPE_FILE_TOOL)
static void
gth_file_tool_undo_update_sensitivity (GthFileTool *base)
{
GtkWidget *window;
GtkWidget *viewer_page;
GtkWidget *window;
GthViewerPage *viewer_page;
window = gth_file_tool_get_window (base);
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
......@@ -46,8 +46,8 @@ gth_file_tool_undo_update_sensitivity (GthFileTool *base)
static void
gth_file_tool_undo_activate (GthFileTool *base)
{
GtkWidget *window;
GtkWidget *viewer_page;
GtkWidget *window;
GthViewerPage *viewer_page;
window = gth_file_tool_get_window (base);
viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
......
......@@ -41,7 +41,7 @@ gth_browser_activate_print (GSimpleAction *action,
file_list = gth_file_list_get_files (GTH_FILE_LIST (gth_browser_get_file_list (browser)), items);
if (file_list != NULL) {
cairo_surface_t *current_image;
GtkWidget *viewer_page;
GthViewerPage *viewer_page;
GthImagePrintJob *print_job;
GError *error = NULL;
......
......@@ -144,8 +144,8 @@ viewer_image_changed_cb (GtkWidget *widget,
return;
if ((data->buttons[0] != NULL) && (data->buttons[1] != NULL)) {
GtkWidget *viewer_page = gth_browser_get_viewer_page (browser);
gboolean visible = FALSE;
GthViewerPage *viewer_page = gth_browser_get_viewer_page (browser);
gboolean visible = FALSE;
if (GTH_IS_IMAGE_VIEWER_PAGE (viewer_page)) {
GtkWidget *image_viewer = gth_image_viewer_page_get_image_viewer (GTH_IMAGE_VIEWER_PAGE (viewer_page));
......@@ -161,8 +161,8 @@ viewer_image_changed_cb (GtkWidget *widget,
void
ir__gth_browser_activate_viewer_page_cb (GthBrowser *browser)
{
BrowserData *data;
GtkWidget *viewer_page;
BrowserData *data;
GthViewerPage *viewer_page;
data = g_object_get_data (G_OBJECT (browser), BROWSER_DATA_KEY);
g_return_if_fail (data != NULL);
......@@ -197,8 +197,8 @@ ir__gth_browser_activate_viewer_page_cb (GthBrowser *browser)
void
ir__gth_browser_deactivate_viewer_page_cb (GthBrowser *browser)
{
BrowserData *data;
GtkWidget *viewer_page;
BrowserData *data;
GthViewerPage *viewer_page;
data = g_object_get_data (G_OBJECT (browser), BROWSER_DATA_KEY);
g_return_if_fail (data != NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment