[Kazehakase-cvs] CVS update: kazehakase/src

Back to archive index

Hiroyuki Ikezoe ikezo****@users*****
Sat Jan 6 13:46:18 JST 2007


Index: kazehakase/src/kz-window.c
diff -u kazehakase/src/kz-window.c:1.308 kazehakase/src/kz-window.c:1.309
--- kazehakase/src/kz-window.c:1.308	Sat Jan  6 11:42:25 2007
+++ kazehakase/src/kz-window.c	Sat Jan  6 13:46:18 2007
@@ -284,14 +284,14 @@
 	widget_class  = (GtkWidgetClass *) klass;
 
 	kz_window_signals[APPEND_TAB_SIGNAL]
-		= g_signal_new ("append-tab",
-				G_TYPE_FROM_CLASS (klass),
-				G_SIGNAL_RUN_FIRST,
-				G_STRUCT_OFFSET (KzWindowClass, append_tab),
-				NULL, NULL,
-				_kz_marshal_VOID__OBJECT_OBJECT,
-				G_TYPE_NONE, 2,
-				GTK_TYPE_WIDGET, GTK_TYPE_WIDGET);
+		= g_signal_new("append-tab",
+			       G_TYPE_FROM_CLASS (klass),
+			       G_SIGNAL_RUN_FIRST,
+			       G_STRUCT_OFFSET (KzWindowClass, append_tab),
+			       NULL, NULL,
+			       _kz_marshal_VOID__OBJECT_OBJECT,
+			       G_TYPE_NONE, 2,
+			       GTK_TYPE_WIDGET, GTK_TYPE_WIDGET);
 
 	kz_window_signals[REMOVE_TAB_SIGNAL]
 		= g_signal_new ("remove-tab",
@@ -324,7 +324,7 @@
 	klass->append_tab = kz_window_append_tab;
 	klass->remove_tab = kz_window_remove_tab;
 	
-	g_type_class_add_private (gobject_class, sizeof(KzWindowPrivate));
+	g_type_class_add_private(gobject_class, sizeof(KzWindowPrivate));
 }
 
 void
@@ -381,7 +381,7 @@
 	GtkSettings *setting;
 	GList *children, *node;
 	GtkSettings *settings;
-	KzWindowPrivate *priv = KZ_WINDOW_GET_PRIVATE (kz);
+	KzWindowPrivate *priv = KZ_WINDOW_GET_PRIVATE(kz);
 
 	gtk_window_set_title(GTK_WINDOW(kz), _("Kazehakase"));
 	gtk_window_set_icon(GTK_WINDOW(kz), kz_icon);
