aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-11-23 08:18:45 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-11-23 08:18:45 +0000
commitc114ed55bf2a34c94be0e19ec0463be919e1ccee (patch)
treeb1ad50d4e6890dc3c5583c2fee105d08ad266b10
parentafbf5f47aae5693804f9a4da8c26f1dfc266e5d1 (diff)
downloadports-c114ed55bf2a34c94be0e19ec0463be919e1ccee.tar.gz
ports-c114ed55bf2a34c94be0e19ec0463be919e1ccee.zip
Notes
-rw-r--r--deskutils/gruler/files/patch-src::draw.c163
-rw-r--r--deskutils/gruler/files/patch-src::gui.c134
-rw-r--r--deskutils/gruler/files/patch-src::gui_callbacks.c76
-rw-r--r--deskutils/gruler/files/patch-src::prefs.c70
4 files changed, 440 insertions, 3 deletions
diff --git a/deskutils/gruler/files/patch-src::draw.c b/deskutils/gruler/files/patch-src::draw.c
new file mode 100644
index 000000000000..138e8c2cd830
--- /dev/null
+++ b/deskutils/gruler/files/patch-src::draw.c
@@ -0,0 +1,163 @@
+--- src/draw.c.orig Wed Sep 29 02:58:00 2004
++++ src/draw.c Tue Nov 23 09:06:43 2004
+@@ -32,10 +32,11 @@
+ // draws given text centered on given point
+ static void draw_centered_label(const gchar* pText, GdkDrawable* pDrawable, GdkGC* pGC, PangoLayout* pPangoLayout, GdkColor* pClrForeground, GdkColor* pClrBackground, gint nX, gint nY)
+ {
++ int nTextWidth = 0, nTextHeight = 0;
++
+ pango_layout_set_text(pPangoLayout, pText, -1);
+
+ // measure text
+- int nTextWidth = 0, nTextHeight = 0;
+ pango_layout_get_pixel_size(pPangoLayout, &nTextWidth, &nTextHeight);
+
+ // draw text, centered and colored
+@@ -47,32 +48,41 @@
+
+ gboolean draw_ruler_window(GtkWidget* pDrawingArea)
+ {
++ GdkPixmap* pPixmap;
++ GtkWidget* pTopLevel;
++ gint nWindowWidth, nWindowHeight;
++ PangoLayout* pPangoLayout;
++ PangoFontDescription *pPangoFontDescription;
++ GdkColor clrBackground;
++ GdkColor clrForeground;
++ GdkGCValues gcsave;
++ RulerOrientation eRulerOrientation;
++
+ // g_message("draw_ruler_window");
+ g_return_val_if_fail(pDrawingArea != NULL, FALSE);
+ if(pDrawingArea->window == NULL) return FALSE; // don't generate a warning
+
+ // Extract pixmap pointer from window data
+- GdkPixmap* pPixmap = g_object_get_data(G_OBJECT(pDrawingArea), KEY_PIXMAP_POINTER);
++ pPixmap = g_object_get_data(G_OBJECT(pDrawingArea), KEY_PIXMAP_POINTER);
+ g_return_val_if_fail(pPixmap != NULL, FALSE);
+
+ // Get top-level window and figure out orientation from window data
+- GtkWidget* pTopLevel = gtk_widget_get_toplevel(pDrawingArea);
+- RulerOrientation eRulerOrientation = (RulerOrientation)g_object_get_data(G_OBJECT(pTopLevel), KEY_RULER_ORIENTATION);
++ pTopLevel = gtk_widget_get_toplevel(pDrawingArea);
++ eRulerOrientation = (RulerOrientation)g_object_get_data(G_OBJECT(pTopLevel), KEY_RULER_ORIENTATION);
+
+ // (for easy access)
+- gint nWindowWidth = pDrawingArea->allocation.width;
+- gint nWindowHeight = pDrawingArea->allocation.height;
++ nWindowWidth = pDrawingArea->allocation.width;
++ nWindowHeight = pDrawingArea->allocation.height;
+
+ // Save GC values
+- GdkGCValues gcsave;
+ gdk_gc_get_values(pDrawingArea->style->fg_gc[GTK_WIDGET_STATE(pDrawingArea)], &gcsave);
+
+ // Create a Pango layout for text rendering
+- PangoLayout* pPangoLayout = gtk_widget_create_pango_layout(pDrawingArea, NULL);
++ pPangoLayout = gtk_widget_create_pango_layout(pDrawingArea, NULL);
+ g_return_val_if_fail(pPangoLayout != NULL, FALSE);
+
+ // Set the font from the Pref dialog
+- PangoFontDescription *pPangoFontDescription = pango_font_description_from_string(gui_get_font_string());
++ pPangoFontDescription = pango_font_description_from_string(gui_get_font_string());
+ pango_layout_set_font_description(pPangoLayout, pPangoFontDescription);
+
+ //=======================================
+@@ -80,7 +90,6 @@
+ //=======================================
+
+ // Find background color, and fill window with it
+- GdkColor clrBackground;
+ gui_get_background_color(&clrBackground);
+ gdk_gc_set_rgb_fg_color(pDrawingArea->style->fg_gc[GTK_WIDGET_STATE(pDrawingArea)], &clrBackground);
+ gdk_draw_rectangle(pPixmap, pDrawingArea->style->fg_gc[GTK_WIDGET_STATE (pDrawingArea)],
+@@ -89,7 +98,6 @@
+ nWindowWidth, nWindowHeight);
+
+ // Outline the whole window with foreground color
+- GdkColor clrForeground;
+ gui_get_foreground_color(&clrForeground);
+ gdk_gc_set_rgb_fg_color(pDrawingArea->style->fg_gc[GTK_WIDGET_STATE (pDrawingArea)], &clrForeground);
+ gdk_draw_rectangle(pPixmap, pDrawingArea->style->fg_gc[GTK_WIDGET_STATE (pDrawingArea)],
+@@ -182,21 +190,35 @@
+ gint nWindowHeight = pDrawingArea->allocation.height;
+
+ gint nMouseX, nMouseY;
++ PangoLayout* pPangoLayout;
++ PangoFontDescription *pPangoFontDescription;
++ gint32 nClippedMouseX, nClippedMouseY;
++ gchar buffer[100];
++ int nTextWidth = 0, nTextHeight = 0;
++ int nBoxWidth, nBoxHeight;
++ GdkGCValues gcSavedValues;
++ GdkGC* pGC;
++ GdkColor clrLine = {0, 65535, 65535, 65535};
++ GdkColor clrTextBoxBackground = {0, 62000, 62000, 62000};
++ GdkColor clrTextBoxOutline = {0, 0, 0, 0};
++ GdkColor clrText = {0, 0, 0, 0};
++ gint nBoxCenterX;
++ gint nBoxCenterY;
++
+ gdk_window_get_pointer(pDrawingArea->window, &nMouseX, &nMouseY, NULL);
+
+ // Set text style and measure text
+- PangoLayout* pPangoLayout = gtk_widget_create_pango_layout(pDrawingArea, NULL); g_return_if_fail(pPangoLayout != NULL);
+- PangoFontDescription *pPangoFontDescription = pango_font_description_from_string(gui_get_font_string());
++ pPangoLayout = gtk_widget_create_pango_layout(pDrawingArea, NULL); g_return_if_fail(pPangoLayout != NULL);
++ pPangoFontDescription = pango_font_description_from_string(gui_get_font_string());
+
+ pango_layout_set_font_description(pPangoLayout, pPangoFontDescription);
+ // XXX: free any of these?
+
+- gint32 nClippedMouseX = max(nMouseX, 0);
++ nClippedMouseX = max(nMouseX, 0);
+ nClippedMouseX = min(nClippedMouseX, nWindowWidth);
+- gint32 nClippedMouseY = max(nMouseY, 0);
++ nClippedMouseY = max(nMouseY, 0);
+ nClippedMouseY = min(nClippedMouseY, nWindowHeight);
+
+- gchar buffer[100];
+ if(eRulerOrientation == RulerOrientationHorizontal) {
+ g_snprintf(buffer, 100, "%d", nClippedMouseX);
+ }
+@@ -206,21 +228,18 @@
+ pango_layout_set_text(pPangoLayout, buffer, -1);
+
+ // Measure the text
+- int nTextWidth = 0, nTextHeight = 0;
+ pango_layout_get_pixel_size(pPangoLayout, &nTextWidth, &nTextHeight);
+
+- int nBoxWidth = nTextWidth + (TEXT_BOX_RELIEF*2);
+- int nBoxHeight = nTextHeight + (TEXT_BOX_RELIEF*2);
++ nBoxWidth = nTextWidth + (TEXT_BOX_RELIEF*2);
++ nBoxHeight = nTextHeight + (TEXT_BOX_RELIEF*2);
+
+ //=======================
+ // Begin drawing
+ //=======================
+
+- GdkGCValues gcSavedValues;
+- GdkGC* pGC = pDrawingArea->style->fg_gc[GTK_WIDGET_STATE(pDrawingArea)];
++ pGC = pDrawingArea->style->fg_gc[GTK_WIDGET_STATE(pDrawingArea)];
+
+ // == Draw background line
+- GdkColor clrLine = {0, 65535, 65535, 65535};
+ gdk_gc_get_values(pGC, &gcSavedValues);
+ gdk_gc_set_rgb_fg_color(pGC, &clrLine);
+ gdk_gc_set_function(pGC, GDK_XOR);
+@@ -236,15 +255,9 @@
+ //
+ // Draw box around text
+ //
+- GdkColor clrTextBoxBackground = {0, 62000, 62000, 62000};
+- GdkColor clrTextBoxOutline = {0, 0, 0, 0};
+- GdkColor clrText = {0, 0, 0, 0};
+
+ gdk_gc_get_values(pGC, &gcSavedValues);
+
+- gint nBoxCenterX;
+- gint nBoxCenterY;
+-
+ if(eRulerOrientation == RulerOrientationHorizontal) {
+ nBoxCenterX = max(nMouseX, 0 + (nBoxWidth/2));
+ nBoxCenterX = min(nBoxCenterX, nWindowWidth - (nBoxWidth/2));;
diff --git a/deskutils/gruler/files/patch-src::gui.c b/deskutils/gruler/files/patch-src::gui.c
index d72fd58ba58f..334c4876fa2c 100644
--- a/deskutils/gruler/files/patch-src::gui.c
+++ b/deskutils/gruler/files/patch-src::gui.c
@@ -1,6 +1,29 @@
---- src/gui.c.orig Mon Nov 15 13:54:11 2004
-+++ src/gui.c Mon Nov 15 13:56:31 2004
-@@ -85,7 +85,7 @@
+--- src/gui.c.orig Wed Sep 29 03:13:11 2004
++++ src/gui.c Tue Nov 23 09:10:43 2004
+@@ -54,6 +54,7 @@
+
+ static void gui_ruler_configure(GtkWindow* pWindow, RulerOrientation eRulerOrientation)
+ {
++ GtkWidget* pDrawingArea;
+ g_object_set_data(G_OBJECT(pWindow), KEY_RULER_ORIENTATION, (gpointer)eRulerOrientation);
+
+ // add signal handlers to ruler
+@@ -66,7 +67,7 @@
+ G_CALLBACK (on_application_delete_event), NULL);
+
+ // create drawing area and add to window
+- GtkWidget* pDrawingArea = gtk_drawing_area_new();
++ pDrawingArea = gtk_drawing_area_new();
+ gtk_container_add(GTK_CONTAINER(pWindow), pDrawingArea);
+
+ // add signal handlers to drawing area
+@@ -82,24 +83,27 @@
+
+ gboolean gui_init()
+ {
++ GtkWidget *pHorizontalRulerWindow;
++ GtkWidget *pVerticalRulerWindow;
++ GtkWidget *pPreferencesWindow;
glade_gnome_init ();
// Load and connect glade file
@@ -9,3 +32,108 @@
glade_xml_signal_autoconnect (g_pXML);
// load and configure horizontal ruler
+- GtkWidget *pHorizontalRulerWindow = glade_xml_get_widget (g_pXML, "horizontalrulerwindow");
++ pHorizontalRulerWindow = glade_xml_get_widget (g_pXML, "horizontalrulerwindow");
+ g_return_val_if_fail(pHorizontalRulerWindow != NULL, FALSE);
+ gui_ruler_configure(GTK_WINDOW(pHorizontalRulerWindow), RulerOrientationHorizontal);
+
+ // load and configure vertical ruler
+- GtkWidget *pVerticalRulerWindow = glade_xml_get_widget (g_pXML, "verticalrulerwindow");
++ pVerticalRulerWindow = glade_xml_get_widget (g_pXML, "verticalrulerwindow");
+ g_return_val_if_fail(pVerticalRulerWindow != NULL, 1);
+ gui_ruler_configure(GTK_WINDOW(pVerticalRulerWindow), RulerOrientationVertical);
+
+ // Don't kill dialog(s) when closing; instead, hide them.
+- GtkWidget *pPreferencesWindow = glade_xml_get_widget(g_pXML, "preferenceswindow");
++ pPreferencesWindow = glade_xml_get_widget(g_pXML, "preferenceswindow");
+ g_return_val_if_fail(pPreferencesWindow != NULL, 1);
+
+ g_signal_connect(G_OBJECT(pPreferencesWindow), "delete_event", G_CALLBACK(gtk_widget_hide), NULL);
+@@ -108,12 +112,15 @@
+
+ void gui_show()
+ {
++ GtkWidget *pHorizontalRulerWindow;
++ GtkWidget *pVerticalRulerWindow;
++
+ // Show ruler and start gtk loop
+- GtkWidget *pHorizontalRulerWindow = glade_xml_get_widget (g_pXML, "horizontalrulerwindow");
++ pHorizontalRulerWindow = glade_xml_get_widget (g_pXML, "horizontalrulerwindow");
+ g_return_if_fail(pHorizontalRulerWindow != NULL);
+ gtk_widget_show(pHorizontalRulerWindow);
+
+- GtkWidget *pVerticalRulerWindow = glade_xml_get_widget (g_pXML, "verticalrulerwindow");
++ pVerticalRulerWindow = glade_xml_get_widget (g_pXML, "verticalrulerwindow");
+ g_return_if_fail(pVerticalRulerWindow != NULL);
+ gtk_widget_show(pVerticalRulerWindow);
+
+@@ -184,9 +191,12 @@
+
+ void gui_redraw_rulers()
+ {
++ GtkWidget *pHorizontalRulerWindow;
++ GtkWidget *pVerticalRulerWindow;
++
+ // request a redraw of both ruler windows
+ // horizontal
+- GtkWidget *pHorizontalRulerWindow = glade_xml_get_widget (g_pXML, "horizontalrulerwindow");
++ pHorizontalRulerWindow = glade_xml_get_widget (g_pXML, "horizontalrulerwindow");
+ g_return_if_fail(pHorizontalRulerWindow != NULL);
+
+ // TODO: these callbacks don't take a userdata param.. is that a problem?
+@@ -194,7 +204,7 @@
+ gtk_container_foreach(GTK_CONTAINER(pHorizontalRulerWindow), (GtkCallback)gtk_widget_queue_draw, NULL);
+
+ // vertical
+- GtkWidget *pVerticalRulerWindow = glade_xml_get_widget (g_pXML, "verticalrulerwindow");
++ pVerticalRulerWindow = glade_xml_get_widget (g_pXML, "verticalrulerwindow");
+ g_return_if_fail(pVerticalRulerWindow != NULL);
+
+ gtk_container_foreach(GTK_CONTAINER(pVerticalRulerWindow), (GtkCallback)draw_ruler_window, NULL);
+@@ -203,11 +213,11 @@
+
+ void gui_set_horizontal_length(gint nLength)
+ {
++ gint nWindowWidth, nWindowHeight;
+ // change ruler window width
+ GtkWindow *pRulerWindow = GTK_WINDOW(glade_xml_get_widget(g_pXML, "horizontalrulerwindow"));
+ g_return_if_fail(pRulerWindow != NULL);
+
+- gint nWindowWidth, nWindowHeight;
+ gtk_window_get_size(pRulerWindow, &nWindowWidth, &nWindowHeight);
+
+ gtk_window_resize(pRulerWindow, nLength, nWindowHeight);
+@@ -215,11 +225,11 @@
+
+ void gui_set_vertical_length(gint nLength)
+ {
++ gint nWindowWidth, nWindowHeight;
+ // change ruler window width
+ GtkWindow *pRulerWindow = GTK_WINDOW(glade_xml_get_widget(g_pXML, "verticalrulerwindow"));
+ g_return_if_fail(pRulerWindow != NULL);
+
+- gint nWindowWidth, nWindowHeight;
+ gtk_window_get_size(pRulerWindow, &nWindowWidth, &nWindowHeight);
+
+ gtk_window_resize(pRulerWindow, nWindowWidth, nLength);
+@@ -227,18 +237,18 @@
+
+ gint gui_get_horizontal_length()
+ {
++ gint nWindowWidth, nWindowHeight;
+ GtkWidget *pHorizontalRulerWindow = glade_xml_get_widget (g_pXML, "horizontalrulerwindow");
+ g_return_val_if_fail(pHorizontalRulerWindow != NULL, 0);
+- gint nWindowWidth, nWindowHeight;
+ gtk_window_get_size(GTK_WINDOW(pHorizontalRulerWindow), &nWindowWidth, &nWindowHeight);
+ return nWindowWidth;
+ }
+
+ gint gui_get_vertical_length()
+ {
++ gint nWindowWidth, nWindowHeight;
+ GtkWidget *pVerticalRulerWindow = glade_xml_get_widget (g_pXML, "verticalrulerwindow");
+ g_return_val_if_fail(pVerticalRulerWindow != NULL, 0);
+- gint nWindowWidth, nWindowHeight;
+ gtk_window_get_size(GTK_WINDOW(pVerticalRulerWindow), &nWindowWidth, &nWindowHeight);
+ return nWindowHeight;
+ }
diff --git a/deskutils/gruler/files/patch-src::gui_callbacks.c b/deskutils/gruler/files/patch-src::gui_callbacks.c
new file mode 100644
index 000000000000..59cff4bd65c4
--- /dev/null
+++ b/deskutils/gruler/files/patch-src::gui_callbacks.c
@@ -0,0 +1,76 @@
+--- src/gui_callbacks.c.orig Wed Sep 29 03:10:39 2004
++++ src/gui_callbacks.c Tue Nov 23 09:14:51 2004
+@@ -55,6 +55,8 @@
+
+ gboolean on_expose_event(GtkWidget *pDrawingArea, GdkEventExpose *event, gpointer data)
+ {
++ GtkWidget* pRulerWindow;
++ RulerOrientation eRulerOrientation;
+ // g_message("on_expose_event(x %d,y %d,a %d,w %d)", event->area.x, event->area.y, event->area.width, event->area.height);
+
+ GdkPixmap* pPixmap = g_object_get_data(G_OBJECT(pDrawingArea), KEY_PIXMAP_POINTER);
+@@ -67,10 +69,10 @@
+ event->area.x, event->area.y,
+ event->area.width, event->area.height);
+
+- GtkWidget* pRulerWindow = gtk_widget_get_toplevel(pDrawingArea);
++ pRulerWindow = gtk_widget_get_toplevel(pDrawingArea);
+ g_return_val_if_fail(pRulerWindow != NULL, FALSE);
+
+- RulerOrientation eRulerOrientation = (RulerOrientation)g_object_get_data(G_OBJECT(pRulerWindow), KEY_RULER_ORIENTATION);
++ eRulerOrientation = (RulerOrientation)g_object_get_data(G_OBJECT(pRulerWindow), KEY_RULER_ORIENTATION);
+ g_return_val_if_fail(eRulerOrientation != 0, FALSE);
+
+ if(gui_get_draw_mouse_measurement_lines()) {
+@@ -115,13 +117,14 @@
+
+ // ALT key means resize, otherwise move
+ if(((event->state & GDK_ALT_MASK) > 0)) {
++ RulerOrientation eRulerOrientation;
++ gint nWindowWidth, nWindowHeight;
+ // resize
+ GtkWindow *pRulerWindow = GTK_WINDOW(gtk_widget_get_toplevel(pWidget));
+ g_return_val_if_fail(pRulerWindow != NULL, 1);
+
+- RulerOrientation eRulerOrientation = (RulerOrientation)g_object_get_data(G_OBJECT(pRulerWindow), KEY_RULER_ORIENTATION);
++ eRulerOrientation = (RulerOrientation)g_object_get_data(G_OBJECT(pRulerWindow), KEY_RULER_ORIENTATION);
+
+- gint nWindowWidth, nWindowHeight;
+ gtk_window_get_size(pRulerWindow, &nWindowWidth, &nWindowHeight);
+
+ if(eRulerOrientation == RulerOrientationHorizontal) {
+@@ -154,12 +157,12 @@
+ }
+ }
+ else {
++ gint nRootX, nRootY;
+ // move
+ GtkWindow *pRulerWindow = GTK_WINDOW(gtk_widget_get_toplevel(pWidget));
+ g_return_val_if_fail(pRulerWindow != NULL, 1);
+
+ // get position of window in root coords
+- gint nRootX, nRootY;
+ gtk_window_get_position(pRulerWindow, &nRootX, &nRootY);
+
+ if(event->keyval == GDK_Left) {
+@@ -185,16 +188,17 @@
+ {
+ // begin draw if left click
+ if(event->button == 1) {
++ gint nWindowWidth, nWindowHeight;
++ gint nWindowClickX, nWindowClickY;
++ gint nRootClickX, nRootClickY;
++
+ // Get the window the widget is in
+ GtkWidget *pTopWindow = GTK_WIDGET(gtk_widget_get_toplevel(pWidget));
+ g_return_val_if_fail(GTK_WIDGET_TOPLEVEL(pTopWindow), FALSE);
+
+- gint nWindowWidth, nWindowHeight;
+ gtk_window_get_size(GTK_WINDOW(pTopWindow), &nWindowWidth, &nWindowHeight);
+
+- gint nWindowClickX, nWindowClickY;
+ gdk_window_get_pointer(pTopWindow->window, &nWindowClickX, &nWindowClickY, NULL);
+- gint nRootClickX, nRootClickY;
+ gdk_window_get_pointer(gtk_widget_get_root_window(pWidget), &nRootClickX, &nRootClickY, NULL);
+
+ // Drag window
diff --git a/deskutils/gruler/files/patch-src::prefs.c b/deskutils/gruler/files/patch-src::prefs.c
new file mode 100644
index 000000000000..98e6129aacd6
--- /dev/null
+++ b/deskutils/gruler/files/patch-src::prefs.c
@@ -0,0 +1,70 @@
+--- src/prefs.c.orig Wed Sep 29 03:14:17 2004
++++ src/prefs.c Tue Nov 23 09:13:01 2004
+@@ -52,17 +52,18 @@
+ void prefs_read()
+ {
+ gchar* str = NULL;
++ GdkColor clrForeground = DEFAULT_FOREGROUND_COLOR;
++ GdkColor clrBackground = DEFAULT_BACKGROUND_COLOR;
++ gint nLength;
++ gboolean bDrawMeasurementLines;
+
+ // Read foreground color
+- GdkColor clrForeground = DEFAULT_FOREGROUND_COLOR;
+ if((str = gconf_client_get_string(g_pGConfClient, GCONF_ROOT"/foreground_color", NULL)) != NULL) {
+ gdk_color_parse(str, &clrForeground);
+ }
+ gui_set_foreground_color(&clrForeground);
+
+ // Read background color
+- GdkColor clrBackground = DEFAULT_BACKGROUND_COLOR;
+-
+ if((str = gconf_client_get_string(g_pGConfClient, GCONF_ROOT"/background_color", NULL)) != NULL) {
+ gdk_color_parse(str, &clrBackground);
+ }
+@@ -74,7 +75,6 @@
+ }
+
+ // Read horizontal ruler length
+- gint nLength;
+ nLength=gconf_client_get_int(g_pGConfClient, GCONF_ROOT"/horizontal_length", NULL);
+ if(nLength == 0) {
+ nLength = DEFAULT_HORIZONTAL_RULER_LENGTH;
+@@ -91,7 +91,7 @@
+ gui_set_ruler_vertical_length_spinbutton(nLength);
+
+ // Read mouse-measurement-lines preference
+- gboolean bDrawMeasurementLines = gconf_client_get_bool(g_pGConfClient, GCONF_ROOT"/measurement_lines", NULL);
++ bDrawMeasurementLines = gconf_client_get_bool(g_pGConfClient, GCONF_ROOT"/measurement_lines", NULL);
+ gui_set_draw_mouse_measurement_lines(bDrawMeasurementLines);
+
+ g_bPrefsRead = TRUE;
+@@ -99,15 +99,17 @@
+
+ void prefs_write_style()
+ {
++ GdkColor clrBackground;
++ GdkColor clrForeground;
++ gboolean bDrawMeasurementLines;
++
+ if(!g_bPrefsRead) return;
+
+ // Write background color
+- GdkColor clrBackground;
+ gui_get_background_color(&clrBackground);
+ gconf_client_set_color_hex_triplet(g_pGConfClient, GCONF_ROOT"/background_color", &clrBackground);
+
+ // Write background color
+- GdkColor clrForeground;
+ gui_get_foreground_color(&clrForeground);
+ gconf_client_set_color_hex_triplet(g_pGConfClient, GCONF_ROOT"/foreground_color", &clrForeground);
+
+@@ -115,7 +117,7 @@
+ gconf_client_set_string(g_pGConfClient, GCONF_ROOT"/font", gui_get_font_string(), NULL);
+
+ // Write measurement lines setting
+- gboolean bDrawMeasurementLines = gui_get_draw_mouse_measurement_lines();
++ bDrawMeasurementLines = gui_get_draw_mouse_measurement_lines();
+ gconf_client_set_bool(g_pGConfClient, GCONF_ROOT"/measurement_lines", bDrawMeasurementLines, NULL);
+ }
+