[PATCH] xffm settings dialog

edscott edscott at prodigy.net.mx
Sun Sep 19 20:23:43 CEST 2004


El dom, 19-09-2004 a las 12:16, Jasper Huijsmans escribió:
> Hey edscott,
> 
> With your permission I'd like to commit the attached patch. It makes the 
> xffm settings dialog a bit better to read IMO.
> 
> Patch and screenshot attached. No string changes involved ;-)

Sure, please go ahead and commit. The dialog certainly looks better with
the patch :-)

regards,

Edscott

> 
> 	Jasper
> 
> ______________________________________________________________________
> Index: xffm_settings_dialog.c
> ===================================================================
> RCS file: /var/cvs/xfce/xfce4/xffm/plugin-mcs/xffm_settings_dialog.c,v
> retrieving revision 1.51
> diff -u -r1.51 xffm_settings_dialog.c
> --- xffm_settings_dialog.c	19 Sep 2004 14:47:02 -0000	1.51
> +++ xffm_settings_dialog.c	19 Sep 2004 17:16:33 -0000
> @@ -338,7 +338,7 @@
>  
>  static void run_xffm_settings_dialog(McsPlugin *mp)
>  {
> -    GtkWidget *header, *vbox,*frame, *sw;
> +    GtkWidget *header, *vbox,*frame, *hbox, *sw;
>      int i;
>      GtkListStore *model;
>      GtkTreeIter iter;
> @@ -366,88 +366,116 @@
>      gtk_box_pack_start(GTK_BOX(vbox), header, FALSE, TRUE, 0);
>      
>      add_spacer(GTK_BOX(vbox));
> - 
> +
> +#if 0
>      frame = xfce_framebox_new (_("Global Configuration"), FALSE);
>      gtk_widget_show(frame);
>      gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
> +
> +    vbox=gtk_vbox_new(FALSE,6);
> +    label = (GtkWidget *) gtk_label_new(_("Default remove action:"));
> +    gtk_widget_show(label);
> +    gtk_box_pack_start ((GtkBox *)vbox,label,FALSE,FALSE,0);
> +    
> +    hbox=gtk_hbox_new(TRUE,2);
> +    gtk_box_pack_start ((GtkBox *)vbox,hbox,FALSE,FALSE,0);
> +#endif
> +    frame = xfce_framebox_new (_("Default remove action:"), TRUE);
> +    gtk_widget_show (frame);
> +    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
> +
> +    hbox = gtk_hbox_new (FALSE, 6);
> +    xfce_framebox_add (XFCE_FRAMEBOX (frame), hbox);
> +    
> +    radio_cancel = gtk_radio_button_new_with_label (NULL,_("Cancel"));
> +    remove_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_cancel));
> +    gtk_box_pack_start ((GtkBox *)hbox,radio_cancel,FALSE,FALSE,0);
> +    radio_waste = gtk_radio_button_new_with_label (remove_group,_("Wastebasket"));
> +    remove_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_waste));
> +    gtk_box_pack_start ((GtkBox *)hbox,radio_waste,FALSE,FALSE,0);
> +    radio_unlink = gtk_radio_button_new_with_label (remove_group,_("Unlink"));
> +    remove_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_unlink));
> +    gtk_box_pack_start ((GtkBox *)hbox,radio_unlink,FALSE,FALSE,0);
> +
> +    gtk_widget_show_all (hbox);
> +
> +#if 0
> +    label = (GtkWidget *) gtk_label_new(_("Other useful options:"));
> +    gtk_widget_show(label);
> +    gtk_box_pack_start ((GtkBox *)vbox,label,FALSE,FALSE,0);
> +    
> +    hbox=gtk_hbox_new(TRUE,2);
> +    gtk_box_pack_start ((GtkBox *)vbox,hbox,FALSE,FALSE,0);
> +#endif
> +    add_spacer(GTK_BOX(vbox));
> +
> +    frame = xfce_framebox_new (_("Other useful options:"), TRUE);
> +    gtk_widget_show (frame);
> +    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
> +
> +    vbox = gtk_vbox_new (FALSE, 6);
> +    gtk_widget_show (vbox);
> +    xfce_framebox_add (XFCE_FRAMEBOX (frame), vbox);
>      
> +    diagnostics = gtk_check_button_new_with_label (_("Disable diagnostics"));
> +    hold_xterm = gtk_check_button_new_with_label (_("Hold xterms"));
> +    use_sudo = gtk_check_button_new_with_label (_("Mount with sudo"));
> +    gtk_box_pack_start ((GtkBox *)vbox,diagnostics,FALSE,FALSE,0);
> +    gtk_box_pack_start ((GtkBox *)vbox,hold_xterm,FALSE,FALSE,0);
> +    gtk_box_pack_start ((GtkBox *)vbox,use_sudo,FALSE,FALSE,0);
> +
> +    set_option_buttons();
> +    
> +    g_signal_connect(radio_cancel, "toggled", G_CALLBACK(remove_toggled), NULL);
> +    g_signal_connect(radio_waste, "toggled", G_CALLBACK(remove_toggled), NULL);
> +    g_signal_connect(radio_unlink, "toggled", G_CALLBACK(remove_toggled), NULL);
> +
> +
> +    g_signal_connect(diagnostics, "toggled", G_CALLBACK(option_toggled), (gpointer)((long)(XFFM_DIAGNOSTICS_DISABLED)));
> +    g_signal_connect(hold_xterm, "toggled", G_CALLBACK(option_toggled), (gpointer)((long)(XFFM_HOLD_XTERM)));
> +    g_signal_connect(use_sudo, "toggled", G_CALLBACK(option_toggled), (gpointer)((long)(XFFM_USE_SUDO)));
> +
> +    gtk_widget_show_all(vbox);
> +
>      {
> -	GtkWidget *hbox,*label;
> -	
> -	vbox=gtk_vbox_new(FALSE,2);
> -	label = (GtkWidget *) gtk_label_new(_("Default remove action:"));
> -	gtk_widget_show(label);
> -	gtk_box_pack_start ((GtkBox *)vbox,label,FALSE,FALSE,0);
> -	
> -	hbox=gtk_hbox_new(TRUE,2);
> -	gtk_box_pack_start ((GtkBox *)vbox,hbox,FALSE,FALSE,0);
> -
> -	
> -	radio_cancel = gtk_radio_button_new_with_label (NULL,_("Cancel"));
> -  	remove_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_cancel));
> -	gtk_box_pack_start ((GtkBox *)hbox,radio_cancel,TRUE,TRUE,0);
> -	radio_waste = gtk_radio_button_new_with_label (remove_group,_("Wastebasket"));
> -  	remove_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_waste));
> -	gtk_box_pack_start ((GtkBox *)hbox,radio_waste,TRUE,TRUE,0);
> -	radio_unlink = gtk_radio_button_new_with_label (remove_group,_("Unlink"));
> -  	remove_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_unlink));
> -	gtk_box_pack_start ((GtkBox *)hbox,radio_unlink,TRUE,TRUE,0);
> -    
> -
> -	label = (GtkWidget *) gtk_label_new(_("Other useful options:"));
> -	gtk_widget_show(label);
> -	gtk_box_pack_start ((GtkBox *)vbox,label,FALSE,FALSE,0);
> -	
> -	hbox=gtk_hbox_new(TRUE,2);
> -	gtk_box_pack_start ((GtkBox *)vbox,hbox,FALSE,FALSE,0);
> -	diagnostics = gtk_check_button_new_with_label (_("Disable diagnostics"));
> -	hold_xterm = gtk_check_button_new_with_label (_("Hold xterms"));
> -	use_sudo = gtk_check_button_new_with_label (_("Mount with sudo"));
> -	gtk_box_pack_start ((GtkBox *)hbox,diagnostics,TRUE,TRUE,0);
> -	gtk_box_pack_start ((GtkBox *)hbox,hold_xterm,TRUE,TRUE,0);
> -	gtk_box_pack_start ((GtkBox *)hbox,use_sudo,TRUE,TRUE,0);
> -
> -
> -	set_option_buttons();
> -	
> -	g_signal_connect(radio_cancel, "toggled", G_CALLBACK(remove_toggled), NULL);
> -	g_signal_connect(radio_waste, "toggled", G_CALLBACK(remove_toggled), NULL);
> -	g_signal_connect(radio_unlink, "toggled", G_CALLBACK(remove_toggled), NULL);
> -
> -
> -	g_signal_connect(diagnostics, "toggled", G_CALLBACK(option_toggled), (gpointer)((long)(XFFM_DIAGNOSTICS_DISABLED)));
> -	g_signal_connect(hold_xterm, "toggled", G_CALLBACK(option_toggled), (gpointer)((long)(XFFM_HOLD_XTERM)));
> -	g_signal_connect(use_sudo, "toggled", G_CALLBACK(option_toggled), (gpointer)((long)(XFFM_USE_SUDO)));
> -	
> -
> -	gtk_widget_show_all(vbox);
> -	{
> -	  gchar *g;
> -	  g=g_find_program_in_path("sudo");
> -	  if (g){
> -	    g_free(g);
> -	  } else {
> -	      gtk_widget_hide(use_sudo);
> -	  }
> -	}
> -        xfce_framebox_add (XFCE_FRAMEBOX (frame), vbox);
> -	label = (GtkWidget *) gtk_label_new(_("Environment variables:"));
> -	gtk_widget_show(label);
> -	gtk_box_pack_start ((GtkBox *)vbox,label,FALSE,FALSE,0);
> +      gchar *g;
> +      g=g_find_program_in_path("sudo");
> +      if (g){
> +	g_free(g);
> +      } else {
> +	  gtk_widget_hide(use_sudo);
> +      }
>      }
> +#if 0
> +    xfce_framebox_add (XFCE_FRAMEBOX (frame), vbox);
> +    label = (GtkWidget *) gtk_label_new(_("Environment variables:"));
> +    gtk_widget_show(label);
> +    gtk_box_pack_start ((GtkBox *)vbox,label,FALSE,FALSE,0);
> +#endif
> +    
> +    vbox = GTK_DIALOG(dialog)->vbox;
> +    
> +    add_spacer(GTK_BOX(vbox));
>  
> +    frame = xfce_framebox_new (_("Environment variables:"), FALSE);
> +    gtk_widget_show (frame);
> +    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
>      
>      sw = gtk_scrolled_window_new (NULL, NULL);
>      gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
>  					 GTK_SHADOW_ETCHED_IN);
>      gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
> -				    GTK_POLICY_AUTOMATIC,
> -				    GTK_POLICY_AUTOMATIC);
> -    gtk_container_set_border_width(GTK_CONTAINER(sw), BORDER);
> +				    GTK_POLICY_NEVER,
> +				    GTK_POLICY_NEVER);
>      gtk_widget_show(sw);
> +    xfce_framebox_add (XFCE_FRAMEBOX (frame), sw);
> +
> +#if 0
> +    gtk_container_set_border_width(GTK_CONTAINER(sw), BORDER);
>      gtk_box_pack_start ((GtkBox *)vbox,sw,FALSE,FALSE,0);
>      /*xfce_framebox_add (XFCE_FRAMEBOX (frame), sw);*/
> -
> +#endif
> +    
>      model = gtk_list_store_new (NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING,
>  			      G_TYPE_BOOLEAN);
>      for (i=TERMCMD; i < XFFM_OPTIONS; i++) {
> @@ -488,7 +516,7 @@
>  					         "editable", COLUMN_EDITABLE,
>  					         NULL);
>  
> -    gtk_widget_set_size_request(treeview, 320, 200);
> +    gtk_widget_set_size_request(treeview, 350, -1);
>      gtk_widget_show(treeview);
>      gtk_container_add (GTK_CONTAINER (sw), treeview);
>  
> 
> ______________________________________________________________________
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://lunar-linux.org/mailman/listinfo/xfce4-dev




More information about the Xfce4-dev mailing list