summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nautilus-information-panel.c23
-rw-r--r--src/nautilus-navigation-window.c9
-rw-r--r--src/nautilus-object-window.c9
-rw-r--r--src/nautilus-sidebar.c23
-rw-r--r--src/nautilus-spatial-window.c9
-rw-r--r--src/nautilus-window.c9
-rw-r--r--src/ntl-index-panel.c23
-rw-r--r--src/ntl-window.c9
8 files changed, 78 insertions, 36 deletions
diff --git a/src/nautilus-information-panel.c b/src/nautilus-information-panel.c
index ee26e461f..0adf24529 100644
--- a/src/nautilus-information-panel.c
+++ b/src/nautilus-information-panel.c
@@ -708,18 +708,16 @@ add_command_buttons(NautilusIndexPanel *index_panel, GList *command_list)
{
char *command_string, *temp_str;
GList *p;
- GtkWidget *temp_button, *temp_label;
+ GtkWidget *temp_button;
NautilusCommandInfo *info;
for (p = command_list; p != NULL; p = p->next) {
info = p->data;
index_panel->details->has_buttons = TRUE;
-
- temp_button = gtk_button_new ();
- temp_label = gtk_label_new (info->display_name);
- gtk_widget_show (temp_label);
- gtk_container_add (GTK_CONTAINER (temp_button), temp_label);
+
+ temp_str = g_strdup_printf (_("Open with %s"), info->display_name);
+ temp_button = gtk_button_new_with_label (temp_str);
gtk_box_pack_start (GTK_BOX (index_panel->details->button_box), temp_button, FALSE, TRUE, 2);
gtk_button_set_relief (GTK_BUTTON (temp_button), GTK_RELIEF_NORMAL);
gtk_widget_set_usize (GTK_WIDGET (temp_button), 80, 20);
@@ -730,9 +728,12 @@ add_command_buttons(NautilusIndexPanel *index_panel, GList *command_list)
command_string = g_strdup_printf (info->command_string, temp_str);
g_free(temp_str);
-
- gtk_signal_connect (GTK_OBJECT (temp_button), "clicked",
- GTK_SIGNAL_FUNC (command_button_cb), command_string);
+
+ nautilus_gtk_signal_connect_free_data
+ (GTK_OBJECT (temp_button),
+ "clicked",
+ GTK_SIGNAL_FUNC (command_button_cb),
+ command_string);
gtk_object_set_user_data (GTK_OBJECT (temp_button), index_panel);
gtk_widget_show (temp_button);
@@ -840,9 +841,7 @@ nautilus_index_panel_update_info (NautilusIndexPanel *index_panel,
nautilus_index_title_set_uri (index_panel->details->title,
index_panel->details->uri,
initial_title);
-
- /* add keywords if we got any */
-
+
/* set up the command buttons */
nautilus_index_panel_update_buttons (index_panel);
}
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c
index 47f43eddb..773634e3a 100644
--- a/src/nautilus-navigation-window.c
+++ b/src/nautilus-navigation-window.c
@@ -729,6 +729,15 @@ nautilus_window_load_content_view_menu (NautilusWindow *window,
++index;
}
+
+ /* Add "View as ..." extra bonus choice, with separator before it. */
+ menu_item = gtk_menu_item_new ();
+ gtk_widget_show (menu_item);
+ gtk_menu_append (GTK_MENU (new_menu), menu_item);
+ menu_item = gtk_menu_item_new_with_label (_("View as ..."));
+ gtk_widget_show (menu_item);
+ gtk_widget_set_sensitive (menu_item, FALSE); /* doesn't do anything yet */
+ gtk_menu_append (GTK_MENU (new_menu), menu_item);
/*
* We create and attach a new menu here because adding/removing
diff --git a/src/nautilus-object-window.c b/src/nautilus-object-window.c
index 47f43eddb..773634e3a 100644
--- a/src/nautilus-object-window.c
+++ b/src/nautilus-object-window.c
@@ -729,6 +729,15 @@ nautilus_window_load_content_view_menu (NautilusWindow *window,
++index;
}
+
+ /* Add "View as ..." extra bonus choice, with separator before it. */
+ menu_item = gtk_menu_item_new ();
+ gtk_widget_show (menu_item);
+ gtk_menu_append (GTK_MENU (new_menu), menu_item);
+ menu_item = gtk_menu_item_new_with_label (_("View as ..."));
+ gtk_widget_show (menu_item);
+ gtk_widget_set_sensitive (menu_item, FALSE); /* doesn't do anything yet */
+ gtk_menu_append (GTK_MENU (new_menu), menu_item);
/*
* We create and attach a new menu here because adding/removing
diff --git a/src/nautilus-sidebar.c b/src/nautilus-sidebar.c
index ee26e461f..0adf24529 100644
--- a/src/nautilus-sidebar.c
+++ b/src/nautilus-sidebar.c
@@ -708,18 +708,16 @@ add_command_buttons(NautilusIndexPanel *index_panel, GList *command_list)
{
char *command_string, *temp_str;
GList *p;
- GtkWidget *temp_button, *temp_label;
+ GtkWidget *temp_button;
NautilusCommandInfo *info;
for (p = command_list; p != NULL; p = p->next) {
info = p->data;
index_panel->details->has_buttons = TRUE;
-
- temp_button = gtk_button_new ();
- temp_label = gtk_label_new (info->display_name);
- gtk_widget_show (temp_label);
- gtk_container_add (GTK_CONTAINER (temp_button), temp_label);
+
+ temp_str = g_strdup_printf (_("Open with %s"), info->display_name);
+ temp_button = gtk_button_new_with_label (temp_str);
gtk_box_pack_start (GTK_BOX (index_panel->details->button_box), temp_button, FALSE, TRUE, 2);
gtk_button_set_relief (GTK_BUTTON (temp_button), GTK_RELIEF_NORMAL);
gtk_widget_set_usize (GTK_WIDGET (temp_button), 80, 20);
@@ -730,9 +728,12 @@ add_command_buttons(NautilusIndexPanel *index_panel, GList *command_list)
command_string = g_strdup_printf (info->command_string, temp_str);
g_free(temp_str);
-
- gtk_signal_connect (GTK_OBJECT (temp_button), "clicked",
- GTK_SIGNAL_FUNC (command_button_cb), command_string);
+
+ nautilus_gtk_signal_connect_free_data
+ (GTK_OBJECT (temp_button),
+ "clicked",
+ GTK_SIGNAL_FUNC (command_button_cb),
+ command_string);
gtk_object_set_user_data (GTK_OBJECT (temp_button), index_panel);
gtk_widget_show (temp_button);
@@ -840,9 +841,7 @@ nautilus_index_panel_update_info (NautilusIndexPanel *index_panel,
nautilus_index_title_set_uri (index_panel->details->title,
index_panel->details->uri,
initial_title);
-
- /* add keywords if we got any */
-
+
/* set up the command buttons */
nautilus_index_panel_update_buttons (index_panel);
}
diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c
index 47f43eddb..773634e3a 100644
--- a/src/nautilus-spatial-window.c
+++ b/src/nautilus-spatial-window.c
@@ -729,6 +729,15 @@ nautilus_window_load_content_view_menu (NautilusWindow *window,
++index;
}
+
+ /* Add "View as ..." extra bonus choice, with separator before it. */
+ menu_item = gtk_menu_item_new ();
+ gtk_widget_show (menu_item);
+ gtk_menu_append (GTK_MENU (new_menu), menu_item);
+ menu_item = gtk_menu_item_new_with_label (_("View as ..."));
+ gtk_widget_show (menu_item);
+ gtk_widget_set_sensitive (menu_item, FALSE); /* doesn't do anything yet */
+ gtk_menu_append (GTK_MENU (new_menu), menu_item);
/*
* We create and attach a new menu here because adding/removing
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 47f43eddb..773634e3a 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -729,6 +729,15 @@ nautilus_window_load_content_view_menu (NautilusWindow *window,
++index;
}
+
+ /* Add "View as ..." extra bonus choice, with separator before it. */
+ menu_item = gtk_menu_item_new ();
+ gtk_widget_show (menu_item);
+ gtk_menu_append (GTK_MENU (new_menu), menu_item);
+ menu_item = gtk_menu_item_new_with_label (_("View as ..."));
+ gtk_widget_show (menu_item);
+ gtk_widget_set_sensitive (menu_item, FALSE); /* doesn't do anything yet */
+ gtk_menu_append (GTK_MENU (new_menu), menu_item);
/*
* We create and attach a new menu here because adding/removing
diff --git a/src/ntl-index-panel.c b/src/ntl-index-panel.c
index ee26e461f..0adf24529 100644
--- a/src/ntl-index-panel.c
+++ b/src/ntl-index-panel.c
@@ -708,18 +708,16 @@ add_command_buttons(NautilusIndexPanel *index_panel, GList *command_list)
{
char *command_string, *temp_str;
GList *p;
- GtkWidget *temp_button, *temp_label;
+ GtkWidget *temp_button;
NautilusCommandInfo *info;
for (p = command_list; p != NULL; p = p->next) {
info = p->data;
index_panel->details->has_buttons = TRUE;
-
- temp_button = gtk_button_new ();
- temp_label = gtk_label_new (info->display_name);
- gtk_widget_show (temp_label);
- gtk_container_add (GTK_CONTAINER (temp_button), temp_label);
+
+ temp_str = g_strdup_printf (_("Open with %s"), info->display_name);
+ temp_button = gtk_button_new_with_label (temp_str);
gtk_box_pack_start (GTK_BOX (index_panel->details->button_box), temp_button, FALSE, TRUE, 2);
gtk_button_set_relief (GTK_BUTTON (temp_button), GTK_RELIEF_NORMAL);
gtk_widget_set_usize (GTK_WIDGET (temp_button), 80, 20);
@@ -730,9 +728,12 @@ add_command_buttons(NautilusIndexPanel *index_panel, GList *command_list)
command_string = g_strdup_printf (info->command_string, temp_str);
g_free(temp_str);
-
- gtk_signal_connect (GTK_OBJECT (temp_button), "clicked",
- GTK_SIGNAL_FUNC (command_button_cb), command_string);
+
+ nautilus_gtk_signal_connect_free_data
+ (GTK_OBJECT (temp_button),
+ "clicked",
+ GTK_SIGNAL_FUNC (command_button_cb),
+ command_string);
gtk_object_set_user_data (GTK_OBJECT (temp_button), index_panel);
gtk_widget_show (temp_button);
@@ -840,9 +841,7 @@ nautilus_index_panel_update_info (NautilusIndexPanel *index_panel,
nautilus_index_title_set_uri (index_panel->details->title,
index_panel->details->uri,
initial_title);
-
- /* add keywords if we got any */
-
+
/* set up the command buttons */
nautilus_index_panel_update_buttons (index_panel);
}
diff --git a/src/ntl-window.c b/src/ntl-window.c
index 47f43eddb..773634e3a 100644
--- a/src/ntl-window.c
+++ b/src/ntl-window.c
@@ -729,6 +729,15 @@ nautilus_window_load_content_view_menu (NautilusWindow *window,
++index;
}
+
+ /* Add "View as ..." extra bonus choice, with separator before it. */
+ menu_item = gtk_menu_item_new ();
+ gtk_widget_show (menu_item);
+ gtk_menu_append (GTK_MENU (new_menu), menu_item);
+ menu_item = gtk_menu_item_new_with_label (_("View as ..."));
+ gtk_widget_show (menu_item);
+ gtk_widget_set_sensitive (menu_item, FALSE); /* doesn't do anything yet */
+ gtk_menu_append (GTK_MENU (new_menu), menu_item);
/*
* We create and attach a new menu here because adding/removing