[Goodies-commits] r4736 - ristretto/trunk/src
Stephan Arts
stephan at xfce.org
Mon May 5 23:56:30 CEST 2008
Author: stephan
Date: 2008-05-05 21:56:30 +0000 (Mon, 05 May 2008)
New Revision: 4736
Modified:
ristretto/trunk/src/main.c
ristretto/trunk/src/main_window.c
ristretto/trunk/src/navigator.c
ristretto/trunk/src/thumbnail.c
ristretto/trunk/src/thumbnail_bar.c
Log:
Fix compile with --enable-debug=full
Improve behaviour when setting the wallpaper in xfdesktop
Modified: ristretto/trunk/src/main.c
===================================================================
--- ristretto/trunk/src/main.c 2008-05-05 21:39:45 UTC (rev 4735)
+++ ristretto/trunk/src/main.c 2008-05-05 21:56:30 UTC (rev 4736)
@@ -210,7 +210,6 @@
{
GdkColor *bg_color = NULL;
GError *cli_error = NULL;
- gchar *path_dir = NULL;
gint n;
#ifdef ENABLE_NLS
@@ -259,13 +258,6 @@
gboolean override_bg_color = xfce_rc_read_bool_entry (xfce_rc, "OverrideBgColor", FALSE);
gboolean scale_to_100 = xfce_rc_read_bool_entry (xfce_rc, "ScaleTo100", FALSE);
- /**
- * 0 = No desktop
- * 1 = Xfce >= 4.5
- *
- */
- gint set_wallpaper = xfce_rc_read_int_entry(xfce_rc, "SetWallpaperDesktop", 0);
-
if (override_bg_color)
{
const gchar *color = xfce_rc_read_entry(xfce_rc, "BgColor", "#000000000000");
@@ -286,16 +278,6 @@
rstto_main_window_set_max_cache_size(RSTTO_MAIN_WINDOW(window), max_cache);
rstto_main_window_set_slideshow_timeout(RSTTO_MAIN_WINDOW(window), (gdouble)slideshow_timeout);
rstto_main_window_set_scale_to_100(RSTTO_MAIN_WINDOW(window), scale_to_100);
- switch (set_wallpaper)
- {
- case RSTTO_DESKTOP_XFCE:
- rstto_main_window_set_desktop(RSTTO_MAIN_WINDOW(window), set_wallpaper);
- break;
- default:
- rstto_main_window_set_desktop(RSTTO_MAIN_WINDOW(window), RSTTO_DESKTOP_NONE);
- break;
- }
- GtkRecentManager *recent_manager = rstto_main_window_get_recent_manager(RSTTO_MAIN_WINDOW(window));
rstto_navigator_set_timeout(navigator, slideshow_timeout);
/* When more then one file is provided over the CLI,
@@ -369,7 +351,6 @@
}
xfce_rc_write_int_entry(xfce_rc, "MaxImagesCacheSize", rstto_main_window_get_max_cache_size(RSTTO_MAIN_WINDOW(window)));
xfce_rc_write_int_entry(xfce_rc, "SlideShowTimeout", (gint)rstto_main_window_get_slideshow_timeout(RSTTO_MAIN_WINDOW(window)));
- xfce_rc_write_int_entry(xfce_rc, "SetWallpaperDesktop", (gint)rstto_main_window_get_desktop(RSTTO_MAIN_WINDOW(window)));
xfce_rc_flush(xfce_rc);
xfce_rc_close(xfce_rc);
gtk_widget_unref(window);
@@ -438,8 +419,8 @@
static gboolean
cb_rstto_open_files (RsttoOpenFiles *rof)
{
- gchar *path_dir = NULL;
GError *error = NULL;
+ gchar *path_dir = NULL;
RsttoNavigator *navigator = rof->navigator;
RsttoMainWindow *window = rof->main_window;
Modified: ristretto/trunk/src/main_window.c
===================================================================
--- ristretto/trunk/src/main_window.c 2008-05-05 21:39:45 UTC (rev 4735)
+++ ristretto/trunk/src/main_window.c 2008-05-05 21:56:30 UTC (rev 4736)
@@ -421,7 +421,6 @@
{
Atom actual_type;
int actual_format;
- int max_len = 10000;
unsigned long n_items;
unsigned long bytes_after;
unsigned char *prop;
@@ -440,10 +439,10 @@
&n_items,
&bytes_after,
&prop);
- if (n_items == 1)
+ if (n_items > 0)
{
/* TODO: check XID */
- Window xid = (Window) prop[1];
+ /* Window xid = (Window) prop[1]; */
window->priv->settings.desktop = RSTTO_DESKTOP_XFCE;
}
}
@@ -1144,7 +1143,7 @@
if(xfconf_channel_set_string(xfdesktop_channel, image_path_prop, path) == TRUE)
{
xfconf_channel_set_bool(xfdesktop_channel, image_show_prop, TRUE);
- xfconf_channel_set_int(xfdesktop_channel, image_style_prop, 1);
+ xfconf_channel_set_int(xfdesktop_channel, image_style_prop, 4);
}
else
{
@@ -1307,8 +1306,6 @@
GtkWidget *resize_to_content_vbox, *resize_to_content_frame;
GtkWidget *resize_on_maximize_check;
- GtkWidget *set_wallpaper_vbox, *set_wallpaper_frame;
- GtkWidget *set_wallpaper_label, *set_wallpaper_combo;
GtkWidget *bg_color_vbox;
GtkWidget *bg_color_hbox;
@@ -1472,14 +1469,6 @@
window->priv->settings.scale_to_100 = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resize_on_maximize_check));
- if ((window->priv->settings.desktop > 0) && (rstto_navigator_get_position(window->priv->navigator) >= 0))
- {
- gtk_widget_set_sensitive(window->priv->menus.view.menu_item_set_wallpaper, TRUE);
- }
- else
- {
- gtk_widget_set_sensitive(window->priv->menus.view.menu_item_set_wallpaper, FALSE);
- }
default:
break;
}
@@ -1530,7 +1519,7 @@
cb_rstto_main_window_open_file(GtkWidget *widget, RsttoMainWindow *window)
{
GtkStatusbar *statusbar = GTK_STATUSBAR(window->priv->statusbar);
- g_object_add_weak_pointer(G_OBJECT(window), (gpointer *)&statusbar);
+ g_object_add_weak_pointer(G_OBJECT(window), (gpointer)statusbar);
gint context_id = gtk_statusbar_get_context_id(statusbar, "StatusMessages");
gint message_id = gtk_statusbar_push(statusbar, context_id, N_("Opening file(s)..."));
@@ -1562,7 +1551,7 @@
if (statusbar)
{
gtk_statusbar_remove(statusbar, context_id, message_id);
- g_object_remove_weak_pointer(G_OBJECT(window), (gpointer *)&statusbar);
+ g_object_remove_weak_pointer(G_OBJECT(window), (gpointer)statusbar);
}
}
@@ -1570,7 +1559,7 @@
cb_rstto_main_window_open_folder(GtkWidget *widget, RsttoMainWindow *window)
{
GtkStatusbar *statusbar = GTK_STATUSBAR(window->priv->statusbar);
- g_object_add_weak_pointer(G_OBJECT(window), (gpointer *)&statusbar);
+ g_object_add_weak_pointer(G_OBJECT(window), (gpointer)statusbar);
gint context_id = gtk_statusbar_get_context_id(statusbar, "StatusMessages");
gint message_id = gtk_statusbar_push(statusbar, context_id, N_("Opening file(s)..."));
@@ -1599,7 +1588,7 @@
if (statusbar)
{
gtk_statusbar_remove(statusbar, context_id, message_id);
- g_object_remove_weak_pointer(G_OBJECT(window), (gpointer *)&statusbar);
+ g_object_remove_weak_pointer(G_OBJECT(window), (gpointer)statusbar);
}
}
@@ -1607,7 +1596,7 @@
cb_rstto_main_window_open_recent(GtkRecentChooser *chooser, RsttoMainWindow *window)
{
GtkStatusbar *statusbar = GTK_STATUSBAR(window->priv->statusbar);
- g_object_add_weak_pointer(G_OBJECT(window), (gpointer *)&statusbar);
+ g_object_add_weak_pointer(G_OBJECT(window), (gpointer)statusbar);
gint context_id = gtk_statusbar_get_context_id(statusbar, "StatusMessages");
gint message_id = gtk_statusbar_push(statusbar, context_id, N_("Opening file(s)..."));
@@ -1639,7 +1628,7 @@
if (statusbar)
{
gtk_statusbar_remove(statusbar, context_id, message_id);
- g_object_remove_weak_pointer(G_OBJECT(window), (gpointer *)&statusbar);
+ g_object_remove_weak_pointer(G_OBJECT(window), (gpointer)statusbar);
}
}
@@ -2095,4 +2084,5 @@
window->priv->settings.desktop = RSTTO_DESKTOP_NONE;
break;
}
+ return 0;
}
Modified: ristretto/trunk/src/navigator.c
===================================================================
--- ristretto/trunk/src/navigator.c 2008-05-05 21:39:45 UTC (rev 4735)
+++ ristretto/trunk/src/navigator.c 2008-05-05 21:56:30 UTC (rev 4736)
@@ -1473,6 +1473,7 @@
g_free(file_uri);
g_free(file_media);
+ return 0;
}
gboolean
@@ -1513,7 +1514,7 @@
dir_path = thunar_vfs_path_dup_string(vfs_path);
- g_object_add_weak_pointer(G_OBJECT(navigator), (gpointer *)&navigator);
+ g_object_add_weak_pointer(G_OBJECT(navigator), (gpointer)navigator);
dir = g_dir_open(dir_path, 0, NULL);
@@ -1570,7 +1571,7 @@
g_free(dir_uri);
g_free(dir_path);
- g_object_remove_weak_pointer(G_OBJECT(navigator), (gpointer *)&navigator);
+ g_object_remove_weak_pointer(G_OBJECT(navigator), (gpointer)navigator);
rstto_navigator_set_busy(navigator, FALSE);
return TRUE;
}
Modified: ristretto/trunk/src/thumbnail.c
===================================================================
--- ristretto/trunk/src/thumbnail.c 2008-05-05 21:39:45 UTC (rev 4735)
+++ ristretto/trunk/src/thumbnail.c 2008-05-05 21:56:30 UTC (rev 4736)
@@ -169,10 +169,7 @@
rstto_thumbnail_paint(RsttoThumbnail *thumb)
{
GtkWidget *widget = GTK_WIDGET(thumb);
- gint border_width = 0;
- GdkGC *gc = gdk_gc_new(GDK_DRAWABLE(widget->window));
-
GtkStateType state = GTK_WIDGET_STATE(widget);
if(thumb->priv->entry)
Modified: ristretto/trunk/src/thumbnail_bar.c
===================================================================
--- ristretto/trunk/src/thumbnail_bar.c 2008-05-05 21:39:45 UTC (rev 4735)
+++ ristretto/trunk/src/thumbnail_bar.c 2008-05-05 21:56:30 UTC (rev 4736)
@@ -459,10 +459,8 @@
{
RsttoThumbnailBar *bar = RSTTO_THUMBNAIL_BAR(widget);
- GtkAllocation view_allocation;
GdkWindowAttr attributes;
gint attributes_mask;
- gint event_mask;
gint border_width = 0;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
@@ -493,7 +491,6 @@
static void
rstto_thumbnail_bar_unrealize(GtkWidget *widget)
{
- RsttoThumbnailBar *bar = RSTTO_THUMBNAIL_BAR(widget);
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
(* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
More information about the Goodies-commits
mailing list