anjuta r4668 - in trunk: . plugins/document-manager
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4668 - in trunk: . plugins/document-manager
- Date: Sun, 1 Feb 2009 15:49:32 +0000 (UTC)
Author: jhs
Date: Sun Feb 1 15:49:32 2009
New Revision: 4668
URL: http://svn.gnome.org/viewvc/anjuta?rev=4668&view=rev
Log:
2009-02-01 Johannes Schmid <jhs Obelix>
* plugins/document-manager/action-callbacks.c:
* plugins/document-manager/anjuta-document-manager.ui:
#563499 â Goto Matching Brace and other commands missing in GtkSourceView editor
* plugins/document-manager/plugin.c
(update_document_ui_interface_items), (create_highlight_submenu):
#564272 â Highlight Mode menu should indicate current mode
Modified:
trunk/ChangeLog
trunk/plugins/document-manager/action-callbacks.c
trunk/plugins/document-manager/anjuta-document-manager.ui
trunk/plugins/document-manager/plugin.c
Modified: trunk/plugins/document-manager/action-callbacks.c
==============================================================================
--- trunk/plugins/document-manager/action-callbacks.c (original)
+++ trunk/plugins/document-manager/action-callbacks.c Sun Feb 1 15:49:32 2009
@@ -428,16 +428,6 @@
}
void
-on_editor_command_select_to_brace_activate (GtkAction *action, gpointer user_data)
-{
- IAnjutaDocument *doc;
-
- doc = get_current_document (user_data);
- if (doc)
- ianjuta_editor_selection_select_to_brace (IANJUTA_EDITOR_SELECTION (doc), NULL);
-}
-
-void
on_editor_command_select_block_activate (GtkAction *action, gpointer user_data)
{
IAnjutaDocument *doc;
Modified: trunk/plugins/document-manager/anjuta-document-manager.ui
==============================================================================
--- trunk/plugins/document-manager/anjuta-document-manager.ui (original)
+++ trunk/plugins/document-manager/anjuta-document-manager.ui Sun Feb 1 15:49:32 2009
@@ -54,7 +54,6 @@
<placeholder name="PlaceholderSelectMenus">
<menu name="Select" action="ActionMenuEditSelect">
<menuitem name="SelectAll" action="ActionEditSelectAll" />
- <menuitem name="SelectBrace" action="ActionEditSelectToBrace" />
<menuitem name="SelectBlock" action="ActionEditSelectBlock" />
</menu>
</placeholder>
Modified: trunk/plugins/document-manager/plugin.c
==============================================================================
--- trunk/plugins/document-manager/plugin.c (original)
+++ trunk/plugins/document-manager/plugin.c Sun Feb 1 15:49:32 2009
@@ -201,22 +201,14 @@
};
static GtkActionEntry actions_select[] = {
- { "ActionMenuEditSelect", NULL, N_("_Select"), NULL, NULL, NULL}, /* menu title */
- { "ActionEditSelectAll",
-#ifdef GTK_STOCK_SELECT_ALL
- GTK_STOCK_SELECT_ALL
-#else
- NULL
-#endif
- , N_("Select _All"), "<control>a",
- N_("Select all text in the editor"),
- G_CALLBACK (on_editor_command_select_all_activate)},
- { "ActionEditSelectToBrace", NULL, N_("Select to _Brace"), NULL,
- N_("Select the text in the matching braces"),
- G_CALLBACK (on_editor_command_select_to_brace_activate)},
- { "ActionEditSelectBlock", ANJUTA_STOCK_BLOCK_SELECT, N_("Select _Code Block"),
- "<shift><control>b", N_("Select the current code block"),
- G_CALLBACK (on_editor_command_select_block_activate)},
+ { "ActionMenuEditSelect", NULL, N_("_Select"), NULL, NULL, NULL}, /* menu title */
+ { "ActionEditSelectAll",
+ GTK_STOCK_SELECT_ALL, N_("Select _All"), "<control>a",
+ N_("Select all text in the editor"),
+ G_CALLBACK (on_editor_command_select_all_activate)},
+ { "ActionEditSelectBlock", ANJUTA_STOCK_BLOCK_SELECT, N_("Select _Code Block"),
+ "<shift><control>b", N_("Select the current code block"),
+ G_CALLBACK (on_editor_command_select_block_activate)}
};
static GtkActionEntry actions_comment[] = {
@@ -735,10 +727,6 @@
g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL);
action = anjuta_ui_get_action (ui, "ActionGroupEditorSelect",
- "ActionEditSelectToBrace");
- g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL);
-
- action = anjuta_ui_get_action (ui, "ActionGroupEditorSelect",
"ActionEditSelectBlock");
g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL);
@@ -1024,8 +1012,7 @@
const GList *languages, *node;
GList *sorted_languages;
GtkWidget *submenu;
- GtkWidget *menuitem;
-
+ GtkWidget *auto_menuitem;
submenu = gtk_menu_new ();
if (!editor || !IANJUTA_IS_EDITOR_LANGUAGE (editor))
@@ -1036,12 +1023,13 @@
return NULL;
/* Automatic highlight menu */
- menuitem = gtk_menu_item_new_with_mnemonic (_("Automatic"));
- g_signal_connect (G_OBJECT (menuitem), "activate",
+ auto_menuitem = gtk_radio_menu_item_new_with_mnemonic (NULL, _("Automatic"));
+ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(auto_menuitem), TRUE);
+ g_signal_connect (G_OBJECT (auto_menuitem), "activate",
G_CALLBACK (on_force_hilite_activate),
plugin);
- g_object_set_data(G_OBJECT(menuitem), "language_code", "auto-detect");
- gtk_menu_shell_append (GTK_MENU_SHELL (submenu), menuitem);
+ g_object_set_data(G_OBJECT(auto_menuitem), "language_code", "auto-detect");
+ gtk_menu_shell_append (GTK_MENU_SHELL (submenu), auto_menuitem);
gtk_menu_shell_append (GTK_MENU_SHELL (submenu), gtk_separator_menu_item_new());
/* Sort languages so they appear alphabetically in the menu. */
@@ -1058,7 +1046,8 @@
/* Should fix #493583 */
if (name != NULL)
{
- menuitem = gtk_menu_item_new_with_mnemonic (name);
+ GtkWidget *menuitem;
+ menuitem = gtk_radio_menu_item_new_with_mnemonic_from_widget (GTK_RADIO_MENU_ITEM(auto_menuitem), name);
g_object_set_data_full (G_OBJECT (menuitem), "language_code",
g_strdup (lang),
(GDestroyNotify)g_free);
@@ -1066,6 +1055,7 @@
G_CALLBACK (on_force_hilite_activate),
plugin);
gtk_menu_shell_append (GTK_MENU_SHELL (submenu), menuitem);
+ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(menuitem), FALSE);
}
node = g_list_next (node);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]