Kaydet (Commit) 41dcde62 authored tarafından Jiří Techet's avatar Jiří Techet

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.
üst a7a893a2
...@@ -562,6 +562,8 @@ static void show_project_properties(gboolean show_build) ...@@ -562,6 +562,8 @@ static void show_project_properties(gboolean show_build)
GtkWidget *radio_long_line_custom; GtkWidget *radio_long_line_custom;
static PropertyDialogElements e; static PropertyDialogElements e;
GSList *node; GSList *node;
gchar *entry_text;
GtkTextBuffer *buffer;
g_return_if_fail(app->project != NULL); g_return_if_fail(app->project != NULL);
...@@ -591,20 +593,14 @@ static void show_project_properties(gboolean show_build) ...@@ -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); 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); on_radio_long_line_custom_toggled(GTK_TOGGLE_BUTTON(radio_long_line_custom), widget);
if (p->description != NULL) /* set text */
{ /* set text */ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(e.description));
GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(e.description)); gtk_text_buffer_set_text(buffer, p->description ? p->description : "", -1);
gtk_text_buffer_set_text(buffer, p->description, -1);
}
if (p->file_patterns != NULL)
{ /* set the file patterns */
gchar *str;
str = g_strjoinv(" ", p->file_patterns); /* set the file patterns */
gtk_entry_set_text(GTK_ENTRY(e.patterns), str); entry_text = p->file_patterns ? g_strjoinv(" ", p->file_patterns) : g_strdup("");
g_free(str); 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); g_signal_emit_by_name(geany_object, "project-dialog-open", e.notebook);
gtk_widget_show_all(e.dialog); gtk_widget_show_all(e.dialog);
......
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