Preventing regular "Text" tool from acting just like the "Label" tool!

This commit is contained in:
William Kendrick 2009-10-10 06:33:38 +00:00
parent 85e99f5a6d
commit 444cf7b37a
2 changed files with 6 additions and 13 deletions

View file

@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
June 14, 2002 - July 17, 2007 June 14, 2002 - October 9, 2009
$Id$ $Id$
*/ */
@ -42,7 +42,6 @@ enum
TITLE_STAMPS, TITLE_STAMPS,
TITLE_SHAPES, TITLE_SHAPES,
TITLE_LETTERS, TITLE_LETTERS,
TITLE_LABEL,
TITLE_MAGIC, TITLE_MAGIC,
NUM_TITLES NUM_TITLES
}; };
@ -71,12 +70,9 @@ const char *const title_names[NUM_TITLES] = {
// Title of shape selector (buttons down the right for shapes tool) // Title of shape selector (buttons down the right for shapes tool)
gettext_noop("Shapes"), gettext_noop("Shapes"),
// Title of font selector (buttons down the right for text tool) // Title of font selector (buttons down the right for text and label tools)
gettext_noop("Letters"), gettext_noop("Letters"),
// Title of font selector (buttons down the right for label tool)
gettext_noop("Label"),
// Title of magic tool selector (buttons down the right for magic (effect plugin) tool) // Title of magic tool selector (buttons down the right for magic (effect plugin) tool)
gettext_noop("Magic") gettext_noop("Magic")
}; };

View file

@ -9245,10 +9245,7 @@ static void draw_fonts(void)
SDL_Color black = { 0, 0, 0, 0 }; SDL_Color black = { 0, 0, 0, 0 };
/* Draw the title: */ /* Draw the title: */
if (cur_tool == TOOL_TEXT) draw_image_title(TITLE_LETTERS, r_ttoolopt);
draw_image_title(TITLE_LETTERS, r_ttoolopt);
else
draw_image_title(TITLE_LABEL, r_ttoolopt);
/* How many can we show? */ /* How many can we show? */
@ -10916,6 +10913,7 @@ static void reset_avail_tools(void)
#ifdef NOKIA_770 #ifdef NOKIA_770
/* There is no way for the user to enter text, so just disable this. */ /* There is no way for the user to enter text, so just disable this. */
/* FIXME: Some Maemo devices have built-in keyboards now, don't they!? -bjk 2009.10.09 */
tool_avail[TOOL_TEXT] = 0; tool_avail[TOOL_TEXT] = 0;
tool_avail[TOOL_LABEL] = 0; tool_avail[TOOL_LABEL] = 0;
#endif #endif
@ -16539,7 +16537,6 @@ static void do_render_cur_text(int do_blit)
} }
} }
tmp_label = SDL_CreateRGBSurface(tmp_surf->flags, tmp_label = SDL_CreateRGBSurface(tmp_surf->flags,
// tmp_label = SDL_CreateRGBSurface(0,
tmp_surf->w, tmp_surf->h, tmp_surf->w, tmp_surf->h,
tmp_surf->format->BitsPerPixel, tmp_surf->format->BitsPerPixel,
tmp_surf->format->Rmask, tmp_surf->format->Gmask, tmp_surf->format->Bmask, 0); tmp_surf->format->Rmask, tmp_surf->format->Gmask, tmp_surf->format->Bmask, 0);
@ -16632,7 +16629,7 @@ static void do_render_cur_text(int do_blit)
if (do_blit) if (do_blit)
{ {
if(cur_select == SELECT_ON) if(cur_tool == TOOL_LABEL && cur_select == SELECT_ON)
{ {
have_to_rec_label_node=TRUE; have_to_rec_label_node=TRUE;
add_label_node(src.w, src.h, dest.x, dest.y, &label_node_to_edit, tmp_surf); add_label_node(src.w, src.h, dest.x, dest.y, &label_node_to_edit, tmp_surf);
@ -16642,7 +16639,7 @@ static void do_render_cur_text(int do_blit)
do_setcursor(cursor_arrow); do_setcursor(cursor_arrow);
} }
else if(cur_label == LABEL_LABEL) else if(cur_tool == TOOL_LABEL && cur_label == LABEL_LABEL)
{ {
myblit(tmp_surf, &src, label, &dest); myblit(tmp_surf, &src, label, &dest);