Kaydet (Commit) 204b62d0 authored tarafından Enrico Tröger's avatar Enrico Tröger

Add 'Build' toolbar button with a submenu for Make actions.

Make use of ui_image_menu_item_new() for some menu items.
Remove tooltips from menu items.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3479 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 525678b4
...@@ -16,6 +16,11 @@ ...@@ -16,6 +16,11 @@
Properly fix parsing of compiler error messages. Properly fix parsing of compiler error messages.
* data/filetypes.nsis: * data/filetypes.nsis:
Update keywords lists. Update keywords lists.
* doc/geany.txt, src/build.c, src/build.h, src/images.c, src/toolbar.c,
src/ui_utils.c, src/ui_utils.h:
Add 'Build' toolbar button with a submenu for Make actions.
Make use of ui_image_menu_item_new() for some menu items.
Remove tooltips from menu items.
2009-01-16 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> 2009-01-16 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
......
...@@ -13,7 +13,6 @@ Note: features included in brackets have lower priority. ...@@ -13,7 +13,6 @@ Note: features included in brackets have lower priority.
o configurable filetype and project make commands (e.g. using o configurable filetype and project make commands (e.g. using
bud for D) bud for D)
o recent projects menu o recent projects menu
o improve Compile toolbar button for Make (drop down radio list?)
o MRU documents switching o MRU documents switching
o (support for adding plugin filetypes - SCI_LOADLEXERLIBRARY?) o (support for adding plugin filetypes - SCI_LOADLEXERLIBRARY?)
o (selectable menu of arguments to use for Make, from Make Custom) o (selectable menu of arguments to use for Make, from Make Custom)
......
...@@ -3391,6 +3391,9 @@ Redo Redo the last modification ...@@ -3391,6 +3391,9 @@ Redo Redo the last modification
NavBack Navigate back a location NavBack Navigate back a location
NavFor Navigate forward a location NavFor Navigate forward a location
Compile Compile the current file Compile Compile the current file
Build Build the current file, includes also a submenu for Make commands. Geany
remembers the last chosen action from the submenu and uses this as default
action when the button itself is clicked.
Run Run or view the current file Run Run or view the current file
Color Open a color chooser dialog, to interactively pick colors from a palette Color Open a color chooser dialog, to interactively pick colors from a palette
ZoomIn Zoom in the text ZoomIn Zoom in the text
......
This diff is collapsed.
...@@ -74,5 +74,8 @@ void build_menu_update(GeanyDocument *doc); ...@@ -74,5 +74,8 @@ void build_menu_update(GeanyDocument *doc);
BuildMenuItems *build_get_menu_items(gint filetype_idx); BuildMenuItems *build_get_menu_items(gint filetype_idx);
void build_toolbutton_build_clicked(GtkAction *action, gpointer user_data);
#endif #endif
This diff is collapsed.
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "utils.h" #include "utils.h"
#include "dialogs.h" #include "dialogs.h"
#include "document.h" #include "document.h"
#include "build.h"
#include "geanymenubuttonaction.h" #include "geanymenubuttonaction.h"
#include "geanyentryaction.h" #include "geanyentryaction.h"
...@@ -167,6 +168,7 @@ GtkWidget *toolbar_init(void) ...@@ -167,6 +168,7 @@ GtkWidget *toolbar_init(void)
GtkBox *box; GtkBox *box;
GtkAction *action_new; GtkAction *action_new;
GtkAction *action_open; GtkAction *action_open;
GtkAction *action_build;
GtkAction *action_searchentry; GtkAction *action_searchentry;
GtkAction *action_gotoentry; GtkAction *action_gotoentry;
GError *error = NULL; GError *error = NULL;
...@@ -188,6 +190,12 @@ GtkWidget *toolbar_init(void) ...@@ -188,6 +190,12 @@ GtkWidget *toolbar_init(void)
g_signal_connect(action_open, "button-clicked", G_CALLBACK(on_toolbutton_open_clicked), NULL); g_signal_connect(action_open, "button-clicked", G_CALLBACK(on_toolbutton_open_clicked), NULL);
gtk_action_group_add_action(group, action_open); gtk_action_group_add_action(group, action_open);
action_build = geany_menu_button_action_new(
"Build", NULL, _("Build the current file"), GEANY_STOCK_BUILD);
g_signal_connect(action_build, "button-clicked",
G_CALLBACK(build_toolbutton_build_clicked), NULL);
gtk_action_group_add_action(group, action_build);
action_searchentry = geany_entry_action_new( action_searchentry = geany_entry_action_new(
"SearchEntry", _("Search"), _("Find the entered text in the current file"), FALSE); "SearchEntry", _("Search"), _("Find the entered text in the current file"), FALSE);
g_signal_connect(action_searchentry, "entry-activate", g_signal_connect(action_searchentry, "entry-activate",
......
...@@ -821,6 +821,11 @@ GdkPixbuf *ui_new_pixbuf_from_inline(gint img) ...@@ -821,6 +821,11 @@ GdkPixbuf *ui_new_pixbuf_from_inline(gint img)
return gdk_pixbuf_new_from_inline(-1, close_all_inline, FALSE, NULL); return gdk_pixbuf_new_from_inline(-1, close_all_inline, FALSE, NULL);
break; break;
} }
case GEANY_IMAGE_BUILD:
{
return gdk_pixbuf_new_from_inline(-1, build_inline, FALSE, NULL);
break;
}
default: default:
return NULL; return NULL;
} }
...@@ -831,6 +836,8 @@ static GdkPixbuf *ui_new_pixbuf_from_stock(const gchar *stock_id) ...@@ -831,6 +836,8 @@ static GdkPixbuf *ui_new_pixbuf_from_stock(const gchar *stock_id)
{ {
if (utils_str_equal(stock_id, GEANY_STOCK_CLOSE_ALL)) if (utils_str_equal(stock_id, GEANY_STOCK_CLOSE_ALL))
return ui_new_pixbuf_from_inline(GEANY_IMAGE_CLOSE_ALL); return ui_new_pixbuf_from_inline(GEANY_IMAGE_CLOSE_ALL);
else if (utils_str_equal(stock_id, GEANY_STOCK_BUILD))
return ui_new_pixbuf_from_inline(GEANY_IMAGE_BUILD);
else if (utils_str_equal(stock_id, GEANY_STOCK_SAVE_ALL)) else if (utils_str_equal(stock_id, GEANY_STOCK_SAVE_ALL))
return ui_new_pixbuf_from_inline(GEANY_IMAGE_SAVE_ALL); return ui_new_pixbuf_from_inline(GEANY_IMAGE_SAVE_ALL);
...@@ -1593,7 +1600,8 @@ static void add_stock_items(void) ...@@ -1593,7 +1600,8 @@ static void add_stock_items(void)
GtkStockItem items[] = GtkStockItem items[] =
{ {
{ GEANY_STOCK_SAVE_ALL, _("Save All"), 0, 0, GETTEXT_PACKAGE }, { GEANY_STOCK_SAVE_ALL, _("Save All"), 0, 0, GETTEXT_PACKAGE },
{ GEANY_STOCK_CLOSE_ALL, _("Close All"), 0, 0, GETTEXT_PACKAGE } { GEANY_STOCK_CLOSE_ALL, _("Close All"), 0, 0, GETTEXT_PACKAGE },
{ GEANY_STOCK_BUILD, _("Build"), 0, 0, GETTEXT_PACKAGE }
}; };
len = G_N_ELEMENTS(items); len = G_N_ELEMENTS(items);
......
...@@ -140,11 +140,14 @@ GeanyUIEditorFeatures; ...@@ -140,11 +140,14 @@ GeanyUIEditorFeatures;
#define GEANY_STOCK_SAVE_ALL "geany-save-all" #define GEANY_STOCK_SAVE_ALL "geany-save-all"
#define GEANY_STOCK_CLOSE_ALL "geany-close-all" #define GEANY_STOCK_CLOSE_ALL "geany-close-all"
#define GEANY_STOCK_BUILD "geany-build"
enum enum
{ {
GEANY_IMAGE_LOGO, GEANY_IMAGE_LOGO,
GEANY_IMAGE_SAVE_ALL, GEANY_IMAGE_SAVE_ALL,
GEANY_IMAGE_CLOSE_ALL GEANY_IMAGE_CLOSE_ALL,
GEANY_IMAGE_BUILD
}; };
......
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