Commit 06daa1b7 authored by Yang Hong's avatar Yang Hong Committed by Johannes Schmid

Fix a crasher in gdk_pixbuf_composite.

2009-02-05  Yang Hong  <hongyang@redflag-linux.com>

	* plugins/file-manager/file-model.c
	(file_model_vcs_status_callback):
	Fix a crasher in gdk_pixbuf_composite.
	
	* plugins/file-manager/file-view.c (get_status_string):
	Return a NULL value instead of g_assert_not_reached.
	
	* plugins/terminal/terminal.c (terminal_set_preferences),
	(terminal_execute):
	Do not reset execute terminal, remain output for comparison,
	Set default scrollback lines for 500, or minimum is too small.
	
	* src/main.c (send_bacon_message):
	Fix cann't open relative URI in server side.

svn path=/trunk/; revision=4701
parent ea4ad6a5
2009-02-05 Yang Hong <hongyang@redflag-linux.com>
* plugins/file-manager/file-model.c
(file_model_vcs_status_callback):
Fix a crasher in gdk_pixbuf_composite.
* plugins/file-manager/file-view.c (get_status_string):
Return a NULL value instead of g_assert_not_reached.
* plugins/terminal/terminal.c (terminal_set_preferences),
(terminal_execute):
Do not reset execute terminal, remain output for comparison,
Set default scrollback lines for 500, or minimum is too small.
* src/main.c (send_bacon_message):
Fix cann't open relative URI in server side.
2009-02-05 Sébastien Granjoux <seb.sfo@free.fr>
* plugins/language-support-cpp-java/cpp-java-assist.c:
......@@ -36,6 +36,12 @@ EXTRA_DIST = \
intltool-update.in\
$(anjutadoc_DATA)
gnomerelease:
scp *.tar.bz2 master.gnome.org:
sfrelease:
scp *.tar.bz2 clubfan,anjuta@frs.sf.net:uploads
gnomemenudir = $(datadir)/applications
gnomemenu_premerge_file = anjuta.desktop.in
gnomemenu_DATA = $(gnomemenu_premerge_file:.desktop.in=.desktop)
......
......@@ -212,8 +212,11 @@ file_model_vcs_status_callback(GFile *file,
-1);
if (file_icon)
{
GdkPixbuf *new_icon;
new_icon = gdk_pixbuf_copy (file_icon);
gdk_pixbuf_composite (emblem,
file_icon,
new_icon,
0, 0,
gdk_pixbuf_get_width (file_icon),
gdk_pixbuf_get_height (file_icon),
......@@ -224,10 +227,10 @@ file_model_vcs_status_callback(GFile *file,
gtk_tree_store_set (GTK_TREE_STORE (model),
&iter,
COLUMN_PIXBUF,
file_icon,
new_icon,
-1);
DEBUG_PRINT ("%s", "setting emblem");
g_object_unref (new_icon);
g_object_unref (file_icon);
}
g_object_unref (emblem);
......
......@@ -79,9 +79,13 @@ get_status_string(AnjutaVcsStatus status)
return _("Unversioned");
case ANJUTA_VCS_STATUS_IGNORED:
return _("Ignored");
#if 0
default:
g_assert_not_reached();
#endif
}
return NULL;
}
enum
......
......@@ -43,7 +43,6 @@
#define COMBO_STYLES "combo_styles"
#define SOURCEVIEW_STYLE "sourceview.style"
#define SOURCEVIEW_DEFAULT_STYLE "classic"
#define FONT_USE_THEME_BUTTON "preferences_toggle:bool:1:0:sourceview.font.use_theme"
#define FONT_BUTTON "preferences_font:font:Monospace 12:0:sourceview.font"
......@@ -120,14 +119,11 @@ ieditor_factory_new_editor(IAnjutaEditorFactory* factory,
gchar* current_style = anjuta_preferences_get (prefs, SOURCEVIEW_STYLE);
GtkSourceStyleSchemeManager* manager = gtk_source_style_scheme_manager_get_default();
Sourceview* sv;
if (!current_style)
{
current_style = g_strdup (SOURCEVIEW_DEFAULT_STYLE);
}
sv = sourceview_new(file, filename, plugin);
gtk_source_buffer_set_style_scheme (GTK_SOURCE_BUFFER (sv->priv->document),
gtk_source_style_scheme_manager_get_scheme (manager,
current_style));
if (current_style)
gtk_source_buffer_set_style_scheme (GTK_SOURCE_BUFFER (sv->priv->document),
gtk_source_style_scheme_manager_get_scheme (manager,
current_style));
g_free (current_style);
return IANJUTA_EDITOR (sv);
}
......@@ -154,10 +150,7 @@ create_style_model (AnjutaPreferences* prefs, GtkTreeIter** current)
const gchar* const *styles = gtk_source_style_scheme_manager_get_scheme_ids (manager);
const gchar* const *style;
gchar* current_style = anjuta_preferences_get (prefs, SOURCEVIEW_STYLE);
if (!current_style)
{
current_style = g_strdup (SOURCEVIEW_DEFAULT_STYLE);
}
*current = NULL;
for (style = styles; *style != NULL; style++)
{
GtkTreeIter iter;
......
......@@ -180,7 +180,7 @@ terminal_set_preferences (VteTerminal *term, AnjutaPreferences *pref)
setting = GET_PROFILE_BOOL (GCONF_SILENT_BELL);
vte_terminal_set_audible_bell (term, !setting);
value = GET_PROFILE_INT (GCONF_SCROLLBACK_LINES);
vte_terminal_set_scrollback_lines (term, value);
vte_terminal_set_scrollback_lines (term, (value == 0) ? 500 : value);
setting = GET_PROFILE_BOOL (GCONF_SCROLL_ON_KEYSTROKE);
vte_terminal_set_scroll_on_keystroke (term, setting);
setting = GET_PROFILE_BOOL (GCONF_SCROLL_ON_OUTPUT);
......@@ -353,7 +353,9 @@ terminal_execute (TerminalPlugin *term_plugin, const gchar *directory,
term = VTE_TERMINAL (term_plugin->term);
/*
vte_terminal_reset (term, TRUE, TRUE);
*/
focus = gtk_widget_is_focus (term_plugin->shell);
......
......@@ -294,7 +294,17 @@ send_bacon_message (void)
for (l = file_list; l != NULL; l = l->next)
{
command = g_string_append (command, l->data);
/* convert to absolute path for serverside */
if (g_path_is_absolute (l->data))
{
command = g_string_append (command, l->data);
}
else
{
gchar *uri;
uri = g_build_filename (g_getenv ("PWD"), l->data, NULL);
command = g_string_append (command, uri);
}
if (l->next != NULL)
command = g_string_append_c (command, ' ');
}
......
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