using ./config/ instead of ./mate2/

This commit is contained in:
Perberos 2011-11-07 21:10:16 -03:00
parent 1d63a49a77
commit 421415f7cb
50 changed files with 939 additions and 995 deletions

4
README
View File

@ -72,8 +72,8 @@ enable python plugins support.
Simple install procedure: Simple install procedure:
% gzip -cd pluma-2.30.4.tar.gz | tar xvf - # unpack the sources % gzip -cd mate-file-manager.tar.gz | tar xvf - # unpack the sources
% cd pluma-2.30.4 # change to the toplevel directory % cd mate-file-manager # change to the toplevel directory
% ./configure # run the `configure' script % ./configure # run the `configure' script
% make # build pluma % make # build pluma
[ Become root if necessary ] [ Become root if necessary ]

View File

@ -500,10 +500,10 @@ AC_SUBST(PLUMA_IMPLIB)
AC_SUBST(PLUGIN_LIBTOOL_FLAGS) AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
AC_SUBST(LOADER_LIBTOOL_FLAGS) AC_SUBST(LOADER_LIBTOOL_FLAGS)
PLUMA_PLUGINS_DATA_DIR="$datadir/pluma-2/plugins" PLUMA_PLUGINS_DATA_DIR="$datadir/pluma/plugins"
AC_SUBST(PLUMA_PLUGINS_DATA_DIR) AC_SUBST(PLUMA_PLUGINS_DATA_DIR)
PLUMA_PLUGINS_LIBS_DIR="$libdir/pluma-2/plugins" PLUMA_PLUGINS_LIBS_DIR="$libdir/pluma/plugins"
AC_SUBST(PLUMA_PLUGINS_LIBS_DIR) AC_SUBST(PLUMA_PLUGINS_LIBS_DIR)
MATE_DOC_INIT([0.9.0],, MATE_DOC_INIT([0.9.0],,

View File

@ -16,7 +16,7 @@ pkgconfig_DATA = pluma-@PLUMA_API_VERSION@.pc
pluma-@PLUMA_API_VERSION@.pc: pluma.pc pluma-@PLUMA_API_VERSION@.pc: pluma.pc
cp pluma.pc pluma-@PLUMA_API_VERSION@.pc cp pluma.pc pluma-@PLUMA_API_VERSION@.pc
bugreportdir = $(libexecdir)/pluma-2 bugreportdir = $(libexecdir)/pluma
bugreport_SCRIPTS = pluma-bugreport.sh bugreport_SCRIPTS = pluma-bugreport.sh
if MATECONF_SCHEMAS_INSTALL if MATECONF_SCHEMAS_INSTALL

View File

@ -20,21 +20,21 @@ echo_padded ()
#if (which mateconftool-2 >/dev/null) #if (which mateconftool-2 >/dev/null)
#then #then
# echo "MateConf configuration dump:" # echo "MateConf configuration dump:"
# mateconftool-2 --dump /apps/pluma-2 | grep -Ev "</?(entry|mateconfentryfile|entrylist|value|schema_key)" | cut -c4- # mateconftool-2 --dump /apps/pluma | grep -Ev "</?(entry|mateconfentryfile|entrylist|value|schema_key)" | cut -c4-
# echo # echo
#fi #fi
echo "Active plugins:" echo "Active plugins:"
mateconftool-2 --get /apps/pluma-2/plugins/active-plugins \ mateconftool-2 --get /apps/pluma/plugins/active-plugins \
| sed -r -e 's/^\[(.*)\]$/\1/' -e 's/,/\n/g' \ | sed -r -e 's/^\[(.*)\]$/\1/' -e 's/,/\n/g' \
| sed -e 's/^.*$/ - \0/' | sed -e 's/^.*$/ - \0/'
echo echo
# Manually installed plugins (in $HOME) # Manually installed plugins (in $HOME)
if [ -d $HOME/.mate2/pluma/plugins ] if [ -d $HOME/.config/pluma/plugins ]
then then
echo "Plugins in \$HOME:" echo "Plugins in \$HOME:"
ls $HOME/.mate2/pluma/plugins/*.pluma-plugin \ ls $HOME/.config/pluma/plugins/*.pluma-plugin \
| sed -r -e 's#.*/([^/]*)\.pluma-plugin$# - \1#' | sed -r -e 's#.*/([^/]*)\.pluma-plugin$# - \1#'
else else
echo "No plugin installed in \$HOME." echo "No plugin installed in \$HOME."

View File

@ -15,4 +15,4 @@ X-MATE-Bugzilla-Bugzilla=MATE
X-MATE-Bugzilla-Product=pluma X-MATE-Bugzilla-Product=pluma
X-MATE-Bugzilla-Component=general X-MATE-Bugzilla-Component=general
X-MATE-Bugzilla-Version=@VERSION@ X-MATE-Bugzilla-Version=@VERSION@
X-MATE-Bugzilla-ExtraInfoScript=@FULL_LIBEXECDIR@/pluma-2/pluma-bugreport.sh X-MATE-Bugzilla-ExtraInfoScript=@FULL_LIBEXECDIR@/pluma/pluma-bugreport.sh

View File

@ -1,8 +1,8 @@
<mateconfschemafile> <mateconfschemafile>
<schemalist> <schemalist>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/font/use_default_font</key> <key>/schemas/apps/pluma/preferences/editor/font/use_default_font</key>
<applyto>/apps/pluma-2/preferences/editor/font/use_default_font</applyto> <applyto>/apps/pluma/preferences/editor/font/use_default_font</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>TRUE</default> <default>TRUE</default>
@ -16,8 +16,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/font/editor_font</key> <key>/schemas/apps/pluma/preferences/editor/font/editor_font</key>
<applyto>/apps/pluma-2/preferences/editor/font/editor_font</applyto> <applyto>/apps/pluma/preferences/editor/font/editor_font</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>string</type> <type>string</type>
<locale name="C"> <locale name="C">
@ -31,8 +31,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/colors/scheme</key> <key>/schemas/apps/pluma/preferences/editor/colors/scheme</key>
<applyto>/apps/pluma-2/preferences/editor/colors/scheme</applyto> <applyto>/apps/pluma/preferences/editor/colors/scheme</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>string</type> <type>string</type>
<default>classic</default> <default>classic</default>
@ -44,8 +44,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/save/create_backup_copy</key> <key>/schemas/apps/pluma/preferences/editor/save/create_backup_copy</key>
<applyto>/apps/pluma-2/preferences/editor/save/create_backup_copy</applyto> <applyto>/apps/pluma/preferences/editor/save/create_backup_copy</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>FALSE</default> <default>FALSE</default>
@ -58,8 +58,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/save/auto_save</key> <key>/schemas/apps/pluma/preferences/editor/save/auto_save</key>
<applyto>/apps/pluma-2/preferences/editor/save/auto_save</applyto> <applyto>/apps/pluma/preferences/editor/save/auto_save</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>FALSE</default> <default>FALSE</default>
@ -72,8 +72,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/save/auto_save_interval</key> <key>/schemas/apps/pluma/preferences/editor/save/auto_save_interval</key>
<applyto>/apps/pluma-2/preferences/editor/save/auto_save_interval</applyto> <applyto>/apps/pluma/preferences/editor/save/auto_save_interval</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>int</type> <type>int</type>
<default>10</default> <default>10</default>
@ -86,8 +86,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/undo/undo_actions_limit</key> <key>/schemas/apps/pluma/preferences/editor/undo/undo_actions_limit</key>
<applyto>/apps/pluma-2/preferences/editor/undo/undo_actions_limit</applyto> <applyto>/apps/pluma/preferences/editor/undo/undo_actions_limit</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>int</type> <type>int</type>
<default>25</default> <default>25</default>
@ -100,8 +100,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/undo/max_undo_actions</key> <key>/schemas/apps/pluma/preferences/editor/undo/max_undo_actions</key>
<applyto>/apps/pluma-2/preferences/editor/undo/max_undo_actions</applyto> <applyto>/apps/pluma/preferences/editor/undo/max_undo_actions</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>int</type> <type>int</type>
<default>2000</default> <default>2000</default>
@ -113,8 +113,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/wrap_mode/wrap_mode</key> <key>/schemas/apps/pluma/preferences/editor/wrap_mode/wrap_mode</key>
<applyto>/apps/pluma-2/preferences/editor/wrap_mode/wrap_mode</applyto> <applyto>/apps/pluma/preferences/editor/wrap_mode/wrap_mode</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>string</type> <type>string</type>
<default>GTK_WRAP_WORD</default> <default>GTK_WRAP_WORD</default>
@ -130,8 +130,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/tabs/tabs_size</key> <key>/schemas/apps/pluma/preferences/editor/tabs/tabs_size</key>
<applyto>/apps/pluma-2/preferences/editor/tabs/tabs_size</applyto> <applyto>/apps/pluma/preferences/editor/tabs/tabs_size</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>int</type> <type>int</type>
<default>8</default> <default>8</default>
@ -143,8 +143,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/tabs/insert_spaces</key> <key>/schemas/apps/pluma/preferences/editor/tabs/insert_spaces</key>
<applyto>/apps/pluma-2/preferences/editor/tabs/insert_spaces</applyto> <applyto>/apps/pluma/preferences/editor/tabs/insert_spaces</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>FALSE</default> <default>FALSE</default>
@ -155,8 +155,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/auto_indent/auto_indent</key> <key>/schemas/apps/pluma/preferences/editor/auto_indent/auto_indent</key>
<applyto>/apps/pluma-2/preferences/editor/auto_indent/auto_indent</applyto> <applyto>/apps/pluma/preferences/editor/auto_indent/auto_indent</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>FALSE</default> <default>FALSE</default>
@ -167,8 +167,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/line_numbers/display_line_numbers</key> <key>/schemas/apps/pluma/preferences/editor/line_numbers/display_line_numbers</key>
<applyto>/apps/pluma-2/preferences/editor/line_numbers/display_line_numbers</applyto> <applyto>/apps/pluma/preferences/editor/line_numbers/display_line_numbers</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>FALSE</default> <default>FALSE</default>
@ -180,8 +180,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/current_line/highlight_current_line</key> <key>/schemas/apps/pluma/preferences/editor/current_line/highlight_current_line</key>
<applyto>/apps/pluma-2/preferences/editor/current_line/highlight_current_line</applyto> <applyto>/apps/pluma/preferences/editor/current_line/highlight_current_line</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>FALSE</default> <default>FALSE</default>
@ -192,8 +192,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/bracket_matching/bracket_matching</key> <key>/schemas/apps/pluma/preferences/editor/bracket_matching/bracket_matching</key>
<applyto>/apps/pluma-2/preferences/editor/bracket_matching/bracket_matching</applyto> <applyto>/apps/pluma/preferences/editor/bracket_matching/bracket_matching</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>FALSE</default> <default>FALSE</default>
@ -204,8 +204,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/right_margin/display_right_margin</key> <key>/schemas/apps/pluma/preferences/editor/right_margin/display_right_margin</key>
<applyto>/apps/pluma-2/preferences/editor/right_margin/display_right_margin</applyto> <applyto>/apps/pluma/preferences/editor/right_margin/display_right_margin</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>FALSE</default> <default>FALSE</default>
@ -217,8 +217,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/right_margin/right_margin_position</key> <key>/schemas/apps/pluma/preferences/editor/right_margin/right_margin_position</key>
<applyto>/apps/pluma-2/preferences/editor/right_margin/right_margin_position</applyto> <applyto>/apps/pluma/preferences/editor/right_margin/right_margin_position</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>int</type> <type>int</type>
<default>80</default> <default>80</default>
@ -229,8 +229,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/smart_home_end/smart_home_end</key> <key>/schemas/apps/pluma/preferences/editor/smart_home_end/smart_home_end</key>
<applyto>/apps/pluma-2/preferences/editor/smart_home_end/smart_home_end</applyto> <applyto>/apps/pluma/preferences/editor/smart_home_end/smart_home_end</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>string</type> <type>string</type>
<default>after</default> <default>after</default>
@ -248,8 +248,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/ui/toolbar/toolbar_visible</key> <key>/schemas/apps/pluma/preferences/ui/toolbar/toolbar_visible</key>
<applyto>/apps/pluma-2/preferences/ui/toolbar/toolbar_visible</applyto> <applyto>/apps/pluma/preferences/ui/toolbar/toolbar_visible</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>TRUE</default> <default>TRUE</default>
@ -260,8 +260,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/ui/toolbar/toolbar_buttons_style</key> <key>/schemas/apps/pluma/preferences/ui/toolbar/toolbar_buttons_style</key>
<applyto>/apps/pluma-2/preferences/ui/toolbar/toolbar_buttons_style</applyto> <applyto>/apps/pluma/preferences/ui/toolbar/toolbar_buttons_style</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>string</type> <type>string</type>
<default>@TOOLBAR_STYLE@</default> <default>@TOOLBAR_STYLE@</default>
@ -278,8 +278,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/ui/statusbar/statusbar_visible</key> <key>/schemas/apps/pluma/preferences/ui/statusbar/statusbar_visible</key>
<applyto>/apps/pluma-2/preferences/ui/statusbar/statusbar_visible</applyto> <applyto>/apps/pluma/preferences/ui/statusbar/statusbar_visible</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>TRUE</default> <default>TRUE</default>
@ -291,8 +291,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/ui/side_pane/side_pane_visible</key> <key>/schemas/apps/pluma/preferences/ui/side_pane/side_pane_visible</key>
<applyto>/apps/pluma-2/preferences/ui/side_pane/side_pane_visible</applyto> <applyto>/apps/pluma/preferences/ui/side_pane/side_pane_visible</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>FALSE</default> <default>FALSE</default>
@ -304,8 +304,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/ui/bottom_panel/bottom_panel_visible</key> <key>/schemas/apps/pluma/preferences/ui/bottom_panel/bottom_panel_visible</key>
<applyto>/apps/pluma-2/preferences/ui/bottom_panel/bottom_panel_visible</applyto> <applyto>/apps/pluma/preferences/ui/bottom_panel/bottom_panel_visible</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>FALSE</default> <default>FALSE</default>
@ -317,8 +317,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/print/page/print_syntax_highlighting</key> <key>/schemas/apps/pluma/preferences/print/page/print_syntax_highlighting</key>
<applyto>/apps/pluma-2/preferences/print/page/print_syntax_highlighting</applyto> <applyto>/apps/pluma/preferences/print/page/print_syntax_highlighting</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>TRUE</default> <default>TRUE</default>
@ -330,8 +330,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/print/page/print_header</key> <key>/schemas/apps/pluma/preferences/print/page/print_header</key>
<applyto>/apps/pluma-2/preferences/print/page/print_header</applyto> <applyto>/apps/pluma/preferences/print/page/print_header</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>TRUE</default> <default>TRUE</default>
@ -343,8 +343,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/print/page/print_wrap_mode</key> <key>/schemas/apps/pluma/preferences/print/page/print_wrap_mode</key>
<applyto>/apps/pluma-2/preferences/print/page/print_wrap_mode</applyto> <applyto>/apps/pluma/preferences/print/page/print_wrap_mode</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>string</type> <type>string</type>
<default>GTK_WRAP_WORD</default> <default>GTK_WRAP_WORD</default>
@ -360,8 +360,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/print/page/print_line_numbers</key> <key>/schemas/apps/pluma/preferences/print/page/print_line_numbers</key>
<applyto>/apps/pluma-2/preferences/print/page/print_line_numbers</applyto> <applyto>/apps/pluma/preferences/print/page/print_line_numbers</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>int</type> <type>int</type>
<default>0</default> <default>0</default>
@ -374,8 +374,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/print/fonts/print_font_body_pango</key> <key>/schemas/apps/pluma/preferences/print/fonts/print_font_body_pango</key>
<applyto>/apps/pluma-2/preferences/print/fonts/print_font_body_pango</applyto> <applyto>/apps/pluma/preferences/print/fonts/print_font_body_pango</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>string</type> <type>string</type>
<locale name="C"> <locale name="C">
@ -388,8 +388,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/print/fonts/print_font_header_pango</key> <key>/schemas/apps/pluma/preferences/print/fonts/print_font_header_pango</key>
<applyto>/apps/pluma-2/preferences/print/fonts/print_font_header_pango</applyto> <applyto>/apps/pluma/preferences/print/fonts/print_font_header_pango</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>string</type> <type>string</type>
<locale name="C"> <locale name="C">
@ -403,8 +403,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/print/fonts/print_font_numbers_pango</key> <key>/schemas/apps/pluma/preferences/print/fonts/print_font_numbers_pango</key>
<applyto>/apps/pluma-2/preferences/print/fonts/print_font_numbers_pango</applyto> <applyto>/apps/pluma/preferences/print/fonts/print_font_numbers_pango</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>string</type> <type>string</type>
<locale name="C"> <locale name="C">
@ -418,8 +418,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/ui/recents/max_recents</key> <key>/schemas/apps/pluma/preferences/ui/recents/max_recents</key>
<applyto>/apps/pluma-2/preferences/ui/recents/max_recents</applyto> <applyto>/apps/pluma/preferences/ui/recents/max_recents</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>int</type> <type>int</type>
<default>5</default> <default>5</default>
@ -431,8 +431,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/encodings/auto_detected</key> <key>/schemas/apps/pluma/preferences/encodings/auto_detected</key>
<applyto>/apps/pluma-2/preferences/encodings/auto_detected</applyto> <applyto>/apps/pluma/preferences/encodings/auto_detected</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>list</type> <type>list</type>
<list_type>string</list_type> <list_type>string</list_type>
@ -455,8 +455,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/encodings/shown_in_menu</key> <key>/schemas/apps/pluma/preferences/encodings/shown_in_menu</key>
<applyto>/apps/pluma-2/preferences/encodings/shown_in_menu</applyto> <applyto>/apps/pluma/preferences/encodings/shown_in_menu</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>list</type> <type>list</type>
<list_type>string</list_type> <list_type>string</list_type>
@ -470,8 +470,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/syntax_highlighting/enable</key> <key>/schemas/apps/pluma/preferences/syntax_highlighting/enable</key>
<applyto>/apps/pluma-2/preferences/syntax_highlighting/enable</applyto> <applyto>/apps/pluma/preferences/syntax_highlighting/enable</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>TRUE</default> <default>TRUE</default>
@ -482,8 +482,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/plugins/active-plugins</key> <key>/schemas/apps/pluma/plugins/active-plugins</key>
<applyto>/apps/pluma-2/plugins/active-plugins</applyto> <applyto>/apps/pluma/plugins/active-plugins</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>list</type> <type>list</type>
<list_type>string</list_type> <list_type>string</list_type>
@ -496,8 +496,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/save/writable_vfs_schemes</key> <key>/schemas/apps/pluma/preferences/editor/save/writable_vfs_schemes</key>
<applyto>/apps/pluma-2/preferences/editor/save/writable_vfs_schemes</applyto> <applyto>/apps/pluma/preferences/editor/save/writable_vfs_schemes</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>list</type> <type>list</type>
<list_type>string</list_type> <list_type>string</list_type>
@ -510,8 +510,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/cursor_position/restore_cursor_position</key> <key>/schemas/apps/pluma/preferences/editor/cursor_position/restore_cursor_position</key>
<applyto>/apps/pluma-2/preferences/editor/cursor_position/restore_cursor_position</applyto> <applyto>/apps/pluma/preferences/editor/cursor_position/restore_cursor_position</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>TRUE</default> <default>TRUE</default>
@ -522,8 +522,8 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/preferences/editor/search_highlighting/enable</key> <key>/schemas/apps/pluma/preferences/editor/search_highlighting/enable</key>
<applyto>/apps/pluma-2/preferences/editor/search_highlighting/enable</applyto> <applyto>/apps/pluma/preferences/editor/search_highlighting/enable</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>TRUE</default> <default>TRUE</default>

View File

@ -32,6 +32,9 @@ package() {
make MATECONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install || return 1 make MATECONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install || return 1
# just for easy find
ln -s pluma /usr/bin/mate-text-editor
install -m755 -d "${pkgdir}/usr/share/mateconf/schemas" install -m755 -d "${pkgdir}/usr/share/mateconf/schemas"
mateconf-merge-schema "${pkgdir}/usr/share/mateconf/schemas/${pkgname}.schemas" --domain ${pkgname} ${pkgdir}/etc/mateconf/schemas/*.schemas || return 1 mateconf-merge-schema "${pkgdir}/usr/share/mateconf/schemas/${pkgname}.schemas" --domain ${pkgname} ${pkgdir}/etc/mateconf/schemas/*.schemas || return 1
rm -f ${pkgdir}/etc/mateconf/schemas/*.schemas rm -f ${pkgdir}/etc/mateconf/schemas/*.schemas

View File

@ -23,7 +23,7 @@
<title>Pluma Manual<!-- not using app entity because of lowercase ugliness --></title> <title>Pluma Manual<!-- not using app entity because of lowercase ugliness --></title>
<copyright> <copyright>
<year>2007</year> <year>2007</year>
<holder>MATE Documentation Project</holder> </copyright> <holder>MATE Documentation Project</holder> </copyright>
<copyright> <copyright>
<year>2002</year> <year>2002</year>
<year>2003</year> <year>2003</year>
@ -60,10 +60,10 @@
</affiliation> </affiliation>
</author> </author>
<author> <author>
<firstname>Hal</firstname> <firstname>Hal</firstname>
<surname>Canary</surname> <surname>Canary</surname>
<contrib>Added the Shortcut Keys Table</contrib> <contrib>Added the Shortcut Keys Table</contrib>
</author> </author>
<author> <author>
<firstname>Sun Java Desktop System Documentation Team</firstname> <firstname>Sun Java Desktop System Documentation Team</firstname>
<surname></surname> <surname></surname>
@ -387,7 +387,7 @@
</orderedlist> </orderedlist>
<para>Valid types of <replaceable>URI</replaceable> include <literal>http:</literal>, <literal>ftp:</literal>, <literal>file:</literal>, and all of the methods supported by <literal>mate-vfs</literal>.</para> <para>Valid types of <replaceable>URI</replaceable> include <literal>http:</literal>, <literal>ftp:</literal>, <literal>file:</literal>, and all of the methods supported by <literal>mate-vfs</literal>.</para>
<para>Files from some types of URI are opened as read-only, and any changes you make must be saved to a different location. HTTP only allows files to be read. Files opened from FTP are read-only because because not all FTP servers may correctly work with saving remote files.</para> <para>Files from some types of URI are opened as read-only, and any changes you make must be saved to a different location. HTTP only allows files to be read. Files opened from FTP are read-only because because not all FTP servers may correctly work with saving remote files.</para>
<warning><para>Saving to FTP servers can be enabled with <ulink type="help" url="ghelp:mateconf-editor"><application>Configuration Editor</application></ulink>, setting the key <systemitem>/apps/pluma-2/preferences/editor/save/writable_vfs_schemes</systemitem>, but this may cause errors.</para></warning> <warning><para>Saving to FTP servers can be enabled with <ulink type="help" url="ghelp:mateconf-editor"><application>Configuration Editor</application></ulink>, setting the key <systemitem>/apps/pluma/preferences/editor/save/writable_vfs_schemes</systemitem>, but this may cause errors.</para></warning>
</sect2> </sect2>
<!-- ============= Working with tabs ======================== --> <!-- ============= Working with tabs ======================== -->
@ -526,7 +526,7 @@
<para>The backslash character itself must be escaped if it is being searched for. <para>The backslash character itself must be escaped if it is being searched for.
For example, if you are looking for the "<literal>\n</literal>" literal, you will For example, if you are looking for the "<literal>\n</literal>" literal, you will
have to type "\\n" in the <guilabel>Search for</guilabel> field. Or if you are have to type "\\n" in the <guilabel>Search for</guilabel> field. Or if you are
looking for a sequence of backslashes, you will have to double the number of looking for a sequence of backslashes, you will have to double the number of
searched backslashes.</para> searched backslashes.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -850,7 +850,7 @@
</sect1> </sect1>
<!-- ================ Shortcut Keys ============================= --> <!-- ================ Shortcut Keys ============================= -->
<sect1 id="pluma-shortcutkeys"> <sect1 id="pluma-shortcutkeys">
<title>Shortcut Keys</title> <title>Shortcut Keys</title>
<para>Use shortcut keys to perform common tasks more quickly than with the mouse and menus. The following tables list all of <application>&app;</application>'s shortcut keys.</para> <para>Use shortcut keys to perform common tasks more quickly than with the mouse and menus. The following tables list all of <application>&app;</application>'s shortcut keys.</para>
<para>For more on shortcut keys, see the <ulink type="help" url="ghelp:user-guide?keyboard-skills">Desktop User Guide</ulink>.</para> <para>For more on shortcut keys, see the <ulink type="help" url="ghelp:user-guide?keyboard-skills">Desktop User Guide</ulink>.</para>
@ -866,32 +866,32 @@
<row valign="top"> <row valign="top">
<entry colname="COLSPEC0"> <entry colname="COLSPEC0">
<para>Shortcut Key</para></entry> <para>Shortcut Key</para></entry>
<entry colname="COLSPEC1" align="left"> <entry colname="COLSPEC1" align="left">
<para>Command</para></entry> <para>Command</para></entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + Alt + PageUp</para></entry> <entry><para>Ctrl + Alt + PageUp</para></entry>
<entry><para>Switches to the next tab to the left.</para></entry> <entry><para>Switches to the next tab to the left.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + Alt + PageDown</para></entry> <entry><para>Ctrl + Alt + PageDown</para></entry>
<entry><para>Switches to the next tab to the right.</para></entry> <entry><para>Switches to the next tab to the right.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + W</para></entry> <entry><para>Ctrl + W</para></entry>
<entry><para>Close tab.</para></entry> <entry><para>Close tab.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + Shift + L</para></entry> <entry><para>Ctrl + Shift + L</para></entry>
<entry><para>Save all tabs.</para></entry> <entry><para>Save all tabs.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + Shift + W</para></entry> <entry><para>Ctrl + Shift + W</para></entry>
<entry><para>Close all tabs. </para></entry> <entry><para>Close all tabs. </para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Alt + n</para></entry> <entry><para>Alt + n</para></entry>
<entry><para>Jump to nth tab.</para></entry> <entry><para>Jump to nth tab.</para></entry>
</row> </row>
@ -910,44 +910,44 @@
<row valign="top"> <row valign="top">
<entry colname="COLSPEC0"> <entry colname="COLSPEC0">
<para>Shortcut Key</para></entry> <para>Shortcut Key</para></entry>
<entry colname="COLSPEC1" align="left"> <entry colname="COLSPEC1" align="left">
<para>Command</para></entry> <para>Command</para></entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + N</para></entry> <entry><para>Ctrl + N</para></entry>
<entry><para>Create a new document.</para></entry> <entry><para>Create a new document.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + O</para></entry> <entry><para>Ctrl + O</para></entry>
<entry><para>Open a document.</para></entry> <entry><para>Open a document.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + L</para></entry> <entry><para>Ctrl + L</para></entry>
<entry><para>Open a location.</para></entry> <entry><para>Open a location.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + S</para></entry> <entry><para>Ctrl + S</para></entry>
<entry><para>Save the current document to disk.</para></entry> <entry><para>Save the current document to disk.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + Shift + S</para></entry> <entry><para>Ctrl + Shift + S</para></entry>
<entry><para>Save the current document with a new filename.</para></entry> <entry><para>Save the current document with a new filename.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + P</para></entry> <entry><para>Ctrl + P</para></entry>
<entry><para>Print the current document.</para></entry> <entry><para>Print the current document.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + Shift + P</para></entry> <entry><para>Ctrl + Shift + P</para></entry>
<entry><para>Print preview.</para></entry> <entry><para>Print preview.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + W</para></entry> <entry><para>Ctrl + W</para></entry>
<entry><para>Close the current document.</para></entry> <entry><para>Close the current document.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + Q</para></entry> <entry><para>Ctrl + Q</para></entry>
<entry><para>Quit Pluma.</para></entry> <entry><para>Quit Pluma.</para></entry>
</row> </row>
@ -957,7 +957,7 @@
<!-- ============= Edit ======================= --> <!-- ============= Edit ======================= -->
<bridgehead>Edit</bridgehead> <bridgehead>Edit</bridgehead>
<para>Shortcuts for editing documents:</para> <para>Shortcuts for editing documents:</para>
<informaltable frame="all"> <informaltable frame="all">
<tgroup cols="2" colsep="1" rowsep="1"> <tgroup cols="2" colsep="1" rowsep="1">
<colspec colname="COLSPEC0" colwidth="50*"/> <colspec colname="COLSPEC0" colwidth="50*"/>
@ -966,7 +966,7 @@
<row valign="top"> <row valign="top">
<entry colname="COLSPEC0"> <entry colname="COLSPEC0">
<para>Shortcut Key</para></entry> <para>Shortcut Key</para></entry>
<entry colname="COLSPEC1" align="left"> <entry colname="COLSPEC1" align="left">
<para>Command</para></entry> <para>Command</para></entry>
</row> </row>
</thead> </thead>
@ -1013,7 +1013,7 @@
<!-- ============= Panes ======================= --> <!-- ============= Panes ======================= -->
<bridgehead>Panes</bridgehead> <bridgehead>Panes</bridgehead>
<para>Shortcuts for showing and hiding panes:</para> <para>Shortcuts for showing and hiding panes:</para>
<informaltable frame="all"> <informaltable frame="all">
<tgroup cols="2" colsep="1" rowsep="1"> <tgroup cols="2" colsep="1" rowsep="1">
<colspec colname="COLSPEC0" colwidth="50*"/> <colspec colname="COLSPEC0" colwidth="50*"/>
@ -1022,16 +1022,16 @@
<row valign="top"> <row valign="top">
<entry colname="COLSPEC0"> <entry colname="COLSPEC0">
<para>Shortcut Key</para></entry> <para>Shortcut Key</para></entry>
<entry colname="COLSPEC1" align="left"> <entry colname="COLSPEC1" align="left">
<para>Command</para></entry> <para>Command</para></entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<row valign="top"> <row valign="top">
<entry><para>F9</para></entry> <entry><para>F9</para></entry>
<entry><para>Show/hide the side pane.</para></entry> <entry><para>Show/hide the side pane.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + F9</para></entry> <entry><para>Ctrl + F9</para></entry>
<entry><para>Show/hide the bottom pane.</para></entry> <entry><para>Show/hide the bottom pane.</para></entry>
</row> </row>
@ -1041,7 +1041,7 @@
<!-- ============= Search ======================= --> <!-- ============= Search ======================= -->
<bridgehead>Search</bridgehead> <bridgehead>Search</bridgehead>
<para>Shortcuts for searching:</para> <para>Shortcuts for searching:</para>
<informaltable frame="all"> <informaltable frame="all">
<tgroup cols="2" colsep="1" rowsep="1"> <tgroup cols="2" colsep="1" rowsep="1">
<colspec colname="COLSPEC0" colwidth="50*"/> <colspec colname="COLSPEC0" colwidth="50*"/>
@ -1050,36 +1050,36 @@
<row valign="top"> <row valign="top">
<entry colname="COLSPEC0"> <entry colname="COLSPEC0">
<para>Shortcut Key</para></entry> <para>Shortcut Key</para></entry>
<entry colname="COLSPEC1" align="left"> <entry colname="COLSPEC1" align="left">
<para>Command</para></entry> <para>Command</para></entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + F</para></entry> <entry><para>Ctrl + F</para></entry>
<entry><para>Find a string.</para></entry> <entry><para>Find a string.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + G</para></entry> <entry><para>Ctrl + G</para></entry>
<entry><para>Find the next instance of the string.</para></entry> <entry><para>Find the next instance of the string.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + Shift + G</para></entry> <entry><para>Ctrl + Shift + G</para></entry>
<entry><para>Find the previous instance of the string.</para></entry> <entry><para>Find the previous instance of the string.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + K</para></entry> <entry><para>Ctrl + K</para></entry>
<entry><para>Interactive search.</para></entry> <entry><para>Interactive search.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + H</para></entry> <entry><para>Ctrl + H</para></entry>
<entry><para>Search and replace.</para></entry> <entry><para>Search and replace.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + Shift + K</para></entry> <entry><para>Ctrl + Shift + K</para></entry>
<entry><para>Clear highlight.</para></entry> <entry><para>Clear highlight.</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + I</para></entry> <entry><para>Ctrl + I</para></entry>
<entry><para>Goto line.</para></entry> <entry><para>Goto line.</para></entry>
</row> </row>
@ -1088,7 +1088,7 @@
</informaltable> </informaltable>
<!-- ============= Tools ======================= --> <!-- ============= Tools ======================= -->
<bridgehead>Tools</bridgehead> <bridgehead>Tools</bridgehead>
<para>Shortcuts for tools:</para> <para>Shortcuts for tools:</para>
<informaltable frame="all"> <informaltable frame="all">
<tgroup cols="2" colsep="1" rowsep="1"> <tgroup cols="2" colsep="1" rowsep="1">
<colspec colname="COLSPEC0" colwidth="50*"/> <colspec colname="COLSPEC0" colwidth="50*"/>
@ -1097,32 +1097,32 @@
<row valign="top"> <row valign="top">
<entry colname="COLSPEC0"> <entry colname="COLSPEC0">
<para>Shortcut Key</para></entry> <para>Shortcut Key</para></entry>
<entry colname="COLSPEC1" align="left"> <entry colname="COLSPEC1" align="left">
<para>Command</para></entry> <para>Command</para></entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<row valign="top"> <row valign="top">
<entry><para>Shift + F7</para></entry> <entry><para>Shift + F7</para></entry>
<entry><para>Check spelling (with plugin).</para></entry> <entry><para>Check spelling (with plugin).</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Alt + F12</para></entry> <entry><para>Alt + F12</para></entry>
<entry><para>Remove trailing spaces (with plugin).</para></entry> <entry><para>Remove trailing spaces (with plugin).</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + T</para></entry> <entry><para>Ctrl + T</para></entry>
<entry><para>Indent (with plugin).</para></entry> <entry><para>Indent (with plugin).</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + Shift + T</para></entry> <entry><para>Ctrl + Shift + T</para></entry>
<entry><para>Remove Indent (with plugin).</para></entry> <entry><para>Remove Indent (with plugin).</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>F8</para></entry> <entry><para>F8</para></entry>
<entry><para>Run "make" in current directory (with plugin).</para></entry> <entry><para>Run "make" in current directory (with plugin).</para></entry>
</row> </row>
<row valign="top"> <row valign="top">
<entry><para>Ctrl + Shift + D</para></entry> <entry><para>Ctrl + Shift + D</para></entry>
<entry><para>Directory listing (with plugin).</para></entry> <entry><para>Directory listing (with plugin).</para></entry>
</row> </row>
@ -1140,12 +1140,12 @@
<row valign="top"> <row valign="top">
<entry colname="COLSPEC0"> <entry colname="COLSPEC0">
<para>Shortcut Key</para></entry> <para>Shortcut Key</para></entry>
<entry colname="COLSPEC1" align="left"> <entry colname="COLSPEC1" align="left">
<para>Command</para></entry> <para>Command</para></entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<row valign="top"> <row valign="top">
<entry><para>F1</para></entry> <entry><para>F1</para></entry>
<entry><para>Open <application>&app;</application>'s user manual.</para></entry> <entry><para>Open <application>&app;</application>'s user manual.</para></entry>
</row> </row>
@ -1515,37 +1515,37 @@
<varlistentry><term>Description</term> <varlistentry><term>Description</term>
<listitem> <listitem>
<para>This description is shown in the statusbar when the menu command is chosen.</para> <para>This description is shown in the statusbar when the menu command is chosen.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry><term>Accelerator</term> <varlistentry><term>Accelerator</term>
<listitem> <listitem>
<para>Enter a keyboard shortcut for the command.</para> <para>Enter a keyboard shortcut for the command.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry><term>Commands</term> <varlistentry><term>Commands</term>
<listitem> <listitem>
<para>The actual commands to be run. Several <application>&app;</application> environment variables can be used to pass content to these commands: see <xref linkend="pluma-external-tools-plugin-variables"/>.</para> <para>The actual commands to be run. Several <application>&app;</application> environment variables can be used to pass content to these commands: see <xref linkend="pluma-external-tools-plugin-variables"/>.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry><term>Input</term> <varlistentry><term>Input</term>
<listitem> <listitem>
<para>The content to give to the commands (as <systemitem>stdin</systemitem>): the entire text of the current document, the current selection, line, or word.</para> <para>The content to give to the commands (as <systemitem>stdin</systemitem>): the entire text of the current document, the current selection, line, or word.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry><term>Output</term> <varlistentry><term>Output</term>
<listitem> <listitem>
<para>What to do with the output of the commands: display in the bottom pane, put in a new document, or place in the current document, at the end, at the cursor position, or replacing the selection or the entire document.</para> <para>What to do with the output of the commands: display in the bottom pane, put in a new document, or place in the current document, at the end, at the cursor position, or replacing the selection or the entire document.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry><term>Applicability</term> <varlistentry><term>Applicability</term>
<listitem> <listitem>
<para>Determines which sort of documents can be affected by the command, for example whether saved or not, and local or remote.</para> <para>Determines which sort of documents can be affected by the command, for example whether saved or not, and local or remote.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
</sect3> </sect3>
<sect3 id="pluma-external-tools-plugin-edit"> <sect3 id="pluma-external-tools-plugin-edit">
<title>Editing and Removing Tools</title> <title>Editing and Removing Tools</title>
<para>To edit a tool, select it in the list and make changes to its properties.</para> <para>To edit a tool, select it in the list and make changes to its properties.</para>
@ -1553,8 +1553,8 @@
<para>To restore a built-in tool that you have changed, press <guilabel>Revert</guilabel>.</para> <para>To restore a built-in tool that you have changed, press <guilabel>Revert</guilabel>.</para>
<para>To remove a tool, select it in the list and press <guibutton>Remove</guibutton>. You can not remove built-in tools, only those you have created yourself.</para> <para>To remove a tool, select it in the list and press <guibutton>Remove</guibutton>. You can not remove built-in tools, only those you have created yourself.</para>
</sect3> </sect3>
<sect3 id="pluma-external-tools-plugin-variables"> <sect3 id="pluma-external-tools-plugin-variables">
<title>Variables</title> <title>Variables</title>
<para>You can use the following variables in the <guilabel>Commands</guilabel> field of the command definition:</para> <para>You can use the following variables in the <guilabel>Commands</guilabel> field of the command definition:</para>
<itemizedlist> <itemizedlist>
@ -1583,21 +1583,21 @@
</sect3> </sect3>
</sect2> </sect2>
<sect2 id="pluma-file-browser-plugin"> <sect2 id="pluma-file-browser-plugin">
<title>File Browser Plugin</title> <title>File Browser Plugin</title>
<para>The <application>File Browser</application> Plugin shows your files and folders in the side pane, allowing you to quickly open files.</para> <para>The <application>File Browser</application> Plugin shows your files and folders in the side pane, allowing you to quickly open files.</para>
<para>To view the File Browser, choose <menuchoice><guimenu>View</guimenu> <guimenuitem>Side Pane</guimenuitem> </menuchoice> and then click on the tab showing the File Browser icon at the bottom of the side pane.</para> <para>To view the File Browser, choose <menuchoice><guimenu>View</guimenu> <guimenuitem>Side Pane</guimenuitem> </menuchoice> and then click on the tab showing the File Browser icon at the bottom of the side pane.</para>
<sect3 id="pluma-file-browser-plugin-browsing"> <sect3 id="pluma-file-browser-plugin-browsing">
<title>Browsing your Files</title> <title>Browsing your Files</title>
<para>The File Browser tab initially shows your file manager bookmarks. To browse the contents of any item, double-click it.</para> <para>The File Browser tab initially shows your file manager bookmarks. To browse the contents of any item, double-click it.</para>
<para>To show a parent folder, choose from the drop-down list, or press the up arrow on the File Browser's toolbar.</para> <para>To show a parent folder, choose from the drop-down list, or press the up arrow on the File Browser's toolbar.</para>
<para>To show the folder that contains the document you are currently working on, right-click in the file list and choose <guimenuitem>Set root to active document</guimenuitem>.</para> <para>To show the folder that contains the document you are currently working on, right-click in the file list and choose <guimenuitem>Set root to active document</guimenuitem>.</para>
</sect3> </sect3>
<sect3 id="pluma-file-browser-plugin-open"> <sect3 id="pluma-file-browser-plugin-open">
<title>Opening a File</title> <title>Opening a File</title>
<para>To open a file in <application>&app;</application>, double-click it in the file list.</para> <para>To open a file in <application>&app;</application>, double-click it in the file list.</para>
</sect3> </sect3>
<sect3 id="pluma-file-browser-plugin-create"> <sect3 id="pluma-file-browser-plugin-create">
<title>Creating Files and Folders</title> <title>Creating Files and Folders</title>
<para>To create a new, empty text file in the current folder shown in the browser, right-click in the file list and choose <guimenuitem>New File</guimenuitem>.</para> <para>To create a new, empty text file in the current folder shown in the browser, right-click in the file list and choose <guimenuitem>New File</guimenuitem>.</para>
<para>To create a new folder in the current folder shown in the browser, right-click in the file list and choose <guimenuitem>New Folder</guimenuitem>.</para> <para>To create a new folder in the current folder shown in the browser, right-click in the file list and choose <guimenuitem>New Folder</guimenuitem>.</para>
@ -1716,7 +1716,7 @@
</sect3> </sect3>
</sect2> </sect2>
<sect2 id="pluma-python-console-plugin"> <sect2 id="pluma-python-console-plugin">
<title>Python Console Plugin</title> <title>Python Console Plugin</title>
<para>The <application>Python Console</application> Plugin allows you to run commands in the python programming language from <application>&app;</application>. Enabling the plugin adds a tab to the bottom pane. This shows recent output and a command prompt field.</para> <para>The <application>Python Console</application> Plugin allows you to run commands in the python programming language from <application>&app;</application>. Enabling the plugin adds a tab to the bottom pane. This shows recent output and a command prompt field.</para>
<caution><para>Commands entered into the python console are not checked before they are run. It is therefore possible to hang <application>&app;</application>, for example by entering an infinite loop.</para></caution> <caution><para>Commands entered into the python console are not checked before they are run. It is therefore possible to hang <application>&app;</application>, for example by entering an infinite loop.</para></caution>
@ -1845,14 +1845,14 @@
<listitem> <listitem>
<para><literal>$(<replaceable>cmd</replaceable>)</literal> is replaced by the result of executing <replaceable>cmd</replaceable> in a shell. </para> <para><literal>$(<replaceable>cmd</replaceable>)</literal> is replaced by the result of executing <replaceable>cmd</replaceable> in a shell. </para>
<para><literal>$(<replaceable>n</replaceable>:<replaceable>cmd</replaceable>)</literal> allows you to give this placeholder a reference, where <replaceable>n</replaceable> is any number from 1 upwards. Use <literal>$<replaceable>n</replaceable></literal> to use the output from one shell placeholder as input in another.</para> <para><literal>$(<replaceable>n</replaceable>:<replaceable>cmd</replaceable>)</literal> allows you to give this placeholder a reference, where <replaceable>n</replaceable> is any number from 1 upwards. Use <literal>$<replaceable>n</replaceable></literal> to use the output from one shell placeholder as input in another.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry><term>Python placeholders</term> <varlistentry><term>Python placeholders</term>
<listitem> <listitem>
<para><literal>$&lt;<replaceable>cmd</replaceable>&gt;</literal> is replaced by the result of evaluating <replaceable>cmd</replaceable> in the python interpreter.</para> <para><literal>$&lt;<replaceable>cmd</replaceable>&gt;</literal> is replaced by the result of evaluating <replaceable>cmd</replaceable> in the python interpreter.</para>
<para><literal>$&lt;<replaceable>a</replaceable>:<replaceable>cmd</replaceable>&gt;</literal> specifies another python placeholder as a dependency, where <replaceable>a</replaceable> gives its order in the snippet. This allows you to use python functions defined in another snippet. To specify several dependencies, separate the numbers with commas thus: <literal>$&lt;<replaceable>a</replaceable>,<replaceable>b</replaceable>:<replaceable>cmd</replaceable>&gt;</literal></para> <para><literal>$&lt;<replaceable>a</replaceable>:<replaceable>cmd</replaceable>&gt;</literal> specifies another python placeholder as a dependency, where <replaceable>a</replaceable> gives its order in the snippet. This allows you to use python functions defined in another snippet. To specify several dependencies, separate the numbers with commas thus: <literal>$&lt;<replaceable>a</replaceable>,<replaceable>b</replaceable>:<replaceable>cmd</replaceable>&gt;</literal></para>
<para>To use a variable in all other python snippets, declare it as <literal>global</literal>.</para> <para>To use a variable in all other python snippets, declare it as <literal>global</literal>.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
</sect3> </sect3>

View File

@ -686,12 +686,12 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"الحفظ إلى خوادم إف&#8203;تي&#8203;بي يمكن أن يُفعل من <ulink type=\"help\" " "الحفظ إلى خوادم إف&#8203;تي&#8203;بي يمكن أن يُفعل من <ulink type=\"help\" "
"url=\"ghelp:mateconf-editor\"><application>محرر التشكيل</application></ulink>، " "url=\"ghelp:mateconf-editor\"><application>محرر التشكيل</application></ulink>، "
"ضبط المفتاح <systemitem>/apps/pluma-2/preferences/editor/save/" "ضبط المفتاح <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>، لكن هذا قد يسبب أخطاءً." "writable_vfs_schemes</systemitem>، لكن هذا قد يسبب أخطاءً."
#: C/pluma.xml:395(title) #: C/pluma.xml:395(title)

View File

@ -814,12 +814,12 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"Es pot habilitar el desament a servidors FTP amb l'<ulink type=\"help\" url=" "Es pot habilitar el desament a servidors FTP amb l'<ulink type=\"help\" url="
"\"ghelp:mateconf-editor\"><application>editor de configuració</application></" "\"ghelp:mateconf-editor\"><application>editor de configuració</application></"
"ulink>, en establir la clau <systemitem>/apps/pluma-2/preferences/editor/" "ulink>, en establir la clau <systemitem>/apps/pluma/preferences/editor/"
"save/writable_vfs_schemes</systemitem>, però això pot causar errors." "save/writable_vfs_schemes</systemitem>, però això pot causar errors."
#: C/pluma.xml:395(title) #: C/pluma.xml:395(title)

View File

@ -807,12 +807,12 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"Ukládání na FTP servery můžete povolit v <ulink type=\"help\" url=\"ghelp:" "Ukládání na FTP servery můžete povolit v <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Editoru nastavení</application></ulink> " "mateconf-editor\"><application>Editoru nastavení</application></ulink> "
"nastavením klíče <systemitem>/apps/pluma-2/preferences/editor/save/" "nastavením klíče <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, ale může to způsobovat chyby." "writable_vfs_schemes</systemitem>, ale může to způsobovat chyby."
#: C/pluma.xml:395(title) #: C/pluma.xml:395(title)

View File

@ -824,12 +824,12 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"At gemme til FTP-servere kan aktiveres med <ulink type=\"help\" url=\"ghelp:" "At gemme til FTP-servere kan aktiveres med <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Konfigurationsredigering</application></ulink> " "mateconf-editor\"><application>Konfigurationsredigering</application></ulink> "
"ved at sætte nøglen <systemitem>/apps/pluma-2/preferences/editor/save/" "ved at sætte nøglen <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, men dette kan give fejlmeddelelser." "writable_vfs_schemes</systemitem>, men dette kan give fejlmeddelelser."
#: ../C/pluma.xml:395(title) #: ../C/pluma.xml:395(title)

View File

@ -1,4 +1,4 @@
# German translation of the pluma documentation # German translation of the pluma documentation
# Jan Arne Petersen <jap@gnome.org>, 2007. # Jan Arne Petersen <jap@gnome.org>, 2007.
# Mario Blättermann <mariobl@gnome.org>, 2008-2010. # Mario Blättermann <mariobl@gnome.org>, 2008-2010.
# Andre Klapper <ak-47@gmx.net>, 2009. # Andre Klapper <ak-47@gmx.net>, 2009.
@ -817,13 +817,13 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"Das Speichern auf FTP-Servern kann mit Hilfe des <ulink type=\"help\" url=" "Das Speichern auf FTP-Servern kann mit Hilfe des <ulink type=\"help\" url="
"\"ghelp:mateconf-editor\"><application>Konfigurationsditors</application></" "\"ghelp:mateconf-editor\"><application>Konfigurationsditors</application></"
"ulink> ermöglicht werden. Aktivieren Sie den Schlüssel <systemitem>/apps/" "ulink> ermöglicht werden. Aktivieren Sie den Schlüssel <systemitem>/apps/"
"pluma-2/preferences/editor/save/writable_vfs_schemes</systemitem>, aber " "pluma/preferences/editor/save/writable_vfs_schemes</systemitem>, aber "
"bedenken Sie, dass dies Fehler zur Folge haben kann." "bedenken Sie, dass dies Fehler zur Folge haben kann."
#: C/pluma.xml:395(title) #: C/pluma.xml:395(title)

View File

@ -539,8 +539,8 @@ msgid "Files from some types of URI are opened as read-only, and any changes you
msgstr "Αρχεία από μερικούς τύπους URI ανοίγονται μόνο για ανάγνωση, και ό,τι αλλαγές κάνετε θα πρέπει να αποθηκευτούν σε μια διαφορετική τοποθεσία. Το HTTP επιτρέπει μόνο την ανάγνωση αρχείων. Αρχεία που ανοίγονται από FTP είναι μόνο για ανάγνωση γιατί δεν υποστηρίζουν όλοι οι εξυπηρετητές FTP την αποθήκευση απομακρυσμένων αρχείων." msgstr "Αρχεία από μερικούς τύπους URI ανοίγονται μόνο για ανάγνωση, και ό,τι αλλαγές κάνετε θα πρέπει να αποθηκευτούν σε μια διαφορετική τοποθεσία. Το HTTP επιτρέπει μόνο την ανάγνωση αρχείων. Αρχεία που ανοίγονται από FTP είναι μόνο για ανάγνωση γιατί δεν υποστηρίζουν όλοι οι εξυπηρετητές FTP την αποθήκευση απομακρυσμένων αρχείων."
#: C/pluma.xml:390(para) #: C/pluma.xml:390(para)
msgid "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:mateconf-editor\"><application>Configuration Editor</application></ulink>, setting the key <systemitem>/apps/pluma-2/preferences/editor/save/writable_vfs_schemes</systemitem>, but this may cause errors." msgid "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:mateconf-editor\"><application>Configuration Editor</application></ulink>, setting the key <systemitem>/apps/pluma/preferences/editor/save/writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "Η αποθήκευση σε εξυπηρετητές FTP μπορεί να ενεργοποιηθεί από τον <ulink type=\"help\" url=\"ghelp:mateconf-editor\"><application>Configuration Editor</application></ulink>, με την επιλογή του κλειδιού <systemitem>/apps/pluma-2/preferences/editor/save/writable_vfs_schemes</systemitem>, αλλά αυτό μπορεί να προκαλέσει σφάλματα." msgstr "Η αποθήκευση σε εξυπηρετητές FTP μπορεί να ενεργοποιηθεί από τον <ulink type=\"help\" url=\"ghelp:mateconf-editor\"><application>Configuration Editor</application></ulink>, με την επιλογή του κλειδιού <systemitem>/apps/pluma/preferences/editor/save/writable_vfs_schemes</systemitem>, αλλά αυτό μπορεί να προκαλέσει σφάλματα."
#: C/pluma.xml:395(title) #: C/pluma.xml:395(title)
msgid "Working With Tabs" msgid "Working With Tabs"

View File

@ -823,12 +823,12 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"Guardar a servidores FTP puede activarse con el <ulink type=\"help\" url=" "Guardar a servidores FTP puede activarse con el <ulink type=\"help\" url="
"\"ghelp:mateconf-editor\"><application>Editor de configuración</application></" "\"ghelp:mateconf-editor\"><application>Editor de configuración</application></"
"ulink>, estableciendo la clave <systemitem>/apps/pluma-2/preferences/editor/" "ulink>, estableciendo la clave <systemitem>/apps/pluma/preferences/editor/"
"save/writable_vfs_schemes</systemitem>, pero puede causar errores." "save/writable_vfs_schemes</systemitem>, pero puede causar errores."
#: C/pluma.xml:395(title) #: C/pluma.xml:395(title)

View File

@ -779,12 +779,12 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"FTP-palvelimille tallentaminen voidaan kytkeä päälle <ulink type=\"help\" " "FTP-palvelimille tallentaminen voidaan kytkeä päälle <ulink type=\"help\" "
"url=\"ghelp:mateconf-editor\"><application>Asetusten muokkaimella</" "url=\"ghelp:mateconf-editor\"><application>Asetusten muokkaimella</"
"application></ulink> asettamalla avain <systemitem>/apps/pluma-2/preferences/" "application></ulink> asettamalla avain <systemitem>/apps/pluma/preferences/"
"editor/save/writable_vfs_schemes</systemitem>, mutta tämä voi tuottaa " "editor/save/writable_vfs_schemes</systemitem>, mutta tämä voi tuottaa "
"virheitä." "virheitä."

View File

@ -822,13 +822,13 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"L'enregistrement de fichiers sur les serveurs FTP peut être activé avec " "L'enregistrement de fichiers sur les serveurs FTP peut être activé avec "
"l'<ulink type=\"help\" url=\"ghelp:mateconf-editor\"><application>Éditeur de " "l'<ulink type=\"help\" url=\"ghelp:mateconf-editor\"><application>Éditeur de "
"configuration</application></ulink>, en paramétrant la clé <systemitem>/apps/" "configuration</application></ulink>, en paramétrant la clé <systemitem>/apps/"
"pluma-2/preferences/editor/save/writable_vfs_schemes</systemitem>, mais cela " "pluma/preferences/editor/save/writable_vfs_schemes</systemitem>, mais cela "
"peut provoquer des erreurs." "peut provoquer des erreurs."
#: C/pluma.xml:395(title) #: C/pluma.xml:395(title)

View File

@ -802,12 +802,12 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"Az FTP kiszolgálókra való mentés a <ulink type=\"help\" url=\"ghelp:mateconf-" "Az FTP kiszolgálókra való mentés a <ulink type=\"help\" url=\"ghelp:mateconf-"
"editor\"><application>Konfigurációszerkesztővel</application></ulink> " "editor\"><application>Konfigurációszerkesztővel</application></ulink> "
"kapcsolható be. A <systemitem>/apps/pluma-2/preferences/editor/save/" "kapcsolható be. A <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem> kulcsot kell beállítani, de ez hibákat " "writable_vfs_schemes</systemitem> kulcsot kell beállítani, de ez hibákat "
"okozhat." "okozhat."

View File

@ -819,13 +819,13 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"Il salvataggio di file su server FTP può essere abilitato attraverso " "Il salvataggio di file su server FTP può essere abilitato attraverso "
"l'<ulink type=\"help\" url=\"ghelp:mateconf-editor\"><application>Editor della " "l'<ulink type=\"help\" url=\"ghelp:mateconf-editor\"><application>Editor della "
"configurazione</application></ulink>, impostando la chiave <systemitem>/apps/" "configurazione</application></ulink>, impostando la chiave <systemitem>/apps/"
"pluma-2/preferences/editor/save/writable_vfs_schemes</systemitem>. Questo " "pluma/preferences/editor/save/writable_vfs_schemes</systemitem>. Questo "
"però, potrebbe causare degli errori." "però, potrebbe causare degli errori."
#: C/pluma.xml:395(title) #: C/pluma.xml:395(title)

View File

@ -822,12 +822,12 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"<ulink type=\"help\" url=\"ghelp:" "<ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>設定エディタ</application></ulink>を利用すれば" "mateconf-editor\"><application>設定エディタ</application></ulink>を利用すれば"
"FTP サーバへの保存も利用可能になります。<systemitem>/apps/pluma-2/preferences/" "FTP サーバへの保存も利用可能になります。<systemitem>/apps/pluma/preferences/"
"editor/save/writable_vfs_schemes</systemitem> キーを変更してください。" "editor/save/writable_vfs_schemes</systemitem> キーを変更してください。"
"ただしこれはエラーの原因にもなります。" "ただしこれはエラーの原因にもなります。"

View File

@ -800,12 +800,12 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"FTP 서버로 저장하는 기능은 <ulink type=\"help\" url=\"ghelp:mateconf-editor" "FTP 서버로 저장하는 기능은 <ulink type=\"help\" url=\"ghelp:mateconf-editor"
"\"><application>설정 편집기</application></ulink>로 저장할 수 있게 바꿀 수 있" "\"><application>설정 편집기</application></ulink>로 저장할 수 있게 바꿀 수 있"
"습니다. <systemitem>/apps/pluma-2/preferences/editor/save/" "습니다. <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>키를 설정하면 되지만, 이 기능때문에 오류가 " "writable_vfs_schemes</systemitem>키를 설정하면 되지만, 이 기능때문에 오류가 "
"발생할 수도 있습니다." "발생할 수도 있습니다."

View File

@ -687,7 +687,7 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""

View File

@ -820,12 +820,12 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"Salvar em servidores FTP pode ser habilitado com o <ulink type=\"help\" url=" "Salvar em servidores FTP pode ser habilitado com o <ulink type=\"help\" url="
"\"ghelp:mateconf-editor\"><application>Editor de Configurações</application></" "\"ghelp:mateconf-editor\"><application>Editor de Configurações</application></"
"ulink>, ajustando a chave <systemitem>/apps/pluma-2/preferences/editor/save/" "ulink>, ajustando a chave <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, mas isso pode causar erros." "writable_vfs_schemes</systemitem>, mas isso pode causar erros."
#: C/pluma.xml:395(title) #: C/pluma.xml:395(title)

View File

@ -806,12 +806,12 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"Запись на FTP-серверы может быть включена с помощью приложения <ulink type=" "Запись на FTP-серверы может быть включена с помощью приложения <ulink type="
"\"help\" url=\"ghelp:mateconf-editor\"><application>Редактор конфигурации</" "\"help\" url=\"ghelp:mateconf-editor\"><application>Редактор конфигурации</"
"application></ulink>, установкой ключа <systemitem>/apps/pluma-2/preferences/" "application></ulink>, установкой ключа <systemitem>/apps/pluma/preferences/"
"editor/save/writable_vfs_schemes</systemitem>, но это может приводить к " "editor/save/writable_vfs_schemes</systemitem>, но это может приводить к "
"ошибкам." "ошибкам."

View File

@ -534,8 +534,8 @@ msgid "Files from some types of URI are opened as read-only, and any changes you
msgstr "Filer från vissa typer av uri:er öppnas skrivskyddade, och alla ändringar du gör måste sparas på en annan plats. HTTP tillåter endast filer att bli lästa. Filer öppnade från en FTP-server är skrivskyddade på grund av att inte alla FTP-servrar fungerar korrekt när man sparar fjärrfiler." msgstr "Filer från vissa typer av uri:er öppnas skrivskyddade, och alla ändringar du gör måste sparas på en annan plats. HTTP tillåter endast filer att bli lästa. Filer öppnade från en FTP-server är skrivskyddade på grund av att inte alla FTP-servrar fungerar korrekt när man sparar fjärrfiler."
#: C/pluma.xml:390(para) #: C/pluma.xml:390(para)
msgid "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:mateconf-editor\"><application>Configuration Editor</application></ulink>, setting the key <systemitem>/apps/pluma-2/preferences/editor/save/writable_vfs_schemes</systemitem>, but this may cause errors." msgid "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:mateconf-editor\"><application>Configuration Editor</application></ulink>, setting the key <systemitem>/apps/pluma/preferences/editor/save/writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "Skrivning till FTP-servrar kan aktiveras med <ulink type=\"help\" url=\"ghelp:mateconf-editor\"><application>Konfigurationsredigerare</application></ulink>, ställ in nyckeln <systemitem>/apps/pluma-2/preferences/editor/save/writable_vfs_schemes</systemitem>, men det kan orsaka fel." msgstr "Skrivning till FTP-servrar kan aktiveras med <ulink type=\"help\" url=\"ghelp:mateconf-editor\"><application>Konfigurationsredigerare</application></ulink>, ställ in nyckeln <systemitem>/apps/pluma/preferences/editor/save/writable_vfs_schemes</systemitem>, men det kan orsaka fel."
#: C/pluma.xml:395(title) #: C/pluma.xml:395(title)
msgid "Working With Tabs" msgid "Working With Tabs"

View File

@ -778,7 +778,7 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""

View File

@ -809,12 +809,12 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"Збереження файлів на сервер FTP можна увімкнути у <ulink type=\"help\" url=\"ghelp:" "Збереження файлів на сервер FTP можна увімкнути у <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Редакторі конфігурації</application></ulink>, " "mateconf-editor\"><application>Редакторі конфігурації</application></ulink>, "
"встановивши ключ <systemitem>/apps/pluma-2/preferences/editor/save/" "встановивши ключ <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>. Але подібний режим використання може призводити до помилок." "writable_vfs_schemes</systemitem>. Але подібний режим використання може призводити до помилок."
#: ../C/pluma.xml:388(title) #: ../C/pluma.xml:388(title)

View File

@ -760,12 +760,12 @@ msgstr ""
msgid "" msgid ""
"Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:" "Saving to FTP servers can be enabled with <ulink type=\"help\" url=\"ghelp:"
"mateconf-editor\"><application>Configuration Editor</application></ulink>, " "mateconf-editor\"><application>Configuration Editor</application></ulink>, "
"setting the key <systemitem>/apps/pluma-2/preferences/editor/save/" "setting the key <systemitem>/apps/pluma/preferences/editor/save/"
"writable_vfs_schemes</systemitem>, but this may cause errors." "writable_vfs_schemes</systemitem>, but this may cause errors."
msgstr "" msgstr ""
"保存到远程服务器,可以通过 <ulink type=\"help\" url=\"ghelp:mateconf-editor" "保存到远程服务器,可以通过 <ulink type=\"help\" url=\"ghelp:mateconf-editor"
"\"><application>配置编辑器</application></ulink> 来启用,设置 <systemitem>/" "\"><application>配置编辑器</application></ulink> 来启用,设置 <systemitem>/"
"apps/pluma-2/preferences/editor/save/writable_vfs_schemes</systemitem>,但这" "apps/pluma/preferences/editor/save/writable_vfs_schemes</systemitem>,但这"
"可能导致错误发生。" "可能导致错误发生。"
#: C/pluma.xml:395(title) #: C/pluma.xml:395(title)

View File

@ -1,7 +1,7 @@
icondir = $(datadir)/pluma-2/icons icondir = $(datadir)/pluma/icons
icon_DATA = pluma-plugin.png icon_DATA = pluma-plugin.png
logodir = $(datadir)/pluma-2/logo logodir = $(datadir)/pluma/logo
logo_DATA = pluma-logo.png logo_DATA = pluma-logo.png
EXTRA_DIST = \ EXTRA_DIST = \

View File

@ -1,6 +1,6 @@
# C plugin loader # C plugin loader
loaderdir = $(libdir)/pluma-2/plugin-loaders loaderdir = $(libdir)/pluma/plugin-loaders
INCLUDES = \ INCLUDES = \
-I$(top_srcdir) \ -I$(top_srcdir) \

View File

@ -1,7 +1,7 @@
# C plugin loader # C plugin loader
SUBDIRS = bindings SUBDIRS = bindings
loaderdir = $(libdir)/pluma-2/plugin-loaders loaderdir = $(libdir)/pluma/plugin-loaders
INCLUDES = \ INCLUDES = \
-I$(top_srcdir) \ -I$(top_srcdir) \

View File

@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option) * the Free Software Foundation; either version 2, or (at your option)
* any later version. * any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -35,7 +35,7 @@
#include <pluma/pluma-message-area.h> #include <pluma/pluma-message-area.h>
#endif #endif
#define MATECONF_KEY_BASE "/apps/pluma-2/plugins/checkupdate" #define MATECONF_KEY_BASE "/apps/pluma/plugins/checkupdate"
#define MATECONF_KEY_IGNORE_VERSION MATECONF_KEY_BASE "/ignore_version" #define MATECONF_KEY_IGNORE_VERSION MATECONF_KEY_BASE "/ignore_version"
#define WINDOW_DATA_KEY "PlumaCheckUpdatePluginWindowData" #define WINDOW_DATA_KEY "PlumaCheckUpdatePluginWindowData"
@ -125,13 +125,13 @@ pluma_check_update_plugin_dispose (GObject *object)
mateconf_client_suggest_sync (plugin->priv->mateconf_client, NULL); mateconf_client_suggest_sync (plugin->priv->mateconf_client, NULL);
g_object_unref (G_OBJECT (plugin->priv->mateconf_client)); g_object_unref (G_OBJECT (plugin->priv->mateconf_client));
plugin->priv->mateconf_client = NULL; plugin->priv->mateconf_client = NULL;
} }
pluma_debug_message (DEBUG_PLUGINS, pluma_debug_message (DEBUG_PLUGINS,
"PlumaCheckUpdatePlugin disposing"); "PlumaCheckUpdatePlugin disposing");
G_OBJECT_CLASS (pluma_check_update_plugin_parent_class)->dispose (object); G_OBJECT_CLASS (pluma_check_update_plugin_parent_class)->dispose (object);
} }
@ -153,7 +153,7 @@ set_contents (GtkWidget *infobar,
contents); contents);
#else #else
GtkWidget *content_area; GtkWidget *content_area;
content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (infobar)); content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (infobar));
gtk_container_add (GTK_CONTAINER (content_area), contents); gtk_container_add (GTK_CONTAINER (content_area), contents);
#endif #endif
@ -210,7 +210,7 @@ set_message_area_text_and_icon (GtkWidget *message_area,
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE); gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0, 0.5); gtk_misc_set_alignment (GTK_MISC (secondary_label), 0, 0.5);
} }
set_contents (message_area, hbox_content); set_contents (message_area, hbox_content);
} }
@ -223,7 +223,7 @@ on_response_cb (GtkWidget *infobar,
{ {
GError *error = NULL; GError *error = NULL;
WindowData *data; WindowData *data;
data = g_object_get_data (G_OBJECT (window), data = g_object_get_data (G_OBJECT (window),
WINDOW_DATA_KEY); WINDOW_DATA_KEY);
@ -242,7 +242,7 @@ on_response_cb (GtkWidget *infobar,
dialog = gtk_message_dialog_new (GTK_WINDOW (window), dialog = gtk_message_dialog_new (GTK_WINDOW (window),
GTK_DIALOG_DESTROY_WITH_PARENT, GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR, GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE, GTK_BUTTONS_CLOSE,
_("There was an error displaying the URI.")); _("There was an error displaying the URI."));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
@ -263,7 +263,7 @@ on_response_cb (GtkWidget *infobar,
else if (response_id == GTK_RESPONSE_NO) else if (response_id == GTK_RESPONSE_NO)
{ {
WindowData *data; WindowData *data;
data = g_object_get_data (G_OBJECT (window), WINDOW_DATA_KEY); data = g_object_get_data (G_OBJECT (window), WINDOW_DATA_KEY);
mateconf_client_set_string (data->plugin->priv->mateconf_client, mateconf_client_set_string (data->plugin->priv->mateconf_client,
@ -288,7 +288,7 @@ create_infobar (PlumaWindow *window,
#if !GTK_CHECK_VERSION (2, 17, 1) #if !GTK_CHECK_VERSION (2, 17, 1)
infobar = pluma_message_area_new (); infobar = pluma_message_area_new ();
pluma_message_area_add_stock_button_with_text (PLUMA_MESSAGE_AREA (infobar), pluma_message_area_add_stock_button_with_text (PLUMA_MESSAGE_AREA (infobar),
_("_Download"), _("_Download"),
GTK_STOCK_SAVE, GTK_STOCK_SAVE,
@ -304,7 +304,7 @@ create_infobar (PlumaWindow *window,
GtkWidget *button; GtkWidget *button;
infobar = gtk_info_bar_new (); infobar = gtk_info_bar_new ();
button = pluma_gtk_button_new_with_stock_icon (_("_Download"), button = pluma_gtk_button_new_with_stock_icon (_("_Download"),
GTK_STOCK_SAVE); GTK_STOCK_SAVE);
gtk_widget_show (button); gtk_widget_show (button);
@ -324,7 +324,7 @@ create_infobar (PlumaWindow *window,
gtk_info_bar_add_button (GTK_INFO_BAR (infobar), gtk_info_bar_add_button (GTK_INFO_BAR (infobar),
GTK_STOCK_CANCEL, GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL); GTK_RESPONSE_CANCEL);
gtk_info_bar_set_message_type (GTK_INFO_BAR (infobar), gtk_info_bar_set_message_type (GTK_INFO_BAR (infobar),
GTK_MESSAGE_INFO); GTK_MESSAGE_INFO);
#endif #endif
@ -342,7 +342,7 @@ create_infobar (PlumaWindow *window,
g_signal_connect (infobar, "response", g_signal_connect (infobar, "response",
G_CALLBACK (on_response_cb), G_CALLBACK (on_response_cb),
window); window);
return infobar; return infobar;
} }
@ -351,9 +351,9 @@ pack_infobar (GtkWidget *window,
GtkWidget *infobar) GtkWidget *infobar)
{ {
GtkWidget *vbox; GtkWidget *vbox;
vbox = gtk_bin_get_child (GTK_BIN (window)); vbox = gtk_bin_get_child (GTK_BIN (window));
gtk_box_pack_start (GTK_BOX (vbox), infobar, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), infobar, FALSE, FALSE, 0);
gtk_box_reorder_child (GTK_BOX (vbox), infobar, 2); gtk_box_reorder_child (GTK_BOX (vbox), infobar, 2);
} }
@ -365,20 +365,20 @@ get_file (const gchar *text,
GRegex *regex; GRegex *regex;
GMatchInfo *match_info; GMatchInfo *match_info;
gchar *word = NULL; gchar *word = NULL;
regex = g_regex_new (regex_place, 0, 0, NULL); regex = g_regex_new (regex_place, 0, 0, NULL);
g_regex_match (regex, text, 0, &match_info); g_regex_match (regex, text, 0, &match_info);
while (g_match_info_matches (match_info)) while (g_match_info_matches (match_info))
{ {
g_free (word); g_free (word);
word = g_match_info_fetch (match_info, 0); word = g_match_info_fetch (match_info, 0);
g_match_info_next (match_info, NULL); g_match_info_next (match_info, NULL);
} }
g_match_info_free (match_info); g_match_info_free (match_info);
g_regex_unref (regex); g_regex_unref (regex);
return word; return word;
} }
@ -390,16 +390,16 @@ get_numbers (const gchar *version,
{ {
gchar **split; gchar **split;
gint num = 2; gint num = 2;
if (micro != NULL) if (micro != NULL)
num = 3; num = 3;
split = g_strsplit (version, ".", num); split = g_strsplit (version, ".", num);
*major = atoi (split[0]); *major = atoi (split[0]);
*minor = atoi (split[1]); *minor = atoi (split[1]);
if (micro != NULL) if (micro != NULL)
*micro = atoi (split[2]); *micro = atoi (split[2]);
g_strfreev (split); g_strfreev (split);
} }
@ -411,7 +411,7 @@ newer_version (const gchar *v1,
gboolean newer = FALSE; gboolean newer = FALSE;
gint major1, minor1, micro1; gint major1, minor1, micro1;
gint major2, minor2, micro2; gint major2, minor2, micro2;
if (v1 == NULL || v2 == NULL) if (v1 == NULL || v2 == NULL)
return FALSE; return FALSE;
@ -438,7 +438,7 @@ newer_version (const gchar *v1,
{ {
newer = TRUE; newer = TRUE;
} }
return newer; return newer;
} }
@ -446,21 +446,21 @@ static gchar *
parse_file_version (const gchar *file) parse_file_version (const gchar *file)
{ {
gchar *p, *aux; gchar *p, *aux;
p = (gchar *)file; p = (gchar *)file;
while (*p != '\0' && !g_ascii_isdigit (*p)) while (*p != '\0' && !g_ascii_isdigit (*p))
{ {
p++; p++;
} }
if (*p == '\0') if (*p == '\0')
return NULL; return NULL;
aux = g_strrstr (p, "-"); aux = g_strrstr (p, "-");
if (aux == NULL) if (aux == NULL)
aux = g_strrstr (p, "."); aux = g_strrstr (p, ".");
return g_strndup (p, aux - p); return g_strndup (p, aux - p);
} }
@ -500,13 +500,13 @@ parse_page_file (SoupSession *session,
data = g_object_get_data (G_OBJECT (window), data = g_object_get_data (G_OBJECT (window),
WINDOW_DATA_KEY); WINDOW_DATA_KEY);
file_url = g_strconcat (data->url, file, NULL); file_url = g_strconcat (data->url, file, NULL);
g_free (data->url); g_free (data->url);
data->url = file_url; data->url = file_url;
data->version = g_strdup (file_version); data->version = g_strdup (file_version);
infobar = create_infobar (window, file_version); infobar = create_infobar (window, file_version);
pack_infobar (GTK_WIDGET (window), infobar); pack_infobar (GTK_WIDGET (window), infobar);
gtk_widget_show (infobar); gtk_widget_show (infobar);
@ -530,14 +530,14 @@ is_unstable (const gchar *version)
gchar **split; gchar **split;
gint minor; gint minor;
gboolean unstable = TRUE;; gboolean unstable = TRUE;;
split = g_strsplit (version, ".", 2); split = g_strsplit (version, ".", 2);
minor = atoi (split[1]); minor = atoi (split[1]);
g_strfreev (split); g_strfreev (split);
if ((minor % 2) == 0) if ((minor % 2) == 0)
unstable = FALSE; unstable = FALSE;
return unstable; return unstable;
} }
@ -550,25 +550,25 @@ get_file_page_version (const gchar *text,
GString *string = NULL; GString *string = NULL;
gchar *unstable = NULL; gchar *unstable = NULL;
gchar *stable = NULL; gchar *stable = NULL;
regex = g_regex_new (regex_place, 0, 0, NULL); regex = g_regex_new (regex_place, 0, 0, NULL);
g_regex_match (regex, text, 0, &match_info); g_regex_match (regex, text, 0, &match_info);
while (g_match_info_matches (match_info)) while (g_match_info_matches (match_info))
{ {
gint end; gint end;
gint i; gint i;
g_match_info_fetch_pos (match_info, 0, NULL, &end); g_match_info_fetch_pos (match_info, 0, NULL, &end);
string = g_string_new (""); string = g_string_new ("");
i = end; i = end;
while (text[i] != '/') while (text[i] != '/')
{ {
string = g_string_append_c (string, text[i]); string = g_string_append_c (string, text[i]);
i++; i++;
} }
if (is_unstable (string->str)) if (is_unstable (string->str))
{ {
g_free (unstable); g_free (unstable);
@ -579,16 +579,16 @@ get_file_page_version (const gchar *text,
g_free (stable); g_free (stable);
stable = g_string_free (string, FALSE); stable = g_string_free (string, FALSE);
} }
g_match_info_next (match_info, NULL); g_match_info_next (match_info, NULL);
} }
g_match_info_free (match_info); g_match_info_free (match_info);
g_regex_unref (regex); g_regex_unref (regex);
if ((PLUMA_MINOR_VERSION % 2) == 0) if ((PLUMA_MINOR_VERSION % 2) == 0)
{ {
g_free (unstable); g_free (unstable);
return stable; return stable;
} }
else else
@ -597,13 +597,13 @@ get_file_page_version (const gchar *text,
if (newer_version (stable, unstable, FALSE)) if (newer_version (stable, unstable, FALSE))
{ {
g_free (unstable); g_free (unstable);
return stable; return stable;
} }
else else
{ {
g_free (stable); g_free (stable);
return unstable; return unstable;
} }
} }
@ -621,14 +621,14 @@ parse_page_version (SoupSession *session,
WindowData *data; WindowData *data;
data = g_object_get_data (G_OBJECT (window), WINDOW_DATA_KEY); data = g_object_get_data (G_OBJECT (window), WINDOW_DATA_KEY);
version = get_file_page_version (msg->response_body->data, version = get_file_page_version (msg->response_body->data,
VERSION_PLACE); VERSION_PLACE);
data->url = g_strconcat (PLUMA_URL, version, "/", NULL); data->url = g_strconcat (PLUMA_URL, version, "/", NULL);
g_free (version); g_free (version);
msg2 = soup_message_new ("GET", data->url); msg2 = soup_message_new ("GET", data->url);
soup_session_queue_message (session, msg2, soup_session_queue_message (session, msg2,
(SoupSessionCallback)parse_page_file, (SoupSessionCallback)parse_page_file,
window); window);
@ -647,7 +647,7 @@ impl_activate (PlumaPlugin *plugin,
{ {
SoupMessage *msg; SoupMessage *msg;
WindowData *data; WindowData *data;
pluma_debug (DEBUG_PLUGINS); pluma_debug (DEBUG_PLUGINS);
data = g_slice_new (WindowData); data = g_slice_new (WindowData);
@ -661,7 +661,7 @@ impl_activate (PlumaPlugin *plugin,
free_window_data); free_window_data);
msg = soup_message_new ("GET", PLUMA_URL); msg = soup_message_new ("GET", PLUMA_URL);
soup_session_queue_message (PLUMA_CHECK_UPDATE_PLUGIN (plugin)->priv->session, msg, soup_session_queue_message (PLUMA_CHECK_UPDATE_PLUGIN (plugin)->priv->session, msg,
(SoupSessionCallback)parse_page_version, (SoupSessionCallback)parse_page_version,
window); window);
@ -673,9 +673,9 @@ impl_deactivate (PlumaPlugin *plugin,
{ {
pluma_debug (DEBUG_PLUGINS); pluma_debug (DEBUG_PLUGINS);
soup_session_abort (PLUMA_CHECK_UPDATE_PLUGIN (plugin)->priv->session); soup_session_abort (PLUMA_CHECK_UPDATE_PLUGIN (plugin)->priv->session);
g_object_set_data (G_OBJECT (window), g_object_set_data (G_OBJECT (window),
WINDOW_DATA_KEY, WINDOW_DATA_KEY,
NULL); NULL);
@ -686,7 +686,7 @@ pluma_check_update_plugin_class_init (PlumaCheckUpdatePluginClass *klass)
{ {
GObjectClass *object_class = G_OBJECT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass);
PlumaPluginClass *plugin_class = PLUMA_PLUGIN_CLASS (klass); PlumaPluginClass *plugin_class = PLUMA_PLUGIN_CLASS (klass);
g_type_class_add_private (object_class, sizeof (PlumaCheckUpdatePluginPrivate)); g_type_class_add_private (object_class, sizeof (PlumaCheckUpdatePluginPrivate));
object_class->finalize = pluma_check_update_plugin_finalize; object_class->finalize = pluma_check_update_plugin_finalize;

View File

@ -1,8 +1,8 @@
<mateconfschemafile> <mateconfschemafile>
<schemalist> <schemalist>
<schema> <schema>
<key>/schemas/apps/pluma-2/plugins/checkupdate/ignore_version</key> <key>/schemas/apps/pluma/plugins/checkupdate/ignore_version</key>
<applyto>/apps/pluma-2/plugins/checkupdate/ignore_version</applyto> <applyto>/apps/pluma/plugins/checkupdate/ignore_version</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>string</type> <type>string</type>
<locale name="C"> <locale name="C">

View File

@ -35,13 +35,13 @@ class Singleton(object):
class ToolLibrary(Singleton): class ToolLibrary(Singleton):
def __init_once__(self): def __init_once__(self):
self.locations = [] self.locations = []
def set_locations(self, datadir): def set_locations(self, datadir):
self.locations = [] self.locations = []
if platform.platform() != 'Windows': if platform.platform() != 'Windows':
for d in self.get_xdg_data_dirs(): for d in self.get_xdg_data_dirs():
self.locations.append(os.path.join(d, 'pluma-2', 'plugins', 'externaltools', 'tools')) self.locations.append(os.path.join(d, 'pluma', 'plugins', 'externaltools', 'tools'))
self.locations.append(datadir) self.locations.append(datadir)
@ -53,7 +53,7 @@ class ToolLibrary(Singleton):
if userdir: if userdir:
toolsdir = os.path.join(userdir, 'pluma/tools') toolsdir = os.path.join(userdir, 'pluma/tools')
else: else:
toolsdir = os.path.expanduser('~/.mate2/pluma/tools') toolsdir = os.path.expanduser('~/.config/pluma/tools')
self.locations.insert(0, toolsdir); self.locations.insert(0, toolsdir);
@ -82,7 +82,7 @@ class ToolLibrary(Singleton):
if userdir: if userdir:
filename = os.path.join(userdir, 'pluma/pluma-tools.xml') filename = os.path.join(userdir, 'pluma/pluma-tools.xml')
else: else:
filename = os.path.expanduser('~/.mate2/pluma/pluma-tools.xml') filename = os.path.expanduser('~/.config/pluma/pluma-tools.xml')
if not os.path.isfile(filename): if not os.path.isfile(filename):
return return
@ -226,7 +226,7 @@ class Tool(object):
return [] return []
else: else:
return map(lambda x: x.strip(), value.split(',')) return map(lambda x: x.strip(), value.split(','))
def _from_list(self, value): def _from_list(self, value):
return ','.join(value) return ','.join(value)
@ -266,7 +266,7 @@ class Tool(object):
break break
fp.close() fp.close()
self.changed = False self.changed = False
def _set_property_if_changed(self, key, value): def _set_property_if_changed(self, key, value):
if value != self._properties.get(key): if value != self._properties.get(key):
self._properties[key] = value self._properties[key] = value
@ -350,7 +350,7 @@ class Tool(object):
def set_save_files(self, value): def set_save_files(self, value):
self._set_property_if_changed('Save-files', value) self._set_property_if_changed('Save-files', value)
save_files = property(get_save_files, set_save_files) save_files = property(get_save_files, set_save_files)
def get_languages(self): def get_languages(self):
languages = self._properties.get('Languages') languages = self._properties.get('Languages')
if languages: return languages if languages: return languages
@ -371,7 +371,7 @@ class Tool(object):
for line in fp: for line in fp:
if line.strip() == '': if line.strip() == '':
continue continue
return line.startswith('#!') return line.startswith('#!')
# There is no property for this one because this function is quite # There is no property for this one because this function is quite
@ -417,7 +417,7 @@ class Tool(object):
def save_with_script(self, script): def save_with_script(self, script):
filename = self.library.get_full_path(self.filename, 'w') filename = self.library.get_full_path(self.filename, 'w')
fp = open(filename, 'w', 1) fp = open(filename, 'w', 1)
# Make sure to first print header (shebang, modeline), then # Make sure to first print header (shebang, modeline), then
@ -429,7 +429,7 @@ class Tool(object):
# Parse # Parse
for line in script: for line in script:
line = line.rstrip("\n") line = line.rstrip("\n")
if not inheader: if not inheader:
content.append(line) content.append(line)
elif line.startswith('#!'): elif line.startswith('#!'):
@ -444,10 +444,10 @@ class Tool(object):
# Write out header # Write out header
for line in header: for line in header:
fp.write(line + "\n") fp.write(line + "\n")
fp.write(self._dump_properties()) fp.write(self._dump_properties())
fp.write("\n") fp.write("\n")
for line in content: for line in content:
fp.write(line + "\n") fp.write(line + "\n")

View File

@ -1,5 +1,5 @@
/* /*
* pluma-file-browser-plugin.c - Pluma plugin providing easy file access * pluma-file-browser-plugin.c - Pluma plugin providing easy file access
* from the sidepanel * from the sidepanel
* *
* Copyright (C) 2006 - Jesse van den Kieboom <jesse@icecrew.nl> * Copyright (C) 2006 - Jesse van den Kieboom <jesse@icecrew.nl>
@ -40,7 +40,7 @@
#include "pluma-file-browser-messages.h" #include "pluma-file-browser-messages.h"
#define WINDOW_DATA_KEY "PlumaFileBrowserPluginWindowData" #define WINDOW_DATA_KEY "PlumaFileBrowserPluginWindowData"
#define FILE_BROWSER_BASE_KEY "/apps/pluma-2/plugins/filebrowser" #define FILE_BROWSER_BASE_KEY "/apps/pluma/plugins/filebrowser"
#define CAJA_CLICK_POLICY_BASE_KEY "/apps/caja/preferences" #define CAJA_CLICK_POLICY_BASE_KEY "/apps/caja/preferences"
#define CAJA_CLICK_POLICY_KEY "click_policy" #define CAJA_CLICK_POLICY_KEY "click_policy"
#define CAJA_ENABLE_DELETE_KEY "enable_delete" #define CAJA_ENABLE_DELETE_KEY "enable_delete"
@ -49,12 +49,12 @@
#define PLUMA_FILE_BROWSER_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), PLUMA_TYPE_FILE_BROWSER_PLUGIN, PlumaFileBrowserPluginPrivate)) #define PLUMA_FILE_BROWSER_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), PLUMA_TYPE_FILE_BROWSER_PLUGIN, PlumaFileBrowserPluginPrivate))
struct _PlumaFileBrowserPluginPrivate struct _PlumaFileBrowserPluginPrivate
{ {
gpointer dummy; gpointer dummy;
}; };
typedef struct _PlumaFileBrowserPluginData typedef struct _PlumaFileBrowserPluginData
{ {
PlumaFileBrowserWidget * tree_widget; PlumaFileBrowserWidget * tree_widget;
gulong merge_id; gulong merge_id;
@ -70,11 +70,11 @@ typedef struct _PlumaFileBrowserPluginData
} PlumaFileBrowserPluginData; } PlumaFileBrowserPluginData;
static void on_uri_activated_cb (PlumaFileBrowserWidget * widget, static void on_uri_activated_cb (PlumaFileBrowserWidget * widget,
gchar const *uri, gchar const *uri,
PlumaWindow * window); PlumaWindow * window);
static void on_error_cb (PlumaFileBrowserWidget * widget, static void on_error_cb (PlumaFileBrowserWidget * widget,
guint code, guint code,
gchar const *message, gchar const *message,
PlumaWindow * window); PlumaWindow * window);
static void on_model_set_cb (PlumaFileBrowserView * widget, static void on_model_set_cb (PlumaFileBrowserView * widget,
GParamSpec *arg1, GParamSpec *arg1,
@ -122,7 +122,7 @@ static void
filetree_plugin_finalize (GObject * object) filetree_plugin_finalize (GObject * object)
{ {
//PlumaFileBrowserPlugin * plugin = PLUMA_FILE_BROWSER_PLUGIN (object); //PlumaFileBrowserPlugin * plugin = PLUMA_FILE_BROWSER_PLUGIN (object);
G_OBJECT_CLASS (filetree_plugin_parent_class)->finalize (object); G_OBJECT_CLASS (filetree_plugin_parent_class)->finalize (object);
} }
@ -132,7 +132,7 @@ get_plugin_data (PlumaWindow * window)
return (PlumaFileBrowserPluginData *) (g_object_get_data (G_OBJECT (window), WINDOW_DATA_KEY)); return (PlumaFileBrowserPluginData *) (g_object_get_data (G_OBJECT (window), WINDOW_DATA_KEY));
} }
static void static void
on_end_loading_cb (PlumaFileBrowserStore * store, on_end_loading_cb (PlumaFileBrowserStore * store,
GtkTreeIter * iter, GtkTreeIter * iter,
PlumaFileBrowserPluginData * data) PlumaFileBrowserPluginData * data)
@ -157,13 +157,13 @@ prepare_auto_root (PlumaFileBrowserPluginData *data)
data->end_loading_handle = 0; data->end_loading_handle = 0;
} }
data->end_loading_handle = g_signal_connect (store, data->end_loading_handle = g_signal_connect (store,
"end-loading", "end-loading",
G_CALLBACK (on_end_loading_cb), G_CALLBACK (on_end_loading_cb),
data); data);
} }
static void static void
restore_default_location (PlumaFileBrowserPluginData *data) restore_default_location (PlumaFileBrowserPluginData *data)
{ {
gchar * root; gchar * root;
@ -185,12 +185,12 @@ restore_default_location (PlumaFileBrowserPluginData *data)
pluma_file_browser_widget_show_bookmarks (data->tree_widget); pluma_file_browser_widget_show_bookmarks (data->tree_widget);
return; return;
} }
root = mateconf_client_get_string (client, root = mateconf_client_get_string (client,
FILE_BROWSER_BASE_KEY "/on_load/root", FILE_BROWSER_BASE_KEY "/on_load/root",
NULL); NULL);
virtual_root = mateconf_client_get_string (client, virtual_root = mateconf_client_get_string (client,
FILE_BROWSER_BASE_KEY "/on_load/virtual_root", FILE_BROWSER_BASE_KEY "/on_load/virtual_root",
NULL); NULL);
remote = mateconf_client_get_bool (client, remote = mateconf_client_get_bool (client,
@ -205,7 +205,7 @@ restore_default_location (PlumaFileBrowserPluginData *data)
if (remote || g_file_is_native (file)) { if (remote || g_file_is_native (file)) {
if (virtual_root != NULL && *virtual_root != '\0') { if (virtual_root != NULL && *virtual_root != '\0') {
prepare_auto_root (data); prepare_auto_root (data);
pluma_file_browser_widget_set_root_and_virtual_root (data->tree_widget, pluma_file_browser_widget_set_root_and_virtual_root (data->tree_widget,
root, root,
virtual_root); virtual_root);
} else { } else {
@ -225,7 +225,7 @@ restore_default_location (PlumaFileBrowserPluginData *data)
} }
static void static void
restore_filter (PlumaFileBrowserPluginData * data) restore_filter (PlumaFileBrowserPluginData * data)
{ {
MateConfClient * client; MateConfClient * client;
gchar *filter_mode; gchar *filter_mode;
@ -240,10 +240,10 @@ restore_filter (PlumaFileBrowserPluginData * data)
filter_mode = mateconf_client_get_string (client, filter_mode = mateconf_client_get_string (client,
FILE_BROWSER_BASE_KEY "/filter_mode", FILE_BROWSER_BASE_KEY "/filter_mode",
NULL); NULL);
/* Filter mode */ /* Filter mode */
mode = pluma_file_browser_store_filter_mode_get_default (); mode = pluma_file_browser_store_filter_mode_get_default ();
if (filter_mode != NULL) { if (filter_mode != NULL) {
if (strcmp (filter_mode, "hidden") == 0) { if (strcmp (filter_mode, "hidden") == 0) {
mode = PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN; mode = PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN;
@ -253,12 +253,12 @@ restore_filter (PlumaFileBrowserPluginData * data)
strcmp (filter_mode, "binary_and_hidden") == 0) { strcmp (filter_mode, "binary_and_hidden") == 0) {
mode = PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN | mode = PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN |
PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY; PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY;
} else if (strcmp (filter_mode, "none") == 0 || } else if (strcmp (filter_mode, "none") == 0 ||
*filter_mode == '\0') { *filter_mode == '\0') {
mode = PLUMA_FILE_BROWSER_STORE_FILTER_MODE_NONE; mode = PLUMA_FILE_BROWSER_STORE_FILTER_MODE_NONE;
} }
} }
/* Set the filter mode */ /* Set the filter mode */
pluma_file_browser_store_set_filter_mode ( pluma_file_browser_store_set_filter_mode (
pluma_file_browser_widget_get_browser_store (data->tree_widget), pluma_file_browser_widget_get_browser_store (data->tree_widget),
@ -268,7 +268,7 @@ restore_filter (PlumaFileBrowserPluginData * data)
FILE_BROWSER_BASE_KEY "/filter_pattern", FILE_BROWSER_BASE_KEY "/filter_pattern",
NULL); NULL);
pluma_file_browser_widget_set_filter_pattern (data->tree_widget, pluma_file_browser_widget_set_filter_pattern (data->tree_widget,
pattern); pattern);
g_object_unref (client); g_object_unref (client);
@ -297,17 +297,17 @@ on_click_policy_changed (MateConfClient *client,
PlumaFileBrowserViewClickPolicy policy = PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_DOUBLE; PlumaFileBrowserViewClickPolicy policy = PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_DOUBLE;
PlumaFileBrowserView *view; PlumaFileBrowserView *view;
data = (PlumaFileBrowserPluginData *)(user_data); data = (PlumaFileBrowserPluginData *)(user_data);
value = mateconf_entry_get_value (entry); value = mateconf_entry_get_value (entry);
if (value && value->type == MATECONF_VALUE_STRING) { if (value && value->type == MATECONF_VALUE_STRING) {
click_policy = mateconf_value_get_string (value); click_policy = mateconf_value_get_string (value);
policy = click_policy_from_string (click_policy); policy = click_policy_from_string (click_policy);
} }
view = pluma_file_browser_widget_get_browser_view (data->tree_widget); view = pluma_file_browser_widget_get_browser_view (data->tree_widget);
pluma_file_browser_view_set_click_policy (view, policy); pluma_file_browser_view_set_click_policy (view, policy);
} }
static void static void
@ -320,9 +320,9 @@ on_enable_delete_changed (MateConfClient *client,
PlumaFileBrowserPluginData *data; PlumaFileBrowserPluginData *data;
gboolean enable = FALSE; gboolean enable = FALSE;
data = (PlumaFileBrowserPluginData *)(user_data); data = (PlumaFileBrowserPluginData *)(user_data);
value = mateconf_entry_get_value (entry); value = mateconf_entry_get_value (entry);
if (value && value->type == MATECONF_VALUE_BOOL) if (value && value->type == MATECONF_VALUE_BOOL)
enable = mateconf_value_get_bool (value); enable = mateconf_value_get_bool (value);
@ -339,9 +339,9 @@ on_confirm_trash_changed (MateConfClient *client,
PlumaFileBrowserPluginData *data; PlumaFileBrowserPluginData *data;
gboolean enable = FALSE; gboolean enable = FALSE;
data = (PlumaFileBrowserPluginData *)(user_data); data = (PlumaFileBrowserPluginData *)(user_data);
value = mateconf_entry_get_value (entry); value = mateconf_entry_get_value (entry);
if (value && value->type == MATECONF_VALUE_BOOL) if (value && value->type == MATECONF_VALUE_BOOL)
enable = mateconf_value_get_bool (value); enable = mateconf_value_get_bool (value);
@ -361,7 +361,7 @@ install_caja_prefs (PlumaFileBrowserPluginData *data)
if (!client) if (!client)
return; return;
mateconf_client_add_dir (client, mateconf_client_add_dir (client,
CAJA_CLICK_POLICY_BASE_KEY, CAJA_CLICK_POLICY_BASE_KEY,
MATECONF_CLIENT_PRELOAD_NONE, MATECONF_CLIENT_PRELOAD_NONE,
NULL); NULL);
@ -377,8 +377,8 @@ install_caja_prefs (PlumaFileBrowserPluginData *data)
pluma_file_browser_view_set_click_policy (view, policy); pluma_file_browser_view_set_click_policy (view, policy);
if (pref) { if (pref) {
data->click_policy_handle = data->click_policy_handle =
mateconf_client_notify_add (client, mateconf_client_notify_add (client,
CAJA_CLICK_POLICY_BASE_KEY "/" CAJA_CLICK_POLICY_KEY, CAJA_CLICK_POLICY_BASE_KEY "/" CAJA_CLICK_POLICY_KEY,
on_click_policy_changed, on_click_policy_changed,
data, data,
@ -386,16 +386,16 @@ install_caja_prefs (PlumaFileBrowserPluginData *data)
NULL); NULL);
g_free (pref); g_free (pref);
} }
/* Get enable_delete */ /* Get enable_delete */
prefb = mateconf_client_get_bool (client, prefb = mateconf_client_get_bool (client,
CAJA_CLICK_POLICY_BASE_KEY "/" CAJA_ENABLE_DELETE_KEY, CAJA_CLICK_POLICY_BASE_KEY "/" CAJA_ENABLE_DELETE_KEY,
NULL); NULL);
g_object_set (G_OBJECT (data->tree_widget), "enable-delete", prefb, NULL); g_object_set (G_OBJECT (data->tree_widget), "enable-delete", prefb, NULL);
data->enable_delete_handle = data->enable_delete_handle =
mateconf_client_notify_add (client, mateconf_client_notify_add (client,
CAJA_CLICK_POLICY_BASE_KEY "/" CAJA_ENABLE_DELETE_KEY, CAJA_CLICK_POLICY_BASE_KEY "/" CAJA_ENABLE_DELETE_KEY,
on_enable_delete_changed, on_enable_delete_changed,
data, data,
@ -406,11 +406,11 @@ install_caja_prefs (PlumaFileBrowserPluginData *data)
prefb = mateconf_client_get_bool (client, prefb = mateconf_client_get_bool (client,
CAJA_CLICK_POLICY_BASE_KEY "/" CAJA_CONFIRM_TRASH_KEY, CAJA_CLICK_POLICY_BASE_KEY "/" CAJA_CONFIRM_TRASH_KEY,
NULL); NULL);
data->confirm_trash = prefb; data->confirm_trash = prefb;
data->confirm_trash_handle = data->confirm_trash_handle =
mateconf_client_notify_add (client, mateconf_client_notify_add (client,
CAJA_CLICK_POLICY_BASE_KEY "/" CAJA_CONFIRM_TRASH_KEY, CAJA_CLICK_POLICY_BASE_KEY "/" CAJA_CONFIRM_TRASH_KEY,
on_confirm_trash_changed, on_confirm_trash_changed,
data, data,
@ -458,7 +458,7 @@ on_action_set_active_root (GtkAction * action,
PlumaFileBrowserPluginData *data; PlumaFileBrowserPluginData *data;
data = get_plugin_data (window); data = get_plugin_data (window);
set_root_from_doc (data, set_root_from_doc (data,
pluma_window_get_active_document (window)); pluma_window_get_active_document (window));
} }
@ -499,7 +499,7 @@ on_action_open_terminal (GtkAction * action,
GtkTreeIter iter; GtkTreeIter iter;
PlumaFileBrowserStore * store; PlumaFileBrowserStore * store;
data = get_plugin_data (window); data = get_plugin_data (window);
/* Get the current directory */ /* Get the current directory */
@ -507,33 +507,33 @@ on_action_open_terminal (GtkAction * action,
return; return;
store = pluma_file_browser_widget_get_browser_store (data->tree_widget); store = pluma_file_browser_widget_get_browser_store (data->tree_widget);
gtk_tree_model_get (GTK_TREE_MODEL (store), gtk_tree_model_get (GTK_TREE_MODEL (store),
&iter, &iter,
PLUMA_FILE_BROWSER_STORE_COLUMN_URI, PLUMA_FILE_BROWSER_STORE_COLUMN_URI,
&wd, &wd,
-1); -1);
if (wd == NULL) if (wd == NULL)
return; return;
terminal = get_terminal (); terminal = get_terminal ();
file = g_file_new_for_uri (wd); file = g_file_new_for_uri (wd);
local = g_file_get_path (file); local = g_file_get_path (file);
g_object_unref (file); g_object_unref (file);
argv[0] = terminal; argv[0] = terminal;
argv[1] = NULL; argv[1] = NULL;
g_spawn_async (local, g_spawn_async (local,
argv, argv,
NULL, NULL,
G_SPAWN_SEARCH_PATH, G_SPAWN_SEARCH_PATH,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL); NULL);
g_free (terminal); g_free (terminal);
g_free (wd); g_free (wd);
g_free (local); g_free (local);
@ -551,18 +551,18 @@ on_selection_changed_cb (GtkTreeSelection *selection,
gchar * uri; gchar * uri;
data = get_plugin_data (window); data = get_plugin_data (window);
tree_view = GTK_TREE_VIEW (pluma_file_browser_widget_get_browser_view (data->tree_widget)); tree_view = GTK_TREE_VIEW (pluma_file_browser_widget_get_browser_view (data->tree_widget));
model = gtk_tree_view_get_model (tree_view); model = gtk_tree_view_get_model (tree_view);
if (!PLUMA_IS_FILE_BROWSER_STORE (model)) if (!PLUMA_IS_FILE_BROWSER_STORE (model))
return; return;
sensitive = pluma_file_browser_widget_get_selected_directory (data->tree_widget, &iter); sensitive = pluma_file_browser_widget_get_selected_directory (data->tree_widget, &iter);
if (sensitive) { if (sensitive) {
gtk_tree_model_get (model, &iter, gtk_tree_model_get (model, &iter,
PLUMA_FILE_BROWSER_STORE_COLUMN_URI, PLUMA_FILE_BROWSER_STORE_COLUMN_URI,
&uri, -1); &uri, -1);
sensitive = pluma_utils_uri_has_file_scheme (uri); sensitive = pluma_utils_uri_has_file_scheme (uri);
@ -570,7 +570,7 @@ on_selection_changed_cb (GtkTreeSelection *selection,
} }
gtk_action_set_sensitive ( gtk_action_set_sensitive (
gtk_action_group_get_action (data->single_selection_action_group, gtk_action_group_get_action (data->single_selection_action_group,
"OpenTerminal"), "OpenTerminal"),
sensitive); sensitive);
} }
@ -592,7 +592,7 @@ on_selection_changed_cb (GtkTreeSelection *selection,
" </popup>" \ " </popup>" \
"</ui>" "</ui>"
static GtkActionEntry extra_actions[] = static GtkActionEntry extra_actions[] =
{ {
{"SetActiveRoot", GTK_STOCK_JUMP_TO, N_("_Set root to active document"), {"SetActiveRoot", GTK_STOCK_JUMP_TO, N_("_Set root to active document"),
NULL, NULL,
@ -636,9 +636,9 @@ add_popup_ui (PlumaWindow * window)
gtk_ui_manager_insert_action_group (manager, action_group, 0); gtk_ui_manager_insert_action_group (manager, action_group, 0);
data->single_selection_action_group = action_group; data->single_selection_action_group = action_group;
data->merge_id = gtk_ui_manager_add_ui_from_string (manager, data->merge_id = gtk_ui_manager_add_ui_from_string (manager,
POPUP_UI, POPUP_UI,
-1, -1,
&error); &error);
if (data->merge_id == 0) { if (data->merge_id == 0) {
@ -652,11 +652,11 @@ remove_popup_ui (PlumaWindow * window)
{ {
PlumaFileBrowserPluginData * data; PlumaFileBrowserPluginData * data;
GtkUIManager * manager; GtkUIManager * manager;
data = get_plugin_data (window); data = get_plugin_data (window);
manager = pluma_file_browser_widget_get_ui_manager (data->tree_widget); manager = pluma_file_browser_widget_get_ui_manager (data->tree_widget);
gtk_ui_manager_remove_ui (manager, data->merge_id); gtk_ui_manager_remove_ui (manager, data->merge_id);
gtk_ui_manager_remove_action_group (manager, data->action_group); gtk_ui_manager_remove_action_group (manager, data->action_group);
g_object_unref (data->action_group); g_object_unref (data->action_group);
@ -665,18 +665,18 @@ remove_popup_ui (PlumaWindow * window)
} }
static void static void
impl_updateui (PlumaPlugin * plugin, PlumaWindow * window) impl_updateui (PlumaPlugin * plugin, PlumaWindow * window)
{ {
PlumaFileBrowserPluginData * data; PlumaFileBrowserPluginData * data;
PlumaDocument * doc; PlumaDocument * doc;
data = get_plugin_data (window); data = get_plugin_data (window);
doc = pluma_window_get_active_document (window); doc = pluma_window_get_active_document (window);
gtk_action_set_sensitive (gtk_action_group_get_action (data->action_group, gtk_action_set_sensitive (gtk_action_group_get_action (data->action_group,
"SetActiveRoot"), "SetActiveRoot"),
doc != NULL && doc != NULL &&
!pluma_document_is_untitled (doc)); !pluma_document_is_untitled (doc));
} }
@ -691,7 +691,7 @@ impl_activate (PlumaPlugin * plugin, PlumaWindow * window)
gchar *data_dir; gchar *data_dir;
data = g_new0 (PlumaFileBrowserPluginData, 1); data = g_new0 (PlumaFileBrowserPluginData, 1);
data_dir = pluma_plugin_get_data_dir (plugin); data_dir = pluma_plugin_get_data_dir (plugin);
data->tree_widget = PLUMA_FILE_BROWSER_WIDGET (pluma_file_browser_widget_new (data_dir)); data->tree_widget = PLUMA_FILE_BROWSER_WIDGET (pluma_file_browser_widget_new (data_dir));
g_free (data_dir); g_free (data_dir);
@ -718,17 +718,17 @@ impl_activate (PlumaPlugin * plugin, PlumaWindow * window)
G_CALLBACK (on_confirm_no_trash_cb), G_CALLBACK (on_confirm_no_trash_cb),
window); window);
g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW
(pluma_file_browser_widget_get_browser_view (pluma_file_browser_widget_get_browser_view
(data->tree_widget))), (data->tree_widget))),
"changed", "changed",
G_CALLBACK (on_selection_changed_cb), G_CALLBACK (on_selection_changed_cb),
window); window);
panel = pluma_window_get_side_panel (window); panel = pluma_window_get_side_panel (window);
pixbuf = pluma_file_browser_utils_pixbuf_from_theme("system-file-manager", pixbuf = pluma_file_browser_utils_pixbuf_from_theme("system-file-manager",
GTK_ICON_SIZE_MENU); GTK_ICON_SIZE_MENU);
if (pixbuf) { if (pixbuf) {
image = gtk_image_new_from_pixbuf(pixbuf); image = gtk_image_new_from_pixbuf(pixbuf);
g_object_unref(pixbuf); g_object_unref(pixbuf);
@ -748,10 +748,10 @@ impl_activate (PlumaPlugin * plugin, PlumaWindow * window)
/* Restore filter options */ /* Restore filter options */
restore_filter (data); restore_filter (data);
/* Install caja preferences */ /* Install caja preferences */
install_caja_prefs (data); install_caja_prefs (data);
/* Connect signals to store the last visited location */ /* Connect signals to store the last visited location */
g_signal_connect (pluma_file_browser_widget_get_browser_view (data->tree_widget), g_signal_connect (pluma_file_browser_widget_get_browser_view (data->tree_widget),
"notify::model", "notify::model",
@ -778,7 +778,7 @@ impl_activate (PlumaPlugin * plugin, PlumaWindow * window)
"tab-added", "tab-added",
G_CALLBACK (on_tab_added_cb), G_CALLBACK (on_tab_added_cb),
data); data);
/* Register messages on the bus */ /* Register messages on the bus */
pluma_file_browser_messages_register (window, data->tree_widget); pluma_file_browser_messages_register (window, data->tree_widget);
@ -798,13 +798,13 @@ impl_deactivate (PlumaPlugin * plugin, PlumaWindow * window)
pluma_file_browser_messages_unregister (window); pluma_file_browser_messages_unregister (window);
/* Disconnect signals */ /* Disconnect signals */
g_signal_handlers_disconnect_by_func (window, g_signal_handlers_disconnect_by_func (window,
G_CALLBACK (on_tab_added_cb), G_CALLBACK (on_tab_added_cb),
data); data);
client = mateconf_client_get_default (); client = mateconf_client_get_default ();
mateconf_client_remove_dir (client, CAJA_CLICK_POLICY_BASE_KEY, NULL); mateconf_client_remove_dir (client, CAJA_CLICK_POLICY_BASE_KEY, NULL);
if (data->click_policy_handle) if (data->click_policy_handle)
mateconf_client_notify_remove (client, data->click_policy_handle); mateconf_client_notify_remove (client, data->click_policy_handle);
@ -855,12 +855,12 @@ on_error_cb (PlumaFileBrowserWidget * tree_widget,
gchar * title; gchar * title;
GtkWidget * dlg; GtkWidget * dlg;
PlumaFileBrowserPluginData * data; PlumaFileBrowserPluginData * data;
data = get_plugin_data (window); data = get_plugin_data (window);
/* Do not show the error when the root has been set automatically */ /* Do not show the error when the root has been set automatically */
if (data->auto_root && (code == PLUMA_FILE_BROWSER_ERROR_SET_ROOT || if (data->auto_root && (code == PLUMA_FILE_BROWSER_ERROR_SET_ROOT ||
code == PLUMA_FILE_BROWSER_ERROR_LOAD_DIRECTORY)) code == PLUMA_FILE_BROWSER_ERROR_LOAD_DIRECTORY))
{ {
/* Show bookmarks */ /* Show bookmarks */
pluma_file_browser_widget_show_bookmarks (data->tree_widget); pluma_file_browser_widget_show_bookmarks (data->tree_widget);
@ -895,7 +895,7 @@ on_error_cb (PlumaFileBrowserWidget * tree_widget,
_("An error occurred while setting a root directory"); _("An error occurred while setting a root directory");
break; break;
case PLUMA_FILE_BROWSER_ERROR_LOAD_DIRECTORY: case PLUMA_FILE_BROWSER_ERROR_LOAD_DIRECTORY:
title = title =
_("An error occurred while loading a directory"); _("An error occurred while loading a directory");
break; break;
default: default:
@ -915,7 +915,7 @@ on_error_cb (PlumaFileBrowserWidget * tree_widget,
gtk_widget_destroy (dlg); gtk_widget_destroy (dlg);
} }
static void static void
on_model_set_cb (PlumaFileBrowserView * widget, on_model_set_cb (PlumaFileBrowserView * widget,
GParamSpec *arg1, GParamSpec *arg1,
PlumaWindow * window) PlumaWindow * window)
@ -925,10 +925,10 @@ on_model_set_cb (PlumaFileBrowserView * widget,
MateConfClient * client; MateConfClient * client;
model = gtk_tree_view_get_model (GTK_TREE_VIEW (pluma_file_browser_widget_get_browser_view (data->tree_widget))); model = gtk_tree_view_get_model (GTK_TREE_VIEW (pluma_file_browser_widget_get_browser_view (data->tree_widget)));
if (model == NULL) if (model == NULL)
return; return;
client = mateconf_client_get_default (); client = mateconf_client_get_default ();
mateconf_client_set_bool (client, mateconf_client_set_bool (client,
FILE_BROWSER_BASE_KEY "/on_load/tree_view", FILE_BROWSER_BASE_KEY "/on_load/tree_view",
@ -937,7 +937,7 @@ on_model_set_cb (PlumaFileBrowserView * widget,
g_object_unref (client); g_object_unref (client);
} }
static void static void
on_filter_mode_changed_cb (PlumaFileBrowserStore * model, on_filter_mode_changed_cb (PlumaFileBrowserStore * model,
GParamSpec * param, GParamSpec * param,
PlumaWindow * window) PlumaWindow * window)
@ -946,12 +946,12 @@ on_filter_mode_changed_cb (PlumaFileBrowserStore * model,
PlumaFileBrowserStoreFilterMode mode; PlumaFileBrowserStoreFilterMode mode;
client = mateconf_client_get_default (); client = mateconf_client_get_default ();
if (!client) if (!client)
return; return;
mode = pluma_file_browser_store_get_filter_mode (model); mode = pluma_file_browser_store_get_filter_mode (model);
if ((mode & PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN) && if ((mode & PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN) &&
(mode & PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY)) { (mode & PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY)) {
mateconf_client_set_string (client, mateconf_client_set_string (client,
@ -962,7 +962,7 @@ on_filter_mode_changed_cb (PlumaFileBrowserStore * model,
mateconf_client_set_string (client, mateconf_client_set_string (client,
FILE_BROWSER_BASE_KEY "/filter_mode", FILE_BROWSER_BASE_KEY "/filter_mode",
"hidden", "hidden",
NULL); NULL);
} else if (mode & PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY) { } else if (mode & PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY) {
mateconf_client_set_string (client, mateconf_client_set_string (client,
FILE_BROWSER_BASE_KEY "/filter_mode", FILE_BROWSER_BASE_KEY "/filter_mode",
@ -974,9 +974,9 @@ on_filter_mode_changed_cb (PlumaFileBrowserStore * model,
"none", "none",
NULL); NULL);
} }
g_object_unref (client); g_object_unref (client);
} }
static void static void
@ -993,21 +993,21 @@ on_rename_cb (PlumaFileBrowserStore * store,
GFile * oldfile; GFile * oldfile;
GFile * newfile; GFile * newfile;
gchar * uri; gchar * uri;
/* Find all documents and set its uri to newuri where it matches olduri */ /* Find all documents and set its uri to newuri where it matches olduri */
app = pluma_app_get_default (); app = pluma_app_get_default ();
documents = pluma_app_get_documents (app); documents = pluma_app_get_documents (app);
oldfile = g_file_new_for_uri (olduri); oldfile = g_file_new_for_uri (olduri);
newfile = g_file_new_for_uri (newuri); newfile = g_file_new_for_uri (newuri);
for (item = documents; item; item = item->next) { for (item = documents; item; item = item->next) {
doc = PLUMA_DOCUMENT (item->data); doc = PLUMA_DOCUMENT (item->data);
uri = pluma_document_get_uri (doc); uri = pluma_document_get_uri (doc);
if (!uri) if (!uri)
continue; continue;
docfile = g_file_new_for_uri (uri); docfile = g_file_new_for_uri (uri);
if (g_file_equal (docfile, oldfile)) { if (g_file_equal (docfile, oldfile)) {
@ -1043,7 +1043,7 @@ on_rename_cb (PlumaFileBrowserStore * store,
g_list_free (documents); g_list_free (documents);
} }
static void static void
on_filter_pattern_changed_cb (PlumaFileBrowserWidget * widget, on_filter_pattern_changed_cb (PlumaFileBrowserWidget * widget,
GParamSpec * param, GParamSpec * param,
PlumaWindow * window) PlumaWindow * window)
@ -1052,12 +1052,12 @@ on_filter_pattern_changed_cb (PlumaFileBrowserWidget * widget,
gchar * pattern; gchar * pattern;
client = mateconf_client_get_default (); client = mateconf_client_get_default ();
if (!client) if (!client)
return; return;
g_object_get (G_OBJECT (widget), "filter-pattern", &pattern, NULL); g_object_get (G_OBJECT (widget), "filter-pattern", &pattern, NULL);
if (pattern == NULL) if (pattern == NULL)
mateconf_client_set_string (client, mateconf_client_set_string (client,
FILE_BROWSER_BASE_KEY "/filter_pattern", FILE_BROWSER_BASE_KEY "/filter_pattern",
@ -1072,10 +1072,10 @@ on_filter_pattern_changed_cb (PlumaFileBrowserWidget * widget,
g_free (pattern); g_free (pattern);
} }
static void static void
on_virtual_root_changed_cb (PlumaFileBrowserStore * store, on_virtual_root_changed_cb (PlumaFileBrowserStore * store,
GParamSpec * param, GParamSpec * param,
PlumaWindow * window) PlumaWindow * window)
{ {
PlumaFileBrowserPluginData * data = get_plugin_data (window); PlumaFileBrowserPluginData * data = get_plugin_data (window);
gchar * root; gchar * root;
@ -1083,12 +1083,12 @@ on_virtual_root_changed_cb (PlumaFileBrowserStore * store,
MateConfClient * client; MateConfClient * client;
root = pluma_file_browser_store_get_root (store); root = pluma_file_browser_store_get_root (store);
if (!root) if (!root)
return; return;
client = mateconf_client_get_default (); client = mateconf_client_get_default ();
if (!client) if (!client)
return; return;
@ -1096,7 +1096,7 @@ on_virtual_root_changed_cb (PlumaFileBrowserStore * store,
FILE_BROWSER_BASE_KEY "/on_load/root", FILE_BROWSER_BASE_KEY "/on_load/root",
root, root,
NULL); NULL);
virtual_root = pluma_file_browser_store_get_virtual_root (store); virtual_root = pluma_file_browser_store_get_virtual_root (store);
if (!virtual_root) { if (!virtual_root) {
@ -1105,14 +1105,14 @@ on_virtual_root_changed_cb (PlumaFileBrowserStore * store,
FILE_BROWSER_BASE_KEY "/on_load/virtual_root", FILE_BROWSER_BASE_KEY "/on_load/virtual_root",
root, root,
NULL); NULL);
} else { } else {
mateconf_client_set_string (client, mateconf_client_set_string (client,
FILE_BROWSER_BASE_KEY "/on_load/virtual_root", FILE_BROWSER_BASE_KEY "/on_load/virtual_root",
virtual_root, virtual_root,
NULL); NULL);
} }
g_signal_handlers_disconnect_by_func (window, g_signal_handlers_disconnect_by_func (window,
G_CALLBACK (on_tab_added_cb), G_CALLBACK (on_tab_added_cb),
data); data);
@ -1121,7 +1121,7 @@ on_virtual_root_changed_cb (PlumaFileBrowserStore * store,
g_free (virtual_root); g_free (virtual_root);
} }
static void static void
on_tab_added_cb (PlumaWindow * window, on_tab_added_cb (PlumaWindow * window,
PlumaTab * tab, PlumaTab * tab,
PlumaFileBrowserPluginData * data) PlumaFileBrowserPluginData * data)
@ -1162,7 +1162,7 @@ on_tab_added_cb (PlumaWindow * window,
g_object_unref (client); g_object_unref (client);
/* Disconnect this signal, it's only called once */ /* Disconnect this signal, it's only called once */
g_signal_handlers_disconnect_by_func (window, g_signal_handlers_disconnect_by_func (window,
G_CALLBACK (on_tab_added_cb), G_CALLBACK (on_tab_added_cb),
data); data);
} }
@ -1177,7 +1177,7 @@ get_filename_from_path (GtkTreeModel *model, GtkTreePath *path)
gtk_tree_model_get (model, &iter, gtk_tree_model_get (model, &iter,
PLUMA_FILE_BROWSER_STORE_COLUMN_URI, &uri, PLUMA_FILE_BROWSER_STORE_COLUMN_URI, &uri,
-1); -1);
return pluma_file_browser_utils_uri_basename (uri); return pluma_file_browser_utils_uri_basename (uri);
} }
@ -1202,10 +1202,10 @@ on_confirm_no_trash_cb (PlumaFileBrowserWidget * widget,
} }
result = pluma_file_browser_utils_confirmation_dialog (window, result = pluma_file_browser_utils_confirmation_dialog (window,
GTK_MESSAGE_QUESTION, GTK_MESSAGE_QUESTION,
message, message,
secondary, secondary,
GTK_STOCK_DELETE, GTK_STOCK_DELETE,
NULL); NULL);
g_free (secondary); g_free (secondary);
@ -1240,10 +1240,10 @@ on_confirm_delete_cb (PlumaFileBrowserWidget *widget,
secondary = _("If you delete an item, it is permanently lost."); secondary = _("If you delete an item, it is permanently lost.");
result = pluma_file_browser_utils_confirmation_dialog (window, result = pluma_file_browser_utils_confirmation_dialog (window,
GTK_MESSAGE_QUESTION, GTK_MESSAGE_QUESTION,
message, message,
secondary, secondary,
GTK_STOCK_DELETE, GTK_STOCK_DELETE,
NULL); NULL);
g_free (message); g_free (message);

View File

@ -1,8 +1,8 @@
<mateconfschemafile> <mateconfschemafile>
<schemalist> <schemalist>
<schema> <schema>
<key>/schemas/apps/pluma-2/plugins/filebrowser/on_load/tree_view</key> <key>/schemas/apps/pluma/plugins/filebrowser/on_load/tree_view</key>
<applyto>/apps/pluma-2/plugins/filebrowser/on_load/tree_view</applyto> <applyto>/apps/pluma/plugins/filebrowser/on_load/tree_view</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>TRUE</default> <default>TRUE</default>
@ -13,35 +13,35 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/plugins/filebrowser/on_load/root</key> <key>/schemas/apps/pluma/plugins/filebrowser/on_load/root</key>
<applyto>/apps/pluma-2/plugins/filebrowser/on_load/root</applyto> <applyto>/apps/pluma/plugins/filebrowser/on_load/root</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>string</type> <type>string</type>
<default></default> <default></default>
<locale name="C"> <locale name="C">
<short>File Browser Root Directory</short> <short>File Browser Root Directory</short>
<long>The file browser root directory to use when loading the file <long>The file browser root directory to use when loading the file
browser plugin and onload/tree_view is TRUE.</long> browser plugin and onload/tree_view is TRUE.</long>
</locale> </locale>
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/plugins/filebrowser/on_load/virtual_root</key> <key>/schemas/apps/pluma/plugins/filebrowser/on_load/virtual_root</key>
<applyto>/apps/pluma-2/plugins/filebrowser/on_load/virtual_root</applyto> <applyto>/apps/pluma/plugins/filebrowser/on_load/virtual_root</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>string</type> <type>string</type>
<default></default> <default></default>
<locale name="C"> <locale name="C">
<short>File Browser Virtual Root Directory</short> <short>File Browser Virtual Root Directory</short>
<long>The file browser virtual root directory to use when loading the <long>The file browser virtual root directory to use when loading the
file browser plugin when onload/tree_view is TRUE. The virtual root file browser plugin when onload/tree_view is TRUE. The virtual root
must always be below the actual root.</long> must always be below the actual root.</long>
</locale> </locale>
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/plugins/filebrowser/on_load/enable_remote</key> <key>/schemas/apps/pluma/plugins/filebrowser/on_load/enable_remote</key>
<applyto>/apps/pluma-2/plugins/filebrowser/on_load/enable_remote</applyto> <applyto>/apps/pluma/plugins/filebrowser/on_load/enable_remote</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>FALSE</default> <default>FALSE</default>
@ -52,14 +52,14 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/plugins/filebrowser/open_at_first_doc</key> <key>/schemas/apps/pluma/plugins/filebrowser/open_at_first_doc</key>
<applyto>/apps/pluma-2/plugins/filebrowser/open_at_first_doc</applyto> <applyto>/apps/pluma/plugins/filebrowser/open_at_first_doc</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>bool</type> <type>bool</type>
<default>TRUE</default> <default>TRUE</default>
<locale name="C"> <locale name="C">
<short>Set Location to First Document</short> <short>Set Location to First Document</short>
<long>If TRUE the file browser plugin will view the directory of <long>If TRUE the file browser plugin will view the directory of
the first opened document given that the file browser hasn't been the first opened document given that the file browser hasn't been
used yet. (Thus this generally applies to opening a document from used yet. (Thus this generally applies to opening a document from
the command line or opening it with Caja, etc.)</long> the command line or opening it with Caja, etc.)</long>
@ -67,23 +67,23 @@
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/plugins/filebrowser/filter_mode</key> <key>/schemas/apps/pluma/plugins/filebrowser/filter_mode</key>
<applyto>/apps/pluma-2/plugins/filebrowser/filter_mode</applyto> <applyto>/apps/pluma/plugins/filebrowser/filter_mode</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>string</type> <type>string</type>
<default>hidden_and_binary</default> <default>hidden_and_binary</default>
<locale name="C"> <locale name="C">
<short>File Browser Filter Mode</short> <short>File Browser Filter Mode</short>
<long>This value determines what files get filtered from the file <long>This value determines what files get filtered from the file
browser. Valid values are: none (filter nothing), browser. Valid values are: none (filter nothing),
hidden (filter hidden files), binary (filter binary files) and hidden (filter hidden files), binary (filter binary files) and
hidden_and_binary (filter both hidden and binary files).</long> hidden_and_binary (filter both hidden and binary files).</long>
</locale> </locale>
</schema> </schema>
<schema> <schema>
<key>/schemas/apps/pluma-2/plugins/filebrowser/filter_pattern</key> <key>/schemas/apps/pluma/plugins/filebrowser/filter_pattern</key>
<applyto>/apps/pluma-2/plugins/filebrowser/filter_pattern</applyto> <applyto>/apps/pluma/plugins/filebrowser/filter_pattern</applyto>
<owner>pluma</owner> <owner>pluma</owner>
<type>string</type> <type>string</type>
<default></default> <default></default>

View File

@ -8,7 +8,7 @@
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option) # the Free Software Foundation; either version 2, or (at your option)
# any later version. # any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -29,7 +29,7 @@ import gtk
__all__ = ('PythonConsoleConfig', 'PythonConsoleConfigDialog') __all__ = ('PythonConsoleConfig', 'PythonConsoleConfigDialog')
MATECONF_KEY_BASE = '/apps/pluma-2/plugins/pythonconsole' MATECONF_KEY_BASE = '/apps/pluma/plugins/pythonconsole'
MATECONF_KEY_COMMAND_COLOR = MATECONF_KEY_BASE + '/command-color' MATECONF_KEY_COMMAND_COLOR = MATECONF_KEY_BASE + '/command-color'
MATECONF_KEY_ERROR_COLOR = MATECONF_KEY_BASE + '/error-color' MATECONF_KEY_ERROR_COLOR = MATECONF_KEY_BASE + '/error-color'
@ -99,16 +99,16 @@ class PythonConsoleConfigDialog(object):
self.config.color_command) self.config.color_command)
self.set_colorbutton_color(self._ui.get_object('colorbutton-error'), self.set_colorbutton_color(self._ui.get_object('colorbutton-error'),
self.config.color_error) self.config.color_error)
self._ui.connect_signals(self) self._ui.connect_signals(self)
self._dialog = self._ui.get_object('dialog-config') self._dialog = self._ui.get_object('dialog-config')
self._dialog.show_all() self._dialog.show_all()
else: else:
self._dialog.present() self._dialog.present()
return self._dialog return self._dialog
@staticmethod @staticmethod
def set_colorbutton_color(colorbutton, value): def set_colorbutton_color(colorbutton, value):
try: try:
@ -124,7 +124,7 @@ class PythonConsoleConfigDialog(object):
def on_dialog_config_destroy(self, dialog): def on_dialog_config_destroy(self, dialog):
self._dialog = None self._dialog = None
self._ui = None self._ui = None
def on_colorbutton_command_color_set(self, colorbutton): def on_colorbutton_command_color_set(self, colorbutton):
self.config.color_command = colorbutton.get_color().to_string() self.config.color_command = colorbutton.get_color().to_string()

View File

@ -20,7 +20,7 @@ import os
import shutil import shutil
import gtk import gtk
from gtk import gdk from gtk import gdk
import pluma import pluma
import platform import platform
@ -34,7 +34,7 @@ class SnippetsPlugin(pluma.Plugin):
pluma.Plugin.__init__(self) pluma.Plugin.__init__(self)
self.dlg = None self.dlg = None
library = Library() library = Library()
library.set_accelerator_callback(self.accelerator_activated) library.set_accelerator_callback(self.accelerator_activated)
@ -45,7 +45,7 @@ class SnippetsPlugin(pluma.Plugin):
if userdir: if userdir:
snippetsdir = os.path.join(userdir, 'pluma/snippets') snippetsdir = os.path.join(userdir, 'pluma/snippets')
else: else:
snippetsdir = os.path.expanduser('~/.mate2/pluma/snippets') snippetsdir = os.path.expanduser('~/.config/pluma/snippets')
library.set_dirs(snippetsdir, self.system_dirs()) library.set_dirs(snippetsdir, self.system_dirs())
@ -55,18 +55,18 @@ class SnippetsPlugin(pluma.Plugin):
datadirs = os.environ['XDG_DATA_DIRS'] datadirs = os.environ['XDG_DATA_DIRS']
else: else:
datadirs = '/usr/local/share' + os.pathsep + '/usr/share' datadirs = '/usr/local/share' + os.pathsep + '/usr/share'
dirs = [] dirs = []
for d in datadirs.split(os.pathsep): for d in datadirs.split(os.pathsep):
d = os.path.join(d, 'pluma-2', 'plugins', 'snippets') d = os.path.join(d, 'pluma', 'plugins', 'snippets')
if os.path.isdir(d): if os.path.isdir(d):
dirs.append(d) dirs.append(d)
dirs.append(self.get_data_dir()) dirs.append(self.get_data_dir())
return dirs return dirs
def activate(self, window): def activate(self, window):
data = WindowHelper(self) data = WindowHelper(self)
window._snippets_plugin_data = data window._snippets_plugin_data = data
@ -75,23 +75,23 @@ class SnippetsPlugin(pluma.Plugin):
def deactivate(self, window): def deactivate(self, window):
window._snippets_plugin_data.stop() window._snippets_plugin_data.stop()
window._snippets_plugin_data = None window._snippets_plugin_data = None
def update_ui(self, window): def update_ui(self, window):
window._snippets_plugin_data.update() window._snippets_plugin_data.update()
def create_configure_dialog(self): def create_configure_dialog(self):
if not self.dlg: if not self.dlg:
self.dlg = Manager(self.get_data_dir()) self.dlg = Manager(self.get_data_dir())
else: else:
self.dlg.run() self.dlg.run()
window = pluma.app_get_default().get_active_window() window = pluma.app_get_default().get_active_window()
if window: if window:
self.dlg.dlg.set_transient_for(window) self.dlg.dlg.set_transient_for(window)
return self.dlg.dlg return self.dlg.dlg
def accelerator_activated(self, group, obj, keyval, mod): def accelerator_activated(self, group, obj, keyval, mod):
ret = False ret = False

View File

@ -1,6 +1,6 @@
/* /*
* pluma-sort-plugin.c * pluma-sort-plugin.c
* *
* Original author: Carlo Borreo <borreo@softhome.net> * Original author: Carlo Borreo <borreo@softhome.net>
* Ported to Pluma2 by Lee Mallabone <mate@fonicmonkey.net> * Ported to Pluma2 by Lee Mallabone <mate@fonicmonkey.net>
* *
@ -8,7 +8,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option) * the Free Software Foundation; either version 2, or (at your option)
* any later version. * any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -38,7 +38,7 @@
#define PLUMA_SORT_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), PLUMA_TYPE_SORT_PLUGIN, PlumaSortPluginPrivate)) #define PLUMA_SORT_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), PLUMA_TYPE_SORT_PLUGIN, PlumaSortPluginPrivate))
/* Key in case the plugin ever needs any settings. */ /* Key in case the plugin ever needs any settings. */
#define SORT_BASE_KEY "/apps/pluma-2/plugins/sort" #define SORT_BASE_KEY "/apps/pluma/plugins/sort"
#define WINDOW_DATA_KEY "PlumaSortPluginWindowData" #define WINDOW_DATA_KEY "PlumaSortPluginWindowData"
#define MENU_PATH "/MenuBar/EditMenu/EditOps_6" #define MENU_PATH "/MenuBar/EditMenu/EditOps_6"
@ -232,7 +232,7 @@ sort_cb (GtkAction *action,
gtk_window_set_transient_for (GTK_WINDOW (dialog->dialog), gtk_window_set_transient_for (GTK_WINDOW (dialog->dialog),
GTK_WINDOW (action_data->window)); GTK_WINDOW (action_data->window));
gtk_window_set_modal (GTK_WINDOW (dialog->dialog), gtk_window_set_modal (GTK_WINDOW (dialog->dialog),
TRUE); TRUE);
@ -488,7 +488,7 @@ impl_activate (PlumaPlugin *plugin,
manager = pluma_window_get_ui_manager (window); manager = pluma_window_get_ui_manager (window);
data->ui_action_group = gtk_action_group_new ("PlumaSortPluginActions"); data->ui_action_group = gtk_action_group_new ("PlumaSortPluginActions");
gtk_action_group_set_translation_domain (data->ui_action_group, gtk_action_group_set_translation_domain (data->ui_action_group,
GETTEXT_PACKAGE); GETTEXT_PACKAGE);
gtk_action_group_add_actions_full (data->ui_action_group, gtk_action_group_add_actions_full (data->ui_action_group,
action_entries, action_entries,
@ -502,17 +502,17 @@ impl_activate (PlumaPlugin *plugin,
data->ui_id = gtk_ui_manager_new_merge_id (manager); data->ui_id = gtk_ui_manager_new_merge_id (manager);
g_object_set_data_full (G_OBJECT (window), g_object_set_data_full (G_OBJECT (window),
WINDOW_DATA_KEY, WINDOW_DATA_KEY,
data, data,
(GDestroyNotify) free_window_data); (GDestroyNotify) free_window_data);
gtk_ui_manager_add_ui (manager, gtk_ui_manager_add_ui (manager,
data->ui_id, data->ui_id,
MENU_PATH, MENU_PATH,
"Sort",
"Sort", "Sort",
GTK_UI_MANAGER_MENUITEM, "Sort",
GTK_UI_MANAGER_MENUITEM,
FALSE); FALSE);
update_ui_real (window, update_ui_real (window,

View File

@ -2,7 +2,7 @@
* pluma-taglist-plugin-parser.c * pluma-taglist-plugin-parser.c
* This file is part of pluma * This file is part of pluma
* *
* Copyright (C) 2002-2005 - Paolo Maggi * Copyright (C) 2002-2005 - Paolo Maggi
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -16,14 +16,14 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, * Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
/* /*
* Modified by the pluma Team, 2002-2005. See the AUTHORS file for a * Modified by the pluma Team, 2002-2005. See the AUTHORS file for a
* list of people on the pluma Team. * list of people on the pluma Team.
* See the ChangeLog files for a list of changes. * See the ChangeLog files for a list of changes.
* *
* $Id$ * $Id$
*/ */
@ -44,19 +44,19 @@
#include "pluma-taglist-plugin-parser.h" #include "pluma-taglist-plugin-parser.h"
/* we screwed up so we still look here for compatibility */ /* we screwed up so we still look here for compatibility */
#define USER_PLUMA_TAGLIST_PLUGIN_LOCATION_LEGACY ".pluma-2/plugins/taglist/" #define USER_PLUMA_TAGLIST_PLUGIN_LOCATION_LEGACY ".pluma/plugins/taglist/"
#define USER_PLUMA_TAGLIST_PLUGIN_LOCATION "pluma/taglist/" #define USER_PLUMA_TAGLIST_PLUGIN_LOCATION "pluma/taglist/"
TagList *taglist = NULL; TagList *taglist = NULL;
static gint taglist_ref_count = 0; static gint taglist_ref_count = 0;
static gboolean parse_tag (Tag *tag, xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur); static gboolean parse_tag (Tag *tag, xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur);
static gboolean parse_tag_group (TagGroup *tg, const gchar *fn, static gboolean parse_tag_group (TagGroup *tg, const gchar *fn,
xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,
gboolean sort); gboolean sort);
static TagGroup* get_tag_group (const gchar* filename, xmlDocPtr doc, static TagGroup* get_tag_group (const gchar* filename, xmlDocPtr doc,
xmlNsPtr ns, xmlNodePtr cur); xmlNsPtr ns, xmlNodePtr cur);
static TagList* lookup_best_lang (TagList *taglist, const gchar *filename, static TagList* lookup_best_lang (TagList *taglist, const gchar *filename,
xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur); xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur);
static TagList *parse_taglist_file (const gchar* filename); static TagList *parse_taglist_file (const gchar* filename);
static TagList *parse_taglist_dir (const gchar *dir); static TagList *parse_taglist_dir (const gchar *dir);
@ -65,19 +65,19 @@ static void free_tag (Tag *tag);
static void free_tag_group (TagGroup *tag_group); static void free_tag_group (TagGroup *tag_group);
static gboolean static gboolean
parse_tag (Tag *tag, xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) parse_tag (Tag *tag, xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
{ {
/* /*
pluma_debug_message (DEBUG_PLUGINS, " Tag name: %s", tag->name); pluma_debug_message (DEBUG_PLUGINS, " Tag name: %s", tag->name);
*/ */
/* We don't care what the top level element name is */ /* We don't care what the top level element name is */
cur = cur->xmlChildrenNode; cur = cur->xmlChildrenNode;
while (cur != NULL) while (cur != NULL)
{ {
if ((!xmlStrcmp (cur->name, (const xmlChar *)"Begin")) && if ((!xmlStrcmp (cur->name, (const xmlChar *)"Begin")) &&
(cur->ns == ns)) (cur->ns == ns))
{ {
tag->begin = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); tag->begin = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1);
/* /*
pluma_debug_message (DEBUG_PLUGINS, " - Begin: %s", tag->begin); pluma_debug_message (DEBUG_PLUGINS, " - Begin: %s", tag->begin);
@ -85,7 +85,7 @@ parse_tag (Tag *tag, xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
} }
if ((!xmlStrcmp (cur->name, (const xmlChar *)"End")) && if ((!xmlStrcmp (cur->name, (const xmlChar *)"End")) &&
(cur->ns == ns)) (cur->ns == ns))
{ {
tag->end = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); tag->end = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1);
/* /*
@ -107,26 +107,26 @@ tags_cmp (gconstpointer a, gconstpointer b)
{ {
gchar *tag_a = (gchar*)((Tag *)a)->name; gchar *tag_a = (gchar*)((Tag *)a)->name;
gchar *tag_b = (gchar*)((Tag *)b)->name; gchar *tag_b = (gchar*)((Tag *)b)->name;
return g_utf8_collate (tag_a, tag_b); return g_utf8_collate (tag_a, tag_b);
} }
static gboolean static gboolean
parse_tag_group (TagGroup *tg, const gchar* fn, xmlDocPtr doc, parse_tag_group (TagGroup *tg, const gchar* fn, xmlDocPtr doc,
xmlNsPtr ns, xmlNodePtr cur, gboolean sort) xmlNsPtr ns, xmlNodePtr cur, gboolean sort)
{ {
pluma_debug_message (DEBUG_PLUGINS, "Parse TagGroup: %s", tg->name); pluma_debug_message (DEBUG_PLUGINS, "Parse TagGroup: %s", tg->name);
/* We don't care what the top level element name is */ /* We don't care what the top level element name is */
cur = cur->xmlChildrenNode; cur = cur->xmlChildrenNode;
while (cur != NULL) while (cur != NULL)
{ {
if ((xmlStrcmp (cur->name, (const xmlChar *) "Tag")) || (cur->ns != ns)) if ((xmlStrcmp (cur->name, (const xmlChar *) "Tag")) || (cur->ns != ns))
{ {
g_warning ("The tag list file '%s' is of the wrong type, " g_warning ("The tag list file '%s' is of the wrong type, "
"was '%s', 'Tag' expected.", fn, cur->name); "was '%s', 'Tag' expected.", fn, cur->name);
return FALSE; return FALSE;
} }
else else
@ -160,30 +160,30 @@ parse_tag_group (TagGroup *tg, const gchar* fn, xmlDocPtr doc,
{ {
/* Error parsing Tag */ /* Error parsing Tag */
g_warning ("The tag list file '%s' is of the wrong type, " g_warning ("The tag list file '%s' is of the wrong type, "
"error parsing Tag '%s' in TagGroup '%s'.", "error parsing Tag '%s' in TagGroup '%s'.",
fn, tag->name, tg->name); fn, tag->name, tg->name);
free_tag (tag); free_tag (tag);
return FALSE; return FALSE;
} }
} }
} }
cur = cur->next; cur = cur->next;
} }
if (sort) if (sort)
tg->tags = g_list_sort (tg->tags, tags_cmp); tg->tags = g_list_sort (tg->tags, tags_cmp);
else else
tg->tags = g_list_reverse (tg->tags); tg->tags = g_list_reverse (tg->tags);
return TRUE; return TRUE;
} }
static TagGroup* static TagGroup*
get_tag_group (const gchar* filename, xmlDocPtr doc, get_tag_group (const gchar* filename, xmlDocPtr doc,
xmlNsPtr ns, xmlNodePtr cur) xmlNsPtr ns, xmlNodePtr cur)
{ {
TagGroup *tag_group; TagGroup *tag_group;
xmlChar *sort_str; xmlChar *sort_str;
@ -219,27 +219,27 @@ get_tag_group (const gchar* filename, xmlDocPtr doc,
/* Name found */ /* Name found */
gboolean exists = FALSE; gboolean exists = FALSE;
GList *t = taglist->tag_groups; GList *t = taglist->tag_groups;
/* Check if the tag group already exists */ /* Check if the tag group already exists */
while (t && !exists) while (t && !exists)
{ {
gchar *tgn = (gchar*)((TagGroup*)(t->data))->name; gchar *tgn = (gchar*)((TagGroup*)(t->data))->name;
if (strcmp (tgn, (gchar*)tag_group->name) == 0) if (strcmp (tgn, (gchar*)tag_group->name) == 0)
{ {
pluma_debug_message (DEBUG_PLUGINS, pluma_debug_message (DEBUG_PLUGINS,
"Tag group '%s' already exists.", tgn); "Tag group '%s' already exists.", tgn);
exists = TRUE; exists = TRUE;
free_tag_group (tag_group); free_tag_group (tag_group);
} }
t = g_list_next (t); t = g_list_next (t);
} }
if (!exists) if (!exists)
{ {
/* Parse tag group */ /* Parse tag group */
if (parse_tag_group (tag_group, filename, doc, ns, cur, sort)) if (parse_tag_group (tag_group, filename, doc, ns, cur, sort))
{ {
@ -249,7 +249,7 @@ get_tag_group (const gchar* filename, xmlDocPtr doc,
{ {
/* Error parsing TagGroup */ /* Error parsing TagGroup */
g_warning ("The tag list file '%s' is of the wrong type, " g_warning ("The tag list file '%s' is of the wrong type, "
"error parsing TagGroup '%s'.", "error parsing TagGroup '%s'.",
filename, tag_group->name); filename, tag_group->name);
free_tag_group (tag_group); free_tag_group (tag_group);
@ -264,11 +264,11 @@ groups_cmp (gconstpointer a, gconstpointer b)
{ {
gchar *g_a = (gchar *)((TagGroup *)a)->name; gchar *g_a = (gchar *)((TagGroup *)a)->name;
gchar *g_b = (gchar *)((TagGroup *)b)->name; gchar *g_b = (gchar *)((TagGroup *)b)->name;
return g_utf8_collate (g_a, g_b); return g_utf8_collate (g_a, g_b);
} }
/* /*
* tags file is localized by intltool-merge below. * tags file is localized by intltool-merge below.
* *
* <pluma:TagGroup name="XSLT - Elements"> * <pluma:TagGroup name="XSLT - Elements">
@ -284,8 +284,8 @@ groups_cmp (gconstpointer a, gconstpointer b)
* Therefore need to pick up the best lang on the current locale. * Therefore need to pick up the best lang on the current locale.
*/ */
static TagList* static TagList*
lookup_best_lang (TagList *taglist, const gchar *filename, lookup_best_lang (TagList *taglist, const gchar *filename,
xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
{ {
TagGroup *best_tag_group = NULL; TagGroup *best_tag_group = NULL;
@ -295,13 +295,13 @@ lookup_best_lang (TagList *taglist, const gchar *filename,
/* /*
* Walk the tree. * Walk the tree.
* *
* First level we expect a list TagGroup * First level we expect a list TagGroup
*/ */
cur = cur->xmlChildrenNode; cur = cur->xmlChildrenNode;
while (cur != NULL) while (cur != NULL)
{ {
if ((xmlStrcmp (cur->name, (const xmlChar *) "TagGroup")) || (cur->ns != ns)) if ((xmlStrcmp (cur->name, (const xmlChar *) "TagGroup")) || (cur->ns != ns))
{ {
g_warning ("The tag list file '%s' is of the wrong type, " g_warning ("The tag list file '%s' is of the wrong type, "
"was '%s', 'TagGroup' expected.", filename, cur->name); "was '%s', 'TagGroup' expected.", filename, cur->name);
@ -321,14 +321,14 @@ lookup_best_lang (TagList *taglist, const gchar *filename,
lang = (gchar*) xmlGetProp (cur, (const xmlChar*) "lang"); lang = (gchar*) xmlGetProp (cur, (const xmlChar*) "lang");
cur_lanking = 1; cur_lanking = 1;
/* /*
* When found a new TagGroup, prepend the best * When found a new TagGroup, prepend the best
* tag_group to taglist. In the current intltool-merge, * tag_group to taglist. In the current intltool-merge,
* the first section is the default lang NULL. * the first section is the default lang NULL.
*/ */
if (lang == NULL) { if (lang == NULL) {
if (best_tag_group != NULL) { if (best_tag_group != NULL) {
taglist->tag_groups = taglist->tag_groups =
g_list_prepend (taglist->tag_groups, best_tag_group); g_list_prepend (taglist->tag_groups, best_tag_group);
} }
@ -336,8 +336,8 @@ lookup_best_lang (TagList *taglist, const gchar *filename,
best_lanking = -1; best_lanking = -1;
} }
/* /*
* If already find the best TagGroup on the current * If already find the best TagGroup on the current
* locale, ignore the logic. * locale, ignore the logic.
*/ */
if (best_lanking != -1 && best_lanking <= cur_lanking) { if (best_lanking != -1 && best_lanking <= cur_lanking) {
@ -351,20 +351,20 @@ lookup_best_lang (TagList *taglist, const gchar *filename,
const gchar *best_lang = langs_pointer[i]; const gchar *best_lang = langs_pointer[i];
/* /*
* if launch on C, POSIX locale or does * if launch on C, POSIX locale or does
* not find the best lang on the current locale, * not find the best lang on the current locale,
* this is called. * this is called.
* g_get_language_names returns lang * g_get_language_names returns lang
* lists with C locale. * lists with C locale.
*/ */
if (lang == NULL && if (lang == NULL &&
(!g_ascii_strcasecmp (best_lang, "C") || (!g_ascii_strcasecmp (best_lang, "C") ||
!g_ascii_strcasecmp (best_lang, "POSIX"))) !g_ascii_strcasecmp (best_lang, "POSIX")))
{ {
tag_group = get_tag_group (filename, doc, ns, cur); tag_group = get_tag_group (filename, doc, ns, cur);
if (tag_group != NULL) if (tag_group != NULL)
{ {
if (best_tag_group !=NULL) if (best_tag_group !=NULL)
free_tag_group (best_tag_group); free_tag_group (best_tag_group);
best_lanking = cur_lanking; best_lanking = cur_lanking;
best_tag_group = tag_group; best_tag_group = tag_group;
@ -384,7 +384,7 @@ lookup_best_lang (TagList *taglist, const gchar *filename,
tag_group = get_tag_group (filename, doc, ns, cur); tag_group = get_tag_group (filename, doc, ns, cur);
if (tag_group != NULL) if (tag_group != NULL)
{ {
if (best_tag_group !=NULL) if (best_tag_group !=NULL)
free_tag_group (best_tag_group); free_tag_group (best_tag_group);
best_lanking = cur_lanking; best_lanking = cur_lanking;
best_tag_group = tag_group; best_tag_group = tag_group;
@ -396,18 +396,18 @@ lookup_best_lang (TagList *taglist, const gchar *filename,
if (lang) g_free (lang); if (lang) g_free (lang);
} /* End of else */ } /* End of else */
cur = cur->next; cur = cur->next;
} /* End of while (cur != NULL) */ } /* End of while (cur != NULL) */
/* Prepend TagGroup to TagList */ /* Prepend TagGroup to TagList */
if (best_tag_group != NULL) { if (best_tag_group != NULL) {
taglist->tag_groups = taglist->tag_groups =
g_list_prepend (taglist->tag_groups, best_tag_group); g_list_prepend (taglist->tag_groups, best_tag_group);
} }
taglist->tag_groups = g_list_sort (taglist->tag_groups, groups_cmp); taglist->tag_groups = g_list_sort (taglist->tag_groups, groups_cmp);
return taglist; return taglist;
} }
@ -415,7 +415,7 @@ static TagList *
parse_taglist_file (const gchar* filename) parse_taglist_file (const gchar* filename)
{ {
xmlDocPtr doc; xmlDocPtr doc;
xmlNsPtr ns; xmlNsPtr ns;
xmlNodePtr cur; xmlNodePtr cur;
@ -427,54 +427,54 @@ parse_taglist_file (const gchar* filename)
* build an XML tree from a the file; * build an XML tree from a the file;
*/ */
doc = xmlParseFile (filename); doc = xmlParseFile (filename);
if (doc == NULL) if (doc == NULL)
{ {
g_warning ("The tag list file '%s' is empty.", filename); g_warning ("The tag list file '%s' is empty.", filename);
return taglist; return taglist;
} }
/* /*
* Check the document is of the right kind * Check the document is of the right kind
*/ */
cur = xmlDocGetRootElement (doc); cur = xmlDocGetRootElement (doc);
if (cur == NULL) if (cur == NULL)
{ {
g_warning ("The tag list file '%s' is empty.", filename); g_warning ("The tag list file '%s' is empty.", filename);
xmlFreeDoc(doc); xmlFreeDoc(doc);
return taglist; return taglist;
} }
ns = xmlSearchNsByHref (doc, cur, ns = xmlSearchNsByHref (doc, cur,
(const xmlChar *) "http://pluma.sourceforge.net/some-location"); (const xmlChar *) "http://pluma.sourceforge.net/some-location");
if (ns == NULL) if (ns == NULL)
{ {
g_warning ("The tag list file '%s' is of the wrong type, " g_warning ("The tag list file '%s' is of the wrong type, "
"pluma namespace not found.", filename); "pluma namespace not found.", filename);
xmlFreeDoc (doc); xmlFreeDoc (doc);
return taglist; return taglist;
} }
if (xmlStrcmp(cur->name, (const xmlChar *) "TagList")) if (xmlStrcmp(cur->name, (const xmlChar *) "TagList"))
{ {
g_warning ("The tag list file '%s' is of the wrong type, " g_warning ("The tag list file '%s' is of the wrong type, "
"root node != TagList.", filename); "root node != TagList.", filename);
xmlFreeDoc (doc); xmlFreeDoc (doc);
return taglist; return taglist;
} }
/* /*
* If needed, allocate taglist * If needed, allocate taglist
*/ */
if (taglist == NULL) if (taglist == NULL)
taglist = g_new0 (TagList, 1); taglist = g_new0 (TagList, 1);
taglist = lookup_best_lang (taglist, filename, doc, ns, cur); taglist = lookup_best_lang (taglist, filename, doc, ns, cur);
xmlFreeDoc (doc); xmlFreeDoc (doc);
@ -553,7 +553,7 @@ free_taglist (void)
pluma_debug_message (DEBUG_PLUGINS, "Really freed"); pluma_debug_message (DEBUG_PLUGINS, "Really freed");
} }
static TagList * static TagList *
parse_taglist_dir (const gchar *dir) parse_taglist_dir (const gchar *dir)
{ {
GError *error = NULL; GError *error = NULL;
@ -593,9 +593,9 @@ TagList* create_taglist (const gchar *data_dir)
pluma_debug_message (DEBUG_PLUGINS, "ref_count: %d", taglist_ref_count); pluma_debug_message (DEBUG_PLUGINS, "ref_count: %d", taglist_ref_count);
if (taglist_ref_count > 0) if (taglist_ref_count > 0)
{ {
++taglist_ref_count; ++taglist_ref_count;
return taglist; return taglist;
} }
@ -629,14 +629,14 @@ TagList* create_taglist (const gchar *data_dir)
else if (home != NULL) else if (home != NULL)
{ {
pdir = g_build_filename (home, pdir = g_build_filename (home,
".mate2", ".config",
USER_PLUMA_TAGLIST_PLUGIN_LOCATION, USER_PLUMA_TAGLIST_PLUGIN_LOCATION,
NULL); NULL);
parse_taglist_dir (pdir); parse_taglist_dir (pdir);
g_free (pdir); g_free (pdir);
} }
#else #else
pdir = g_build_filename (g_get_user_config_dir (), pdir = g_build_filename (g_get_user_config_dir (),
"pluma", "pluma",
"taglist", "taglist",
@ -644,12 +644,12 @@ TagList* create_taglist (const gchar *data_dir)
parse_taglist_dir (pdir); parse_taglist_dir (pdir);
g_free (pdir); g_free (pdir);
#endif #endif
/* load system's taglists */ /* load system's taglists */
parse_taglist_dir (data_dir); parse_taglist_dir (data_dir);
++taglist_ref_count; ++taglist_ref_count;
g_return_val_if_fail (taglist_ref_count == 1, taglist); g_return_val_if_fail (taglist_ref_count == 1, taglist);
return taglist; return taglist;
} }

View File

@ -53,7 +53,7 @@
#define MENU_PATH "/MenuBar/EditMenu/EditOps_4" #define MENU_PATH "/MenuBar/EditMenu/EditOps_4"
/* mateconf keys */ /* mateconf keys */
#define TIME_BASE_KEY "/apps/pluma-2/plugins/time" #define TIME_BASE_KEY "/apps/pluma/plugins/time"
#define PROMPT_TYPE_KEY TIME_BASE_KEY "/prompt_type" #define PROMPT_TYPE_KEY TIME_BASE_KEY "/prompt_type"
#define SELECTED_FORMAT_KEY TIME_BASE_KEY "/selected_format" #define SELECTED_FORMAT_KEY TIME_BASE_KEY "/selected_format"
#define CUSTOM_FORMAT_KEY TIME_BASE_KEY "/custom_format" #define CUSTOM_FORMAT_KEY TIME_BASE_KEY "/custom_format"
@ -758,7 +758,7 @@ get_configure_dialog (PlumaTimePlugin *plugin)
"time_dialog_content", "time_dialog_content",
NULL NULL
}; };
pluma_debug (DEBUG_PLUGINS); pluma_debug (DEBUG_PLUGINS);
dialog = g_new0 (TimeConfigureDialog, 1); dialog = g_new0 (TimeConfigureDialog, 1);
@ -938,7 +938,7 @@ get_choose_format_dialog (GtkWindow *parent,
gboolean ret; gboolean ret;
gchar *sf, *cf; gchar *sf, *cf;
GtkWindowGroup *wg = NULL; GtkWindowGroup *wg = NULL;
if (parent != NULL) if (parent != NULL)
wg = gtk_window_get_group (parent); wg = gtk_window_get_group (parent);

View File

@ -18,13 +18,13 @@ INCLUDES = \
$(WARN_CFLAGS) \ $(WARN_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \ $(DISABLE_DEPRECATED_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \ -DDATADIR=\""$(datadir)"\" \
-DLIBDIR=\""$(libdir)"\" -DLIBDIR=\""$(libdir)"\"
pluma_SOURCES = \ pluma_SOURCES = \
pluma.c pluma.c
pluma_LDADD = libpluma.la $(PLUMA_LIBS) $(IGE_MAC_LIBS) $(EGG_SMCLIENT_LIBS) pluma_LDADD = libpluma.la $(PLUMA_LIBS) $(IGE_MAC_LIBS) $(EGG_SMCLIENT_LIBS)
if PLATFORM_WIN32 if PLATFORM_WIN32
pluma_LDFLAGS = -Wl,--export-all-symbols -Wl,--out-implib,libpluma-$(PLUMA_API_VERSION).a pluma_LDFLAGS = -Wl,--export-all-symbols -Wl,--out-implib,libpluma-$(PLUMA_API_VERSION).a
if OS_WIN32 if OS_WIN32
@ -189,7 +189,7 @@ libpluma_la_SOURCES = \
$(INST_H_FILES) $(INST_H_FILES)
if !ENABLE_GVFS_METADATA if !ENABLE_GVFS_METADATA
libpluma_la_SOURCES += pluma-metadata-manager.c libpluma_la_SOURCES += pluma-metadata-manager.c
endif endif
pluma-enum-types.h: pluma-enum-types.h.template $(INST_H_FILES) $(GLIB_MKENUMS) pluma-enum-types.h: pluma-enum-types.h.template $(INST_H_FILES) $(GLIB_MKENUMS)
@ -205,7 +205,7 @@ pluma-marshal.c: pluma-marshal.list $(GLIB_GENMARSHAL)
$(AM_V_GEN) echo "#include \"pluma-marshal.h\"" > $@ && \ $(AM_V_GEN) echo "#include \"pluma-marshal.h\"" > $@ && \
$(GLIB_GENMARSHAL) $< --body --prefix=pluma_marshal >> $@ $(GLIB_GENMARSHAL) $< --body --prefix=pluma_marshal >> $@
uidir = $(datadir)/pluma-2/ui/ uidir = $(datadir)/pluma/ui/
ui_DATA = \ ui_DATA = \
pluma-ui.xml \ pluma-ui.xml \
pluma-print-preferences.ui pluma-print-preferences.ui

View File

@ -1,4 +1,4 @@
uidir = $(datadir)/pluma-2/ui/ uidir = $(datadir)/pluma/ui/
INCLUDES = \ INCLUDES = \
-I$(top_srcdir) \ -I$(top_srcdir) \
@ -26,6 +26,6 @@ ui_DATA = \
pluma-preferences-dialog.ui \ pluma-preferences-dialog.ui \
pluma-search-dialog.ui pluma-search-dialog.ui
EXTRA_DIST = $(ui_DATA) EXTRA_DIST = $(ui_DATA)
-include $(top_srcdir)/git.mk -include $(top_srcdir)/git.mk

View File

@ -5,6 +5,7 @@
* Copyright (C) 1998, 1999 Alex Roberts, Evan Lawrence * Copyright (C) 1998, 1999 Alex Roberts, Evan Lawrence
* Copyright (C) 2000, 2001 Chema Celorio, Paolo Maggi * Copyright (C) 2000, 2001 Chema Celorio, Paolo Maggi
* Copyright (C) 2002-2005 Paolo Maggi * Copyright (C) 2002-2005 Paolo Maggi
* Copyright (C) 2011 Perberos
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -23,7 +24,7 @@
*/ */
/* /*
* Modified by the pluma Team, 1998-2005. See the AUTHORS file for a * Modified by the gedit Team, 1998-2005. See the AUTHORS file for a
* list of people on the pluma Team. * list of people on the pluma Team.
* See the ChangeLog files for a list of changes. * See the ChangeLog files for a list of changes.
* *
@ -31,7 +32,7 @@
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif #endif
#include <glib/gi18n.h> #include <glib/gi18n.h>
@ -42,20 +43,16 @@
#include "pluma-help.h" #include "pluma-help.h"
#include "pluma-dirs.h" #include "pluma-dirs.h"
void void _pluma_cmd_help_contents(GtkAction* action, PlumaWindow* window)
_pluma_cmd_help_contents (GtkAction *action,
PlumaWindow *window)
{ {
pluma_debug (DEBUG_COMMANDS); pluma_debug(DEBUG_COMMANDS);
pluma_help_display (GTK_WINDOW (window), NULL, NULL); pluma_help_display(GTK_WINDOW(window), NULL, NULL);
} }
void void _pluma_cmd_help_about(GtkAction* action, PlumaWindow* window)
_pluma_cmd_help_about (GtkAction *action,
PlumaWindow *window)
{ {
static const gchar * const authors[] = { static const gchar* const authors[] = {
"Paolo Maggi <paolo@gnome.org>", "Paolo Maggi <paolo@gnome.org>",
"Paolo Borelli <pborelli@katamail.com>", "Paolo Borelli <pborelli@katamail.com>",
"Steve Fr\303\251cinaux <steve@istique.net>", "Steve Fr\303\251cinaux <steve@istique.net>",
@ -64,11 +61,12 @@ _pluma_cmd_help_about (GtkAction *action,
"James Willcox <jwillcox@gnome.org>", "James Willcox <jwillcox@gnome.org>",
"Chema Celorio", "Chema Celorio",
"Federico Mena Quintero <federico@novell.com>", "Federico Mena Quintero <federico@novell.com>",
"Perberos <perberos@gmail.com>",
NULL NULL
}; };
static const gchar * const documenters[] = { static const gchar* const documenters[] = {
"Sun MATE Documentation Team <gdocteam@sun.com>", "Sun GNOME Documentation Team <gdocteam@sun.com>",
"Eric Baudais <baudais@okstate.edu>", "Eric Baudais <baudais@okstate.edu>",
NULL NULL
}; };
@ -81,23 +79,17 @@ _pluma_cmd_help_about (GtkAction *action,
"Copyright \xc2\xa9 2011 Perberos"; "Copyright \xc2\xa9 2011 Perberos";
static const gchar comments[] = \ static const gchar comments[] = \
N_("pluma is a small and lightweight text editor for the " N_("pluma is a small and lightweight text editor for the MATE Desktop");
"MATE Desktop");
GdkPixbuf *logo;
gchar *data_dir;
gchar *logo_file;
pluma_debug (DEBUG_COMMANDS); pluma_debug (DEBUG_COMMANDS);
data_dir = pluma_dirs_get_pluma_data_dir (); GdkPixbuf* logo = NULL;
logo_file = g_build_filename (data_dir, GtkIconTheme* icon_theme = gtk_icon_theme_get_default();
"logo",
"pluma.png", if (gtk_icon_theme_has_icon(icon_theme, "accessories-text-editor"))
NULL); {
g_free (data_dir); logo = gtk_icon_theme_load_icon(icon_theme, "accessories-text-editor", 64, 0, NULL);
logo = gdk_pixbuf_new_from_file (logo_file, NULL); }
g_free (logo_file);
gtk_show_about_dialog (GTK_WINDOW (window), gtk_show_about_dialog (GTK_WINDOW (window),
"program-name", "Pluma", "program-name", "Pluma",
@ -112,5 +104,7 @@ _pluma_cmd_help_about (GtkAction *action,
NULL); NULL);
if (logo) if (logo)
g_object_unref (logo); {
g_object_unref(logo);
}
} }

View File

@ -3,6 +3,7 @@
* This file is part of pluma * This file is part of pluma
* *
* Copyright (C) 2008 Ignacio Casal Quinteiro * Copyright (C) 2008 Ignacio Casal Quinteiro
* Copyright (C) 2011 Perberos
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -16,305 +17,251 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, * Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif #endif
#include "pluma-dirs.h" #include "pluma-dirs.h"
#ifdef OS_OSX #ifdef OS_OSX
#include <ige-mac-bundle.h> #include <ige-mac-bundle.h>
#endif #endif
gchar * gchar* pluma_dirs_get_user_config_dir(void)
pluma_dirs_get_user_config_dir (void)
{ {
gchar *config_dir = NULL; gchar* config_dir = NULL;
#ifndef G_OS_WIN32 #ifndef G_OS_WIN32
const gchar *envvar; const gchar* envvar;
const gchar *home; const gchar* home;
/* Support old libmate env var */ /* Support old libmate env var */
envvar = g_getenv ("MATE22_USER_DIR"); envvar = g_getenv("MATE22_USER_DIR");
if (envvar != NULL)
{
config_dir = g_build_filename (envvar,
"pluma",
NULL);
} if (envvar != NULL)
else
{
home = g_get_home_dir ();
if (home != NULL)
{ {
config_dir = g_build_filename (home, config_dir = g_build_filename(envvar, "pluma", NULL);
".mate2",
"pluma",
NULL);
} }
} else
#else {
config_dir = g_build_filename (g_get_user_config_dir (), home = g_get_home_dir();
"pluma",
NULL); if (home != NULL)
#endif {
config_dir = g_build_filename(home, ".config", "pluma", NULL);
}
}
#else
config_dir = g_build_filename(g_get_user_config_dir(), "pluma", NULL);
#endif
return config_dir; return config_dir;
} }
gchar * gchar* pluma_dirs_get_user_cache_dir(void)
pluma_dirs_get_user_cache_dir (void)
{ {
const gchar *cache_dir; const gchar* cache_dir;
cache_dir = g_get_user_cache_dir (); cache_dir = g_get_user_cache_dir();
return g_build_filename (cache_dir, return g_build_filename(cache_dir, "pluma", NULL);
"pluma",
NULL);
} }
gchar * gchar* pluma_dirs_get_user_plugins_dir(void)
pluma_dirs_get_user_plugins_dir (void)
{ {
gchar *config_dir; gchar* config_dir;
gchar *plugin_dir; gchar* plugin_dir;
config_dir = pluma_dirs_get_user_config_dir (); config_dir = pluma_dirs_get_user_config_dir();
plugin_dir = g_build_filename(config_dir, "plugins", NULL);
g_free(config_dir);
plugin_dir = g_build_filename (config_dir,
"plugins",
NULL);
g_free (config_dir);
return plugin_dir; return plugin_dir;
} }
gchar * gchar* pluma_dirs_get_user_accels_file(void)
pluma_dirs_get_user_accels_file (void)
{ {
gchar *accels = NULL; gchar* accels = NULL;
#ifndef G_OS_WIN32 #ifndef G_OS_WIN32
const gchar *envvar; const gchar* envvar;
const gchar *home; const gchar* home;
/* on linux accels are stored in .mate2/accels /* on linux accels are stored in .config/accels
* for historic reasons (backward compat with the * for historic reasons (backward compat with the
* old libmate that took care of saving them */ * old libmate that took care of saving them */
/* Support old libmate env var */ /* Support old libmate env var */
envvar = g_getenv ("MATE22_USER_DIR"); envvar = g_getenv("MATE22_USER_DIR");
if (envvar != NULL)
{
accels = g_build_filename (envvar,
"accels",
"pluma",
NULL);
}
else
{
home = g_get_home_dir ();
if (home != NULL) if (envvar != NULL)
{ {
accels = g_build_filename (home, accels = g_build_filename(envvar, "accels", "pluma", NULL);
".mate2",
"accels",
"pluma",
NULL);
} }
} else
#else {
{ home = g_get_home_dir();
if (home != NULL)
{
accels = g_build_filename(home, ".config", "accels", "pluma", NULL);
}
}
#else
gchar *config_dir = NULL; gchar *config_dir = NULL;
config_dir = pluma_dirs_get_user_config_dir (); config_dir = pluma_dirs_get_user_config_dir();
accels = g_build_filename (config_dir, accels = g_build_filename(config_dir, "accels", "pluma", NULL);
"accels",
"pluma",
NULL);
g_free (config_dir); g_free(config_dir);
}
#endif #endif
return accels; return accels;
} }
gchar * gchar* pluma_dirs_get_pluma_data_dir(void)
pluma_dirs_get_pluma_data_dir (void)
{ {
gchar *data_dir; gchar* data_dir;
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
gchar *win32_dir; gchar* win32_dir;
win32_dir = g_win32_get_package_installation_directory_of_module (NULL);
data_dir = g_build_filename (win32_dir, win32_dir = g_win32_get_package_installation_directory_of_module(NULL);
"share",
"pluma-2",
NULL);
g_free (win32_dir);
#elif defined (OS_OSX)
IgeMacBundle *bundle = ige_mac_bundle_get_default ();
if (ige_mac_bundle_get_is_app_bundle (bundle)) data_dir = g_build_filename(win32_dir, "share", "pluma", NULL);
{
const gchar *bundle_data_dir = ige_mac_bundle_get_datadir (bundle);
data_dir = g_build_filename (bundle_data_dir, g_free(win32_dir);
"pluma-2",
NULL); #elif defined(OS_OSX)
}
else IgeMacBundle* bundle = ige_mac_bundle_get_default();
{
data_dir = g_build_filename (DATADIR, "pluma-2", NULL); if (ige_mac_bundle_get_is_app_bundle(bundle))
} {
#else const gchar* bundle_data_dir = ige_mac_bundle_get_datadir(bundle);
data_dir = g_build_filename (DATADIR,
"pluma-2", data_dir = g_build_filename(bundle_data_dir, "pluma", NULL);
NULL); }
#endif else
{
data_dir = g_build_filename(DATADIR, "pluma", NULL);
}
#else
data_dir = g_build_filename(DATADIR, "pluma", NULL);
#endif
return data_dir; return data_dir;
} }
gchar * gchar* pluma_dirs_get_pluma_locale_dir(void)
pluma_dirs_get_pluma_locale_dir (void)
{ {
gchar *locale_dir; gchar* locale_dir;
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
gchar *win32_dir;
win32_dir = g_win32_get_package_installation_directory_of_module (NULL);
locale_dir = g_build_filename (win32_dir, gchar* win32_dir;
"share",
"locale",
NULL);
g_free (win32_dir);
#elif defined (OS_OSX)
IgeMacBundle *bundle = ige_mac_bundle_get_default ();
if (ige_mac_bundle_get_is_app_bundle (bundle)) win32_dir = g_win32_get_package_installation_directory_of_module(NULL);
{
locale_dir = g_strdup (ige_mac_bundle_get_localedir (bundle)); locale_dir = g_build_filename(win32_dir, "share", "locale", NULL);
}
else g_free(win32_dir);
{
locale_dir = g_build_filename (DATADIR, #elif defined(OS_OSX)
"locale",
NULL); IgeMacBundle *bundle = ige_mac_bundle_get_default();
}
#else if (ige_mac_bundle_get_is_app_bundle(bundle))
locale_dir = g_build_filename (DATADIR, {
"locale", locale_dir = g_strdup(ige_mac_bundle_get_localedir(bundle));
NULL); }
#endif else
{
locale_dir = g_build_filename(DATADIR, "locale", NULL);
}
#else
locale_dir = g_build_filename(DATADIR, "locale", NULL);
#endif
return locale_dir; return locale_dir;
} }
gchar * gchar* pluma_dirs_get_pluma_lib_dir(void)
pluma_dirs_get_pluma_lib_dir (void)
{ {
gchar *lib_dir; gchar* lib_dir;
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
gchar *win32_dir;
win32_dir = g_win32_get_package_installation_directory_of_module (NULL);
lib_dir = g_build_filename (win32_dir, gchar* win32_dir;
"lib",
"pluma-2",
NULL);
g_free (win32_dir);
#elif defined (OS_OSX)
IgeMacBundle *bundle = ige_mac_bundle_get_default ();
if (ige_mac_bundle_get_is_app_bundle (bundle)) win32_dir = g_win32_get_package_installation_directory_of_module(NULL);
{
const gchar *path = ige_mac_bundle_get_resourcesdir (bundle); lib_dir = g_build_filename(win32_dir, "lib", "pluma", NULL);
lib_dir = g_build_filename (path,
"lib", g_free(win32_dir);
"pluma-2",
NULL); #elif defined(OS_OSX)
} IgeMacBundle* bundle = ige_mac_bundle_get_default();
else
{ if (ige_mac_bundle_get_is_app_bundle(bundle))
lib_dir = g_build_filename (LIBDIR, {
"pluma-2", const gchar* path = ige_mac_bundle_get_resourcesdir(bundle);
NULL); lib_dir = g_build_filename(path, "lib", "pluma", NULL);
} }
#else else
lib_dir = g_build_filename (LIBDIR, {
"pluma-2", lib_dir = g_build_filename(LIBDIR, "pluma", NULL);
NULL); }
#endif #else
lib_dir = g_build_filename(LIBDIR, "pluma", NULL);
#endif
return lib_dir; return lib_dir;
} }
gchar * gchar* pluma_dirs_get_pluma_plugins_dir(void)
pluma_dirs_get_pluma_plugins_dir (void)
{ {
gchar *lib_dir; gchar* lib_dir;
gchar *plugin_dir; gchar* plugin_dir;
lib_dir = pluma_dirs_get_pluma_lib_dir (); lib_dir = pluma_dirs_get_pluma_lib_dir();
plugin_dir = g_build_filename (lib_dir, plugin_dir = g_build_filename(lib_dir, "plugins", NULL);
"plugins", g_free(lib_dir);
NULL);
g_free (lib_dir);
return plugin_dir; return plugin_dir;
} }
gchar * gchar* pluma_dirs_get_pluma_plugin_loaders_dir(void)
pluma_dirs_get_pluma_plugin_loaders_dir (void)
{ {
gchar *lib_dir; gchar* lib_dir;
gchar *loader_dir; gchar* loader_dir;
lib_dir = pluma_dirs_get_pluma_lib_dir (); lib_dir = pluma_dirs_get_pluma_lib_dir();
loader_dir = g_build_filename (lib_dir, loader_dir = g_build_filename(lib_dir, "plugin-loaders", NULL);
"plugin-loaders", g_free(lib_dir);
NULL);
g_free (lib_dir);
return loader_dir; return loader_dir;
} }
gchar * gchar* pluma_dirs_get_ui_file(const gchar* file)
pluma_dirs_get_ui_file (const gchar *file)
{ {
gchar *datadir; gchar* datadir;
gchar *ui_file; gchar* ui_file;
g_return_val_if_fail(file != NULL, NULL);
datadir = pluma_dirs_get_pluma_data_dir();
ui_file = g_build_filename(datadir, "ui", file, NULL);
g_free(datadir);
g_return_val_if_fail (file != NULL, NULL);
datadir = pluma_dirs_get_pluma_data_dir ();
ui_file = g_build_filename (datadir,
"ui",
file,
NULL);
g_free (datadir);
return ui_file; return ui_file;
} }

View File

@ -2,7 +2,7 @@
* pluma-plugin.h * pluma-plugin.h
* This file is part of pluma * This file is part of pluma
* *
* Copyright (C) 2002-2005 Paolo Maggi * Copyright (C) 2002-2005 Paolo Maggi
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -16,14 +16,14 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, * Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
/* /*
* Modified by the pluma Team, 2002-2005. See the AUTHORS file for a * Modified by the pluma Team, 2002-2005. See the AUTHORS file for a
* list of people on the pluma Team. * list of people on the pluma Team.
* See the ChangeLog files for a list of changes. * See the ChangeLog files for a list of changes.
* *
* $Id$ * $Id$
*/ */
@ -125,7 +125,7 @@ pluma_plugin_finalize (GObject *object)
G_OBJECT_CLASS (pluma_plugin_parent_class)->finalize (object); G_OBJECT_CLASS (pluma_plugin_parent_class)->finalize (object);
} }
static void static void
pluma_plugin_class_init (PlumaPluginClass *klass) pluma_plugin_class_init (PlumaPluginClass *klass)
{ {
GObjectClass *object_class = G_OBJECT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass);
@ -133,7 +133,7 @@ pluma_plugin_class_init (PlumaPluginClass *klass)
klass->activate = dummy; klass->activate = dummy;
klass->deactivate = dummy; klass->deactivate = dummy;
klass->update_ui = dummy; klass->update_ui = dummy;
klass->create_configure_dialog = create_configure_dialog; klass->create_configure_dialog = create_configure_dialog;
klass->is_configurable = is_configurable; klass->is_configurable = is_configurable;
@ -217,7 +217,7 @@ pluma_plugin_get_data_dir (PlumaPlugin *plugin)
/* If it's a "user" plugin the data dir is /* If it's a "user" plugin the data dir is
* install_dir/data_dir_name if instead it's a * install_dir/data_dir_name if instead it's a
* "system" plugin the data dir is under pluma_data_dir, * "system" plugin the data dir is under pluma_data_dir,
* so it's under $prefix/share/pluma-2/plugins/data_dir_name * so it's under $prefix/share/pluma/plugins/data_dir_name
* where data_dir_name usually it's the name of the plugin * where data_dir_name usually it's the name of the plugin
*/ */
pluma_lib_dir = pluma_dirs_get_pluma_lib_dir (); pluma_lib_dir = pluma_dirs_get_pluma_lib_dir ();
@ -253,7 +253,7 @@ pluma_plugin_get_data_dir (PlumaPlugin *plugin)
* pluma_plugin_activate: * pluma_plugin_activate:
* @plugin: a #PlumaPlugin * @plugin: a #PlumaPlugin
* @window: a #PlumaWindow * @window: a #PlumaWindow
* *
* Activates the plugin. * Activates the plugin.
*/ */
void void
@ -262,7 +262,7 @@ pluma_plugin_activate (PlumaPlugin *plugin,
{ {
g_return_if_fail (PLUMA_IS_PLUGIN (plugin)); g_return_if_fail (PLUMA_IS_PLUGIN (plugin));
g_return_if_fail (PLUMA_IS_WINDOW (window)); g_return_if_fail (PLUMA_IS_WINDOW (window));
PLUMA_PLUGIN_GET_CLASS (plugin)->activate (plugin, window); PLUMA_PLUGIN_GET_CLASS (plugin)->activate (plugin, window);
} }
@ -270,7 +270,7 @@ pluma_plugin_activate (PlumaPlugin *plugin,
* pluma_plugin_deactivate: * pluma_plugin_deactivate:
* @plugin: a #PlumaPlugin * @plugin: a #PlumaPlugin
* @window: a #PlumaWindow * @window: a #PlumaWindow
* *
* Deactivates the plugin. * Deactivates the plugin.
*/ */
void void
@ -290,7 +290,7 @@ pluma_plugin_deactivate (PlumaPlugin *plugin,
* *
* Triggers an update of the user interface to take into account state changes * Triggers an update of the user interface to take into account state changes
* caused by the plugin. * caused by the plugin.
*/ */
void void
pluma_plugin_update_ui (PlumaPlugin *plugin, pluma_plugin_update_ui (PlumaPlugin *plugin,
PlumaWindow *window) PlumaWindow *window)
@ -329,6 +329,6 @@ GtkWidget *
pluma_plugin_create_configure_dialog (PlumaPlugin *plugin) pluma_plugin_create_configure_dialog (PlumaPlugin *plugin)
{ {
g_return_val_if_fail (PLUMA_IS_PLUGIN (plugin), NULL); g_return_val_if_fail (PLUMA_IS_PLUGIN (plugin), NULL);
return PLUMA_PLUGIN_GET_CLASS (plugin)->create_configure_dialog (plugin); return PLUMA_PLUGIN_GET_CLASS (plugin)->create_configure_dialog (plugin);
} }

View File

@ -2,7 +2,7 @@
* pluma-plugins-engine.c * pluma-plugins-engine.c
* This file is part of pluma * This file is part of pluma
* *
* Copyright (C) 2002-2005 Paolo Maggi * Copyright (C) 2002-2005 Paolo Maggi
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -16,14 +16,14 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, * Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
/* /*
* Modified by the pluma Team, 2002-2005. See the AUTHORS file for a * Modified by the pluma Team, 2002-2005. See the AUTHORS file for a
* list of people on the pluma Team. * list of people on the pluma Team.
* See the ChangeLog files for a list of changes. * See the ChangeLog files for a list of changes.
* *
* $Id$ * $Id$
*/ */
@ -46,7 +46,7 @@
#include "pluma-object-module.h" #include "pluma-object-module.h"
#include "pluma-dirs.h" #include "pluma-dirs.h"
#define PLUMA_PLUGINS_ENGINE_BASE_KEY "/apps/pluma-2/plugins" #define PLUMA_PLUGINS_ENGINE_BASE_KEY "/apps/pluma/plugins"
#define PLUMA_PLUGINS_ENGINE_KEY PLUMA_PLUGINS_ENGINE_BASE_KEY "/active-plugins" #define PLUMA_PLUGINS_ENGINE_KEY PLUMA_PLUGINS_ENGINE_BASE_KEY "/active-plugins"
#define PLUGIN_EXT ".pluma-plugin" #define PLUGIN_EXT ".pluma-plugin"
@ -110,7 +110,7 @@ load_dir_real (PlumaPluginsEngine *engine,
g_error_free (error); g_error_free (error);
return TRUE; return TRUE;
} }
while ((dirent = g_dir_read_name (d))) while ((dirent = g_dir_read_name (d)))
{ {
gchar *filename; gchar *filename;
@ -138,7 +138,7 @@ load_plugin_info (PlumaPluginsEngine *engine,
gpointer userdata) gpointer userdata)
{ {
PlumaPluginInfo *info; PlumaPluginInfo *info;
info = _pluma_plugin_info_new (filename); info = _pluma_plugin_info_new (filename);
if (info == NULL) if (info == NULL)
@ -227,11 +227,11 @@ hash_lowercase (gconstpointer data)
{ {
gchar *lowercase; gchar *lowercase;
guint ret; guint ret;
lowercase = g_ascii_strdown ((const gchar *)data, -1); lowercase = g_ascii_strdown ((const gchar *)data, -1);
ret = g_str_hash (lowercase); ret = g_str_hash (lowercase);
g_free (lowercase); g_free (lowercase);
return ret; return ret;
} }
@ -246,10 +246,10 @@ loader_destroy (LoaderInfo *info)
{ {
if (!info) if (!info)
return; return;
if (info->loader) if (info->loader)
g_object_unref (info->loader); g_object_unref (info->loader);
g_free (info); g_free (info);
} }
@ -315,19 +315,19 @@ pluma_plugins_engine_finalize (GObject *object)
{ {
PlumaPluginsEngine *engine = PLUMA_PLUGINS_ENGINE (object); PlumaPluginsEngine *engine = PLUMA_PLUGINS_ENGINE (object);
GList *item; GList *item;
pluma_debug (DEBUG_PLUGINS); pluma_debug (DEBUG_PLUGINS);
/* Firs deactivate all plugins */ /* Firs deactivate all plugins */
for (item = engine->priv->plugin_list; item; item = item->next) for (item = engine->priv->plugin_list; item; item = item->next)
{ {
PlumaPluginInfo *info = PLUMA_PLUGIN_INFO (item->data); PlumaPluginInfo *info = PLUMA_PLUGIN_INFO (item->data);
if (pluma_plugin_info_is_active (info)) if (pluma_plugin_info_is_active (info))
pluma_plugins_engine_deactivate_plugin_real (engine, info); pluma_plugins_engine_deactivate_plugin_real (engine, info);
} }
/* unref the loaders */ /* unref the loaders */
g_hash_table_destroy (engine->priv->loaders); g_hash_table_destroy (engine->priv->loaders);
/* and finally free the infos */ /* and finally free the infos */
@ -388,7 +388,7 @@ load_loader (PlumaPluginsEngine *engine,
gchar *path; gchar *path;
const gchar *id; const gchar *id;
GType type; GType type;
/* try to load in the module */ /* try to load in the module */
path = g_path_get_dirname (filename); path = g_path_get_dirname (filename);
base = g_path_get_basename (filename); base = g_path_get_basename (filename);
@ -411,12 +411,12 @@ load_loader (PlumaPluginsEngine *engine,
return TRUE; return TRUE;
} }
/* get the exported type and check the name as exported by the /* get the exported type and check the name as exported by the
* loader interface */ * loader interface */
type = pluma_object_module_get_object_type (module); type = pluma_object_module_get_object_type (module);
id = pluma_plugin_loader_type_get_id (type); id = pluma_plugin_loader_type_get_id (type);
add_loader (engine, id, module); add_loader (engine, id, module);
g_type_module_unuse (G_TYPE_MODULE (module)); g_type_module_unuse (G_TYPE_MODULE (module));
return TRUE; return TRUE;
@ -430,11 +430,11 @@ ensure_loader (LoaderInfo *info)
/* create a new loader object */ /* create a new loader object */
PlumaPluginLoader *loader; PlumaPluginLoader *loader;
loader = (PlumaPluginLoader *)pluma_object_module_new_object (info->module, NULL); loader = (PlumaPluginLoader *)pluma_object_module_new_object (info->module, NULL);
if (loader == NULL || !PLUMA_IS_PLUGIN_LOADER (loader)) if (loader == NULL || !PLUMA_IS_PLUGIN_LOADER (loader))
{ {
g_warning ("Loader object is not a valid PlumaPluginLoader instance"); g_warning ("Loader object is not a valid PlumaPluginLoader instance");
if (loader != NULL && G_IS_OBJECT (loader)) if (loader != NULL && G_IS_OBJECT (loader))
g_object_unref (loader); g_object_unref (loader);
} }
@ -454,7 +454,7 @@ get_plugin_loader (PlumaPluginsEngine *engine, PlumaPluginInfo *info)
loader_id = info->loader; loader_id = info->loader;
loader_info = (LoaderInfo *)g_hash_table_lookup ( loader_info = (LoaderInfo *)g_hash_table_lookup (
engine->priv->loaders, engine->priv->loaders,
loader_id); loader_id);
if (loader_info == NULL) if (loader_info == NULL)
@ -463,17 +463,17 @@ get_plugin_loader (PlumaPluginsEngine *engine, PlumaPluginInfo *info)
loader_dir = pluma_dirs_get_pluma_plugin_loaders_dir (); loader_dir = pluma_dirs_get_pluma_plugin_loaders_dir ();
/* loader could not be found in the hash, try to find it by /* loader could not be found in the hash, try to find it by
scanning */ scanning */
load_dir_real (engine, load_dir_real (engine,
loader_dir, loader_dir,
LOADER_EXT, LOADER_EXT,
(LoadDirCallback)load_loader, (LoadDirCallback)load_loader,
NULL); NULL);
g_free (loader_dir); g_free (loader_dir);
loader_info = (LoaderInfo *)g_hash_table_lookup ( loader_info = (LoaderInfo *)g_hash_table_lookup (
engine->priv->loaders, engine->priv->loaders,
loader_id); loader_id);
} }
@ -483,7 +483,7 @@ get_plugin_loader (PlumaPluginsEngine *engine, PlumaPluginInfo *info)
add_loader (engine, loader_id, NULL); add_loader (engine, loader_id, NULL);
return NULL; return NULL;
} }
ensure_loader (loader_info); ensure_loader (loader_info);
return loader_info->loader; return loader_info->loader;
} }
@ -557,33 +557,33 @@ load_plugin (PlumaPluginsEngine *engine,
if (pluma_plugin_info_is_active (info)) if (pluma_plugin_info_is_active (info))
return TRUE; return TRUE;
if (!pluma_plugin_info_is_available (info)) if (!pluma_plugin_info_is_available (info))
return FALSE; return FALSE;
loader = get_plugin_loader (engine, info); loader = get_plugin_loader (engine, info);
if (loader == NULL) if (loader == NULL)
{ {
g_warning ("Could not find loader `%s' for plugin `%s'", info->loader, info->name); g_warning ("Could not find loader `%s' for plugin `%s'", info->loader, info->name);
info->available = FALSE; info->available = FALSE;
return FALSE; return FALSE;
} }
path = g_path_get_dirname (info->file); path = g_path_get_dirname (info->file);
g_return_val_if_fail (path != NULL, FALSE); g_return_val_if_fail (path != NULL, FALSE);
info->plugin = pluma_plugin_loader_load (loader, info, path); info->plugin = pluma_plugin_loader_load (loader, info, path);
g_free (path); g_free (path);
if (info->plugin == NULL) if (info->plugin == NULL)
{ {
g_warning ("Error loading plugin '%s'", info->name); g_warning ("Error loading plugin '%s'", info->name);
info->available = FALSE; info->available = FALSE;
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
} }
@ -614,7 +614,7 @@ pluma_plugins_engine_activate_plugin (PlumaPluginsEngine *engine,
if (!pluma_plugin_info_is_available (info)) if (!pluma_plugin_info_is_available (info))
return FALSE; return FALSE;
if (pluma_plugin_info_is_active (info)) if (pluma_plugin_info_is_active (info))
return TRUE; return TRUE;
@ -627,7 +627,7 @@ pluma_plugins_engine_activate_plugin (PlumaPluginsEngine *engine,
} }
static void static void
call_plugin_deactivate (PlumaPlugin *plugin, call_plugin_deactivate (PlumaPlugin *plugin,
PlumaWindow *window) PlumaWindow *window)
{ {
pluma_plugin_deactivate (plugin, window); pluma_plugin_deactivate (plugin, window);
@ -646,7 +646,7 @@ pluma_plugins_engine_deactivate_plugin_real (PlumaPluginsEngine *engine,
const GList *wins; const GList *wins;
PlumaPluginLoader *loader; PlumaPluginLoader *loader;
if (!pluma_plugin_info_is_active (info) || if (!pluma_plugin_info_is_active (info) ||
!pluma_plugin_info_is_available (info)) !pluma_plugin_info_is_available (info))
return; return;
@ -659,13 +659,13 @@ pluma_plugins_engine_deactivate_plugin_real (PlumaPluginsEngine *engine,
/* first unref the plugin (the loader still has one) */ /* first unref the plugin (the loader still has one) */
g_object_unref (info->plugin); g_object_unref (info->plugin);
/* find the loader and tell it to gc and unload the plugin */ /* find the loader and tell it to gc and unload the plugin */
loader = get_plugin_loader (engine, info); loader = get_plugin_loader (engine, info);
pluma_plugin_loader_garbage_collect (loader); pluma_plugin_loader_garbage_collect (loader);
pluma_plugin_loader_unload (loader, info); pluma_plugin_loader_unload (loader, info);
info->plugin = NULL; info->plugin = NULL;
} }
@ -708,15 +708,15 @@ pluma_plugins_engine_activate_plugins (PlumaPluginsEngine *engine,
for (pl = engine->priv->plugin_list; pl; pl = pl->next) for (pl = engine->priv->plugin_list; pl; pl = pl->next)
{ {
PlumaPluginInfo *info = (PlumaPluginInfo*)pl->data; PlumaPluginInfo *info = (PlumaPluginInfo*)pl->data;
if (engine->priv->activate_from_prefs && if (engine->priv->activate_from_prefs &&
g_slist_find_custom (active_plugins, g_slist_find_custom (active_plugins,
pluma_plugin_info_get_module_name (info), pluma_plugin_info_get_module_name (info),
(GCompareFunc)strcmp) == NULL) (GCompareFunc)strcmp) == NULL)
continue; continue;
/* If plugin is not active, don't try to activate/load it */ /* If plugin is not active, don't try to activate/load it */
if (!engine->priv->activate_from_prefs && if (!engine->priv->activate_from_prefs &&
!pluma_plugin_info_is_active (info)) !pluma_plugin_info_is_active (info))
continue; continue;
@ -724,14 +724,14 @@ pluma_plugins_engine_activate_plugins (PlumaPluginsEngine *engine,
pluma_plugin_activate (info->plugin, pluma_plugin_activate (info->plugin,
window); window);
} }
if (engine->priv->activate_from_prefs) if (engine->priv->activate_from_prefs)
{ {
g_slist_foreach (active_plugins, (GFunc) g_free, NULL); g_slist_foreach (active_plugins, (GFunc) g_free, NULL);
g_slist_free (active_plugins); g_slist_free (active_plugins);
engine->priv->activate_from_prefs = FALSE; engine->priv->activate_from_prefs = FALSE;
} }
pluma_debug_message (DEBUG_PLUGINS, "End"); pluma_debug_message (DEBUG_PLUGINS, "End");
/* also call update_ui after activation */ /* also call update_ui after activation */
@ -743,24 +743,24 @@ pluma_plugins_engine_deactivate_plugins (PlumaPluginsEngine *engine,
PlumaWindow *window) PlumaWindow *window)
{ {
GList *pl; GList *pl;
pluma_debug (DEBUG_PLUGINS); pluma_debug (DEBUG_PLUGINS);
g_return_if_fail (PLUMA_IS_PLUGINS_ENGINE (engine)); g_return_if_fail (PLUMA_IS_PLUGINS_ENGINE (engine));
g_return_if_fail (PLUMA_IS_WINDOW (window)); g_return_if_fail (PLUMA_IS_WINDOW (window));
for (pl = engine->priv->plugin_list; pl; pl = pl->next) for (pl = engine->priv->plugin_list; pl; pl = pl->next)
{ {
PlumaPluginInfo *info = (PlumaPluginInfo*)pl->data; PlumaPluginInfo *info = (PlumaPluginInfo*)pl->data;
/* check if the plugin is actually active */ /* check if the plugin is actually active */
if (!pluma_plugin_info_is_active (info)) if (!pluma_plugin_info_is_active (info))
continue; continue;
/* call deactivate for the plugin for this window */ /* call deactivate for the plugin for this window */
pluma_plugin_deactivate (info->plugin, window); pluma_plugin_deactivate (info->plugin, window);
} }
pluma_debug_message (DEBUG_PLUGINS, "End"); pluma_debug_message (DEBUG_PLUGINS, "End");
} }
@ -782,21 +782,21 @@ pluma_plugins_engine_update_plugins_ui (PlumaPluginsEngine *engine,
if (!pluma_plugin_info_is_active (info)) if (!pluma_plugin_info_is_active (info))
continue; continue;
pluma_debug_message (DEBUG_PLUGINS, "Updating UI of %s", info->name); pluma_debug_message (DEBUG_PLUGINS, "Updating UI of %s", info->name);
pluma_plugin_update_ui (info->plugin, window); pluma_plugin_update_ui (info->plugin, window);
} }
} }
void void
pluma_plugins_engine_configure_plugin (PlumaPluginsEngine *engine, pluma_plugins_engine_configure_plugin (PlumaPluginsEngine *engine,
PlumaPluginInfo *info, PlumaPluginInfo *info,
GtkWindow *parent) GtkWindow *parent)
{ {
GtkWidget *conf_dlg; GtkWidget *conf_dlg;
GtkWindowGroup *wg; GtkWindowGroup *wg;
pluma_debug (DEBUG_PLUGINS); pluma_debug (DEBUG_PLUGINS);
g_return_if_fail (info != NULL); g_return_if_fail (info != NULL);
@ -812,15 +812,15 @@ pluma_plugins_engine_configure_plugin (PlumaPluginsEngine *engine,
wg = gtk_window_group_new (); wg = gtk_window_group_new ();
gtk_window_group_add_window (wg, parent); gtk_window_group_add_window (wg, parent);
} }
gtk_window_group_add_window (wg, gtk_window_group_add_window (wg,
GTK_WINDOW (conf_dlg)); GTK_WINDOW (conf_dlg));
gtk_window_set_modal (GTK_WINDOW (conf_dlg), TRUE); gtk_window_set_modal (GTK_WINDOW (conf_dlg), TRUE);
gtk_widget_show (conf_dlg); gtk_widget_show (conf_dlg);
} }
void void
pluma_plugins_engine_active_plugins_changed (PlumaPluginsEngine *engine) pluma_plugins_engine_active_plugins_changed (PlumaPluginsEngine *engine)
{ {
gboolean to_activate; gboolean to_activate;
@ -856,6 +856,6 @@ void
pluma_plugins_engine_rescan_plugins (PlumaPluginsEngine *engine) pluma_plugins_engine_rescan_plugins (PlumaPluginsEngine *engine)
{ {
pluma_debug (DEBUG_PLUGINS); pluma_debug (DEBUG_PLUGINS);
load_all_plugins (engine); load_all_plugins (engine);
} }

View File

@ -3,7 +3,7 @@
* pluma-prefs-manager.c * pluma-prefs-manager.c
* This file is part of pluma * This file is part of pluma
* *
* Copyright (C) 2002-2005 Paolo Maggi * Copyright (C) 2002-2005 Paolo Maggi
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -17,13 +17,13 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, * Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
/* /*
* Modified by the pluma Team, 2002-2003. See the AUTHORS file for a * Modified by the pluma Team, 2002-2003. See the AUTHORS file for a
* list of people on the pluma Team. * list of people on the pluma Team.
* See the ChangeLog files for a list of changes. * See the ChangeLog files for a list of changes.
* *
* $Id$ * $Id$
@ -58,69 +58,69 @@ static void pluma_prefs_manager_system_font_changed (MateConfClient *client,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_tabs_size_changed (MateConfClient *client, static void pluma_prefs_manager_tabs_size_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_wrap_mode_changed (MateConfClient *client, static void pluma_prefs_manager_wrap_mode_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_line_numbers_changed (MateConfClient *client, static void pluma_prefs_manager_line_numbers_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_auto_indent_changed (MateConfClient *client, static void pluma_prefs_manager_auto_indent_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_undo_changed (MateConfClient *client, static void pluma_prefs_manager_undo_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_right_margin_changed (MateConfClient *client, static void pluma_prefs_manager_right_margin_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_smart_home_end_changed (MateConfClient *client, static void pluma_prefs_manager_smart_home_end_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_hl_current_line_changed (MateConfClient *client, static void pluma_prefs_manager_hl_current_line_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_bracket_matching_changed(MateConfClient *client, static void pluma_prefs_manager_bracket_matching_changed(MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_syntax_hl_enable_changed(MateConfClient *client, static void pluma_prefs_manager_syntax_hl_enable_changed(MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_search_hl_enable_changed(MateConfClient *client, static void pluma_prefs_manager_search_hl_enable_changed(MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_source_style_scheme_changed static void pluma_prefs_manager_source_style_scheme_changed
(MateConfClient *client, (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_max_recents_changed (MateConfClient *client, static void pluma_prefs_manager_max_recents_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_auto_save_changed (MateConfClient *client, static void pluma_prefs_manager_auto_save_changed (MateConfClient *client,
@ -129,8 +129,8 @@ static void pluma_prefs_manager_auto_save_changed (MateConfClient *client,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_active_plugins_changed (MateConfClient *client, static void pluma_prefs_manager_active_plugins_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data); gpointer user_data);
static void pluma_prefs_manager_lockdown_changed (MateConfClient *client, static void pluma_prefs_manager_lockdown_changed (MateConfClient *client,
@ -146,7 +146,7 @@ static void pluma_prefs_manager_lockdown_changed (MateConfClient *client,
#define PLUMA_STATE_DEFAULT_SIDE_PANEL_SIZE 200 #define PLUMA_STATE_DEFAULT_SIDE_PANEL_SIZE 200
#define PLUMA_STATE_DEFAULT_BOTTOM_PANEL_SIZE 140 #define PLUMA_STATE_DEFAULT_BOTTOM_PANEL_SIZE 140
#define PLUMA_STATE_FILE_LOCATION "pluma-2" #define PLUMA_STATE_FILE_LOCATION "pluma.ini"
#define PLUMA_STATE_WINDOW_GROUP "window" #define PLUMA_STATE_WINDOW_GROUP "window"
#define PLUMA_STATE_WINDOW_STATE "state" #define PLUMA_STATE_WINDOW_STATE "state"
@ -356,12 +356,12 @@ pluma_prefs_manager_get_window_state (void)
return window_state; return window_state;
} }
void void
pluma_prefs_manager_set_window_state (gint ws) pluma_prefs_manager_set_window_state (gint ws)
{ {
g_return_if_fail (ws > -1); g_return_if_fail (ws > -1);
window_state = ws; window_state = ws;
pluma_state_set_int (PLUMA_STATE_WINDOW_GROUP, pluma_state_set_int (PLUMA_STATE_WINDOW_GROUP,
@ -426,7 +426,7 @@ pluma_prefs_manager_set_window_size (gint width, gint height)
height); height);
} }
gboolean gboolean
pluma_prefs_manager_window_size_can_set (void) pluma_prefs_manager_window_size_can_set (void)
{ {
return TRUE; return TRUE;
@ -447,27 +447,27 @@ pluma_prefs_manager_get_side_panel_size (void)
return side_panel_size; return side_panel_size;
} }
gint gint
pluma_prefs_manager_get_default_side_panel_size (void) pluma_prefs_manager_get_default_side_panel_size (void)
{ {
return PLUMA_STATE_DEFAULT_SIDE_PANEL_SIZE; return PLUMA_STATE_DEFAULT_SIDE_PANEL_SIZE;
} }
void void
pluma_prefs_manager_set_side_panel_size (gint ps) pluma_prefs_manager_set_side_panel_size (gint ps)
{ {
g_return_if_fail (ps > -1); g_return_if_fail (ps > -1);
if (side_panel_size == ps) if (side_panel_size == ps)
return; return;
side_panel_size = ps; side_panel_size = ps;
pluma_state_set_int (PLUMA_STATE_WINDOW_GROUP, pluma_state_set_int (PLUMA_STATE_WINDOW_GROUP,
PLUMA_STATE_SIDE_PANEL_SIZE, PLUMA_STATE_SIDE_PANEL_SIZE,
ps); ps);
} }
gboolean gboolean
pluma_prefs_manager_side_panel_size_can_set (void) pluma_prefs_manager_side_panel_size_can_set (void)
{ {
return TRUE; return TRUE;
@ -499,7 +499,7 @@ pluma_prefs_manager_set_side_panel_active_page (gint id)
id); id);
} }
gboolean gboolean
pluma_prefs_manager_side_panel_active_page_can_set (void) pluma_prefs_manager_side_panel_active_page_can_set (void)
{ {
return TRUE; return TRUE;
@ -520,27 +520,27 @@ pluma_prefs_manager_get_bottom_panel_size (void)
return bottom_panel_size; return bottom_panel_size;
} }
gint gint
pluma_prefs_manager_get_default_bottom_panel_size (void) pluma_prefs_manager_get_default_bottom_panel_size (void)
{ {
return PLUMA_STATE_DEFAULT_BOTTOM_PANEL_SIZE; return PLUMA_STATE_DEFAULT_BOTTOM_PANEL_SIZE;
} }
void void
pluma_prefs_manager_set_bottom_panel_size (gint ps) pluma_prefs_manager_set_bottom_panel_size (gint ps)
{ {
g_return_if_fail (ps > -1); g_return_if_fail (ps > -1);
if (bottom_panel_size == ps) if (bottom_panel_size == ps)
return; return;
bottom_panel_size = ps; bottom_panel_size = ps;
pluma_state_set_int (PLUMA_STATE_WINDOW_GROUP, pluma_state_set_int (PLUMA_STATE_WINDOW_GROUP,
PLUMA_STATE_BOTTOM_PANEL_SIZE, PLUMA_STATE_BOTTOM_PANEL_SIZE,
ps); ps);
} }
gboolean gboolean
pluma_prefs_manager_bottom_panel_size_can_set (void) pluma_prefs_manager_bottom_panel_size_can_set (void)
{ {
return TRUE; return TRUE;
@ -572,7 +572,7 @@ pluma_prefs_manager_set_bottom_panel_active_page (gint id)
id); id);
} }
gboolean gboolean
pluma_prefs_manager_bottom_panel_active_page_can_set (void) pluma_prefs_manager_bottom_panel_active_page_can_set (void)
{ {
return TRUE; return TRUE;
@ -597,7 +597,7 @@ void
pluma_prefs_manager_set_active_file_filter (gint id) pluma_prefs_manager_set_active_file_filter (gint id)
{ {
g_return_if_fail (id >= 0); g_return_if_fail (id >= 0);
if (active_file_filter == id) if (active_file_filter == id)
return; return;
@ -607,7 +607,7 @@ pluma_prefs_manager_set_active_file_filter (gint id)
id); id);
} }
gboolean gboolean
pluma_prefs_manager_active_file_filter_can_set (void) pluma_prefs_manager_active_file_filter_can_set (void)
{ {
return TRUE; return TRUE;
@ -636,12 +636,12 @@ pluma_prefs_manager_app_init (void)
GPM_PLUGINS_DIR, GPM_PLUGINS_DIR,
MATECONF_CLIENT_PRELOAD_RECURSIVE, MATECONF_CLIENT_PRELOAD_RECURSIVE,
NULL); NULL);
mateconf_client_add_dir (pluma_prefs_manager->mateconf_client, mateconf_client_add_dir (pluma_prefs_manager->mateconf_client,
GPM_LOCKDOWN_DIR, GPM_LOCKDOWN_DIR,
MATECONF_CLIENT_PRELOAD_RECURSIVE, MATECONF_CLIENT_PRELOAD_RECURSIVE,
NULL); NULL);
mateconf_client_notify_add (pluma_prefs_manager->mateconf_client, mateconf_client_notify_add (pluma_prefs_manager->mateconf_client,
GPM_FONT_DIR, GPM_FONT_DIR,
pluma_prefs_manager_editor_font_changed, pluma_prefs_manager_editor_font_changed,
@ -661,7 +661,7 @@ pluma_prefs_manager_app_init (void)
GPM_WRAP_MODE_DIR, GPM_WRAP_MODE_DIR,
pluma_prefs_manager_wrap_mode_changed, pluma_prefs_manager_wrap_mode_changed,
NULL, NULL, NULL); NULL, NULL, NULL);
mateconf_client_notify_add (pluma_prefs_manager->mateconf_client, mateconf_client_notify_add (pluma_prefs_manager->mateconf_client,
GPM_LINE_NUMBERS_DIR, GPM_LINE_NUMBERS_DIR,
pluma_prefs_manager_line_numbers_changed, pluma_prefs_manager_line_numbers_changed,
@ -733,7 +733,7 @@ pluma_prefs_manager_app_init (void)
NULL, NULL, NULL); NULL, NULL, NULL);
} }
return pluma_prefs_manager != NULL; return pluma_prefs_manager != NULL;
} }
/* This function must be called before exiting pluma */ /* This function must be called before exiting pluma */
@ -748,10 +748,10 @@ pluma_prefs_manager_app_shutdown (void)
} }
static void static void
pluma_prefs_manager_editor_font_changed (MateConfClient *client, pluma_prefs_manager_editor_font_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data) gpointer user_data)
{ {
GList *views; GList *views;
@ -771,7 +771,7 @@ pluma_prefs_manager_editor_font_changed (MateConfClient *client,
def = mateconf_value_get_bool (entry->value); def = mateconf_value_get_bool (entry->value);
else else
def = GPM_DEFAULT_USE_DEFAULT_FONT; def = GPM_DEFAULT_USE_DEFAULT_FONT;
if (def) if (def)
font = pluma_prefs_manager_get_system_font (); font = pluma_prefs_manager_get_system_font ();
else else
@ -783,14 +783,14 @@ pluma_prefs_manager_editor_font_changed (MateConfClient *client,
font = g_strdup (mateconf_value_get_string (entry->value)); font = g_strdup (mateconf_value_get_string (entry->value));
else else
font = g_strdup (GPM_DEFAULT_EDITOR_FONT); font = g_strdup (GPM_DEFAULT_EDITOR_FONT);
def = pluma_prefs_manager_get_use_default_font (); def = pluma_prefs_manager_get_use_default_font ();
} }
else else
return; return;
g_return_if_fail (font != NULL); g_return_if_fail (font != NULL);
ts = pluma_prefs_manager_get_tabs_size (); ts = pluma_prefs_manager_get_tabs_size ();
views = pluma_app_get_views (pluma_app_get_default ()); views = pluma_app_get_views (pluma_app_get_default ());
@ -809,10 +809,10 @@ pluma_prefs_manager_editor_font_changed (MateConfClient *client,
g_free (font); g_free (font);
} }
static void static void
pluma_prefs_manager_system_font_changed (MateConfClient *client, pluma_prefs_manager_system_font_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data) gpointer user_data)
{ {
GList *views; GList *views;
@ -854,10 +854,10 @@ pluma_prefs_manager_system_font_changed (MateConfClient *client,
g_free (font); g_free (font);
} }
static void static void
pluma_prefs_manager_tabs_size_changed (MateConfClient *client, pluma_prefs_manager_tabs_size_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data) gpointer user_data)
{ {
pluma_debug (DEBUG_PREFS); pluma_debug (DEBUG_PREFS);
@ -875,7 +875,7 @@ pluma_prefs_manager_tabs_size_changed (MateConfClient *client,
tab_width = mateconf_value_get_int (entry->value); tab_width = mateconf_value_get_int (entry->value);
else else
tab_width = GPM_DEFAULT_TABS_SIZE; tab_width = GPM_DEFAULT_TABS_SIZE;
tab_width = CLAMP (tab_width, 1, 24); tab_width = CLAMP (tab_width, 1, 24);
views = pluma_app_get_views (pluma_app_get_default ()); views = pluma_app_get_views (pluma_app_get_default ());
@ -883,7 +883,7 @@ pluma_prefs_manager_tabs_size_changed (MateConfClient *client,
while (l != NULL) while (l != NULL)
{ {
gtk_source_view_set_tab_width (GTK_SOURCE_VIEW (l->data), gtk_source_view_set_tab_width (GTK_SOURCE_VIEW (l->data),
tab_width); tab_width);
l = l->next; l = l->next;
@ -898,7 +898,7 @@ pluma_prefs_manager_tabs_size_changed (MateConfClient *client,
GList *l; GList *l;
if (entry->value->type == MATECONF_VALUE_BOOL) if (entry->value->type == MATECONF_VALUE_BOOL)
enable = mateconf_value_get_bool (entry->value); enable = mateconf_value_get_bool (entry->value);
else else
enable = GPM_DEFAULT_INSERT_SPACES; enable = GPM_DEFAULT_INSERT_SPACES;
@ -908,7 +908,7 @@ pluma_prefs_manager_tabs_size_changed (MateConfClient *client,
while (l != NULL) while (l != NULL)
{ {
gtk_source_view_set_insert_spaces_instead_of_tabs ( gtk_source_view_set_insert_spaces_instead_of_tabs (
GTK_SOURCE_VIEW (l->data), GTK_SOURCE_VIEW (l->data),
enable); enable);
l = l->next; l = l->next;
@ -918,13 +918,13 @@ pluma_prefs_manager_tabs_size_changed (MateConfClient *client,
} }
} }
static GtkWrapMode static GtkWrapMode
get_wrap_mode_from_string (const gchar* str) get_wrap_mode_from_string (const gchar* str)
{ {
GtkWrapMode res; GtkWrapMode res;
g_return_val_if_fail (str != NULL, GTK_WRAP_WORD); g_return_val_if_fail (str != NULL, GTK_WRAP_WORD);
if (strcmp (str, "GTK_WRAP_NONE") == 0) if (strcmp (str, "GTK_WRAP_NONE") == 0)
res = GTK_WRAP_NONE; res = GTK_WRAP_NONE;
else else
@ -938,10 +938,10 @@ get_wrap_mode_from_string (const gchar* str)
return res; return res;
} }
static void static void
pluma_prefs_manager_wrap_mode_changed (MateConfClient *client, pluma_prefs_manager_wrap_mode_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data) gpointer user_data)
{ {
pluma_debug (DEBUG_PREFS); pluma_debug (DEBUG_PREFS);
@ -956,8 +956,8 @@ pluma_prefs_manager_wrap_mode_changed (MateConfClient *client,
GList *l; GList *l;
if (entry->value->type == MATECONF_VALUE_STRING) if (entry->value->type == MATECONF_VALUE_STRING)
wrap_mode = wrap_mode =
get_wrap_mode_from_string (mateconf_value_get_string (entry->value)); get_wrap_mode_from_string (mateconf_value_get_string (entry->value));
else else
wrap_mode = get_wrap_mode_from_string (GPM_DEFAULT_WRAP_MODE); wrap_mode = get_wrap_mode_from_string (GPM_DEFAULT_WRAP_MODE);
@ -976,10 +976,10 @@ pluma_prefs_manager_wrap_mode_changed (MateConfClient *client,
} }
} }
static void static void
pluma_prefs_manager_line_numbers_changed (MateConfClient *client, pluma_prefs_manager_line_numbers_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data) gpointer user_data)
{ {
pluma_debug (DEBUG_PREFS); pluma_debug (DEBUG_PREFS);
@ -994,7 +994,7 @@ pluma_prefs_manager_line_numbers_changed (MateConfClient *client,
GList *l; GList *l;
if (entry->value->type == MATECONF_VALUE_BOOL) if (entry->value->type == MATECONF_VALUE_BOOL)
dln = mateconf_value_get_bool (entry->value); dln = mateconf_value_get_bool (entry->value);
else else
dln = GPM_DEFAULT_DISPLAY_LINE_NUMBERS; dln = GPM_DEFAULT_DISPLAY_LINE_NUMBERS;
@ -1003,7 +1003,7 @@ pluma_prefs_manager_line_numbers_changed (MateConfClient *client,
while (l != NULL) while (l != NULL)
{ {
gtk_source_view_set_show_line_numbers (GTK_SOURCE_VIEW (l->data), gtk_source_view_set_show_line_numbers (GTK_SOURCE_VIEW (l->data),
dln); dln);
l = l->next; l = l->next;
@ -1013,10 +1013,10 @@ pluma_prefs_manager_line_numbers_changed (MateConfClient *client,
} }
} }
static void static void
pluma_prefs_manager_hl_current_line_changed (MateConfClient *client, pluma_prefs_manager_hl_current_line_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data) gpointer user_data)
{ {
pluma_debug (DEBUG_PREFS); pluma_debug (DEBUG_PREFS);
@ -1031,7 +1031,7 @@ pluma_prefs_manager_hl_current_line_changed (MateConfClient *client,
GList *l; GList *l;
if (entry->value->type == MATECONF_VALUE_BOOL) if (entry->value->type == MATECONF_VALUE_BOOL)
hl = mateconf_value_get_bool (entry->value); hl = mateconf_value_get_bool (entry->value);
else else
hl = GPM_DEFAULT_HIGHLIGHT_CURRENT_LINE; hl = GPM_DEFAULT_HIGHLIGHT_CURRENT_LINE;
@ -1040,7 +1040,7 @@ pluma_prefs_manager_hl_current_line_changed (MateConfClient *client,
while (l != NULL) while (l != NULL)
{ {
gtk_source_view_set_highlight_current_line (GTK_SOURCE_VIEW (l->data), gtk_source_view_set_highlight_current_line (GTK_SOURCE_VIEW (l->data),
hl); hl);
l = l->next; l = l->next;
@ -1050,10 +1050,10 @@ pluma_prefs_manager_hl_current_line_changed (MateConfClient *client,
} }
} }
static void static void
pluma_prefs_manager_bracket_matching_changed (MateConfClient *client, pluma_prefs_manager_bracket_matching_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data) gpointer user_data)
{ {
pluma_debug (DEBUG_PREFS); pluma_debug (DEBUG_PREFS);
@ -1087,10 +1087,10 @@ pluma_prefs_manager_bracket_matching_changed (MateConfClient *client,
} }
} }
static void static void
pluma_prefs_manager_auto_indent_changed (MateConfClient *client, pluma_prefs_manager_auto_indent_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data) gpointer user_data)
{ {
pluma_debug (DEBUG_PREFS); pluma_debug (DEBUG_PREFS);
@ -1105,18 +1105,18 @@ pluma_prefs_manager_auto_indent_changed (MateConfClient *client,
GList *l; GList *l;
if (entry->value->type == MATECONF_VALUE_BOOL) if (entry->value->type == MATECONF_VALUE_BOOL)
enable = mateconf_value_get_bool (entry->value); enable = mateconf_value_get_bool (entry->value);
else else
enable = GPM_DEFAULT_AUTO_INDENT; enable = GPM_DEFAULT_AUTO_INDENT;
views = pluma_app_get_views (pluma_app_get_default ()); views = pluma_app_get_views (pluma_app_get_default ());
l = views; l = views;
while (l != NULL) while (l != NULL)
{ {
gtk_source_view_set_auto_indent (GTK_SOURCE_VIEW (l->data), gtk_source_view_set_auto_indent (GTK_SOURCE_VIEW (l->data),
enable); enable);
l = l->next; l = l->next;
} }
@ -1124,10 +1124,10 @@ pluma_prefs_manager_auto_indent_changed (MateConfClient *client,
} }
} }
static void static void
pluma_prefs_manager_undo_changed (MateConfClient *client, pluma_prefs_manager_undo_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
gpointer user_data) gpointer user_data)
{ {
pluma_debug (DEBUG_PREFS); pluma_debug (DEBUG_PREFS);
@ -1145,15 +1145,15 @@ pluma_prefs_manager_undo_changed (MateConfClient *client,
ul = mateconf_value_get_int (entry->value); ul = mateconf_value_get_int (entry->value);
else else
ul = GPM_DEFAULT_UNDO_ACTIONS_LIMIT; ul = GPM_DEFAULT_UNDO_ACTIONS_LIMIT;
ul = CLAMP (ul, -1, 250); ul = CLAMP (ul, -1, 250);
docs = pluma_app_get_documents (pluma_app_get_default ()); docs = pluma_app_get_documents (pluma_app_get_default ());
l = docs; l = docs;
while (l != NULL) while (l != NULL)
{ {
gtk_source_buffer_set_max_undo_levels (GTK_SOURCE_BUFFER (l->data), gtk_source_buffer_set_max_undo_levels (GTK_SOURCE_BUFFER (l->data),
ul); ul);
l = l->next; l = l->next;
@ -1163,7 +1163,7 @@ pluma_prefs_manager_undo_changed (MateConfClient *client,
} }
} }
static void static void
pluma_prefs_manager_right_margin_changed (MateConfClient *client, pluma_prefs_manager_right_margin_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
@ -1207,7 +1207,7 @@ pluma_prefs_manager_right_margin_changed (MateConfClient *client,
GList *l; GList *l;
if (entry->value->type == MATECONF_VALUE_BOOL) if (entry->value->type == MATECONF_VALUE_BOOL)
display = mateconf_value_get_bool (entry->value); display = mateconf_value_get_bool (entry->value);
else else
display = GPM_DEFAULT_DISPLAY_RIGHT_MARGIN; display = GPM_DEFAULT_DISPLAY_RIGHT_MARGIN;
@ -1263,8 +1263,8 @@ pluma_prefs_manager_smart_home_end_changed (MateConfClient *client,
GList *l; GList *l;
if (entry->value->type == MATECONF_VALUE_STRING) if (entry->value->type == MATECONF_VALUE_STRING)
smart_he = smart_he =
get_smart_home_end_from_string (mateconf_value_get_string (entry->value)); get_smart_home_end_from_string (mateconf_value_get_string (entry->value));
else else
smart_he = get_smart_home_end_from_string (GPM_DEFAULT_SMART_HOME_END); smart_he = get_smart_home_end_from_string (GPM_DEFAULT_SMART_HOME_END);
@ -1416,12 +1416,12 @@ pluma_prefs_manager_source_style_scheme_changed (MateConfClient *client,
if (style == NULL) if (style == NULL)
{ {
g_warning ("Default style scheme '%s' not found, falling back to 'classic'", scheme); g_warning ("Default style scheme '%s' not found, falling back to 'classic'", scheme);
style = gtk_source_style_scheme_manager_get_scheme ( style = gtk_source_style_scheme_manager_get_scheme (
pluma_get_style_scheme_manager (), pluma_get_style_scheme_manager (),
"classic"); "classic");
if (style == NULL) if (style == NULL)
{ {
g_warning ("Style scheme 'classic' cannot be found, check your GtkSourceView installation."); g_warning ("Style scheme 'classic' cannot be found, check your GtkSourceView installation.");
return; return;
@ -1552,7 +1552,7 @@ pluma_prefs_manager_auto_save_changed (MateConfClient *client,
} }
} }
static void static void
pluma_prefs_manager_active_plugins_changed (MateConfClient *client, pluma_prefs_manager_active_plugins_changed (MateConfClient *client,
guint cnxn_id, guint cnxn_id,
MateConfEntry *entry, MateConfEntry *entry,
@ -1565,7 +1565,7 @@ pluma_prefs_manager_active_plugins_changed (MateConfClient *client,
if (strcmp (entry->key, GPM_ACTIVE_PLUGINS) == 0) if (strcmp (entry->key, GPM_ACTIVE_PLUGINS) == 0)
{ {
if ((entry->value->type == MATECONF_VALUE_LIST) && if ((entry->value->type == MATECONF_VALUE_LIST) &&
(mateconf_value_get_list_type (entry->value) == MATECONF_VALUE_STRING)) (mateconf_value_get_list_type (entry->value) == MATECONF_VALUE_STRING))
{ {
PlumaPluginsEngine *engine; PlumaPluginsEngine *engine;
@ -1599,22 +1599,22 @@ pluma_prefs_manager_lockdown_changed (MateConfClient *client,
app = pluma_app_get_default (); app = pluma_app_get_default ();
if (strcmp (entry->key, GPM_LOCKDOWN_COMMAND_LINE) == 0) if (strcmp (entry->key, GPM_LOCKDOWN_COMMAND_LINE) == 0)
_pluma_app_set_lockdown_bit (app, _pluma_app_set_lockdown_bit (app,
PLUMA_LOCKDOWN_COMMAND_LINE, PLUMA_LOCKDOWN_COMMAND_LINE,
locked); locked);
else if (strcmp (entry->key, GPM_LOCKDOWN_PRINTING) == 0) else if (strcmp (entry->key, GPM_LOCKDOWN_PRINTING) == 0)
_pluma_app_set_lockdown_bit (app, _pluma_app_set_lockdown_bit (app,
PLUMA_LOCKDOWN_PRINTING, PLUMA_LOCKDOWN_PRINTING,
locked); locked);
else if (strcmp (entry->key, GPM_LOCKDOWN_PRINT_SETUP) == 0) else if (strcmp (entry->key, GPM_LOCKDOWN_PRINT_SETUP) == 0)
_pluma_app_set_lockdown_bit (app, _pluma_app_set_lockdown_bit (app,
PLUMA_LOCKDOWN_PRINT_SETUP, PLUMA_LOCKDOWN_PRINT_SETUP,
locked); locked);
else if (strcmp (entry->key, GPM_LOCKDOWN_SAVE_TO_DISK) == 0) else if (strcmp (entry->key, GPM_LOCKDOWN_SAVE_TO_DISK) == 0)
_pluma_app_set_lockdown_bit (app, _pluma_app_set_lockdown_bit (app,
PLUMA_LOCKDOWN_SAVE_TO_DISK, PLUMA_LOCKDOWN_SAVE_TO_DISK,
locked); locked);
} }

View File

@ -3,7 +3,7 @@
* pluma-prefs-manager.h * pluma-prefs-manager.h
* This file is part of pluma * This file is part of pluma
* *
* Copyright (C) 2002 Paolo Maggi * Copyright (C) 2002 Paolo Maggi
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -17,14 +17,14 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, * Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
/* /*
* Modified by the pluma Team, 2002. See the AUTHORS file for a * Modified by the pluma Team, 2002. See the AUTHORS file for a
* list of people on the pluma Team. * list of people on the pluma Team.
* See the ChangeLog files for a list of changes. * See the ChangeLog files for a list of changes.
*/ */
#ifndef __PLUMA_PREFS_MANAGER_H__ #ifndef __PLUMA_PREFS_MANAGER_H__
@ -35,7 +35,7 @@
#include <gtksourceview/gtksourceview.h> #include <gtksourceview/gtksourceview.h>
#include "pluma-app.h" #include "pluma-app.h"
#define PLUMA_BASE_KEY "/apps/pluma-2" #define PLUMA_BASE_KEY "/apps/pluma"
#define GPM_PREFS_DIR PLUMA_BASE_KEY "/preferences" #define GPM_PREFS_DIR PLUMA_BASE_KEY "/preferences"
@ -170,7 +170,7 @@
#define GPM_DEFAULT_DISPLAY_LINE_NUMBERS 0 /* FALSE */ #define GPM_DEFAULT_DISPLAY_LINE_NUMBERS 0 /* FALSE */
#define GPM_DEFAULT_AUTO_DETECTED_ENCODINGS {"UTF-8", "CURRENT", "ISO-8859-15", NULL} #define GPM_DEFAULT_AUTO_DETECTED_ENCODINGS {"UTF-8", "CURRENT", "ISO-8859-15", NULL}
#define GPM_DEFAULT_TOOLBAR_VISIBLE 1 /* TRUE */ #define GPM_DEFAULT_TOOLBAR_VISIBLE 1 /* TRUE */
#define GPM_DEFAULT_TOOLBAR_BUTTONS_STYLE "PLUMA_TOOLBAR_SYSTEM" #define GPM_DEFAULT_TOOLBAR_BUTTONS_STYLE "PLUMA_TOOLBAR_SYSTEM"
#define GPM_DEFAULT_TOOLBAR_SHOW_TOOLTIPS 1 /* TRUE */ #define GPM_DEFAULT_TOOLBAR_SHOW_TOOLTIPS 1 /* TRUE */
@ -295,8 +295,8 @@ void pluma_prefs_manager_set_toolbar_visible (gboolean tv);
gboolean pluma_prefs_manager_toolbar_visible_can_set (void); gboolean pluma_prefs_manager_toolbar_visible_can_set (void);
/* Toolbar buttons style */ /* Toolbar buttons style */
PlumaToolbarSetting pluma_prefs_manager_get_toolbar_buttons_style (void); PlumaToolbarSetting pluma_prefs_manager_get_toolbar_buttons_style (void);
void pluma_prefs_manager_set_toolbar_buttons_style (PlumaToolbarSetting tbs); void pluma_prefs_manager_set_toolbar_buttons_style (PlumaToolbarSetting tbs);
gboolean pluma_prefs_manager_toolbar_buttons_style_can_set (void); gboolean pluma_prefs_manager_toolbar_buttons_style_can_set (void);
/* Statusbar visible */ /* Statusbar visible */
@ -322,13 +322,13 @@ gboolean pluma_prefs_manager_print_syntax_hl_can_set (void);
gboolean pluma_prefs_manager_get_print_header (void); gboolean pluma_prefs_manager_get_print_header (void);
void pluma_prefs_manager_set_print_header (gboolean ph); void pluma_prefs_manager_set_print_header (gboolean ph);
gboolean pluma_prefs_manager_print_header_can_set (void); gboolean pluma_prefs_manager_print_header_can_set (void);
/* Wrap mode while printing */ /* Wrap mode while printing */
GtkWrapMode pluma_prefs_manager_get_print_wrap_mode (void); GtkWrapMode pluma_prefs_manager_get_print_wrap_mode (void);
void pluma_prefs_manager_set_print_wrap_mode (GtkWrapMode pwm); void pluma_prefs_manager_set_print_wrap_mode (GtkWrapMode pwm);
gboolean pluma_prefs_manager_print_wrap_mode_can_set (void); gboolean pluma_prefs_manager_print_wrap_mode_can_set (void);
/* Print line numbers */ /* Print line numbers */
gint pluma_prefs_manager_get_print_line_numbers (void); gint pluma_prefs_manager_get_print_line_numbers (void);
void pluma_prefs_manager_set_print_line_numbers (gint pln); void pluma_prefs_manager_set_print_line_numbers (gint pln);
gboolean pluma_prefs_manager_print_line_numbers_can_set (void); gboolean pluma_prefs_manager_print_line_numbers_can_set (void);
@ -351,8 +351,8 @@ void pluma_prefs_manager_set_print_font_numbers (const gchar *font);
gboolean pluma_prefs_manager_print_font_numbers_can_set (void); gboolean pluma_prefs_manager_print_font_numbers_can_set (void);
const gchar *pluma_prefs_manager_get_default_print_font_numbers (void); const gchar *pluma_prefs_manager_get_default_print_font_numbers (void);
/* Max number of files in "Recent Files" menu. /* Max number of files in "Recent Files" menu.
* This is configurable only using mateconftool or mateconf-editor * This is configurable only using mateconftool or mateconf-editor
*/ */
gint pluma_prefs_manager_get_max_recents (void); gint pluma_prefs_manager_get_max_recents (void);

View File

@ -219,22 +219,22 @@ cp -R "${_gtksourceview_prefix}/share/gtksourceview-2.0/language-specs" installe
cp -R "${_gtksourceview_prefix}/share/gtksourceview-2.0/styles" installer/pluma/share/gtksourceview-2.0 || exit cp -R "${_gtksourceview_prefix}/share/gtksourceview-2.0/styles" installer/pluma/share/gtksourceview-2.0 || exit
#GtkBuilder files and xml files #GtkBuilder files and xml files
mkdir -p installer/pluma/share/pluma-2/ui || exit mkdir -p installer/pluma/share/pluma/ui || exit
cp "${_pluma_prefix}/share/pluma-2/ui/"* installer/pluma/share/pluma-2/ui || exit cp "${_pluma_prefix}/share/pluma/ui/"* installer/pluma/share/pluma/ui || exit
#Icons & logo #Icons & logo
mkdir -p installer/pluma/share/pluma-2/icons || exit mkdir -p installer/pluma/share/pluma/icons || exit
cp "${_pluma_prefix}/share/pluma-2/icons/pluma-plugin.png" installer/pluma/share/pluma-2/icons || exit cp "${_pluma_prefix}/share/pluma/icons/pluma-plugin.png" installer/pluma/share/pluma/icons || exit
mkdir -p installer/pluma/share/pluma-2/logo || exit mkdir -p installer/pluma/share/pluma/logo || exit
cp "${_pluma_prefix}/share/pluma-2/logo/pluma-logo.png" installer/pluma/share/pluma-2/logo || exit cp "${_pluma_prefix}/share/pluma/logo/pluma-logo.png" installer/pluma/share/pluma/logo || exit
#Plugins #Plugins
mkdir -p installer/pluma/share/pluma-2/plugins || exit mkdir -p installer/pluma/share/pluma/plugins || exit
cp -R "${_pluma_prefix}/share/pluma-2/plugins/"* installer/pluma/share/pluma-2/plugins || exit cp -R "${_pluma_prefix}/share/pluma/plugins/"* installer/pluma/share/pluma/plugins || exit
mkdir -p installer/pluma/lib/pluma-2/plugins || exit mkdir -p installer/pluma/lib/pluma/plugins || exit
cp -R "${_pluma_prefix}/lib/pluma-2/plugins/"* installer/pluma/lib/pluma-2/plugins || exit cp -R "${_pluma_prefix}/lib/pluma/plugins/"* installer/pluma/lib/pluma/plugins || exit
mkdir -p installer/pluma/lib/pluma-2/plugin-loaders || exit mkdir -p installer/pluma/lib/pluma/plugin-loaders || exit
cp -R "${_pluma_prefix}/lib/pluma-2/plugin-loaders/"* installer/pluma/lib/pluma-2/plugin-loaders || exit cp -R "${_pluma_prefix}/lib/pluma/plugin-loaders/"* installer/pluma/lib/pluma/plugin-loaders || exit
#MateConf #MateConf
mkdir -p installer/pluma/etc/mateconf/schemas || exit mkdir -p installer/pluma/etc/mateconf/schemas || exit