summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/2011-August/007709.html
blob: a78754dc33b263f953ddfe28d31765bc7ffff976 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-dev] [RPM] cauldron core/release	firefox-ext-mozvoikko-1.10.0-1.mga2
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20%5BRPM%5D%20cauldron%20core/release%0A%09firefox-ext-mozvoikko-1.10.0-1.mga2&In-Reply-To=%3C4E5E6657.70400%40iki.fi%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="007708.html">
   <LINK REL="Next"  HREF="007710.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-dev] [RPM] cauldron core/release	firefox-ext-mozvoikko-1.10.0-1.mga2</H1>
    <B>Anssi Hannula</B> 
    <A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20%5BRPM%5D%20cauldron%20core/release%0A%09firefox-ext-mozvoikko-1.10.0-1.mga2&In-Reply-To=%3C4E5E6657.70400%40iki.fi%3E"
       TITLE="[Mageia-dev] [RPM] cauldron core/release	firefox-ext-mozvoikko-1.10.0-1.mga2">anssi.hannula at iki.fi
       </A><BR>
    <I>Wed Aug 31 18:50:31 CEST 2011</I>
    <P><UL>
        <LI>Previous message: <A HREF="007708.html">[Mageia-dev] [RPM] cauldron core/release	firefox-ext-mozvoikko-1.10.0-1.mga2
</A></li>
        <LI>Next message: <A HREF="007710.html">[Mageia-dev] [RPM] cauldron nonfree/release	kernel-firmware-extra-20110730-2.mga2.nonfree
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#7709">[ date ]</a>
              <a href="thread.html#7709">[ thread ]</a>
              <a href="subject.html#7709">[ subject ]</a>
              <a href="author.html#7709">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>On 31.08.2011 19:39, Thierry Vignaud wrote:
&gt;<i> On 31 August 2011 18:11, Mageia Team &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">buildsystem-daemon at mageia.org</A>&gt; wrote:
</I>&gt;&gt;<i> Finnish spell-checking extension for Firefox 3 web browser. The
</I>&gt;&gt;<i> spell-checking is provided by the Voikko library.
</I>&gt;<i> 
</I>&gt;<i> Really 3 :-) ?
</I>
Oops, I only noticed the 3 in Summary :)

Thanks, fixing.

-- 
Anssi Hannula
</PRE>







<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="007708.html">[Mageia-dev] [RPM] cauldron core/release	firefox-ext-mozvoikko-1.10.0-1.mga2
</A></li>
	<LI>Next message: <A HREF="007710.html">[Mageia-dev] [RPM] cauldron nonfree/release	kernel-firmware-extra-20110730-2.mga2.nonfree
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#7709">[ date ]</a>
              <a href="thread.html#7709">[ thread ]</a>
              <a href="subject.html#7709">[ subject ]</a>
              <a href="author.html#7709">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>
#n251'>251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321
#!/usr/bin/perl -w

# Control-center

# Copyright (C) 2001 MandrakeSoft
# Yves Duret <yduret at mandrakesoft.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


use MDK::Common;
use Gtk;
use Config;
init Gtk;
use POSIX;
use lib qw(/usr/lib/libDrakX);
use interactive;
use standalone;
use any;
use bootloader;
use fs;
use my_gtk qw(:helpers :wrappers :ask);

$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~/--embedded (\S*) (\S*)/;
if ($::isEmbedded) {
  print "EMBED\n";
  print "XID : $::XID\n";
  print "CCPID :  $::CCPID\n";
}

my $in = 'interactive'->vnew('su', 'default');
local $_ = join '', @ARGV;

/-h/ and die _("no help implemented yet.\n");
/-version/ and die 'version: $Id$'."\n";

my @winm;
my @usernames;
parse_etc_passwd();

my $x_mode = isXlaunched();
my $a_mode = (-e "/etc/aurora/Monitor") ? 1 : 0;
my $l_mode = isAutologin();
my %auto_mode = get_autologin("");
my $inmain = 0;
my $lilogrub = chomp_(`detectloader -q`);

my $window = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window ("toplevel");
$window->signal_connect(delete_event => sub { $::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0) });
$window->set_title(_("Boot Style Configuration"));
$window->border_width(2);
#$window->realize;

# drakX mode
my ($t_pixmap, $t_mask) = gtkcreate_png("tradi.png");
my ($h_pixmap, $h_mask) = gtkcreate_png("hori.png");
my ($v_pixmap, $v_mask) = gtkcreate_png("verti.png");
my ($g_pixmap, $g_mask) = gtkcreate_png("gmon.png");
my ($c_pixmap, $c_mask) = gtkcreate_png("categ.png");

