Re: robsta - r21594 - in abiword/trunk/src/wp: ap/unix main/cocoa main/win main/xp

From: Dominic Lachowicz <domlachowicz_at_gmail.com>
Date: Fri Jul 13 2007 - 13:26:30 CEST

Shouldn't this be a "style property" rather than a property?

On 7/13/07, cvs@abisource.com <cvs@abisource.com> wrote:
>
> Author: robsta
> Date: 2007-07-13 09:30:47 +0200 (Fri, 13 Jul 2007)
> New Revision: 21594
>
> Modified:
> abiword/trunk/src/wp/ap/unix/abiwidget.cpp
> abiword/trunk/src/wp/ap/unix/ap_UnixFrameImpl.h
> abiword/trunk/src/wp/main/cocoa/CocoaMain.cpp
> abiword/trunk/src/wp/main/win/Win32Main.cpp
> abiword/trunk/src/wp/main/xp/abi_ver.cpp
> Log:
> Expose the abiwidget GtkFrame 'shadow-type' property for fellow OLPCians
>
> Modified: abiword/trunk/src/wp/ap/unix/abiwidget.cpp
> ===================================================================
> --- abiword/trunk/src/wp/ap/unix/abiwidget.cpp 2007-07-13 07:29:18 UTC (rev 21593)
> +++ abiword/trunk/src/wp/ap/unix/abiwidget.cpp 2007-07-13 07:30:47 UTC (rev 21594)
> @@ -126,6 +126,7 @@
> SELECTION,
> CONTENT_LENGTH,
> SELECTION_LENGTH,
> + SHADOW_TYPE,
> ARG_LAST
> };
>
> @@ -1549,6 +1550,12 @@
> g_value_set_int(arg,abi->priv->m_iSelectionLength);
> break;
> }
> + case SHADOW_TYPE:
> + {
> + AP_UnixFrameImpl * pFrameImpl = static_cast<AP_UnixFrameImpl *>(abi->priv->m_pFrame->getFrameImpl());
> + g_value_set_int (arg, pFrameImpl->getShadowType());
> + break;
> + }
> default:
> break;
> }
> @@ -1619,7 +1626,15 @@
> case MIMETYPE:
> {
> *(abi->priv->m_sMIMETYPE) = g_value_get_string(arg);
> + break;
> }
> + case SHADOW_TYPE:
> + {
> + AP_UnixFrameImpl * pFrameImpl = static_cast<AP_UnixFrameImpl *>(abi->priv->m_pFrame->getFrameImpl());
> + int shadow = g_value_get_int (arg);
> + pFrameImpl->setShadowType((GtkShadowType) shadow);
> + break;
> + }
> default:
> break;
> }
> @@ -2102,6 +2117,14 @@
> FALSE,
> static_cast<GParamFlags>(G_PARAM_READABLE)));
>
> + g_object_class_install_property(gobject_class,
> + SHADOW_TYPE,
> + g_param_spec_int("shadow_type", NULL, NULL,
> + (int) GTK_SHADOW_NONE,
> + (int) GTK_SHADOW_ETCHED_OUT,
> + (int) GTK_SHADOW_IN,
> + static_cast<GParamFlags>(G_PARAM_READWRITE)));
> +
> _abi_widget_class_install_signals (abi_class);
> }
>
>
> Modified: abiword/trunk/src/wp/ap/unix/ap_UnixFrameImpl.h
> ===================================================================
> --- abiword/trunk/src/wp/ap/unix/ap_UnixFrameImpl.h 2007-07-13 07:29:18 UTC (rev 21593)
> +++ abiword/trunk/src/wp/ap/unix/ap_UnixFrameImpl.h 2007-07-13 07:30:47 UTC (rev 21594)
> @@ -41,6 +41,9 @@
> virtual UT_RGBColor getColorSelBackground () const;
> virtual UT_RGBColor getColorSelForeground () const;
>
> + GtkShadowType getShadowType () { return gtk_frame_get_shadow_type (GTK_FRAME (m_wSunkenBox)); }
> + void setShadowType (GtkShadowType shadow) { gtk_frame_set_shadow_type (GTK_FRAME (m_wSunkenBox), shadow); }
> +
> GtkWidget * getDrawingArea() const {return m_dArea;}
> static gboolean ap_focus_in_event (GtkWidget * drawing_area, GdkEventCrossing *event, AP_UnixFrameImpl * me);
> static gboolean ap_focus_out_event (GtkWidget * drawing_area, GdkEventCrossing *event, AP_UnixFrameImpl * me);
>
> Modified: abiword/trunk/src/wp/main/cocoa/CocoaMain.cpp
> ===================================================================
> --- abiword/trunk/src/wp/main/cocoa/CocoaMain.cpp 2007-07-13 07:29:18 UTC (rev 21593)
> +++ abiword/trunk/src/wp/main/cocoa/CocoaMain.cpp 2007-07-13 07:30:47 UTC (rev 21594)
> @@ -18,6 +18,10 @@
> * 02111-1307, USA.
> */
>
> +#ifdef HAVE_CONFIG_H
> +#include "config.h"
> +#endif
> +
> #import <Cocoa/Cocoa.h>
> #ifdef DEBUG
> #import <Foundation/NSDebug.h>
>
> Modified: abiword/trunk/src/wp/main/win/Win32Main.cpp
> ===================================================================
> --- abiword/trunk/src/wp/main/win/Win32Main.cpp 2007-07-13 07:29:18 UTC (rev 21593)
> +++ abiword/trunk/src/wp/main/win/Win32Main.cpp 2007-07-13 07:30:47 UTC (rev 21594)
> @@ -17,6 +17,10 @@
> * 02111-1307, USA.
> */
>
> +#ifdef HAVE_CONFIG_H
> +#include "config.h"
> +#endif
> +
> #include <windows.h>
> #include "ap_Win32App.h"
>
>
> Modified: abiword/trunk/src/wp/main/xp/abi_ver.cpp
> ===================================================================
> --- abiword/trunk/src/wp/main/xp/abi_ver.cpp 2007-07-13 07:29:18 UTC (rev 21593)
> +++ abiword/trunk/src/wp/main/xp/abi_ver.cpp 2007-07-13 07:30:47 UTC (rev 21594)
> @@ -17,6 +17,10 @@
> * 02111-1307, USA.
> */
>
> +#ifdef HAVE_CONFIG_H
> +#include "config.h"
> +#endif
> +
> #include <stdio.h>
> #ifdef ENABLE_BINRELOC
> #include "prefix.h"
>
> -----------------------------------------------
> To unsubscribe from this list, send a message to
> abisource-cvs-commit-request@abisource.com with the word
> unsubscribe in the message body.
>

-- 
Counting bodies like sheep to the rhythm of the war drums.
Received on Fri Jul 13 13:24:56 2007

This archive was generated by hypermail 2.1.8 : Fri Jul 13 2007 - 13:24:56 CEST