svnno****@sourc*****
svnno****@sourc*****
Fri Sep 11 12:37:19 JST 2009
Revision: 3842 http://sourceforge.jp/projects/kazehakase/svn/view?view=rev&revision=3842 Author: ikezoe Date: 2009-09-11 12:37:19 +0900 (Fri, 11 Sep 2009) Log Message: ----------- fix indent. Modified Paths: -------------- kazehakase/trunk/src/widget/kz-entry.c Modified: kazehakase/trunk/src/widget/kz-entry.c =================================================================== --- kazehakase/trunk/src/widget/kz-entry.c 2009-09-11 03:37:19 UTC (rev 3841) +++ kazehakase/trunk/src/widget/kz-entry.c 2009-09-11 03:37:19 UTC (rev 3842) @@ -17,9 +17,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * These codes originated in gtkentry.c in GTK+-2.2.4. - */ #include "kz-entry.h" @@ -42,8 +39,8 @@ GValue *value, GParamSpec *pspec); -static gboolean expose (GtkWidget *widget, - GdkEventExpose *event); +static gboolean expose (GtkWidget *widget, + GdkEventExpose *event); G_DEFINE_TYPE(KzEntry, kz_entry, GTK_TYPE_ENTRY) @@ -75,19 +72,19 @@ static void kz_entry_init (KzEntry *entry) { - entry->background_text = NULL; - entry->with_arrow = FALSE; + entry->background_text = NULL; + entry->with_arrow = FALSE; } static void finalize (GObject *object) { - KzEntry *entry = KZ_ENTRY(object); + KzEntry *entry = KZ_ENTRY(object); - g_free(entry->background_text); + g_free(entry->background_text); - G_OBJECT_CLASS(kz_entry_parent_class)->finalize(object); + G_OBJECT_CLASS(kz_entry_parent_class)->finalize(object); } @@ -97,17 +94,16 @@ const GValue *value, GParamSpec *pspec) { - KzEntry *entry = KZ_ENTRY(object); - - switch (prop_id) - { - case PROP_BACKGROUND_TEXT: - kz_entry_set_background_text(entry, g_value_get_string(value)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); - break; - } + KzEntry *entry = KZ_ENTRY(object); + + switch (prop_id) { + case PROP_BACKGROUND_TEXT: + kz_entry_set_background_text(entry, g_value_get_string(value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); + break; + } } @@ -117,34 +113,32 @@ GValue *value, GParamSpec *pspec) { - KzEntry *entry = KZ_ENTRY(object); + KzEntry *entry = KZ_ENTRY(object); - switch (prop_id) - { - case PROP_BACKGROUND_TEXT: - g_value_set_string(value, kz_entry_get_background_text(entry)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); - break; - } + switch (prop_id) { + case PROP_BACKGROUND_TEXT: + g_value_set_string(value, kz_entry_get_background_text(entry)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); + break; + } } GtkWidget * kz_entry_new (void) { - return GTK_WIDGET(g_object_new(KZ_TYPE_ENTRY, NULL)); + return GTK_WIDGET(g_object_new(KZ_TYPE_ENTRY, NULL)); } static gboolean expose (GtkWidget *widget, GdkEventExpose *event) { - GtkEntry *entry = GTK_ENTRY(widget); + GtkEntry *entry = GTK_ENTRY(widget); if (!GTK_WIDGET_HAS_FOCUS(widget) && - (!gtk_entry_get_text(entry) || gtk_entry_get_text(entry)[0] == '\0')) - { + (!gtk_entry_get_text(entry) || gtk_entry_get_text(entry)[0] == '\0')) { PangoLayout *layout; PangoAttrList *attrs; PangoAttribute *foreground_attr; @@ -156,14 +150,14 @@ attrs = pango_layout_get_attributes(layout); color = &style->fg[GTK_STATE_INSENSITIVE]; foreground_attr = pango_attr_foreground_new(color->red, - color->green, - color->blue); + color->green, + color->blue); pango_attr_list_insert_before(attrs, foreground_attr); pango_layout_set_attributes(layout, attrs); pango_layout_set_text(layout, KZ_ENTRY(entry)->background_text, -1); - } + } - return GTK_WIDGET_CLASS(kz_entry_parent_class)->expose_event(widget, event); + return GTK_WIDGET_CLASS(kz_entry_parent_class)->expose_event(widget, event); }