@@ -461,7 +461,7 @@
 	{
 		GtkAccelGroup *accel_group;
 
-		kz->menu_box = menu_box = gtk_vbox_new (FALSE, 0);
+		kz->menu_box = menu_box = gtk_vbox_new(FALSE, 0);
 		gtk_box_pack_start(GTK_BOX(kz->top_vbox), menu_box,
 				   FALSE, FALSE, 0);   
 		gtk_widget_show(menu_box);
@@ -494,7 +494,7 @@
 
 		if (setting)
 		{
-			gtk_settings_set_long_property (setting,
+			gtk_settings_set_long_property(setting,
 							"gtk-toolbar-style",
 							GTK_TOOLBAR_ICONS,
 							"");
@@ -580,11 +580,11 @@
 	/* from Galeon-1.3.18 */
 	/* initialize the listener for the key theme */
 	settings = gtk_settings_get_default();
-	g_signal_connect (settings,
-			  "notify::gtk-key-theme-name",
-			  G_CALLBACK (gtk_key_theme_changed_cb),
-			  NULL);
-	gtk_key_theme_changed_cb (settings, 0, 0);
+	g_signal_connect(settings,
+			 "notify::gtk-key-theme-name",
+			 G_CALLBACK (gtk_key_theme_changed_cb),
+			 NULL);
+	gtk_key_theme_changed_cb(settings, 0, 0);
 
 	kz_bookmark_set_title(kz->tabs, "Window");
 	kz_bookmark_append(KZ_GET_CURRENT_SESSION, kz->tabs);
@@ -620,9 +620,9 @@
 				    NULL);
 	
 	if (url)
-		kz_window_open_new_tab (kz, url);
+		kz_window_open_new_tab(kz, url);
 
-	return GTK_WIDGET (kz);
+	return GTK_WIDGET(kz);
 }
 
 
@@ -639,7 +639,7 @@
 
 	g_return_if_fail(KZ_IS_WINDOW(kz));
 
-	priv = KZ_WINDOW_GET_PRIVATE (kz);
+	priv = KZ_WINDOW_GET_PRIVATE(kz);
 
 	switch (KZ_GET_UI_LEVEL) 
 	{
@@ -840,7 +840,7 @@
 	g_return_val_if_fail(KZ_IS_WINDOW(kz), NULL);
 	if (url) g_return_val_if_fail(g_utf8_validate(url, strlen(url), NULL), NULL);
 
-	priv = KZ_WINDOW_GET_PRIVATE (kz);
+	priv = KZ_WINDOW_GET_PRIVATE(kz);
 	kzembed = kz_window_create_embed(kz, url);
 	kztab = KZ_TAB_LABEL(kz_tab_label_new(kz, kzembed));
 
@@ -884,7 +884,7 @@
 	gint pos;
 	g_return_if_fail(KZ_IS_WINDOW(kz));
 
-	priv = KZ_WINDOW_GET_PRIVATE (kz);
+	priv = KZ_WINDOW_GET_PRIVATE(kz);
 
 	/* remove old tab bookmark */
 	kz_bookmark_remove(KZ_GET_CURRENT_SESSION, kz->tabs);
@@ -990,13 +990,13 @@
 	g_return_if_fail(KZ_IS_WINDOW(kz));
 	g_return_if_fail(KZ_IS_EMBED(widget));
 
-	priv = KZ_WINDOW_GET_PRIVATE (kz);
+	priv = KZ_WINDOW_GET_PRIVATE(kz);
 	kzembed = KZ_EMBED(widget);
 
 	src_kz = KZ_WINDOW(kz_app_get_window_from_tab(kz_app, widget));
 	if (!src_kz) return;
 
-	src_priv = KZ_WINDOW_GET_PRIVATE (src_kz);
+	src_priv = KZ_WINDOW_GET_PRIVATE(src_kz);
 	label = gtk_notebook_get_tab_label(GTK_NOTEBOOK(kz->notebook),
 					   widget);
 
@@ -1081,10 +1081,10 @@
 {
 	gchar *key_theme_name;
 
-	g_object_get (settings,
-		      "gtk-key-theme-name", &key_theme_name,
-		      NULL);
-	if (key_theme_name && g_ascii_strcasecmp (key_theme_name, "Emacs") == 0)
+	g_object_get(settings,
+		     "gtk-key-theme-name", &key_theme_name,
+		     NULL);
+	if (key_theme_name && g_ascii_strcasecmp(key_theme_name, "Emacs") == 0)
 	{
 		key_theme_is_emacs = TRUE;
 	}
@@ -1092,7 +1092,7 @@
 	{
 		key_theme_is_emacs = FALSE;
 	}
-	g_free (key_theme_name);
+	g_free(key_theme_name);
 }
 
 static gboolean
@@ -1119,7 +1119,7 @@
 	shortcircuit = FALSE;
 	force_chain  = FALSE;
 	handled = FALSE;
-	modifier = event->state & gtk_accelerator_get_default_mod_mask ();
+	modifier = event->state & gtk_accelerator_get_default_mod_mask();
 	/* guint i; */
 
 	if (event->keyval == GDK_Escape)
@@ -1139,11 +1139,11 @@
 
 	if (shortcircuit)
 	{
-		GtkWidget *widget = gtk_window_get_focus (GTK_WINDOW (kz));
+		GtkWidget *widget = gtk_window_get_focus(GTK_WINDOW(kz));
 
-		if (GTK_IS_WIDGET (widget))
+		if (GTK_IS_WIDGET(widget))
 		{
-			handled = gtk_widget_event (widget, (GdkEvent*)event);
+			handled = gtk_widget_event(widget, (GdkEvent*)event);
 		}
 
 		if (handled && !force_chain)
@@ -1160,10 +1160,10 @@
 destroy (GtkObject *object)
 {
 	KzWindow *kz = KZ_WINDOW(object);
-	KzWindowPrivate *priv = KZ_WINDOW_GET_PRIVATE (kz);
+	KzWindowPrivate *priv = KZ_WINDOW_GET_PRIVATE(kz);
 
-	if (GTK_OBJECT_CLASS (kz_window_parent_class)->destroy)
-		GTK_OBJECT_CLASS (kz_window_parent_class)->destroy(object);
+	if (GTK_OBJECT_CLASS(kz_window_parent_class)->destroy)
+		GTK_OBJECT_CLASS(kz_window_parent_class)->destroy(object);
 
 	if (priv->gesture)
 		g_object_unref(priv->gesture);
@@ -1257,7 +1257,7 @@
 	KzWindowPrivate *priv;
 
 	g_return_if_fail(KZ_IS_WINDOW(kz));
-	priv = KZ_WINDOW_GET_PRIVATE (kz);
+	priv = KZ_WINDOW_GET_PRIVATE(kz);
 
 	items = kz_gesture_items_new();
 
@@ -1304,20 +1304,20 @@
 	GdkWindowState state;
 
 	g_return_if_fail(KZ_IS_WINDOW(kz));
-	priv = KZ_WINDOW_GET_PRIVATE (kz);
+	priv = KZ_WINDOW_GET_PRIVATE(kz);
 
 	kz_profile_set_save_each_time(KZ_GET_GLOBAL_PROFILE, FALSE);
 	/*
 	 * window size
 	 */
 
-	state = gdk_window_get_state (GTK_WIDGET(kz)->window);
+	state = gdk_window_get_state(GTK_WIDGET(kz)->window);
 	maximized = state & GDK_WINDOW_STATE_MAXIMIZED;
 	KZ_CONF_SET("MainWindow", "maximized", maximized, BOOL);
 
 	if (!maximized)
 	{
-		gdk_window_get_geometry (GTK_WIDGET(kz)->window,
+		gdk_window_get_geometry(GTK_WIDGET(kz)->window,
 					 &client_x, &client_y,
 					 &width, &height, NULL);
 		KZ_CONF_SET("MainWindow", "width",  width,  INT);
@@ -1957,7 +1957,7 @@
 static void
 cb_menu_merge_add_widget (GtkUIManager *merge, GtkWidget *widget, GtkBox *box)
 {
-	gtk_box_pack_start (box, widget, FALSE, FALSE, 0);
+	gtk_box_pack_start(box, widget, FALSE, FALSE, 0);
 }
 
 
@@ -2062,7 +2062,7 @@
 	KzWindowPrivate *priv;
 	g_return_if_fail(GTK_IS_TOGGLE_ACTION(action));
 
-	priv = KZ_WINDOW_GET_PRIVATE (KZ_SIDEBAR(widget)->kz);
+	priv = KZ_WINDOW_GET_PRIVATE(KZ_SIDEBAR(widget)->kz);
 	priv->sidebar_was_shown = TRUE;
 
 	gtk_toggle_action_set_active(action, TRUE);
@@ -2190,7 +2190,7 @@
 	g_return_if_fail(KZ_IS_WINDOW(kz));
 
 	*newEmbed = KZ_EMBED(kz_window_open_new_tab(kz, NULL));
-	gtk_widget_show (GTK_WIDGET(*newEmbed));
+	gtk_widget_show(GTK_WIDGET(*newEmbed));
 }
 
 
@@ -2202,7 +2202,7 @@
 	KzWindowPrivate *priv;
 
 	g_return_if_fail(KZ_IS_WINDOW(kz));
-	priv = KZ_WINDOW_GET_PRIVATE (kz);
+	priv = KZ_WINDOW_GET_PRIVATE(kz);
 	g_return_if_fail(priv->tab_tree);
 
 	kzembed = KZ_EMBED(obj);
@@ -2338,7 +2338,7 @@
 
 	g_return_val_if_fail(KZ_IS_WINDOW(kz), FALSE);
 
-	priv = KZ_WINDOW_GET_PRIVATE (kz);
+	priv = KZ_WINDOW_GET_PRIVATE(kz);
 	type = event->cinfo.context;
 	button = event->button;
 	if (priv->event)
@@ -2402,36 +2402,36 @@
 		KZ_CONF_GET("Gesture", "use_gesture", use_gesture, BOOL);
 		if (!use_gesture)
 		{
-			gdk_pointer_grab (GTK_WIDGET(kz)->window,
+			gdk_pointer_grab(GTK_WIDGET(kz)->window,
 					  FALSE,
 					  GDK_BUTTON_RELEASE_MASK |
 					  GDK_BUTTON_PRESS_MASK,
-					  NULL,	cursor, gtk_get_current_event_time ());
+					  NULL,	cursor, gtk_get_current_event_time());
 			break;
 		}
 		/* start gesture */
 
-		gtk_widget_get_pointer (GTK_WIDGET(kzembed), &x, &y);
+		gtk_widget_get_pointer(GTK_WIDGET(kzembed), &x, &y);
 
 		priv->start_x = x;
 		priv->start_y = y;
 
-		gdk_window_get_root_origin (GTK_WIDGET(kzembed)->window,
+		gdk_window_get_root_origin(GTK_WIDGET(kzembed)->window,
 					    &win_x, &win_y);
-		gdk_window_get_position (GTK_WIDGET(kzembed)->window,
+		gdk_window_get_position(GTK_WIDGET(kzembed)->window,
 					 &win_x_pos, &win_y_pos);
 
-		gtk_widget_get_pointer (GTK_WIDGET(kzembed),
+		gtk_widget_get_pointer(GTK_WIDGET(kzembed),
 					&x, &y);
 		kz_gesture_start(priv->gesture, 0, x, y);
 
-		if (!cursor) cursor = gdk_cursor_new (GDK_HAND1);
-		gdk_pointer_grab (GTK_WIDGET(kz)->window,
+		if (!cursor) cursor = gdk_cursor_new(GDK_HAND1);
+		gdk_pointer_grab(GTK_WIDGET(kz)->window,
 				  FALSE,
 				  GDK_POINTER_MOTION_MASK |
 				  GDK_BUTTON_RELEASE_MASK |
 				  GDK_BUTTON_PRESS_MASK,
-				  NULL, cursor, gtk_get_current_event_time ());
+				  NULL, cursor, gtk_get_current_event_time());
 		kz_statusbar_set_gesture_text(KZ_STATUSBAR(kz->statusbar), _("Gesture:"));
 		break;
 	}
@@ -2473,11 +2473,11 @@
 	if ((type & KZ_CONTEXT_LINK) && event->cinfo.link)
 	{
 		GtkWidget *widget = KZ_WINDOW_CURRENT_PAGE(kz);
-		GdkDisplay *display = gtk_widget_get_display (widget);
+		GdkDisplay *display = gtk_widget_get_display(widget);
 		gint x, y;
 
-		display = gtk_widget_get_display (widget);
-		gdk_display_get_pointer (display, NULL, &x, &y, NULL);
+		display = gtk_widget_get_display(widget);
+		gdk_display_get_pointer(display, NULL, &x, &y, NULL);
 
 		kz_popup_preview_start(kz->popup, event->cinfo.link, event->cinfo.img, x, y);
 	}
@@ -2505,10 +2505,10 @@
 	g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE);
 
 	kz = KZ_WINDOW(widget);
-	priv = KZ_WINDOW_GET_PRIVATE (kz);
+	priv = KZ_WINDOW_GET_PRIVATE(kz);
 
 	/*gdk_window_get_pointer (GTK_WIDGET(kzembed)->window, &x, &y, &state);*/
-	gtk_widget_get_pointer (GTK_WIDGET(kzembed), &x, &y);
+	gtk_widget_get_pointer(GTK_WIDGET(kzembed), &x, &y);
 
 	if (abs(x - priv->start_x) > 2 ||
 	    abs(y - priv->start_y) > 2)
@@ -2539,11 +2539,11 @@
 	g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE);
 
 	kz = KZ_WINDOW(widget);
-	priv = KZ_WINDOW_GET_PRIVATE (kz);
+	priv = KZ_WINDOW_GET_PRIVATE(kz);
 
-        if (gdk_pointer_is_grabbed ())
+        if (gdk_pointer_is_grabbed())
         {
-                gdk_pointer_ungrab (gtk_get_current_event_time ());
+                gdk_pointer_ungrab(gtk_get_current_event_time());
         }
 
 	if (kz_gesture_is_started(priv->gesture))
@@ -2559,7 +2559,7 @@
 	    !priv->is_button3_scrolled &&
 	    event->button == 3)
 	{
-		kz_actions_popup_menu_modal (kz, event->button, event->time);
+		kz_actions_popup_menu_modal(kz, event->button, event->time);
 		retval = TRUE;
 	}
 
@@ -2594,7 +2594,7 @@
 	g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE);
 
 	kz = KZ_WINDOW(widget);
-	priv = KZ_WINDOW_GET_PRIVATE (kz);
+	priv = KZ_WINDOW_GET_PRIVATE(kz);
 
 	if (priv->is_button3_pressed)
 	{
@@ -2612,14 +2612,14 @@
 {
 	if(!event->in) 
 	{
-		KzWindowPrivate *priv = KZ_WINDOW_GET_PRIVATE (kz);
+		KzWindowPrivate *priv = KZ_WINDOW_GET_PRIVATE(kz);
 		/* focus is out */
 		if (kz_gesture_is_started(priv->gesture))
 		{
 			kz_gesture_cancel(priv->gesture);
-			if (gdk_pointer_is_grabbed ())
+			if (gdk_pointer_is_grabbed())
 			{
-				gdk_pointer_ungrab (gtk_get_current_event_time ());
+				gdk_pointer_ungrab(gtk_get_current_event_time());
 			}
 			kz_statusbar_set_gesture_text(KZ_STATUSBAR(kz->statusbar), NULL);
 		}


More information about the Kazehakase-cvs mailing list
Back to archive index