[uim-commit] r559 - in trunk: helper scm
yamaken at freedesktop.org
yamaken at freedesktop.org
Sat Feb 5 17:21:29 PST 2005
Author: yamaken
Date: 2005-02-05 17:21:26 -0800 (Sat, 05 Feb 2005)
New Revision: 559
Modified:
trunk/helper/pref-gtk.c
trunk/scm/custom.scm
Log:
* scm/custom.scm
- (define-custom): Fix implicit 'main' subgroup handlings
- (custom-group main): Replace empty label with dummy string to
avoid invalid gettext translation
* helper/pref-gtk.c
- (USE_SUB_GROUP): Define as 1
- (create_sub_group_widgets): Removing frame for 'main' subgroup. If
you feel it strange, Replace it as you favor
Modified: trunk/helper/pref-gtk.c
===================================================================
--- trunk/helper/pref-gtk.c 2005-02-06 00:46:39 UTC (rev 558)
+++ trunk/helper/pref-gtk.c 2005-02-06 01:21:26 UTC (rev 559)
@@ -43,7 +43,7 @@
#include "uim/uim-custom.h"
#include "uim/gettext.h"
-#define USE_SUB_GROUP 0
+#define USE_SUB_GROUP 1
static GtkWidget *pref_window = NULL;
static GtkWidget *pref_tree_view = NULL;
@@ -404,13 +404,22 @@
continue;
}
- frame = gtk_frame_new(sgrp->label);
- gtk_frame_set_label_align(GTK_FRAME(frame), 0.02, 0.5);
- gtk_box_pack_start(GTK_BOX(parent_widget), frame, FALSE, FALSE, 0);
-
vbox = gtk_vbox_new(FALSE, 8);
- gtk_container_add(GTK_CONTAINER(frame), vbox);
+ if (strcmp(*sgrp_sym, "main")) {
+ frame = gtk_frame_new(sgrp->label);
+ gtk_frame_set_label_align(GTK_FRAME(frame), 0.02, 0.5);
+ gtk_box_pack_start(GTK_BOX(parent_widget), frame, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(frame), vbox);
+ } else {
+
+ /*
+ * Removing frame for 'main' subgroup. If you feel it
+ * strange, Replace it as you favor. -- YamaKen 2005-02-06
+ */
+ gtk_box_pack_start(GTK_BOX(parent_widget), vbox, FALSE, FALSE, 0);
+ }
+
gtk_container_set_border_width(GTK_CONTAINER(vbox), 6);
for (custom_sym = custom_syms; *custom_sym; custom_sym++) {
Modified: trunk/scm/custom.scm
===================================================================
--- trunk/scm/custom.scm 2005-02-06 00:46:39 UTC (rev 558)
+++ trunk/scm/custom.scm 2005-02-06 01:21:26 UTC (rev 559)
@@ -494,13 +494,16 @@
(lambda (sym)
(assq sym custom-rec-alist)))
-;; TODO: rewrite test for overwriting
+;; TODO: rewrite test for overwriting and 'main' subgroup
;; API
(define define-custom
(lambda (sym default groups type label desc)
- (let ((crec (custom-rec-new sym default groups type label desc))
- (primary-grp (car groups))
- (subgrps (cons 'main (cdr groups))))
+ (let* ((primary-grp (car groups))
+ (subgrps (if (null? (cdr groups))
+ '(main)
+ (cdr groups)))
+ (modified-groups (cons primary-grp subgrps))
+ (crec (custom-rec-new sym default modified-groups type label desc)))
(set! custom-rec-alist (alist-replace crec custom-rec-alist))
(custom-call-hook-procs primary-grp custom-group-update-hooks)
(if (not (symbol-bound? sym))
@@ -741,7 +744,7 @@
(custom-call-all-hook-procs custom-set-hooks)))
(define-custom-group 'main
- (_ "")
+ (_ "-")
(_ "Main settings of this group"))
(define-custom-group 'hidden
More information about the Uim-commit
mailing list