# a pixmap widget to contain the pixmap
my $pixmap = new Gtk::Pixmap($h_pixmap, $h_mask);

### menus definition
# the menus are not shown
# but they provides shiny shortcut like C-q
my @menu_items = ( { path => _("/_File"), type => '<Branch>' },
		   { path => _("/File/_Quit"), accelerator => _("<control>Q"), callback    => sub { $::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0) } },
		 );
my $menubar = get_main_menu($window);
######### menus end

my $user_combo = new Gtk::Combo;
$user_combo->set_popdown_strings(@usernames);
$user_combo->entry->set_text($auto_mode{autologin}) if ($auto_mode{autologin});
my $desktop_combo =new Gtk::Combo;
$desktop_combo->set_popdown_strings(get_wm());
$desktop_combo->entry->set_text($auto_mode{desktop}) if ($auto_mode{desktop});
my $a_c_button = new Gtk::RadioButton (_("NewStyle Categorizing Monitor"));
my $a_h_button = new Gtk::RadioButton _("NewStyle Monitor"), $a_c_button;
my $a_v_button = new Gtk::RadioButton _("Traditional Monitor"), $a_c_button;
my $a_g_button = new Gtk::RadioButton _("Traditional Gtk+ Monitor"),$a_c_button ;
my $a_button = new Gtk::CheckButton(_("Launch Aurora at boot time"));
my $a_box = new Gtk::VBox(0, 0);
my $x_box = new Gtk::VBox(0, 0);
my $disp_mode = arch() =~ /ppc/ ? _("Yaboot mode") : _("Lilo/grub mode");
gtkadd($window,
       gtkpack__ (my $global_vbox = new Gtk::VBox(0,0),
		  gtkadd (new Gtk::Frame ("$disp_mode"),
#			  gtkpack__(new Gtk::VBox(0,0),
				    (gtkpack_(gtkset_border_width(new Gtk::HBox(0, 0),5),
					      1,_("You are currently using %s as your boot manager.
Click on Configure to launch the setup wizard.", $lilogrub),
					      0,gtksignal_connect(new Gtk::Button (_("Configure")), clicked => $::lilo_choice),
					     )),
#				    "" #we need some place under the button -- replaced by gtkset_border_width( for the moment
#				   )
				     
			 ),
		  # aurora
# 		  gtkadd (new Gtk::Frame (_("Boot mode")),
# 			  gtkpack__ (new Gtk::HBox(0,0),
# 				     gtkpack__ (new Gtk::VBox(0, 5),
# 						gtksignal_connect ($a_button, clicked => sub {
# 								       if ($inmain) {
# 									   $a_box->set_sensitive(!$a_mode);
# 									   $a_mode = !$a_mode;
# 									   if ($a_mode) {
# 									       $pixmap->set($c_pixmap, $c_mask) if $a_c_button->get_active();
# 									       $pixmap->set($h_pixmap, $h_mask) if $a_h_button->get_active();
# 									       $pixmap->set($v_pixmap, $v_mask) if $a_v_button->get_active();
# 									       $pixmap->set($g_pixmap, $g_mask) if $a_g_button->get_active();
# 									   } else {
# 									       $pixmap->set($t_pixmap, $t_mask);
# 									   }
# 										   }
# 								   }),
# 						gtkpack__ (gtkset_sensitive ($a_box, $a_mode),
# 							    gtksignal_connect ($a_c_button,clicked => sub{$pixmap->set($c_pixmap, $c_mask)}),
# 							    gtksignal_connect ($a_h_button,clicked => sub{$pixmap->set($h_pixmap, $h_mask)}),
# 							    gtksignal_connect ($a_v_button,clicked => sub{$pixmap->set($v_pixmap, $v_mask)}),
# 							    gtksignal_connect ($a_g_button,clicked => sub{$pixmap->set($g_pixmap, $g_mask)})
# 							  )
# 					      ),
# 				     gtkpack__ (new Gtk::HBox(0,0), $pixmap)
# 				    )
# 			 ),
		  # X
		  gtkadd (new Gtk::Frame (_("System mode")),
			  gtkpack__ (new Gtk::VBox(0, 5),
				     gtksignal_connect(gtkset_active(new Gtk::CheckButton (_("Launch the graphical environment when your system starts")), $x_mode), clicked => sub {
							   $x_box->set_sensitive(!$x_mode);
							   $x_mode = !$x_mode;
						       }),
				     gtkpack__ (gtkset_sensitive ($x_box, $x_mode),
						gtkset_active($x_no_button  = new Gtk::RadioButton (_("No, I don't want autologin")), !$l_mode),
						gtkpack__ (new Gtk::HBox(0, 10),
							   gtkset_active($x_yes_button = new Gtk::RadioButton((_("Yes, I want autologin with this (user, desktop)")), $x_no_button), $l_mode),
							   gtkpack__ (new Gtk::VBox(0, 10),
								      $user_combo,
								      $desktop_combo
								     )
							  )
					       )
				    )
			 ),
		 gtkadd (gtkset_layout(new Gtk::HButtonBox,-end),
			 gtksignal_connect(new Gtk::Button(_("OK")), clicked => sub{ updateInit(); updateAutologin(); updateAurora(); $::isEmbedded ? kill(USR1,$::CCPID) : Gtk->exit(0) }),
			 gtksignal_connect(new Gtk::Button(_("Cancel")), clicked => sub { $::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0) })
			)
	       )
      );

