Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Mon, 27 Oct 2014 19:58:59 UTC Commit: 41dcde623db0c785e6bf7fc64a7117f7f8774aea https://github.com/geany/geany/commit/41dcde623db0c785e6bf7fc64a7117f7f8774a...
Log Message: ----------- Always set project description and file patterns in the dialog
Set them also when they are NULL in the project (which happens when new project is created) because otherwise there are left-over values from the previous project.
Modified Paths: -------------- src/project.c
Modified: src/project.c 22 lines changed, 9 insertions(+), 13 deletions(-) =================================================================== @@ -562,6 +562,8 @@ static void show_project_properties(gboolean show_build) GtkWidget *radio_long_line_custom; static PropertyDialogElements e; GSList *node; + gchar *entry_text; + GtkTextBuffer *buffer;
g_return_if_fail(app->project != NULL);
@@ -591,20 +593,14 @@ static void show_project_properties(gboolean show_build) gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), (gdouble)p->priv->long_line_column); on_radio_long_line_custom_toggled(GTK_TOGGLE_BUTTON(radio_long_line_custom), widget);
- if (p->description != NULL) - { /* set text */ - GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(e.description)); - gtk_text_buffer_set_text(buffer, p->description, -1); - } - - if (p->file_patterns != NULL) - { /* set the file patterns */ - gchar *str; + /* set text */ + buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(e.description)); + gtk_text_buffer_set_text(buffer, p->description ? p->description : "", -1);
- str = g_strjoinv(" ", p->file_patterns); - gtk_entry_set_text(GTK_ENTRY(e.patterns), str); - g_free(str); - } + /* set the file patterns */ + entry_text = p->file_patterns ? g_strjoinv(" ", p->file_patterns) : g_strdup(""); + gtk_entry_set_text(GTK_ENTRY(e.patterns), entry_text); + g_free(entry_text);
g_signal_emit_by_name(geany_object, "project-dialog-open", e.notebook); gtk_widget_show_all(e.dialog);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).