Fix previous commit
[debian/pino.git] / src / pref_dialog.vala
index 740caee..d1d11f5 100644 (file)
@@ -45,6 +45,7 @@ public class PrefDialog : Dialog {
        private HScale opacityTweets;
        private CheckButton rtlSupport;
        private CheckButton fullNames;
+       private CheckButton nativeLinkColor;
        private FontButton deFont;
        private ColorButton freshColor;
        private Entry login;
@@ -76,6 +77,7 @@ public class PrefDialog : Dialog {
                urlShorten = new ComboBox.text();
                urlShorten.append_text("goo.gl");
                urlShorten.append_text("is.gd");
+               urlShorten.append_text("ur1.ca");
                
                //enabling spell checking
                enableSpell = new CheckButton.with_label(_("Enable spell checking"));
@@ -184,6 +186,9 @@ public class PrefDialog : Dialog {
                //full names or nicks in tweets
                fullNames = new CheckButton.with_label(_("Full names instead of nicknames"));
                
+               //link color
+               nativeLinkColor = new CheckButton.with_label(_("Native links color"));
+               
                //default font in statuses
                var deFontLabel = new Label(_("Default font"));
                deFont = new FontButton();
@@ -203,6 +208,7 @@ public class PrefDialog : Dialog {
                table_tweets.add_widget(roundedAvatars);
                table_tweets.add_widget(rtlSupport);
                table_tweets.add_widget(fullNames);
+               table_tweets.add_widget(nativeLinkColor);
                table_tweets.add_two_widgets(deFontLabel, deFont);
                table_tweets.add_two_widgets(freshColorLabel, freshColor);
                table_tweets.add_two_widgets(opacityTweetsLabel, opacityTweets);
@@ -250,6 +256,10 @@ public class PrefDialog : Dialog {
                                urlShorten.set_active(1);
                                break;
                        
+                       case "ur1.ca":
+                               urlShorten.set_active(2);
+                               break;
+                       
                        default:
                                urlShorten.set_active(0);
                                break;
@@ -293,6 +303,7 @@ public class PrefDialog : Dialog {
                opacityTweets.set_value((int)(prefs.opacityTweets.to_double() * 100));
                rtlSupport.active = prefs.rtlSupport;
                fullNames.active = prefs.fullNames;
+               nativeLinkColor.active = prefs.nativeLinkColor;
                deFont.set_font_name("%s %d".printf(prefs.deFontName, prefs.deFontSize));
                
                //colorFrsh setup
@@ -321,6 +332,10 @@ public class PrefDialog : Dialog {
                                case 1:
                                        prefs.urlShorten = "is.gd";
                                        break;
+                               
+                               case 2:
+                                       prefs.urlShorten = "ur1.ca";
+                                       break;
                        }
                });
                
@@ -371,6 +386,10 @@ public class PrefDialog : Dialog {
                        prefs.fullNames = fullNames.active;
                });
                
+               nativeLinkColor.toggled.connect(() => {
+                       prefs.nativeLinkColor = nativeLinkColor.active;
+               });
+               
                deFont.font_set.connect(() => {
                        //warning(deFont.get_font_name());
                        prefs.deFont = deFont.get_font_name();