Browse Source

Update to support vte 0.40
Migrate from vte_terminal_set_font_from_string to vte_terminal_set_font
Remove _rgba strings to set_color functions

Héctor García 9 years ago
parent
commit
d496bb4110
1 changed files with 10 additions and 8 deletions
  1. 10 8
      src/mssh-gconf.c

+ 10 - 8
src/mssh-gconf.c

@@ -8,20 +8,22 @@
 void mssh_gconf_notify_font(GConfClient *client, guint cnxn_id,
     GConfEntry *entry, gpointer data)
 {
+    PangoFontDescription *font_desc;
     GConfValue *value;
-    const gchar *font;
     int i;
 
     MSSHWindow *window = MSSH_WINDOW(data);
 
     value = gconf_entry_get_value(entry);
-    font = gconf_value_get_string(value);
 
+    font_desc = pango_font_description_from_string(gconf_value_get_string(value));
     for(i = 0; i < window->terminals->len; i++)
     {
-        vte_terminal_set_font_from_string(VTE_TERMINAL(g_array_index(
-            window->terminals, MSSHTerminal*, i)), font);
+        vte_terminal_set_font(VTE_TERMINAL(g_array_index(
+            window->terminals, MSSHTerminal*, i)), font_desc);
     }
+
+    pango_font_description_free(font_desc);
 }
 
 void mssh_gconf_notify_fg_colour(GConfClient *client, guint cnxn_id,
@@ -40,7 +42,7 @@ void mssh_gconf_notify_fg_colour(GConfClient *client, guint cnxn_id,
 
     for(i = 0; i < window->terminals->len; i++)
     {
-        vte_terminal_set_color_foreground_rgba(VTE_TERMINAL(g_array_index(
+        vte_terminal_set_color_foreground(VTE_TERMINAL(g_array_index(
             window->terminals, MSSHTerminal*, i)), &colour);
     }
 }
@@ -61,7 +63,7 @@ void mssh_gconf_notify_bg_colour(GConfClient *client, guint cnxn_id,
 
     for(i = 0; i < window->terminals->len; i++)
     {
-        vte_terminal_set_color_background_rgba(VTE_TERMINAL(g_array_index(
+        vte_terminal_set_color_background(VTE_TERMINAL(g_array_index(
             window->terminals, MSSHTerminal*, i)), &colour);
     }
 }
@@ -98,7 +100,7 @@ void mssh_gconf_notify_fg_colour_focus(GConfClient *client, guint cnxn_id,
 
     if (idx != -1) {
         /* found the currently focused terminal, update the color */
-        vte_terminal_set_color_foreground_rgba(VTE_TERMINAL(g_array_index(
+        vte_terminal_set_color_foreground(VTE_TERMINAL(g_array_index(
             window->terminals, MSSHTerminal*, idx)), &colour);
     }
 }
@@ -135,7 +137,7 @@ void mssh_gconf_notify_bg_colour_focus(GConfClient *client, guint cnxn_id,
 
     if (idx != -1) {
         /* found the currently focused terminal, update the color */
-        vte_terminal_set_color_background_rgba(VTE_TERMINAL(g_array_index(
+        vte_terminal_set_color_background(VTE_TERMINAL(g_array_index(
             window->terminals, MSSHTerminal*, idx)), &colour);
     }