From de0a09b5b798ccbd014a69a88b38725a4a19aaba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pekka=20Geh=C3=B6r?= Date: Mon, 12 Jan 2009 09:05:05 +0200 Subject: [PATCH] Fixed comment text view (EXPAND) --- irreco/src/core/irreco_theme_creator_dlg.c | 37 +++++++++++++++++++----------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/irreco/src/core/irreco_theme_creator_dlg.c b/irreco/src/core/irreco_theme_creator_dlg.c index 0d9f31c7..08418215 100644 --- a/irreco/src/core/irreco_theme_creator_dlg.c +++ b/irreco/src/core/irreco_theme_creator_dlg.c @@ -168,7 +168,7 @@ static void irreco_theme_creator_dlg_constructed(GObject *object) /* ABOUT*/ scrolled_table = gtk_scrolled_window_new(NULL, NULL); - table_about = gtk_table_new(7, 9, TRUE); + table_about = gtk_table_new(7, 9, FALSE); label_author = gtk_label_new(_("Author:")); label_name = gtk_label_new(_("Name: ")); self->entry_author = gtk_entry_new(); @@ -202,7 +202,7 @@ static void irreco_theme_creator_dlg_constructed(GObject *object) gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW( scrolled_table), - GTK_WIDGET(table_about)); + GTK_WIDGET(self->notebook)); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_table), GTK_POLICY_NEVER, @@ -211,7 +211,7 @@ static void irreco_theme_creator_dlg_constructed(GObject *object) /* Create Notebook tabs. */ gtk_notebook_append_page(GTK_NOTEBOOK(self->notebook), - irreco_gtk_align(GTK_WIDGET(scrolled_table), + irreco_gtk_align(GTK_WIDGET(table_about), 0, 0, 1, 1, 8, 8, 8, 8), gtk_label_new("About")); gtk_notebook_append_page(GTK_NOTEBOOK(self->notebook), @@ -224,10 +224,14 @@ static void irreco_theme_creator_dlg_constructed(GObject *object) 0, 0, 1, 1, 8, 8, 8, 8), gtk_label_new("Backgrounds")); + /*gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(self)->vbox), + scrolled_table);*/ - gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(self)->vbox), - self->notebook); - + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(self)->vbox), + scrolled_table, + TRUE, + TRUE, + 0); /* Set widgets on the table_about */ @@ -242,21 +246,28 @@ static void irreco_theme_creator_dlg_constructed(GObject *object) self->entry_author, 2, 9, 0, 1); gtk_table_attach_defaults(GTK_TABLE(table_about), self->entry_name, 2, 9, 1, 2); - gtk_table_attach_defaults(GTK_TABLE(table_about), + /*gtk_table_attach_defaults(GTK_TABLE(table_about), frame_comments, 0, 6, 2, 7); gtk_table_attach_defaults(GTK_TABLE(table_about), - preview_button_frame, 6, 9, 2, 7); + preview_button_frame, 6, 9, 2, 7);*/ + gtk_table_attach(GTK_TABLE(table_about), frame_comments, 0, 6, 2, 7, + GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); + gtk_table_attach(GTK_TABLE(table_about), preview_button_frame, 6, 9, 2, 7, + GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); /*ABOUT*/ /* set preview image*/ - - gtk_container_add(GTK_CONTAINER(preview_button_frame), self->preview_event_box); gtk_container_add(GTK_CONTAINER(self->preview_event_box), self->preview_image); - /* textview */ + /* TEXTVIEW */ + /* set max size of frame */ + gtk_widget_set(frame_comments, + "width-request", + 370, + NULL); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(self->textview_comments), GTK_WRAP_WORD_CHAR); @@ -288,8 +299,8 @@ static void irreco_theme_creator_dlg_constructed(GObject *object) g_signal_connect(G_OBJECT(self->delete_button), "clicked", G_CALLBACK(irreco_theme_creator_dlg_delete_bg_button), self); - - gtk_widget_set_size_request(GTK_WIDGET(self), 696, 396); + gtk_window_set_default_size(GTK_WINDOW(self), 680, 396); + /*gtk_widget_set_size_request(GTK_WIDGET(self), 696, 396);*/ gtk_widget_show_all(GTK_WIDGET(self)); IRRECO_RETURN } -- 2.11.4.GIT