[Kazehakase-cvs] CVS update: kazehakase/src

Zurück zum Archiv-Index

Hiroyuki Ikezoe ikezo****@users*****
Wed Jan 3 22:03:07 JST 2007


Index: kazehakase/src/kz-notebook.c
diff -u kazehakase/src/kz-notebook.c:1.2 kazehakase/src/kz-notebook.c:1.3
--- kazehakase/src/kz-notebook.c:1.2	Wed Jan  3 10:20:50 2007
+++ kazehakase/src/kz-notebook.c	Wed Jan  3 22:03:07 2007
@@ -330,6 +330,27 @@
 static void
 switch_page (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num)
 {
+	KzTabLabel *tab;
+	gchar *title;
+	KzEmbed *kzembed = KZ_EMBED(gtk_notebook_get_nth_page(notebook, page_num));
+
+	title = kz_embed_ensure_title(kzembed);
+	if (title)
+	{
+		gtk_window_set_title(GTK_WINDOW(KZ_NOTEBOOK(notebook)->kz), title);
+		g_free(title);
+	}
+	else
+	{
+		gtk_window_set_title(GTK_WINDOW(KZ_NOTEBOOK(notebook)->kz), _("Kazehakase"));
+	}
+
+	tab = KZ_TAB_LABEL(gtk_notebook_get_tab_label(notebook, GTK_WIDGET(kzembed)));
+	g_return_if_fail(tab);
+
+	if(kz_tab_label_get_state(tab) == KZ_TAB_LABEL_STATE_LOADED)
+		kz_tab_label_set_state(tab, KZ_TAB_LABEL_STATE_NORMAL);
+
 	if (GTK_NOTEBOOK_CLASS(kz_notebook_parent_class)->switch_page)
 		GTK_NOTEBOOK_CLASS(kz_notebook_parent_class)->switch_page(notebook, page, page_num);
 }
Index: kazehakase/src/kz-window.c
diff -u kazehakase/src/kz-window.c:1.291 kazehakase/src/kz-window.c:1.292
--- kazehakase/src/kz-window.c:1.291	Wed Jan  3 10:27:07 2007
+++ kazehakase/src/kz-window.c	Wed Jan  3 22:03:07 2007
@@ -2209,7 +2209,6 @@
 {
 	KzEmbed *kzembed = KZ_EMBED(KZ_WINDOW_NTH_PAGE(kz, page_num));
 	KzEmbed *cur = KZ_EMBED(KZ_WINDOW_CURRENT_PAGE(kz));
-	gchar *title;
 	const gchar *location;
 	GtkAction *action;
 	KzTabLabel *tab;
@@ -2222,17 +2221,7 @@
 	kz_window_unset_cur_embed_callbacks(kz, cur);
 	kz_window_set_cur_embed_callbacks(kz, kzembed);
 
-	title = kz_embed_ensure_title(kzembed);
 	location = kz_embed_get_location(kzembed);
-	if (title)
-	{
-		gtk_window_set_title(GTK_WINDOW(kz), title);
-		g_free(title);
-	}
-	else
-	{
-		gtk_window_set_title(GTK_WINDOW(kz), _("Kazehakase"));
-	}
 
 	action = gtk_action_group_get_action(kz->actions, "LocationEntry");
 	if (KZ_IS_ENTRY_ACTION(action))
@@ -2258,7 +2247,7 @@
 			g_free(text);
 		}
 	}
-	
+
 	action = gtk_action_group_get_action(kz->actions, "Zoom");
 	if (KZ_IS_ZOOM_ACTION(action))
 	{
@@ -2270,15 +2259,12 @@
 	tab = KZ_TAB_LABEL(kz_window_get_tab_label(kz, GTK_WIDGET(kzembed)));
 	g_return_if_fail(tab);
 
-	if(kz_tab_label_get_state(tab) == KZ_TAB_LABEL_STATE_LOADED)
+	if((!location || *location == 0) &&
+	   KZ_CONF_GET("Tab", "focus_loc_ent_new", focus, BOOL) &&
+	   focus &&
+	   kz_tab_label_get_state(tab) == KZ_TAB_LABEL_STATE_LOADED)
 	{
-		kz_tab_label_set_state(tab, KZ_TAB_LABEL_STATE_NORMAL);
-		if((!location || *location == 0 ) &&
-		   KZ_CONF_GET("Tab","focus_loc_ent_new", focus, BOOL) &&
-		   focus)
-		{
 			g_idle_add(idle_focus_location_entry, kz);
-		}
 	}
 
 	kz_actions_set_sensitive(kz, kzembed);


More information about the Kazehakase-cvs mailing list
Zurück zum Archiv-Index