gedit r6069 - branches/printing/gedit



Author: pborelli
Date: Sat Jan 12 15:25:14 2008
New Revision: 6069
URL: http://svn.gnome.org/viewvc/gedit?rev=6069&view=rev

Log:
grab focus


Modified:
   branches/printing/gedit/gedit-print-preview.c

Modified: branches/printing/gedit/gedit-print-preview.c
==============================================================================
--- branches/printing/gedit/gedit-print-preview.c	(original)
+++ branches/printing/gedit/gedit-print-preview.c	Sat Jan 12 15:25:14 2008
@@ -132,18 +132,32 @@
 	G_OBJECT_CLASS (gedit_print_preview_parent_class)->finalize (object);
 }
 
+static void
+gedit_print_preview_grab_focus (GtkWidget *widget)
+{
+	GeditPrintPreview *preview;
+
+	preview = GEDIT_PRINT_PREVIEW (widget);
+
+	gtk_widget_grab_focus (GTK_WIDGET (preview->priv->layout));
+}
+
 static void						 
 gedit_print_preview_class_init (GeditPrintPreviewClass *klass)
 {
 	GObjectClass *object_class;
+	GtkWidgetClass *widget_class;
 	GtkBindingSet *binding_set;
 
 	object_class = G_OBJECT_CLASS (klass);
+	widget_class = GTK_WIDGET_CLASS (klass);
 
 	object_class->get_property = gedit_print_preview_get_property;
 	object_class->set_property = gedit_print_preview_set_property;
 	object_class->finalize = gedit_print_preview_finalize;
 
+	widget_class->grab_focus = gedit_print_preview_grab_focus;
+
 	signals[CLOSE] =  g_signal_new ("close",
 					G_OBJECT_CLASS_TYPE (klass),
 					G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]