anjuta r4482 - in trunk: . plugins/build-basic-autotools plugins/debug-manager plugins/devhelp plugins/document-manager plugins/message-view plugins/run-program src
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4482 - in trunk: . plugins/build-basic-autotools plugins/debug-manager plugins/devhelp plugins/document-manager plugins/message-view plugins/run-program src
- Date: Thu, 25 Dec 2008 17:54:43 +0000 (UTC)
Author: jhs
Date: Thu Dec 25 17:54:43 2008
New Revision: 4482
URL: http://svn.gnome.org/viewvc/anjuta?rev=4482&view=rev
Log:
2008-12-25 Johannes <jhs gnome org>
* plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin
.ui:
* plugins/debug-manager/anjuta-debug-manager.ui:
* plugins/devhelp/anjuta-devhelp.ui:
* plugins/document-manager/anjuta-document-manager.ui:
* plugins/run-program/anjuta-run-program.ui:
* src/action-callbacks.c (on_toolbar_view_toggled):
* src/action-callbacks.h:
* src/anjuta-actions.h:
* src/anjuta-app.c (on_toolbar_style_changed), (on_session_save),
(anjuta_app_dispose), (anjuta_app_instance_init),
(on_widget_remove):
* src/anjuta-app.h:
* src/anjuta.ui:
Removed the use of bonobo for the toolbar, removed some elements and migrate
everything to a simple GtkToolbar with seperators. This fits even von 1024 screens
without problems.
* plugins/message-view/anjuta-message-manager.ui:
Removed the next/prev message toolbar items as they are not used enough to be
in the toolbar.
* plugins/debug-manager/plugin.c:
Use "Play" instead of "Execute" stock icons so we don't have
the same stock icon for "execute" and "run in debugger"
Modified:
trunk/ChangeLog
trunk/plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.ui
trunk/plugins/debug-manager/anjuta-debug-manager.ui
trunk/plugins/debug-manager/plugin.c
trunk/plugins/devhelp/anjuta-devhelp.ui
trunk/plugins/document-manager/anjuta-document-manager.ui
trunk/plugins/message-view/anjuta-message-manager.ui
trunk/plugins/run-program/anjuta-run-program.ui
trunk/src/action-callbacks.c
trunk/src/action-callbacks.h
trunk/src/anjuta-actions.h
trunk/src/anjuta-app.c
trunk/src/anjuta-app.h
trunk/src/anjuta.ui
Modified: trunk/plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.ui
==============================================================================
--- trunk/plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.ui (original)
+++ trunk/plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.ui Thu Dec 25 17:54:43 2008
@@ -21,7 +21,7 @@
</menu>
</placeholder>
</menubar>
- <toolbar name="ToolbarBuild">
+ <toolbar name="ToolbarMain">
<placeholder name="PlaceHolderBuild">
<toolitem name="BuildProject" action="ActionBuildBuildProject"/>
<toolitem name="BuildModule" action="ActionBuildBuildModule"/>
Modified: trunk/plugins/debug-manager/anjuta-debug-manager.ui
==============================================================================
--- trunk/plugins/debug-manager/anjuta-debug-manager.ui (original)
+++ trunk/plugins/debug-manager/anjuta-debug-manager.ui Thu Dec 25 17:54:43 2008
@@ -50,7 +50,7 @@
</menu>
</placeholder>
</menubar>
- <toolbar name="ToolbarDebug">
+ <toolbar name="ToolbarMain">
<placeholder name="PlaceholderDebugToolbar" >
<toolitem name="Run" action="ActionDebuggerRunContinue" />
<toolitem name="RunToPosition" action="ActionDebuggerRunToPosition" />
Modified: trunk/plugins/debug-manager/plugin.c
==============================================================================
--- trunk/plugins/debug-manager/plugin.c (original)
+++ trunk/plugins/debug-manager/plugin.c Thu Dec 25 17:54:43 2008
@@ -953,7 +953,7 @@
{
{
"ActionDebuggerRunContinue", /* Action name */
- GTK_STOCK_EXECUTE, /* Stock icon, if any */
+ GTK_STOCK_MEDIA_PLAY, /* Stock icon, if any */
N_("Run/_Continue"), /* Display label */
"F4", /* short-cut */
N_("Continue the execution of the program"), /* Tooltip */
Modified: trunk/plugins/devhelp/anjuta-devhelp.ui
==============================================================================
--- trunk/plugins/devhelp/anjuta-devhelp.ui (original)
+++ trunk/plugins/devhelp/anjuta-devhelp.ui Thu Dec 25 17:54:43 2008
@@ -12,9 +12,4 @@
</menu>
</placeholder>
</menubar>
- <toolbar name="ToolbarMain">
- </toolbar>
- <toolbar name="ToolbarBrowser">
- <toolitem name="Context" action="ActionHelpContext" />
- </toolbar>
</ui>
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 Thu Dec 25 17:54:43 2008
@@ -115,9 +115,10 @@
<toolbar name="ToolbarMain">
<placeholder name="PlaceholderFileToolbar">
<toolitem name="Save" action="ActionFileSave" />
- <separator name="separator16"/>
+ <separator />
<toolitem name="Undo" action="ActionEditUndo" />
<toolitem name="Redo" action="ActionEditRedo" />
+ <separator />
</placeholder>
</toolbar>
<popup name="PopupDocumentManager">
Modified: trunk/plugins/message-view/anjuta-message-manager.ui
==============================================================================
--- trunk/plugins/message-view/anjuta-message-manager.ui (original)
+++ trunk/plugins/message-view/anjuta-message-manager.ui Thu Dec 25 17:54:43 2008
@@ -10,14 +10,6 @@
</menu>
</menu>
</menubar>
- <toolbar name="ToolbarBrowser">
- <placeholder name="PlaceholderBrowserToolbar" >
- <separator name="separator1" />
- <toolitem name="PreviousMessage" action="ActionMessagePrev"/>
- <toolitem name="NextMessage" action="ActionMessageNext"/>
- <separator name="separator2" />
- </placeholder>
- </toolbar>
<popup name="PopupDocumentManager">
<menu name="Goto" action="ActionMenuGoto">
<menuitem name="PrevMessage" action="ActionMessagePrev" />
Modified: trunk/plugins/run-program/anjuta-run-program.ui
==============================================================================
--- trunk/plugins/run-program/anjuta-run-program.ui (original)
+++ trunk/plugins/run-program/anjuta-run-program.ui Thu Dec 25 17:54:43 2008
@@ -15,7 +15,7 @@
</menu>
</placeholder>
</menubar>
- <toolbar name="ToolbarBuild">
+ <toolbar name="ToolbarMain">
<placeholder name="PlaceHolderExecute">
<toolitem name="RunProgram" action="ActionRunProgram"/>
</placeholder>
Modified: trunk/src/action-callbacks.c
==============================================================================
--- trunk/src/action-callbacks.c (original)
+++ trunk/src/action-callbacks.c Thu Dec 25 17:54:43 2008
@@ -75,6 +75,23 @@
}
void
+on_toolbar_view_toggled (GtkAction *action, AnjutaApp *app)
+{
+ gboolean status = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action));
+ if (status)
+ {
+ gtk_widget_show (app->toolbar);
+ }
+ else
+ {
+ gtk_widget_hide (app->toolbar);
+ }
+ anjuta_preferences_set_int (app->preferences,
+ "anjuta.toolbar.visible",
+ status);
+}
+
+void
on_set_preferences1_activate (GtkAction * action, AnjutaApp *app)
{
Modified: trunk/src/action-callbacks.h
==============================================================================
--- trunk/src/action-callbacks.h (original)
+++ trunk/src/action-callbacks.h Thu Dec 25 17:54:43 2008
@@ -26,7 +26,7 @@
void on_fullscreen_toggle (GtkAction *action, AnjutaApp *app);
void on_layout_lock_toggle (GtkAction *action, AnjutaApp *app);
void on_reset_layout_activate (GtkAction *action, AnjutaApp *app);
-
+void on_toolbar_view_toggled (GtkAction *action, AnjutaApp *app);
void on_set_preferences1_activate (GtkAction * action, AnjutaApp *app);
/* Help actions */
Modified: trunk/src/anjuta-actions.h
==============================================================================
--- trunk/src/anjuta-actions.h (original)
+++ trunk/src/anjuta-actions.h Thu Dec 25 17:54:43 2008
@@ -39,8 +39,7 @@
{ "ActionViewResetLayout", NULL,
N_("_Reset Dock Layout"), NULL,
N_("Reset the widgets docking layout to default"),
- G_CALLBACK (on_reset_layout_activate)},
- { "ActionViewToolbars", NULL, N_("_Toolbars")}
+ G_CALLBACK (on_reset_layout_activate)}
};
static GtkToggleActionEntry menu_entries_toggle_view[] = {
@@ -51,7 +50,11 @@
{ "ActionViewLockLayout", NULL,
N_("_Lock Dock Layout"), NULL,
N_("Lock the current dock layout so that widgets cannot be moved"),
- G_CALLBACK (on_layout_lock_toggle)}
+ G_CALLBACK (on_layout_lock_toggle)},
+ { "ActionViewToolbar", NULL,
+ N_("_Toolbar"), NULL,
+ N_("Show or hide the toolbar"),
+ G_CALLBACK (on_toolbar_view_toggled)}
};
static GtkActionEntry menu_entries_help[] = {
Modified: trunk/src/anjuta-app.c
==============================================================================
--- trunk/src/anjuta-app.c (original)
+++ trunk/src/anjuta-app.c Thu Dec 25 17:54:43 2008
@@ -34,8 +34,6 @@
#include <gdl/gdl-dock-bar.h>
#include <gdl/gdl-switcher.h>
-#include <bonobo/bonobo-dock-item.h>
-
#include <libanjuta/anjuta-shell.h>
#include <libanjuta/anjuta-ui.h>
#include <libanjuta/anjuta-utils.h>
@@ -59,7 +57,6 @@
const gchar *name);
static gpointer parent_class = NULL;
-static GList* toolbars = NULL;
static GtkToolbarStyle style = -1;
static void
@@ -67,7 +64,6 @@
gpointer user_data)
{
AnjutaApp* app = ANJUTA_APP (user_data);
- GList *node = toolbars;
char* tb_style = anjuta_preferences_get (app->preferences, "anjuta.toolbar.style");
@@ -91,19 +87,11 @@
if (style != -1)
{
- while (node)
- {
- gtk_toolbar_set_style (GTK_TOOLBAR (node->data), style);
- node = node->next;
- }
+ gtk_toolbar_set_style (GTK_TOOLBAR (app->toolbar), style);
}
else
{
- while (node)
- {
- gtk_toolbar_unset_style (GTK_TOOLBAR (node->data));
- node = node->next;
- }
+ gtk_toolbar_unset_style (GTK_TOOLBAR (app->toolbar));
}
}
@@ -204,235 +192,15 @@
}
static void
-anjuta_app_add_dock_item (AnjutaApp *app, BonoboDockItem *item,
- BonoboDockPlacement placement, gint band_num,
- gint band_position, gint offset)
-{
- if (app->bonobo_layout)
- bonobo_dock_layout_add_item (app->bonobo_layout,
- BONOBO_DOCK_ITEM (item),
- placement, band_num, band_position,
- offset);
- else
- bonobo_dock_add_item (BONOBO_DOCK(app->bonobo_dock),
- BONOBO_DOCK_ITEM( item),
- placement, band_num, band_position, offset, FALSE);
-
- g_signal_emit_by_name (app->bonobo_dock, "layout_changed", app);
-}
-
-
-static void
-on_toolbar_view_toggled (GtkCheckMenuItem *menuitem, GtkWidget *widget)
-{
- AnjutaApp *app;
- GtkWidget *dock_item;
- const gchar *name;
- gint band;
- gint position;
- gint offset;
-
-
- name = gtk_widget_get_name (widget);
- app = g_object_get_data (G_OBJECT(widget), "app");
- dock_item = g_object_get_data (G_OBJECT(widget), "dock_item");
- band = GPOINTER_TO_INT (g_object_get_data (G_OBJECT(widget), "band"));
- position = GPOINTER_TO_INT (g_object_get_data (G_OBJECT(widget), "position"));
- offset = GPOINTER_TO_INT (g_object_get_data (G_OBJECT(widget), "offset"));
-
-
- if (gtk_check_menu_item_get_active (menuitem))
- {
- if (!dock_item)
- {
- static gint count;
- gchar *unique_name = g_strdup_printf ("%s-%d", name, count);
-
- DEBUG_PRINT ("Adding dock item %s band %d, offset %d, position %d",
- unique_name, band, offset, position);
-
- dock_item = bonobo_dock_item_new (unique_name,
- BONOBO_DOCK_ITEM_BEH_NEVER_VERTICAL |
- BONOBO_DOCK_ITEM_BEH_NEVER_FLOATING);
-
- gtk_container_add (GTK_CONTAINER (dock_item), widget);
-
- /* Widget not yet added to the dock. Add it */
- anjuta_app_add_dock_item (app, BONOBO_DOCK_ITEM (dock_item),
- BONOBO_DOCK_TOP, band, position, offset);
-
- g_object_set_data_full (G_OBJECT(dock_item), "unique_name",
- unique_name, g_free);
- g_object_set_data (G_OBJECT(widget), "dock_item", dock_item);
- count++;
- }
- gtk_widget_show (dock_item);
- gtk_widget_show (GTK_BIN (dock_item)->child);
- }
- else if (dock_item)
- {
- gtk_widget_hide (dock_item);
- gtk_widget_hide (GTK_BIN (dock_item)->child);
- }
-}
-
-static void
-on_merge_widget_destroy (GtkWidget *merge_widget, GtkWidget *menuitem)
-{
- toolbars = g_list_remove (toolbars, merge_widget);
- DEBUG_PRINT ("%s", "Destroying menuitem for toolbar widget");
- gtk_widget_destroy (menuitem);
-}
-
-static void
-on_add_merge_widget (GtkUIManager *merge, GtkWidget *widget,
- GtkWidget *ui_container)
-{
- DEBUG_PRINT ("%s", "Adding UI item ...");
-
- if (GTK_IS_MENU_BAR (widget))
- {
- /* We don't need to manage GtkMenuBar widgets */
- return;
- }
- else
- {
- static gint count = 0;
- const gchar *toolbarname;
- gchar* visible_key;
- gchar* band_key;
- gchar* position_key;
- gchar* offset_key;
- AnjutaPreferences *pr;
- GtkWidget *menuitem;
- gint band;
- gint position;
- gint offset;
- pr = ANJUTA_PREFERENCES (ANJUTA_APP(ui_container)->preferences);
-
- /* Showing the arrows seem to break anything completly! */
- gtk_toolbar_set_show_arrow (GTK_TOOLBAR (widget), FALSE);
-
- /* Set the toolbar style */
- if (style != -1)
- gtk_toolbar_set_style(GTK_TOOLBAR (widget), style);
-
- gtk_widget_show (widget);
- g_object_set_data (G_OBJECT (widget), "app", ui_container);
-
- /* Load toolbar position */
- toolbarname = gtk_widget_get_name (widget);
- band_key = g_strconcat (toolbarname, ".band", NULL);
- position_key = g_strconcat (toolbarname, ".position", NULL);
- offset_key = g_strconcat (toolbarname, ".offset", NULL);
- band = anjuta_preferences_get_int_with_default(pr, band_key, -1);
- position = anjuta_preferences_get_int_with_default(pr, position_key, 0);
- offset = anjuta_preferences_get_int_with_default(pr, offset_key, 0);
- g_object_set_data(G_OBJECT(widget), "position", GINT_TO_POINTER(position));
- g_object_set_data(G_OBJECT(widget), "offset", GINT_TO_POINTER(offset));
- g_object_set_data (G_OBJECT (widget), "band",
- GINT_TO_POINTER(band));
-
- g_free(offset_key);
- g_free(position_key);
- g_free(band_key);
- DEBUG_PRINT ("Adding toolbar: %s", toolbarname);
-
- if (!ANJUTA_APP (ui_container)->toolbars_menu)
- {
- ANJUTA_APP (ui_container)->toolbars_menu = gtk_menu_new ();
- gtk_widget_show (GTK_WIDGET (ANJUTA_APP (ui_container)->toolbars_menu));
- }
-
- menuitem = gtk_check_menu_item_new_with_label (toolbarname);
- gtk_menu_append (GTK_MENU (ANJUTA_APP (ui_container)->toolbars_menu),
- menuitem);
- gtk_widget_show (GTK_WIDGET (menuitem));
- g_signal_connect (G_OBJECT (menuitem), "toggled",
- G_CALLBACK (on_toolbar_view_toggled), widget);
- g_object_set_data(G_OBJECT(widget), "menuitem", menuitem);
-
- /* When the toolbar is destroyed make sure corresponding menuitem is
- * also destroyed */
- g_signal_connect (widget, "destroy",
- G_CALLBACK (on_merge_widget_destroy),
- menuitem);
-
- toolbars = g_list_append(toolbars, widget);
-
- /* Show/hide toolbar */
- visible_key = g_strconcat (toolbarname, ".visible", NULL);
- if (anjuta_preferences_get_int_with_default (pr, visible_key,
- (count == 0)? 1:0))
- {
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menuitem),
- TRUE);
- }
- g_free (visible_key);
- count ++;
- }
-}
-
-static void
on_session_save (AnjutaShell *shell, AnjutaSessionPhase phase,
AnjutaSession *session, AnjutaApp *app)
{
gchar *geometry, *layout_file;
GdkWindowState state;
- GList* node = toolbars;
-
if (phase != ANJUTA_SESSION_PHASE_NORMAL)
return;
- /* Save toolbars */
- while (node)
- {
- GtkWidget* widget = node->data;
- GtkWidget* dock_item = g_object_get_data (G_OBJECT(widget), "dock_item");;
- const gchar* toolbarname = gtk_widget_get_name(widget);
- AnjutaPreferences* pr = ANJUTA_PREFERENCES (app->preferences);
-
- if (dock_item)
- {
- gboolean visible;
- gchar* key = g_strconcat (toolbarname, ".visible", NULL);
- gchar* band_key = g_strconcat (toolbarname, ".band", NULL);
- gchar* position_key = g_strconcat (toolbarname, ".position", NULL);
- gchar* offset_key = g_strconcat (toolbarname, ".offset", NULL);
-
- /* Save visibility */
- g_object_get(G_OBJECT(dock_item), "visible", &visible, NULL);
- anjuta_preferences_set_int(pr, key, visible);
- g_free(key);
-
- /* Save toolbar position */
- if (app->bonobo_dock != NULL)
- {
- guint band;
- guint position;
- guint offset;
- BonoboDockPlacement placement;
- gchar* unique_name = g_object_get_data(G_OBJECT(dock_item),
- "unique_name");
-
- BonoboDockItem* item = bonobo_dock_get_item_by_name(BONOBO_DOCK(app->bonobo_dock),
- unique_name, &placement,
- &band, &position, &offset);
- g_return_if_fail(item != NULL);
-
- anjuta_preferences_set_int(pr, band_key, band);
- anjuta_preferences_set_int(pr, position_key, position);
- anjuta_preferences_set_int(pr, offset_key, offset);
- }
-
- g_free (band_key);
- g_free (position_key);
- g_free (offset_key);
- }
- node = g_list_next(node);
- }
-
/* Save geometry */
state = gdk_window_get_state (GTK_WIDGET (app)->window);
if (state & GDK_WINDOW_STATE_MAXIMIZED) {
@@ -504,7 +272,6 @@
anjuta_app_dispose (GObject *widget)
{
AnjutaApp *app;
- GList *tmp_list;
g_return_if_fail (ANJUTA_IS_APP (widget));
@@ -538,18 +305,6 @@
app->values = NULL;
}
- /* We need to destroy to the toolbars now so that the
- * on_merge_widget_destroy() does not produce a error trying to destory
- * already destroyed menuitems which happen when the window is being
- * destroyed
- *
- * Make a tmp list because the handler removes items from 'toolbars' list.
- * FIXME: Why is 'toolbars' a global static variable?
- */
- tmp_list = g_list_copy (toolbars);
- g_list_foreach (tmp_list, (GFunc)gtk_widget_destroy, NULL);
- g_list_free (tmp_list);
-
if (app->layout_manager) {
g_object_unref (app->layout_manager);
app->layout_manager = NULL;
@@ -589,7 +344,7 @@
anjuta_app_instance_init (AnjutaApp *app)
{
gint merge_id;
- GtkWidget *menubar, *toolbar_menu, *about_menu;
+ GtkWidget *menubar, *about_menu;
GtkWidget *view_menu, *hbox;
GtkWidget *main_box;
GtkWidget *dockbar;
@@ -611,8 +366,6 @@
main_box = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (app), main_box);
gtk_widget_show (main_box);
-
- app->layout_manager = NULL;
app->values = NULL;
app->widgets = NULL;
@@ -645,10 +398,6 @@
/* UI engine */
app->ui = anjuta_ui_new ();
-
- g_signal_connect (G_OBJECT (app->ui),
- "add_widget", G_CALLBACK (on_add_merge_widget),
- app);
g_object_add_weak_pointer (G_OBJECT (app->ui), (gpointer)&app->ui);
/* Plugin Manager */
@@ -669,11 +418,6 @@
on_gdl_style_changed (NULL, 0, NULL, app);
- anjuta_preferences_notify_add (app->preferences, "anjuta.toolbar.style",
- on_toolbar_style_changed, app, NULL);
-
- on_toolbar_style_changed (NULL, 0, NULL, app);
-
/* Register actions */
anjuta_ui_add_action_group_entries (app->ui, "ActionGroupFile", _("File"),
menu_entries_file,
@@ -697,17 +441,6 @@
G_N_ELEMENTS (menu_entries_help),
GETTEXT_PACKAGE, TRUE, app);
- /* Bonobo stuff */
- app->bonobo_dock = bonobo_dock_new ();
- gtk_widget_show (app->bonobo_dock);
-
- app->bonobo_layout = bonobo_dock_layout_new ();
- bonobo_dock_add_from_layout (BONOBO_DOCK (app->bonobo_dock),
- app->bonobo_layout);
-
- g_object_unref (app->bonobo_layout);
- app->bonobo_layout = NULL;
-
/* Merge UI */
merge_id = anjuta_ui_merge (app->ui, UI_FILE);
@@ -721,22 +454,19 @@
gtk_box_pack_start (GTK_BOX (main_box), menubar, FALSE, FALSE, 0);
gtk_widget_show (menubar);
- /*
- * We have to add the dock after merging the ui
- */
- gtk_box_pack_start (GTK_BOX (main_box), app->bonobo_dock,
- TRUE, TRUE, 0);
- bonobo_dock_set_client_area (BONOBO_DOCK (app->bonobo_dock), hbox);
-
- /* create toolbar menus */
- toolbar_menu =
- gtk_ui_manager_get_widget (GTK_UI_MANAGER(app->ui),
- "/MenuMain/MenuView/Toolbars");
- if (toolbar_menu)
- gtk_menu_item_set_submenu (GTK_MENU_ITEM (toolbar_menu),
- app->toolbars_menu);
- else
- g_warning ("Cannot retrive main menu widget");
+ /* create toolbar */
+ app->toolbar = gtk_ui_manager_get_widget (GTK_UI_MANAGER (app->ui),
+ "/ToolbarMain");
+ gtk_box_pack_start (GTK_BOX (main_box), app->toolbar, FALSE, FALSE, 0);
+ action = gtk_ui_manager_get_action (GTK_UI_MANAGER (app->ui),
+ "/MenuMain/MenuView/Toolbar");
+ gtk_toggle_action_set_active (GTK_TOGGLE_ACTION(action),
+ anjuta_preferences_get_int_with_default (app->preferences,
+ "anjuta.toolbar.visible",
+ TRUE));
+ anjuta_preferences_notify_add (app->preferences, "anjuta.toolbar.style",
+ on_toolbar_style_changed, app, NULL);
+ on_toolbar_style_changed (NULL, 0, NULL, app);
/* Create widgets menu */
view_menu =
@@ -756,7 +486,10 @@
"/MenuMain/PlaceHolderHelpMenus/MenuHelp/"
"PlaceHolderHelpAbout/AboutPlugins");
about_create_plugins_submenu (ANJUTA_SHELL (app), about_menu);
-
+
+ /* Add main view */
+ gtk_box_pack_start (GTK_BOX (main_box), hbox, TRUE, TRUE, 0);
+
/* Connect to session */
g_signal_connect (G_OBJECT (app), "save_session",
G_CALLBACK (on_session_save), app);
@@ -1055,20 +788,6 @@
on_widget_remove (GtkWidget *container, GtkWidget *widget, AnjutaApp *app)
{
GtkWidget *dock_item;
- GList* node = toolbars;
- while (node)
- {
- if (node->data == widget)
- {
- g_message("Removing toolbar");
- GtkWidget* menuitem = GTK_WIDGET(g_object_get_data(G_OBJECT(widget), "menuitem"));
- gtk_widget_hide(menuitem);
- gtk_widget_destroy(menuitem);
- toolbars = g_list_delete_link(toolbars, node);
- break;
- }
- node = g_list_next(node);
- }
dock_item = g_object_get_data (G_OBJECT (widget), "dockitem");
if (dock_item)
Modified: trunk/src/anjuta-app.h
==============================================================================
--- trunk/src/anjuta-app.h (original)
+++ trunk/src/anjuta-app.h Thu Dec 25 17:54:43 2008
@@ -43,7 +43,7 @@
struct _AnjutaApp
{
GtkWindow parent;
- GtkWidget *toolbars_menu;
+ GtkWidget *toolbar;
GtkWidget *view_menu;
GtkWidget *dock;
GdlDockLayout *layout_manager;
@@ -58,10 +58,6 @@
AnjutaPreferences *preferences;
AnjutaPluginManager *plugin_manager;
AnjutaProfileManager *profile_manager;
-
- /* Bonobo */
- GtkWidget *bonobo_dock;
- BonoboDockLayout *bonobo_layout;
};
struct _AnjutaAppClass
Modified: trunk/src/anjuta.ui
==============================================================================
--- trunk/src/anjuta.ui (original)
+++ trunk/src/anjuta.ui Thu Dec 25 17:54:43 2008
@@ -23,7 +23,7 @@
<menuitem name="LockLayout" action="ActionViewLockLayout"/>
<menuitem name="ResetLayout" action="ActionViewResetLayout"/>
<separator name="separate1"/>
- <menuitem name="Toolbars" action="ActionViewToolbars"/>
+ <menuitem name="Toolbar" action="ActionViewToolbar"/>
</menu>
<placeholder name="PlaceholderGotoMenus"/>
<placeholder name="PlaceHolderProjectMenus"/>
@@ -59,11 +59,14 @@
</placeholder>
<placeholder name="TestPlaceholder" />
</menubar>
- <toolbar name="ToolbarMain"/>
- <toolbar name="ToolbarBrowser"/>
- <toolbar name="ToolbarBookmark"/>
- <toolbar name="ToolbarBuild">
- <placeholder name="PlaceHolderBuild"/>
- <placeholder name="PlaceHolderExecute"/>
+ <toolbar name="ToolbarMain">
+ <placeholder name="PlaceholderFileToolbar" />
+ <separator />
+ <placeholder name="PlaceHolderBuild" />
+ <separator />
+ <placeholder name="PlaceHolderExecute" />
+ <separator />
+ <placeholder name="PlaceholderDebugToolbar" />
+ <separator />
</toolbar>
</ui>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]