$a_button->set_active($a_mode); # up == false == "0"
if ($a_mode) {
    my $a = readlink "/etc/aurora/Monitor";
    $a =~ s#/lib/aurora/Monitors/##;
    if ($a eq "NewStyle-Categorizing-WsLib") { $a_c_button->set_active(1); $pixmap->set($c_pixmap, $c_mask) }
    if ($a eq "NewStyle-WsLib") { $a_h_button->set_active(1);  $pixmap->set($h_pixmap, $h_mask) }
    if ($a eq "Traditional-WsLib") { $a_v_button->set_active(1); $pixmap->set($v_pixmap, $v_mask) }  
    if ($a eq "Traditional-Gtk+") { $a_g_button->set_active(1); $pixmap->set($g_pixmap, $g_mask) }
} else {
    $pixmap->set($t_pixmap, $t_mask);
}

$window->show_all();
Gtk->main_iteration while Gtk->events_pending;
$::isEmbedded and kill USR2, $::CCPID;
$inmain = 1;
Gtk->main;
Gtk->exit(0);

#-------------------------------------------------------------
# get user names to put in combo  
#-------------------------------------------------------------

sub parse_etc_passwd
{
    my ($uname, $uid);
    setpwent();
    do {
	@user_info = getpwent();
	($uname, $uid) = @user_info[0,2];
	push (@usernames, $uname) if ($uid > 500) and !($uname eq "nobody");
    } while (@user_info);
}

sub get_wm
{
    @winm = (split (' ', `/usr/sbin/chksession -l`));
}

#-------------------------------------------------------------
# menu callback functions
#-------------------------------------------------------------

sub print_hello {
  print("mcdtg !\n");
}

sub get_main_menu {
  my ($window) = @_;

  my $accel_group = new Gtk::AccelGroup();
  my $item_factory = new Gtk::ItemFactory('Gtk::MenuBar', '<main>', $accel_group);
  $item_factory->create_items(@menu_items);
  $window->add_accel_group($accel_group);
  return $item_factory->get_widget('<main>');
}

#-------------------------------------------------------------
# launch X functions
#-------------------------------------------------------------

sub isXlaunched {
    my $line;
    open INITTAB, "/etc/inittab" or die _("can not open /etc/inittab for reading: %s", $!);
    while (<INITTAB>) {
	if (/id:([1-6]):initdefault:/) { $line = $_; last }
    }
    close INITTAB;
    $line =~ s/id:([1-6]):initdefault:/$1/;
    return ($line-3);
}

sub updateInit {
    my $runlevel = ($x_mode) ? 5 : 3;
    substInFile { s/^id:\d:initdefault:\s*$/id:$runlevel:initdefault:\n/ } "/etc/inittab";
}

#-------------------------------------------------------------
# aurora functions
#-------------------------------------------------------------



sub updateAurora {
    if ($a_mode) {
        if ($a_c_button->get_active()) {
            symlinkf("/lib/aurora/Monitors/NewStyle-Categorizing-WsLib",    "/etc/aurora/Monitor");
            $in->do_pkgs->install(q(Aurora-Monitor-NewStyle-Categorizing-WsLib)) if !(-e "/lib/aurora/Monitors/NewStyle-Categorizing-WsLib");
        }