Commit ce9ff844 authored by Carl-Anton Ingmarsson's avatar Carl-Anton Ingmarsson Committed by Johannes Schmid

reviewed by: Johannes Schmid <jhs@gnome.org>

2009-02-16  Carl-Anton Ingmarsson  <ca.ingmarsson@gmail.com>

	reviewed by: Johannes Schmid <jhs@gnome.org>

	* plugins/file-loader/plugin.c (on_new_clicked), (on_open_clicked),
	(activate_plugin):
	#570820 – problem with gtk+ trunk

svn path=/trunk/; revision=4757
parent def2f8dd
2009-02-16 Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com>
reviewed by: Johannes Schmid <jhs@gnome.org>
* plugins/file-loader/plugin.c (on_new_clicked), (on_open_clicked),
(activate_plugin):
#570820 – problem with gtk+ trunk
2009-02-16 Johannes Schmid <jhs@gnome.org>
* plugins/search/search-replace.c (on_message_clicked):
......@@ -574,6 +574,28 @@ create_file_open_dialog_gui(GtkWindow* parent, AnjutaFileLoaderPlugin* plugin)
return dialog;
}
static void
on_new_clicked (GtkToolButton *button, AnjutaFileLoaderPlugin *plugin)
{
AnjutaShell* shell = ANJUTA_PLUGIN (plugin)->shell;
IAnjutaDocumentManager *docman = anjuta_shell_get_interface (shell,
IAnjutaDocumentManager,
NULL);
if (docman)
ianjuta_document_manager_add_buffer (docman, NULL, NULL, NULL);
}
static void
on_open_clicked (GtkToolButton *button, AnjutaFileLoaderPlugin *plugin)
{
GtkWidget *dlg;
dlg =
create_file_open_dialog_gui (GTK_WINDOW (ANJUTA_PLUGIN(plugin)->shell),
plugin);
gtk_widget_show (dlg);
}
static void
on_new_activate (GtkAction *action, AnjutaFileLoaderPlugin *plugin)
{
......@@ -1192,7 +1214,6 @@ activate_plugin (AnjutaPlugin *plugin)
saction = gtk_recent_action_new ("ActionFileWizard", _("New"),
_("New file, project and project components."), NULL);
g_object_set (saction, "stock-id", GTK_STOCK_NEW, NULL);
g_signal_connect (saction, "activate", G_CALLBACK (on_new_activate), loader_plugin);
gtk_action_group_add_action (loader_plugin->action_group,
GTK_ACTION (saction));
......@@ -1206,7 +1227,6 @@ activate_plugin (AnjutaPlugin *plugin)
_("Open recent file"), NULL);
g_object_set (action, "stock-id", GTK_STOCK_OPEN, NULL);
setup_recent_chooser_menu (GTK_RECENT_CHOOSER (action), loader_plugin);
g_signal_connect (action, "activate", G_CALLBACK (on_open_activate), loader_plugin);
gtk_action_group_add_action (group, action);
anjuta_ui_add_action_group (ui, "ActionGroupLoaderRecent",
......@@ -1231,6 +1251,7 @@ activate_plugin (AnjutaPlugin *plugin)
widget = gtk_ui_manager_get_widget (GTK_UI_MANAGER(ui),
"/ToolbarMain/PlaceholderFileToolbar/New");
gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (widget), on_create_submenu(loader_plugin));
g_signal_connect (widget, "clicked", G_CALLBACK (on_new_clicked), loader_plugin);
widget = gtk_ui_manager_get_widget (GTK_UI_MANAGER(ui),
"/ToolbarMain/PlaceholderFileToolbar/Open");
......@@ -1241,6 +1262,7 @@ activate_plugin (AnjutaPlugin *plugin)
gtk_tool_button_set_label (GTK_TOOL_BUTTON (widget), _("Open"));
gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (widget), _("Open a file"));
gtk_menu_tool_button_set_arrow_tooltip_text (GTK_MENU_TOOL_BUTTON (widget), _("Open recent file"));
g_signal_connect (widget, "clicked", G_CALLBACK (on_open_clicked), loader_plugin);
/* Install drag n drop handler */
dnd_drop_init (GTK_WIDGET (plugin->shell), dnd_dropped, plugin,
......
......@@ -171,7 +171,6 @@ get_vcs_emblem (AnjutaVcsStatus status)
default:
emblem = NULL;
}
DEBUG_PRINT ("emblem found: %d", emblem != NULL);
return emblem;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment